The ROV base station consists of the controller and a 12inch FPV Monitor. These are supplied from a 7.2Ah 12V lead acid battery. When flying some of my FPV aircraft I use the same screen and add a diversity receiver. I was a little concerned that running these rigs for extended periods was exhausting the battery and dropping it to levels that could potentially cause it permanent damage. I needed a battery monitor that could warn me when I had used more than the battery could comfortably deliver.
The easy solution was to grab yet another Arduino and build up a simple circuit to monitor the battery voltage and flash an LED as well as beep a speaker or something. I felt that would be kinda insulting to the Arduino so I opted to design and build a monitor from more fundamental and commonly available components (ie scavenged from other old circuit boards). This was my first real circuit of this nature and I was pleased to have it operate correctly first time. Do I get my junior electronics badge for this?
I was keen to devise a system that could be adapted relatively easily to other batteries and voltages if the appropriate voltage cut off is known. I was aware of the LM311 voltage comparator and was keen to get to grips with this component because I could see it had a lot of potential for other projects and they were cheap …. even in New Zealand!
The current drawn by the load dictates the voltage you can expect to see at various states of battery charge. The faster you are drawing charge out of the battery the lower the terminal voltage you will see for a given state of charge owing to internal resistance losses and such. I found an excellent set of discharge curves for 12v lead acid batteries in an article from HomePower magazine -“Lead-Acid Battery State of Charge vs.Voltage” by Richard Perez: Home Power #36 August / September1993.
For a happy and healthy lead acid battery that lives a long and productive life it is a good idea to avoid going below an 80-90% state of charge.
I measured the current drawn by various rigs that are run off the 12v battery to get a feel for the voltage curve I would need to look at.
- The ROV base station drew a small 0.5A, of which the screen drew 0.4A. I was pleased to see the screen’s standby consumption was too small to measure on the equipment I was using. This is about 0.07C (or about C/15 as it would be on the curves above.)
- The FPV base station drew 0.8A which means that receiver is a bit of an energy hog. This is about 0.1C (or C/10 as it is on the curves above.)
- Running a laptop through a DC DC power supply attached to the battery drew about 4.5A. This is about 0.6C. This is a curve about C/1.6 which is below the curves shown above.)
Based on the ROV and FPV base station consumption, an 80 – 90% state of charge corresponds to about 12.5V for the ROV rig and about 12.4V for the FPV rig. These are the voltages I would be setting for the alarm points on the monitor.
How the circuit works
The two circuits presented here do the same job but one includes a feedback loop on the LM311 voltage comparator to generate some hysteresis in the system. I shall discuss this later.
The 12v Battery monitor.
Here is the circuit laid out for a perf-board build.
Basically the circuit consists of three distinct parts;
- An LM311 Voltage comparator which looks at the voltage of the battery through a voltage divider and compares that to the reference voltage on pin 2. The voltage divider for the voltage being measured includes a 5kΩ variable resistor to allow me to adjust the point where the LM311 will signal the alarm.
- An LM317 Voltage regulator set to provide a stable 9V to run the two integrated circuits, and also provide a 4.5V reference voltage to the LM311. See this page for an LM317 calculator.
- An NE555 timer chip which is purely to make the LED flash and the speaker to beep. Had I been satisfied with a continuous light from the LED and constant “scream” from the speaker I could have left the NE555 out.
When the LM311 detects the voltage on pin 3 is lower than its reference voltage it will activate the signal on pin 7. I have used this to open the 2N2222 transistor and turn on the NE555 timer chip. The NE555 does have an input for a digital signal to trigger it, but this is a toggle rather than only operating the pin is in a HIGH state. I’m sure proper electronics people would have a nice elegant solution to this, but I am happy with this slightly dirty method.
The 12v Battery monitor with Hysteresis.
Here is the circuit laid out for a perf-board build.
The circuit works as described above except that there is feedback from the LM311 output through some resistors to the reference voltage pin. This has the effect of distorting the reference voltage and making creating a dead-band in the voltage trigger points. I included a header and jumper as well as a trim pot in this section to allow the feedback to be adjusted to a degree and disabled entirely. Because the voltage variations that I was trying to detect were quite fine the hysteresis created by this feedback was still too much to reliably determine the battery state of charge and so I disabled it on my system. Had the load been large enough hysteresis would be useful. This is particularly important if the voltage monitoring circuit is being used to disconnect the load. In this case the battery voltage would recover upon disconnection and the monitor would immediately try to reconnect the load again. Adding a large enough hysteresis to the system would prevent this from happening.
An excellent reference for determining the hysteresis necessary was the page called “Voltage Comparator Information And Circuits” by Rob Paisley.
Calibrating the cut off.
Unfortunately the voltage at the 80-90% state of charge varies with the current drawn which means the circuit has to be adjusted for the expected load. For this purpose a variable resistor was included. To set this I used a variable voltage source in the form of a variable bench supply and just dialed up the voltage I was after then adjusted the circuits variable resistor so that the alarm would just begin to go off at that voltage. If you don’t have a variable power supply handy the best way of creating a controllable voltage source would be to set up an LM317 regulator with a variable resistor and set it’s output voltage to whatever target point you need by adjusting this resistor while looking at the regulator’s output on a multimeter.
A variation of this circuit would be to use an LM336 Precision Reference Voltage Diode to provide the reference voltage to the LM311. These are an efficient solution and eliminate the need for the LM317 regulator and all its associated circuitry but you would need to supply power to the comparator from the battery being monitored or a separate battery entirely – after all it can operate over a large range of voltages (5V to 30V). This is probably a good solution for measuring batteries with voltages between 5V and 10V.
A further simplification would be to eliminate the NE555 Timer chip. All this is doing is flashing the LED and causing the speaker to beep. If an LED that lights at a certain voltage is all you need for providing a warning then both the NE555 timer and 2N2222 transistor can be eliminated.
The 2N2222 transistor can be used to activate a small relay. This would allow the monitor to disconnect the load at a certain point. As discussed earlier, this arrangement would require hysteresis to be present in the system to ensure the system does not try to reconnect the load as the battery voltage recovers.