-
Notifications
You must be signed in to change notification settings - Fork 18
Optogenetic_Self_Stim
The Optogenetic Self-Stimulation program configures FED3 to deliver an optogenetic stimulation train when the active poke (left port) is triggered. This design parallels an FR1 schedule: one poke results in one reinforcement. Instead of a food pellet, the reinforcement is a 1-second train of TTL pulses sent to the BNC output, typically controlling an external light source (e.g., laser or LED driver). The inactive poke (right port) is logged but does not deliver stimulation. Each stimulation event is labeled and logged to the SD card for analysis.
Optogenetic self-stimulation allows animals to reinforce their own behavior by activating specific neural populations expressing light-sensitive proteins (e.g., channelrhodopsins). By comparing active vs. inactive pokes, researchers can test whether stimulation of a targeted brain region is reinforcing. FED3 provides both operant behavior tracking and synchronized TTL outputs, making it a compact tool for combining behavioral assays with circuit-specific manipulations.
- Active vs. inactive ports: Left poke delivers optogenetic stimulation; right poke is logged but unrewarded.
- Conditioned stimulus: A brief tone and light are paired with each stimulation event, serving as predictive cues.
- Stimulation train: Configured as 10 ms pulses at 20 Hz for 1 second (20 pulses total). These parameters can be customized.
-
Logging: Stimulation events are labeled
"20HzStim"and written to the SD card alongside poke data. - External hardware: Requires connection from FED3โs BNC output to a laser or LED driver for light delivery.
- FR1-style schedule: 1 left poke = 1 stimulation train.
- Optogenetic output: Delivers a 1-second train (10 ms, 20 Hz, 20 pulses) on the BNC port.
- Conditioned stimulus: Brief light + tone cues paired with stimulation.
- Inactive control: Right pokes logged but not reinforced.
- Clear labeling (
"20HzStim") for event tracking in data logs.
if (fed3.Left) {
fed3.logLeftPoke(); // Log left poke
fed3.ConditionedStimulus(); // Deliver conditioned stimulus (tone + lights for 200 ms)
fed3.Event = "20HzStim"; // Label the event "20HzStim"
fed3.logdata(); // Log event without incrementing poke counts
fed3.pulseGenerator(10, 20, 20); // Deliver a train: 10 ms pulses @ 20 Hz, 20 pulses total = 1 second
}
if (fed3.Right) {
fed3.logRightPoke(); // Log right poke (no stimulation)
}
- Upload this sketch to your FED3 using Arduino IDE.
- Observe behavior and log file output.
- Modify variables as needed for your experiment.
- Logs pellet events, poke activity, timeouts, and more depending on sketch.
/*
Feeding experimentation device 3 (FED3)
Optogenetic self-stimulation example (FR1)
alexxai@wustl.edu
March, 2022
This project is released under the terms of the Creative Commons - Attribution - ShareAlike 3.0 license:
human readable: https://creativecommons.org/licenses/by-sa/3.0/
legal wording: https://creativecommons.org/licenses/by-sa/3.0/legalcode
Copyright (c) 2020 Lex Kravitz
*/
#include <FED3.h> //Include the FED3 library
String sketch = "OptoStim"; //Unique identifier text for each sketch
FED3 fed3 (sketch); //Start the FED3 object
void setup() {
fed3.begin(); //Setup the FED3 hardware
}
void loop() {
fed3.run(); //Call fed.run at least once per loop
if (fed3.Left) { //If left poke is triggered
fed3.logLeftPoke(); //Log left poke
fed3.ConditionedStimulus(); //Deliver conditioned stimulus (tone and lights for 200ms)
fed3.Event = "20HzStim"; //Label the event "20HzStim" - Event is a text string and can be set to anything
fed3.logdata(); //log data without incrementing left or right pokes
fed3.pulseGenerator(10, 20, 20); //Deliver a traing of 10ms pulses at 20Hz for 1 sec
}
if (fed3.Right) { //If right poke is triggered
fed3.logRightPoke(); //Log right poke
}
}
Olds, J., & Milner, P. (1954). Positive reinforcement by electrical brain stimulation. Journal of Comparative and Physiological Psychology, 47(6), 419โ427.
Witten, I. B., & Deisseroth, K. (2011). Optogenetics: 10 years of microbial opsins. Nature Neuroscience, 14(9), 115โ123.
Steinberg, E. E., et al. (2014). Positive reinforcement by dopamine neurons requires D1 and D2 receptor activation. PLoS One, 9(4), e94771.