Magnetic Declination Explained to Help Your Robot or IoT Project Find ‘True North’
Excellent write-up by CoderGirl42 that explains the process to aid your robot or IoT project in finding ‘true north’ – and explains it using an incredible LEGO NXT ‘Starbot‘ (a project unto itself!) – read the full write-up here at CodeProject.
Finding your geographic location and direction is useful in robotics and embedded systems. Using GPS and a Compass Sensor it’s easy to determine your location and your direction in relation to Magnetic North. But what if you want to know you direction in relation to True North?
It’s not difficult to determine your offset from Magnetic North to True North, also known as Magnetic Declination. Magnetic Declination can be easily found on the web through a NOAA website. But I wanted a real time model that I could use in my embedded device through code, enter the World Magnetic Model (WMM)! Using GPS with the WMM in Linux can easily determine Magnetic Declination that you can then use to offset the Magnetic Bearing from your Compass. I will take you through the steps to determine Magnetic Declination and use it to adjust your compass bearing.
Adafruit Ultimate GPS Breakout – 66 channel w/10 Hz updates – Version 3: The breakout is built around the MTK3339 chipset, a no-nonsense, high-quality GPS module that can track up to 22 satellites on 66 channels, has an excellent high-sensitivity receiver (-165 dB tracking!), and a built in antenna. It can do up to 10 location updates a second for high speed, high sensitivity logging or tracking. Power usage is incredibly low, only 20 mA during navigation. Read more.
Triple-axis Magnetometer (Compass) Board – HMC5883L: We based this breakout on a popular and well loved magnetometer, the HMC5883L. This compact sensor uses I2C to communicate and its very easy to use. Since it’s a 3.3V max chip, we added circuitry to make it 5V-safe logic and power, for easy use with either 3 or 5V microcontrollers. Simply connect VCC to +3-5V and ground to ground. Then read data from the I2C clock and data pins. There’s also a Data Ready pin you can use to speed up reads (check the datasheet for details) Read more.
Stop breadboarding and soldering – start making immediately! Adafruit’s Circuit Playground is jam-packed with LEDs, sensors, buttons, alligator clip pads and more. Build projects with Circuit Playground in a few minutes with the drag-and-drop MakeCode programming site, learn computer science using the CS Discoveries class on code.org, jump into CircuitPython to learn Python and hardware together, TinyGO, or even use the Arduino IDE. Circuit Playground Express is the newest and best Circuit Playground board, with support for CircuitPython, MakeCode, and Arduino. It has a powerful processor, 10 NeoPixels, mini speaker, InfraRed receive and transmit, two buttons, a switch, 14 alligator clip pads, and lots of sensors: capacitive touch, IR proximity, temperature, light, motion and sound. A whole wide world of electronics and coding is waiting for you, and it fits in the palm of your hand.