This simple optogenetics stimulation driver is based on the Arduino Uno, and produces millisecond-accurate timing to control a single laser or LED. The dials allow easy control of pulse on-time and frequency, with a simple switch to turn the flashing on or off.
The prototype Uno is currently being used on one of our electrophysiology rigs to drive flashing of the LED for optogenetic stimulation.
The code is written for the preset timings shown, but can easily be modified prior to uploading to the Arduino.
Solder jumper wires to five of the outer pins on each rotary switch, and a normal wire to the central (ground) pin.
Solder wires to the toggle switch, one each to middle and one side pin.
Solder wires to the pushbutton pins (if being used).
Solder jumper wire to the LED anode pin, and a 330 ohm resistor to the cathode pin; then a wire to the resistor.
Solder jumper wire to BNC signal pin (central pin), and a normal wire to the BNC ground (side pin).
Jumper wires make it easy to connect to the Arduino I/O pins, but there aren't sufficient ground pins, so you need to use normal wires, then solder those together.
Any exposed regions can be shielded with heat-shrink tubing if there is any concern of movement/contacting other bits.
2
Connect to Arduino
Plug the collated ground wires into the Arduino Ground pin, and plug the other jumper wires into the correct I/O pins:
Toggle switch - 0
Pilot LED - 1
TTL output - 2
Rotary switch 1 (ontimes) - 3, 4, 5, 6, 7
Rotary switch 2 (frequency) - 8, 9, 10, 11, 12
3
Upload code
Download the .ino file and upload the code to your Arduino Uno.