Camera trigger device with precise timing and analog input

camtrig – Camera trigger device firmware

camtrig - firmware for precisely timed trigger generation with synchronized analog input


Triggering your camera is useful to synchronize it with other devices. These other devices can be other cameras, so that images are taken simultaneously, or a computer, so that the images can be correlated with other activity.



Camtrig is firmware for the $30 AT90USBKEY USB development board that:

  1. generates trigger pulses to feed into the external trigger input of digital video cameras. The pulses are generated with a 16-bit hardware timer using an 8 MHz crystal oscillator to produce very regular timing.
  2. communicates synchronization information with software running on a PC. By repeatedly querying for timestamps from the USB device, the PC is able to make a model of the gain and offset of the two clocks with computed precision.
  3. acquires analog voltage streams. The AT90USBKEY has a multiplexed 10-bit analog-to-digital converter (ADC), which can sample from 0.0 to 3.3 volts and operates up to 9.6 KHz using motmot.fview_ext_trig.
  4. produces digital pulses to trigger other hardware.
  5. provides a GUI plugin to fview that includes a display like a strip-chart recorder. This plugin is motmot.fview_ext_trig.


The device is accessed using the Python motmot.fview_ext_trig package.

Camtrig is built with GCC-AVR using the LUFA library for the AT90USBKEY. To load the firmware onto the device, use dfu-programmer or FLIP to transfer the hex file camtrig.hex to the device in Device Firmware Upload (DFU) mode.


The source code for the camera trigger device is kept in the fview_ext_trig git repository under the CamTrigUSB directory. Alternatively, download the released Python code at the PyPI page and the firmware, camtrig.hex, from github.