RV Surplus 
 Amazon's RV Store 

Notice: This page may contain advertisements. Click on the disclaimer for details.

Build a Battery/Charger Monitor.



I have been wanting to do this project for a couple of years now, even when I had my Class-C motorhome. I just did not have the ability to economically do so (not so much for me, but for my readers). However, new sources became available in the last few months that allow me to now build the project.



As well, the control panel in my rig has an unused switch position (for a 4th slideout) and it is covered by a blank panel. As "AR" as I am, it just bugs me that there is an unused panel function, but more importantly, it would be cool if I could utilize that location for the Battery/Charger monitor.

So what is a Battery/Charger monitor anyway. It is a device that displays the current status of the Charger (when connected to AC power and the Converter is running), or Battery (when you are off-grid and the battery is discharging).

The "power" of this device is the Atmel ATTiny85, which is a microcontroller. Yes... it's microprocessor controlled. The ATTiny85 will monitor the charger/battery voltage and turn on the appropriate LED indicating the charge state. Slick, eh?

Can't you just monitor the charger with a voltmeter, and why is it necessary to constantly monitor the battery?

Yes, you can use a digital voltmeter, provided you can remember what voltage the Bulk charge occurs at vs. Float charge, and What the battery voltage is when it's 100% charged vs. 50% charged. Who can remember that? Wouldn't it be a lot easier if a LED simply showed the current charge/discharge state?

I designed the Battery/Charge monitor for use with Lead Acid batteries. While you can use the monitor for AGM or Gell batteries, realize that the battery and charge voltages are slightly different. You would have to use those values in the Monitor's software. So you can adapt this monitor for AGM batteries simply with a software change... how cool is that?

The Battery/charge Monitor is simple to use. A Power switch simply turns the monitor on and off, and a Reset button resets the "flash timers" (to be explained later). Operation consists of turning the monitor on and observing the LED indicators.

