Automatic charging of the backup battery

To ensure smooth operation For any electronic device, it is necessary to reserve power, or in other words, to introduce additional (backup) sources of electricity into the circuit. To guarantee continuous operation, at least one independent power source is required. Typically this is accumulator battery.

The best part about this task is the ease of implementation. To provide power backup for any low-power electronic circuit, only three components are sufficient: rectifier diode, resistor And battery.

Reservation scheme

The power backup scheme might look something like this:

Figure 1. Simple power backup circuit devices.

The circuit conditionally consists of three parts: network (left side of the circuit), to the output terminals 2-3 of which an electronic device is connected (right side of the circuit); The battery GB1 is connected in parallel with the output of the power source through the charging resistor R1 and the load diode VD1.

For normal operation of the power supply circuit, it must be slightly higher than the rated voltage of battery GB1. If the power supply voltage is insufficient, the GB1 battery will always be in an undercharged state, which will accelerate the deterioration of its performance. If the power source voltage is significantly higher than the battery voltage, it will be overcharged with premature deterioration of performance, and in addition, when the device is powered from the battery in power backup mode, a lack of supply voltage may be observed. This can be critical for the operation of circuits from a stabilized power supply that do not have their own voltage stabilization.

Operating principle

The circuit presented for consideration has two operating modes, which make sense to consider:

Normal diet

Let's look at Figure 2.

Figure 2. Normal circuit power supply.

In normal mode, the mains power supply supplies energy to the electronic device and simultaneously charges the battery GB1 through the charging resistor R1. VD1 is locked in this mode because there is an increased potential at its cathode from the power source relative to the electrical potential of the anode connected to the battery. This eliminates the occurrence of an unacceptably large charge when the battery is heavily discharged, and overloading the power source. The maximum charging current is limited by R1. Ideally, it should be selected in such a way that when the battery is fully charged, a current equal in magnitude to the battery leakage current flows through it.

Red arrows indicate currents. The power supply current is the sum of the electronic device current and the battery charging current.

Backup mode

Let's move on to Figure 3.

Figure 3. Backup power mode.

When the voltage disappears or significantly decreases from the mains power source, when the electrical potential at the cathode of diode VD1 becomes lower than the potential of its anode connected to the battery, the diode opens and the main load current flows through it, powering the device. Part of the load current will also flow through R1. The load current is shown by green arrows.

When the voltage from the mains power supply is restored, the electrical potential of the cathode increases again, the diode is turned off, and the circuit goes into normal power mode, in which the device is supplied with energy from the power source and the battery GB1 is charged.

If in this circuit you use a battery made from conventional galvanic batteries, then it is necessary to exclude resistor R1 from the circuit to eliminate the charging process for which they are not adapted. When the energy of the elements is consumed, they must be replaced with new ones.

No electronic device is immune to sudden power failure. Especially if we are talking about a mains voltage of 220 V and it happens in rural areas. To increase reliability, they try to provide a backup energy source. Ideally, in the event of an accident, it should automatically start working, and independently, without human intervention.

For backup, replaceable batteries and accumulators are usually used. When using battery power, it is advisable to use “alkaline” galvanic cells (Alkaline). They have a large capacity, low self-discharge, although they are more expensive. You can tell which is which by the markings on the case, for example, “R6” (regular AA battery) and “LR6” (the same, but Alkaline).

The specificity of modern microcontrollers is that they can programmatically switch to the energy-saving SLEEP standby mode with very low current consumption. This allows you to use high-capacity electrolytic capacitors or, even better, ionistors instead of batteries/accumulators.

The first ionistors were developed in 1966 by Standard Oil Company. They are special storage capacitors with an organic electrolyte. Typical capacitance reaches 0.1...50 farads at an operating voltage of 2...10 V. For reference, the capacitance of the Earth (a ball the size of the Earth, as a solitary conductor) is only 0.0007 farads.

Ionistors are known in foreign technical literature as double-layer capacitors, SuperCaps, and Backup capacitors. There are also brand names: UltraCap (EPCOS), Gold Capacitors (Panasonic), DynaCap (ELNA), BOOSTCAP (Maxwell Technologies). In the CIS countries, the stable term “ionistor” is used, reflecting another feature of these devices - the participation of ions in the formation of the charge.

