Hi Josh + others!
I’m working on an experiment in which the positions of two lick ports are modulated by linear actuators. To do this, I have strapped a bpod Arduino shield onto an Arduino Zero, which is connected to two linear actuators (one per port) via an L298N driver. When I run a simple standalone test with this Arduino function (extend both ports for X ms, pause, retract both ports for X ms), I find that I am able to accurately control the positions of the lick ports with little to no drift. However, when using a similar function during my bpod task (still using the same amount of time for extending and retracting), both ports drift considerably and in different directions (although one is not quite as bad as the other), such that after about 20 trials one of the lick ports can no longer be reached by the mouse and the other one is poking into its mouth.
Although I imagine I could try to resolve this by first determining if the extend/retract difference is consistent and then changing the extend/retract times accordingly, I’m using some very small movements and measuring their accuracy is non-trivial. Also, the fact that this issue is not inherent to the actuator (given that the standalone test showed no drift), I’m not super excited about that option.
Accordingly, I was wondering if you have any idea why I’m experiencing a drift only in the context of my bpod task, and also if there’s another way of connecting the actuators to bpod (i.e., via softcodes) that might circumvent this issue. Some of my animals have already started pre-training and I’d really like to get this sorted out this week, so any assistance you could provide would be appreciated! Also, please let me know if any additional information would be helpful for troubleshooting this problem (i.e., the bpod task script) and I’d be happy to send it along.
Thanks so much!
-David