Bpod State Machine r2+

Open control system for precision animal behavior measurement
Product ID: 1036

$1,645.00 USD

28 in stock



Bpod State Machine r2+ is an electronic system for precise measurement of small animal behavior. It measures the instant when discrete events happen (a snout enters a port, a tongue breaks a photogate, etc). The state machine can react to events by rapidly changing aspects of the environment, providing an excellent low-latency link between behavioral events, stimuli and reinforcement. Bpod is most often used for the 2AFC (two alternative forced choice) behavioral paradigm, but has been adapted to power a diverse range of behavioral assays (e.g. conditioned place preference, go / no-go, self-stimulation, social value measurement and others).

State machine r2+ can interface with up to 5 behavior ports (a.k.a. Nosepokes). Each behavior port contains one infrared photogate to detect port entry, one visible LED with software-adjustable intensity, and one solenoid valve for dispensing precisely measured liquid rewards through a steel drinking tube. The state machine has onboard digital inputs and outputs for triggering and synchronization with neural data acquisition systems. Beyond its onboard channels, the state machine can interface with external microcontroller boards via the Bpod Arduino, Teensy and Raspberry Pi shields. Bpod Modules leverage external microcontrollers to add capabilities like analog I/O, audio, quadrature encoders and motor control.

Please be advised that Bpod is a flexible behavior platform, and is not guaranteed to do everything you have in mind out of the box. It has a learning curve, and will require some programming to develop a behavioral protocol. Documentation and information about getting started is available on the Bpod wiki. Individual support is available in the Bpod forums. A central focus of our company is to grow the current community of Bpod users, to optimize the system for ease of use, and to add to its capabilities.

State Machine r2+ features several hardware improvements over r2:

  • Processing Speed: An ARM Cortex M7 processor @ 600MHz, up from Cortex M4 @ 180MHz
  • USB Bandwidth: High Speed USB2 (up to 480Mbit/s), up from Full Speed (up to 12Mbit/s)
  • More onboard I/O:
    • One additional behavior port (5 total)
    • Flex I/O channels (4 total) are a new type of channel that can be configured in user code as digital out, digital in, analog out or analog in (both analog modes are 0-5V range, 12bit)
  • Memory: An 8MB PSRAM IC enables improved sampling and logic operations
  • Efficiency: A more efficient isolation scheme reduces the state machine's power draw for improved performance
  • Enclosure: A premium enclosure provides improved mechanical robustness

IMPORTANT NOTE: The PyBpod project does not yet support this machine. We are working to add compatability. For near-term Python support please consider using State Machine r2.



Behavior port channels

  • 5 behavior ports connect with CAT5/CAT6 cables to breakout boards mounted on your behavior chamber
  • Port LEDs are independently PWM modulated at 200kHz to control intensity in software
  • Port valves (12-24V, up to 250mA sustained) can be opened simultaneously, and are driven by an Infineon ISO1H811GAUMA1 isolated solenoid driver IC.

TTL input (trigger) channels

  • 2 channels: BNC connectors, 3-5V TTL logic, optically isolated

TTL output channels

  • 2 channels: 5V TTL logic, BNC connectors, galvanically isolated

Flex I/O channels

  • 4 channels: 0-5V range, 12-bit, galvanically isolated
  • Exposed as an 8-channel bank of screw terminals (4 channels, 4 GND)
  • Each channel can be configured by the user as:
    • Digital input (events generated on TTL level changes)
    • Digital output (5V TTL)
    • Analog input (0-5V range, 12-bit, events on voltage thresholds, data displayed online + logged to PC)
    • Analog output (0-5V range, 12-bit, voltage controlled by states or global timers)

Module channels

  • 3 module ports provide interfaces to Arduino-powered Bpod modules
  • All module ports provide isolated DC power to compatible modules, eliminating a separate USB cable
  • UART Baud rate: 1.3Mb/s default
  • Modules are available for:
    • Analog playback and patterned stimulation (4ch or 8ch)
    • Analog acquisition and threshold detection (8ch)
    • Audio playback and synthesis (2ch)
    • Waveform digital synthesis (1ch)
    • Rotary encoder integration
    • Solenoid valve driver (8ch)
    • I2C Bus interface
    • General purpose Arduino integration (shield)
    • General purpose Teensy integration (shield)


  • A MATLAB API is provided to design and run behavioral experiments.
  • No Mathworks toolboxes are required.
  • OS support: Win7, Win10, Ubuntu 16-22.


  • All state machine and module power is supplied from a single USB port (USB micro connector)
  • A DC barrel jack provides power for the isolated solenoid valve in each behavior port (12V DC adapter included)

Status indicator

  • A bright tri-color LED illuminates the Bpod enclosure to indicate its current status. Blue = disconnected, Green = connected (idle), Yellow = running a trial, Red = fault condition.

Material safety


  • L: 12cm (4 3/4")
  • W: 12cm (4 3/4")
  • H: 5cm (2")

Comments (0)