Modern ionistors are conventionally divided into three groups depending on the long-term load current recommended in the datasheet:

  • Low current (low current, less than 1.5 µA);
  • Medium current (average current, from 1.5 μA to 10 mA);
  • High current (high current, from 10 mA to 1 A).

The operating voltage of the ionistors is subject to the following series: 2.5; 3.3; 5.5; 6.3 V.

In Fig. 6.16, a...t shows the diagrams for organizing uninterruptible power supply.

Rice. 6.16. Uninterruptible power supply schemes (beginning):

a) diodes VDI, VD2 serve to isolate channels so that current does not flow from the main source to the backup one, and vice versa. If the two power sources are different in size, then the channel with the higher voltage will be the main one. If the supply voltages are absolutely equal, the Schottky diode in the backup channel should be replaced with a conventional 1N4004 silicon diode.

b) decoupling diodes VDI, VD2 are turned on before (and not after) the voltage stabilizer DA 1. The main power is supplied through a regular diode VD1 (so that more power is dissipated on it), and the backup battery is supplied through a Schottky diode VD2 (so that the voltage at the input of the stabilizer DA I was as high as possible);

c) diodes VD2...VD4 are turned on after (and not before) stabilizer DA 1;

d) diode VD2 allows you to organize an additional source of negative voltage -0.7 V, which, however, ceases to function with the transition to backup power from battery GB1. The Schottky diode VD1 can be replaced with a conventional silicon diode KD102A;

e) ionistor C J allows you to replace depleted batteries GBl, GB2 “on the fly” without interrupting the power supply to the MK for quite a long time. If the voltage on the ionistor decreases slowly, then the MK does not require a restart. Resistor RI limits the charging current of the ionistor;

Rice. 6.16. Uninterruptible power supply schemes (continued):

f) the DAI stabilizer limits the initial charging current of the backup ionistor SZ at a level of no more than 100 mA. For reference, high current, starting from about 250 mA, can damage the ion-stor. The VDI diode reduces the output voltage by 0.2 V. In addition, when the main power is turned off, it prevents the SZ ionistor from discharging through the output circuits inside the DA1 stabilizer

g) transistor VT1 performs the function of a decoupling diode on a par with the “real” diode VD1, but has a lower collector-emitter voltage drop in the open state (0.1...0.15 V instead of 0.2 V). Main power +5 V(1), backup power +5 V(2);

h) similar to Fig. 6.16, g, but on field-effect transistor VT1, while the voltage drop across the open drain-source junction will be less than that of a bipolar transistor, all other things being equal;

i) storage capacitor C1 maintains the operation of the MK for some time when battery GB1 is disconnected. The duration of emergency operation depends on the capacitance and leakage current of capacitor C1, as well as on the clock frequency of the MK and its ability to operate stably at reduced power;

j) thanks to the diode bridge VDI... VD4, the input voltage 9... 12 V can be either constant (DC) or alternating (AC);

Rice. 6.16. Uninterruptible power supply circuits (continued): k) backup ionistor C2 maintains voltage in the +4.8 V circuit (to which the MK is connected) for some time when the main +11 V power supply is removed from the network source. Transistors VTI, VT2 prevent the ionistor from discharging through the internal resistance of the DAI chip and the load in the +5 V circuit;

m) LED HL1 indicates power only when backup battery GB1 is running. Resistor R1 sets the required brightness. When the contacts of the SAI switch are closed, power is supplied from the main +5 V source, while the diode VD1 and transistor VT1 close and the LED HL1 goes out;

m) the main power channel is GBl, GB2 AA batteries, and the backup channel is GB3 lithium battery. When batteries GBl and GB2 are disconnected, the MK will receive power from battery GB3 while in standby mode, since the external actuators (+3.2 V circuit) will be de-energized. Diode VD1 does not allow the GB3 battery to discharge through a load connected to the +3.2 V circuit;

o) in the initial state, the device is powered by three batteries GB1...GB3, while the HL1 indicator lights up green. When external power is supplied with +5 V, relay K1 is activated, contacts K1.1 are closed, the batteries are disconnected, and the HL1 indicator lights up red. If instead of red the yellow color of the indicator is observed, then you should connect a diode of type KD522B with the cathode to HL1 in series with the “G” terminal of the LED. Resistor R1 reduces the current consumption in the +5 V circuit, however, if the relay operates unstable, this resistor can be replaced with a jumper; ABOUT

