question

looknow12 avatar image
looknow12 asked

Mopeka Liquid Sensor, Cerbo not reporting accurate Level

As you can see below. The level appears to be wrong if you use the formula Sensor value divided by Sensor value when full. Should be 32% where as here it reports 15%cerbo.png

cerbo gx
cerbo.png (102.7 KiB)
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

5 Answers
pwfarnell avatar image
pwfarnell answered ·

I do not agree with your maths, but the reading does not seem correct either.

The unit has a setting of 2.0cm when empty, so the range is 15.5 - 2.0 = 13.5cm.

The measured level over and above the zero reading is 4.9 - 2.0 = 2.9cm

The level I believe should be 2.9 / 15.5 * 100% = 21.5%.

I have the LPG sensors and the % reading on my Cerbo is a little different to the Mopeka app. I always wondered if this was due to Mopeka allowing for the dished ends on the LPG cylinders. I do not know what value the Mopeka transfers to Venus OS, level in % or depth in cm/ inches.

1 comment
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

looknow12 avatar image looknow12 commented ·
The current value transferred is cm. It's shown in setup Under that device
0 Likes 0 ·
looknow12 avatar image
looknow12 answered ·

Yes, I tried it also backing out the sensor value when empty. It's closer. I also messed around and tried resetting the empty value. The reason I chose the 2cm is I drained the water tank and when it was empty I saw 2.0 as current reading and set that as empty. I reset as 1.0cm and now I have 21%, should be ~25%.

Someone from Victron please check out math, or let us know how the % of tank level is calculated. Thank you

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

mvader (Victron Energy) avatar image
mvader (Victron Energy) answered ·

Hi all, The source code is here:


https://github.com/victronenergy/dbus-ble-sensors

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

looknow12 avatar image
looknow12 answered ·

Here's where I think it's calculating

static const float mopeka_coefs_h2o[] = {

0.600592, 0.003124, -0.00001368,

scale += coefs[0] + coefs[1] * temp + coefs[2] * temp * temp;

level = rv * scale;

veVariantFloat(val, level / 10);

Where the % is level. But if this is the section, I don't understand the formula.

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

mje avatar image
mje answered ·

It would be cool if the current life duration could also be calculated i.e. when will my gas bottle reach empty ... just like the Batter Shunt can guess on the expected Battery life.

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.