FIGURE 14. Acroname Devantech
line running north and
south in the Central US
where a magnetic
compass will actually
point to the north and
that line has zero
‘variation.’ In the
northwest, the compass
will point a bit to the
east, and the opposite
direction in the northeast.
Boats — as well as robots — also have another magnetic
problem called ‘deviation’ that is caused by electrical fields,
ferrous materials, and magnetic items, and correcting these
problems can be as simple as carefully placing a few tiny
magnets near your compass. Nautical charts have variations
actually stated on them. Sailors and robot builders can use
the chart in Table 1 to correct for such discrepancies to
arrive at a compass or true course.
Variation and Deviation
Magnetic compass corrections involve a bit of simple
calculating that are important. When I took a few US Power
Squadron courses years ago, we used these two mnemonics
to remember the right five words for the order of the compass
correction words: “Can Dead Men Vote Twice;” and “True
Virgins Make Dull Companions.” (Hey, it worked.) Variation
in robots can be caused by electrical wires or motors
turning on and off, so proper compass placement as well
as shielding is sometimes required. Most of the time, robot
builders will never have to use these corrections.
The Acroname Devantech R351-CMPS10 compass
shown in Figure 14 is an example of a popular robot
experimenter’s course-finding module. It is affordable and
according to the website, features a three-axis
magnetometer and a three-axis accelerometer to
compensate for up to 60 degrees of tilt. Module data is
accessible via serial, I2C, and as a PWM output. In addition
to a bearing reading with 0.1º resolution, this compass
provides pitch, roll, and yaw accelerometer and
magnetometer readings. Operating from 3. 3 to 5.0 volts @
25 mA, the small 11/16” x 15/16” board outputs a serial
9600 baud, no parity, two stop bits with 3.3V to 5V signal
levels, or a SMBUS compatible at a 100 kHz clock rate.
The Parallax three-axis compass module shown in
Figure 15 has the Honeywell HMC5883L magneto-resistive
sensor circuit that utilizes three discrete sensors to measure
magnetic fields. It comes as a six-pin package with 0.1”
spacing on a 0.725” x 0.650” board that is easily mounted
on a breadboard or hardwired into a permanent circuit.
Operating from 2.7V to 6.5V, it has a resolution of one to
two degrees within a ± 8 gauss range. The communication
Sensors For Mobile Robots -— Part 2
FIGURE 15. Parallax
interface is I2C, up to 400 kHz.
As with any magnetic compass, be careful where and
how you mount the circuit as ferrous screws and brackets
can interfere with the accuracy, and actual readings may be
different than when testing the circuit on a breadboard. I
recommend the use of nylon screws and nuts; do a final
test with the circuit in the completed robot.
I’ve just touched on a few of the motion and orientation
detecting sensors that are popular with experimental
mobile robots. Needless to say, odometry via shaft encoders
on the robot’s wheels and motor shafts are an important
part of accurately determining how far and fast a robot is
moving; I decided not to include the simple encoders and
emitter/receptor pairs in the sensor section.
Next month, I will touch on some of the more unique
and less-used sensors for robots such as GPS localization, gas
detection, force, light, color, and then will end with the latest
Kinect from Microsoft (designed for Windows applications).
Many thousands of sensors are available to detect every type
of phenomena, force, position, radiation, and anything you can
imagine, and are the most important additions to any robot.
Check out the myriad of types offered by the manufacturers
advertising in this magazine to make your robot a bit more
capable in sensing the world around it. As always, I appreciate
the emails and calls concerning corrections, ideas, and
topics that you would like to see in my column. SV
Tom Carroll can be reached at TWCarroll@aol.com.
SERVO 06.2012 79