Rice. 6.16. Schemes for organizing uninterruptible power supply (end): p) backup battery GB1 is constantly recharged with a small current through resistor R1. Zener diode VD6 together with diode VD7 limit the voltage on the battery at +13.7 V. Diodes VD4, VD5 open only when the main supply +16 V is removed. Diodes VD3, VD8 are necessary, since the capacitance of the capacitors at the output of the DAI, DA2 stabilizers is greater than at the input (compare C1 and CJ, SZ and C4)

p) +5V power supply is the main one, and the power supply from the lithium battery/GBI battery is the backup one. The OUT output receives the larger of the two voltages supplied to the VCC and BAT inputs of the DA1 chip. When the voltage at the VCC pin drops below +4.75 V (adjusted by resistor R2), a LOW level is formed at the PFO output. This is an early warning system for power failures so that the MK can switch to a backup source. When the voltage at the VCC pin drops below +4.65 V, a reset pulse RES is generated;

c) similar to Fig. 6.16, p, but with backup power from ionistor C1. The RES reset signal is sent to the INT interrupt input, since it is not necessary to reset the MC in hardware due to a smooth decrease in the OUT voltage;

r) HIGH/LOW level from the MC output switches the power either from the +5 V circuit or from the backup battery GB1, which is recharged with a small current through the VDI and R4 elements. If the +5 V power supply fails, the GB1 battery turns on automatically, and the MK must be reset, since it can “freeze” during a sudden voltage surge.


And so - somehow at one time, little by little, our enterprise (a very poor company: like most TEPLOENERGO in Ukraine) began to fail, i.e. burn out “on the hot side” of switching power supplies that were later replaced.
I had to figure it out, i.e. make 6 pcs. power supplies for powering some devices (related to metrology, instrumentation and control).
The requirements for them were:
1) stabilized sensor power supply - 20:28V/0.1A
2) stabilized power supply of the device itself - 10:14V/0.2A
3) galvanic isolation between power channels
4) backup power supply for the device (there is no sensor) from a 12V battery (I will not list further)
I decided not to reinvent the wheel, but to use already developed circuit solutions, especially since it was necessary to make it cheap and of high quality. And somehow I didn’t bother too much with the choice of circuit design - examples of power supply implementation loomed in my head.
Well, that's the whole story and now - to the point.
Device diagram:

As can be seen from the diagram, the power supply consists of two independent channels 24V and 12V built on “cranks”. A VD5 diode is installed at 12V across the LM7812, which raises the voltage to 12.7V to compensate for the drop across VD12. There is nothing more to say about stabilizers, since this is a well-known circuit design and is described in any reference book and, of course, all this is in the "Tutorial".
To ensure uninterrupted power supply, a rechargeable battery is used (in my case it is "GEMBIRD 12V4.5A").
The circuit shown in the figure prevents damage to the batteries due to them receiving an excess charge. It automatically turns off the charging process when the voltage on the elements rises above the permissible value and consists of a current stabilizer on transistor VT3, amplifier VT2, voltage level detector on VT1.
The indicator of the charging process is the glow of the VD4 LED, which goes out when it is complete.
We start setting up the device with a current stabilizer. To do this, we temporarily close the base output of transistor VT3 to the common wire, and instead of batteries we connect an equivalent load with a 0...500 mA milliammeter. Using the device to control the current in the load, selecting resistor R3 sets the nominal charge current for a specific type of battery.
The second stage of setup is to set the output voltage limitation level using trimming resistor R4. To do this, by controlling the voltage on the load, we increase the load resistance until the maximum permissible voltage appears (13.8 V for a 12V/4.5A battery). Using resistor R5, we turn off the current in the load (the LED will go out).
Any small-sized transformer with a voltage on the secondary windings of 15...18 V is suitable; for the 24V channel - 25..28V.
Transistor VT3 is attached to the heat dissipation plate. For ease of setup, it is advisable to use a multi-turn resistor such as SP5-2 or similar as R4; the remaining resistors are suitable for any type.
To provide 12V backup power from the battery, circuit circuits are used on elements VD7, VT4, VT5 and a relay (imported 12V) with one group of switching contacts. If there is mains power and therefore +U on capacitors C4, C5, transistor VT4 is open and the relay is de-energized, the battery is charged through the closed contacts. When the voltage in the network fails, transistor VT4 closes - VT5 opens and the relay is activated - with its contacts connecting the “+” battery through VD11 to the load.
Now a little about the parts used:
- diodes - any... based on currents and voltages, I used the cheapest imported 1N4007;
- transistors VT1, VT2, VT4 - KT3102, maybe KT315 or imported analogues.
- transistor VT3 can be used KT814 or KT816 - depends on the capacity of the battery and the current with which it will be charged;

