Automatic battery shutdown or charger. An attachment for a charger or how to restore a battery. An attachment for a charger on a microcontroller

Share to:

We present a simple circuit diagram of an automatic attachment for a car charger. It is recommended to supplement simple industrial and homemade chargers for car batteries with this automatic device, which turns it on when the voltage on the battery drops to the minimum permissible value and turns it off after full charging. Moreover, not every budget memory device has such functions.
Electrical diagram

The maximum voltage for car batteries is 14.2...14.5 V, the minimum acceptable is 10.8 V. It is advisable to limit the minimum to 11.5...12 V for greater reliability. Circuit operation. After connecting the battery and turning on the network, press the SB1 “Start” button. Transistors VT1 and VT2 close, opening the key VT3, VT4, which turns on relay K1. With its normally closed contacts K1.2, it turns off relay K2, the normally closed contacts of which (K2.1), when closed, connect the charger to the network. Such a complex switching scheme is used for two reasons: firstly, it ensures decoupling of the high-voltage circuit from the low-voltage one; secondly, so that relay K2 turns on at the maximum battery voltage and turns off at the minimum. Contacts K1.1 of relay K1 switch to the lower position according to the diagram. During the battery charging process, the voltage across resistors R1 and R2 increases, and when the unlocking voltage is reached at the base of VT1, transistors VT1 and VT2 open, closing the key VT3, VT4.

Relay K1 turns off, including K2. The normally closed contacts K2.1 open and de-energize the charger. Contacts K1.1 move to the top position according to the diagram. Now the voltage at the base of the composite transistor VT1, VT2 is determined by the voltage drop across resistors R1 and R2. As the battery discharges, the voltage at the base of VT1 decreases, and at some point VT1, VT2 close, opening the key VT3, VT4. The charging cycle begins again. Capacitor C1 serves to eliminate interference from the bounce of contacts K1.1 at the time of switching.

Setting up the charger attachment
The adjustment is carried out without a battery and charger. You need an adjustable constant voltage power supply with smooth adjustment limits up to 20 V. It is connected to the terminals of the circuit instead of GB1. The resistor R1 slider is moved to the upper position, and the R5 slider is moved to the lower position. The source voltage is set equal to the minimum battery voltage (11.5...12 V). By moving the R5 engine, relay K1 and LED VD7 are turned on. Then, raising the source voltage to 14.2...14.5 V, moving the R1 slider turns off K1 and the LED. By changing the source voltage in both directions, make sure that the device turns on at a voltage of 11.5...12 V, and turns off at 14.2...14.5 V. The setup is ready - you can carry out tests. Just be sure to supervise the first charge while you are nearby.

The finished automatic device can be placed in the body of the charger itself (if space allows), or it can be in the form of a separate block.


Chapter:

This design is connected as an attachment to a charger, a variety of different circuits of which have already been described on the Internet. It displays on the liquid crystal display the input voltage value, the amount of battery charging current, charging time and charging current capacity (which can be either in Amp-hours or milliamp-hours - depends only on the controller firmware and the shunt used). (Cm. Fig.1 And Fig.2)

Fig.1

Fig.2

The output voltage of the charger should not be less than 7 volts, otherwise this set-top box will require a separate power source.

The device is based on a PIC16F676 microcontroller and a 2-line liquid crystal indicator SC 1602 ASLB-XH-HS-G.

The maximum charging capacity is 5500 mA/h and 95.0 A/h, respectively.

The schematic diagram is shown in Fig 3.

Fig.3. Schematic diagram of an attachment for measuring charging capacity

Connection to the charger - on Fig 4.


Fig.4 Connection diagram of the set-top box to the charger

When turned on, the microcontroller first requests the required charging capacity.
Set by button SB1. Reset - button SB2.
Pin 2 (RA5) goes high, which turns on relay P1, which in turn turns on the charger ( Fig.5).
If the button is not pressed for more than 5 seconds, the controller automatically switches to measurement mode.

The algorithm for calculating the capacity in this set-top box is as follows:
Once a second, the microcontroller measures the voltage at the input of the set-top box and the current, and if the current value is greater than the least significant digit, it increases the seconds counter by 1. Thus, the clock only shows the charging time.

