Servers by jDrones

Fuel level PWM "battery" monitor

Okay, so I’m trying to set up battery monitor 2 to display the fuel level remaining using a liquid level sensor from Richen Power. I have the Batt2_monitor set to 12 (Fuel level PWM), but after doing this any information about Batt2 seems to disappear on Mission planner. I have the fuel sensor getting power from a Mauch power cube and then the “display” going to AUX4. I’ve tried setting the Batt2_Volt_pin to the standard 13 that I would use for other battery monitors, and then tried 53 as I believe that is the AUX 4 pin out.

I will have to come back to this in a few hours, but BRD_PWM_COUNT is the first thing I’d check, to make sure that the pin you’ve selected isn’t assigned as an output. If you post a param file I can have a look.
Thanks for the reminder that I need to finish the docs on this.

Here are the most recent params. 9_27_19.param (14.9 KB)

BRD_PWM_COUNT is set to 4

Okay I read into what the BRD PWM COUNT does and set it to 2. I believe this no longer makes AUX4 an output. I also figured out how to see the Batt2 voltage, however it still shows 0, also tried the to pass the input through rssi and still got 0.


D92719.param (14.9 KB)

updated params above

Set RSSI_ANA_PIN to 103 and use the Sbus input.

I guess the idea here was to see if the battery monitor/ fuel level pwm works, not necessarily if the rssi method works

You should see something like https://youtu.be/xa1dSpxCg-I
This was done with a servo tester, not the actual richen power device, as I need to pull that out.

Update: https://youtu.be/Azww1_wQQmU is with the RichenPower sensor, in a makeshift bench setup. So the driver is working.
I’m working through your param file now.
OK, I should have read your initial post a little more thoroughly. The FuelLevelPWM is read via the Current mechanic, not voltage (although I have thought about changing that).
Try
BRD_PWM_COUNT,2
BATT2_CURR_PIN,53
BATT2_MONITOR,12

Don’t use this for anything other than comparing the BATT params (my bench Pixhawk is VERY old and has the errata, and could have any number of random parameter values depending what I’m doing), but the relevant params get a working read from the sensor. I used Aux4, but it doesn’t matter (Aux1-6 = GPIO 50-55)
fmuV2_FuelLevelPWM.param (17.1 KB)

Hey James, just gave this a shot with the specified params. No luck with batt monitor 1 or 2. Still just get zeros across the board. Any chance you could post a picture of the physical setup? I’m thinking I must have it wired up incorrectly somehow.

@tridge What information did you want to see for this setup on my end?

Hi James…
Im working on a 25L Large Agro Drone With Cube Black.I also got the RichenPower Liquid level sensor with me.
Its great of you if you could let me know how to do the set up in order to monitor the tank liquid level in the mission planer.
Is there a way to pause the mission and RTL and then aft refill to continue mission…??

Finally figured this out today! On dev version at least. So what I changed from before was powering the Aux rail of the Pixhawk at Aux 3, stepping down power from the power cube 12v to 5v, and then running a servo lead from Aux 4 to the Richen sensor, the plug labeled “GND 5v Signal”

Params are set as they are in earlier posts. Unfortunately this setup still doesn’t seem to work on 3.6.10 or 3.6.11 which caused a lot of head scratching. Looking forward to the release of 4.0 so I can implement on my aircraft.

Hello JDeForest

I have sorted this issue of displaying the liquid level…
1st use the Aux port u like, in my case I left the BRD_PWM_COUNT=4 where my AUX 1,2,3,4 works as the Servo outs and AUX 5 and 6 are PWM in puts.
I connected 5v BEC to AUX 6 as AUX rails don’t provide power and PWM in from Richen Power sensor.is connected to the AUX 5 as the PWM input.
and then in the mission planer I have set the following params

RSSI_ANA_PIN=54
RSSI_TYPE=4
RSSI_CHAN_HIGH=1900
RSSI_CHAN_LOW=1100

Then in the mission planer go to quick tab double click any of the value and select rxrssi .
Then Calibrate the Liquid sensor
Should Have firmware 3.5 or above

Regards
Sanks
(Love From Sri Lanka)

1 Like

I am also setting up a RichenPower liquid level sensor. For RSSI measurement as you explained that it works.
By cons I would like to know if you have successfully integrated it with battery monitoring 2 and also the pause during a mission to reload and restart the mission?
And what parameters did you put for monitoring in batt 2 because I can’t do it yet?

I have not tried to recently to get it working on the Batt monitor system. last time I messed with it was a few months ago, I think the firmware version was copter 4.0.2. I think fuel level PWM was missing from the the monitor type at that time but seems to appear now in the params. I am still using RSSI as I never got the BATT settings to work. Could be worth another try now. As James says above params should be:

I do not know anything about the mission pausing for refuel

I tried with these parameters but I did not succeed. I would try again tomorrow to see.(
I am version 4.0.3 )

Well I try again it works well for reading under RxRSSI on the other hand in reading Batt2_Current I have nothing that appears. I continue to investigate

Other people who use this function and who could help me ?

Si quelqu’un à refait des essais et que sa fonctionne je suis preneur ?

Hi, to address the liquid level indication and incorporation an action promted by detecting a liquid at a set level this here is my current solution.(for my gas powered airplane, using richen power liquid level sensor).

The sensor outputs pwm 1100-1900, so i have connected to channel 8 or 7 of the pwm-ppm encoder, the remaining channels are from a receiver, and the ppm feed to FC rc in. If your receiver is ppm only or sbus only, use a ppm/sbus-pwm to decode to pwm that will feed to a second pwm-ppm/sbus, where one channel-x is from the richen sensor.

So essentially the archiement here is that the sensor is now RCx in, (the assumtion is that rc radio has been prior caliberated with as many channels up to 8/x )

On the servo output tab under mandatory vehicle hardware, set one of the servo out put to be RC x in, basically to be controlled by the channel assigned the sensor.

The tab has a green slider indicator showing the channelx pwm value, thats your fuel guage now, set it to 1100min and 1900max.

Also you now have a channel input which u can use its value to initiate a flight mode action at a specific level, eg rtl/maybe pause mission, or whatever.

This is a solution i finally came up with after looking for liquid level indication solutions for weeks, i was not satisfied with wat i was getting.

Rssi method (as described in the above threads) can be used simultaneouly by spliting the sensor our put to rssi assigned port and the rc in channel at the pwm-ppm encoder.

My ideal solution would be to have a widget that uses pwm signals detected from FC aux channels or even mains, and user can customize to create several guages and caliberate them, or have an airborne rc tx that sends pwm signals to a ground rc receiver, then build my own guages driven by servors. Please anyone ever thought kf this yet, or know which radio can be used like that?

Servers by jDrones