OBAT: An open-source and low-cost operant box for auditory discriminative tasks
- 1.1k Downloads
Operant-conditioning boxes are widely used in animal training, allowing researchers to shape specific behaviors through reinforcements and/or punishments. Commercially available devices are expensive and run with proprietary software and hardware, hampering adaptations for the specific needs of an experiment. Therefore, many low-cost and open-source devices have recently been developed, but there are still few options for studying auditory behaviors. To overcome this problem, we developed a device based on a computer and an Arduino Mega 2560 board, named OBAT (Operant Box for Auditory Tasks), designed to present two different auditory stimuli to small primates. It has three modules: sound delivery, response bars, and reward system. We estimate that OBAT is at least 4–10 times cheaper than commercially available operant-conditioning boxes. Data from a behavioral pilot test ensured that the device can be used to train a marmoset in an auditory discrimination task. In addition, despite its low cost, accuracy tests showed that the OBAT operates with a high temporal precision. All schematics and software source code are available so that other groups can easily replicate the experiment or adapt the device to their own needs.
KeywordsOperant-conditioning box Auditory processing Discriminative learning Arduino
The basic concepts underlying operant conditioning were first described by Edward Thorndike more than a century ago (Chance, 1999), and it is still widely used in animals for studying directed behaviors. This learning is guided by the association of a specific behavior with a consequence. Therefore, reinforced behaviors tend to be repeated, and not-reinforced (or punished) behaviors are gradually extinguished (or suppressed). A wide range of species, from birds to rodents to primates, can be trained in operant-conditioning tasks (Steurer, Aust, & Huber, 2012).
Many commercial computer-controlled conditioning chambers are available, but they are expensive and locally unavailable in many developing countries. In addition, since these devices run with proprietary software and hardware, it may be more difficult to adapt or reprogram specific parts of the device for the needs of a project or experiment. Accordingly, in the past years many devices have been developed for different animal species and tasks (e.g., Devarakonda, Nguyen, & Kravitz, 2016; Oh & Fitch, 2017; Pineño, 2014; Remington, Osmanski, & Wang, 2012; Rizzi, Lodge, & Tan, 2016; Steurer et al., 2012; Takemoto, Izumi, Miwa, & Nakamura, 2011). The basic operant chambers have one or more sensors to detect the occurrence of a behavioral action, such as rodent nose poke ports with photobeam sensors, and one actuator to deliver a reward (Devarakonda et al., 2016; Rizzi et al., 2016).
Other operant chambers can also have a stimulus presentation system, and mostly are designed to present visual stimuli, such as LED lights or figures displayed on a screen (Fagot & Paleressompoulle, 2009; Hoffman, Song, & Tuttle, 2007; Kangas & Bergman, 2012; Markham, Butt, & Dougher, 1996; Müller, Schmitt, Barber, & Huber, 2015; Pineño, 2014; Takemoto et al., 2011).
To date, few studies have described devices designed to study other cognitive processes, such as those involving auditory perception. Recently, Oh and Fitch (2017) described an open-source and low-cost device that can deliver auditory stimuli through several speakers using the audio output and USB ports of a computer. The device, named CATOS (computer-aided training/observing system), can continuously monitor and train animals in their home environment, in daily sessions lasting several hours and in the absence of a researcher, and was used to train one domesticated cat to discriminate spoken words. One challenge for the CATOS audio delivery system is laboratory experimental tasks in which a single computer must simultaneously control the audio output of multiple operant boxes. Another caveat is that noisy environments, such as nonhuman primate colonies, can disturb animal training, especially in tasks with auditory discrimination, in which more controlled and soundproof environments are preferred.
Some years ago, Remington et al. (2012) developed a device to study auditory behaviors in marmosets, composed of a monkey chair and a feeding tube with an infrared beam connected to reward delivery and sound presentation systems. It can successfully be used to train physically restrained marmosets to lick the feeding tube upon hearing a sound stimulus, and was previously used to determine the marmoset audiogram (Osmanski & Wang, 2011). However, this device has limitations regarding its use in multiple-choice tasks or with freely behaving animals.
In this study, we describe a novel, open-source operant-conditioning chamber to study auditory perception in small primates, named OBAT (Operant Box for Auditory Tasks). OBAT was designed to automatically deliver auditory stimuli in an isolated environment in order to minimize interference from external noise. It also controls two touch-sensitive response bars and a reward system, and was developed to automatically train small primates in auditory tasks. To the best of our knowledge, this is the first open-source device designed for these animals that can be used to perform two-choice auditory tasks. Here we also describe a test conducted with one marmoset to evaluate the device. Marmosets are small and highly vocal nonhuman primates that have growing appeal as models in several fields, including medicine, neuroscience, and experimental psychology, and are emerging as an important biomedical model (Okano, Hikishima, Iriki, & Sasaki, 2012; Sasaki et al., 2009). The proof of concept consisted of conditioning an unrestrained marmoset to choose a right or left touch bar in an auditory discrimination task to receive a reward.
A speaker (D220Ti, JBL, Brazil) for stimulus presentation was connected to a power amplifier (Versatil Mono, Hayonik, Brazil) (Fig. 1b) and placed 16 cm away from the front wall of the Plexiglas chamber, 30 cm above the floor, at the height of a small primate’s head (Fig. 1c). In the front wall of the chamber were two symmetrically arranged apertures (0.5-cm diameter, 7.4 cm from the midline, and 12-cm height), through which two touch bars (0.5-cm diameter, 7-cm length; Fig. 1d and Fig. 4 below) could be moved in and out. A reward delivery pump (Fig. 1e) connected to a liquid delivery dispenser positioned between the apertures was used to deliver the reward (Fig. 1f). This setup was assembled inside a double-wall sound-attenuating chamber (90 × 90 × 90 cm, CS Caixas Acústicas, Brazil) to minimize interference from outside noise (Fig. 1i). The inner walls of the chamber were covered with acoustic foam. A camera (Lifecam cinema, Microsoft, USA) was mounted on the back wall of the sound-attenuating chamber (Fig. 1h) to monitor the animal’s behavior during the behavioral sessions.
The operation of the device involved two software components: an Arduino sketch and a graphical user interface (GUI). The source code of both components is available for download at https://github.com/mauriciowr/OBAT. The sketch was written in a C-like language for the Arduino integrated development environment (IDE) and loaded directly into the Arduino board. It had the sequential instructions to control the modules of the box. The sketch needs open-source libraries (https://github.com/madsci1016/Sparkfun-MP3-Player-Shield-Arduino-Library) to control the MP3 player shield and read the file at the SD card. The GUI was developed in Microsoft Visual Studio 2013 and ran in the host computer. The program established a connection with the Arduino board via a universal serial bus (USB) port and allowed the experimenter to set the parameters of the sessions. Data were automatically saved in a log file in comma-separated value (CSV) format in the same folder from which the GUI program was launched. Detailed descriptions of the GUI and data file are in the supplemental information.
A set of experiments were performed to evaluate the operant box. A behavioral study was conducted to evaluate the operant box performance in conditioning small primates to perform an auditory discriminative task. In addition, temporal accuracy tests were designed to evaluate whether the Arduino could perform with high temporal precision during the behavioral task.
One male adult marmoset (450 g) was trained six days a week in a discriminative task with two auditory stimuli. The animal was housed individually in a cage of an outdoor vivarium with natural light cycle and temperature. The animal received two daily meals containing a variety of grains, fresh fruits and vegetables, Arabic gum, protein (egg, meat, or mealworms) and dairy products (yogurt or probiotics). Before the experiment began, the animal received its first meal at 8 am and its second meal at 4 pm. During the experiment, the animal received its first meal after the daily experimental session (between 10 and 11 am). Therefore, during the experiment, there was a 3-h delay in his first meal. The total amount of food the animal received daily, however, did not change. Water was available ad libitum, except during the experimental sessions. The animal was weighed daily to ensure he did not lose weight. All procedures had previously been approved by the Ethics Committee for Animal Use of the Alberto Santos Dumont Association for Research Support (Protocol #03/13), in accordance with the Brazilian National Council on the Control of Animal Experimentation and the National Institute of Health Guide for the Care and Use of Laboratory Animals.
The auditory stimuli were similar to two of the most common calls uttered by marmosets (named “phee” and “trill”). Both calls are uttered as contact calls (Bezerra & Souto, 2008; Epple, 1968). Their physical structures are similar, since their central frequencies lie around 7–7.5 kHz, which is the marmoset peak of auditory sensitivity (Osmanski & Wang, 2011). The phee is a tonal call (0.5–2.0 s), whereas the trill is shorter (0.25–0.8 s) and has a sinusoidal frequency modulation of about 30 Hz around its central frequency (Bezerra & Souto, 2008; DiMattina & Wang, 2006). Two stimuli were generated by a mathematical model of virtual vocalizations (DiMattina & Wang, 2006): one virtual phee (central frequency 8.12 kHz, duration 5 s) and one virtual trill (central frequency 7.14 kHz, modulation around central frequency 28 Hz, duration 5 s). There was no variation in each virtual vocalization amongst trials. The main advantages of using a virtual instead of a recorded vocalization are the absence of background noise and the ability to set specific parameters, such as duration. The animal had to learn to touch the left bar after the virtual phee and to touch the right bar after listening to the virtual trill in order to receive four drops of banana milkshake (50 ml of water, 5 g of banana, 5 g of sucrose, 1.5 g of dry milk, and 3 g of baby cereal mixed in a blender).
The training consisted of four phases: habituation, forced task, choice task (with repetition), and choice task (without repetition).
When the training started, the animal had already been trained to enter a transport box upon receiving small pieces of marshmallow. The habituation sessions were designed to minimize stress and continued until the animals consistently stayed calm in the experimental chamber for at least 30 min. The animal underwent 29 habituation sessions. In the first five sessions, the animal was transported to the experimental room, where he stayed inside the transport cage for 5 min (first session) to 15 min (fifth session) and received small pieces of marshmallow. Then, in the next 24 sessions, the transport cage was placed at the door of the experimental chamber so that the animal could enter the experimental chamber. Then the doors of the experimental and sound-attenuating chambers were closed. During these sessions, small pieces of marshmallow were placed inside the experimental chamber and fresh banana milkshake was available in the reward cup. The animal underwent 24 sessions in this stage. The first session lasted 5 min. The duration of the sessions increased progressively to 30 min. The behavior of the animal was monitored by a camera located on the back wall of the sound-attenuating chamber, and the session was interrupted if any sign of stress was observed.
Forced task training
The animal was trained to associate touching a bar with receiving a reward. After each stimulus presentation (virtual phee or trill), only the correct bar extended inside the chamber. Four drops of banana milkshake were manually delivered every time the animal approached the bars. The same amount of reward was automatically delivered when he touched one of the bars. Each session lasted 30 min. The intertrial interval was gradually increased from 0 s to 20 s. When the animal made more than 50 responses in three consecutive sessions, this was considered consistent learning, and the subject moved on to the choice task training. The animal reached this learning criterion after 20 training sessions.
Choice task training (with repetition)
In the choice task training, in each trial both bars extended inside the chamber after stimulus presentation. The animal was trained to touch the left bar after a virtual phee and the right bar after a virtual trill. When the animal made a correct response, the reward was delivered, and then after an intertrial interval of 20 s, one of the two stimuli was randomly selected. When the animal made an incorrect choice, no reward was delivered; the chamber illumination was then turned off for 5 s, and the intertrial interval was set to 40 s. After that interval, the same trial was repeated until the animal made the correct choice. All sessions lasted 30 min. The marmoset was trained in this phase for four months until he performed at above-chance levels in three consecutive sessions. The binomial test with 50% probability was used to determine above-chance performance on the basis of the number of trials. The number of trials per session was variable (60–90 trials), but the animal had at least 60 trials per session. Therefore, for 60 trials, the above-chance performance was determined as being above 61.7% (p = .0462).
Choice task training (without repetition)
Temporal accuracy tests
Since the operant-conditioning device was designed to conduct behavioral, neuropsychological, and neurophysiological experiments, it is of the utmost importance that all I/O signals be accurately controlled and that all events in the task occur with the minimal time delay possible according to the parameters set by the experimenter. Another important aspect of temporal control involves sending outputs to other devices, such as a neural recording system, with a minimal and known delay, so that events can be synchronized, for example, with the neural activity.
It has previously been reported that Arduino boards can operate with a high temporal precision (D’Ausilio, 2012). However, due to the importance of this requirement, three temporal accuracy tests were performed with the device. During these tests, the device was connected to a recording system (Omniplex, Plexon Inc., Texas, USA) with a high-precision clock cycle (0.025 ms). This system was set to receive transistor-to-transistor (TTL) signals from the device through its digital input (DI) board, with a sampling rate of 40 kHz.
Given the importance of the immediate delivery of the reward after a correct answer, the software was developed to activate the reward system as soon as the Arduino read the correct answer. The data from Tests 1 and 2 indicated that the delay between a correct touch and the activation of the reward pump was never longer than 0.1 ms, since the maximum time that the Arduino took to read the input for touch was 0.075 ms and the maximum time to initiate the reward system was 0.025 ms.
OBAT is the first low-cost and open-source auditory operant-conditioning device for multiple-choice tasks specifically designed to train small primates. It costs less than US $560, an amount considerably less than the average price of the operant chambers currently available for small animals (US $2,000–$5,000; Devarakonda et al., 2016; Pineño, 2014). Due to its low cost, the device can be particularly helpful when the budget for setting up experimental equipment is limited (Pineño, 2014). Setting up an OBAT device demands basic knowledge of electronics and programming. This task, however, is relatively simple, because the source code is available online and all parts, schematics, and protocols are available as supplemental materials. In addition, the GUI is easy to use, and once it is constructed, anyone can run experiments using the OBAT.
Another important aspect of OBAT is its modularity. It has three modules (sound delivery, response bars, and reward delivery), all connected to an Arduino Mega2560 through 19 I/O ports. Since the Arduino Mega2560 has 54 ports, more than 25 ports still remain that can be used for adaptations to suit other experimental designs. For example, additional components can be added to one module (e.g., a third response bar), or new modules can be designed (e.g., a blackout system to turn off chamber lights after incorrect choices as punishment). OBAT can also be connected and synchronized to external equipment, such as a neural-recording system. Accordingly, the Arduino sketch and the GUI can easily be adjusted to suit such changes. On the other hand, it is harder to adapt or reprogram specific parts of a commercial device to the specific needs of a project, since they run with proprietary software and hardware. Most commercial systems, for example, have retractable levers as standard modules. However, touch-sensitive bars are not common, and it is difficult to adapt a retractable lever to become touch-sensitive. Similarly, many commercial devices provide sound delivery modules composed of sound generators and speakers, but they are usually restricted to single tones, white noise, and clicks. In this case, it is also hard to adapt the system to play other types of audio stimuli. The results from the behavioral test show that, despite the long period of training, marmosets can be trained to use OBAT to perform a two-alternative choice task for sound discrimination. The device is, therefore, suited to study sound perception in small primates. It can, however, be easily adjusted to study auditory-based operant conditioning in other species. For instance, several recent studies have described operant devices with touchscreens that can successfully be used in operant-conditioning tasks with birds (Steurer et al., 2012), rats (Markham et al., 1996; Pineño, 2014), dogs (Müller et al., 2015), and other primates (Fagot & Paleressompoulle, 2009; Kangas & Bergman, 2012). These studies suggest that many species can be trained to manipulate touch-sensitive sensors. Touchscreens are very useful in experiments aimed at studying visual cognition, since they can be used both for stimulus presentation and to detect the animal’s response. However, touch-sensitive bars such as the ones developed for OBAT can be a simpler and cheaper alternative to touchscreens in experiments that do not require visual stimulus presentation.
To the best of our knowledge, this is the first study in marmosets describing a two-choice task with sound stimuli. Previous studies with sound detection (Remington et al., 2012) and visual discrimination (Takemoto et al., 2011) tasks described higher performance (above 80%) for marmosets. These tasks, however, were much simpler than the two-choice task described here. For instance, the sound detection task requires no discrimination among different stimuli, nor the association of different responses with different stimuli (since there is only one reporting option; Remington et al., 2012). In the visual discrimination task, in every trial the same two stimuli were presented, and only one of them was associated with the reward. Therefore, the animals had to choose the same visual stimulus throughout the trials. In addition, both stimuli were always present during the choice, and the animals could compare them before making a choice (Takemoto et al., 2011). It is, therefore, hard to compare the present results with previous data. It is possible that 70% correct choices may be the ceiling for this species in this particular task, or the results may be specifically related to the subject that was trained, since there can be a great variation in both performance and training length amongst individual subjects. Future studies using OBAT may also be designed to investigate whether and how performance changes with different stimuli (such as pure tones), and whether there are differences across individuals and different species.
One possible limitation of OBAT could be the lack of reliability and accuracy monitoring. The temporal accuracy tests, however, indicated that the operation of the device is robust and has a high temporal accuracy. The results from Tests 1 and 2 showed high precision for the I/O control. In both tests, the calculated delays were very small (always less than 0.1 ms) and did not vary much across trials (standard deviations of 0.011 and 0.017 ms). In addition, the results from Test 3 indicate that the delay to play a sound file is longer (4.607 ms). Such a delay, however, is still small and has a high degree of reliability, since there are no great variations among trials (standard deviation of 0.326 ms).
In summary, OBAT is a novel low-cost, open-source, and flexible auditory operant-conditioning device well-suited to small primates. It is relatively easy to assemble, and its basic design can be adapted to a variety of different tasks and experiments. Therefore, OBAT can be a useful and reliable tool for behavioral conditioning in future studies of sound processing and cognition.
OBAT’s first reward module consisted of a gravity-fed system regulated by a solenoid valve. However, it was not a reliable delivery system, since the reward (banana milkshake) often clogged the valve.
The reward pump structure, the response bar assembly, and the speaker box were made from wood that was readily available at the laboratory. Ideally, nonporous materials should be used instead of wood. If a 3-D printer is available, a similar reward pump can be printed and assembled following Wijnen, Hunt, Anzalone, and Pearce (2014).
This project was supported by the National Institutes of Science and Technology program Brain Machine Interface (INCT INCEMAQ) of the National Council for Scientific and Technological Development (CNPq/MCTI), Rio Grande do Norte Research Foundation (FAPERN), Coordination for the Improvement of Higher Education Personnel (CAPES), Brazilian Innovation Agency (FINEP), and Ministry of Education (MEC). We thank Denis Matrov for his help with animal handling at the beginning of the project and for his fruitful discussions of the former versions of this article. We also thank Phillip César da Silva for helping with the electrical boards and schematics.
Compliance with ethical standards
Conflicts of interest
The authors declare no conflicts of interest.
- Sasaki, E., Suemizu, H., Shimada, A., Hanazawa, K., Oiwa, R., Kamioka, M.,…Nomura, T. (2009). Generation of transgenic non-human primates with germline transmission. Nature, 459, 523–527. doi: 10.1038/nature08090
- Takemoto, A., Izumi, A., Miwa, M., & Nakamura, K. (2011). Development of a compact and general-purpose experimental apparatus with a touch-sensitive screen for use in evaluating cognitive functions in common marmosets. Journal of Neuroscience Methods, 199, 82–86. doi: 10.1016/j.jneumeth.2011.04.029 CrossRefPubMedGoogle Scholar