Next, the microcontroller calculates the average current per minute. To do this, the charging current readings are divided by 60. The whole number is recorded in the meter, and the remainder of the division is then added to the next measured current value, and only then this sum is divided by 60. Having thus made 60 measurements in 1 minute, the number in the meter will be average current value per minute.
When the second reading passes through zero, the average current value is in turn divided by 60 (using the same algorithm). Thus, the capacity counter increases once per minute by one sixtieth of the average current per minute. After this, the average current counter is reset to zero and counting starts over. Each time, after calculating the charging capacity, a comparison is made between the measured capacity and the specified one, and if they are equal, the message “Charging complete” is displayed on the display, and in the second line - the value of this charging capacity and voltage. A low level appears at pin 2 of the microcontroller (RA5), which turns off the relay. The charger will disconnect from the network.


Fig.5

Setting up the device comes down only to setting the correct readings of the charging current (R1 R5) and input voltage (R4) using a reference ammeter and voltmeter.

Now about shunts.
For a charger with a current of up to 1000 mA, you can use a 15 V power supply, a 0.5-10 Ohm resistor with a power of 5 W as a shunt (a lower resistance value will introduce a smaller error in the measurement, but will make it difficult to accurately adjust the current when calibrating the device), and sequentially with a rechargeable battery, a variable resistance of 20-100 Ohms, which will set the value of the charging current.
For a charging current of up to 10A, you will need to make a shunt from high-resistance wire of a suitable cross-section with a resistance of 0.1 Ohm. The tests have shown that even with a signal from the current shunt equal to 0.1 volts, the tuning resistors R1 and R3 can easily set the current reading to 10 A.

Printed circuit board for this device was developed for the WH1602D indicator. But you can use any suitable indicator by resoldering the wires accordingly. The board is assembled in the same dimensions as the liquid crystal display and is fixed at the back. The microcontroller is installed on the socket and allows you to quickly change the firmware to switch to a different charger current.

Before turning on for the first time, set the trimming resistors to the middle position.

As a shunt for the firmware version for low currents, you can use 2 MLT-2 1 Ohm resistors connected in parallel.

You can use the WH1602D indicator in the set-top box, but you will have to swap pins 1 and 2. In general, it is better to check the documentation for the indicator.

MELT indicators will not work due to incompatibility with the 4-bit interface.

If desired, you can connect the indicator backlight via a 100 Ohm current limiting resistor

This attachment can be used to determine the capacity of a charged battery.

Fig.6.Determining the capacity of a charged battery

You can use any load as a load (Light bulb, resistor...), only when turning it on you need to set any obviously large battery capacity and at the same time monitor the battery voltage to prevent deep discharge.

(From the author) The set-top box was tested with a modern pulse charger for car batteries,
These devices provide stable voltage and current with minimal ripple.
When connecting the set-top box to an old charger (step-down transformer and diode rectifier), I was unable to adjust the charging current readings due to large ripples.
Therefore, it was decided to change the algorithm for measuring the charging current by the controller.
In the new edition, the controller makes 255 current measurements in 25 milliseconds (at 50Hz - the period is 20 milliseconds). And from the measurements taken, it selects the largest value.
The input voltage is also measured, but the lowest value is selected.
(At zero charging current, the voltage should be equal to the battery emf.)
However, with such a scheme, it is necessary to install a diode and a smoothing capacitor (>200 µF) in front of the 7805 stabilizer for a voltage not less than the output voltage of the charger
devices. A poorly smoothed microcontroller supply voltage led to malfunctions.
To accurately set the set-top box readings, it is recommended to use multi-turn trimmersor install additional resistors in series with trimmers (select experimentally).
As a shunt for a 10 A set-top box, I tried to use a piece of aluminum wire with a cross-section of 1.5 mmabout 20 cm long - works great.

The automatic charger is designed for charging and desulfating 12-volt batteries with a capacity of 5 to 100 Ah and assessing their charge level. The charger has protection against polarity reversal and short circuit of the terminals. It uses microcontroller control, thanks to which safe and optimal charging algorithms are implemented: IUoU or IUIoU, followed by recharging to a full charge level. Charging parameters can be adjusted manually for a specific battery or you can select those already included in the control program.

Basic operating modes of the device for the presets included in the program.

