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.
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:
- I did not move the base in all directions. Looking to the 3D plot one can see (OK, much better when rotating it online) that there is an 1/8 sphere not covered. Will be better with pure battery powered.
- Main todo derive an analytic formula for the three sensors. Not necessarily to o this then explicitly since I planned to use a Kalman filter anyhow.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.