Low-cost USB interface for operant research using Arduino and Visual Basic

J Exp Anal Behav. 2015 Mar;103(2):427-35. doi: 10.1002/jeab.135. Epub 2015 Feb 4.


This note describes the design of a low-cost interface using Arduino microcontroller boards and Visual Basic programming for operant conditioning research. The board executes one program in Arduino programming language that polls the state of the inputs and generates outputs in an operant chamber. This program communicates through a USB port with another program written in Visual Basic 2010 Express Edition running on a laptop, desktop, netbook computer, or even a tablet equipped with Windows operating system. The Visual Basic program controls schedules of reinforcement and records real-time data. A single Arduino board can be used to control a total of 52 inputs/output lines, and multiple Arduino boards can be used to control multiple operant chambers. An external power supply and a series of micro relays are required to control 28-V DC devices commonly used in operant chambers. Instructions for downloading and using the programs to generate simple and concurrent schedules of reinforcement are provided. Testing suggests that the interface is reliable, accurate, and could serve as an inexpensive alternative to commercial equipment.

Keywords: Arduino; Visual Basic; experimental control; instrumentation; interface.

Publication types

  • Research Support, Non-U.S. Gov't

MeSH terms

  • Animals
  • Behavioral Research / methods*
  • Conditioning, Operant*
  • Microcomputers* / economics
  • Psychology, Experimental / instrumentation
  • Reinforcement Schedule
  • Software