Connecting an optogenetics laser to be controlled by EthoVision XT

EthoVision XT can be used to control a laser or LED for Optogenetics, triggering the light based on time or on the animal’s activity. For example, the laser may be turned on when the animal enters a given zone.

EthoVision will not pulse the laser. If that is required, a separate pulse generator will be needed. But EthoVision will trigger that pulse generator to start and stop pulsing. In general, a laser or light stimulus can be used for inhibition without pulsing, but stimulation will require pulsing (e.g. often at 20 Hz).

What components are required?

The complete system will include:

  • EthoVision XT and the computer it is running on
  • The Trial & Hardware Control Module for EthoVision
  • The USB IO box or Mini IO box connected to the computer via USB
  • A laser or high intensity LED light source
  • A pulse generator
  • Fiber optics, connectors, canula, etc (outside the scope of what is discussed here)

You will need a cable from one of the TTL ports on the USB IO box or Mini IO box to your pulse generator (or directly to the laser if no pulse generator is being used). This cable will have a RJ45 connector on one end (the same as a typical network cable), and typically a BNC connector on the other (depending on the equipment to be connected). 

Basic setup within EthoVision

All hardware devices to be controlled must be set up at several points within your experiment:

  • In the Experiment Settings, check the checkbox for Use Of Trial Control Hardware. (Note: this option will not appear if you do not have the Trial & Hardware Control Module.)
  • Click the Settings button next to that checkbox, and select the USB IO box or Mini IO box, depending on which you are using. For the TTL port you have connected your cable to, select “Custom Hardware” as the device type.
  • In the Arena Settings, click the “Arena-Hardware Mapping” button at the lower right. Your device should be listed here; if not, click Add. Make sure your device is selected in the Arena 1 column. If you have multiple arenas, you can assign a device to each arena on the same line so they will operate according to the same trial control rules (but independently per arena). 
  • While in the Arena-Hardware Mapping window, you can test whether the laser is hooked up properly by selecting the device in the Arena 1 column and then clicking Test. Select “Output 1 High” and click the Test button to turn the TTL output on, or “Output 1 Low” and click the Test button to turn it off. If the laser does not respond as expected, you will need to adjust the settings on your pulse generator (see next section).

Setting up the pulse generator

EthoVision is highly adaptable and can be used with a wide variety of pulse generators. This type of equipment normally uses a simple 5V trigger signal, regardless of maker, so it’s just a matter of providing the correct type of cable and setting the pulse generator correctly. An Arduino can also be used in place of a pulse generator for those willing to do their own wiring. Settings are listed below for some models we frequently encounter. Contact Noldus support if you need assistance finding the settings for other models.

Pulse generators have three general types of settings. There is a mode in which the laser/LED is controlled manually, which is helpful for testing the apparatus.

A second mode triggers the pulse generator to provide a stimulus of a fixed duration (usually a “train” of pulses), which can be useful if you want the stimulation to be exactly the same each time:

  • Prizmatix Pulser: “Execute pulse sequence each time after trigger(s).”
  • AMPI Master-8 and Master-9: “Train”
  • Agilent Waveform Generator: “Triggered Burst Mode.”

The third mode is one in which the pulse generator begins its output when the trigger is turned on, and then continues repeating that output until the trigger is turned off. This is ideal if you want the stimulation to continue as long as the triggering condition is true, for example as long as the animal remains in a particular region.

  • Prizmatix Pulser: “Execute pulse sequence after trigger HIGH, then stop when LOW.”
  • AMPI Master-8 and Master-9: “Gate”
  • Agilent Waveform Generator: “External Gated Burst Mode.”
  • Plexon PlexBright: use “Edge Digital Input” mode in which one trigger input turns the signal on and a separate trigger input turns it off. Note that, in the trial control settings, you will still need to turn the triggers off after a certain minimum time before they can be turned on again.

EthoVision trial control settings

Use the Trial Control to define how long the trial should run, and at what points devices should be turned on and off. The simplest possible optogenetics trial would present the stimulation (or inhibition) at a particular time. The Trial Control is simply a flow chart of the events of the trial. Individual steps in the trial can be named to make it easier to refer to them in the analysis. Here, we have an initial 5 minute pre-stimulation period, followed by a minute of stimulation, and then 5 minutes post-stimulation:

Any number of events can be strung together this way. The events flow in the direction of the arrows, and when they reach “Stop Track”, the trial is over.

Repeated stimulation

However, sometimes you want to repeat events over and over. It’s possible to do that by stringing many boxes together, but it can be easier to create a Sub-Rule which repeats a predefined number of times. In this example, after the 5 minute pre-stimulation period, the sub-rule is called three times. Each time, the stimulation is activated for two minutes, then turned off for two minutes. When the sub-rule has completed the third run-through, we continue to the Stop Track box and the trial ends.


A common scenario is a place preference test. In this case, the stimulation (or inhibition) occurs whenever the animal is in a particular zone. Instead of running the sub-rule a pre-determined number of times, we want it to run repeatedly, checking whether the animal is in the zone or not. In this example, the stimulation begins when the animal enters the Left zone, and stops when the animal moves to the Right zone. Because the sub-rule will never complete (it will just keep checking which zone the animal is in), we add a time condition to control the duration of the whole trial (10 minutes in this example).

Other options

Although in this example we used the zone to trigger the stimulation, in fact it’s possible to use any behavior the same way. Stimulation (or, for that matter, lights, sounds, pellet dispensers, or any other type of device) can be triggered based on the activity level, velocity, degree of turning, or other behavioral measures. It could also be based on sensors, for example when a lever is pressed or a nose-poke sensor is triggered.