Sync Bpod with microscope frame acquisition

Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sync Bpod with microscope frame acquisition
#11
(01-23-2019, 06:37 AM)Josh Wrote: Hi Sara,

I can think of two ways to solve this - 
1. Re-design your protocol to use TrialManager. This should reduce the dead-time between trials to ~200-500 microseconds; less than 1 frame

OR

2. If your microscope hardware has a TTL input, you can have the state machine send sync pulses from any available digital output (e.g. BNC, port LED). That way you'd have timestamps for Bpod events on the microscope clock along with the camera frame timestamps. The sync channel can either toggle its logic level once per trial (precisely indicating trial start and end), or once per state, indicating each state's onset time. To configure the channel and sync scheme, open the settings menu from the Bpod console and click the 'sync' icon.

-Josh

Hi Josh,

Re scenario 2 above: you refer to configuring the 'sync scheme', which is not an option with the r0.5 board - is there a way to achieve the same result in this older model with the fixed sync port? 

I am trying to link Bpod (r0.5) with the PXIE acquisition module used with Neuropixels to sync timing. The NP acquisition module has an SMA connector for this purpose, I'm just not sure how to connect it to Bpod - would a simple RJ45 to SMA adapter work in this case? Alternatively, is there an easy way to configure a BNC output for syncing in this older version? 

Thank you in advance for your help.
Raul
Reply
#12
Hi Raul,

Depending on the SMA connector (male or female) you can use this or this to convert it to BNC. Then, use a BNC cable to connect a BNC output channel on the state machine to the SMA input channel on the NP board. 

State machine r0.5 used a sync scheme where you would need 7 input channels on the acquisition system (from 7 pins of the RJ45 + ground), whose logic is read out in binary to indicate the current state. A single-channel TTL sync signal can indicate either trial start (high) and trial end (low), or each state transition (indicated with a logic transition). For state machine r0.5, you'll need to implement that manually - in the 'output actions' section of each state description, add {'BNC2', LEVEL} where 'BNC2' is your sync channel, and LEVEL is 1 or 0. Keep in mind that the default is 0, so if you're implementing the first scheme (high on trial start and low on trial end), you'll need  {'BNC2', 1} in every state to keep the line high.

-Josh
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)