Trying to find a device to measure the voltage of a 12v battery which I use to start my generator. The generator / battery is in a shed in a remote location and is charged by a small solar panel.
I’d like the device to be powered by the battery as it is sending its data back to HA via either wifi or Bluetooth. It would work much like a temperature sensor, except we’re logging volts vs. temperature readings.
In your situation, you power it from the battery you are going to measure AND in order to actually measure the battery’s voltage, you also need to connect it to the proper input.
In your situation, I assume you power it with 12V from the battery(1 and 2), and also to (3 and 7).
This Shelly can also be powered using 5V, like USB, but in your situation you can simply use direct battery feed.
Measure voltage will be visible in the WebUI and of course in HA.
@ Using pins 1 OR 2 AND 7(GND) for powering is good because it doesn’t have to be constant but must be within specified range (9-28V), at least to my understanding. So in your situation the range might be like 12-15V(no charging/charging).
@ I have edited info about using pins after some more digging.
Hey, thanks so much Juras. I wired pos from batt to 1 & 3 - and neg from batt to 7 and it worked like a charm.
For anyone else’s benefit:
To connect to your Shelly device, connect your device to the Wi-Fi network with a name(SSID) like shelly1 - 84CCA87D??? . Use the universal IP address for all Shelly devices - 192.168. 33.1 to access your device’s Web Interface, where you can set a Wi-fi network for the Shelly uni to connect to.
There’s something else to add. First, you need to activate the voltage sensor on the Shelly Sensor. Go to the web interface of the Shelly (http to the IP address), then to peripherals and add the voltmeter. Refresh the device in Home Assistant, and you should see the values coming through!
With this setup, does the solar charger cause the reading to be higher than normal while charging? We have a trickle charger on ours but keep ending up with bad batteries
Yes. I have noticed this with my solar charger and 3.7V LiPo battery - but mine is only about 0.3V higher when there is sun. I think of it as the charger having a higher voltage to push the power into the battery.
I found the power module for my hobby greenhouse to be the most involved part. Trying to work out how big a battery I will need to last 3 days with no sun in winter, how big a solar panel to keep it charged, and how to reduce the power consumed by the rest of the system. So many factors that are variable.
How long does the battery last ? Is it the charge which runs out, or is the battery physically dead (unable to charge) ? What battery and charger ?
First thing to check is how much power is your solar panel actually generating. Most panels specifications are "theoretical maximum" - not what anyone gets in the real world. Consider also that every day is not bright sunshine, so won't generate as much power; and your panel is almost certainly fixed, so can't track the sun for optimal angle of reception throughout the day/year.
Next major issue is to adjust how often your measuring device is doing the checks ... though if you use a device like a Shelly you may not have any control over this. If your battery is running down slowly, checking once per day may still give you enough warning to do something about it. In my case I discovered I can plug a powerbank into the USB port on the solar charger to give it a boost if needed.
In my case I'm using an ESP32-S3 as my main microcontroller, with a DFRobot Solar Power manager board, 5000mAh LiPo battery and had to add an INA3221 to measure power to/from the battery, and from the solar panel. I also had to upgrade to a bigger solar panel. Much of my findings in Notes on ESPHome deep_sleep