INAV Compass discrepancy, interference, solutions (thanks to Joshua Bardwell) #10299
Replies: 1 comment 2 replies
-
Thanks for sharing that. There are two kinds of fields. Radiative aka electric fields radiate from the source out into space. An example is an antenna intentionally creates a radiative electric field to send data out. The other other type of field is an inductive/magnetic field. As you may have noticed when you put a magnet on your refrigerator, the magnetic field stays close to the magnet, so the magnet sticks only when it gets very close to the refrigerator. The magnetic field doesn't radiate out into space. The electric field is also called the "far field" and the magnetic field is called the "near field". Because the electric component goes far, while the magnetic field stays near. Adding an electrical shield , electrically grounded, can be useful when dealing with an electric field. Interference from an electric field shows up as missed readings (the I2C 'errors' count). A camera can be sensitive to interference from an electric field, so an electrically shielded cable canale sense on the camera. The magnetometer (compass) measures the magnetic field. The main power wires form an electro magnet, and that's the biggest source of magnetic field interference. Also buzzers like the Vifly produce magnetic fields. How can we deal with those? Remember the inductive magnetic field doesn't radiate - it stays close to the source. So the key to dealing with magnetic interference is DISTANCE. Specifically, doubling the distance reduces the interference by 8X. Again you can see that easily yourself with a refrigerator magnet - the magnetic attraction gets much, much weaker as the distance between the magnet to the fridge increases. The key is to have as much distance as possible between the magnetometer and the main power wires and the buzzer. Ideally, putting them at opposite ends of a quad. At the same time, we'd like to have our sensitive GPS antenna as far as possible from the powerful VTX antenna, and also the telemetry antenna. So we want the main power wires, VTX antenna, and telemetry antenna at one end of the quad; the GPS/magnetometer at the other end. To avoid shadowing in forward flight, the VTX and telemetry antennas should be at the rear. So the GPS/mag can go on the other end - at the front. Above the camera is often a good spot. In summary:
|
Beta Was this translation helpful? Give feedback.
-
I had big problems with compass errors, showing random values, at all orientations. Joshua Bardwell has a YouTube video of this similar situation, and his solutions. He found that the XT60 power connector was too close to the GPS/Compass module. He also foil wrapped the leads from the flight controller to the GPS module, but felt this was less significant. So distance, and screening.
For me, I replaced the GPS/compass cables with a screened cable, which I further attached the screen to the power ground line.
I have a BN-880 GPS, SpeedyBeeF405WingApp, FrSky X8R, 5 servos (for on board testing,) and a TX800 VTX (connected with supplied cable and unscreened.
The biggest change appears to be replacing the supplied GPS multi-strand cables, for a grounded screened, multicore cable, soldered to the original Molex GPS 6 pin connector, and the F405 connector. I did put some copper foil over the power leads as they came up to the FC, and a patch over the XT60 connector. The VTX is on the opposite corner of the testing box/board.
The result is that the GPS locks to 3D, quite quickly, when looking through the patio windows, the Compass shows stable compass values, which within a few degrees of expected at the major points of the compass, eg nominally North +-1deg, East +-101deg, South +-164deg, and West +-266deg. There was very little drifting, and leaving the board static for 5 mins, the value didn't change. Now to repeat the test at the pond. But this is significantly better. See the attached photo, of the test board/box.
Beta Was this translation helpful? Give feedback.
All reactions