Testing and Calibration

In this section we've collected a set of procedures for testing and/or calibrating installed Maestro hardware or equipment in the laboratory rig.

Using Test mode

In this operational mode you can perform a number of tests to verify the operation of Maestro's analog input, analog output, and digital IO event timer functions. Some examples:

    • To check the fidelity of acquired analog data, you can connect a high-precision source to any analog input and view the voltage recorded.

    • Connect any analog input to ground and monitor the voltage recorded to assess noise in the system. Test mode computes and displays the mean and standard deviation of the signal recorded on each AI channel.

    • Present a sinusoidal test waveform on any analog output channel and observe the resulting signal with an oscilloscope.

    • Toggle each digital output channel individually, which can help when testing/debugging the digital IO backplane interface.

    • Connect a digital output to each of the 16 digital inputs in turn and toggle the output repeatedly to ensure the DIO event timer's time-stamping functionality is working. If you can install a "loop-back" cable that connects each DO<N> to the corresponding DI<N>, Test mode includes a Loopback Test that will quickly check the time-stamping functionality for each of the 16 digital inputs.

Since you can control the state of each bit DO<15..0> on the event timer's digital output port, it is possible to use Test mode to validate the operation of some of the custom modules that plug into the DIO backplane interface. To do so, you must remember how Maestro communicates with these modules. Each type of module is assigned a unique 4-bit address. Bits DO<15..12> are the address, while bits DO<11..0> represent the data or command being sent to the addressed device. Each module is designed to latch in the data bits and respond accordingly only if DO<15..12> matches its assigned address. Take the TTL output or "marker pulse" module as an example (address = 0001b). In this case, the data bits represent the state of the module's 11 TTL outputs. To verify that the module is working correctly, set DO<15..12> = 0001 in Test mode, then toggle each of DO<11..0> one at a time and check that the corresponding module output is likewise toggled.

Adjusting DC offset in the chair drive velocity command to minimize position drift

One of the analog output channels is dedicated as the velocity command signal driving the servo which controls the rotational position of the turntable on which the animal sits -- known as the Chair target in Maestro. Ideally, when this output is at zero volts, the Chair should not move. Unfortunately, the servo amplifier system employed in our laboratory is rather sensitive to any DC offset in the command voltage. As a consequence, the Chair's position will slowly drift away from the rest position (0 degrees), accelerating the further it gets from that position. In all operational modes except Test mode, Maestro monitors and compensates for this drift by applying a small velocity correction once per scan interval (1ms in Trial or Continuous mode, 20ms in Idle mode). For this drift compensation algorithm to work, the DC offset voltage on the relevant analog output channel must be carefully adjusted to minimize position drift when the nominal velocity command signal is 0 volts.

To make this adjustment, put Maestro in Test mode and make sure that the relevant analog output channel is set to 0 volts. Use a voltmeter to independently measure the voltage delivered on the channel at the analog I/O interface panel. This will be the DC offset voltage; in all likelihood, it will not be zero! Use an oscilloscope to monitor the Chair's position, which is equivalent to horizontal head position, or HHPOS, in the Lisberger lab rigs. Now, turn on the servo amplifier and monitor the drift in HHPOS on the oscilloscope. Measure how long it takes for HHPOS to drift 1V. Reset the servo and restore the turntable to the face-forward position. Then adjust the DC offset slightly using the appropriate potentiometer on the analog I/O interface, turn on the servo again, and repeat the measurement. Repeat this process until you find a DC offset that minimizes drift. In practice, we've been able to adjust the offset so that it takes longer than 80 seconds for the HHPOS signal to drift by 1V.

Once you've completed the procedure, verify that the Chair works properly by driving it in some reasonable fashion in Trial or Continuous mode. Then be sure to cover the DC offset pot and tell everyone to leave it alone!