Now a little in photographs - the manufacturing process:

Printed circuit board. I soldered the relay in - then I remembered that I needed to take a photo for the story. I didn’t tin the paths, because... The PCB itself turned out to be of poor quality - the tracks peeled off even at min. soldering iron temperature. After soldering, I coated the entire board with varnish.

In this article, we'll look at how to create a battery backup power supply for small electronic devices so that they never lose power.

There are many electronic devices that must be supplied with power continuously and without interruption. A good example of such devices are alarm clocks. If the power goes out in the middle of the night and your alarm doesn't go off on time, you could miss an important meeting. The simplest solution to this problem is a battery backup power system. Thus, if the power from an external source drops below a certain threshold, the batteries automatically take over the load and continue to power everything until the external power is restored.

Components

  • DC power supply;
  • batteries;
  • battery compartment;
  • voltage stabilizer (optional);
  • resistor 1 kOhm;
  • 2 diodes (with permissible direct current exceeding the current from the power source);
  • male connector for constant voltage;
  • female connector for constant voltage.

Schematic diagram

There are many different types of battery backup systems, and the type of system you choose depends largely on what you're powering. For this project, I designed a simple circuit that can be used to power low-power electronics that operate on 12 volts or lower.

First, we need a DC power supply. Such sources are very common and come in a variety of voltages and current ratings. The power supply is connected to the circuit through the DC power connector. It is then connected to the blocking diode. The blocking diode prevents current from flowing from the backup battery system back to the power source. Next, the battery is connected through a resistor and another diode. The resistor allows the battery to be slowly charged by the power supply, and the diode provides a low resistance current path between the battery and the final circuit, so the battery can power the final circuit if the power supply's output voltage drops too low. If the circuit you are powering requires a regulated power supply, then you can simply add a voltage regulator at the end.


If you are powering an Arduino or similar microcontroller, then you should note that the V in pin is already connected to the onboard voltage regulator. So you can apply any voltage between 7 and 12 volts to the V in pin.

Selecting a resistor value

The choice of resistor value must be made with care so as not to accidentally overcharge the battery. To figure out what value of resistor to use, you must first consider the power source. When you work with an unregulated power supply, the output voltage is not constant. When the circuit that is powered by it is turned off or disconnected, the voltage at the output terminals of the source increases. This open circuit voltage can reach a value one and a half times higher than the voltage indicated on the power supply case. To check this, take a multimeter and measure the voltage at the output terminals of the power supply when nothing is connected to it. This will be the maximum voltage of the power supply.

A NiMH battery can be safely charged at a charge current of C/10, or one-tenth of the battery's capacity per hour. However, applying the same amount of current after the battery has been fully charged may damage the battery. If the battery is expected to be continuously charged for an indefinite period of time (as in a battery backup system), then the charge current must be very low. Ideally, the charge current should be equal to C/300 or even less.

In my case, I will be using an AA size battery box with 2500mAh batteries. For safety reasons, I need a charge current of 8mA or less. Based on this, we can calculate what value resistor we need.

To calculate the required resistance of your resistor, start by determining the open circuit voltage of the power supply, then subtract the fully charged battery voltage from it. This will give you the voltage across the resistor. To determine resistance, divide the voltage difference by the maximum current. In my case, the open circuit voltage of the power supply is 9V, and the voltage on the battery is about 6V. This gives a voltage difference of 3V. Dividing these 3 volts by the current of 0.008 amps gives a resistance value of 375 ohms. Therefore, the value of our resistor must be at least 375 Ohms. For added safety I used a 1k ohm resistor. However, keep in mind that using a higher value resistor will significantly slow down battery charging. But this is not a problem if the backup power system is used very rarely.

It could only work when the voltage of the main source disappeared; it could not protect the load from a decrease or increase in voltage. These shortcomings have been corrected in the new version of the device, namely:

  1. The device will not switch the load to the backup power source even if the main source voltage is low.
  2. The device is not capable of operating at a voltage of less than 6 volts.

    The device will not protect the load when the voltage increases above the permissible value.

