Fuel level sensor for engine based ROV

Hello,

I was building engine based ROV and using Pixhawk Cube orange and Ardupilot 4.2. I want to integrate Capacitance based fuel level sensor like below image. It works with 24 V input which I am powering with battery, and Output has three wires ( Power, GND and analog signal). Signal level is 1.5 V to 4.5 V analog. I have connected Signal wire to ADC analog pin which takes upto 5V analog, and it is displaying voltage change output( change in dielectric value with fuel level) as a SONOR voltage in Mission Planner.

ALL I WANT TO DO IS TO DISPLAY THAT VOLTAGE CHANGE AS PERCENTAGE CHANGE. PLEASE HELP ME WITH IT.

THANK YOU.

image

Hello @Viru61115

I am not aware of any way to do this without making programming changes to the GCS, but I will follow this post to see if someone have a very nice trick for this.

Hi Bruno,

Thank you for response, I look forward to it.
Quick question: Do you know how to show SONOR VOLTAGE as percentage in Mission PLANNER WINDOW.

No, I really don’t know if it is possible.

You can set it up as an analogue voltage sensor connected to pin 15 using BATT2 that goes up to 100v. So 100v=100% you just need to set up the offset and scaling correctly.

Use the pin 15 adc pin on the pixhawk or you will damage the pixhawk, that pin has a 1:2 voltage divider so it can handle voltages up to 6.6v, the other adc ports are limited to 3.3v.

The offset is because your sensor doesnt go down to 0v you need to offset it by 1.5v so the fuel sensor at 1.5v = 0v on mission planner then you need to set 4.5v =100v using the scaling parameter.

You should then be able to use the low voltage warnings and failsafes with your fuel level.

1 Like

Hey, thank you. I will try it.

Nice trick @geofrancis

Thanks!