Brains and Dr. Brawn

The Asymmetrical Plus (A+) Maze


The A+ Maze is an automated plus maze designed for operantly training rats on auditory-spatial learning tasks. Each arm of the maze is fitted with: 1) a response port where rats can initiate and respond to trials via infrared sensors, 2) a speaker for playback of auditory stimuli, and 3) a syringe pump for dispensing liquid reward. It is configured like a standard plus-maze except one set of arms (north and south) that contains the trial initiation ports is shorter than the other set of arms (east and west) that contains the trial response ports. Each response port module is controlled by an Arduino stack. The operant training procedures are written in Python.

Below you will find step-by-step instructions for how to build the maze, the Arduino and python code I code use to run various shaping and training procedures, and links to the materials needed to construct the maze and electronics.

Assembly Instructions

Click on the pictures or links below to download assembly instructions for each part of the maze:

Proto Screw Shield

1. Construct the Proto Screw Shield

Electronics Assembly Instructions

2. Assemble the response port module electronics

Response Port Assembly Instructions

3. Connect the electronics to the response port

Syringe Pump Assembly Instructions

4. Assemble the syringe pump

A+ Maze Assembly Instructions

5. Construct the A+ Maze

Operant Training Source Code

Shape01: 4-Port Single Response Trials: All four response ports are active (indicated by LED) during Shape01. The rat can probe any of the ports and receive a reward. The port becomes inactive for 30s following a response. You can set the maximum number of trials allowed for each port. The port will become inactive after reaching the trial maximum. The session ends when the trial maxmimum has been reached at each port. The same arduino file is uploaded to all four arduinos.

Python Shape01

Download Shape01 Python Code

Arduino Shape01

Download Shape01 Arduino Code

Shape02: 1-port Single Response Trials: A single response port is randomly selected and becomes active (indicated by LED) during Shape02. The rat must probe the active port to receive a reward. After the trial is completed, one of the other 3 ports is randomly selected and becomes active. The session ends when the rat has completed the user-set maximum number of trials. A different arduino file is uploaded to each of the four ports (North, East, South, West).

Python Shape02

Download Shape02 Python Code

Arduino Shape02-North

Download Shape02-North Arduino Code

Arduino Shape02-East

Download Shape02-East Arduino Code

Arduino Shape02-South

Download Shape02-South Arduino Code

Arduino Shape02-West

Download Shape02-West Arduino Code

Shape03: 2-port Double Response Trials: During Shape03, the north or south port is randomly selected as the trial initiation port and becomes active. When the rat probes the active initiation port, the east or west port becomes active as the trial response port. The user can set the response window duration for how long the rat can take to probe the response port after probing the initiation port before the trial resets. A different arduino file is uploaded to each of the four ports (North, East, South, West).

Python Shape03

Download Shape03 Python Code

Arduino Shape03-North

Download Shape03-North Arduino Code

Arduino Shape03-East

Download Shape03-East Arduino Code

Arduino Shape03-South

Download Shape03-South Arduino Code

Arduino Shape03-West

Download Shape03-West Arduino Code

2AC auditory-spatial classification task: In the 2-alternative choice auditory-spatial classification task, the north or south port is randomly selected as the trial initiation port and becomes active. When the rat probes the active initiation port, one of two sound stimuli is played back by the speaker above the port, and the east and west ports become active. The sound indicates the location of the reward. If the rat probes the correct response port, reward is dispensed and a trial initiation port is selected randomly again. If the rat probes the wrong port, an error tone is played back and a new trial will begin after a timeout period. If the rat does not respond to the stimuli within the response window, the trial ends and a new trial will begin after a timeout period. A different arduino file is uploaded to each of the four ports (North, East, South, West).

Python 2AC

Download 2AC Python Code

Arduino 2AC-North

Download 2AC-North Arduino Code

Arduino 2AC-East

Download 2AC-East Arduino Code

Arduino 2AC-South

Download 2AC-South Arduino Code

Arduino 2AC-West

Download 2AC-West Arduino Code

Syringe Pump Control: Syringe Pump Control is an arduino file that allows you to move the Syringe Pump in the forward or reverse direction in increments of 1K, 5K, 10K, or 25K microsteps via the Serial Monitor.

Arduino Syringe Pump Control

Download Syringe Pump Control Arduino Code

Bill of Materials

