https://github.com/bareboat-necessities/bbn_compass
NMEA compass with IMU
https://github.com/bareboat-necessities/bbn_compass
atoms3r compass imu kalman-filter nmea opencpn pypilot
Last synced: about 2 months ago
JSON representation
NMEA compass with IMU
- Host: GitHub
- URL: https://github.com/bareboat-necessities/bbn_compass
- Owner: bareboat-necessities
- License: mit
- Created: 2026-01-14T00:57:13.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2026-01-19T01:33:56.000Z (4 months ago)
- Last Synced: 2026-01-19T11:37:54.783Z (4 months ago)
- Topics: atoms3r, compass, imu, kalman-filter, nmea, opencpn, pypilot
- Language: C++
- Homepage: https://bareboat-necessities.github.io/
- Size: 1.08 MB
- Stars: 7
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# bbn_compass
NMEA compass with IMU. The device will transmit NMEA-0183 sentences for magnetic heading, roll, pitch, rate of turn.
It can be used directly with OpenCPN running on Windows or Linux.
Transmission of NMEA-0183 is via USB Serial at 115200 baud, with 10 Hz rate for NMEA sentences.
## Hardware
- M5Stack __AtomS3R__ esp32: https://docs.m5stack.com/en/core/AtomS3R
- M5stack __ATOMIC PortABC Extension Base__: https://shop.m5stack.com/products/atomic-portabc-extension-base
### Enclosure, etc
- Waterproof IP67 box 4.7"x3.5"x2.7" or bigger. Hinged with transparent lid, base plate and legs
- Various cable glands
- M3 standoffs
- USB-C to USB-A cables with small support tang on USB-C end
## Firmware
atomS3R_compass.ino in atomS3R is an ArduinoIDE sketch which you would need to compile and load to
atomS3R.
For required libraries and their versions check:
.github/workflows/build.yaml
## Calibration
Calibration is performed directly on AtomS3R in three steps (follow instructions on the screen):
- Accelerometer. On AtomS3R screen is a button (BntA). You will need to place device in 6 poses (still).
- Gyroscope calibration is performed by putting device still with screen up.
- Magnetometer calibration achieved by rotating device around all axes for around 45 seconds.
- Triple press on the screen erases and restarts calibration.
NOTE: You would need a relatively long USB cable to be
able to rotate the device fast and freely to give more points on
3D sphere.
## Example NMEA Sentences
````nmea
$IIXDR,A,-0.4,D,PTCH*43
$IIXDR,A,2.3,D,ROLL*79
$IIROT,1.9,A*2E
$IIHDM,250.4,M*21
````