Zumo 32u4 Robot
Zumo 32u4 Robot
https://www.pololu.com/docs/0J63/all
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
2
4
8
9
10
11
11
11
13
14
16
17
20
21
23
24
27
29
29
31
52
53
54
Page 1 of 54
1. Overview
The Zumo 32U4 robot is a complete, versatile robot controlled by an Arduino-compatible ATmega32U4
microcontroller. When assembled, the low-profile tracked robot measures less than 10 cm on each side, making
it suitable for Mini-Sumo competitions.
At the heart of the Zumo 32U4 is an integrated ATmega32U4 AVR microcontroller from Atmel, along with dual
H-bridge drivers that power the robots motors. The robot also features a variety of sensors, including quadrature
encoders and inertial sensors (accelerometer and gyro) on the main board, along with reflectance and proximity
sensors on the front sensor array. On-board pushbuttons offer a convenient interface for user input, and an LCD,
buzzer, and indicator LEDs allow the robot to provide feedback.
Like our A-Star 32U4 programmable controllers [https://www.pololu.com/category/149/a-star-programmablecontrollers], the Zumo 32U4 features a USB interface and ships preloaded with an Arduino-compatible bootloader.
We provide a software add-on that makes it easy to program the Zumo 32U4 from the Arduino environment, as
well as a set of Arduino libraries to help interface with its on-board hardware.
1. Overview
Page 2 of 54
Comparison with the Zumo robot kit for Arduino (with Zumo Shield)
Our older Zumo robot for Arduino [https://www.pololu.com/product/2510], built with a Zumo Shield
[https://www.pololu.com/product/2508], is another Arduino-compatible robotic platform based on the Zumo chassis.
The Zumo Shield is designed for a board with a standard Arduino form factor, like an Arduino Uno
[https://www.pololu.com/product/2191], Arduino Leonardo [https://www.pololu.com/product/2192], or A-Star 32U4
Prime [https://www.pololu.com/category/165/a-star-32u4-prime], to plug into it and act as its controller.
By contrast, the Zumo 32U4 includes an on-board ATmega32U4 microcontroller (the same one used in the
Leonardo and A-Star 32U4 boards), combining the functions of the Zumo Shield and the separate Arduino
controller into a single board and enabling the resulting robot to be even more compact. However, it remains
just as easy to program as a standard Arduino, thanks to its USB interface and preloaded Arduino-compatible
bootloader. The Zumo 32U4 also adds many features that are not found on the Zumo Shield, including encoders,
an LCD, and proximity detection.
Some of the pin mappings and software libraries differ between the Zumo 32U4 and Zumo robot for Arduino,
so programs written for one robot generally need to be modified to work on the other.
1. Overview
Page 3 of 54
The Zumo 32U4 robot ships as a kit that includes the following items:
Zumo 32U4 main board and associated hardware:
two wide-angle and two narrow-angle through-hole infrared LEDs
two 12 machine pin sockets for IR LEDs
heat shrink tubing shrouds for IR LEDs
buzzer
82 character LCD [https://www.pololu.com/product/356]
27 low-profile male header for LCD
jumper wires (for soldering motors to the main board)
two magnetic encoder discs [https://www.pololu.com/product/2599] (12 CPR)
Zumo 32U4 front sensor array and associated hardware:
212 female header and 212 extended male header for sensor array
two 13 right-angle male headers and two shorting blocks jumpers for sensor array
Zumo chassis kit [https://www.pololu.com/product/1418], which includes:
Zumo chassis main body
two drive sprockets
two idler sprockets
1. Overview
Page 4 of 54
1. Overview
Page 5 of 54
1. Overview
Page 6 of 54
The robot and chassis kit might include extra parts like jumper wires, screws, nuts, washers, and
an acrylic spacer plate (which is not used in the Zumo 32U4), so do not be concerned if you have
some leftover hardware after assembling your Zumo.
1. Overview
Page 7 of 54
Motor options
The kit version of the Zumo 32U4 Robot requires two (2) micro metal
gearmotors with extended motor shafts, one for each tread. We
generally recommend getting two of the 75:1 Micro Metal Gearmotor
HP with Extended Motor Shaft [https://www.pololu.com/product/2215],
and most of our example code was developed and tested with these
motors. However, these motors are not included with the kit because
other motor options are possible.
The ideal motors for your robot depend on your desired torque, speed,
and current draw. We generally recommend using HP versions of our
micro metal gearmotors since the tracks require a decent amount of
torque to move effectively; higher gear ratios of the non-HP motors
might work if you want lower current draw, but they will be slower and
offer less control. Specifically, we recommend the 50:1, 75:1, or 100:1
HP motors for use with this chassis. The following table summarizes
the key specifications of these three gearmotors. The first four columns
are specifications of the motors themselves, while the last column is the
measured top speed of a Zumo chassis loaded to a weight of 500 g and
driven with these motors. Note that the specifications are for 6V
operation, which is approximately the voltage you would get with four
fresh alkaline batteries; four NiMH AA cells will typically provide less
than 5V.
Micro Metal Free-Run Speed Stall Torque Stall Current
Gearmotor
@ 6V
@ 6V
@ 6V
100:1 HP
320 RPM
30 ozin
1600 mA 20 in/s
(50 cm/s)
75:1 HP
400 RPM
22 ozin
1600 mA 25 in/s
(65 cm/s)
50:1 HP
625 RPM
15 ozin
1. Overview
Page 8 of 54
For more options, you can see our other micro metal gearmotors with extended motor shafts
[https://www.pololu.com/category/141/micro-metal-gearmotors-with-extended-motor-shafts]. Be sure to pick a motor that has
an extended shaft, or else you will not be able to use the encoders on the Zumo 32U4.
Assembly tools
These additional items are needed for assembling the Zumo 32U4 robot:
Soldering iron and solder (we recommend one with adjustable temperature control)
Wire cutter
Small #1 Phillips screwdriver
3 mm Allen wrench (hex key)
long-nose pliers (for bending the IR LED leads and Zumo 32U4 blade mounting tabs)
tape or small clamps (for holding parts together when soldering)
[https://www.pololu.com/category/7/sensors],
such as optical [https://www.pololu.com/category/79/opticalor sonar range finders [https://www.pololu.com/category/78/sonar-range-finders] (the Zumo 32U4
already has built-in IR proximity sensors, but additional sensors can be incorporated for increased range or
detection area)
range-finders]
[https://www.pololu.com/category/19/connectors],
Battery charger, if you are using rechargeable batteries; since the Zumo just uses ordinary AA batteries,
we recommend basic AA chargers (into which you stick the individual cells) available at most general
electronics stores, though we carry a much fancier iMAX-B6AC V2 balance charger/discharger
[https://www.pololu.com/product/2588] that can be also used for this
1. Overview
Page 9 of 54
2. Contacting Pololu
We would be delighted to hear from you about your experiences with the Zumo 32U4 robot. If you need technical
support or have any feedback you would like to share, you can contact us [https://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!
2. Contacting Pololu
Page 10 of 54
LEDs
The Zumo 32U4 has eight indicator LEDs.
A yellow user LED is connected to Arduino digital pin 13, or PC7. You can drive this pin high in a user
program to turn this LED on. The Zumos A-Star 32U4 Bootloader [https://www.pololu.com/docs/0J61/9] fades
this LED on and off while it is waiting for a sketch to be loaded.
A green user LED is connected to PD5 and lights when the pin is driven low. While the board is running
the A-Star 32U4 Bootloader or a program compiled in the Arduino environment, it will flash this LED
when it is transmitting data via the USB connection.
A red user LED is connected to Arduino pin 17, or PB0, and lights when the pin is driven low. While
the board is running the A-Star 32U4 Bootloader or a program compiled in the Arduino environment, it will
flash this LED when it is receiving data via the USB connection.
Page 11 of 54
The Zumo32U4 library [https://www.pololu.com/docs/0J63/6] contains functions that make it easier to control the
three user LEDs. All three user LED control lines are also LCD data lines, so you will see them flicker when you
update the LCD. The green and red user LEDs also share I/O lines with pushbuttons (see below).
Two red LEDs on the left and right edges of the board indicate when the robots infrared emitters are
active on the corresponding side.
Two blue power LEDs under the rear corners of the main board indicate when the robot is receiving
power from batteries (the power switch must be turned on). The left LED is connected to the reverseprotected and switched battery voltage (VBAT), while the right LED is connected to the output of the main
boards 5 V regulator.
The left blue LED will become noticeably dimmer as the total battery voltage drops below about
3 V, and this can serve as an indication that a set of alkaline batteries has reached the end of
its useful life. However, rechargeable batteries can be damaged by overdischarge, so we do not
recommend allowing a set of four NiMH cells to discharge to this point. (A voltage divider is
connected to analog pin 1 and can be used to monitor the battery voltage; see Section 3.8 for
details.)
A green power LED under the center rear edge of the main board indicates when the USB bus voltage
(VBUS) is present.
Pushbuttons
The Zumo 32U4 has four pushbuttons: a reset button on the right edge and three user pushbuttons located
along the rear edge of the main board. The user pushbuttons, labeled A, B, and C, are on Arduino pin 14 (PB3),
PD5, and Arduino pin 17 (PB0), respectively. Pressing one of these buttons pulls the associated I/O pin to ground
through a resistor.
The three buttons I/O lines are also used for other purposes: pin 14 is MISO on the SPI interface, PD5 and pin
17 control the green and red user LEDs, and all three pins are LCD data lines. Although these uses require the
pins to be driven by the AVR (or SPI slave devices in the case of MISO), resistors in the button circuits ensure
that the Zumo will not be damaged even if the corresponding buttons are pressed at the same time, nor will SPI
or LCD communications be disrupted. The functions in the Zumo32U4 library [https://www.pololu.com/docs/0J63/6]
take care of configuring the pins, reading and debouncing the buttons, and restoring the pins to their original
states.
LCD
The Zumo 32U4 has a 27 header where you can connect the included 82 character LCD
[https://www.pololu.com/product/356] (or any other LCD with the common HD44780 parallel interface
[https://www.pololu.com/file/download/DMC50448N-AAE-AD.pdf?file_id=0J71] (109k pdf)). You can adjust the LCD
contrast with the potentiometer to the left of the LCD connector. We recommend using a 2 mm slotted
screwdriver to adjust the contrast.
The Zumo32U4 library [https://www.pololu.com/docs/0J63/6] provides functions to display data on a connected
LCD. It is designed to gracefully handle alternate use of the LCD data lines by only changing pin states when
needed for an LCD command, after which it will restore them to their previous states. This allows the LCD data
lines to be used for other functions (such as pushbutton inputs and LED drivers).
Page 12 of 54
Buzzer
The buzzer on the Zumo 32U4 can be used to generate simple sounds and music. By default, it is connected
to digital pin 6 (which also serves as OC4D, a hardware PWM output from the AVRs 10-bit Timer4). If you
alternate between driving the buzzer pin high and low at a given frequency, the buzzer will produce sound at that
frequency. You can play notes and music with the buzzer using functions in the Zumo32U4Buzzer library. If you
want to use pin 6 for an alternate purpose, you can disconnect the buzzer circuit by cutting the surface-mount
jumper next to the buzzer.
3.3. Motors
Two on-board Texas Instruments DRV8838 motor drivers power the Zumo 32U4s two micro metal gearmotors.
Four Arduino pins are used to control the drivers:
Digital pin 15, or PB1, controls the right motor direction (LOW drives the motor forward, HIGH
drives it in reverse).
Digital pin 16, or PB2, controls the left motor direction.
Digital pin 9, or PB5, controls the right motor speed with PWM (pulse width modulation) generated
by the ATmega32U4s Timer1.
Digital pin 10, or PB6, controls the left motor speed with PWM.
For more information about the drivers, see the DRV8838 datasheet [https://www.pololu.com/file/download/
drv8838.pdf?file_id=0J806] (1MB pdf). We also sell a carrier board [https://www.pololu.com/product/2990] for this
driver.
The Zumo32U4 library [https://www.pololu.com/docs/0J63/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.
As your batteries run out, the voltage supplied to the motor drivers (VBAT) will decrease, which
will make the motors slower. It is possible to account for this in your code by monitoring the
battery voltage (see Section 3.8) or using the encoders and other sensors to monitor the movement
of the robot.
Page 13 of 54
Page 14 of 54
The XORed signal and the channel B signal can be used to reconstruct the channel A signal by simply XORing
them again: (A XOR B) XOR B = A. For both encoders, channel A leads channel B when the motor is rotating
in the forward direction; that is, A rises before B rises and A falls before B falls. (The waveforms in the diagram
above would be produced by forward rotation.)
The Zumo 32U4 library [https://www.pololu.com/docs/0J63/6] provides appropriate interrupt service routines and
functions for reading the encoders and keeping track of their counts.
Page 15 of 54
Pin assignments
By default, the front sensor array supports these pin assignments:
Page 16 of 54
Page 17 of 54
left-side LEDs are selected. (When A1 is an input, it can be used to read the battery voltage.) The brightness of
the emitters can be controlled by adjusting the duty cycle of the PWM signal on pin 5.
Our example code operates the proximity sensors by transmitting pulses on both the left and right LEDs at six
different brightness levels. For each sensor, it generates two numbers: the number of brightness levels for the
left LEDs that activated the sensor, and the number of brightness levels for the right LEDs that activated the
sensor. A higher reading corresponds to more IR light getting reflected to the sensor, which is influenced by the
size, reflectivity, proximity, and location of nearby objects. However, the presence of other sources of 38 kHz IR
pulses (e.g. from another robot) can also affect the readings.
You can also just read the proximity sensors without turning on any LEDs. This could allow the Zumo to detect
the IR proximity sensors of other robots, or to detect commands from a typical IR remote.
The Zumo 32U4 comes with two types of through-hole IR LEDs that can be installed to serve as the forward
emitters. Both types of LEDs use the T-1 3/4 package, meaning they have a diameter of approximately 5 mm.
Also, they both emit 940 nm light. The main difference between these LEDs is their viewing angle. The bluecolored LEDs have a relatively narrow viewing angle of 20, which makes them better at illuminating objects far
away. The clear LEDs have a much wider 50 viewing angle, which makes them better at illuminating objects
that are not directly in front of the Zumo. The choice of IR LEDs to use is one way for you to customize your
Zumo.
Shielding
Proper shielding for the forward LEDs is important; without shielding, light from the LEDs can activate the
proximity sensors directly and cause false readings. You can test to see if your shielding is good by putting your
Zumo on a black surface with no objects nearby, and making sure that you get a reading of 0 for all the proximity
sensors.
The Zumo 32U4 comes with black heat shrink that can be used for shielding as shown in the picture below:
Page 18 of 54
IR LED holder
We
designed
3D-printable IR LED holder [https://www.pololu.com/file/download/zumo-32u4-ir-led(65k stl) that mounts to the Zumo 32U4 blade. The LED holder can be screwed to the
blade, and serves to shield the LEDs while also holding them in place and helping to protect them from collisions
with other robots. If you use the holder, then you do not need to worry about using heat shrink. We recommend
printing the holder with a material that does not reflect 940 nm infrared light. If you have access to a 3D printer,
you might be able to print it yourself. Alternatively, you can use a 3D-printing service such as Shapeways
[https://www.shapeways.com/].
holder.stl?file_id=0J861]
The Zumo 32U4 robot kit comes with two extra 3/16 #2-56 screws and matching nuts that can be used to mount
the LED holder to the blade. Depending on how you printed the holder, you might notice that tightening the
screws affects how the angle of the LEDs. A tight screw can make the left LED point a little to the left and make
the right LED point a little to the right, instead of pointing straight forward.
Page 19 of 54
Bending the LED leads and inserting them into the machine pin sockets can be difficult. In the picture above,
we oriented the LED so that the cathode was directly above the anode. The cathode lead was cut to a length of
1.4 cm, and the anode lead was cut to a length of 1.1 cm. However, it might be easier to have longer leads and
make them travel upwards above the LED before coming down to the LED socket. (The cathode is the shorter
lead on an uncut LED, and it connects to the front-most hole of LED socket on the main board.)
recommend
Page 20 of 54
3.8. Power
The Zumo chassis has an internal compartment for four AA batteries. We recommend using rechargeable AA
NiMH cells [https://www.pololu.com/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 6 V.
The negative battery voltage is connected to GND. The positive battery voltage is designated VB. VB feeds into
a circuit that provides reverse protection and power switching controlled by the on-board power switch. The
output of this circuit is designated VBAT.
VBAT provides power to the motors through the DRV8838 motor drivers, so the motors can only operate if the
batteries are installed and the power switch is in the On position.
The battery voltage on VBAT can be monitored through a voltage divider that is connected to analog pin 1
(PF6) by default. The divider outputs a voltage that is equal to one half of the battery voltage, which will be
safely below the ATmega32U4s maximum analog input voltage of 5 V as long as the battery voltage is less than
10 V. The readBatteryMillivolts() function in the Zumo32U4 library [https://www.pololu.com/docs/0J63/6] can
be used to determine the battery voltage from this reading. The surface-mount jumper labeled A1 = VBAT/2
can be cut to disconnect the voltage divider and free the pin for other uses.
Page 21 of 54
5V regulator
VBAT supplies power to a 5V regulator based on the TPS63061 switching step-up/step-down (buck-boost)
converter from Texas Instruments. The regulator works with a 2.7 V to 11.8 V input voltage and has a typical
efficiency of 80% to 90% for most combinations of input voltage and load. (We also make a standalone
regulator [https://www.pololu.com/product/2119] based on this integrated circuit.) The 5V output of this regulator is
designated VREG.
The regulator can be disabled by driving the regulator shutdown pin, SHDN, high.
Power selection
The Zumo 32U4 main boards power selection circuit uses the TPS2113A power multiplexer
[https://www.pololu.com/product/2596] from Texas Instruments to choose whether its 5 V logic supply (designated
5V) is sourced from USB or the batteries via the regulator, enabling the robot to safely and seamlessly transition
between the two sources. The TPS2113A is configured to select regulated battery power (VREG) unless the
regulator output falls below about 4.5 V. If this happens, it will select the higher of the two sources, which will
typically be the USB 5 V bus voltage if the Zumo is connected to USB.
Consequently, when the Zumo 32U4 is connected to a computer via USB, it will receive 5 V logic power even
when the power switch is off. This can be useful if you want to upload or test a program without drawing power
from the batteries and without operating the motors. It is safe to have USB connected and battery power switched
on at the same time.
The currently selected source is indicated by the STAT pin; this pin is an open-drain output that is low
if the batteries are selected and high-impedance if the USB supply is selected. The current limit of the
TPS2113A is set to about 1.9 A. For more information about the power multiplexer, see the TPS2113A
datasheet [https://www.pololu.com/file/download/tps2113a.pdf?file_id=0J771] (1MB pdf).
3.3V regulator
The main board also has 3.3 V linear regulator. The inertial sensors draw power from the 3.3 V line; the
remainder (up to a few hundred milliamps) is available for powering external circuits or devices.
Page 22 of 54
Page 23 of 54
These
diagrams
are
also
Page 24 of 54
The Note/alternate functions column documents other features of the pin, although some of those features
might be impractical to use.
Page 25 of 54
ATmega32U4 Arduino
pin name
pin names
Notes/alternate functions
PB7
11
PF7
A0, 18
PF5
A2, 20
Line sensor 2
Analog input (ADC5)
Left proximity sensor
JTAG test mode select (TMS)
(function selected by jumper)
PF4
A3, 21
PD4
4, A6, 24
Line sensor 4
Analog input (ADC8)
Right proximity sensor output
Timer1 input capture pin (ICP1)
(function selected by jumper)
PD6
PF1
A4, 22
PC6
PF6
A1, 19
PD2
PD3
PB3
14, MISO
User pushbutton A
LCD data line DB4
PB0
17, SS
PC7
13
Yellow LED
LCD data line DB6
PD5
PD7
6, A7, 25
Buzzer PWM
Page 26 of 54
ATmega32U4 Arduino
pin name
pin names
Notes/alternate functions
PB6
PB2
16, MOSI
PB5
9, A9, 27
PB1
15, SCK
PB4
8, A8, 26
PE2
PE6
PF0
A5, 23
PD0
3, SCL
PD1
2, SDA
RESET
Reset pushbutton
AREF
Analog reference
Page 27 of 54
If you are not using line sensor 2 or the left proximity sensor, then you can remove the sensor-selection jumper
for pin 20 on the front sensor array. This frees up pin 20 (PF5) for other purposes. This pin can be used for digital
input and output, as well as analog input.
If you are not using line sensor 4 or the right proximity sensor, then you can remove the sensor-selection jumper
for pin 4 on the front sensor array. This frees up pin 4 (PD4) for other purposes. This pin can be used for digital
input and output, as well as analog input.
If you are not using any of the sensors on the front sensor array, you can remove the front sensor array. This
frees up 7 pins: pin 11 (PB7), pin 18 (PF7), pin 20 (PF5), pin 21 (PF4), pin 4 (PD4), pin 12 (PD6), and pin 22
(PF1). Each pin can be used for digital input and output, while 6 of them (all except pin 11) can be used as analog
inputs.
If you are not using the proximity sensors, you probably will not want to use the IR LEDs on the main board, so
that frees up pin 5 (PC6), which can be used for digital I/O or PWM output. That also frees up Timer3.
If you are not using the proximity sensors and you also do not need the AVR to be able to measure the battery
voltage, you can use pin 19 (A1, PF6) for other purposes. This pin can be used for digital input and output, as
well as analog input. If you want to use this pin as a digital or analog input, you might need to cut the surfacemount jumper labeled A1 = VBAT / 2 in order to disconnect it from the VBAT voltage divider. If you only
want to use A1 as an output, you might not need to cut that jumper.
If you do not need the LCD, you can remove it. This frees up pin 0 (PD2) and pin 1 (PD3). These pins are
the transmit (TX) and receive (RX) pins of the UART, so you can use them to establish serial communication
with another microcontroller. These pins are also capable of digital I/O. These pins are the recommended pins
for connecting two output channels from an RC receiver, or for controlling two RC servos, because they are
arranged in a convenient way with respect to power and ground on the right-side expansion header.
If you have removed the LCD and do not need to use button A, this frees up pin 14 (PB3). Pin 14 is is capable
of digital input and output.
Removing the LCD frees up the LCD contrast potentiometer for other purposes. The output of the potentiometer
is a 0 V to 5 V signal which is accessible on the LCD connector. It can be connected to any free analog input if
you want to read it from the AVR, or it might be useful to connect it to the other electronics that you are adding.
If you do not need to use the buzzer, you can cut the surface-mount jumper labeled 6 = Buzzer. This
disconnects pin 6 (PD7) from the buzzer, so it can be used for other things. Pin 6 (PD7) can be used as a PWM
output, digital I/O line, or analog input. Disabling the buzzer also frees up Timer4, which has several PWM
output pins. These pins can be used as PWM outputs if they are not needed for their normal tasks.
Be careful about connecting electronics to pin 13 (PC7), pin 17 (PB0), and PD5. These pins are used to control
the LEDs on the Zumo 32U4. All three of these pins are controlled as outputs by the bootloader. Pin 17 (PB0)
and PD5 are used as RX and TX indicators, so if you are sending or receiving data over USB then the Arduino
USB code will drive those pins in its interrupt service routines while your sketch is running.
It should be possible to attach additional IC slave devices to the Zumo 32U4s IC bus without giving up any
features as long as the additional devices slave addresses do not conflict with those of the inertial sensors. The
LSM303D uses 7-bit address 0011101, while the L3GD20H uses 7-bit address 1101011. The IC pins (pins 2 and
3) operate at 5 V, so level shifters might be necessary to interface with other devices that use different voltages.
(The level-shifted 3.3 V signals used by the inertial sensors are not available to the user.)
Page 28 of 54
If you do not want to use the inertial sensors on the Zumo 32U4s IC bus, you can cut the surface-mount jumpers
labeled 2 = SDA and 3 = SCL. This frees up pin 2 (PD1) and pin 3 (PD0). These pins can be used as digital
inputs and outputs.
Power
All of the Zumos power nodes are accessible from the left expansion area. If you power additional devices from
VBAT, then they will be powered whenever the Zumos power switch is in the ON position, and they will receive
whatever voltage the batteries are outputting. If you power them from VREG, they will get 5 V power whenever
the batteries are installed and the power switch is on (but they cannot be powered from USB). If you power them
from the 5V pin, then they will receive 5V power whenever the Zumo 32U4 logic components are powered.
If you power them from 3V3, they will receive 3.3V power whenever the Zumo 32U4 logic components are
powered. For more information about these power nodes and how much current they can provide, see Section
3.8.
It is also possible to add your own power switch to control power to the Zumo, as described in Section 3.8.
Ground
You should make sure that all the grounds in your system are connected. The Zumo 32U4s ground node is
labeled GND and can be accessed from any of the expansion areas. It should be connected to the ground node
of every other circuit board or device you add to the robot.
Page 29 of 54
Dimension diagram
A dimension diagram will be added shortly.
Page 30 of 54
Page 31 of 54
While it is still possible to solder all of these parts after the main board has been mounted on the chassis,
soldering them beforehand is easier and avoids the risk of inadvertently melting the chassis with your soldering
iron.
Motors
4. 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.
5. Solder a pair of leads to each motor, paying attention to the way the motor will eventually be oriented
in the chassis (see below). 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 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 motors positive terminal is indicated by a plus sign (+) in the black plastic end of the motor. The
motors should be soldered into the main board with the positive terminal closest to the front, so you should
attach the leads to allow the motors to be oriented this way. (However, dont worry if you accidentally get the
Page 32 of 54
orientation of one or both motors wrong. You can later correct for it in software with our Zumo 32U4 libraries
[https://www.pololu.com/docs/0J63/6].)
6. Press a magnetic encoder disc onto the motor shaft of each motor so that the end of the shaft is flush
with the back of the disc. One easy way to accomplish this is to press the motor onto the disc while the disc
is sitting on a flat surface, pushing until the shaft makes contact with that surface.
Chassis
7. 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.
Page 33 of 54
8. Cover the chassis and motors with the main board. The motor leads should be inserted into the through
holes next to the motor drivers.
Page 34 of 54
9. Screw the main board to the chassis: we recommend using four screws in the holes closest to the corners
of the board. In each of the four mounting holes, insert a #2-56 machine screw through the main board and
chassis, and tighten it against a nut under the chassis. It is usually easier to place the nut into the recess first
and hold it there with a finger or piece of tape while inserting the screw.
Page 35 of 54
Note that the kit includes two different sizes of #2-56 machine screws: 3/16 and 1/4. The two longer screws
are intended for use in the front holes (near the motors) so that the additional thickness of a sumo blade can be
accommodated. While you can add the blade before screwing the robot together for the first time, we suggest
waiting until after you have soldered in the 212 connector for the front sensor array so that you have more room
to work.
10. Solder each motor lead to the main board, then trim off the excess length of wire.
Page 36 of 54
11. Solder the 212 female header (front sensor array connector) to the bottom of the front expansion area
on the main board. It should be flush with the chassis.
Page 37 of 54
Battery contacts
12. Turn the chassis over and install the battery terminal contacts as shown in the pictures below. The three
double-contact pieces should be firmly pressed into place until they are flush with the interior surface of the
battery compartment. The two individual contacts should be inserted into the battery compartment so that
their solder tabs protrude through the holes in the top of the chassis; you might want to temporarily tape or
clamp these two individual contacts in place until they have been soldered to the main board as described
in the next step, or you can use a battery to temporarily hold them in place.
Page 38 of 54
Page 39 of 54
13. Solder the two individual contacts to the main board from the top. Note that if you are using a battery
to hold the contact in place during soldering, 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.
Page 40 of 54
15. 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.
16. 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.
17. 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. Note: Be careful if you use threadlocking adhesives like
Loctite as these can corrode the chassis. You should first test any such adhesives on a concealed part of the
chassis to ensure they will not damage it.
18. Install the silicone tracks by stretching them around the sprockets on each side of the chassis.
Page 41 of 54
Blade
19. Bend the blades mounting tabs to the appropriate angle (about 75 degrees from their original straight
position).
20. Remove the two 1/4 screws attaching the front of the main board to the chassis.
21. Place the blades mounting tabs on top of the main board so that the holes line up with the two front
mounting holes and the two screws through the blade, main board, and chassis. Replace the nuts underneath
the chassis and tighten the screws.
Page 42 of 54
LCD
22. Solder the 27 low-profile male header to the bottom of the LCD.
Page 43 of 54
23. Plug the LCD into the matching female header on top of the main board; the display should cover the
buzzer.
Page 44 of 54
Page 45 of 54
26. On each 13 header, install a shorting block to connect the sensor of your choice. (See Section 3.5 for
details.)
27. Plug the sensor array into the matching female header on the bottom of the main board.
Page 46 of 54
Forward emitters
28. Choose a pair of through-hole infrared LEDs to use as the forward emitters. (See Section 3.6 for
details about the different LEDs included with the Zumo 32U4.)
Page 47 of 54
29. Use a pair of long-nose pliers to bend the LED leads to approximately match the shapes pictured,
making sure that each LEDs anode (the longer lead that ends in the smaller post inside the case of the LED)
is toward the rear.
30. Trim the excess length from the leads and insert the LEDs into the machine pin sockets in the front of
the main board.
Page 48 of 54
33. Slip one of these pieces of heat shrink tubing, square end first, over each forward emitter LED so that
it extends past the case of the LED. The diagonal opening of each tube should face forward and upward so
that the longer side of the shroud blocks infrared light from hitting the floor.
Batteries
34. Install four new or freshly charged AA batteries in the battery compartment. (We recommend using
rechargeable AA NiMH cells [https://www.pololu.com/product/1003].)
35. Replace the battery compartment cover.
Page 49 of 54
Page 50 of 54
The assembly of your Zumo 32U4 robot is now complete, and it is ready to be programmed and run!
Page 51 of 54
Page 52 of 54
Page 53 of 54
7. Related resources
Datasheets for some of the components found on the Zumo 32U4 are available below:
ATmega32U4 documentation [http://www.atmel.com/devices/atmega32u4.aspx]
Texas
Instruments DRV8838
(1MB pdf)
motor
driver
datasheet
[https://www.pololu.com/file/download/
drv8838.pdf?file_id=0J806]
[https://www.pololu.com/file/download/
Vishay
[https://www.pololu.com/file/download/
TSSP77038 IR receiver
(268k pdf)
module
datasheet
tssp77038.pdf?file_id=0J615]
[https://www.pololu.com/file/download/
[https://www.pololu.com/file/download/
7. Related resources
Page 54 of 54