Jan 24, 2025

Public workspaceBasic Operant Behavioral Training V.2

  • 1UCSF
Icon indicating open access to content
QR code linking to this content
Protocol CitationXiaowen Zhuang, Alexandra Nelson 2025. Basic Operant Behavioral Training. protocols.io https://dx.doi.org/10.17504/protocols.io.4r3l22k93l1y/v2Version created by Alexandra Nelson
License: This is an open access protocol distributed under the terms of the Creative Commons Attribution License,  which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited
Protocol status: Working
We use this protocol and it's working
Created: January 22, 2024
Last Modified: January 27, 2025
Protocol Integer ID: 119058
Keywords: ASAPCRN
Funders Acknowledgements:
Aligning Science Across Parkinson's Disease
Abstract
This protocol includes information about the operant chamber, mouse preparation, initial shaping (training), and instrumental learning. This can be followed by other behavioral tasks, such as probabilistic reversal learning or delay discounting, which are described in other protocols. To promote consistent results, each mouse should be trained in the same operant chamber at the same time of day, five days per week, throughout the study. Male and female mice should be trained in separate operant chambers.
Attachments
Materials

Materials and Operant Box Configuration

  • Food-deprived mice (goal 85-90% of ad libitum body weight), aged 3-7 months old, C57Bl/6 background.
  • A scale for weighing mice and supplemental food.
  • Sweetened condensed milk, diluted to 30% using store-bought sweetened condensed milk (Eagle Brand) and tap water.

Note
Store in 50 mL aliquots (in Falcon tubes) in the freezer.

  • A desktop computer for running Arduino software to manage operant procedures and data collection.
  • SD cards to record various behavioral events.
  • Sound-attenuating cabinets (Coulbourn Instruments).
  • Operant test chambers (custom made, 18 x 18 x 26 cm with acrylic walls and floor of stainless steel bars). One side of each chamber was equipped with one yellow LED as a house light, which remained illuminated during all experimental stages unless stated otherwise. The opposite side of the chamber was equipped with left and right side nosepokes 12 cm apart. Each nosepoke contained two yellow LED stimulus lights: one positioned 6 cm above and another located inside the nosepoke. Sweetened condensed milk was delivered to a liquid receptacle from the central port, equidistant from the left and right nosepokes through a solenoid valve (The Lee Company). An infrared detector was mounted horizontally across the center port to detect head entries.

Figure 1: Operant Box Configuration. At the left, the cartoon showing the left and right choice ports, with the central reward port shown in yellow. At right, a top-down photo of the chamber, showing a mouse choosing the cued (left) port.

Design of the homemade operant chamber
Design of the homemade operant chamber
Hardware:
This low cost, customizable operant chamber consists of six main hardware components along with several additional parts.
Arduino UNO Rev3 or Arduino Mega 2560 Rev3: Choose the appropriate Arduino microcontroller that provides a sufficient number of digital analog input pins. The Arduino UNO features 14 digital I/O pins and 6 analog input pins, whereas the Arduino Mega offers 54 digital I/O pins and 16 analog input pins, making it more suitable for complex tasks involving advanced sensors or hardware.
Arduino UNO Rev3 (left) and Arduino Mega 2560 Rev3 (right)

Adafruit data logging shield with FAT32-formatted SD cards: (1) The logging shield includes a coin cell battery holder designed to accommodate a CR1220 12mm diameter lithium coin cell battery, which can last for years. (2) The data logging shield includes RTC (Real-Time Clock) can accurately record and timestamp all behavioral events with the current date and time. (3) In the Arduino code provided for running each behavioral session, a line of code is included at the beginning to verify whether the SD card is inserted correctly. If the SD card is properly inserted, the message 'Card initialized' will appear in the monitor window. If the SD card is not inserted correctly, the monitor window will display 'Card failed, or not present'. (4) More details about the interface between the SD card and the data logging shield are available on the Adafruit official website:https://learn.adafruit.com/adafruit-data-logger-shield/overview.
Adafruit data logging shield with FAT32-formatted SD cards

