Pololu Zumo 32U4 Robot User's Guide
Proximity sensor performance
The proximity sensors have no particular minimum sensing distance; they can sense an object that is close to the
Zumo as long as the shape of that object allows some light from the LEDs to be reflected into the sensor.
The maximum sensing distance depends on the size and reflectivity of the object you are sensing. We did several
tests of the front proximity sensors to see how well they could see the steel blade of another Zumo while both
robots were on the black surface of a sumo ring. In these tests, we found that the maximum sensing distance was
around 30 cm to 40 cm.
There is a significant dead spot between the sensing regions of the front sensor and each side sensor. Therefore,
if the Zumo senses an object with the left or right sensors and then turns to face it, there will probably be a period
of time where none of the sensors can see the object.
Facing towards an object
The FaceTowardsOpponent demo found in the Zumo 32U4 Arduino library
front proximity sensor to scan for nearby objects, face directly towards them, and track them if they move. To
directly face an object, it compares the two readings from the front sensor: the number of brightness levels for
the left LEDs that resulted in the sensor activating, and the number of brightness levels for the right LEDs that
resulted in the sensor activating. If the left reading is greater than the right reading, it means the object is closer
to the left LEDs, so the robot should turn left (counter-clockwise) to face it more directly. Similarly, if the right
reading is greater than the left reading, the robot should turn right (clockwise). If both of the readings are below
a certain threshold, then it just turns the motors in order to scan for nearby objects.
This could be a good starting point for a sumo robot that uses the front sensors to locate its opponent.
3.7. Inertial sensors
The Zumo 32U4 includes on-board inertial sensors that can be used in advanced applications, such as helping
your Zumo detect collisions and determine its own orientation by implementing an inertial measurement
unit (IMU). The first chip, an ST
3-axis accelerometer and 3-axis magnetometer into a single package. The second chip is an ST
[https://www.pololu.com/product/2129]
ATmega32U4's I²C interface.
Level shifters built into the main board allow the inertial sensors, which operate at 3.3 V, to be connected to the
ATmega32U4 (operating at 5 V). The sensors, level shifters, and I²C pull-up resistors are connected to the SDA
(digital pin 2, or PD1) and SCL (digital pin 3, or PD0) pins on the AVR by default, but they can be disconnected
by cutting the surface-mount jumpers labeled "2 = SDA" and "3 = SCL" on the board to allow those pins to be
used for other purposes.
We
recommend
carefully
LSM303D.pdf?file_id=0J703]
L3GD20H.pdf?file_id=0J731]
Using the sensors
The
Zumo32U4 library
the sensors, as well as some example programs that demonstrate how to use them. (The software interface is
identical to those of our
library
[https://github.com/pololu/l3g-arduino]
3. The Zumo 32U4 in detail
LSM303D
[https://www.pololu.com/product/2127]
3-axis gyroscope. Both sensor chips share an I²C bus connected to the
reading
the
(1MB
pdf)
and
(3MB pdf) to understand how these sensors work and how to use them.
[https://www.pololu.com/docs/0J63/6]
LSM303 Arduino library
.)
LSM303D
datasheet
L3GD20H
datasheet
includes functions that make it easier to work with
[https://github.com/pololu/lsm303-arduino]
© 2001–2015 Pololu Corporation
(Section
6) uses the motors and the
compass module, combines a
L3GD20H
[https://www.pololu.com/file/download/
[https://www.pololu.com/file/download/
and
L3G Arduino
Page 21 of 76
Need help?
Do you have a question about the Zumo 32U4 and is the answer not in the manual?