The middle-left LED and the front-left LED are in series, so you must install the front-left LED
in order to use the middle-left LED, and you cannot turn on one without turning on the other.
Similarly, the middle-right and front-right IR emitters are in series.
Two AVR pins are used to control the LEDs: pin 5 (OC3A) is the proximity LED PWM pin, and must be driven
high to turn on any of the LEDs. Pin A1 (19) is the proximity LED selection pin, and must be driven high or
low to select which set of LEDs to turn on. If A1 is high, the right-side LEDs are selected. If A1 is low, the
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.
Forward LED selection
The
kit version
of 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 blue-colored 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.
The
assembled versions
of the Zumo 32U4 robot ship with clear (wide-angle) LEDs installed; blue (narrow-
angle) LEDs are not included with these versions.
Pololu Zumo 32U4 Robot User’s Guide
© 2001–2015 Pololu Corporation
3. The Zumo 32U4 in detail
Page 19 of 76