
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 (
Section 6
) uses the motors and the
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
LSM303D
[https://www.pololu.com/product/2127]
compass module, combines a
3-axis accelerometer and 3-axis magnetometer into a single package. The second chip is an ST
L3GD20H
[https://www.pololu.com/product/2129]
3-axis gyroscope. Both sensor chips share an I²C bus connected to the
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
reading
the
LSM303D
datasheet
[https://www.pololu.com/file/download/
LSM303D.pdf?file_id=0J703]
(1MB
pdf)
and
L3GD20H
datasheet
[https://www.pololu.com/file/download/
L3GD20H.pdf?file_id=0J731]
(3MB pdf) to understand how these sensors work and how to use them.
Using the sensors
The
Zumo32U4 library
[https://www.pololu.com/docs/0J63/6]
includes functions that make it easier to work with
the sensors, as well as some example programs that demonstrate how to use them. (The software interface is
identical to those of our
LSM303 Arduino library
[https://github.com/pololu/lsm303-arduino]
and
L3G Arduino
library
[https://github.com/pololu/l3g-arduino]
.)
Pololu Zumo 32U4 Robot User’s Guide
© 2001–2015 Pololu Corporation
3. The Zumo 32U4 in detail
Page 21 of 76
Содержание Zumo 32U4
Страница 6: ...Pololu Zumo 32U4 Robot User s Guide 2001 2015 Pololu Corporation 1 Overview Page 6 of 76 ...
Страница 7: ...Pololu Zumo 32U4 Robot User s Guide 2001 2015 Pololu Corporation 1 Overview Page 7 of 76 ...
Страница 42: ...Pololu Zumo 32U4 Robot User s Guide 2001 2015 Pololu Corporation 4 Assembling the Zumo 32U4 kit Page 42 of 76 ...
Страница 58: ...Pololu Zumo 32U4 Robot User s Guide 2001 2015 Pololu Corporation 4 Assembling the Zumo 32U4 kit Page 58 of 76 ...