How to make battery information accessible online?

thanar

Member
Joined
Feb 12, 2018
Messages
155
I have built a few 24V nominal 7s batteries myself and I am also using the generic Chinese BMS with the Bluetooth dongle in all of them. I must admit I'm quite pleased with them, so I'm sticking for the time being, since all the batteries I build are smallish at 2-3kWh, which I then parallel at their outputs if I'm in need of more storage for a particular project.

I've been working as a renewables site engineer lately, planting PV solar parks and I am using these batteries to power the alarm/cameras systems up until the plants get connected to the grid. The original setup was using lead-acids, but given the temperature fluctuations and general awfulness of lead-acid batteries, I am finding that my diy lithium batteries work 5x better.

However, there's something missing; It would really be awesome to have a way to monitor the batteries from afar, since there is already GSM internet installed on each plant. Alarm system and camera NVRs are already online, so it would be great if I could somehow bring battery information of solar charger and stuff online as well.

Question is: Where do I start? What kind of a platform would be necessary for such a mobile solution? Would an Arduino-based board do the trick? Any tutorials available online? I did a bunch of searching, but seems like the stuff I find online require some degree that I don't own, just to be able to understand the basics.

Thanx for any info.
 
on a 48v battery bank i have just bought a victron smart shunt with bluetooth but 15 ft and it is dropping out i need to extend this ?
 
Where do I start? What kind of a platform would be necessary for such a mobile solution?
Get an ESP32, it has WiFi and Bluetooth, you can add a modem to it if you need a mobile connection to send data via an SMS or the internet, however you would have to do it yourself. Maybe you find something simmilar here: https://www.instructables.com/
 
There are several projects that use python scripts to collect the bluetooth data using a RPI. But I can't find them today I know I have seen them here
later floyd
 
I've found a couple of YouTube videos by Robert Flatley and daromer himself, but they both use RPI, which IMHO is an overkill, however quite a straightforward way to set up.
I also found this here video, where this guy with an awful accent says that you only need an ESP32 board and an account to the official Arduino IOT platform?
 
Last edited:
Thanar, what you could do if you have hardware laying around. Take an old computer, any one actually. And install ProxMox on it. Then in a virtual machine (VM) install the software for the RPi.
Then you can use any arduino/stm32/esp32/etc board to send the data to the influx database and use grafana to display the information.
You can also install linux in the VM and install the needed packages like grafana, influxdb, and what ever else is needed.

I say to use the ProxMox because it's easy to set up, and you can make multiple instances of the VM to display different systems (you could also use docker instead, but it's a little harder to configure than just loading up another VM). That is, of course, as long as you have the resources to add more (ram, cpu, drive space).
 
Thanx for the reply, Korishan. Actually, the biggest need for installing this remote monitoring service is because we are really running low on cloudy days, and I want to have as much real-time information as possible, so as I will be able to disable infrared floodlights and/or cameras in advance. So, I guess adding an old (and probably power-hungry) computer to the mix (which would also need a mains inverter) works in the opposite direction.

I was watching some videos online yesterday about how you can easily setup an ESP32 and the like using the Arduino IoT cloud, I will give it a try today. However, thinking about this, I don't know how I can get the battery's voltage reading (24V nominal) over to the ESP32...
 
Ahhh yeah. That does make things a little difficult. That makes sense.

yes, the ESP32 is a great substitute for the RPi for sensor gathering. You can even have basic web server running on it, which is nice. You can't really have anything nice like Grafana or Infuxdb, though :p
But at least you can have some simple graphs to show the past few days of data. Add in an SD card, and you'd be able to store weeks, or months, worth of results.

Which, thinking about it, the SD card would be really nice to have. Then when you want to update the web pages, you just pop the SD out, make the changes, and pop it back in, hit the reset button, and good to go. No reflashing the ESP32.
 
I don't know how I can get the battery's voltage reading (24V nominal) over to the ESP32...
There's actually a few ways to do this. You can use a voltage divider. You would use 2 resistors of a high Ohm reading, 100k, or even 100M is usually used. You connect one end of one to the Pos, one end of one to Neg, and then you use the center to connect to the ESP pins.
I don't recall the math to get the right ratio, but you'll need to use two different values of resistors. If you use 2 equal values, you basically half the voltage reading. So if the volts are 24V, and you use 2x 100k resistors, the output would be 12V.
Using 2 different values will shift the voltage reading in one direction or the other. For instance, if you used a 100k, and a 50k, with the 100k on the Pos side, I think the value would read 16V. Whereas if the 100k was on the Neg side, it'd read 8V.
But definitely look that up to verify :p

The other way is to use another chip to do the readings that can handle the higher voltages. Something like this could work:
 
Back
Top