Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Basic battery monitoring ideas.
#1
I need some assistance.

Now that I have my influxdb and grafana all set up I would like to have a device send my battery voltage to the influxdb via wifi.
I have a 48V nominal Pb battery bank that I would like to monitor.
I have looked, obviously not everywhere, but I can't seem to find a simple solution for this.
If anyone has a solution to monitor my battery bank with something like (RPi, arduino, or some other way) as to send this data to my influx db that would be highly appreciated. Once I get my powerwall set up with a BMS probably Batrium I won't need that anymore but in the meantime what to do? 
Additional sensors could include temp, humidity barometric pressure. Those I seem to be able to find but the Voltage one seems to elude me.
Any ideas?

Thanks in advance.
Wolf
If 18 X 650 = 2200+mAh then we have power! 
May all your Cells have an IR of 75mΩ or less Smile
Last count as of 8/7/2019
Total Number of Cells Recorded and processed                 6149
Total Cells required for PowIRwall                                   2856
Total Cells ≥2200mAh, ≥80%, ≥35mΩ, ≤75mΩ, ≥4.12V   2760
For Info Google Drive
Not your average Wolf       
            Cool
Reply
#2
This isn't off the shelf, but its not hard to use one of the wifi controller chips, aka ESP8266 chips to do this for you with a minimal number of external parts. A couple of the models have an analog pin for which you could use to monitor voltage via a simple resistor divider. Check out this: https://randomnerdtutorials.com/esp8266-...h-nodemcu/

Then it would be a matter of writing the code to read the value and send it upstream via wifi in some kind of timed loop I'd imagine.

FYI: Keep in mind these ESP8266 boards work at 3.3v and not the usual 5v arduino
Reply
#3
I don't think there is an easy answer. 

Your best bet is going to be either an arduino with an esp8266 to send data over WIFI or an ESP32 that has enough analog inputs for you to be able to use them. No matter what, you'll need to develop the hardware yourself from scratch and write all the code from scratch.
Well, you've got the majority of work left.

I've got my system up and running now - and trust me, you did the easiest part. Getting data into influxdb is the hard part. Good luck man. Check youtube there are a bunch of tutorials , all of which skip over some very important steps.
I'm working on some code at the moment. When I finish it, I'll have code for an esp8266, and an image of a pi to allow for all of this monitoring.

The issue with influxdb and grafana is that they aren't good for streaming data - as in, they are great to show data taken every couple minutes - but I want to know my voltage and temperature instantly. So I use MQTT for everything - but I have important information live streamed and displayed in Node-Red, and then once every five minutes it sends an AVG value via MQTT to Node-Red which then pushes it to InfluxDB and Grafana picks it up from there. You don't want to live-stream data to influxDB because then you'll just have way too much data in there - and if you use a PI, you'll destroy your storage medium fast.
Reply
#4
The BMS described in
https://secondlifestorage.com/t-Good-Chinese-BMS-review

seem to have a serial output which they use to connect to PC and App, and as far as i have understood they have published the protocol in a terrible excel sheet.
Since you can see all cell voltages , and much more, that should be a possible basic unit for you.

a 13 S and 14 s system is available, but you have to order them as matching, they are not universal. 30 bucks.
1 kWp in Test
4 kWh battery target - plus Mobile Home battery
Ultra low cost
Electronics ? No clue. Am machinery engineer.
Reply
#5
(04-13-2019, 01:39 AM)Mikethezipper Wrote: I don't think there is an easy answer. 
@ Mikethezipper