Three beam break optical sensors : (1) These optical sensors act as nosepoke sensors and a drinking port entry sensor, providing input to the Arduino microcontroller. The optical sensors are equipped with an infrared LED to detect objects entering the 15 mm gap. (2) These beam break optical sensors continuously send a 5V TTL signal to the Arduino. An active nose-poke response interrupts the infrared beam, after which a signal of less than 1V is sent to the Arduino, triggering the milk delivery process.
Three 3D printed nosepoke ports: We designed and 3D printed simple nose ports in which the beam break sensors are inserted.
Nose port design

LED indicators: We use LEDs for visual cues in our operant box. (1) Three small yellow LED indicators (6.00 mm, 2V, 20 mA) are located inside the nosepoke ports to indicate the active port. (2) Two large yellow LED indicators (12.70 mm, 5V, 16 mA) are positioned above the left and right nose-poke ports to indicate the active port. (3) One large yellow LED indicator (12.70 mm, 5V, 15 mA) functions as the house light.
Illustration of the LED indicator inside the nosepoke port.

Solenoid pump controlled by relay module
We use a solenoid to dispense liquid reward in our operant box. (1) The LPM series solenoid dispense pump is powered by a 12V DC supply and is designed to dispense 10uL liquid solution. (2) The Arduino's 5V TTL output signal is received and detected by the relay module, which controls the opening of the solenoid pump. (3) The solenoid pump offers high dispensing accuracy and repeatability, with an operating frequency of up to 5 Hz. (4) For the behavioral training protocols described below, we used a 1 to 3 dilution of sweetened condensed milk (Eagle Brand, 414 mL of condensed milk mixed with 1,242 mL of water).
Solenoid Pump and controller for delivery of liquid reward

Other parts:
Below are additional components used to secure the main hardware in place:
(1) Clear polycarbonate and black ABS plastic boards for the walls of the operant chamber, floor, and pop tray.
(2) Jumper wires
(3) Machine screws and hex nuts
(4) Wall adapter power supply (9V DC)
(5) 5V power supply module for the breadboard
(6) Breadboard
(7) Platinum-cured silicone tubing
Software: (1) The operant chamber requires the following libraries to write real-time points of behavioral events to the SD card in the data logging shield: Arduino SD, RTClib, SPI, and Wire libraries. All these libraries are available for download on the Arduino website: https://www.arduino.cc/en/software. (2) The programming code for running the operant behavioral tasks listed below can be found at: https://zenodo.org/doi/10.5281/zenodo.10703131.
Operant Box Setup
Operant Box Setup
Connect the USB cable of each Arduino to the computer.
Turn on the 12-volt power supply.
Pour Amount10 mL diluted milk into each falcon tube for each behavioral box.

Pipetting
Connect each solenoid to its behavioral chamber: one end goes into the milk solution, and the other end goes to the chamber.
Ensure that milk is pumped into the chamber.
Upload the Arduino code to the operant chambers, depending on the training phase of each mouse.
In each Arduino window, go to “Tools”, and the select “Port” to choose the correct board number, and then click “Upload”.
In each Arduino window, go to “Tools” again, and then select “Serial monitor” to open serial monitor windows.
Note
This allows the experimenter to monitor mouse behavior while the experiments are running.

Insert the waste pan and floor into the behavioral chamber.
Starting an Operant Session
Starting an Operant Session
Place each mouse into their designated box and close acrylic door to the operant box.
Allow to acclimate for 1-2 minutes.
Turn on 5-volt breadboard power switch and press “Reset” button on the Arduino board.
Securely close the door of the sound attenuating box.
Cleanup
Cleanup
Replace the falcon tube with clean tap water.
Upload the “cleaning” protocol onto each chamber.
Allow the water to run through the entire system for at least Duration00:15:00 .

15m
Clean the walls of operant chamber, nosepoke ports, and reward port with 75% alcohol.
Rinse the waste pan and floor with water, and allow them to air dry DurationOvernight .

