ardupilot
ardupilot copied to clipboard
AUAV Airspeed Sensor Driver
Drivers for the Amphenol AUAV airspeed sensor. This is a relatively new UAV specific airspeed sensor. I don't know why Amphenol didn't write their own Ardupilot drivers, but I did it for them since this looks like a really awesome sensor.
https://www.mouser.com/new/amphenol/amphenol-auav-air-speed-altitude-sensors/
These actually provide absolute pressure measurement too.
These actually provide absolute pressure measurement too.
Nice! Although I'm going to leave that to someone else to implement if they want :)
Ping @Tdogb - also needs to pass CI :-)
Hey guys, I think it would be super cool to implement the absolute pressure sensing capability. Does anyone have strong opinions on how this is implemented? I don't want someone to unknowingly have it override their baro
Hey guys, I think it would be super cool to implement the absolute pressure sensing capability. Does anyone have strong opinions on how this is implemented? I don't want someone to unknowingly have it override their baro
Maybe do that as a second stage?
I'll mark this for DevCallEU so we think about your question anyway. We do have some precendents for detecting something as two different sensor types.
just as an airspeed sensor initially is the way to go
@Tdogb did you need assistance on this one, or still plugging away at it?
@peterbarker i tried this pr. Was able to get differential pressure output. But temperature didn't work for me.
@peterbarker i tried this pr. Was able to get differential pressure output. But temperature didn't work for me.
Temperature is compensated for but the real temperature value isn't read because there isn't documentation on it.
I had accidentally pushed some other dev code I have to this branch so I removed it.
@MallikarjunSE @Tdogb I've force pushed some fixes:
- temperature now works
- supports 3 pressure ranges
- removed the absolute code
- use 8x sampling for lower noise
I've bench tested buy not flight tested. Please test!
@MallikarjunSE @Tdogb I've force pushed some fixes:
- temperature now works
- supports 3 pressure ranges
- removed the absolute code
- use 8x sampling for lower noise
I've bench tested buy not flight tested. Please test!
Hey @tridge
Tested L10D on DroneCAN periph device. Works! Will test L30D in sometime.
Thank you!
@tridge tested on L30D. Works!
Hey @tridge below is temperature comparison between DroneCAN periph vs I2C directly plugged in. Temperature update rate seems to be too low on DroneCAN? Or it's sufficient?
Temperature update rate seems to be too low on DroneCAN? Or it's sufficient?
the reason the graph looks weird is the DroneCAN RawAirData message uses a float16 for temperature, which means it doesn't have much resolution. It is sufficient for how it is used though
Thanks for helping push this across the finish line guys!
I have some code on my personal branch for absolute pressure, however, I've been running into issues with the sensor not acking some of the calibration coefficients. Looking at it on the scope makes it seem like an issue with the sensor itself.
@Tdogb @MallikarjunSE I've changed it to require ARSPD_BUS to be set correctly, which is how other drivers work except for the MS4525 (which was a legacy compatibility hack) I've also added status checking so the probe is more reliable, and ensures that we don't use invalid data
@Tdogb @MallikarjunSE I've changed it to require ARSPD_BUS to be set correctly, which is how other drivers work except for the MS4525 (which was a legacy compatibility hack) I've also added status checking so the probe is more reliable, and ensures that we don't use invalid data
Tested with CubeOrange and Periph device and works. I2C bus selection works as expected. Previously it used to probe without setting bus number. Now works with bus number set correctly.
tested it with L05D on the bench with Pix32 v6 and Matek L431-Cannode. Seems to work very good. Comparisons with DLVR sensor and with a reference pressure system planned in the near future.
I did my own driver integration of this airspeed sensor to learn how to do that. I was not that far off, so thanks a lot for the code to compare, correct and learn!
I would love to participate in the barometer integration as much as i can. (limited) As far as i understand, the barometer option of the board are as of now hardcoded in the hwdef file. So there would be a easy way to implement this sensor for an AP_Periph device that ships with this sensors, but this does notwork for flexible selection of sensors in the Autopilot Parameter list.
I hope to be more present in the upcoming devtalks.
I have done a PR to add a baro driver. https://github.com/ArduPilot/ardupilot/pull/29535
However, my sensor always fails to read the extended calibration coefficients for that channel despite working fine on the differential channel. I can do builds if anyone else wants to give it a try.
I have done a PR to add a baro driver. https://github.com/ArduPilot/ardupilot/pull/29535
However, my sensor always fails to read the extended calibration coefficients for that channel despite working fine on the differential channel. I can do builds if anyone else wants to give it a try.
I have independently written a driver for abs pressure and have ran into the exact issue. Putting it on the scope the fc is outputting the correct command but the sensor just doesn't respond, it seems like an issue with the sensor itself.
I have independently written a driver for abs pressure and have ran into the exact issue. Putting it on the scope the fc is outputting the correct command but the sensor just doesn't respond, it seems like an issue with the sensor itself.
I'm not going crazy then! I did find that it works fine if we just don't bother with the extended calibration. Maybe that is a solution, but it is certainly strange.
I did notice the other team has a driver, I wonder if it works there. https://github.com/PX4/PX4-Autopilot/blob/main/src/drivers/differential_pressure/auav/AUAV.cpp
@Tdogb I now have the baro driver working. It turns out its very sensitive to timings because its clocked much slower than the differential channel for some reason. https://github.com/ArduPilot/ardupilot/pull/29535