Bpod State Machine r2

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

$945.00 USD

0 in stock

A newer version of this product is available



Bpod State Machine r2 is our newest 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 these 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 (conditioned place preference, go / no-go, self-stimulation, social value measurement, etc).

State machine r2 can interface with up to 4 behavior ports. Each behavior port contains one infrared photogate, one visible LED with software-adjustable intensity, and one solenoid valve for dispensing precisely measured liquid rewards through a drinking tube. The state machine has digital inputs and outputs for triggering and synchronization with linked electrophysiology and stimulation systems. Integration with Psychtoolbox 3 provides high quality audio stimuli with ~8ms latency on a properly configured computer, and with a firmware swap, our analog output module provides ~100 microsecond latency audio in applications where audio fidelity is not critical.

Please be advised that Bpod r2 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 r0.8:

  • Modularity: Interfaces with 5 Bpod modules (up from 3)
  • Integrated Power: Provides isolated power to 3 compatible modules
  • Significantly faster CPU + more memory allows more complex state machine descriptions + mods
  • Improved Valve Driver: drives larger inductive loads in parallel, and valves are now electrically isolated from other state machine control circuitry.
  • Design optimized for manufacturing throughput, to improve availability



Behavior port channels

  • 4 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.

Module channels

  • 5 module ports provide interfaces to Arduino-powered Bpod modules
  • Module ports 1-3 provide isolated DC power to compatible modules
  • 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)
    • Waveform synthesis (1ch)
    • Rotary encoder integration
    • Solenoid valve array driver (8ch)
    • I2C Bus interface
    • Nintendo Gamepad (for human psychophysics)
    • General purpose Arduino integration (shield)
    • General purpose Teensy integration (shield)

TTL input (trigger) channels

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

TTL output channels

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

Event Synchronization

  • Configurable TTL synchronization scheme, using any available digital or PWM output channel.


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

BControl support (beta)

  • A software patch is now provided to run BControl software (Brody Lab, Princeton Univ) on Bpod State Machine v0.7-0.9 and v2.
  • Please be advised that this capability is in beta. Please report any bugs you encounter on our support forums.

Soft codes

  • Soft codes are special bytes sent between the state machine and MATLAB during a trial, to interface with non-realtime operations.
  • Soft codes arriving in MATLAB are handled by a soft code handler function you write (i.e. to trigger sound playback, change the display, etc).
  • Soft codes sent via MATLAB (e.g. from Bonsai video tracking) are passed to the state machine, where they trigger state changes.


  • 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)