When
connected to a terminal program through the FTDI breakout at 115200 baud, the
compass displays the results formatted as NMEA sentences. This is the default
operating mode (Mode 4 in the software).
Two
calibration helper modes are available:
Mode 1 : Accelerometer
calibration (type M1<ENTER>)
Mode 2 :
Magnetometer calibration (type M2<ENTER>)
These
calibration modes are used to produce the raw data files required by the
calibration software Magneto. In these modes, the compass stops displaying
results until it receives an ‘x’ character (type x<ENTER> in the terminal
program).
In
Mode 1 (Accelerometer), it will then displays 64 consecutive (x,y,z) filtered raw
data (at the 200 Hz rate), then pauses until it receives another ‘x’ character.
In
Mode 2 (Magnetometer), it will displays 16 consecutive (x,y,z) raw data (at the
6.5 Hz rate), then pauses until it receives another ‘x’ character.
By
logging the results to a text file in the terminal program, it is then possible
to create the Magneto input files, by moving the compass around and pressing
the ‘x’ character at each new position.
I
recommend moving the compass with roughly equal angle steps around three
perpendicular axis. For the accelerometer, you can use any support (metallic or
not) to help position the compass, but it is very important to wait until the
compass is completely at rest (no vibration) before hitting the ‘x’ character.
For
the magnetometer, try to use the lightest non-magnetic support (wood or plastic),
and use the ribbon cable to keep away the FTDI brekout and especially the
laptop (all this in a magnetic clean environment!).
The
2 raw data files can then be processed by the Magneto software. The Pro Mini source
file can then be edited with the new values and recompiled.
Unfortunately,
this is not the end of the game if we want to be rigorous. We will have to look
for misalignments between three independent reference frames: the compass base,
the accelerometer plan and the magnetometer plan, with a final offset correction
when compared to a known heading.
But
the compass should already be quite usable, as these last corrections will be quite
small compared to what has been accomplished.
A low-cost marine compass (Part 1 - Hardware)
A low-cost marine compass (Part 2 - Software)
A low-cost marine compass (Part 1 - Hardware)
A low-cost marine compass (Part 2 - Software)
No comments:
Post a Comment