![Pololu Zumo Shield For Arduino Скачать руководство пользователя страница 37](http://html1.mh-extra.com/html/pololu/zumo-shield-for-arduino/zumo-shield-for-arduino_user-manual_1574974037.webp)
All versions of the Zumo Shield have a compass module that combines a 3-axis accelerometer
and 3-axis magnetometer into a single package with an I²C interface. This chip is an
[https://www.pololu.com/product/2127]
on the v1.2 shield or an
[https://www.pololu.com/product/
on the original Zumo Shield.
The
v1.2 version
of the Zumo Shield also adds an
[https://www.pololu.com/product/2129]
3-axis
gyroscope on the same I²C bus.
We recommend carefully reading the
[https://www.pololu.com/file/0J703/LSM303D.pdf]
(1MB pdf),
[https://www.pololu.com/file/0J731/L3GD20H.pdf]
(3MB pdf), and/or
[https://www.pololu.com/file/0J564/LSM303DLHC.pdf]
(629k pdf) to understand
how these sensors work and how to use them.
Using the sensors
Level shifters built into the shield allow the inertial sensors, which operate at 3.3 V, to be connected
to the 5 V logic level pins of the Arduino. The sensors, level shifters, and I²C pull-up resistors are
connected to the SCL and SDA pins on the Zumo Shield by default, but they can be disconnected
by cutting traces to allow those pins to be used for other purposes. It is necessary to make some
additional connections on the shield if you want to use the compass with an older Arduino without
separate SCL and SDA pins; please see
for more details about the compass connections.
We have written a basic
[https://github.com/pololu/lsm303-arduino]
and
[https://github.com/pololu/l3g-arduino]
(included with the
[https://www.pololu.com/docs/0J57/6]
) that makes it easier to interface the sensors with an Arduino, as
well as an
[https://www.pololu.com/docs/0J57/7.f]
that demonstrates how to use the
magnetometer to help the Zumo coordinate its turns.
In addition, the combination of accelerometer, magnetometer, and gyro on the v1.2 version of the
Zumo Shield is enough to implement an inertial measurement unit (IMU); the sensor ICs are the
same as those on our
[https://www.pololu.com/product/2468]
, so Arduino software written for
the MinIMU-9 (such as our
[https://github.com/pololu/minimu-9-ahrs-arduino]
) can also be
adapted to work on an Arduino-controlled Zumo robot with a v1.2 shield.
Notes on the magnetometer
Please note that the magnetometer in the LSM303 is affected by currents in the motors and buzzer
when they are operating, as well as metal in the batteries, and the readings are easily influenced
by magnetic distortions in the environment around the Zumo (such as rebar in a concrete floor).
As a result, it is very hard to accurately determine the Zumo’s absolute heading based on the
magnetometer data. However, in our tests, we found that the magnetometer was still useful for
detecting relative orientation changes; for example, once the magnetic readings are compensated for
Pololu Zumo Shield for Arduino User’s Guide
© 2001–2019 Pololu Corporation
3. The Zumo Shield in detail
Page 37 of 52