A shield is an extra circuit board that stacks on top of the Arduino and provides extra functionality. Our shields contain connectors so that you can connect extra components, like motors, and the extra circuitry that is necessary to drive them. Because of the wide variety of components that people might want to use, we designed a couple of different versions of the shield that offer different connectivity. We also tried to make each version as flexible as possible, so that you can just connect what you need without having to redesign or resolder the board.
NOTE: In order to simplify the naming convention for the OM PCBs, we are now naming the boards based upon the number of H-bridges (e.g. the old OM4 board is now named OM2 because it uses two H-bridges).
SEE PCB PRINTING PAGE TO LEARN HOW TO ORDER OM PCBs.
OM protoboard (legacy)
Varieties of OpenMaze shields
Here are some OM PCB designs that we've created, tailored for a variety of purposes.
Common Features: all boards have
- at least 4 H-bridge outputs for 5V/12V solenoid valves
- connector for MPR121 capacitive touch sensor (able to sense 12 touch pads/lick ports)
- IR beam break detectors (x4)
- all spare arduino digital pins are broken out to "PGIO" ports, allowing connection of a variety of components with minimal wiring.
OM shield PCB variants (named by number of H-bridges):
OM1: This variant integrates with Matlab's Psychophysics Toolbox (from Dennis Pelli, NYU) to deliver visual stimulation for the OpenMaze Mouse Visual Operant task. Matlab handles the display of the stimulus; when the choice period begins, it sends a message to the Arduino telling it to start counting behavioral responses. OM2 will also work for this, but OM1 allows you to have more free pins for user modifiable features.
OM2: This is the standard UNO board with two H-briges, one with 2-wire stepper control and one with 4 independent outputs for solenoid valves.
OM3: Similar to OM2, but with three H-bridges so that you can control two stepper motors, in addition to four solenoid valves. This is useful for manipulating two different tactile stimuli simultaneously (not in current use).
OM4: This board is for use with the Arduino MEGA or DUE processors, that have scores more inputs and outputs than the UNO, and are broken out for use in a variety of different circuits.
Basic design philosophy
While we originally designed the OpenMaze shields to control a somatosensory operant task for mice, we quickly realized that with a little work, the shields could be formatted to control a wide variety of other behavioral paradigms. The main way we do this is by breaking out as many of the Arduino pins to a multifunctional bank of connectors, what we call the PGIO, or "Power-Ground-Input/Output" banks. While the Arduino controls the logic for running the behavior, you need to connect it to various electonic circuits in order to actually do anything. Since most modern digital components (e.g. sensors or servo motors from Sparkfun) require a digital input/output, +5V power, and GND, but in a different order, we designed the PGIO ports to allow every possible combination of these connections, simply by plugging a female headers into a different combination of adjacent holes on the PGIO bank row.
In addition, the primary components we use for our behavior, the H-bridges we use to drive stepper motors and control solenoid valves for water rewards, can also be used for a number of different purposes.
Here are some features of the OM boards and how to make/print them.
The standard shield: OM2
This shield, named OM2, is the one most commonly used in our lab. It provides the following features:
Independent control over four different solenoid valves, for delivering water rewards, air puffs, olfactory stimuli, or gustatory stimuli
Control over a stepper motor, for instance, to bring a tactile stimulus into the whisker field
Touch or lick sensing
Digital output lines, for controlling servo motors, linear actuators, or speakers
Analog input lines, for monitoring stimulus position, voltages, etc.
Like all our shields, you decide which of these features you want to use. By connecting the inputs and outputs to the appropriate components (see the Components section), and by programming the Arduino to control those components (see the Software section), you can produce a huge variety of specific behavioral tasks.
To make OM2, you have two options:
Order a proto-board from Sparkfun, and solder on the wires according to the wiring diagram below.
Order a printed circuit board (PCB) using the instructions here. You don't need to do any wiring because the connections are already printed on the PCB.
The advantage of wiring everything yourself is that you'll understand it more completely, and you don't need to deal with uploading the PCB design. It's also cheaper, especially if you just want to make one or two shields. The advantage of the PCB is that it takes less time to attach the components and the shields will be more consistent. If you're making more than four or so shields, the cost comes down drastically and the PCB route becomes very attractive.
After you've built the board, you need to attach the components. If you're using a PCB, place the components in the holes that are marked, and they will already be connected. If you're using a proto-board, place them anywhere on the shield and connect to the appropriate pins using wires.
Here's a parts list. See our components section for more information on what each of these components does.
Two IC sockets for the H-bridges to sit in
One MPR121 (from Sparkfun; optional, only for touch/lick detection)
Long strip of 0.1" socket connection, which you can cut to size
Two BJTs (NPN transistors, like the 2N2222A)
Two 10K resistors and two 1K resistors
Here is the wiring diagram for attaching everything. Connections are shown as red or blue traces. The actual color doesn't mean anything, it's just to avoid overlap. Digital pins are labeled D# and analog pins are labeled A#.
We use 0.1" header as a standard connector. These are the 1x4 and 2x4 boxes labeled "Stepper" and "Solenoids" on the diagram.
You can read more about the BJT/resistor circuit for controlling the stepper motor here.