question

Jonathan Walton avatar image
Jonathan Walton asked

Use Raspberry Pi to switch diversion loads based on battery voltage from BMS

Hello, Victron community!

I have an idea to control the diversion loads on an off-grid system based on the battery voltage info received from the BMS. I have a Pylontech battery bank made up of 12 Pylontech US3000 batteries all connected to a Pylontech hub and then connected to my Venus GX.

Basically, I am looking for a way to access the voltage information from the BMS and then sequentially switch on 10 maybe even 12 logic outputs as the battery voltage rises from a certain point. And then as the voltage falls sequentially switch them off again one by one.

I am aware that the MPPT chargers and the Quattros in my system can do this but I need more outputs, which is why I thought of using a Raspberry Pi or a PLC of some kind.

I am new to the world of Raspberry Pi so any information would be greatly appreciated

Many thanks

Jonathan

MPPT ControllersMultiPlus Quattro Inverter ChargerVenus OSPylontechRaspberry Pi
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
wkirby avatar image
wkirby answered ·

The best way I can think of is to run NodeRED on the RaspberryPi and then use a modbus TCP module to read the parameters of the Pylontech battery from the VenusGX.
Then create a NodeRED flow to switch the GPIO outputs on or off as you wish.

It may be better to use the SOC value of the Pylontech rather than Voltage since Voltage does not change very much in the middle 40% or 50% of those batteries.

2 |3000

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

Jonathan Walton avatar image
Jonathan Walton answered ·

That's great, thank you for that, I need to do some more research to familiarise myself with the Raspberry Pi and Node-RED and then I will give it a go.

2 |3000

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

Jonathan Walton avatar image
Jonathan Walton answered ·

Ok so I have done some research into node-red and the Rasberry Pi and I think I am ready to give it a go. Thank you for your advice about using SOC instead of voltage, that will work better for my application.

Just one more question - Is the Raspberry Pi reliable enough to put into an off-grid system that we are going to be reliant on? Or am I better going for a Branded PLC such as Siemens or Schneider.

I would connect the Raspberry Pi to a UPS and I would of course keep it in a warm/ dry environment.

I would prefer to use a Raspberry Pi purely because of the amount of help and information available online, however, I do question whether a device that costs so little would be up to the job.

Any advice you could give would be greatly appreciated

Many thanks

Jonathan

2 |3000

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

Mark avatar image
Mark answered ·

You don't even need an extra device/Raspberry Pi, if you already have a VenusGX you can install the Venus 'Large Image' FW directly onto it, see https://www.victronenergy.com/live/venus-os:large.

I have very complex Node-RED logic and dashboard working fine on both a CerboGX and a VenusGX.

Even with a VenusGX or CerboGX you can still use Modbus and other protocols to communicate with/control external devices (like a compatible relay board or power regulation device), via Node-RED.

2 |3000

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

Jonathan Walton avatar image
Jonathan Walton answered ·

Ok thanks for that, that's even better as I already a Venus GX. Do you have any recommendations for compatible relay boards? I am looking to switch maybe 15 outputs in one location and another 10 in another location on-site (all connected to the same LAN). I have been looking but there are so many to choose from!

2 |3000

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