Synchronizing with a behavioural camera#

Using a webcam#

With ‘webcam’, we mean a camera that can not send a TTL pulse whenever it acquires a frame. This can be problematic, because you need to know which camera frame corresponds to which electrophysiological samples. You can still use these cameras for behavioural tracking.

You can do this using a microcontroller such as an Arduino or a Teensy, running a program that periodically sends a ‘high’ digital pulse. Route this pulse to an LED, so that it lights up when the signal is ‘high’, and to the digital input to the Open Ephys board, so that the acquisition hardware and software knows when the LED was on. Include the LED in the field of view of the camera (where the animal is not influenced by it) so that the camera recordings, visually, when the LED was on. The most appropriate pattern for your LED depends on your experiment, but this way you have an anchoring signal to link your behaviour and ephys data.

webcam with LED

Using a behavioural camera with GPIO/ TTL output#

You can acquire the camera data in its own software or Bonsai, and send a TTL to the digital input of the Acquisition Board, so that each frame of the camera is marked in time on the electrophysiology acquisition. Make sure to have your ephys recording before you start the camera, so that you know which is the first frame.

When synchronizing with TTL pulses, the I/O board should be connected to the Digital Input port of the acquisition board:


../_images/ttl_port.png

Open Ephys GUI Tracking Plugin#

There is a specific plugin for the Open Ephys GUI that uses the tracking capability of Bonsai and integrates this in the Open Ephys GUI for visualisation. Read the paper here.

../_images/tracking.jpg