>>
Charging mode - “Charge” menu. For batteries with capacities from 7Ah to 12Ah, the IUoU algorithm is set by default. This means:

- First step- charging with a stable current of 0.1C until the voltage reaches 14.6V

- second phase-charging with a stable voltage of 14.6V until the current drops to 0.02C

- third stage- maintaining a stable voltage of 13.8V until the current drops to 0.01C. Here C is the battery capacity in Ah.

- fourth stage- recharging. At this stage, the voltage on the battery is monitored. If it drops below 12.7V, the charge starts from the very beginning.

For starter batteries we use the IUIoU algorithm. Instead of the third stage, the current is stabilized at 0.02C until the battery voltage reaches 16V or after about 2 hours. At the end of this stage, charging stops and recharging begins.

>> Desulfation mode - “Training” menu. Here the training cycle is carried out: 10 seconds - discharge with a current of 0.01C, 5 seconds - charge with a current of 0.1C. The charge-discharge cycle continues until the battery voltage rises to 14.6V. Next is the usual charge.

>>
The battery test mode allows you to evaluate the degree of battery discharge. The battery is loaded with a current of 0.01C for 15 seconds, then the voltage measurement mode on the battery is turned on.

>> Control-training cycle. If you first connect an additional load and turn on the “Charge” or “Training” mode, then in this case, the battery will first be discharged to a voltage of 10.8 V, and then the corresponding selected mode will be turned on. In this case, the current and discharge time are measured, thus calculating the approximate capacity of the battery. These parameters are displayed on the display after charging is complete (when the message “Battery charged” appears) when you press the “select” button. As an additional load, you can use a car incandescent lamp. Its power is selected based on the required discharge current. Usually it is set equal to 0.1C - 0.05C (10 or 20 hour discharge current).

Charging circuit diagram for 12V battery

Schematic diagram of an automatic car charger



Drawing of an automatic car charger board

The basis of the circuit is the AtMega16 microcontroller. Navigation through the menu is carried out using the buttons " left», « right», « choice" The “reset” button exits any operating mode of the charger to the main menu. The main parameters of charging algorithms can be configured for a specific battery; for this, there are two customizable profiles in the menu. The configured parameters are saved in non-volatile memory.

To get to the settings menu, you need to select any of the profiles and press the “ choice", choose " installations», « profile parameters", profile P1 or P2. Having selected the desired option, click “ choice" Arrows " left" or " right» will change to arrows « up" or " down", which means the parameter is ready to change. Select the desired value using the “left” or “right” buttons, confirm with the “ choice" The display will show “Saved”, indicating that the value has been written to the EEPROM. Read more about the setup on the forum.

The control of the main processes is entrusted to the microcontroller. A control program is written into its memory, which contains all the algorithms. The power supply is controlled using PWM from the PD7 pin of the MK and a simple DAC based on elements R4, C9, R7, C11. The measurement of battery voltage and charging current is carried out using the microcontroller itself - a built-in ADC and a controlled differential amplifier. The battery voltage is supplied to the ADC input from the divider R10 R11.


Charging and discharging current are measured as follows. The voltage drop from the measuring resistor R8 through dividers R5 R6 R10 R11 is supplied to the amplifier stage, which is located inside the MK and connected to pins PA2, PA3. Its gain is set programmatically, depending on the measured current. For currents less than 1A, the gain factor (GC) is set equal to 200, for currents above 1A GC=10. All information is displayed on the LCD connected to ports PB1-PB7 via a four-wire bus.

Protection against polarity reversal is carried out on transistor T1, signaling of incorrect connection is carried out on elements VD1, EP1, R13. When the charger is connected to the network, transistor T1 is closed at a low level from the PC5 port, and the battery is disconnected from the charger. It connects only when you select the battery type and charger operating mode in the menu. This also ensures that there is no sparking when the battery is connected. If you try to connect the battery in the wrong polarity, the buzzer EP1 and the red LED VD1 will sound, signaling a possible accident.

During the charging process, the charging current is constantly monitored. If it becomes equal to zero (the terminals have been removed from the battery), the device automatically goes to the main menu, stopping the charge and disconnecting the battery. Transistor T2 and resistor R12 form a discharge circuit, which participates in the charge-discharge cycle of the desulfating charge and in the battery test mode. The discharge current of 0.01C is set using PWM from the PD5 port. The cooler automatically turns off when the charging current drops below 1.8A. The cooler is controlled by port PD4 and transistor VT1.