50m
Wash
Overnight
Turn off the 5-volt breadboard power switch.
Turn off the 12-volt power supply.
Training procedure - Preparing the mice with food restriction
Training procedure - Preparing the mice with food restriction
Three days before the start of Phase 1 (Magazine Training), the free-feeding (ad libitum) weight is recorded by hand in a logbook.
Food is removed on the same day, and the food restriction protocol is initiated. This starts with 2.5-3 g of standard food pellets per animal per day for the first few days.
Subsequent adjustments may be necessary based on the animals’ weights, which must be monitored daily and maintained at approximately 85%-90% of their free-feeding weights.

Note
Food competition by animals within a cage might necessitate separating the mice to house them individually.

Training procedure - Operant Training Phase 1/Magazine Training
Training procedure - Operant Training Phase 1/Magazine Training
Three days after starting food restriction, animals can be started on Phase 1. This phase introduces mice to the reward delivery port (1 session).
A liquid reward (Amount10 µL of milk) is delivered on a random interval schedule of 40-80 seconds for a total of 40 rewards.

Pipetting
Each trial begins with the delivery of milk into the center port, accompanied by a 10-second illumination of the center port light.
Training procedure - Operant Training Phase 2/Blocked Instrumental Learning
Training procedure - Operant Training Phase 2/Blocked Instrumental Learning
In this phase, the side (choice) nosepoke triggers reward delivery (6-10 sessions).
Mice are trained to nosepoke at the side ports to obtain a reward on a fixed-ratio 1 (FR1) schedule.
Each training session is separated into blocks, separated by a two-minute break period when the house light is turned off.
Each block lasts Duration00:50:00 .

50m
Only one nosepoke (either the left or the right side) is trained in each block, and the active nosepoke switches during the break period.
The initial nosepoke (left or right) is counterbalanced across sessions.
Each trial begins with a stimulus cue light above the left or right nosepoke.
If the mouse nosepokes that port within Duration00:00:20 , the cue light is extinguished, and a reward (Amount10 µL of milk) is delivered to the center port, which is illuminated for Duration00:00:10 , followed by a random 30-50 second intertrial interval.

Figure 2: Phase 2/Blocked Instrumental Learning. At the start of each trial, a cue light above the left or right nosepoke is illuminated. The animal has up to 20 seconds to poke at that port. At that time, the central port is illuminated and a liquid reward becomes available there.

30s
Pipetting
If the mouse does not perform a nosepoke on the correct side, then the cue lights are extinguished and a timeout period (a random 30-50 second interval) begins.
To advance to Phase 3, a mouse must perform a correct response on more than 80% of trials in the last session.
Training procedure - Operant Training Phase 3/Self-initiated Instrumental Learning with Randomized Trials
Training procedure - Operant Training Phase 3/Self-initiated Instrumental Learning with Randomized Trials
1h 30m 50s
1h 30m 50s
This phase shares some features with Phase 2, but in this phase, the mouse must center nosepoke to trigger trial start (5-8 sessions), and choice trials are presented in a randomized (rather than blocked) fashion.
Trials begin with the center port being illuminated for Duration00:00:10 .

Figure 3: Phase 3/Instrumental Learning (Randomized Trials). At the start of each trial, the center port light is illuminated, and the mouse must poke there to continue the trial. Then a cue light above the left or right nosepoke is illuminated. The animal has up to 20 seconds to poke at that port. At that time, the central port is illuminated and a liquid reward becomes available there.

10s
During this period, a trial can be initiated by a center port nosepoke.
Failure to make a center nosepoke within this period is considered a center omission and is followed by a timeout period (random 30-50 second interval).
Following an initiation nosepoke, the stimulus cue lights at either the left or right port are activated for Duration00:00:10 .

10s
If the mouse nosepokes that port within Duration00:00:10 , the cue light is extinguished, and a reward (Amount10 µL of milk) is delivered to the center port, which is illuminated for Duration00:00:10 , followed by a random 30-50 second intertrial interval.

20s
Pipetting
Failure to poke the correct side port within Duration00:00:10 is considered a side omission, and cue lights are extinguished until the next trial.

10s
Poking the opposite, uncued side is recorded as an incorrect response and does not trigger punishment. Each session lasts Duration01:30:00 .
1h 30m