Compass heading changes when arming copter

I noticed when I arm my copter, the compass heading is changing by 30-40 degrees.
Note : The copter is already calibrated.

I only have FC connected to usb-charger (supply) and RC receiver. i.e I don’t have propellers or battery connected ( no moving motors )

I attached my captured logs. I only arm and dis-arm nothing more.
log_0_UnknownDate.bin (532.8 KB)

I checked the logs I see minor changes in Acc. The Gyro and compass has weird spikes.
any explanation for that ?
is it bad IMU sensor or bad calibration. ?

I only have FC connected to usb-charger (supply) and RC receiver. i.e I don’t have propellers or battery connected ( no moving motors )

What does the information “no moving motors” mean. IF only as you said the FC is connected to a usb-supply and the RC receiver how should the motors can move. So this information only makes sence if the Motors are connected probably to the ESCs and these to the FC.
So please describe exactly your setup. All details.
The compass can change due to change of some current change.

I am not sure what is wrong of my description.

I didn’t connect the ESC to FC so I can isolate the problem to avoid any confusion about interference from high current to ESC or motor wires.

The only connections I have now to the FC is the RC receiver and the usb connection to computer.

My FC is based on OBAL ( RPI4, led, buzzer and GPS+compass )

There is not really something wrong with your description but I only can read and interprete what you are writing. I cannot see your setup.
But now if it is clear you only have a FC (What ever a OBAL is); a RCreceiver RPI4; a LED (is the LED status changing when you arm / disarm?) ; a buzzer (is the buzzer status changing when you arm / disarm?); a GPS with inbuilt compass.
Did you checked the behavior with battery connected instead of USB power. Is it the same? If yes can you measure a difference of the supply current just on your arming / disarming?

1 Like

Note: I used LiPo battery and still have the same issue.

I found the issue:

I noticed when the buzzer is making sound/tone during arming and dis-arming, the INS reading is going crazy.

I desolder the buzzer and seems everything is fine now !. The active buzzer seems to generate noise in the circuit which affect all components.

below is the circuit for my design :

did you see similar issue ? or even know what is wrong ?