Sonar on a Quadplane

I have tried to install the Lidar on my Quadplane (a modified Skyhunter), but it wasn’t really working. Also, Lidars are quite big and heavy, and expensive. Around 200 USD is quite a lot.

My problem is this:

During long flights (mapping flights for example) with my Quadplane, I noticed quite some barometer drift. Sometimes nothing, sometimes a lot. On my last flight it was actually 7 meters in the wrong direction. That means, the Pixhawk thought he was still 7 meters up in the air, but already on the ground.

As a result, there was no flare to slow down the descent rate which is set at 5 meters.

Fortunately I set the descent rate not too high, so the landing was still ok, a bit fast, but no damage done.

So my thinking is like this:

If I could use a simple, cheap ultrasonic device to initiate the final landing stage, it should already be ok. Most of them work in the range of 3 to 4 meters, which should be ok for starting the final, slow landing descent and also solve the problem of landing detection.

So I modified an ultrasonic sensor hc-sr04 so that it can work as a standalone sensor. I just added a NE555 timer as a trigger generator and an RC filter on the output to get a DC voltage from 0 to 3.3V as a range indication. It works in the range of 0 to 4.5 meter.

I connected it to the Pixhawk, and it does work very well. Not super accurate, but I don’t need accuracy, I just need a final flare and a soft landing.

My settings are as follows:

RNGFND_ADDR,0
RNGFND_FUNCTION,0
RNGFND_GNDCLEAR,15
RNGFND_LANDING,1
RNGFND_MAX_CM,400
RNGFND_MIN_CM,1
RNGFND_OFFSET,0
RNGFND_PIN,14
RNGFND_PWRRNG,0
RNGFND_RMETRIC,0
RNGFND_SCALING,1.5
RNGFND_SETTLE,0
RNGFND_STOP_PIN,-1
RNGFND_TYPE,1

Will this work as I expect? Will it generate a flare?

Is there anyone who has an idea???

I don´t finish my quadplane yet but I was thinking something similar with a Lidar not to need a large descend with the quad and have better battery usage, if work with a sonar, much cheaper, keep Us update if you try please.

Try a TerraBee Lidar They work well most of the time. [https://www.terabee.com/distance-sensors/#singlepoint]