Well you were right there wasn't an easy answer but.........
Over my holiday, (for Sean's benefit) my Vacation I immersed myself into learning the Arduino IDE.
I was very successful.
Using an ESP8266 board I installed a BME280 i2c board for environment stats and calculated a Voltage divider for 100V max to 3.3V for the A0 pin.
So far so good I got all the right outputs going to the serial monitor. Then Wifi and then sending data to the influx db.

The results in grafana 

I built 2 of the ESP8266 boards just to see the difference in V if there was any. .07V eh not bad for a 10 bit resolution
There is some noise in the measurements if you read the data by the second so there are some solutions that I will try. There are suggestions to read the inputs twice in rapid succession and discard the first reading. Also a .01uf capacitor connected to pin A0.

Next step is to work with this code on an ESP32 and use all 8 available ADC inputs on the ADC1 SAR. ADC2 SAR is used by the Wifi so no go there for the other 10 ADC channels. If I need more ADC channels I can always use another ESP32 they are cheap enough.
The noise may be less noticable on the ESP32 as it has 12 bit resolution. At least I am hoping.
My next update on this I hope to have at least my 3 arrays and 2 battery banks recording. Possibly I will throw some current readings in there also.

As far as Grafana is concerned the readings update fast enough for me as I am injecting data every 5 seconds. If the database grows to quickly I can always change the retention policy or slow the data feed down some.

Wolf
rettore and Oz18650 like this post
If 18 X 650 = 2200+mAh then we have power! 
May all your Cells have an IR of 75mΩ or less Smile
Last count as of 8/7/2019
Total Number of Cells Recorded and processed                 6149
Total Cells required for PowIRwall                                   2856
Total Cells ≥2200mAh, ≥80%, ≥35mΩ, ≤75mΩ, ≥4.12V   2760
For Info Google Drive
Not your average Wolf       
            Cool
Reply
#6
Did you get your IotaWatt posting to anything other than eMon yet Mr Wolf ?
Reply
#7
(07-15-2019, 03:36 PM)Sean Wrote: Did you get your IotaWatt posting to anything other than eMon yet Mr Wolf ?

Oh yes actually the IotaWatt is posting to my locally hosted Influxdb http://wolftech.mynetgear.com:4562
You can log in as guest and password is guestw and look around.
The default dashboard is Westbrook Plant. There is also a Just Guages and the new one called Sensors
I also post to PVOutput  https://pvoutput.org/list.jsp?id=74397&sid=65985
So yea the IotaWatt is posting to all 3. Emon is here https://emoncms.org/dashboard/view?id=53517 for those interested.

Wolf
If 18 X 650 = 2200+mAh then we have power! 
May all your Cells have an IR of 75mΩ or less Smile
Last count as of 8/7/2019
Total Number of Cells Recorded and processed                 6149
Total Cells required for PowIRwall                                   2856
Total Cells ≥2200mAh, ≥80%, ≥35mΩ, ≤75mΩ, ≥4.12V   2760
For Info Google Drive
Not your average Wolf       
            Cool
Reply
#8
(07-15-2019, 04:04 PM)Wolf Wrote:
(07-15-2019, 03:36 PM)Sean Wrote: Did you get your IotaWatt posting to anything other than eMon yet Mr Wolf ?

Oh yes actually the IotaWatt is posting to my locally hosted Influxdb http://wolftech.mynetgear.com:4562
You can log in as guest and password is guestw and look around.
The default dashboard is Westbrook Plant. There is also a Just Guages and the new one called Sensors
I also post to PVOutput  https://pvoutput.org/list.jsp?id=74397&sid=65985
So yea the IotaWatt is posting to all 3. Emon is here https://emoncms.org/dashboard/view?id=53517 for those interested.

Wolf
I dont seem to have the patience to get to grips with yet another graphing application - I have a good few years worth of PVOutput generation data online, and I see Iotawatt can post usage ... another rainy day project.

Have you seen the emonDC ? - there might be something you can glean for your project.

https://github.com/danbates2/emonDC

Reply
#9
@ Sean,

Interesting!

I will keep an eye on this. 
At this time though I am trying to get away from putting data out on the web. Just trying to keep it inhouse.
Plus its a new learning experience working with Arduino IDE and building my own sensor arrays. Giving my brain some 
challenges is good.

Wolf
Sean likes this post
If 18 X 650 = 2200+mAh then we have power! 
May all your Cells have an IR of 75mΩ or less Smile
Last count as of 8/7/2019
Total Number of Cells Recorded and processed                 6149
Total Cells required for PowIRwall                                   2856
Total Cells ≥2200mAh, ≥80%, ≥35mΩ, ≤75mΩ, ≥4.12V   2760
For Info Google Drive
Not your average Wolf       
            Cool
Reply
#10
Mr Wolf,

Glad to see you got it up and running. Another possibility is to use your charge controller. What I'm actually going to do is to use an ESP8266 and RS485 to TTL converter to get data straight from my charge controller. Having voltage is nice, but it's only some of what's going on. Without also knowing how much power is going in or out, it's not the whole picture. For most uses though, voltage is enough to get an idea of what's going on - and knowing your voltage now is better than knowing your voltage and currents after another two months of development Tongue

I was going to use an ESP to do voltage monitoring until I realized that it's only got a 10 bit ADC, and even then it'll only tell me voltage. Also, the measurement is only as good as the reference voltage, which for that chip I don't think it's any good. Basically, I suspect it is susceptible to both temperature and voltage fluctuations into the esp chip... but I'm not sure.

As for how to get better readings - you can always take 10 readings and average them - but the noise in the readings will get averaged in too. What I've done in the past is to get say.. 10-20 readings, and take the median of those readings. That should give you the most accurate measurement of the voltage without temperature compensation.
Reply


Who read this thread?
97 User(s) read this thread:
sl1me (04-19-2019, 08:48 AM), newone972 (07-17-2019, 09:13 PM), Lordsangreal (05-12-2019, 05:44 AM), wind0r (04-16-2019, 03:44 PM), kevinjaye (08-09-2019, 02:05 AM), derekisastro (07-09-2019, 12:57 AM), OffGridInTheCity (08-05-2019, 06:11 PM), bertvaneyken (04-14-2019, 08:34 PM), ma3006he (08-11-2019, 01:53 AM), fleming (04-15-2019, 08:54 PM), BarryG (08-07-2019, 05:58 PM), RikH (08-06-2019, 08:23 PM), ajw22 (08-09-2019, 01:51 PM), Dirty Optics (08-08-2019, 03:36 AM), Wolf (08-15-2019, 06:43 PM), 5buBZMKeJZgapTGsbGzKf (07-20-2019, 06:14 PM), camthecam (04-13-2019, 09:57 PM), Generic (08-11-2019, 03:31 AM), nuckles (04-12-2019, 11:24 PM), rettore (07-17-2019, 07:33 PM), Solardad (08-08-2019, 10:58 AM), stevelectric (07-17-2019, 02:36 PM), eric.peton@laposte.net (08-05-2019, 09:23 PM), wreckless (04-12-2019, 08:24 PM), 100kwh-hunter (08-03-2019, 03:13 PM), krobertson (07-20-2019, 10:28 PM), stok (07-23-2019, 12:08 PM), goran (07-08-2019, 12:47 AM), evbkz (07-20-2019, 05:23 AM), 3xtr3m3 (08-09-2019, 03:55 PM), drnickriviera (08-11-2019, 09:13 PM), jiggyjonboat (Yesterday, 10:00 PM), Nickonet2000 (08-18-2019, 07:04 PM), Funkadelicious (08-20-2019, 10:25 AM), Cheroki (08-13-2019, 07:15 PM), kimbo (07-16-2019, 05:14 AM), Luis (07-31-2019, 10:26 PM), juanjo57 (08-07-2019, 04:06 AM), bairleafarm (04-14-2019, 08:24 AM), Scott_C (05-01-2019, 04:22 PM), ben teker (08-06-2019, 09:35 PM), BitcoinBandit (04-25-2019, 07:59 AM), A713083 (04-30-2019, 07:00 AM), MrRoyal007 (05-14-2019, 02:03 PM), billvon (07-16-2019, 06:02 PM), Karesi (06-04-2019, 12:17 AM), Saiya (08-08-2019, 08:44 PM), Feepjr (08-20-2019, 05:08 AM), runsnbunsn (07-21-2019, 07:28 PM), AZ_Tekkie (04-12-2019, 06:56 PM), Geek (08-08-2019, 12:44 AM), Ivo Staelens (08-07-2019, 07:40 PM), emerca (07-17-2019, 09:31 AM), Oz18650 (08-08-2019, 10:55 AM), Nikhil Mahajan (04-18-2019, 07:48 PM), Ste Collister (04-28-2019, 08:33 PM), djuro (08-06-2019, 11:16 AM), BaronVonChickenPants (07-17-2019, 05:36 AM), drchips (04-13-2019, 08:02 PM), HughF (08-09-2019, 06:01 AM), Stefaan De Ridder (07-15-2019, 05:33 PM), tamkov (04-22-2019, 07:08 PM), daromer (08-08-2019, 04:34 AM), Sean (08-08-2019, 12:46 AM), Majorphill (08-09-2019, 02:25 AM), Korishan (08-08-2019, 12:58 AM), PAF (08-07-2019, 03:08 PM), Franky Beuselinck (07-17-2019, 08:59 AM), jdeadman (08-08-2019, 02:09 AM), wim (08-05-2019, 06:31 PM), watts-on (08-06-2019, 11:50 AM), Hanssing (08-08-2019, 04:48 AM), Issac (08-06-2019, 09:05 AM), Headrc (07-15-2019, 02:33 PM), Bubba (08-07-2019, 10:31 AM), Cherry67 (08-05-2019, 07:25 PM), Walde (07-17-2019, 01:53 PM), Riplash (07-20-2019, 12:55 PM), Katarn_89 (07-27-2019, 02:51 AM), w0067814 (04-12-2019, 07:17 PM), Mikethezipper (08-08-2019, 12:36 AM), Dovespark (08-07-2019, 05:08 PM), chuckp (08-05-2019, 06:39 PM), emuland-metroman (08-07-2019, 06:23 PM), choncy12 (08-07-2019, 01:11 PM), whisperbot (06-23-2019, 08:34 AM), kanchana (05-21-2019, 02:54 PM), ARLISS (07-17-2019, 04:12 AM), Crimp Daddy (04-18-2019, 06:14 PM), jonyjoe505 (04-14-2019, 04:43 AM), Redpacket (07-18-2019, 11:12 AM), mldee (08-07-2019, 09:29 AM), completelycharged (08-24-2019, 03:46 PM), Ibiza (08-05-2019, 07:58 PM), Oliman (07-15-2019, 08:21 PM), SilverNodashi (04-26-2019, 04:45 PM), Beholder (08-08-2019, 06:13 PM)

Forum Jump:


Users browsing this thread: 1 Guest(s)