RPi Venus/Cerbo GX tank measurement

xsilvergs

Forum Member
Well it's still a bit wet for working on the van with the doors open and after a conversation with another member I thought it was about time to get tank measurement working on a Raspberry Pi running Victrons Venus/Cerbo GX ported software.

Luckily my eBay purchase, an MCP3208 ADC chip, turned up this morning a day early. The electronics part was easy but finding the relative posts on the Victron Community forum to update the RPi's code took a bit of time (links below). Having got the tank measurement part working it was then time to simulate a tank sender. Victron have a number of options in there software for resistive type sender units but that is added complication and cost. Using an Arduino is far easier, cheaper and adaptable.

The Arduino, given the tank volume and dosing pump volume can calculate the fuel used by counting pump pulses the amount of fuel remaining in the tank. From this it then produces a voltage relative to the fuel remaining in the tank (1.8v Full, 0v Empty) simulating a tank sender. This voltage is read by the ADC and the value passed to the Raspberry Pi when asked.

And here is a picture of the the Victron GX screen with three tanks. Fresh Water is empty, the Waste Water and Fuel are at 93%.

cp.png


useful links:
http://ww1.microchip.com/downloads/en/DeviceDoc/21298e.pdf
 

st3v3

Forum Member
I'd love for someone to give me an idiot solution to having a couple of temperature sensors hooked up.

Idiot solution means a written SD card and a plug for the IO header lol. I'll pay of course :ROFLMAO::ROFLMAO::ROFLMAO:
 

xsilvergs

Forum Member
I'd love for someone to give me an idiot solution to having a couple of temperature sensors hooked up.

Idiot solution means a written SD card and a plug for the IO header lol. I'll pay of course :ROFLMAO::ROFLMAO::ROFLMAO:

I'm drawing it up right now.
 

xsilvergs

Forum Member
Info to connect MCP3208 ADC chip, this is a rough and ready circuit using the minimum of resistors and capacitors.
Some parts of this drawing are imported from the links I supplied above.
(Untested: For use with Venus or Cerbo possibly only the 270R and a capacitor are required with the Arduino for tank measurement from an impulse pump.)

RPi_GX_Tank_Temp.png
 
Last edited:

Users who viewed this discussion (Total:0)

Top