Tag: GY-271

2 articles found.

IoT Digital Compass with Raspberry Pi 5 - Proteus Simulation

IoT Digital Compass with Raspberry Pi 5 - Proteus Simulation: the Raspberry Pi 5, the GY-271 magnetometer and the 2.4-inch TFT with the compass card

Hello friends, I hope you all are doing great. Today, I am going to share the IoT Digital Compass with Raspberry Pi 5 - Proteus Simulation, the thirtieth project of our IoT Projects series. If you have searched for a Proteus simulation of a Raspberry Pi compass with a GY-271 magnetometer and a TFT display, here is a complete one. A Raspberry Pi 5 reads the Earth's magnetic field from a QMC5883L on a GY-271 module, works out the heading, draws a turning compass card on a 2.4-inch ILI9341 TFT, calibrates out a magnet fixed near the sensor, adds the magnetic declination, warns when something disturbs the field, and serves a live web dashboard that you can open on a laptop or a phone. A digital compass is in every phone, drone and car navigation system, and it is more interesting than it looks: the sensor measures a tiny field, about a hundred times weaker than a fridge magnet, and anything magnetic near it pulls the reading off. In this tutorial, we will go through the circuit, learn what a magnetometer measures and how the heading comes from two of its axes, read the QMC5883L over I2C, see why a nearby magnet ruins the heading and how a calibration turn removes it, add the declination, drive the ILI9341 over SPI and draw on it from frame buffers, walk through the Python program, and then run the simulation: the board turned to north, east and southwest, a magnet on the board, a calibration while the board spins, the declination, and a tilt that shows why phones also need an ...

HMC5883L / QMC5883L Compass Library for Proteus V1.0: GY-271 Module

HMC5883L / QMC5883L Compass Library for Proteus V1.0: the GY-271 module with its STATUS panel and the Advance pop-up

Hello friends, I hope you all are doing great. Today, I am going to share the new HMC5883L / QMC5883L Compass Library for Proteus V1.0. The GY-271 is the small blue compass module that you find in robots, rovers, drones and digital compass projects. It measures the Earth's magnetic field on three axes, and from two of them the Arduino works out the heading: how many degrees the board points away from north. There is a catch: GY-271 boards come with two different chips, the HMC5883L and the QMC5883L, and a sketch written for one does not work on the other. Now you can build and test both in Proteus. Behind the parts sit our own models, not parts that show a number. Each chip answers the Arduino exactly as its datasheet says, with its own address, its own registers and its own byte order. You turn the board to any heading, put a magnet on it, tilt it, or turn it a full circle while the sketch calibrates. You get four devices: each chip as a Simple device with a live STATUS panel and the board's controls, and as an Advance device with a pop-up window and the test tools. The demo runs the Adafruit HMC5883 Unified library on our Arduino UNO V4.0 and finds whichever chip is on the board. NOTICE: a compass is easy to fake: hand the Arduino a heading from a property. We wanted more. Our GY-271 feels the Earth's field from the direction the board points, adds the magnet and the tilt, and turns the result into the chip's own counts and registers, so the Adafruit library reads it ...