Category: Reward Delivery

Head-Fixed Setup for Combined Behavior, Electrophysiology, and Optogenetics

June 12, 2018

In a recent publication in the Frontiers in Systems Neuroscience, Solari and colleagues of the Hungarian Academy of Sciences and Semmelweis University have shared the following about a behavioral setup for temporally controlled rodent behavior. This arrangement allows for training of head-fixed animals with calibrated sound stimuli, precisely timed fluid and air puff presentations as reinforcers. It combines microcontroller-based behavior control with a sound delivery system for acoustic stimuli, fast solenoid valves for reinforcement delivery and a custom-built sound attenuated chamber, and is shown to be suitable for combined behavior, electrophysiology and optogenetics experiments. This system utilizes an optimal open source setup of both hardware and software through using Bonsai, Bpod and OpenEphys.

Read more here!


Solari N, Sviatkó K, Laszlovszky T, Hegedüs P and Hangya B (2018). Open Source Tools for Temporally Controlled Rodent Behavior Suitable for Electrophysiology and Optogenetic Manipulations. Front. Syst. Neurosci. 12:18. doi: 10.3389/fnsys.2018.00018

Automated mouse homecage two-bottle choice test

May 21, 2018

Meaghan Creed has developed a novel device for assessing preferences by mice among fluids in their homecages, i.e. two-bottle choice test. She shared the design on and contributed the summary of it below.

Often in behavioral neuroscience, we need to measure how often and how much a mouse will consume multiple liquids in their home cage. Examples include sucrose preference tasks in models of depression, or oral drug self-administration (ie. Morphine, opiates) in the context of addiction. Classically, two bottles are filled with liquids and volumes are manually recorded at a single time point. Here, we present a low-cost, two-sipper apparatus that mounts on the inside of a standard mouse cage. Interactions are detected using photointerrupters at the base of each sipper which are logged to an SD card using a standard Arduino. Sippers are constructed from 15 mL conical tubes which allows additional volumetric measurements, the rest of the holding apparatus is 3D printed, and the apparatus is constructed with parts from Arduino and Sparkfun. This automated approach allows for high temporal resolution collected over 24 hours, allowing measurements of patterns of intake in addition to volume measurements. Since we don’t need to manually weigh bottles we can do high-throughput studies, letting us run much larger cohorts.

This is designed such that each set of 2 sippers uses its own Arduino and SD card. With a bit of modification to the code one Arduino Uno can be programmed to log from 6 cages onto the same SD card. Arduino compatible boards with more GPIOs (like Arduino Mega) can log from up to 56 sippers on one Arduino.


March 1, 2018

From the Kravitz lab at the NIH comes a simple device for dispensing pre-measured quantities of food at regular intervals throughout the day.  Affectionately known as “SnackClock”, this device uses a 24-hour clock movement to rotate a dispenser wheel one revolution per day.  The wheel contains 12 compartments, which allows the device to dispense 12 pre-measured “snacks” at regular 2 hour intervals.  The Kravitz lab has used this device to dispense high-fat diet throughout the day, rather than giving mice one big piece once per day.  The device is very simple to build and use, requiring just two 3D printed parts and a ~$10 clock movement.  There is no microcontroller or coding required for this device, and it runs on one AA battery for >1 year.  The 3D files are supplied and can be edited to fit SnackClock in different brands of caging, or to adjust the number of snack compartments.  With additional effort the clock movement could be replaced by a stepper motor to allow for dispensing at irregular or less frequent intervals.


Open Source platform for Sensory Tasks

August, 2017

Lucy Palmer and Andrew Micallef, of the Florey Institute of Neuroscience and Mental Health, University of Melbourne, Melbourne, VIC, Australia, have shared the following Arduino and Python based platform for Go/ No-Go tasks in an article published by Frontiers in Cellular Neuroscience.

The Go/No-Go sensory task requires an animal to report a decision in response to a stimulus. In “Go” trials, the subject must respond to a target stimulus with an action, while in “No-Go” trials, the subject withholds a response. To execute this task, a behavioral platform was created which consists of three main components: 1) a water reward delivery system, 2) a lick sensor, and 3) a sensory stimulation apparatus. The water reward is administered by a gravity flow water system, controlled by a solenoid pinch valve, while licking is monitored by a custom-made piezo-based sensor. An Arduino Uno Rev3 simultaneously controls stimulus and reward delivery. In addition, the Arduino records lick frequency and timing through the piezo sensor. A Python script, employing the pyserial library, aids communication between the Arduino and a host computer.

The GitHub for the project may be found here.

Free-Behavior Monitoring and Reward System for Non-human Primates

August 23, 2017

In Frontiers Neuroscience, Tyler Libey and Eberhard E. Fetz share their open-source device for recording neural activity from free behaving non-human primates in their home cages and administering reward.

