Zigbee or Tasmota Based 12v Battery voltage monitor wanted!

Hi All, hoping that someone out there might be able to help with this perhaps odd request.

I am trying to find or build something that will monitor the battery voltage of my car when sat in the garage so I can automate turning the charger on and off when it drops (car sits over winter).

For the sake of simplicity I need to get something that will report the battery voltage of a 12v device which can then be interpreted by Home assistant to automate. I figure Zigbee as I already have that in my network but Wifi/Tasmota would also be an option if that could work.

I have found something called Zigboat that does that job for a boat battery but is really expensive. I’m hoping to find something alternate that will do the job.

I did find that the RGB Zigbee controllers run off 12v but I dont know if they will report the voltage or battery status (probably not)

is anyone out there who is a tech wizard interested in helping me out to get something put together?

Many Thanks in advance!
Kev

Dumb question, but wouldn’t it simply be easier to remove the battery from the vehicle and store it in the house so it doesn’t discharge? That’s what I do. :wink:

Regarding Tasmota, you’d use an ESP9266 based board like a D1 Mini and connect your battery to the analog port via a voltage divider. Tasmota has an option to decouple the analog pin from measuring VCC. Note your voltage divider would need to bring about max 15V down to max 3.3V for the ESP8266. The divider would need to be a 10K and 2.8K resistor to give about 3V output maximum.

There are a couple esp8266, esp32 and similar projects floating around the web I think. This looks like a good basis for any hardware build. Car power is a notorious thing!

You might have a this product. Nice to have something purpose built. Looks like the guy at the second link below figured out how to read the data in python from the products web api. That is pretty close IMHO, but it would be better to sniff the local traffic this device sends up to web and hopefully find a way to talk to it locally on your network. No cloud services involved.

Good hunting!


1 Like

Hi All.

I just wanted to update that I did eventually get something sorted out with this. I build some monitors using nodemcu’s and started with tasmota but migrated to ESP Home eventually. I Have 3 of them running great and use them to report voltage to Home assistant so I can turn the chargers on and off using smart sockets.

This provides a better platform than just leaving the chargers on to auto charge as this never seems reliable enough.

They have been running since January and work very well!

Cheers
Kev

I want that too! There is a zigbee sensor from a company called “zigboat”, but is very very expensive.
Also there is a nice device called “fibaro smart implant”, but it is only for zwave.

Can you share your hardware and code?

Hi, I did a youtube which documents the tasmota build.

This will work fine, I’ll update on my change to ESPHome later on which is just a software change.

Hope this helps.

1 Like

How I did it also. I have a temp sensor in the box too, just because I had spares. Used deep sleep to save the battery drain. Biggest drain is the 3.3V regulator.

esphome:
  name: battery_mon_1
  platform: ESP8266
  board: esp01_1m

wifi:
  ssid: " "
  password: " "
  output_power: 17db
  fast_connect: true
 
  ap:
    ssid: "Battery_Monitor_1"
    password: " "

captive_portal:

# Enable logging
logger:
  level: VERBOSE
  
# Enable Home Assistant API
api:

ota:

# Example configuration entry (min run duration of 15s works OK)
deep_sleep:
  run_duration: 20s
  sleep_duration: 30min

# Example configuration entry for Dallas Temp Sensor DS18B20
dallas:
  - pin: GPIO2
    update_interval: 1000s #set so it only send one sample per wake-up cycle

# Example configuration entry
sensor:
  - platform: adc
    pin: A0
    name: "Battery Monitor 1"
    filters:
      - offset: 0.0
      - multiply: 16.0
      - median:
          window_size: 10
          send_every: 10000    #make longer than sleep delay to only send once...
          send_first_at: 10      
    update_interval: 1s
    
  - platform: dallas
    address: 0x9E8000001EBDB728
    name: "Battery Mon 1 Temperature"
    
  - platform: wifi_signal
    name: "Battery Mon 1 WiFi Signal"
    update_interval: 1000s    #set so it only send one sample per wake-up cycle

Is this kind of approach possible for higher voltage batteries? Like my 48v ebike battery?

This approach is only really useful for such a setup. The 40V eBike battery will be lithium. Lithium do not like to be “floated”. So you charge them to absorbsion voltage for a while or until the current tapers off, then you leave them alone until they discharge 10% or so and top them up.

The OP I believe is trying to maintain a lead acid car battery?

In which case it should just be connected to a 13.6V charger permenantly. This will give the best battery health and life span.

Lead acid batteries have 2 distinct states.

  1. Floating at 13.6V on a trickle charger.
  2. Aging and dying.

Literally they are only stable at 13.6V. Any lower or higher and they are suffering degredation.

A common-or-garden solution to this is to put a small 20W solar panel with a open circuit voltage of roughly 13.6V directly across it. The pair will work it out together and the battery will get charged and floated during daylight to 13.6V.

If you can’t find a panel with 13.6V OCV, find one with 14.xV or even 15.0V and stick a few diodes in series with it. Besides at 15.0V a panel will produce 0A. A 20W 12V Panel with an OCV of 15.0V might only produce a couple of watts during peak daylight at 14.40V. So it’s unlikely to overcharge the battery for the few hours it will hit peak output.