Pololu Zumo User manual

Pololu Zumo Shield for Arduino
User's Guide
1. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.a. Contacting Pololu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.b. Included components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2. Assembly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.a. What you will need . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.b. Assembling the Zumo Shield and chassis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3. The Zumo Shield in detail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.a. Features and components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.b. Front expansion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3.c. Jumper settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3.d. 3-axis compass module (accelerometer and magnetometer) . . . . . . . . . . . . . . . . . . . . . . 20
4. Schematic diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
5. Arduino pin assignment table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
6. Zumo Shield Arduino Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
7. Example project: Border-detecting sumo robot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
7.a. Adding QTR reflectance sensors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
7.b. Arduino sketch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Pololu Zumo Shield for Arduino User's Guide © 2001–2012 Pololu Corporation
http://www.pololu.com/docs/0J57/all Page 1 of 28

1. Overview
The Zumo Shield provides a convenient interface between our Zumo chassis [http://www.pololu.com/catalog/product/
1418] and an Arduino Uno [http://www.pololu.com/catalog/product/2191] or Leonardo [http://www.pololu.com/catalog/
product/2192] (it is not compatible with the Arduino Mega or Due, but it can be used with older Arduinos that have
the same form factor as the Uno, such as the Duemilanove). The shield mounts directly to the chassis, connecting
to its battery terminals and motors, and the Arduino plugs into the shield’s male header pins, face down. The
shield provides all the electronics necessary to power the motors and includes some additional fun components
for making a more interesting robot, such as a buzzer for making sounds and a 3-axis accelerometer and compass.
Zumo Shield for Arduino. Assembled Zumo robot with a Zumo
Shield, Arduino Uno, and Zumo blade.
A Zumo chassis, Zumo Shield, and Arduino can be combined to become a low-profile, Arduino-controlled
tracked robot that is less than 10 cm on each side (small enough to qualify for Mini-Sumo competitions).
Zumo Shield for Arduino, labeled top
view.
Zumo robot assembled with a Zumo
Shield and Arduino Uno, back view.
The Zumo Shield is available by itself [http://www.pololu.com/catalog/product/2504] or as part of a Zumo robot kit
for Arduino [http://www.pololu.com/catalog/product/2505] that also includes a Zumo chassis and a stainless steel Zumo
blade [http://www.pololu.com/catalog/product/1410].
Pololu Zumo Shield for Arduino User's Guide © 2001–2012 Pololu Corporation
1. Overview Page 2 of 28

Fully assembled Zumo chassis
with assembled Zumo Shield.
1.a. Contacting Pololu
We would be delighted to hear from you about your experiences with the
Zumo Shield for Arduino [http://www.pololu.com/catalog/product/2504] or
Zumo robot kit for Arduino [http://www.pololu.com/catalog/product/2505]. If
you need technical support or have any feedback you would like to share,
you can contact us [http://www.pololu.com/contact] directly or post on our
forum [http://forum.pololu.com/viewforum.php?f=29]. Tell us what we did well,
what we could improve, what you would like to see in the future, or
anything else you would like to say!
1.b. Included components
The Zumo Shield is available by itself [http://www.pololu.com/catalog/product/
2504] or as part of a Zumo robot kit for Arduino
[http://www.pololu.com/catalog/product/2505] that also includes a Zumo
chassis [http://www.pololu.com/catalog/product/1418] and a stainless steel Zumo blade [http://www.pololu.com/catalog/
product/1410].
Zumo Shield
The shield itself comes with the following
components:
• right-angle slide switch
• two pushbuttons [http://www.pololu.com/catalog/
product/1400]
• buzzer
•2-pin battery-charging header
[http://www.pololu.com/catalog/product/1012]
• three jumper wires (for soldering motors to the
chassis)
• 40-pin 0.1″ straight breakaway male header
[http://www.pololu.com/catalog/product/965]
• two blue shorting blocks
[http://www.pololu.com/catalog/product/968]
• two 5/16″ #2-56 machine screws (to be used instead of the 1/4″ screws included with the chassis kit if you
attach a Zumo blade)
• 1/16″ black acrylic spacer plate (two pieces)
Zumo Robot Kit for Arduino
In addition to the shield and its included hardware, the Zumo robot kit for Arduino also includes these
components:
Pololu Zumo Shield for Arduino User's Guide © 2001–2012 Pololu Corporation
1. Overview Page 3 of 28

•Zumo chassis kit [http://www.pololu.com/catalog/
product/1418], which includes:
◦ Zumo chassis main body
◦ 1/16″ black acrylic mounting plate (not used
with the Zumo Shield)
◦ Two drive sprockets
◦ Two idler sprockets
◦ Two 22-tooth silicone tracks
◦ Two shoulder bolts with washers and M3 nuts
◦ Four 1/4″ #2-56 screws and nuts
◦ Battery terminals
•Basic sumo blade for Zumo chassis
[http://www.pololu.com/catalog/product/1410]
You will receive the black acrylic spacer and mounting plates with protective paper masking on
both sides. You can peel this masking off to expose the acrylic surface, or you can leave it on to
increase the thickness of the plates.
The shield and chassis kit include extra parts like jumper wires, screws, nuts, and washers, so do
not be concerned if you have some leftover hardware after assembling your Zumo.
Pololu Zumo Shield for Arduino User's Guide © 2001–2012 Pololu Corporation
1. Overview Page 4 of 28

2. Assembly
2.a. What you will need
The Zumo Shield is designed to be mounted on a Zumo chassis kit [http://www.pololu.com/catalog/product/1418],
which is included (along with a Zumo blade [http://www.pololu.com/catalog/product/1410]) if you have a Zumo robot
kit for Arduino [http://www.pololu.com/catalog/product/2505]. In addition, you will require these items to construct a
working Arduino-controlled Zumo robot:
Additional required components
• Two micro metal gearmotors [http://www.pololu.com/catalog/category/60] (we recommend 100:1
[http://www.pololu.com/catalog/product/1101] or 50:1 [http://www.pololu.com/catalog/product/998] gear ratio versions
with HP motors)
• An Arduino (we recommend an Uno R3 [http://www.pololu.com/catalog/product/2191] or a Leonardo
[http://www.pololu.com/catalog/product/2192])
• Four AA batteries (we recommend rechargeable AA NiMH cells [http://www.pololu.com/catalog/product/1003])
Please see the product description for the chassis kit [http://www.pololu.com/catalog/product/1418] for more
information and recommendations about selecting these components.
Additional optional components
•Basic sumo blade for the Zumo chassis [http://www.pololu.com/catalog/product/1410]
•Sensors [http://www.pololu.com/catalog/category/7], such as our QTR reflectance sensors
[http://www.pololu.com/catalog/category/123]
•Connectors and jumper wires [http://www.pololu.com/catalog/category/19], for connecting additional sensors
and components
• Battery charger (such as the iMAX-B6AC [http://www.pololu.com/catalog/product/2260]), if you are using
rechargeable batteries
Assembly tools
• Soldering iron and solder (we recommend one with adjustable temperature control)
• Wire cutter
• Small Phillips screwdriver
• 3 mm Allen wrench (hex key)
• long-nose pliers (for bending the Zumo blade mounting tabs)
2.b. Assembling the Zumo Shield and chassis
Please follow these instructions carefully to assemble your Zumo Shield and chassis properly.
Pololu Zumo Shield for Arduino User's Guide © 2001–2012 Pololu Corporation
2. Assembly Page 5 of 28

Through-hole parts
1. Solder the included through-
hole components to the shield:
◦ power switch
◦ reset pushbutton
◦ user pushbutton
◦ buzzer
◦ charging connector
(1×2-pin female header)
2. On the bottom of the board,
trim any leads longer than 1/16″
(the thickness of the spacer plate)
so they do not prevent the shield
from sitting flat on the spacer
plate and chassis.
Arduino headers
3. Separate the 1×40-pin
breakaway male header into the
appropriate segments for
connecting your Arduino and
solder them to the shield. These
header segments should be
soldered to the sets of holes
outlined with white rectangles on
the top of the shield, with the pins facing up.
The newest Arduino boards, including the Uno R3 and the Leonardo, use one 1×10 header, two 1×8 headers, and
one 1×6 header; older Arduino boards use two 1×8 headers and two 1×6 headers (the two pairs of pins highlighted
above in red should not be populated if you are using this board with an older Arduino that does not support these
additional pins). Please make sure you solder the appropriate headers for your particular Arduino!
An easy way to line up the Arduino headers for soldering is to plug them into an Arduino, then place the shield
upside-down on top of them, as shown in the picture below. Be careful to insert the header pins into the correct
set of holes before you begin soldering. Note: if you use this alignment technique, make sure your soldering iron
temperature is not excessively hot and avoid holding the iron on a single pin for more than a few seconds as this
could melt the Arduino’s female headers.
Pololu Zumo Shield for Arduino User's Guide © 2001–2012 Pololu Corporation
2. Assembly Page 6 of 28

4. On the bottom of the board, trim the four Arduino header pins closest to the front of the board on each
side to prevent them from contacting the motor housings. If you think there is a chance these pins might still
touch the motor cases, you can put some electrical tape on the motors to act as insulation.
Jumpers and additional connections
5. Optional: If you want to enable the buzzer, enable the battery level input, or disable the compass, now is
a good time to add and/or cut jumper connections to configure the shield to your liking. This can also be done
later, though soldering to these pins is more difficult once the robot is assembled (especially if you decide
later you want to add header pins for use with shorting blocks; this would require a lot of disassembly). The
jumpers are explained in detail in Section 3.c. The buzzer and battery level jumpers can be connected by
soldering in a short piece of wire between the two holes, while the compass I²C connections can be broken by
cutting the trace on the top of the board between the holes. Note: there is not enough clearance to use male
headers on the battery level and compass I²C jumpers if you are using an Arduino with a DIP (through-hole)
microcontroller.
Pololu Zumo Shield for Arduino User's Guide © 2001–2012 Pololu Corporation
2. Assembly Page 7 of 28

Instead of making a wire connection, you can solder a 1×3 male header to the buzzer jumper holes
to allow the use of a shorting block for connecting the buzzer. You can also use male headers and
shorting blocks for the battery level jumper and compass jumpers if you have an Arduino Leonardo
or an Arduino Uno with an SMD (surface mount) microcontroller. However, there is not enough
clearance to use male headers on the battery level and compass I²C jumpers if you are using an
Arduino with a DIP (through-hole) microcontroller.
6. Optional: At this point, you might consider soldering additional components (such as sensors), or
headers or wires for connecting them, to the shield. If you do this, please check to make sure your part
placement does not interfere with the shield’s ability to mate with the Arduino or the chassis. In particular,
note that only components in the outermost three rows of the front expansion area can extend below the
board (the fourth front-expansion row can only be used for pins extending above the board), and if you add
any through-hole parts to the prototyping areas on the shield, you will need to drill corresponding holes in
the acrylic spacer plate for the leads to fit into.
Motors
7. Cut two of the included jumper wires in half to form four segments, and trim off the ends that are covered
in adhesive (the adhesive could interfere with making a good electrical connection to the motor). These wire
segments will be used as motor leads.
8. Solder a pair of leads to each motor. You might find it helpful to make a small bend at the tip of each lead
to hook into the hole in the motor lead tab to hold it in place for soldering. Warning: holding the soldering
iron against the motor lead for more than a few seconds can start to damage the motor brushes, so try to be
Pololu Zumo Shield for Arduino User's Guide © 2001–2012 Pololu Corporation
2. Assembly Page 8 of 28

reasonably quick/efficient with this soldering; if the first attempt does not go well, remove the soldering iron
and let the motor cool for a few seconds before trying again.
Each motor’s positive terminal is indicated by a plus sign (+) in the black plastic end of the motor, visible at the
bottom of the picture above. The motors should be soldered into the shield with the positive terminal closest to
the front, so you should attach the leads to allow the motors to be oriented this way. (However, don’t worry if you
accidentally get the orientation of one or both motors wrong. You can later compensate for it in software with our
ZumoMotors library [http://www.pololu.com/docs/0J57/6].)
9. Place the motors into the channel in the front of the chassis, aligning the gearbox with the grooves in the
channel. The front plate of the gearbox should be even with the edge of the chassis.
Pololu Zumo Shield for Arduino User's Guide © 2001–2012 Pololu Corporation
2. Assembly Page 9 of 28

Chassis and shield
To assemble the chassis with the Zumo Shield, you should use the two-piece acrylic spacer plate
that is included with the shield. You will not need the one-piece mounting plate that is included
with the Zumo chassis.
10. Place an M3 nut in each of the two side slots near the rear of the chassis. The slots are sized so that nuts
will not be able to rotate within them. (These nuts will be used to mount the idler sprockets later.)
11. If you want, peel the protective paper masking off both sides of the acrylic spacer plate pieces (the
spacer plates in our pictures show what they will look like with the masking peeled off). Alternatively, you
can leave the masking on for additional thickness. If you leave the masking on, it will be mostly concealed
when the robot is fully assembled.
12. Cover the chassis and motors with the spacer plate pieces and then the Zumo shield. The holes in the
spacer plate should line up with the through-holes in the shield resting on top of it. There is only one correct
orientation for these plates. (The plate consists of two separate pieces to make it possible to disassemble the
Zumo without having to desolder the motors or battery terminals.)
13. In each of the four mounting holes, insert a #2-56 machine screw through the shield, spacer plate, and
chassis, and tighten it against a nut under the chassis. You can line up the nut by feel, or you could try
temporarily taping the nuts inside the recesses in the chassis. Note that the kit includes two different sizes of
#2-56 machine screws: 1/4″and 5/16″. The two longer screws are intended for use in the front holes (near the
motors) if you are also mounting a sumo blade; otherwise, you can use the shorter 1/4″ screws for all four
mounting holes.
Pololu Zumo Shield for Arduino User's Guide © 2001–2012 Pololu Corporation
2. Assembly Page 10 of 28

If you are also adding a basic sumo blade, you can either mount it now or add it later after you are
done soldering the motors and battery contacts. To install the blade, first bend its mounting tabs
to the appropriate angle. Next, place them on top of the shield so that the holes line up with the
two front mounting holes and insert the two longer (5/16″) #2-56 machine screws (included with
the shield) through the blade, shield, spacer plate, and chassis. Be careful when adjusting the angle
of the sumo blade while it is mounted to the chassis, as this can crack the acrylic spacer plate if
you apply sudden or excessive force. We recommend you do not try bending the blade while it is
mounted to the chassis.
14. Solder each motor lead to the shield, then trim off the excess length of wire.
Pololu Zumo Shield for Arduino User's Guide © 2001–2012 Pololu Corporation
2. Assembly Page 11 of 28

Battery contacts
15. Turn the chassis over and install the battery terminal contacts as shown in the picture below. Note that
the two individual contacts should be inserted into the chassis so that their solder tabs protrude through the
holes in the top of the chassis.
Pololu Zumo Shield for Arduino User's Guide © 2001–2012 Pololu Corporation
2. Assembly Page 12 of 28

16. Solder the two individual contacts to the shield from the top. You might want to temporarily tape
the contacts inside the chassis to hold them in place while you solder them, or you can use a battery to
temporarily hold them in place while you solder. Note that the battery might act as a heat sink, making it
more difficult to solder or requiring a higher soldering iron temperature. The battery terminal slot in the PCB
should be completely filled with solder as shown in the picture below.
Sprockets and track
17. Place an idler sprocket on each shoulder bolt, followed by a washer. The side of the sprocket with
“teeth” should face the same direction as the threaded end of the bolt, so that the teeth end up pointing in
towards the chassis.
18. Insert the shoulder bolts through the side of the chassis into the nut. Use a 3 mm hex key (Allen wrench)
to tighten the bolts until the washers are snug against the chassis. Be careful not to overtighten the shoulder
bolts as doing so can bend the washers.
Pololu Zumo Shield for Arduino User's Guide © 2001–2012 Pololu Corporation
2. Assembly Page 13 of 28

19. Press the output shafts of the motors into the drive sprockets, with the “teeth” of the sprockets facing
the motor. The end of the gearbox shaft should end up flush with the outside of the sprocket. A good way to
accomplish this is to set the wheel on a table top and press the motor shaft into the wheel until it contacts the
table.
20. At this point, you can add the silicone tracks by stretching them around the sprockets on each side of
the chassis. Your Zumo Shield and chassis are now complete; just add batteries and an Arduino to get your
Zumo robot moving!
Pololu Zumo Shield for Arduino User's Guide © 2001–2012 Pololu Corporation
2. Assembly Page 14 of 28

Disassembly
If you later decide you want to solder additional parts to the Zumo Shield, it is possible to remove it from the
chassis with some careful effort.
1. Remove the tracks from the chassis and carefully pull the drive sprockets off the motors.
2. Remove the battery cover and batteries from the chassis.
3. Unscrew all four sets of machine screws and nuts holding the shield to the chassis.
4. Squeeze the negative battery terminal spring and gently ease both battery terminals out through the holes
in the chassis. The motors will stay attached to the shield as it separates from the chassis.
5. Carefully bend both motors away from the shield to allow the front piece of the spacer plate to be
removed.
You can reassemble the Zumo afterwards by following this procedure in reverse. (Make sure to replace the spacer
plate pieces properly.)
Pololu Zumo Shield for Arduino User's Guide © 2001–2012 Pololu Corporation
2. Assembly Page 15 of 28

3. The Zumo Shield in detail
3.a. Features and components
The main features of the Zumo Shield are labeled in this diagram:
Power
The Zumo chassis has an internal compartment for four AA batteries. We recommend using rechargeable AA
NiMH cells [http://www.pololu.com/catalog/product/1003], which results in a nominal voltage of 4.8 V (1.2 V per cell).
You can also use alkaline cells, which would nominally give you 6V.
A direct connection to the battery terminals is provided by the battery charger connector on the rear edge of
the shield, which can be used to recharge the Zumo’s batteries without removing them from the chassis. The
positive pin of the charge connector, on the left, is indicated by a plus sign (+). A charger like the iMAX-B6AC
[http://www.pololu.com/catalog/product/2260], connected by clipping its alligator clips to a pair of jumper wires inserted
into the charge connector, works well for charging the Zumo.
After passing through reverse protection, the battery voltage is connected to the rest of the shield by the power
switch. The switched battery voltage is designated VBAT and provides power to the motors through the DRV8835
motor driver. An on-board boost regulator, also supplied from VBAT, generates 7.45 V to power the Arduino
through its Vin pin. In turn, the Arduino’s regulated 5V and 3.3V voltages supply power to the motor driver logic,
buzzer circuit, and compass module on the Zumo Shield.
Pololu Zumo Shield for Arduino User's Guide © 2001–2012 Pololu Corporation
3. The Zumo Shield in detail Page 16 of 28

Warning: When powering the Arduino from the Zumo Shield, you must never connect a different
power supply to the Arduino’s VIN pin or plug a power supply into the Arduino’s power jack, as doing
so will create a short between the shield’s power supply and the Arduino’s power supply that could
permanently damage both the Arduino and the Zumo Shield.
When the Arduino is connected to a computer via USB, it will receive power (and supply 5V and
3.3V to the shield) even when the Zumo Shield’s power switch is off. This can be useful if you
want to test your Arduino program without allowing the motors to run, since turning the power
switch off disconnects motor power (VBAT).
LEDs
There are five LEDs on the Zumo Shield:
• A set of power LEDs, one blue and one red, is located in each of the two rear corners of the shield.
• A yellow user LED is located on the right edge of the shield. It is connected to digital pin 13 on the
Arduino, in parallel with the Arduino’s onboard user LED.
Pushbuttons
Two pushbuttons can be soldered to the Zumo Shield:
• The reset pushbutton is located on the left edge of the shield. It is connected to the Arduino’s RESET
pin and can be pressed to reset the Arduino.
• The user pushbutton is located on the rear edge of the shield. It is connected to digital pin 12 on the
Arduino; pressing the button pulls the pin low. The Pushbutton library, included with our Zumo Shield
libraries [http://www.pololu.com/docs/0J57/6], makes it easy to detect and debounce button presses with this
pushbutton.
Motor driver
An integrated DRV8835 [http://www.pololu.com/catalog/product/2135] dual motor driver on the Zumo Shield drives the
Zumo’s two micro metal gearmotors. Four Arduino pins are used to control the driver:
•Digital pin 7 controls the right motor direction (LOW drives the motor forward, HIGH drives it in
reverse).
•Digital pin 8 controls the left motor direction.
•Digital pin 9 controls the right motor speed with PWM (pulse width modulation).
•Digital pin 10 controls the left motor speed with PWM.
The ZumoMotors library [http://www.pololu.com/docs/0J57/6] provides functions that allow you to easily control the
motors, and it can optionally take care of flipping a direction signal for you if you accidentally soldered in a motor
backwards.
Buzzer
The Zumo Shield comes with a buzzer that can be used to generate simple sounds and music (for example, you
could use it to produce an audible countdown at the beginning of a sumo match). The buzzer control line is labeled
Pololu Zumo Shield for Arduino User's Guide © 2001–2012 Pololu Corporation
3. The Zumo Shield in detail Page 17 of 28

BZ on the shield; if you alternate between driving it high and low at a given frequency, the buzzer will produce
sound at that frequency.
The ZumoBuzzer library [http://www.pololu.com/docs/0J57/6] uses hardware PWM to play notes on the buzzer, with
digital pin 3 (OC2B) on an Arduino Uno or an older Arduino, or with digital pin 6 (OC4D) on an Arduino
Leonardo. A jumper is provided to connect the BZ input to the appropriate Arduino output, as detailed in Section
3.c.
Front expansion area
A number of I/O, power, and ground connections are brought to the front of the Zumo Shield to allow the
mounting of additional sensors and other components. The pinout of this front expansion area is detailed in
Section 3.b.
3-axis compass module
The Zumo Shield includes an onboard LSM303DLHC 3-axis compass module, which can be used to sense
acceleration and magnetic field direction for advanced applications. The compass module is detailed in Section
3.d.
3.b. Front expansion
The pins in the front expansion area of the Zumo Shield are shown in the following diagram:
This diagram is also available as a downloadable PDF: Zumo Shield front expansion pinout
[http://www.pololu.com/file/download/zumo_shield_front_expansion_pinout.pdf?file_id=0J592] (552k pdf).
The front expansion makes available digital pins 2, 4, 5, and 11 and analog pins A0 through A5. It also provides
access to the two I²C pins (SDA and SCL). However, please note that the I²C pins are not independent pins;
they are respectively duplicates of analog pins A4 and A5 on the Uno R3, and digital pins 2 and 3 on the
Leonardo. Typically, you will only be able to use these pins for either I²C communication or general I/O, not both.
Additionally, pin A1 is used to monitor the battery voltage if you install the battery monitor jumper.
Please note that only components and connectors in the front three rows of pins can extend below the shield; the
fourth row covers the chassis and is only suitable for components mounted above the shield.
Pololu Zumo Shield for Arduino User's Guide © 2001–2012 Pololu Corporation
3. The Zumo Shield in detail Page 18 of 28

If you use an Arduino Uno R2 or an older Arduino, which lack separate I²C pins, the SDA and SCL pins on the
Zumo Shield will not be connected to anything. To use an I²C device on those pins, you can connect SDA to A4
and SCL to A5 yourself by bridging across those two sets of pins in the front expansion area. Section 3.c further
explains the I²C lines and the jumpers connecting them to the onboard compass module.
Depending on the Arduino model, digital pin 3 or 6 is used to control the buzzer if you install the
buzzer control jumper. If you are using an Uno, pin 6 will be available for general-purpose I/O.
If you are using a Leonardo, pin 3 will be available if you are not using I²C. These pins are not
accessible via the front expansion, but they can be accessed from other points on the shield and
used for interfacing with additional electronics if free. Additionally, digital pin 12 can be used for
interfacing with many types of additional electronics, especially if you are not using the shield’s
user pushbutton. Pin 12 is completely free when the pushbutton is in its default, unpressed state,
and it is pulled low through a 1k resistor when the pushbutton is pressed.
3.c. Jumper settings
The Zumo shield has several jumpers that let you change the way it is connected to the Arduino, as shown in the
picture below.
• The battery level jumper connects the Arduino’s analog pin 1 to a voltage divider circuit that allows
you to monitor the Zumo’s battery voltage. This jumper is disconnected by default and can be connected by
soldering a short length of wire between the two holes.
Pololu Zumo Shield for Arduino User's Guide © 2001–2012 Pololu Corporation
3. The Zumo Shield in detail Page 19 of 28

The divider outputs a voltage equal to two-thirds of the battery voltage, which will always be safely below the
Arduino’s maximum analog input voltage of 5 V. For example, at a battery voltage of 4.8 V, analog pin 1 will be
at a level of 3.2 V. Using Arduino’s analogRead() function, where 5 V is read as a value of 1023, 3.2 V is read as
a value of 655. To convert it back to the actual battery voltage, multiply this number by 5000 mV×3/2 and divide
by 1023:
unsigned int batteryVoltage = analogRead(1) * 5000L * 3/2 / 1023;
• The buzzer control jumper connects one of the Arduino’s PWM outputs to the buzzer on the Zumo
Shield. This jumper is disconnected by default.
If you have an Arduino Uno or an older Arduino (with an ATmega328P or ATmega168 microcontroller), you
should jumper the two holes bracketed with the label 328P to connect the BZ pin to digital pin 3. If you have
an Arduino Leonardo (with an ATmega32U4 microcontroller), you should jumper the two holes bracketed
with the label 32U4 to connect the BZ pin to digital pin 6. These are the pins our ZumoBuzzer library
[http://www.pololu.com/docs/0J57/6] expects the buzzer to be connected to for each respective microcontroller. More
details about the buzzer can be found in Section 3.a.
• The compass I²C jumpers connect the I²C clock (SCL) and data (SDA) lines of the LSM303DLHC
3-axis compass module on the Zumo Shield to the SCL and SDA pins on the Arduino. These jumpers are
connected by default, but can be disconnected by cutting the thin trace between each pair of holes.
On the Arduino Uno R3, SCL and SDA are duplicates of analog pins 5 and 4, respectively. On the Arduino
Leonardo, SCL and SDA are duplicates of digital pins 3 and 2, respectively. Using the LSM303 on the shield will
prevent these pins from being used for other purposes, and the I²C pull-up resistors will affect readings on these
pins even if the compass is not being actively used, so you must cut the jumpers to disconnect the LSM303 and
pull-ups if you want to repurpose the SCL and SDA pins.
Please note that the SCL and SDA pins do not exist on Arduino hardware versions prior to the Uno R3, so you
will have to manually connect SCL to analog pin 5 and SDA to analog pin 4 on the Zumo Shield in order to use
the compass with an older Arduino. The most convenient place to do this is in the front expansion area, where
these pins are all located together, as indicated by the light blue boxes in the picture above.
More details about the 3-axis compass module can be found in Section 3.d.
Instead of making a wire connection, you can solder a 1×3 male header to the buzzer control
jumper holes to allow the use of a shorting block for connecting the buzzer. You can also use
male headers and shorting blocks for the battery level jumper and compass jumpers if you have
an Arduino Leonardo or an Arduino Uno with an SMD (surface mount) microcontroller. However,
there is not enough clearance to use male headers on the battery level and compass I²C jumpers if
you are using an Arduino with a DIP (through-hole) microcontroller.
3.d. 3-axis compass module (accelerometer and magnetometer)
The Zumo Shield includes an onboard LSM303DLHC [http://www.pololu.com/catalog/product/2124] compass module
that combines a 3-axis accelerometer and 3-axis magnetometer into a single package with an I²C interface.
This sensor can be used in advanced applications to help your Zumo detect collisions and determine its own
orientation. We recommend carefully reading the LSM303DLHC datasheet [http://www.pololu.com/file/download/
LSM303DLHC.pdf?file_id=0J564] (629k pdf) to understand how it works and how to use it.
Pololu Zumo Shield for Arduino User's Guide © 2001–2012 Pololu Corporation
3. The Zumo Shield in detail Page 20 of 28
Table of contents
Other Pololu Robotics manuals