This device is designed to document bodily movement and neural activity and deliver rewards to monkeys behaving freely in their home cages. This device allows researchers to explore behaviors in freely moving non-human primates rather than simply relying on rigid and tightly controlled movements which lends itself to further understanding movement, reward, and the neural signals involved with these behaviors. Studying free-moving animals may offer essential insight to understanding the neural signals associated with reward-guided movement, which may offer guidance in developing more accurate brain machine interfaces. The behavior monitoring system incorporates existing untethered recording equipment, Neurochip, and a custom hub to control a cage-mounted feeder to deliver short-latency rewards. A depth camera is used to provide gross movement data streams from the home cage in addition to the neural activity that is recorded.

Libey T and Fetz EE (2017) Open-Source, Low Cost, Free-Behavior Monitoring, and Reward System for Neuroscience Research in Non-human Primates. Front. Neurosci. 11:265. doi: 10.3389/fnins.2017.00265


May 26th, 2017

Jesús Ballesteros, Ph.D. (Learning and Memory Research Group, Department of Neurophysiology at Ruhr-University Bochum, Germany) has generously his project, called Autoreward2, with OpenBehavior. Autoreward2 is an Elegoo Uno-based system designed to detect and reward rodents in a modified T-maze task.

In designing their modified T-maze, Ballesteros found the need for an automatic reward delivery system. Using open-source resources, he aimed to create a system with the following capabilities:

  • Detect an animal at a certain point in a maze;
  • Deliver a certain amount of fluid through the desired licking port;
  • Provide visual cues that indicate which point in the maze has been reached;
  • Allow different modes to be easily selected using an interface;
  • Allow different working protocols (i.e., habituation, training, experimental, cleaning)

To achieve these aims, he created used an Elegoo UNO

R3 board to read inexpensive infrared emitters. Breaking any infrared beam causes the board to open one or two solenoid valves connected to a fluid tank. The valve remains open for around 75 milliseconds, allowing a single drop of fluid to form at the tip of the licking port. Additionally,  the bread board contains LEDS to signal to the researcher when the IR beam has been crossed.

Currently, a membrane keypad allows different protocols or modes to be selected. The system is powered through a 9V wall adapter, providing 3.3V to the LEDs and IR circuits and 9V to the solenoids.

Importantly, the entire system can be built for under 80€. In the future, Ballesteros hopes to add a screen and an SD card port, and to switch the keypad out for a wireless interface.

The full description may be found here, the Github page for the project may be found here,

and the sketch and arduino code may be found here.


January 13, 2017

Tom Baden, from the University of Sussex, has generously shared the following device with Open Behavior:

Designed for ease of use, robustness and low-cost, the “Openspritzer” is an open hardware “Picospritzer” as routinely used in labs around the world for administering picoliters of liquid to biological samples. The performance of Openspritzer and commercial alternatives is effectively indistinguishable.
The system is based on a solenoid valve connected to a pressure gauge. Control can be attained directly via an external TTL pulse or internally through an Arduino set by a rotary encoder. The basic setup can be put together for 3-400€, or substantially less if you are prepare to shop around.

More information regarding Openspritzer can be found on Open Labware.

Supplementary Materials

3D Files and Arduino Code 

Feeding Experimentation Device (FED) part 2: new design and code

October 28, 2016

Alexxai Kravitz has generously shared the following regarding FED, part 2:

The Feeding Experimentation Device (FED) is a free, open-source system for measuring food intake in rodents. FED uses an Arduino processor, a stepper motor, an infrared beam detector, and an SD card to record time-stamps of 20mg pellets eaten by singly housed rodents. FED is powered by a battery, which allows it to be placed in colony caging or within other experimental equipment. The battery lasts ~5 days on a charge, providing uninterrupted feeding records over this duration.  The electronics for building each FED cost around $150USD, and the 3D printed parts cost between $20 and $400, depending on access to 3D printers and desired print quality.

The Kravitz lab has published a large update of their Feeding Experimentation Device (FED) to their Github site, including updated 3D design files that print more easily and updates to the code to dispense pellets more reliably.

Kravitz Lab GitHub

Step-by-step build instructions are available here.

Syringe Pump – Pearce Research Group

In their 2014 paper “Open-Source Syringe Pump Library,” Bas Wijnen, Emily Hunt, Gerald Anzalone, and Joshua Pearce detail an open-source syringe pump apparatus developed in their lab, as well as, validate the performance of the device. The authors write, “This syringe pump was designed using freely available open-source computer aided design (CAD) software and manufactured using an open-source RepRap 3-D printer and readily available parts. The design, bill of materials and assembly instructions are globally available to anyone wishing to use them on the Open-source syringe pump Approdepia page… The cost of the entire system, including the controller and web-based control interface, is on the order of 5% or less than one would expect to pay for a commercial syringe pump having similar performance. The design should suit the needs of a given research activity requiring a syringe pump including carefully controlled dosing of reagents, pharmaceuticals, and delivery of viscous 3-D printer media among other applications.”

Pearce Research group also provides an Open Source Lab page dedicated to low-cost, open-source lab hardware.

Wijnen, Bas; Hunt, Emily; Anzalone, Gerald; Pearce, Joshua (2014). Open-Source Syringe Pump Library. PLoS ONE, 9(9), e107216.