Arduino Digital Magnetic Compass – HMC5883L




Today I will show you how to make your own arduino compass by using the MHC5883L 3-axis digital compass board.

Before you start, make sure that you have:

  • Arduino uno
  • HMC5883L sensor board
  • Nokia 5110 display (pcb version)
  • 2x push-button
  • 1x on/off switch

Arduino Digital Magnetic Compass – HMC5883L




(you can use breadboard to build it easier)

I prefer to build my own arduino based circuit by using the ATmega328p uno possessor, but this is optional for you. Buttons are used for turn on or off display leds and to change display mode of compass.

Watch video on YouTube: youtu.be/i7GaVqMSzMA (make sure to click like button 😉 )

www.ardumotive.com find Greek Arduino Projects

Step 1: About HMC5883L board

The HMC5883L sensor is a 3-axis digital magnetometer IC designed for low-field magnetic sensing. The sensor has a full-scale range of +8 to -8 Gauss and a resolution of up to 5 milli-Gauss. Communication with the HMC5883L is simple and all done through an I2C interface. That means you will need to connect power, ground and only two cables to Arduino uno board (SDA,SCL).

The HMC5883L board can be powered up by 5V or 3.3V pins of Arduino uno board. No need to add any capacitors or resistors to your circuit.

Pinout and connection with uno:

  • Vcc to 5V or 3.3V
  • GND to GND
  • SDA to A4
  • SCL to A5
  • DRDY to nothing…

Because this is a magnetic compass if you put it near to battery, motors, metallic surface or magnetic field, the result will diverge from the actual. Also make sure to use it on a flat surface!

Step 2: Breadboard schematic circuit

Here is the circuit on breadboard schematic. Make sure to read “pinout” notes on image and connect lcd and sensor correct with arduino uno.

 

For more detail: Arduino Digital Magnetic Compass – HMC5883L




This Post / Project can also be found using search terms:

  • hmc5883l for arduino uno coding
  • projects using HMC5883L
  • arduino digital magnetic compass
  • Arduino Digital Magnetic Compass (HMC5883L
Clip to Evernote

Leave a Comment

(Spamcheck Enabled)

Read previous post:
Smallsword Choreography Shirt usnig arduino

Stage combat is the art of theatrical violence.  Rather than resembling fencing, stage combat is choreographed like dance for aesthetic...

Close
Scroll to top