Control GPIO pin of PointGrey camera

916 views
Skip to first unread message

Thomas Gener

unread,
Apr 15, 2015, 5:56:50 AM4/15/15
to bonsai...@googlegroups.com
Hello Everyone, 

I'm quiet new using Bonsai.
I'm using a PointGrey Camera and I would like to use the GPIO pin of the camera send some TTL when the tracked object enter in a ROI.

Is it possible ? How I can do that ? 

Thanks, 

Thomas

goncaloclopes

unread,
Apr 15, 2015, 7:17:49 AM4/15/15
to bonsai...@googlegroups.com
Hi Thomas,

Welcome to the forums!

The GPIO pins of the PointGrey are indeed very versatile. You can read all about it in the FLEA3 USB 3.0 reference manual.
Basically you can do the following:
  • In triggered INPUT mode, trigger frame capture with external TTL
  • In free INPUT mode, read the state of the pin synchronized with frame acquisition
  • In OUTPUT mode, strobe a signal relative to shutter opening time (useful for syncing video acquisition to ephys)
  • In OUTPUT mode, send a PWM pulse train through the pin.
Unfortunately, Bonsai does not yet support the last bullet point. A sink would have to be implemented to allow you to set output pins in the camera. I will consider adding this feature to future versions.

In the meantime, the workaround would be to use an Arduino microcontroller to do this. From Bonsai you can set digital outputs in the Arduino using the DigitalOutput sink. You can find more details about Arduino/Bonsai communication in the following question: https://groups.google.com/forum/#!topic/bonsai-users/QNLEMDrtgts

Probably we should also write a more detailed tutorial/example of how to do this.

Hopefully it helps but let me know if you have any problems down the line.

Cheers,
Gonçalo
Reply all
Reply to author
Forward
0 new messages