ArduiPod Box

ArduiPod Box: A low-cost and open-source Skinner Box using an iPod Touch and an Arduino microcontroller

What’s the ArduiPod Box?

The ArduiPod Box is an operant chamber or Skinner box, built with two main components: an iPod Touch and an Arduino microcontroller. This device was developed with two goals in mind: keeping it affordable and making it open source. The idea behind this project was to provide animal behavior researchers and teachers with an alternative to the more sophisticated (but costly) standard operant chambers. In spite of its limited functionality (at least, in its current state of development), this box will be suitable for running simple experiments in operant conditioning, which might be of great use to provide animal behavior students with a hands-on learning experience.

How much will it cost?

Building this box won’t be expensive. Assuming that you devote some time to find the cheapest prices (e.g., buy a used or refurbished iPod Touch), you should be able to purchase all necessary materials for less than $300. Building your box might take some time (especially if you don’t have all necessary tools), but all in all it shouldn’t take more than 3-4 hours.

Materials necessary to build your own ArduiPod box:
  • iPod Touch (4th gen) or iPhone 4/4S (*).
  • Arduino Uno microcontroller (**).
  • Redpark serial cable (***).
  • Plastic cage for rodents.
  • Small plastic bottle (for food dispenser).
  • Servo motor.

(*) The newer iPod Touch (5th gen) and the iPhone 5 will work perfectly as well, but the iOS app run by the device (Shaping) has been optimized for the 3.5-inch display of the older devices and might require minor adjustments for use with the 4-inch display of the last-generation devices.

(**) The Arduino Uno is the most popular (and affordable) microcontroller made by Arduino. However, other official models (e.g., Due, Mega 2560, or Nano) as well as home-made microcontrollers (e.g., Bareduino 328) might work as well.

(***) Necessary to connect the iPod Touch to the Arduino Uno.

Download the software:

You will need to download two programs in order to run your ArduiPod Box:

First, you need to download the Shaping app. The source code of this app is available in the Download Center. You are free to modify it (*) and use it for your own purposes (**).

Second, you need to download the sketch to be run in the Arduino, also available in the Download Center.

(*) Apple’s IDE (Xcode) is free to use. However, in order to export your app to your iPod Touch you will need to be enrolled in Apple’s iOS developer program.