Resistor R8 is ceramic or wire, with a power of at least 10 W, R12 is also 10 W. The rest are 0.125W. Resistors R5, R6, R10 and R11 must be used with a tolerance of at least 0.5%. The accuracy of the measurements will depend on this. It is advisable to use transistors T1 and T1 as shown in the diagram. But if you have to select a replacement, then you need to take into account that they must open with a gate voltage of 5V and, of course, must withstand a current of at least 10A. For example, transistors marked 40N03GP, which are sometimes used in the same ATX format power supplies, in the 3.3V stabilization circuit.


Schottky diode D2 can be taken from the same power supply, from the +5V circuit, which we do not use. Elements D2, T1 and T2 are placed on one radiator with an area of ​​40 square centimeters through insulating gaskets. Sound emitter - with a built-in generator, voltage 8-12 V, sound volume can be adjusted with resistor R13.

LCD– WH1602 or similar, on the controller HD44780, KS0066 or compatible with them. Unfortunately, these indicators may have different pin locations, so you may have to design a printed circuit board for your instance


Setting up consists of checking and calibrating the measuring part. We connect a battery or a 12-15V power supply and a voltmeter to the terminals. Go to the “Calibration” menu. We check the voltage readings on the indicator with the readings of the voltmeter, if necessary, correct them using the “<» и «>" Click "Select".


Next comes calibration by current at KU=10. With the same buttons "<» и «>“You need to set the current reading to zero. The load (battery) is automatically switched off, so there is no charging current. Ideally, there should be zeros or very close to zero values. If so, this indicates the accuracy of resistors R5, R6, R10, R11, R8 and the good quality of the differential amplifier. Click "Select". Similarly - calibration for KU=200. "Choice". The display will show “Ready” and after 3 seconds the device will go to the main menu. Correction factors are stored in non-volatile memory. It is worth noting here that if, during the very first calibration, the voltage value on the LCD is very different from the voltmeter readings, and the currents at any KU are very different from zero, you need to select other divider resistors R5, R6, R10, R11, R8, otherwise in operation devices may malfunction. With precision resistors, correction factors are zero or minimal. This completes the setup. In conclusion. If the voltage or current of the charger at some stage does not increase to the required level or the device “pops up” in the menu, you need to once again carefully check that the power supply has been modified correctly. Perhaps the protection is triggered.

Converting an ATX power supply to a charger

Electrical circuit for modification of standard ATX

It is better to use precision resistors in the control circuit, as indicated in the description. When using trimmers, the parameters are not stable. tested from my own experience. When testing this charger, it carried out a full cycle of discharging and charging the battery (discharging to 10.8V and charging in training mode, it took about a day). The heating of the computer's ATX power supply is no more than 60 degrees, and that of the MK module is even less.


There were no problems with the setup, it started right away, it just needed some adjustment to the most accurate readings. After demonstrating the work of this charging machine to a friend who was a car enthusiast, an application was immediately received for the production of another copy. Author of the scheme - Slon , assembly and testing - sterc .

Discuss the article AUTOMATIC CAR CHARGER

For example, for car batteries, it can be significantly improved by adding this attachment - an automatic device that turns it on when the voltage on the battery drops to a minimum and turns it off after charging. This is especially true when storing the battery for a long time without operation - to prevent self-discharge. The diagram of the console is shown in the figure below.

The maximum voltage for car batteries is within 14.2...14.5 V. The minimum permissible during discharge is 10.8 V. After connecting the battery and turning on the network, press the SB1 “Start” button. Transistors VT1 and VT2 close, opening the key VT3, VT4, which turns on relay K1. With its normally closed contacts K1.2, it turns off relay K2, the normally closed contacts of which (K2.1), when closed, connect the charger to the network. Such a complex switching scheme is used for two reasons: firstly, it ensures decoupling of the high-voltage circuit from the low-voltage one; secondly, so that relay K2 turns on at the maximum battery voltage and turns off at the minimum, because The RES22 relay used has a switching voltage of 12 V.

