The compass gives me weird readings, north (0) is almost correct which is fine but south (180) is only 90 degrees (in reality) right of north. I have calibrated two units tens of times but it does not fix the issue.
I returned back to use just the example code but it does not help, so it something with the hw. Have I burned these or what could be the reason for it?
In my memory I’m quite sure I saw better results some months ago but I didn’t do such a detailed testing then.
I am sorry you are getting readings that are not what you expect. When you rotate the MinIMU during calibration, are you pointing it in all directions? When I calibrate, it helps me to imagine that the MinIMU is the tip of a paintbrush and during calibration, my goal is to cover the entire inside of a basketball-sized sphere with paint. If you are pointing in all directions during calibration, what are you calibration constants? Can you post pictures or share a link to a video that shows the environment you are operating your compass in?
I have been very careful to try to calibrate with all possible directions, I cannot really imagine that to be the problem. The environment has nothing special, just my garage.
These are the calibration constants of both of my sensors:
#define M_X_MIN -2401
#define M_Y_MIN -5899
#define M_Z_MIN +920
#define M_X_MAX +5079
#define M_Y_MAX +989
#define M_Z_MAX +9457
#define M_X_MIN -2427
#define M_Y_MIN -5784
#define M_Z_MIN -214
#define M_X_MAX +5555
#define M_Y_MAX +2229
#define M_Z_MAX +7924
Do they look valid?
Those calibration values look okay. It might be that there are significant soft or hard iron distortions from the various metals in your garage or there is some relatively large external magnetic field generated by current carrying wires near your board. Do you get the same behavior if you run your test outside or somewhere obviously free of external magnetic fields or possible distortions? If so, what are you using to supply power to the MinIMU? Which Arduino are you using to control it? How are you getting your heading information?