Showing posts with label Battery. Show all posts
Showing posts with label Battery. Show all posts

Sunday, November 08, 2015

battery level indicator design for 12 & 24V

Up to now, this battery level indicator design was limited to 12 & 24V applications. In past circuits, the use of fixed resistors greatly simplifies setup. However, fixed resistors resulted in application inflexibility that precluded use at lower voltage and different types of batteries. In the updated circuit, all thresholds are set via potentiometers, and an LM317 provides a 1.25V voltage reference. Rather than lighting LEDs progressively, this circuit blanks low order LEDs thus reducing power consumption. While the comparator and op amp operate as low as 2V, the voltage reference requires 3V (as a 1.25V reference). This easily accommodates 4.5V battery applications, but is far too marginal for 3V applications. By following the application information indicated on the schematic, it may be extended to 28V.

The goal was to make it work for 3V battery applications –I thought this would be easy, but Murphy thought otherwise –apparently the limiting factor is the LM317 voltage regulator. As a result, the 3V version must wait for another day when I can evaluate the LP2951 LDO voltage regulator.
Full schematic of the battery level indicator circuit
Low Voltage Battery Level Indicator Circuit 1
LED indicators
LEDs come in various colors and efficiencies and make for a colorful display –or for simplicity sake, all may be the same color, or may all be included within one bar graph LED device. Due to differences in forward voltage drop and efficiency, the current limiting resistors will probably need to be adjusted for best performance. The table on the schematic for R18 to R22 suggests a starting resistance –note that these resistors need not be equal. However, if all are the same color, one resistor value should work well.
LED ColorCharge Level
Red:0 to 25%
Orange:25 – 50%
Yellow:50 – 75%
Green:75 – 100%
Blue:>100% voltage
Of course, you may select your own colors as desired.
LM317 voltage reference
Few know that the LM317 makes a very simple 1.25V reference, but the datasheet does not allude to this application. The LM317 requires a headspace of 1.75V. This means that the minimum input voltage must exceed the output voltage by this value. Minimum DC input voltage = 1.25V + 1.75V = 3V.
The LM317 has a minimum load specification of 5mA, but I have never found one that did not function at 3.8mA. R5 (330Ω) provides the minimum load.
Percentage of charge determination
For convenience, I estimated the charge level thresholds of a 4.5V battery. For your particular battery, careful testing and adjustment will be required in order to obtain any degree of accuracy. Without such testing, this indicator is little more than a ‘wiggler.’ A suggested means of accomplishing this is to discharge a fully charged battery via a fixed resistor while graphing the output voltage as a function of time. Then divide the plot up into 4 equal AH (ampere hour) segments during which the output voltage is serviceable. From such a graph, it should be easy to observe specific voltage thresholds –note that there is no requirement for evenly spaced voltage thresholds as I have indicated on the schematic.
Setup
After the above voltage steps have been determined, the voltages must then be divided by the division factor of the voltage divider –for a 4.5V (nominal) battery, it is a factor of 4.3. So for the four steps it is as follows:
Voltage threshold¸ 4.3
4.8V1.12V
4.5V1.05V
4.2V0.98V
3.9V0.91V
With the circuit powered via a good battery, adjust the 4 potentiometers to the ¸ 4.3 voltage levels above. While some may think that they can ‘wing’ it, I believe otherwise and if ultimately successful, it will take much more time. Note that if the potentiometers are not set at progressive voltages, operation will be unpredictable –good luck!
Circuit Operation
U3 is the 1.25 LM317 voltage reference. R5 & R6 form a voltage divider that reduces the battery voltage to a level that is close to the reference voltage and within the common mode voltage range of U1 and U2. U2A is a source follower amplifier that buffers the voltage divider output so that regardless how many diodes are drawing current out of this node, the voltage remains stable. R8 through R11 provide high impedance sources at the comparator inputs so that the diodes can easily take control of the voltages at these nodes. U1 consists of (4) comparators that compare the voltage from the reference potentiometers with the divided battery voltage. U2B is an op amp that is wired as a comparator that controls the lowest order LED.
Diode NAND gates
The 10 diodes make up a total of (4) wired NAND gates that function by reducing the reference voltages to below 0.6V. The 1st has one input, the 2nd has 2 inputs and so on. This blanks the low order LEDs so that only one is on at a time thus reducing battery load. To further reduce power, a push-to-test pushbutton may be used, or it may be cycled via a 555 timer in order to reduce the duty cycle (circuit not provided).
Preventing flicker
At the voltage thresholds, the LEDs may tend to flicker between two LEDs. To prevent this, a small amount of positive feedback is added via the addition of R14 to R17. Note that this is optional.
Testing
I recommend testing with an adjustable lab type power supply –besides being adjustable, it offers current limit that protects against accidental short circuits or polarity reversal. It makes life much easier.
If testing directly with a battery, note that reverse polarity protection is not provided –the experimenter is on his own this time. Suggestion: Initially power the circuit through a 100Ω resistor to limit potential fault current –after determining that the polarity is OK, this resistor may be removed.
Protoboard was a challenge
Observe the ‘rats nest’ in the photo –this is perhaps the worst layout I have ever done –touching just about any resistor or diode shorts something out and causes bizarre behavior…
Stripped down version
For those who want something simpler, U2, all the diodes and most resistors may be eliminated. If experimenting with this circuit, I suggest starting with the strip down version and then progressively develop the full version.
Striped down schematic
Low Voltage Battery Level Indicator Circuit 2

