Sunday, August 28, 2016

Pixhawk v2.4.8 bench-testing & barometer accuracy with drift

I finally got around to firing-up the new PixHawk v2.4.8 on the workbench. It came with ArduCopter v3.2.1. I had to flash to v3.3.3 to cure some external Compass detection issues. I then had to flash to AC_v3.4rc2 to fix "compass variance" errors. It's now working except for this altitude drifting issue. 

So, it turns-out that ESCs and motors do not have to be installed for Pixhawk to Arm and run a simulated “test-flight”. I was able to now better compare the new Pixhawk-v248 altitude behavior against my other FCs.  

Test conditions:

- FC and sensors are powered-up and “warmed-up” for 5 minutes before Arming
- Only the FC is connected. No GPS for now.
- Using on-board compass only. Calibrated and not throwing “Compass Variance” errors
- FCs are completely calibrated (gyros, etc.)
- FCs are sitting on the actual flat level ground outside
- During mock “test flights”, FC were occasionally picked-up to 2 meters, held for Tower chic's announcement (about 30 secs), and then set back down.

Initial Observations (for all tested FCs unless noted):

- Daylight, temperature, and weather not large factors (example pic below from a night run)
- All FCs drift a bit after cold power-up. This appears to be normal. I allow 5 minutes to warm-up.
- On Arming, altitude is reset to 0.0 meters. After a cold-boot, works nice to reset barometer after power-up but before take-off.
- Neither the APM_252 nor PixRacer ever exhibited a deviation any different or worse than about 1.0 meters in any test.



The below chart shows results from actual sim-flights in my backyard. While it only shows a few, I would say I have run about 10 tests so far. Multiple tests of same FC showed similar results (so no big problem they aren't all logged).
 
Altitude of ground (as determined by FC) APM_252 PixRacer Pix248_F01 Pix248_F02
Power-up 0.0 0.0 0.0 0.0
After 5 minutes warm-up 0.3 0.1 -3.0 -3.0
After Arming (resets altitude once) 0.0 0.0 0.0 0.0
During simulated flight. 1 minute 0.1 0.0 -0.1 0.2
During simulated flight. 2 minutes 0.2 0.0 -3.0 -1.0
During simulated flight. 10 minutes 0.7 0.1 -7.0 1.0
During simulated flight. 30 minutes 1.0 0.8 -10.0 -2.0
After landing 1.0 0.8 -10.0 -2.0
Max in-flight barometer units deviation 1.0 0.8 10.0 2.0
         



Like the popular PixHawk 2.4.6 before it ... the PixHawk 2.4.8 and PixRacer all still use the same Measurement Specialties MS5611 barometer sensor. Even my old APM_252 FCs uses the same. When looking at Flight-Example-01, I don't see how the PixHawk_v248 can be determined good and trusted on a $1000 aircraft if it can't even determine it's own altitude closer than this. I had hoped to use this aircraft for precise auto-missions. From this example simulated-flight (F01), you can see it clearly performs worse than the others.

Sometimes this PixHawk_v248 drifts into positive altitudes instead of negative. Originally, I had thought that Arming (and it's reset) was required to net a good result. However, (at least in this case) I'm seeing that is not the case, and a drifting barometer will continue to drift, no matter how many times you reset or Arm-Reset it. I'm thinking it must be a bad barometer on the board. Hopefully just a rare random bad unit.

Update 08-29-2016
I have continued to run tests (up to about 15 iterations now) and example test-flight scenarios with similar results. They have been run on both 90f hot-days and cool 70f nights. Weather is active (like always) but is generally mild (no storms).

Most results are similar. However, it seems I ran enough tests (about 6 now) on PixHawk_248 to get a rare result. I have updated the above chart with that flight (in column PixHawk v248 - Example Flight #02). It shows that this exact PixHawk_v248 (that has been performing so poorly) finally showed a result more in-line with similarly equipped FCs (it finally performed properly once). It seems to say that this MS5611 barometer sensor can work under ideal conditions or maybe just randomly. However, since it's not reliably correct or dependable, I will likely never fly this particular FC on a nice aircraft as originally intended.

You can also start to see how some pilots might not notice a 1-2 meter barometer drift during a flight. Conceivably, you could take off at 0.0 meters. During the flight, the barometer might drift around 2.0 meters. But if it happens to drift back near true altitude (around the time you land), the pilot might not even notice.

I'm thinking the Measurement Specialties MS5611 barometer sensor is a fairly delicate and sensitive sensor. It might be that some work better than others. Maybe I just got a "boarder-line sensor" that tends to drift too much over a short period of time. Hard to say how many FCs that might end-up affecting over the years. I just visually confirmed that my PixHawk v2.4.8 from BG does have the proper sensor soldered onto the PCB.

MEAS - 561101BA03

Grey foam is there and lightly pressing against sensor. In my case, it appears to be a bad $3 barometer sensor .

Update 09-28-2016

I contacted vendor. They sent me a new one after seeing these test results. This new one works properly. I holds a 1-meter or better accuracy while on flight-line or during mock flights.

5 comments:

  1. Chart updated with an interesting test flight result and updated post content with new thoughts.

    ReplyDelete
  2. Hi, do you have a hard time connecting to your Pixhawk through USB cable? Mine is stopping re-connection after a couple of soft disconnects in Mission Planner. I have to unplug USB to reistablish ability to connect to Mission Planner. It came with FW 3.3.1, I installed 3.3.3 but it didn't help. I've spent some time playing with Qgroundcontrol, which is a native GCS software for Pixhawk but I could't say I like it much. What's you impression about Pixhawk, I'm in doubt about mine because of this bug, thinking about returning it to seller, it's going to take a couple of month.

    ReplyDelete
    Replies
    1. As a matter of fact, there was some USB connection strange-ness. I had to switch to alternate USB cable to get it to connect a few times. I thought maybe it was my laptop (AMD chipset instead of Intel), so I tried another (also, it was Win-7 instead of Win-10). It worked, but then so did the original laptop and cable when I re-tested them. So, yes ... maybe I did see something similar. I stopped trouble-shooting it once I found Barometer problem on this FC (since I will never fly this FC). New one from BG should be here soon, so I will observe USB operation again on this new (hopefully 100% working) one.
      I suggest trying a different USB cable and laptop. ALSO, I FOUND THAT SOMETIMES, MissionPlanner just needs to be closed, re-started, and Comm-Port re-selected and then it works fine. I think this part might be a Win-10 issue.

      Delete

The stupid spammers have now forced me to approve each Comment before it appears (but I am usually pretty quick about it).