Connecting the Duinotech 3-Axis Compass to an Arduino
The Duinotech 3-Axis Compass Magnetometer Module (Part Number: XC-4496 — see Figure 1) can be purchased from Jaycar Electronics.
Unfortunately, the module comes with no instructions and very brief specifications:
- Operating Voltage: 5VDC (or 3.3 VDC)
- Resolution: 12 bits
- Interface: I2C
- Includes: 5V to 3.3V level shifter (so you can operate it from 5 VDC)
- Dimensions: 20(L) x 16(W) x 5(H) mm
I first wrote about this module in 2015, back when blogger was still a thing. Based on the HMC5883L printed on the PCB (Figure 2), it didn’t take Einstein to work out that this breakout board was based on the 3-Axis Digital Compass IC produced by Honeywell.
The HMC5883L Data Sheet is very comprehensive and explains everything that you need to interface the chip to an Arduino via I2C. The Duinotech module is similar to the one produced by SparkFun. It is in fact an improvement on the SparkFun version in that it can be driven from 5VDC and the interrupt line is also broken out.