The new version of the device has significantly improved characteristics.

    Capable of operating with main source input voltage from 6 to 15 V.

    Load protection from under or over voltage. Two comparators are used to control the voltage of the main source. When the main voltage source is turned off, the operation of the device is similar to its previous version.

    The current consumed by the load is limited only by the maximum current that the contacts of the electromagnetic relay used can withstand.

The device is powered by a 12 V backup power supply and consumes a current of about 100 mA. If the voltage of the main source is less than 12 volts, you need to use a stabilizer and connect it to the gap shown in the diagram, and also set the protection thresholds using construction resistors.

Device operation

The main source voltage is supplied to resistors R6 and R12 from which the voltage is supplied to the inputs of the comparators, where it is compared with the voltage coming from the stabilizer VR1. A separate stabilizer VR1 is used so that when the voltage of the backup power supply changes, the protection thresholds do not change. I will briefly describe what these trimming resistors are intended for. Resistor R12 is responsible for triggering the protection when the voltage drops below the minimum threshold that is set by this resistor. In my case, this threshold is 10.5 volts and in order to set it, with an input voltage of 10.5 volts, using this resistor, set the voltage at pin 7 of the comparator to 1.3 V, which is lower than the operating threshold of the comparator, since the voltage at the 6th leg of the microcircuit is 1.65 volts, protection will work immediately. Resistor R6 is responsible for tripping the protection in the event of a critical increase in the voltage of the main source. In my case, the maximum voltage is set at 13 volts. At this voltage, resistor R6 must be set to 4 volts on the 5th leg of the microcircuit, which will trigger the protection and switch the load to the backup source. Thanks to these resistors, the protection is triggered when the voltage drops to 10.5 volts or increases to 13.

The most interesting part of the circuit is the assembly assembled on the DD1 and DD2 microcircuits. It is actually a protection circuit. The two inputs of this node are connected to comparators, but in order for a logical level of 1 to appear at pin 8 of the DD1 microcircuit and the protection to operate, certain conditions must be created. This node is also interesting because a logical one at output 8 of DD1.1 will appear if there are identical logical states at the inputs, either two 0s or two 1s. If there is a 1 at one input and a 0 at the other, the protection will not work.

The protection circuit works as follows. With a normal input voltage of the main source, only the DA1.2 comparator works, since the voltage is above the minimum shutdown threshold and therefore the open output transistor of the DA1.2 comparator closes pins 4 and 5 of the DD2.4 element to ground, which is similar to the logical 0 state, and at the inputs 1 and 2 elements of DD2.3 have a voltage of about 4.5 - 5 volts, which is similar to the state of logical 1, since the voltage does not reach 13 volts and the comparator DA1.1 does not work. Under this condition, the protection will not work. When the voltage of the main source increases to 13 volts, the comparator DA1.1 starts working, the output transistor opens and, by shorting inputs 1 and 2 of DD2.3 to ground, it forcibly creates a logical level of 0, thereby forcing a logical level of 0 to appear at both inputs and the protection is triggered. If the voltage drops below the minimum threshold, then the voltage supplied to the 7th leg of the comparator drops to a level below 1.65 volts, the output transistor will close and stop connecting inputs 4 and 5 of the DD2.4 element to ground, which will lead to voltage setting at inputs 4 and 5 4.5 - 5 volts (level 1). Since DA1.1 no longer works and DA1.2 has stopped, a condition is created under which a logical one level will appear at both inputs of the protection unit and it will work. The operation of the node is shown in more detail in the table. The table shows the logical states at all pins of the microcircuits.

Table of logical states of node elements.

Setting up the device

A correctly assembled device requires minimal adjustment, namely setting protection thresholds. To do this, instead of the main voltage source, you need to connect an regulated power supply to the device and use trimming resistors to set the protection thresholds.

Appearance of the device

Location of parts on the device board.

List of radioelements

Designation Type Denomination Quantity NoteShopMy notepad
DD1, DD2 Logic IC

K155LA3

2 To notepad
DA1 Comparator

LM339-N

1 To notepad
VR1, VR2 Linear regulator

LM7805

2 To notepad
VT1 Bipolar transistor

KT819A

1 To notepad
Rel 1 RelayRTE240121 To notepad
R1 Resistor

3.3 kOhm

1 To notepad
R2, R3 Resistor

1 kOhm

2