Contacts K1.1 of relay K1 switch to the lower position according to the diagram. During the battery charging process, the voltage across resistors R1 and R2 increases, and when the unlocking voltage is reached at the base of VT1, transistors VT1 and VT2 open, closing the key VT3, VT4. Relay K1 turns off, including K2. The normally closed contacts K2.1 open and de-energize the charger. Contacts K1.1 move to the top position according to the diagram. Now the voltage at the base of the composite transistor VT1, VT2 is determined by the voltage drop across resistors R1 and R2. As the battery discharges, the voltage at the base of VT1 decreases, and at some point VT1, VT2 close, opening the key VT3, VT4. The charging cycle begins again. Capacitor C1 serves to eliminate interference from the bounce of contacts K1.1 at the time of switching.

The device is adjusted without a battery or charger. An adjustable constant voltage source with regulation limits of 10...20 V is required. It is connected to the circuit terminals instead of GB1. The resistor R1 slider is moved to the upper position, and the R5 slider is moved to the lower position. The source voltage is set equal to the minimum battery voltage (11.5...12 V). By moving the R5 engine, relay K1 and LED VD7 are turned on. Then, raising the source voltage to 14.2...14.5 V, moving the R1 slider turns off K1 and the LED. By changing the source voltage in both directions, make sure that the device turns on at a voltage of 11.5...12 V, and turns off at 14.2...14.5 V. The photo shows a homemade charger for car batteries, with a built-in prefix.


An interesting simple design of a 3x3x3 LED cube using LEDs and microcircuits.


In this article we will look at the circuit of a simple voice recorder. Sometimes there is a need to record signals or speech fragments of short duration. This device is designed to record sound over a short period of time. The microphone used is an electret one, which can be found everywhere, for example in a Chinese tape recorder.

This attachment, the circuit of which is shown in the figure, is made on a powerful composite transistor and is intended for charging a car battery with a voltage of 12 V asymmetrical alternating current. This ensures automatic training of the battery, which reduces its tendency to sulfate and extends its service life. The set-top box can work in conjunction with almost any full-wave pulse charger that provides the required charging current, for example, with the industrial Rassvet-2.

When the output of the set-top box is connected to the battery (the charger is not connected), when capacitor C1 is still discharged, the initial charging current of the capacitor begins to flow through resistor R1, the emitter junction of transistor VT1 and resistor R2. Transistor VT1 opens, and a significant battery discharge current flows through it, quickly charging capacitor C1. As the voltage across the capacitor increases, the battery discharge current decreases to almost zero.

After connecting the charger to the input of the set-top box, a battery charging current appears, as well as a small current through resistor R1 and diode VD1. In this case, transistor VT1 is closed, since the voltage drop across the open diode VD1 is not enough to open the transistor. Diode VD3 is also closed, since the reverse voltage of the charged capacitor C1 is applied to it through diode VD2.

At the beginning of the half-cycle, the output voltage of the charger is added to the voltage on the capacitor, and the battery is charged through the diode VD2, which leads to the return of the energy accumulated by the capacitor to the battery. Next, the capacitor is completely discharged and diode VD3 opens, through which the battery now continues to charge. A decrease in the output voltage of the charger at the end of the half-cycle to the level of the battery EMF and below leads to a change in the polarity of the voltage on the diode VD3, closing it and stopping the charging current.

In this case, transistor VT1 opens again and a new impulse occurs in discharging the battery and charging the capacitor. With the beginning of a new half-cycle of the charger's output voltage, the next battery charging cycle begins.

The amplitude and duration of the battery discharge pulse depend on the values ​​of resistor R2 and capacitor C1. They were selected in accordance with the recommendations given in [L].

The transistor and diodes are placed on separate heat sinks with an area of ​​at least 120 cm 2 each. The console uses a K50-15 capacitor for the maximum permissible operating temperature of +125 °C; it can be replaced with large capacitors with a rated voltage of at least 160 V, for example, K50-22, K50-27 or K50-7 (with a capacity of 500 μF). Resistor R1 is MLT-0.5, and R2 is C5-15 or made independently.

In addition to the KT827A transistor indicated in the diagram, you can use KT827B, KT827V. The set-top box can use transistors KT825G - KT825E and diodes KD206A, but the polarity of the diodes, capacitor, as well as the input and output terminals of the set-top box must be changed to the opposite.