24V Battery Level Indicator

This battery level indicator offers (5) LEDs that light up progressively as the battery voltage increases. This is a update of the 24V Battery Level Indicator.
While designed for 36V systems, it is easily modified to 24V, 48V or 60V simply by changing two resistors.
LED ColorCharge Level
Red:Power Connected (0%) (essentially always on)
Orange:Greater than 35V (25%)
Yellow:Greater than 37V (50%)
Green:Greater than 39V (75%)
Blue:Greater than 41V (100%) (full charge is about 41 to 42V)
Of course, you may select your own colors if desired.

Schematic of the 36V Battery Level Indicator Circuit

36V Battery Level Indicator circuit
High voltage issues
One limiting factor is the LM339 that has an absolute maximum voltage rating of 36V –and it is not good practice to operate near that point. The solution involves running the IC power rail off a zener shunt regulator. Shunt regulators are very simple, inexpensive and robust –good for this application. However, the LM339 open collector outputs cannot drive LEDs powered from the battery bus due to the same maximum voltage limitation. There are two solutions for this: increase the current rating of the shunt regulator so that it can power the LEDs, or run the LEDs via a cascode amplifier arrangement –I chose the cascode amplifier.
Cascode amplifier
A cascode amplifier is a configuration where one transistor feeds a 2nd transistor that is connected in the common base configuration. This configuration is generally used for RF amplifiers. In this circuit it offers one great property –low voltage in, high voltage out. By tying the bases of these transistors to the 13V bus, the LM339 open collector drive transistors never see more than 13V. However, the cascode transistors may drive LEDs that are tied to a much higher voltage –up to 80V using the MPS-A16. By limiting the emitter current, the LED current is automatically limited to the same value. While this is relatively busy, it places virtually no burden on the shunt regulator.
Circuit Operation
D1 is the voltage reference zener. Tied to this is a string of divider resistors (R2-6) that set the various fixed voltage levels. R7 & 8 form a voltage divider to that divides the battery voltage by a factor of 9. The quad comparator compares the various voltages from the two dividers.
For calibration, connect to a voltage source that can be set to the highest LED threshold (41V in this case). Then adjust the calibration pot until D2 flickers. The remaining LEDs will switch on close to the indicated voltage –accuracy of those voltages may suffer slightly, but should be close.
The LEDs are biased to operate at 2.3mA which is reasonably bright for high efficiency LEDs. This current can be adjusted simply by varying the emitter driver resistors (R9 through R13). To reduce standby power, a push-to-test pushbutton may be used.
Bug
Testing on variable voltage turned up an interesting bug –when the voltage was turned down to about 10V, all LEDs lit again. This was traced to Zener D9 dropping out of conduction thus starving the voltage divider. Connecting a 33K resistor across D9 corrected this little problem without affecting anything else.

Arduino Based Auto Transport Device

AUTO TRANSPORT DEVICE is idea of making a self-driving device that is low cost and can carry high load to its destination. This device is ...