Jump to content

Battery monitoring online using Raspberry Pi and Victron BMV


spirou

Recommended Posts

I've been playing with this idea about a year ago but hardware incompatibility made it more difficult than it had to be so I gave up. Recently everything fell into place as I got my hands on a loaned new Raspberry Pi (ver. 3b) so I got to work again and installed Victron's open source Venus OS https://github.com/victronenergy/venus/wiki

I can now monitor the leisure battery state online on the VRM portal. Data is logged at 15min intervals (can be whatever you want) and sent online whenever it connects to a known wifi signal.

 

Venus can do a lot more that that if you've got the necessary/compatible hardware but battery monitoring is what I'm interested in.

 

I'm attaching a screenshot of this past week when the van was constantly parked at home so not much going on. I've got a trip coming up soon where I'll be off grid all week and I guess that will be more interesting. Days are getting shorter and I'll be in an alpine valley so solar output might be miserable. It has to be said there is a downside to all this. Raspberry consumes 0.15-0.2A which equates to about 2Ah during the night. Not much but possibly significant during dark winter days. I'll investigate whether there's a way to lower it further.

 

I'll evaluate again after about a month and see if it's worth continuing. It does raise the question of whether very shallow discharges count as cycles or not? Whether it might actually help with neutralising negative effects of long term charging and so on. Anyway, so far just technical curiosity.

vrm.thumb.png.c674b4074053b6e0c86b53dc98d28ac2.png

Link to comment
Share on other sites

That’s cool! I have a BMV and had toyed with the idea of logging data on a laptop but now you’ve set me off looking at getting a Raspbery Pi. Is it a wired connections to the BMV or bluetooth? I haven’t touched Unix / Linux in years - was it straightforward to configure Venus for logging and onwards transmission or did you have to invent which would probably put it beyond me! Thanks for sharing.
Link to comment
Share on other sites

I have a USB cable so haven't looked into bluetooth. I think it also works. Setup is straightforward enough, just burn image on SD card, connect to wired ethernet, use another computer on same network for a nice graphical remote console via LAN (firefox doesn't work!) and add as many wifi networks as you want (I will use home router and two phone hotspots for travel). There are a few weird bugs around e.g. make sure you type wifi passwords correctly the first time otherwise the network just dissappears from the list as if it was permanently blocked. After you set things up on the device and sign up for VRM take it to the van and it should start sending data.

If it has a connection you can also change settings via VRM portal but initial setup needs to be wired. But no weird linux/python skills necessary ;-)

 

Please take a good look at the documentation as not all RPi versions work properly and you could also use beaglebone which might have lower power consumption.

Link to comment
Share on other sites

Having spent my career in Electronics and IT, the technology interests me, but as a long time Motorcaravanner, my aim is to remove technology from my vans and keep things as simple as possible.

 

So while I admire the ingenuity of it, I question the need for constant monitoring. I use my van regularly and 'keep an eye' on things. It works perfectly and that's good enough for me.

Link to comment
Share on other sites

  • 2 weeks later...

Yep, same. Curiosity, exercising brain cells by investigating areas of interest. It often leads to other interesting discoveries. We were reflecting only an hour ago while exercising and listening to bands we have found in recent years. And also planning more e-bike rides. None of which we would have been doing is we hadn’t accidentally fell upon motorhoming in 2014 after hiring in NZ as a convenience...

 

Thank you for the BT info. I did look into the various Rpi versions as you suggested and had formed the opinion that BT did not work on the latest board. I have the Victron BT module attached to the BMV and believe that this needs to be disconnected to allow the serial cable to be attached to the same port. Putting this information together with the £20 cable cost (not a big issue) and the RPi high power consumption (much bigger issue, thanks for mentioning it) made me conclude that I would not be taking this any further. It did cause me to total up that of the 76 nights we spent away this year, 17 were off-grid with the longest duration being 4 nights. With 180Ah of LFD90 and 120w of solar, I really do not need to be continuously monitoring the batteries in this detail. The challenge of getting it working and monitoring the charging and discharging curves would be fun but I wouldn’t be doing it long term.

 

If the BMV stored the data (within its existing, tiny current usage) and relayed it on demand to the Victron iPad app via Bluetooth for graphical display - that I would pay for. I’m not holding my breath though.

Link to comment
Share on other sites

