# Low Voltage Disconnect/Reading Voltage from 12v

Hi all,

I am getting into making my own diy solar weather station.

Currently:
the station consists of an arudino & lora module, solar panel,12v 12ah battery, pwm charge controller(to keep things cheap), and a 12v.5amp solenoid valve.

Question:
how can i read the voltage off the 12v battery and perform an action once it drops below a certain level. I want to do this cheaply, safely, and without adding too many other devices to avoid power losses.

Lead acid batteries cant be discharged over 50% or they will be damaged. I need the arduino to send a message when the battery is below a threshold. I have another esp32 with deep sleep, so if I am using this module i will use the battery readings to determine when to enter deep sleep. I know how to send messages and perform the coding half of this project, I am just confused on how to monitor battery voltage.

thank you! any help would be greatly appreciated

Welcome to the Arduino forum.

However, you need to rethink how you test the battery capability by using just the voltage.

A lead-acid battery will show 12 volts when there is NO capability of supplying much current. You need to draw some amount of current from the battery while measuring the voltage.

Paul

could this be done with a voltage divider? is this the most basic/simple answer to my dilemma?

Google info on lead acid batteries there is a lot of info on the discharge verses voltage characteristic

Yes !

For the Arduino the normal voltmeter method is to use a potential divider to get the maximum voltage down to within the measurement range on an analog input . I would use the internal voltage reference ( around 1.1v) , and scale your max voltage to that .

You need to be careful that voltage should not be present on the divider when the Arduino is not powered . Aim to use something like 1-4k7 as the “smaller” resistor .

ok thank you. It looks like deep cycle batteries can tolerate 80% drainage. but would prefer to avoid that.

So i would need a switch that allows power to go to the analog pin when the pi turns on? What are some ways your recommend doing this?

I have some small transistors and a mosfet, would switching on one of these on to read the power output from the battery be feasible?

In my head I am envisioning the arduino switching on a transistor or mosfet... then the power goes to a voltage divider where an anlog pin is reading the voltage.

When you say... ". I would use the internal voltage reference ( around 1.1v) , and scale your max voltage to that ." what do you mean by this? does that mean anything read by an analog pin is "referenced" by 1.1v?

im assuming i would also have to use some form of isolation from the battery? maybe in the form of an octocoupler, but that would add comlexity im assuming

mesand:
It looks like deep cycle batteries can tolerate 80% drainage. but would prefer to avoid that.

IMHO it is myth that some lead acid batteries should not be discharged below 50% though it's probably a good idea to limit the discharge of any lead acid battery to 80%. But what really damages lead acid batteries is leaving them partially charged for long periods. They need to get a very full charge about once every 7 days and if your solar cells can't do that then you need to do it with a mains charger.

And what eventually wears the battery out is the accumulated number of amp-hours that is taken out and put back in.

...R