Close

Mastering the earth magnetic field with 3 sensors

A project log for Galaxy6D: simple DIY full 6D space mouse

Full 6D mouse by three 3D magnetic sensors and magnets. 3D printed housing, ESP32S with battery operation over BLE as well as USB-C.

bastelbausBastelBaus 11/04/2023 at 16:480 Comments

Searching the internet for magnet field calibration, I found a very good overview paper . However to start, I used the nice tool Magneto 1.2 to calibrate one of my sensors. It worked quite well and the variation in the absolute magnetic field ( =sqrt(|Bx^2+By^2+Bz^2) ) reduced signiciantly.


I tried to re-implement in python since the sources had been in c and not complete. Quite handy  was the source from TiltyIMU which helped me a lot and finally I succeded to transform the red measured data in the calibrated green data.

Finally, rotating the sensors by a fixed 120° (as layouted on the PCB) gave me a very nice match:

Discussions