I use the Cube Black with 2 I2C Here2 GPS (in order to use Blending), Arducopter 4.0.3. At this moment we are flying 15 UAV´s with the exact same setup for crop spraying in Brazil. Brazil has one of the lowest magnetic fields on earth: 24 µT (1/2 of the strength than US for example). Adjusting compass in Brazil is a “sensitive” problem for most flight controllers. The automatic compass scale made the calibrating process better in 4.0.3 (but not as good as it was with the first Here GPS).
But I´m having problems with 4 units that were OK for 2 months and now are getting very difficult to adjust compass (one even impossible). Is it possible that the magnetometer used in Here2 gets “less sensible” over time? What kind of data should I send in order to identify better this problem?
When I change the problematic Here2 GPS for a new one, it works again. I checked interference from possible faulty motors, but have not found anything. What could/should I look for?
I appreciate your help.
I have made the “compass motor calibration” and had much better flight after. But I do think we are in te middle of the magnetic earth “bulls eye” according to this NASA study:
It is very difficult to get a good compass calibration even with the compass mounted on a external post… Almost on every flight we have to re calibrate.
Can you share pictures of your setup? There are many places on copter which are mag field free.
Yes, Brazil is home to the weakest magnetic field on the planet, but it shouldn’t stop you from being able to fly. Can you tell us exactly what problem/error you are encountering? Is it just the process of calibrating? If so, what is your MAG_CAL_FIT parameter? You may need to increase it.
The only problem we’ve had in Brazil was the “check mag field” error, which happens because Ardupilot has a hard-coded minimum field strength of 180. Before the compass scale fix, we had to build our own firmware with a lower threshold.
Thanks for your reply. We produce 5 different models of crop spraying UAVs. Our problem is that we need to keep the GPS inside our water resistant compartment (we need to wash the equipment after use). For this reason we have “space” problems and I suggested a “stand alone” magnetometer like Mikrokopter and DJI have. We produce UAVs since 2008. Please take a look here: https://skydrones.com.br/pelicano2020/ and here: https://www.youtube.com/watch?v=pSBvYLzlt1o specific to the crop sprayer line.
Rick, thanks for your reply. As written to Mallikarjun_SE, we have a reasonable understanding of the Arducopter system but we have “space” problems. At this specific product line, with MTOW of 25kg, we face difficult to identify EMF disturbances since we are dealing with high DC current (we have 4 or 6 motors with ESC below the motors). This layout is full of “radiation”, adding to our low magnetic field = hard times. The weird thing is, UAVs that were flying OK for several months (about 200 to 300 flights) start to have compass issues. Our client flight reality is quite severe as you can see in the video I posted before, they fly in very sandy environment, This might make the motors have a different power (irradiation) profile emitting more EMF noise. But the funniest thing is, sometimes we just replace the GPS for a new one ad it works (always Here2). Can a magnetometer degrade sensitivity over time? I´m very interested in your different coding, can you tell me more?
I have: COMPASS_CAL_FIT,16
The problem is not calibrating, this process is OK almost every time. The problems are:
- We have to re calibrate almost on every flight
- Even if we have a positive calibration, you get the “toilet bowl effect”
- When flying in Loiter and command flight forward (just pitch stick), the copter does not fly straight forward, it flies sideways (nose facing forward but copter flies sideways). Depending on calibration, the copter flies to the left or to the right. Most of the time to the right.
For something like this, you can go with moving baseline method. Or buy Here3 which is water resistant. Lot of options. You just have to look for it.
These are options I can think of,
- Dual F9P module running moving baseline
- mRo KitCAN M10025 (https://store.mrobotics.io/product-p/mro10025.htm)
- Here3 GPS with water resistance
- Visual odometry
- Or wait for HerePro which is rain proof.
- Also sealing current GPS should work.
I have not heard of magnetometers becoming desensitized over time. You may be able to check this by comparing the field strength measured by different compasses. Mission Planner has an easy way to do this:
If it calibrates okay but does not fly well, then yes it probably has something to do with motor current or some other transient effect. Usually the compass-motor calibration will solve this problem. Are you using current or throttle mode for compensation (
COMPASS_MOTCT = 1 or 2)?
To really understand the problem, we should get a log that shows the effect of the motors on the compass. I would do the following:
- Prepare for a motor-compass calibration by strapping down the drone (or flip and rotate the propellers so they thrust downwards)
COMPASS_MOTCT = 0 to turn off motor compensation
- Arm the drone in Acro and move the throttle slowly between 0 and 75%.
COMPASS_MOTCT = 2. If you have not done compass-mot calibration yet, do so now.
- Do step 3 again.
- Download logs and post them here
The motor’s effect on the compasses should be visible in the logs, and also whether the compass-mot calibration is helping. This should tell us whether the problem can be solved without making hardware changes.
Oh, and I just remembered: there is also a per-motor compass calibration. This can be important for tight builds like yours. Set
COMPASS_PMOT_EN = 1 to enable the relevant parameters. I have never done a per-motor calibration, however, so I am not familiar with the process.
Edit: It seems that performing the per-motor calibration is not supported by Mission Planner yet, but apparently Mavproxy can do it.
Rick, thank you for this insights. I will do some tests on one unit that has returned for maintenance. I´ll post the results.
I made a “Motor-compass” calibration on one problematic unit and so far it has worked well, but it is a new unit and the problem only shows signs of “activity” after some flying time. After the “Motor-Compass” calibration this unit started to fly straight forward and not sideways…
Thanks for your suggestions. Dual GPS modules running moving baseline is out of our complexity intentions for our “farmer” clients.
The mRo KitCAN is interesting (exactly what I´m interested in), but I must first check if this works in Arducopter 4.0.3 with 2 Serial GPS and a separate CAN compass. The reason I´m not using Dual CAN GPS is exactly because in 4.0.3 you cannot assign a fixed CAN ID (and all the problems with this…). Do you know if I can use 2 Serial GPS and a CAN compass?