Category: Sensors

Ultrasonic Vocalization (USV) Detector

December 21, 2016

David Barker from the National Institute on Drug Abuse Intramural Research Program has shared the following regarding the development of a device designed to allow the automatic detection of 50kHz ultrasonic vocalizations.

Ultrasonic vocalizations (USVs) have been utilized to infer animals’ affective states in multiple research paradigms including animal models of drug abuse, depression, fear or anxiety disorders, Parkinson’s disease, and in studying neural substrates of reward processing. Currently, the analysis of USV data is performed manually, and thus time consuming.

The present method was developed in order to allow for the automated detection of 50-kHz ultrasonic vocalizations using a template detection procedure. The detector runs in XBAT, an extension developed for MATLAB developed by the Bioacoustics Research Program at Cornell University. The specific template detection procedure for ultrasonic vocalizations along with a number of companion tools were developed and tested by our laboratory. Details related to the detector’s performance can be found within our published work and a detailed readme file is published along with the MATLAB package on our GitHub.

Our detector was designed to be freely shared with the USV research community with the hope that all members of the community might benefit from its use. We have included instructions for getting started with XBAT, running the detector, and developing new analysis tools. We encourage users that are familiar with MATLAB to develop and share new analysis tools. To facilitate this type of collaboration, all files have been shared as part of a GitHub repository, allowing for suggested changes or novel contribution to be made to the software package. I would happily integrate novel analysis tools created by others into future releases of the detector.

Work on a detector for 22-kHz vocalizations is ongoing; the technical challenges for detecting 22-kHz vocalizations, which are nearer to audible noise, are more difficult. Those interested in contributing to this can email me at djamesbarker@gmail-dot-com or find me on twitter (@DavidBarker_PhD).

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

fed-front3           fed-gif-3

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.  Step-by-step build instructions are available here:

Laubach Lab GitHub Repository

The Laubach Lab at American University investigates executive control and decision making, focusing on the role of the prefrontal cortex. Through their GitHub repository, these researchers provide 3D print files for many of the behavioral devices used in their lab, including a Nosepoke and a Lickometer designed from rats. The repository also includes a script that reads MedPC files into Python in a usable way.

Hao Chen lab, UTHSC – openBehavior repository

The openBehavior github repository from Hao Chen’s lab at UTHSC aims to establish a computing platform for rodent behavior research using the Raspberry Pi computer. They have buillt several devices for conducting operant conditioning and monitoring enviornmental data.

The operant licking device can be placed in a standard rat home cage and can run fixed ratio, various ratio, or progressive ratio schedules. A preprint describing this project, including data on sucrose vs water intake is available. Detailed instructions for making the device is also provided.

The environment sensor can record the temperature, humidity, barometric pressure, and illumination at fixed time intervals and automatically transfer the data to a remote server.

There is also a standard alone RFID reader for the EM4100 implantable glass chips, a motion sensor addon for standard operant chambers, and several other devices.

Nose-Poke System – Kelly Tan Research Group

The Kelly Tan research group at the University of Basel, Switzerland investigates the neural correlates of motor behavior, focusing on the role of the basal ganglia in controlling various aspects of motor actions. To aid in their investigation, the group has developed an open-source nose-poke system utilizing an Arduino microcontroller, several low-cost electronic components, and a PVC behavioral arena. These researchers have shared the following information about the project:

Giorgio Rizzi, Meredith E. Lodge, Kelly R Tan.
MethodsX 3 (2016) 326-332
Operant behavioral tasks for animals have long been used to probe the function of multiple brain regions. The recent development of tools and techniques has opened the door to refine the answer to these same questions with a much higher degree of specificity and accuracy, both in biological and spatial-temporal domains. A variety of systems designed to test operant behavior are now commercially available, but have prohibitive costs. Here, we provide a low-cost alternative to a nose poke system for mice. Adapting a freely available sketch for ARDUINO boards, in combination with an in-house built PVC box and inexpensive electronic material we constructed a four-port nose poke system that detects and counts port entries.
  • We provide a low cost alternative to commercially available nose poke system.
  • Our custom made apparatus is open source and TTL compatible.
  • We validate our system with optogenetic self-stimulation of dopamine neurons in mice.

IMG_20160126_163648 IMG_20160126_163703 IMG_20160126_163714 IMG_20160126_163725 IMG_20160127_124611 IMG_20160127_124624 IMG_20160127_150643 IMG_20160127_150708

The Kelly Tan research group provides further documentation for this device, including SketchUp design files, Arduino source code, and a full bill of materials, as supplementary data in their 2016 paper.

Lickometer – Feldman Lab

Brian Isett, a graduate researcher in the Feldman Lab at UC Berkeley writes, “Measuring licks using a lickometer can provide an intuitive and simple signal for scientists studying many aspects of rodent behavior.  Commercial lickometers are often bulky and expensive, easily costing a few hundred dollars. In the Feldman Lab, we designed a small and inexpensive lickometer with parts costing less than $20. The lickometer employs an infrared beam and sensor to minimize electrical noise artifacts during neurophysiology experiments and can be easily mounted in a micromanipulator for precise and repeatable positioning.
This open-source lickometer was designed in conjunction with an open-source water delivery system.  Together, these provide the basic hardware for a DIY behavioral assay and reward system for mice.”