Fuel Level Sensor Integration

Hi all,

I have a fuel sensor that outputs between 0.25 and 5v depending on the fuel level inside the tank.

Has anyone had any experience with passing this data through to the GCS? I can’t seem to find any mention of it in the wiki, or code.


So nobody’s done that before and I don’t think we have a general purpose way to send the voltage measured from one of the pins to the ground station although it’s a pretty reasonable request.
I’d say the most sensible way to try and use it without modifying the code would be to feed it into the battery voltage monitoring.

As Randy says, we should have a general purpose analog input that can be logged. We don’t have that yet, but please open an issue for it.
Meanwhile you can get what you want using the SONAR_PIN option and set SONAR_ENABLE=1. Attach your fuel sensor to an analog input then you will be able to monitor the voltage using the RANGEFINDER.voltage message.
Note that sonar code in APM:Plane is logging only at the moment, so this won’t actually try and use your fuel level for altitude, but it will allow you to log and display the voltage.
Cheers, Tridge

My questions is somehow similar:

Is possible to APM measure a GAS tank consumption? Which specifically sensor for apply and wiring an set it at APM?

Thanks for any help!