autopilot
autopilot copied to clipboard
Bpod port assembly interface example request
Hi there, my apologies if this is better posted elsewhere, but would it be possible for example code to be posted that would enable interacting with Sanworks Bpod port assemblies? These assemblies have a nose poke beam break, embedded LED, and solenoid for water delivery.
More generally, the documentation I'm seeing appears to be lacking full examples of entire experiments. Am I missing something?
Best, Matthew
Hello Matthew -
Sorry for the delay. I really need to put up a 'project status' notice for Autopilot that we're recalibrating a bit before getting started again.
I don't have a specific example for the bpod nosepoke assemblies, but presuming the beam break logic is some sort of TTL-like signal, you should be able to wire up the logic pin directly to a GPIO pin on the raspi and use it with the Digital_In
class.
I made our own nosepoke that is pretty straightforward to build, hand soldered with through-hole parts, and just uses the GPIO pins and onboard 5V rail for a solenoid: https://wiki.auto-pi-lot.com/index.php/Autopilot_Tripoke
examples here: https://docs.auto-pi-lot.com/en/latest/examples/index.html and some of the experiments we did in our lab: https://wiki.auto-pi-lot.com/index.php/Wehrlab https://github.com/auto-pi-lot/autopilot-plugin-wehrlab/
the design currently is to have some in-repo base Task
class (eg Nafc
) and then extend those in plugins by inheriting from the metaclasses.
We're going to start work on Autopilot 2 sometime this fall :)
The main thing to watch out for are voltage levels. The bpod valve is a 12V solenoid. I think the IR led is 5V, but i'm not sure about the photodiode... i guess it is 3.3V since the teensy (which is the current platform is also 3.3V) - but the bpod control board has a bunch of hardware for level shifting, i think.