Maze Body
Part Price Quantity Notes
Part #1020: 1" x 2" T-Slotted Rail (length = 1000mm) $17.30 3 Maze tracks for east, west, and north-south arms
Part #2020: 2" x 2" T-Slotted Rail (length = 24") $15.73 5 Maze legs
80-20 Bolt Assembly (25 pack) $12.77 6 Connects brackets to rails
Part #2418: 10 Series Flange Mount Caster Base Plate $15.75 5 Connects maze legs to wheels or can be used as leg feet
Part #2333: 4.00" Deluxe Flange Mount Swivel Caster with Brake $31.00 5 Maze wheels not necessary but make the maze easily portable
Part #4117: Straight Flat Plate $4.80 9 Connects part 1020 rails to create 4" maze tracks
Part #4101: Inside Corner Bracket $4.10 20 Connects maze legs to maze arms (4 per leg)
Part #4113 Wide Inside Corner Bracket $4.05 8 Connects syring pump rails to maze legs (2 per syringe pump)
Part #3064: 1/4-20 x .750" Socket Head Cap Screw $0.21 20 Connects baseplate to maze legs (4 per maze wheel)
Part #3110: 1/4-20 x .750" Socket Head Cap Screw $0.24 20 Connects maze wheels to baseplate (4 per maze wheel)
Maze Walls $92 (total) 8 short /
4 long
Laser cut at Pololu.
(Description of walls)


Response Port Module
Part Price Quantity Notes
3D Print: Response Port Housing $43* 4 One response port module for each arm of the maze
3D Print: Electronics Tray $72** 4 One tray for each arduino stack
Elegoo UNO R3 (Arduino) $11.86 4 One arduino for each response port module
Proto Screwshield R3 Kit $14.95 4 Arduino shield for the LED and IR circuitry. One screwshield for each response port module
IR Beam Break Sensor (3mm) $1.95 4 One for each response port module
3mm LEDs (1000 pack) $14.99 1 One for each response port module
JLab USB Speaker $9.00 4 One for each arm of the maze
7-port USB Hub $28.99 2 This hub connects to the maze's 4 arduinos and 4 usb speakers
Hook-Up Wire $13.99 1 Used to wire LEDs and connect stepper motor to driver
8" x 8" x 4" Styrofoam Block $5 4 Support structure for speaker
Part #S-14371BL: 24" x 18" Plastic Corrugated Pad (10 pack) $32 1 One is attached to foam block at the end of each arm
USB extension cables: 3ft (2 pack) $9.99 2 Connects arduinos to USB hubs
USB extension cables: 6ft (4 pack) $13.99 1 Connects speakers to USB hubs
Feeding tube structure $10* 4 Inserted into styrofoam block for syringe pump tubing


Syringe Pump
Part Price Quantity Notes
3D Print: Syringe Pump Part 1*** $20* 4 Attaches to stepper motor
3D Print: Syringe Pump Part 2*** $15* 4 Holds the plunger flange
3D Print: Syringe Pump Part 3*** $15* 4 Holds the barrel flange
3D Print: Syringe Pump Part 4*** $15* 4 Holds the syringe tip
Stepper Motor $15.99 4 One for each syringe pump
Stepper Motor Driver $12.00 4 One for each arduino stack
5mm to 8mm Rigid Stepper Motor Shaft Coupler $3.34 4 Connects the stepper motor to the lead screw.
M8 stainless steel threaded rod: 1m $15.76 1 Syringe pump lead screw
8mm Linear Shaft (2 pack) $11.59 2 Runs through linear bearing and Syringe Pump Parts
8mm Linear bearing (10 pack) $9.03 1 Connects to linear shaft and Syringe Pump Part 2
M3 screw kit $9.99 1 Connects stepper motor to Syringe Pump Part 1
30ml Luer Lock Syringe (10 pack) $19.99 1 Other syringe sizes also work
M8 Hex Nut (50 pack) $13.38 1 Fits in syringe pump part 2
Female Luer Lock 1/8" Adapter (25 pack) $10.25 1 Connects syringe to tubing
Nickel-Plated Brass Male Luer Lock 1/8" Adapter $23.00 4 Attaches to tubing to dispense reward
Plastic Tubing (100ft) $11.44 1 Connects to male and female luer lock components
1" x 2" T-Slotted Rail (Part# 1020): 12" ? 4 Syringe pump parts are attached to this rail

* Price varies depending on 3D-printing company and material used. I typically use i.materialise or Shapeways for printing

** The quality of the tray isn't very important and any tray that can hold the arduino stack will do.

*** These stl files were downloaded from a hackaday blog that is no longer active