So I'm returning the RPi 3b+ and my experiment is over after a month. Attached are 3 annotated current/voltage charts for those curious what's going on with the battery in real time. One chart shows the entire period and two are from a day of driving over the Grossglockner Hochalpenstrasse (https://www.grossglockner.at/gg/en/index) to Ljubljana on a sunny day. Logging was set at 15 minute intervals except where indicated otherwise (switched to 1 minute) to see variations more clearly. Especially interesting are the drops when going through the tunnels which clearly indicates how much of the supply comes from the solar panel even when driving and you'd think the alternator takes care of everything. Fridge and radio were the only loads while driving, except for the portion where I turned radio off to see if there's any change.

 

What the experiment proved to me is that my wiring is not even close to ideal for efficient charging while on the move, even though it's technically (almost) to EBL manufacturer specification. I'm also not too keen on continuing with the logging. As mentioned before, the current drawn by the raspberry is small (0.14-0.2A), but it still adds up and not worth it over a foggy winter when the solar panel isn't producing much of anything, or the regulator just doesn't think it's worth it. It's a bit of a mystery actually. I'm thinking the load is too small for the regulator to pick it up but enough for the battery to "notice".

 

It's also why I'm going to study the solar regulator settings a bit more closely as it seems to be cutting off the absorption phase a bit soon. You can see how the daily minimum voltage keeps dropping bit by bit every day so obviously not charging quite enough. There also seems to be a larger than I'd like voltage drop between regulator and battery as there's a noticeable discrepancy between regulator reported minimum/maximum voltage and that from the battery monitor. I might do something about it in the general electrical overhaul planned in a few weeks.

 

As before, questions welcome.

RPi-4week.thumb.png.d6d9b3566096f9504b29bae172136786.png

RPi-1dayDrive.thumb.png.667c88faab6d7769dbb055fc05bed77e.png

RPi-2h.thumb.png.572472c6adaceda417f66d233a42d857.png

Link to comment
Share on other sites

An interesting topic.

 

On your solar charger, do you know at what time in the morning the charger starts its main charge? As this is normally time limited to just a few hours (depending on charger settings), does it start too early in the day (when the sun is not generating much energy) and finishes just about when the sun is at its strongest?

Obviously the main charge requires more power than the float charge, so you could argue the main charge timer should only begin when some predetermined power level is reached?

 

Just out of curiosity, you say you normally log data every 15 minutes. Does the Pi take any measurements between the log intervals and do any statistics on these (i.e average,minimum and maximum readings). Or does it just take the latest reading every 15 mins?

You may be missing some interesting events (ie what is the maximum current ever drawn?)

 

 

 

 

 

Link to comment
Share on other sites

It takes a reading at the set time period (steps between 1min to 1h I think) so everything between is lost. You can see max Ah drawn, last discharge in Ah, minimum voltage, SOC chart in % and a few other things. But no max current. Which isn't going to be that different anyway. At least not in our case since we don't use short term, high current devices such as hair dryers, kettles etc.

 

Regulator starts as soon as it can and finishes/goes to float when it thinks it should based on whatever algorithm and custom settings. I can post a screenshot of one typical cycle later.

Link to comment
Share on other sites

Attaching charts from 2 daily cycles where the van was parked in one spot all day. One is from a trip to Innsbruck, where there was no direct sun on the panel from around 3pm. I just used the van to sleep while I was at a conference so not much load on the battery. Some lights, water pump occasionally and the heater might have turned on one or two times during the night (or not at all).

 

The second is with the van parked at home during a 2 week period when it wasn't used at all so very little charging done.

 

One thing to note, the charging profile (absorption/float voltage) was changed in between so not directly comparable. It's interesting to see for how long the panel is producing enough to balance the 0.2A draw by the RPi (current holding at 0A).

Innsbruck1day.thumb.png.8b4c506085fe05a964b1ccc6b29cf580.png

Ljubljana1Day.thumb.png.1455bfc5510e53435c0d28c7057ac450.png

Link to comment
Share on other sites

  • 1 year later...

It works with nearly all victron components that have either ve.direct interface or bluetooth to send whatever data it can. A BMV or just the smartshunt (BT, no display) will monitor you battery no matter what else is connected there. A more complex setup with more victron components will just tell you more about where power is coming/going. Shunt itself doesn't know or care.

 

These could be helpful

https://community.victronenergy.com

https://groups.google.com/forum/m/#!forum/victron-dev-venus

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...