(**) Please acknowledge the source of this software: Pineño, O. (2013). ArduiPod: A Low-Cost and Open-Source Skinner Box Using an iPod Touch and an Arduino Microcontroller (Version [v.#]). [Computer software]. Hempstead, NY: Hofstra University. Retrieved [date]. Available from

Wire it up:

There are thousands of ways of building your own ArduiPod Box (and most certainly you should feel free to be creative!), but there’s only one way of wiring things up to make it work (unless, that is, you make changes in the sketch run by the Arduino). Follow these steps to get your Arduino to talk to your iPod Touch.

  • LED connected to Arduino Pin 13 from the anode (+, long leg on the LED) and GND from the cathode (-, short leg). Although not strictly necessary (it will depend on the color of the LED, since they have different forward voltages), it is recommended that you use a resistor with low impedance/resistance (200 ohms, approx.).
  • Push button connected to GND and Arduino Pin 12. That pin will is set in the sketch to work as an input. When the button is pushed, the Arduino detects a drop in voltage from 5V to 0V (GND). Pressing this button will trigger the action in the servo (exactly as if the screen of the iPod Touch had been touched in the presence of an S+), something useful for manual shaping.
  • Servo motor connected to VCC (5V) and GND (red and black cables, respectively). Third cable connected to Arduino Pin 11 (Arduino-servo pulse).
  • Redpark Serial Cable connected to iPod Touch and to Arduino. While the connection to the iPod Touch is self-evident, the connection to the Arduino requires a little explanation. You will have to connect the following pins (cable-Arduino): 5V-5V (*), GND-GND, TX-RX, RX-TX.

(*) Newer revisions of the Redpark Serial Cable no longer require the 5V-5V connection.

You might want to use this breadboard schematic as a reference (click here for a copy of this schematic with higher resolution). Please note that the connections to the Redpark Serial Cable are not depicted in this schematic.

Here’s what the final product looks like, after connecting all the elements:

Finally, these pics show how the iPod Touch would have to be installed on the plastic wall in order to match the size and position of the colored button presented in the Shaping app (i.e., the discriminative stimulus) with the opening on the wall:

ArduiPodChart, a perfect complement for your ArduiPod Box:

The latest versions of the Shaping app (v. 1.1 and newer) come with P2P connectivity! If you have another iOS device lying around, you might want to install the ArduiPodChart app in it. The ArduiPodChart app connects wirelessly to the Shaping app (assuming that they are both connected to the same Wi-Fi network) and receives a real-time feed of the data being collected by the Shaping app. The data is automatically plotted on the screen of your iOS device, right as it is collected by the ArduiPod box. (How cool is that?)

The source code of the ArduiPodChart app is available in the Download Center as well. This app is also available for download from the iTunes App Store. As with the Shaping app, you are free to modify it and use it for your own purposes (*).

ACKNOWLEDGMENTS: For this app, I made use of the AsyncSocket library, developed by Dustin Voss; and the MTMessage and MTMessageBroker classes, developed by Drew McCormack.

(*) Please acknowledge the source of this software: Pineño, O. (2013). ArduiPod: A Low-Cost and Open-Source Skinner Box Using an iPod Touch and an Arduino Microcontroller (Version [v.#]). [Computer software]. Hempstead, NY: Hofstra University. Retrieved [date]. Available from


Download Center

Pineño, O. (2014). ArduiPod Box: A low-cost and open-source Skinner box using an iPod Touch and an Arduino microcontroller. Behavior Research Methods. [Download]

Shaping app (iOS and Arduino)
  • v. 1.0.0 – The ArduiPod Box is born.
  • v. 1.1.0 – Adds network capability: now Shaping app shares info over a Wi-Fi hotspot with another iOS device running ArduiPodChart (v. 1.0.0).
  • v. 1.1.1 – Shares current trial number with ArduiPodChart (v. 1.0.1). Shows smiley face on screen to graphically represent delivery of reinforcer.
  • v. 1.1.2 – Presents a white asterisk on screen during un-signaled trials (option “0”) to maximize chance of a touch (target response) during shaping procedure. Arduino now stops “listening” to iPod Touch during delivery of reinforcer (necessary in order to prevent responses performed during reinforcement from yielding additional reinforcers). Adds second Arduino sketch for devices using water as reinforcer.
  • v 1.1.3 – Updated to operate with iOS 12.
ArduiPodChart (iOS only)
  • v. 1.0.0 – Connected!!
  • v. 1.0.1 – Receives current trial number from the Shaping app (v. 1.1.1).
  • v. 1.0.2 – App now prevents iOS device from turning off, allowing uninterrupted monitoring for duration of experimental session.

You are WELCOME to download and use the programs in this page for teaching and/or research purposes. However, DO NOT forward this material, or make any copies or distribute these programs to other people.

COPYRIGHT © 2013 Oskar Pineño

Scientific Publications

Scientific Publications

Papers in scientific (peer-reviewed/refereed) journals

John, P., & Pineño, O. (2015). Biological significance in human causal learning. Psi Chi Journal of Psychological Research, 20, 65-72. [Download]

Pineño, O. (2014). ArduiPod Box: A low-cost and open-source Skinner box using an iPod Touch and an Arduino microcontroller. Behavior Research Methods, 46, 196-205. [Download]

Pineño, O. (2010). Enhanced consumption of an aversively conditioned taste following the presentation of a “medicine” taste. Behavioural Processes, 84, 625-628. [Download]

Pineño, O. (2010). Failure of serial taste-taste compound presentations to produce overshadowing of extinction of conditioned taste aversion. Learning and Motivation, 41, 95-107. [Download]

Amundson, J. C., Witnauer, J. E., Pineño, O., & Miller, R. R. (2008). An inhibitory within-compound association attenuates overshadowing. Journal of Experimental Psychology: Animal Behavior Processes, 34, 133-143. [Download]

Pineño, O., Zilski-Pineno, J. M., & Miller, R. R. (2008). Habituation of unconditioned fear can be attenuated by the presence of a safe stimulus: Assessment using the neophobic response of the rat. Behavioural Processes, 77, 55-60. [Download]

Pineño, O. (2007). A response rule for positive and negative stimulus interaction in associative learning and performance. Psychonomic Bulletin & Review, 14, 1115-1124. [Download]

Pineño, O. (2007). Protection from extinction by concurrent presentation of an excitor or an extensively extinguished CS. Psicológica, 28, 151-166. [Download]

Pineño, O., Zilski, J. M., & Schachtman, T. R. (2007). Second-order conditioning during a compound extinction treatment. Learning and Motivation, 38, 172-192. [Download]

Pineño, O. (2007). An examination of the effectiveness of inflation and deflation treatments in detecting within-compound learning of a taste aversion. Behavioural Processes, 75, 33-39. [Download]

Pineño, O., & Miller, R. R. (2007). Comparing associative, statistical, and inferential reasoning accounts of human contingency learning. The Quarterly Journal of Experimental Psychology, 60, 310-329. [Download]

Pineño, O., Urushihara, K., Stout, S., Fuss, J., & Miller, R. R. (2006). When more is less: Extending training of the blocking association following compound training attenuates the blocking effect. Learning & Behavior, 34, 21-36. [Download]

Pineño, O., De la Casa, L. G., Lubow. R. E., & Miller, R. R. (2006). Some determinants of latent inhibition in humans. Learning and Motivation, 37, 42-65. [Download]

Bills, C. H., Dopheide, M., Pineño, O., & Schachtman, T. R. (2006). Effects of an extinguished CS on competition with another CS. Behavioural Processes, 72, 14-22. [Download]

Pineño, O., & Matute, H. (2005). Outcome similarity modulates retroactive interference between cues trained apart. Psicológica, 26, 281-292. [Download]

Pineño, O., Denniston, J. C., Beckers, T., Matute, H., & Miller, R. R. (2005). Contrasting predictive and causal values of predictors and of causes. Learning & Behavior, 33, 184-196. [Download]

Pineño, O., Urushihara, K., & Miller, R. R. (2005). Spontaneous recovery from forward and backward blocking. Journal of Experimental Psychology: Animal Behavior Processes, 31, 172-183. [Download]

Urushihara, K., Wheeler, D. S., Pineño, O., & Miller, R. R. (2005). An extended comparator hypothesis account of superconditioning. Journal of Experimental Psychology: Animal Behavior Processes, 31, 184-198. [Download]

Pineño, O., & Miller, R. R. (2005). Primacy and recency effects in extinction and latent inhibition: A selective review with implications for models of learning. Behavioural Processes, 69, 223-235. [Download]

Beckers, T., De Houwer, J., Pineño, O., & Miller, R. R. (2005). Outcome additivity and outcome maximality influence cue competition in human causal learning. Journal of Experimental Psychology: Learning, Memory, and Cognition, 31, 238-249. [Download]

Bouton, M. E., Woods, A. M., & Pineño, O. (2004). Occasional reinforced trials during extinction can slow the rate of rapid reacquisition. Learning and Motivation, 35, 371-390. [Download]

Pineño, O., & Miller, R. R. (2004). Signaling a change in cue-outcome relations in human associative learning. Learning & Behavior, 32, 360-375. [Download]

Pineño, O. (2004). Differential effects of nonreinforcement and punishment in humans. Psicológica, 25, 87-102. [Download]

Escobar, M., Pineño, O., & Matute, H. (2002). A comparison between elemental and compound training of cues in retrospective revaluation. Animal Learning & Behavior, 30, 228-238. [Download]

Pineño, O., & Matute (2000). Interference in human predictive learning when the associations share a common element. International Journal of Comparative Psychology, 13, 16-33. [Download]

Pineño, O., Ortega, N., & Matute (2000). The relative activation of associations modulates interference between elemenally trained cues. Learning and Motivation, 31, 128-152. [Download]

Matute, H., & Pineño, O. (1998).  Stimulus competition in the absence of compound conditioning. Animal Learning & Behavior, 26, 3-14. [Download]


Book chapters

De la Casa, L. G., & Pineño, O. (2010). Inter-stage context and time as determinants of latent inhibition. In R. E. Lubow & I. Weiner (Eds.), Latent inhibition: Cognition, neuroscience and applications to schizophrenia (pp. 40-61). Cambridge. UK: Cambridge University Press. [Download]

Schachtman, T. R., Ramsey, A., & Pineño, O. (2009). Postconditioning event manipulations on processing of the target conditioned stimulus in conditioned taste aversion. In S. Reilly & T. R. Schachtman (Eds.), Conditioned taste aversion: Behavioral and neural mechanisms (pp. 134-158). New York: Oxford University Press. [Download]

Pineño, O., Castro, L., & Urcelay, G. P. (2007). Interacción entre estímulos. In O. Pineño, M. A. Vadillo, & H. Matute (Eds.), Psicología del aprendizaje (pp. 25-48). Badajoz, Spain: Abededario. [Download]

Pineño, O., Vegas, S., & Matute, H. (2003). Factores que median en la expresión del aprendizaje asociativo humano. In J. Vila, J. Nieto, y J. M. Rosas (Eds.), Investigación contemporánea en aprendizaje asociativo (pp. 175-190) Jaén: Del Lunar. [Download]

Matute, H. & Pineño, O. (1998).  Cue competition in the absence of compound training:  Its relation to paradigms of competition between outcomes.  In D. L. Medin (Ed.),  The psychology of learning and motivation, Vol. 38, (pp. 45-81).  San Diego, CA:  Academic Press. [Download]



Pineño, O. (2010). The thinking rat: The new science of animal learning. Charleston, SC: CreateSpace. [Link]

Pineño, O., Vadillo, M. A., & Matute, H. (2007). Psicología del aprendizaje. Badajoz, Spain: Abecedario. [Download]


Dissemination and opinion articles

Pineño, O. (2008). Animal models of human misbehavior. Hofstra Horizons, Fall 2008, 16-21. [Download]

Zilski-Pineño, J. M., & Pineño, O. (2007). Should we talk to the general public about our work? International Journal of Comparative Psychology, 20, 10-12. [Download]

Pineño, O. (2004). La psicología y sus demonios. Psicoteca. [Link]

Barrios, I., y Pineño, O. (2003). Psicología y marketing (2): La influencia del consumidor. Psicoteca. [Link]

Pineño, O., y Barrios, I. (2003). Psicología y marketing (1): Del control del laboratorio al caos de la realidad. Psicoteca. [Link]