12V Battery Monitor

50 views
Skip to first unread message

st...@marshallarts.com.au

unread,
Feb 17, 2021, 10:16:48 PM2/17/21
to MppDevices
Hi Mike and everyone.  I've been using MppDevices code in lights and switches here at home for several years, and loving it.  Mike, I'm wondering if you think any of your software might be able to be re-jigged (or used as a base) to function as a battery monitor for a 12V auxiliary battery in a caravan or tug vehicle. It would be hooked up to (and powered by) the battery in question, and would need to be able to measure Voltage, Current (in and out - probably needs a sensor of come sort), and maybe Amp-hours capacity remaining etc etc.  It would need to be able to drive a small display of course, to show the user the present state of things.  And I guess it might be nice it it could talk by Bluetooth to an app on a phone or tablet.  Hmmm, just describing that suggests it could be quite complex!

Anyway ... this is just something that occurred to me recently when I was looking at commercially-available devices, but the decent ones are quite expensive - several hundred dollars here in Australia, and I don't want to pay that much.  Being  an enthusiastic tinkerer, and there being no urgency to have one, I thought it might be a nice project to look into.  Any thoughts or suggestions would be appreciated.

MikeP 4 MPP

unread,
Feb 18, 2021, 2:31:57 PM2/18/21
to MppDevices
Yeah, it does sound like it could get complicated fast!  With the idea of a display and bluetooth I'm thinking an ESP32 (if you needed wifi) would be better than an ESP8266.  Other choices might be the smaller arduinos or even an rPI, I think there's add-on display hardware for all of them.  Voltage/current/power use sensors are pretty easy, but you'll want to double check the accuracy - they tend to be off by quite a bit, esp at lower power use.
I've played a few times with arduino libraries on the ESP32 though and every time I give up in frustration - it seems to be a bit flakey.  The REST interface for AM is pretty simple though, and it's documented on my site.  You could probably cut/paste some of the base library so the devices/sensors you want could show up in AM over wifi.  I don't have anything for bluetooth though.
Stand alone I'd probably want to look at implementing a web server in arduino with a few simple pages to show status and allow for firmware updates.

st...@marshallarts.com.au

unread,
Feb 19, 2021, 5:13:44 AM2/19/21
to MppDevices
Thanks Mike.  Yes, on further thinking, I had also thought maybe an Arduino or rPi might be the way to go.  Thanks for the thoughts, will let it circulate around the brain a bit more...

sergey

unread,
Feb 20, 2021, 3:38:46 AM2/20/21
to MppDevices
Hi Stive,  i've got a solution for 80-220V AC electricity monitoring , i posted  some time ago -Non invasive MPP energy monitoring.  But i'm afraid it isn't exactly what you are  looking for.
My battery device board ( pls look at my last post) can report its own battery voltage and "status of charging" that might represent 12V battery feeding..  or instead of its own battery voltage it can report "whatever you want voltage" connected over resistive divider to A0 of ESP. Otherwise you can make attempt to build your own device , for instance , based on LTC2992 https://www.analog.com/en/products/ltc2992.html .  It would not cost more than $10 in costs.  :)  
Theoretically you could change the standart PZEM004 board for measuring 12V voltage and current. It is based on quite popular energy monitoring chip SD3004  and looking at "typical application" it works from 12V.

st...@marshallarts.com.au

unread,
Feb 21, 2021, 2:48:11 AM2/21/21
to MppDevices
Thanks Sergei, will certainly have a look at those links.
Reply all
Reply to author
Forward
0 new messages