Monday, January 8, 2024

New 10 Hz Marine Compass (Part1 - Hardware)

This is a revised design of a small tilt-compensated compass previously described  in this blog (the compass was based on the Pololu LSM303D carrier board that has been discontinued).

The new design uses separate Pololu carrier boards for the LIS3MDL magnetometer and for the LSM6DSO accelerometer. Pololu also sells a carrier board combining the 2 chips, but the board does not expose all the SPI and interrupt pins that I use in my implementation.

The 2 carrier boards are hard-wired to an Arduino Pro Mini 328 - 3.3V/8MHz from Sparkfun.




                    



With the LIS3MDL magnetometer, it is now possible to get an output data rate of 10 Hz in the highest performance mode. The previous LSM303D magnetometer was limited to 6.5 Hz in its high performance mode.

Here is the wiring diagram for SPI communication. The FTDI breakout is used to program the Pro Mini and to read the magnetometer and accelerometer raw data during the calibration step.


The long ribbon cable is required during calibration so that the compass can be moved around at a safe distance from the breakout and the laptop to avoid magnetic interference. After calibration, the ribbon cable is used to power the compass (3.3V) and to transmit the tilt-compensated heading and the heel angle through the serial link to whatever instrument that needs it.


1 comment:

  1. Very cool setup! Did you post your progress anywhere? I’m curious about your software and the calibration. Hope to hear/ read from you.

    ReplyDelete