There have been never so extensive use of batteries before. The portable electronic devices are growing more and more popular and these devices are all run on batteries. With the use of batteries, overcharging and over discharging are common problems. In order to avoid over charging and over discharging of batteries, it is required to keep track of the charge level of the attached battery. A circuit used for such purpose is called battery level indicator. A battery level indicator gives the indication about the battery charging or discharging state.
Secondly, some batteries have high tolerance limit for overcharging and some may explode after a certain limit of charging. That is why it is important to disconnect the battery from charging when it reaches its maximum limit. A battery level indicator gives the visual indication of the battery state and so allow disconnecting it before over charging. Also, by battery level indicator, the user is instigated to charge the battery before it dies.
Depending upon the state of battery there are two ways to indicate charge level, one is the state of charge (SOC) method and another is the death of discharge (DOD) method. SOC is the measure of the stored charge in the battery and DOD is the measure of the degree by which battery is getting emptied relative to the total capacity of the battery.
In this project, a battery level indicator is designed using state of charge method. SOC method is more convenient to use and easy to design. SOC of the battery can be determined by the voltage level at the terminals of the battery or by measuring current output of the battery. In this project, the SOC of a battery is determined by sensing the terminal voltage level of the battery. Therefore, for sensing the voltage level of the battery, an integrated circuit is required which can precisely detect the voltage across the terminals of the battery.
In this project, two Li-ion batteries are connected in series. Each Li-ion battery has a voltage rating of 3.7 V and has maximum charging voltage at 4.2 V and end of discharge voltage at 3 V. The end of discharge voltage is the voltage below which any device connected to the battery will stop operating. For sensing the terminal voltage level of the battery series, LM3914 IC is used. LM3914 is a bar display driver which can sense the magnitude of the analog voltage and indicate the voltage level by lighting up to 10 LEDs. So, the IC is designed to indicate ten voltage levels respective to a common voltage reference. The Internal 10-step divider is floating and can be referenced to a wide range of voltages.
For voltage indication, either LEDs or bar display can be connected to the IC. The IC has scope to interface even the displays of 100 steps. The internal voltage reference of the IC can be set from 1.2 V to 12V. The IC can let draw output current by an LED or bar display from 2mA to 30 mA.
In this project, 10 LEDs are interfaced to the IC to indicate voltage level from 6.2 V to 8.45 V. As there are 10 LEDs so each LED will indicate a 0.24V increase in the terminal voltage of the battery series and each LED will draw maximum 2mA current.
Components Required
Fig. 1: List of Components required for LM3914 IC based Battery Level Indicator
Circuit Connections
For designing this battery level indicator it is important to understand pin diagram and pin configuration of LM3914 IC. This IC is the main component of the circuit. LM3914 is a monolithic integrated circuit (all components embedded in a single chip) which senses the voltage and can drive 10 LEDs. LEDs display the voltage level in the form of a bar graph or dot. In bar graph form, LEDs light up in an incremental and continuous form but in dot form, only one LED lights up for the corresponding voltage level. For example in bar display when the battery voltage is at 6.7V then three LEDs will light up but in dot mode, only third LED will light up.
The LM3914 has 18 pins with the following pin configuration –
Fig. 2: Table listing pin configuration of LM3914 IC
The LED current is regulated by the IC itself which eliminates the need for a resistor with the LED. Hence the IC gets powered up at minimum 3V and the maximum supply voltage can be up to 25 V. Do not provide input voltage beyond the maximum rating of the IC. LM3914 input signal over voltage is +/-35V as per the datasheet but to be safe it is recommended to supply input voltage up to 25V.
The output current which can be provided by the LM317 is from 2 mA to 30 mA. Internally this IC has a high input impedance buffer and ten comparators (as shown in the internal circuitry of 3914). The buffer operates the signal from ground to input voltage and is protected from the reverse signal and over voltage. For this protection, internally a diode is used in the input buffer (as shown in the circuit diagram). The work of the buffer is to provide the signal to the comparators which are connected in series. Each comparator is biased by a different resistor and these comparators sense different input supply voltage. Then this voltage is indicated by the LEDs at the output (as shown in the circuit diagram).
Fig. 3: Internal circuit of LM3914
First of all the input supply voltage for indication at the output need to be set. For this purpose pin 5 has to be used. The pin 5 is a signal pin which is used to sense the analog signal and the level of the same signal is indicated through the LEDs. In this experiment, the pin 5 is connected with resistors R4 and R5 (as shown in the circuit diagram). Both the resistors are of equal value and make a voltage divider network. This network provides the half of the input supply voltage to the signal pin. For example, if the supply voltage is 6V then signal pin will sense 3V due to voltage divider circuit.
Secondly, the low to high voltage range and output current need to be set. For this purpose, the following pins are provided on the LM3914 IC– RHI (pin 6) – For setting the higher threshold voltage level
– RLO (pin 4) – For setting the lower threshold voltage level
– REF Adjustment (pin 8) – For setting the required reference voltage
– REF Out (pin 7) – Determines the brightness of the output LED
For controlling the brightness of output LEDs, the current drawn at pin 7 needs to be set. The current drawn by the output LEDs depends on the current drawn at the reference voltage pin (pin 7). About 10 times of this current is drawn by each LED irrespective of the changes in input voltage and temperature. The current that each LED draws can also be adjusted using the following equation –
I LED = 12.5/Req (approx.) (from datasheet)
The RLO and RHI pin decides the range of the output voltage from low to high. LM3914 indicates the voltage at the output through LED in the range of low to high voltage only.
The REF Adjustment pin provides the reference voltage for setting the desired output voltage range. Internally the IC has 1.25V constant reference voltage at the Ref Out (pin 7) and Ref Adj (pin 8). This reference voltage can be adjusted from 1.25V to 12V. In this experiment, the reference voltage is kept unchanged so it is 1.25 V.
As per the basic configuration of LM3914, the lower voltage level is 0V since the RLO and REF ADJ pin is directly connected to ground. But as RLO and REF ADJ pins are floating so the lower voltage level can be changed from 0V to the desired voltage level. This is called expanding the scale.
In this experiment, the lower voltage level should start from 6V and upper voltage should be 8.4 V. For this, some resistances across REF ADJ and REF OUT pin should be connected so that they can provide the voltage range as per the requirement.
Fig. 4: Circuit Diagram showing Basic configuration of LM3914 with internal circuitry (Source – TI datasheet of LM3914)
For setting the desired voltage range resistors need to be connected in such a way that they can provide 6V at RLO pin and 8.4V at RHI pin. But the SIG 5 pin will sense 3V when the supply voltage is 6V. So instead of setting 6V at the RLO pin, it should be set to 3V. Similarly, instead of 8.4V, the RHI pin should be set to 4.2 V.
In this experiment, resistors R1 and R2 are connected to provide the required voltages. The R2 provides the 3V to the RLO pin and RHI pin gets 4.2 V. The resistor R1 decides the output LED current.
Fig. 5: Circuit Diagram of Voltage Divider Network at RHI and RLO Pins
The value of resistances R1 and R2 can be calculated in the following manner. The resistor R1 determines the LED current.
For calculating R1 following equations from the datasheet need to be considered –
I LED = 12.5/ Req
Req = 12.5 / I LED
So,
I LED = current drawn by each LED
As LM3914 has minimum output current of 2mA so let’s take minimum current of 2mA so that LEDs at the output will not consume more power from the battery
Each LED current, I LED = 2mA
Req = equivalent resistance
As seen from the internal circuitry the resistor R1 is in parallel with a string of resistors or resistor divider network which is connected to each comparator. So the Req in the above equation is the equivalent value of the R1 and resistor divider network in parallel.
So to find the exact value of R1 the value of Req has to be found –
Req = 12.5/0.002
Req = 6250 ohm
Now for calculating the R1 using the following equation
Equivalent resistance, 1/Req = R1 || Rdiv(resistor divider network)
As per the internal circuitry, the value of a string of resistor or resistor divider network is 10k but as per the datasheet of 3914, the typical value of this resistor divider is 12k.
So Rdiv =12k
Req = 6250 ohm
1/Req = 1/R1 + 1/ Rdiv
1/R1 = 1/Req – 1/ Rdiv
1/R1 = 1/6250 – 1/ 12000
R1 = 13k (approx.)
The lower voltage level needs to be set by resistor R2. Now for calculating R2 voltage divider circuit at the pin need to be considered. For proper calculation of the resistor R2, consider the circuit shown below –
Fig. 6: Circuit Diagram showing Calculation of Resistances for Voltage Divider Network at RLO and RHI Pins
R2 can be calculated by the following equation –
R2 = VR2 (Voltage across R2)/ IR2 (current across R2)
Calculating current across R2, IR2
From the above figure of the voltage divider network, it is clear that
IR2 = IR1 + Iadj
Now,
Iadj = Current flowing out of the reference adjust pin
As per the datasheet, the minimum adjustment pin current is 75uA so for decreasing error term let’s take 75 uA as Iadj.
As the IC has internal 1.25V constant reference voltage at the Ref Out (pin 7) and Ref Adj (pin 8). So a constant current will flow through R1.
Current at R1, IR1 = Vref( reference voltage)/ R1
IR1= 1.25/6250
IR1= 200uA
Now by putting IR1 and Iadj values we can calculate IR2
IR2= 200 + 75 (both in uA)
IR2= 275uA
Now on calculating R2
R2 = VR2 (Voltage across R2)/ IR2 (current across R2)
As R2 will provide 3V to the RLO pin so VR2 = 3V
R2 = 3/0.000275
R2 = 11k (approx.)
Note that the R1 resistor will provide 3V to RLO pin.
For setting higher voltage level at 8.4 V RHI pin should get 4.2 V. So,
Total voltage drop across RHI = VR1 + VR2
As voltage drop across R1 ,VR1 = 1.25V (As REF adj and REF out pin provide a constant reference voltage of 1.25V as explained above)
The voltage drop across R2, VR2 = 3V
Total voltage drop across RHI = 1.25 + 3
Total voltage drop across RHI = 4.25V
So by taking R1 as 13 kΩ and R2 as 11 kΩ the voltage of the battery from 6V to around 8.4 V can be sensed with a maximum current of 2mA at the output.
In the third step, mode of indication needs to be set. There are two types of display for visual indication at the output and these two display can be set by Mode select pin (pin 9). This pin controls the display of output LEDs. For selecting Dot mode, the pin 9 needs to be left floating or open and for selecting Bar graph mode, the pin 9 should be connected to input supply (V+). In this experiment, pin 9 is connected to a switch to change the value of 9th pin either V+ or float as desired.
Finally, the battery has to be connected to LM3914 IC. The battery has to be connected between pin 2 and 3 of the IC. The pin 3 or V+ pin supplies the input voltage of the LM3914 IC. The positive terminal of the battery has to be connected to this pin. The pin 2 or V- pin provides ground to the IC and needs to be connected to the negative terminal of the battery.
It is recommended to use a 2.2 uF Tantalum and 10 uF aluminum electrolytic capacitor at the ground pin (pin 2) of LM3914 if the leads of the LEDs are 6 inches or longer. This is because long wires increase the resistance and inductance and it generates noise at the input.
How the Circuit Works
Fig. 7: Prototype of LM3914 IC based Battery Level Indicator designed on a breadboard
The entire functionality of the circuit is managed by the LM3914 IC. The IC is designed to operate as battery level indicator. Only the additional components like the resistors and battery have to be connected to the IC.
Testing the Circuit
Theoretically, LED D1 should light up when battery voltage is at 6V and LED D10 should light up when battery voltage is at 8.4 V. On measuring the terminal voltage of the battery using a multimeter, the LEDs light up in the following fashion –
Practical observation table in bar graph display
Fig. 8: Table showing Bar Graph Display of Battery Level Indicator
On calculating error percentage,
Error % = (practical observation – Theoretical observation)*100/
Practical observation
Error at lower voltage level, Error % = ((6.2 – 6)*100)/6
Error % = 3.3%
Error at higher voltage level, Error %= ((8.45 – 8.4)*100)/8.4
Error % = 0.6%
So, there is a tolerable error observed during the operation of the IC.
You may also like:
Circuit Diagrams
Filed Under: Electronic Projects
Questions related to this article?
👉Ask and discuss on Electro-Tech-Online.com and EDAboard.com forums.
Tell Us What You Think!!
You must be logged in to post a comment.