-
Notifications
You must be signed in to change notification settings - Fork 19
Pavlovian
The Pavlovian Pellet Drop program configures FED3 to deliver a conditioned stimulus (light + tone), wait a fixed interval, and then drop a pellet. After the pellet is removed, the program enforces a timeout before repeating. This implements a classical conditioning paradigm, where the cue predicts food independent of operant behavior.
In Pavlovian (classical) conditioning, a neutral cue (e.g., tone and light) is paired with a biologically relevant reinforcer (food). Over repeated pairings, animals learn to associate the cue with the upcoming reward and often begin showing anticipatory behaviors (e.g., approaching the pellet well during the cueโpellet delay). FED3 automates this process by presenting cues, delaying reinforcement, and ensuring pellets are logged and consumed before new trials begin. This approach follows the framework of Pavlovโs original conditioning studies (Pavlov, 1927) and subsequent behavioral analyses (Rescorla, 1988; Cardinal et al., 2002).
-
Cueโreward interval: Default is 5 seconds, but can be customized by changing
Pellet_delay. -
Timeout between trials: Default is 10 seconds, controlled by
fed3.timeout. - No operant requirement: Animals do not need to poke; food delivery is fully stimulus-driven.
- Pellet detection: FED3 waits until the pellet is removed before starting the timeout.
- Data logging: All events (CS, pellet drops, pellet removals) are recorded with timestamps.
- Conditioned stimulus (light + tone) precedes each pellet.
- Adjustable cueโpellet delay (
Pellet_delay, in seconds). - Timeout period after pellet removal before new trial.
- Waits until pellet is consumed before continuing.
- Logs all events to SD card.
int Pellet_delay = 5; // Delay (s) between CS and pellet
void loop() {
fed3.run(); // Keep FED3 hardware updated
fed3.ConditionedStimulus(); // Present conditioned stimulus (light + tone)
fed3.Timeout(Pellet_delay); // Wait N seconds before pellet
fed3.Feed(); // Deliver pellet
while (digitalRead (PELLET_WELL) == LOW) { // Pause while pellet is present in well
delay (10); // Check every 10 ms
}
// After pellet is removed, fed3.timeout (10s) applies before next trial
}
- 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)
Pavlovian Pellet Drop
This script will delivery a conditioned stimulus, wait 5 seconds, and then drop a pellet
After the pellet has been taken, it will complete a timeout of N seconds and repeat from the beginning
[email protected]
December, 2020
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 = "Pavlov"; //Unique identifier text for each sketch (this will show up on the screen and in log file)
FED3 fed3 (sketch); //Start the FED3 object
int Pellet_delay = 5; //How long to wait between conditioned stimulus and pellet (in s)
void setup() {
fed3.begin(); //Setup the FED3 hardware
fed3.DisplayPokes = false; //Customize the DisplayPokes option to 'false' to not display the poke indicators
fed3.timeout = 10; //Set a timeout period (in seconds) to wait before starting a new trial after each pellet is taken
}
void loop() {
fed3.run(); //Call fed.run at least once per loop
fed3.ConditionedStimulus(); //Conditioned stimulus (light and tones)
fed3.Timeout(Pellet_delay); //delay between tone and pellet
fed3.Feed(); //Drop pellet
while (digitalRead (PELLET_WELL) == LOW) { //Wait here while there's a pellet in the well
delay (10);
}
}
Pavlov, I. P. (1927). Conditioned Reflexes. Oxford University Press.
Rescorla, R. A. (1988). Pavlovian conditioning: Itโs not what you think it is. American Psychologist, 43(3), 151โ160.
Cardinal, R. N., Parkinson, J. A., Hall, J., & Everitt, B. J. (2002). Emotion and motivation: the role of the amygdala, ventral striatum, and prefrontal cortex. Neuroscience & Biobehavioral Reviews, 26(3), 321โ352.