Skip to content

Control and Timing

Kyle M. Douglass edited this page Mar 2, 2026 · 28 revisions

Controls and synchronizes the galvanometer mirror, camera, and other devices

DAQ

Hardware

  • NI BNC-2110 (Terminal Block)
  • NI PCI-6733 (PCI interface card)

Pin Out

  • AO 0: Galvanometer
  • AO 1: Trigger In, Photometrics Prime BSI
  • AO 2: AOTF Blanking
  • AO 3: AOTF Channel 1, Laser 488 nm
  • AO 4: AOTF Channel 2, Laser 561 nm
  • AO 5: LED MOD IN
  • AO 6:
  • AO 7:

For triggering the NI-DAQ:

  • Trigger Ready, Photometrics Prime BSI --> NI BNC-2110 USER 2
  • NI BNC-2110 USER 2 --> PFI 3 (via spring terminal jumper; I used 22 AWG wire)
image

To use the spring terminal, press down on the orange tabs with a small screw driver, insert the jumper wire, and release the tab.

Test Procedure: Analog Output Waveform

  • Open NI MAX
  • Select NI-DAQmx Tasks. Choose the AnalogVoltageWaveform task. If it doesn't exist, create it in the Devices and Interfaces panel for the PCI-6733 device.
  • Connect a BNC cable to the configured analog output channel (I used ao6). You might need to unplug an existing cable.
  • Connect the oscilloscope to the other end of the cable.
  • Select Triangle Wave for Test Signal Type.
  • Choose Continuous Samples for generation mode.

The Samples to Write (N) field is the number of samples per waveform period. The Rate (f) field is the number of samples per second. If T_w is the period of the waveform, then: T_w = N / f. You can verify this period with the oscilloscope.

For example, 10 samples to write at 500 Hz produces a waveform with a 20 ms period. Note that 100 samples at 5 kHz produces a waveform with the same 20 ms period but that is much smoother due to there being more samples.

Voltage Range

The peak-to-peak voltage (V_pp) range of the waveform should match the NI MAX settings. If they don't:

  • Check that the probe attenuation on the oscilloscope is set to 1x. A normal BNC cable has no attenuation, unlike common oscilloscope probes that have 10x attenuation.
    • Double tap the channel badge on the Tektronix MSO24 and then select Probe Setup to change this setting.
  • Check the VAC with a multimeter, which outputs RMS voltage. VAC = V_pp / 2 / sqrt(3) for a symmetric triangle wave. For example, a 2 V_pp triangle waveform should produce an approximate 0.58 VAC reading.

Camera

Expose Out Modes

  • Any Row Mode
    • Expose out is high while any row is exposing simultaneously
  • Rolling Shutter Mode (Default)
    • Use when you want a specific acquisition speed
    • Exposure time specifies total frame time
    • Expose out is high when all rows are exposing simultaneously

Rolling Shutter Readout Times/Minimum Frame Intervals

In rolling shutter mode, the exposure time corresponds to the time that all rows are exposing simultaneously. Due to their staggered individual exposure times, it's possible to set the exposure time setting (i.e. frame interval) to a value so small that all of the rows are never simultaneously exposing.

This situations occurs when the exposure time is less than or equal to the readout time. The readout time of a frame depends on a few settings, such as

  1. Number of rows in the ROI (the number of columns in the ROI doesn't change the readout time)
  2. The readout rate

Importantly, the readout rate sets the minimum exposure time setting of the camera. Below this value, there is never a moment when all rows are simultaneously exposing.

The table below lists the readout times for different camera settings. In 200 MHz 11 bit mode, the gain does not change the readout time, so it is the same regardless of whether it is set to Full well, Balanced, or Sensitivity.

Readout Rate Number of Rows, px Gain Readout Time, ms
200 MHz 11 bit 2048 1-Full well 15.86
200 MHz 11 bit 1024 1-Full well 7.95
200 MHz 11 bit 512 1-Full well 3.98
200 MHz 11 bit 256 1-Full well 2.01
200 MHz 11 bit 128 1-Full well 1.01
100 MHz 16 bit 2048 1-HDR 22.94
100 MHz 16 bit 1024 1-HDR 11.49
100 MHz 16 bit 512 1-HDR 5.75
100 MHz 16 bit 256 1-HDR 2.88
100 MHz 16 bit 128 1-HDR 1.46

In Micro-Manager, you can get the readout time from the camera device property Timing-ReadoutTimeNs. The units are nanoseconds.

Galvanometer

Test Procedure: Mirror Positioning

  1. Power on the galvo and NI DAQ (power switch number 1)
  2. Open NI Measurement & Automation Explorer (NI MAX) software
  3. Expand Devices and Interfaces and select the NI PCI-6733 device.
  4. Select Test Panels....
  5. Select the Analog Output tab.
  6. Select the Dev1/ao0 Channel Name.
  7. Adjust the output voltage between -1 V and 1 V, pressing Update after each change. Confirm that the galvo mirror rotates after each change.

Input Voltage Range

The input voltage range on our servo driver is ±10V.

Board Configuration

The input voltage range is configured by the presence/absence of solder bridges on the R42 and R123 jumpers. (see page 12 of the manual)

R42 Status R123 Status Command Range
SHORT SHORT ±3V
SHORT OPEN ±5V
OPEN OPEN ±10V

On our board: R42 and R123 are open, though it looks as if there was previously solder on R42 that was removed.

J3 Connector on the QuantumDrive-4000 Servo Driver

Control signals are delivered over the J3 connector. With the heatsink in the top-left of the board, the pinout is:

Column 1 Column 2
4 3
2 1
  1. +Command (black cable)
  2. Ground (green cable)
  3. -Command (white cable)
  4. Offset Adjust (unused)

Single-ended operation

The servo driver is configured for single-ended operation. This is achieved by:

  • Pins 2 and 3 are shorted together.
  • There is a solder bridge across R77 on the driver board.

We can still apply a positive or negative voltage to the +Command pin for the full range; the voltage is just referenced to ground.

Rotation Direction

Looking at the galvo from above:

  • Increasing voltage: Clockwise
  • Decreasing voltage Counterclockwise