Close

Measure ... the earth magnetioc field³

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/02/2023 at 19:320 Comments

Since the setup was reasonable stable, I was able to measure alll three sensors at the same time and turning the base in all directions. In the picture below, you can see the time signals of the three sensors for all three axes (upper row), projections in XY/XZ/YZ dimensions of the measurements in the middle row and a full 3D plot of the fieldsI measured ~27s and had in total ~4200 measurement points which was above 100Hz. But since I did not take any timing measures on the ESP32 and did probably not configure the sensors correctly, I am not sure if the timing is perfect. Foir each measurement I calculated the absolute of the field vector (=sqrt(Bx^2+By^2+Bz^2)) and averaged it giving me an absolute earth magnetic field at my desk of about 0.5G (= 50uT) which seamed reasonable. The standard deviation of the measurements was <0.1G. Doing this standard deviation calculation without movement, resulted in a value <0.01G, so most of the noise resulted from the movement/timing/other effects.

SInce I can now measure 3 times the earth magnetic field, I should be able to calculate it only from one sensor and subtract it from the others so that I have two sensors without the earth magnetic field.

To avoid the cable and be even more flexible to debug, I also tried to switch to WLAN, but it did not work. The "hacked" I2C bus seamed to be confused by the multithreading of the WLAN (ESP32S uses the other core for WLAN handling). So one more thing to solve.

Learnings / ToDo's:

Discussions