The power consumed by the monitor is around 10mA, or 0.01A (12mW), and it would take 8,000 Hrs (nearly a year) to fully discharge an 80AH battery. The current consumption during battery discharge is not drastic, but you could reduce the demand further in... you guessed it - software (great, isn't it).

Ninety percent of the current demand of the monitor is from the LEDs. By turning the Discharge LED on for short periods of time, you can get the monitor current consumption down to nearly 1mA (which would discharge an 80AH battery in 9yrs). For example, if the discharge LED were turned on for 6 seconds once per minute, then you could reduce the current consumption by 90%. It would look something like this:



A simple programming change could be done that would insert a 6sec duration for blink, then a 54sec delay.

So why monitor the charger? Many RVs these days have "Smart Chargers", or multi-stage chargers; sometimes referred to 3-stage or 4-stage chargers. A smart charger analyzes the battery and sets the charge rate depending on the needs of the battery... the real reason to know what state the charger is in is because it can detect battery issues.

The typical 3-stage charger will have the following stages; Trickle (also called Float or Storage), Absorption (also called Normal), and Bulk. Each stage presents a slightly different voltage to the battery, and the Battery/Charge Monitor can detect those minute voltage differents and display a Status LED... afterall, it is microprocessor controlled.


Typical charge voltages for a typical Deep Cycle Lead Acid battery are:

  • Bulk charge: 14.3VDC
  • Normal charge: 13.5VDC
  • Trickle Charge: 12.9VDC


Float/Trickle/Storage Charge: Typically, if the battery is in storage with everything disconnected, a small charge will be applied by the charger just to keep the battery topped off, and to compensate for the loss-of-charge leakage that is a characteristic of every Lead Acid battery.

Normal/Absorption Charge: If the battery is in operation; with 12VDC lights on, and the refrigerator controller board powered, etc. the charger will bump up the voltage a bit for a higher charge rate, which essentially replaces what is being consumed by the 12V devices in the rig.

Bulk Charge: If the battery becomes significantly discharged, a higher charge rate yet will be typically applied, called a Bulk charge. Different smart chargers have slightly different charge theories, so the points at which each state occurs may differ manufacturer-by-manufacturer.

Equalization Charge: Some chargers are advertised as 4-stage, with the 4th stage being a "Equalization" charge. However, this is simply a timed Bulk charge. For example, one popular charger manufacturer defines an Equalization charge as applying a Bulk charge for 15min once every 24 hours. The purpose of the Equalization charge is to "shock" the battery, with the idea that this will prolong it's life. A "4-stage" charger is simply a 3-stage charger with an option for a timed Bulk charge.

As you may have noticed, there are several different terms used in the industry for these charge rates. One of the dumbest terms is "Absorption" charge. Who came up with that? Doesn't it make a lot more sense to call it a "Normal" charge - as in normal operation. I selected the terms for the Battery/Charge Monitor for their most descriptive aspect, and more importantly - shorter names that would easily fit on the front panel.




And then there is the discharge mode. A battery will exhibit a different voltage, depending on the remaining capacity:

  • 12.6VDC: 100% charged.
  • 12.4VDC: 75% charged.
  • 12.2VDC: 50% charged.
  • 12.0VDC: 25% charged.
  • 11.8VDC: 0% charged.

Again, this is for Lead Acid batteries... AGM and Gell batteries will differ slightly. Regardless, if you allow a Deep Cycle battery to become more than 50% discharge, you will shorten it's life. So not only is it of some import to know how much charge is remaining on the battery during discharge, carefully watching the charge state can help determine the battery's health.

For example, if a battery cycles into Bulk from Normal too often, this can be an indication the battery is going bad as it may not be holding a charge at the normal charge rate. And, if the rig is in storage (with all of the loads turned off), if the charger cycles between Trickle and Normal states, this may mean you have some parasitic load on the rig, or you forgot to turn something off as the Trickle charge cannot keep the battery topped off.


How it Works.

  If you are not really interested in the details, you may want to skip this section. However, although somewhat geeky, you might still like to read it.




The Charger/Battery Monitor is elegantly simple. There are 4 LEDs that serve as outputs, one input channel that senses the battery voltage, and a reset pin. Everything else is done in software. It should be noted that there are two different "system voltages" in play here. First, the input voltage powers the unit, and is read by the sense pin to determine the Charger/Battery state. This voltage should be in the range of 14.3VDC (Bulk Charge) to 11.8VDC (Fully discharged battery).

However, the ATTiny85 microcontroller can only tolerate 5VDC, so the Voltage Regulator section of the circuit, which consists of U2, C1, C2, and C3 provides 5V not only to the ATTiny85 (U1), but also the LEDs. As well, an internal 5V voltage reference is built into the ATTiny85 for the Analog-to-Digital converter.

The voltage sense circuit is comprised of Zener Diode Z1, R6, and R7.

The remaining components are the LEDs (LED1~LED4), LED current limiting resistors (R1~R4), a pull up resistor (R5) so the ATTiny85 does not inadvertantly reset itself; S1 - the power switch, and S2 - the reset switch.



The voltage sense pin has an internal Analog-to-Digital (A-D) Converter which samples the input voltage and places a number from 0-1023 into the ATTiny85's internal buffer. This is typically done 10,000 times per second (sounds like that GMC Seirra commercial), however - we slow it down to once per second to conserve battery.

There are 1024 possible states of the A-D, and when the voltage is 0, the output will be the number 0. When the input equals the A-D Converter's reference voltage (in this case 5V), the numerical output of the A-D will be 1023. Therefore, the A-D Converter has a resolution of 0.0048V (5V/1024), far more than needed for this application.

The input to the A-D Converter must never exceed the voltage reference, as (1), an invalid number will be generated, and (2) possible physical damage could occur.


A little Ohm's Law anyone? The simplest way to accomplish this would be a voltage divider, and indeed it would work. The 10k and 5k resistor create a "voltage ladder", and the sense pin voltage would be proportional to the values of the two resistors.

Since the 10K resistor is twice as large as the 5k resistor, a factor of 3 is realized. For example, if 15V were applied to the top of the voltage ladder, the 10K resistor would absorb 10V; the 5K resistor would absorb 5V, and the sense pin would read 5V.

If we used such a setup, it would indeed solve our problem; the charger/battery voltage could vary from 11.8V to 14.3V, and the sense pin would only see voltages between 3.93V and 4.78V. Since this is below 5V, everything would work properly.

But there is an undesireable side-effect.

Unfortunately, along with dividing the voltage by 3, we also divide the change in voltage (called the Delta) by 3. For example, the Delta for 14.3v~11.8V is 2.5V (14.3v-11.8V=2.5V), but the sense input would only have a delta of 0.85V (4.78V-3.93V = 0.85V), not 2.5V. Essentially, the voltage divider not only divides the input voltage by 3, it also divides the resolution by 3. The compressed resolution would unnessecarily makes it more difficult to sense the voltage changes (as we have less of a range of voltage to work with).

  There is a better way.



If we replace the 10K resistor with a Zener Diode - say one with an 11V rating - we solve the problem. A Zener Diode will not conduct current until the voltage across it exceeds it's voltage rating. So any voltages below 11V will not turn the zener on.

Therefore, the Zener simply subtracts 11V from the input.Therefore voltages from 11.8~14.3V will result in 0.8~3.3V at the sense pin, which retains the 2.5V delta. The resistor could be any nominal value as it's sole function is to limit current and allow voltage to develop across it. This is essentially a "level shift" circuit.


There is one further step we should consider, and that is to put some fine tuning adjustability into the voltage sensing circuit. While we can do all the adjustment we need in software, if we put an externally adjustable mechanism in place, we won't have to make such minor adjustments in software.

Here, we replace the resistor with a 5K potentiometer and 22K resistor. So when the potentiometer is at the top end, wee will still have the 0.8~3.3V reference. But with the potentiometer at the bottom end, this becomes reduced to 0.64~2.64V.

If you are paying attention, you might notice when we do that, we compress the resolution/Delta from 2.5V to 2V, which is true (and happens anytime you create a voltage ladder). However, 2V still gives us a wide range of adjustability - and in fact. If we consider the potentiometer may very well be in the center of it's range, the delta might only be reduced by 0.25V.

This is an acceptable comprimise to have an ability to adjust the range.




One last note about using a voltage ladder. Realize that not only does the resolution compress, but the threshold points (points where the Bulk/Normal/Float charger modes switch) do as well. So we want to make the adjustment range small, and we do that by making the potentiometer small vs the lower resistor. Choosing a potentiometer of 5K and a ladder resistor of 22k gives us a voltage range on the potentiometer of nearly 0.5V from end-to-end.





Last reviewed and/or updated June 14, 2017