Computers and modern gadgets

Charger from a computer PSU

If you have an old computer power supply, you can find an easy use for it, especially if you are interested in DIY car battery charger.

The appearance of this device is shown in the picture. Alteration is easy to implement, and allows you to charge batteries with a capacity of 55 ... 65 Ah

i.e. almost any battery.

Scheme of smooth switching off high beam

Scheme of smooth switching off high beam

At night, when two cars pass, the driver perceives the switching of the main beam of the headlights of his car to the low beam at the first moment as a sharp decrease in the illumination of the road, which makes him strain his eyesight and leads to rapid fatigue. It is also more difficult for oncoming drivers to navigate in an environment with sharp changes in the brightness of the light in front. This ultimately reduces traffic safety.

Do-it-yourself radio filter

Do-it-yourself radio filter

So, I decided to assemble an RF noise filter. Needed him For car radio power supply from a switching power supply in one recent design. I tried a bunch of them, which I just didn’t do - the effect is weak. First I put large capacities in the battery, connected 3 capacitors for 3300 microfarads 25 volts - it did not help. When powered by a switching power supply, the amplifiers always whistle, put large chokes, 150 turns each, sometimes on W-shaped and ferrite magnetic cores - it's useless.

do-it-yourself brake light control scheme

Vehicle brake light control device

This device, which you can not buy, but easy to assemble with your own hands, is designed for the following, it controls the stop lamps of a car or motorcycle as follows: when you press the brake pedal, the lamps work in a pulsed mode (several lamp flashes for a few seconds), and then the lamps switch to normal continuous lighting. Thus, when triggered, the brake lights are much more effective at attracting the attention of drivers of other vehicles.

Starting a 3-phase motor from 220 Volts

Starting a 3-phase motor from 220 Volts

Often there is a need for a subsidiary farm connect a three-phase electric motor, but there is only single-phase network(220 V). Nothing, it's fixable. You just have to connect a capacitor to the engine, and it will work.

Car battery charging circuit

Do-it-yourself car battery charger

Prices for modern chargers for car batteries are constantly growing due to unrelenting demand for them. Already posted on our website several schemes such devices. And I present to your attention another device: Charging circuit for a 12 volt car battery

Scheme of a simple car battery charger

Scheme of a simple car battery charger

In old TVs that still worked on lamps and not on microchips, there are power transformers TS-180-2

The article shows how to make a simple transformer out of such a transformer. DIY battery charger

Reading

Homemade charger for lead batteries

Homemade charger for lead batteries

While browsing the internet, I came across diagram of a simple powerful charger for car battery .

You can see a photo of this device in the photo on the left, to enlarge, just click on it.

Almost all the radio components I use, from old household appliances, everything is assembled according to the scheme, from the parts that I then had in stock. The TS-180 transformer, the P4B transistor was replaced with P217V, the D305 diode was replaced with D243A, a little later, I installed a fan from an old computer processor on the radiator of the V5 transistor for additional cooling, the V4 transistor was also fixed to a small radiator. All elements are located on a metal chassis, fastened with screws and soldered using surface mounting, all this together is closed by a metal casing, which has now been removed for demonstration.

I have long wanted to make an automatic memory, because. the car is far from home and constant charge control is not possible. After repeated repetition of such devices, it was necessary to abandon the traditional transistor control of the charge current, because. it is difficult to achieve sufficient reliability of the memory. As a result, this device was born. The disadvantages of staging paid off by the absence of fans and bulky heatsinks.

The maximum charge current is determined by the power of the transformer and the thyristors themselves + diode bridge. The charge algorithm can be changed independently if desired (the source is available). After turning on the charger and pressing the "Resume" button, the discharge begins (the current is determined by the power of the headlight lamp). When the voltage reaches below 10.2V, the charger switches to charge mode. Charging algorithm: 10 sec charge with maximum current (15A), 20 sec discharge with current 0.6A when S3 MAX is on, 30 sec charge with rated current (6A), 20 sec discharge with current 0.6A and so on. When the battery voltage reaches 13.8V, the charger switches to the recharge mode, which eliminates intense boiling and heating of the battery. The main charge current is reduced to 1.5-0.5A, the maximum current time is reduced to 2 seconds, and the discharge current is reduced to 0.1A. When the battery is charged to a voltage of 14.8V, the charger will go into storage mode, if the toggle switch is set to the “Des / Manual” position, then the charger does not go into storage mode and manual shutdown is required. If the so-called “Des / Manual” is turned on before turning on the device, then the charger will switch to manual mode and the current is adjusted stepwise by the transformer winding switch. After setting t. "Des / Man" to the lower position, the memory goes into automatic mode. If, when turning on the charger, the "Reset" button is held down, the device will go into the battery training mode (yellow LED) (discharge-charge 3 times) and then go into storage. In storage mode, when the voltage on the battery drops below 12.6V, the charger is turned on and the battery is recharged, etc. cyclically. The end of the charge is indicated by the blue LED lighting up.

All power elements are installed on one radiator and do not heat up above 50 degrees. This device is not a "doctor", however, with constant use, it extends the life of the battery. When using this device, the recovery of the capacity of the sulfated battery was observed (discharge time 5.5 hours instead of 3.5 hours before training).

When setting up the device, MK is not installed. With jumpers we apply 5v alternately to the outputs and check the performance. Resistors R17, R18 set the discharge currents of 0.6A and 0.1A, respectively. Particular attention must be paid to setting the R25 comparator - in the diagram in the upper left corner, the conversion. With a battery voltage of 13.8v, the voltage at the divider should be 1.97v. Some difficulties may arise due to the spread of the parameters of the divider elements, so you need to experiment. With the correct setting of the comparator, the battery turns off on time and does not require recharging, while the density of the electrolyte is maximum.

Relay type TIANBO 15A, resistor R25 type SP5. Transformer 250W. Secondary winding for current up to 15A, taps starting from 13v every 0.7-1v, I got it from each turn. There is no relay K1 on the printed circuit board (protection against network failure). in the original, the relay is powered by the mains. This device was repeated several times and has been working for more than one year. Previously, the memory was executed on transistors, which limited the maximum charge current.

You can download firmware, ASM source code and LAY PCB file below

List of radio elements

Designation Type Denomination Quantity NoteShopMy notepad
IC1 MK PIC 8-bit

PIC16F628A

1 To notepad
VR1 Linear Regulator

L7805AB

1 To notepad
VT1 bipolar transistor

KT972A

1 possible with the letter B To notepad
VT2 bipolar transistor

KT819A

1 possible with any letter index To notepad
1 bipolar transistor

KT3102

1 To notepad
optocoupler

MOC3052M

3 To notepad
TS1 Thyristor & Triac

TS122-25-12

1 To notepad
TS2 Thyristor & TriacTC122-151 To notepad
TS3 Thyristor & Triac

TC106-10-2

1 To notepad
D3, D5-D9, D11-D14 rectifier diode

1N4007

10 To notepad
D4 Diode

D242

1 you can any other 10 amps To notepad
VDD Rectifier bridgeKBK25B1 or any other 25 amp To notepad
VD3 Light-emitting diodeC535A-WJN1 or any other white To notepad
VD4-VD6 Light-emitting diode

AL307V

3 or any other green To notepad
VD7 Light-emitting diode

AL307A

1 or any other red To notepad
VD8 Light-emitting diodeC503B-BAN1 or any other blue To notepad
VD9 Light-emitting diode

AL307E

1 or any other yellow To notepad
VD10 zener diode

KS182A

1 To notepad
C1, C4 470uF 25V2 To notepad
C3 Capacitor0.1uF1 To notepad
C5, C6 electrolytic capacitor100uF 25V2 To notepad
C7 electrolytic capacitor47uF 25V1 To notepad
R1-R3 Resistor

20 ohm

3 To notepad
R4, R10, R16, R17 Resistor

1.5 kOhm

4 To notepad
R5-R8, R11, R15, R20, R21 Resistor

10 kOhm

8 To notepad
R9 Resistor

200 ohm

1 To notepad
R12-R14 Resistor

750 ohm

3 To notepad
R18, R19 Trimmer resistor10 kOhm2 To notepad
R22 Resistor

300 ohm

1 To notepad
R24 Resistor

100 ohm

1

Batteries are very common today, but commercially available chargers for them are usually not universal and too expensive. The proposed device is designed to charge rechargeable batteries and individual batteries (hereinafter referred to as "battery") with a nominal voltage of 1.2...12.6 V and a current of 50 to 950 mA. The input voltage of the device is 7...15 V. The current consumption without load is 20 mA. The accuracy of maintaining the charging current is ± 10 mA. The device has an LCD and a user-friendly interface for setting the charging mode and monitoring its progress.

A combined charging method has been implemented, consisting of two stages. At the first stage, the battery is charged with constant current. As it charges, the voltage across it increases. As soon as it reaches the set value, the second stage will begin - charging with a constant voltage. At this stage, the charging current is gradually reduced, and the set voltage is maintained on the battery. If the voltage drops below the set value for any reason, charging will automatically start again with a constant current.

The charger circuit is shown in fig. 1.

Rice. 1. Charger circuit

Its basis is the DD1 microcontroller. It is clocked from an internal 8 MHz RC oscillator. Two ADC channels of the microcontroller are used. The ADC0 channel measures the charger output voltage, and the ADC1 channel measures the charging current.

Both channels operate in eight-bit mode, which is quite accurate for the described device. The maximum measured voltage is 19.9 V, the maximum current is 995 mA. If these values ​​are exceeded, the inscription "Hi" appears on the HG1 LCD screen.

The ADC operates with a reference voltage of 2.56 V from the microcontroller's internal source. To be able to measure a higher voltage, the R9R10 resistive voltage divider reduces it before applying to the ADC0 input of the microcontroller.

The charging current sensor is resistor R11. The voltage falling on it during the flow of this current is fed to the input of the op-amp DA2.1, which amplifies it by about 30 times. The gain depends on the ratio of the resistances of the resistors R8 and R6. From the output of the op-amp, a voltage proportional to the charging current is fed through the follower to the op-amp DA2.2 to the input of the microcontroller ADC1.

On transistors VT1-VT4, an electronic key is assembled, operating under the control of a microcontroller, which generates pulses at the output of OS2, following at a frequency of 32 kHz. The duty cycle of these pulses depends on the required output voltage and charging current. Diode VD1, inductor L1 and capacitors C7, C8 convert the pulsed voltage into a constant, proportional to its duty cycle.

LEDs HL1 and HL2 - charger status indicators. The HL1 LED on means that the output voltage has been limited. The HL2 LED is on when the charging current is increasing, and off when the current does not change or falls. When charging a healthy discharged battery, the HL2 LED will first turn on. The LEDs will then flash alternately. The completion of charging can be judged by the glow of only the HL1 LED.

A selection of resistor R7 sets the optimal image contrast on the LCD display.

The R11 current sensor can be made from a piece of high-resistance wire from a heater coil or from a powerful wire resistor. The author used a piece of wire with a diameter of 0.5 mm and a length of about 20 mm from the rheostat.

The ATmega8L-8PU microcontroller can be replaced by any of the ATmega8 series with a clock frequency of 8 MHz or higher. The BUZ172 field effect transistor should be installed on a heat sink with a cooling surface area of ​​at least 4 cm2. This transistor can be replaced by another p-channel one with a permissible drain current of more than 1 A and a low open channel resistance.

Instead of transistors KT3102B and KT3107D, another complementary pair of transistors with a current transfer coefficient of at least 200 is also suitable. If the transistors VT1-VT3 are working correctly, the signal at the transistor gate should be similar to that shown in fig. 2.

Rice. 2. Graph of the gate signal

Inductor L1 is removed from the computer power supply (it is wound with a wire with a diameter of 0.6 mm).

The microcontroller configuration must be programmed according to fig. 3. The codes from the V_A_256_16.hex file should be entered into the microcontroller program memory. The following codes must be written into the EEPROM of the microcontroller: at address 00H - 2CH, at address 01H - 03H, at address 02H - 0BEH, at address 03H -64H.

Rice. 3. Microcontroller programming

Establishment of the charger can be started without LCD and microcontroller. Turn off the transistor VT4, and connect the connection points of its drain and source with a jumper. Apply a supply voltage of 16 V to the device. Select the resistor R10 so that the voltage across it is in the range of 1.9 ... 2 V. This resistor can be made up of two resistors connected in series. If there is no 16 V source, apply 12 V or 8 V. In these cases, the voltage across the resistor R10 should be about 1.5 V or 1 V, respectively.

Instead of a battery, connect an ammeter and a powerful resistor or a car lamp in series to the device. By changing the supply voltage (but not lower than 7 V) or selecting the load, set the current through it to 1 A. Select the resistor R6 so that the output of the DA2.2 op-amp has a voltage of 1.9 ... 2 V. Like the resistor R10, resistor R6 is conveniently composed of two.

Turn off the power, connect the LCD and install the microcontroller. Connect a resistor or a 12 V incandescent lamp with a current of about 0.5 A to the output of the device. When the device is turned on, the LCD will display the voltage at its output U and the charging current I, as well as the limiting voltage Uz and the maximum charging current Iz. Compare the current and voltage values ​​on the LCD with the readings of the standard ammeter and voltmeter. They will probably differ.

Turn off the power, install jumper S1 and turn on the power again. To calibrate the ammeter, press and hold the SB4 button, and use the SB1 and SB2 buttons to set on the LCD the value closest to that shown by the reference ammeter. To calibrate the voltmeter, press and hold the SB3 button, and use the SB1 and SB2 buttons to set the value on the LCD equal to that shown by the reference voltmeter. With the power on, remove jumper S1. The calibration coefficients will be written to the EEPROM of the microcontroller for voltage at address 02H, and for current at address 03H.

Turn off the power of the charger, replace the transistor VT4, and connect a 12 V car lamp to the output of the device. Turn on the device and set Uz = 12 V. When Iz changes, the brightness of the lamp should change smoothly. The device is ready to work.

The required charging current and the maximum voltage on the battery are set with the buttons SB1 "▲", SB2 "▼", SB3 "U", SB4 "I". Charging current change interval - 50...950 mA in steps of 50 mA. The voltage change interval is 0.1 ... 16 V in steps of 0.1 V.

To change Uz or Iz, press and hold the SB3 or SB4 button, respectively, and use the SB1 and SB2 buttons to set the desired value. 5 s after releasing all buttons, the set value will be written to the EEPROM of the microcontroller (Uz - at address 00H, Iz - at address 01H). It should be borne in mind that holding the SB1 or SB2 button pressed for more than 4 s increases the rate of parameter change by approximately ten times.

The microcontroller program can be downloaded.


Publication date: 25.09.2016

Readers' opinions
  • Oleg / 19.05.2018 - 21:49
    I beg you, send the file for eeprom firmware to e-mail [email protected] I have been pushing for more than a month, the flower does not come out !!!
  • sasha / 19.01.2018 - 19:10
    The people who collected this device!
  • Yuriy / 19.01.2018 - 18:35
    Question to the author. Conclusion 1 of the microprocessor is hanging in the air. This is not a typo.

This device is designed to measure the capacity of Li-ion and Ni-Mh batteries, as well as to charge Li-ion batteries with a choice of initial charge current.

Control

We connect the device to a stabilized power supply 5v and a current of 1A (for example, from a cell phone). The indicator displays the result of the previous capacitance measurement "ххххmA/c" for 2 seconds, and the value of the OCR1A register "S.xxx" is displayed on the second line. We insert the battery. If you need to charge the battery, then briefly press the CHARGE button, if you need to measure the capacity, then briefly press the TEST button. If you need to change the charge current (the value of the OCR1A register), then long (2 seconds) press the CHARGE button. We go to the window of register adjustment. We release the button. By briefly pressing the CHARGE button, we change the values ​​\u200b\u200bof (50-75-100-125-150-175-200-225) of the register in a circle, the first line shows the charge current of an empty battery at the selected value (provided that you have a resistor 0 in your circuit .22 ohm). Briefly press the TEST button, the value of the OCR1A register is stored in non-volatile memory.
If you have done various manipulations with the device and you need to reset the clock, the measured capacity, then press the TEST button for a long time (the value of the OCR1A register is not reset). As soon as the charge is completed, the display backlight turns off, to turn on the backlight, briefly press the TEST or CHARGE button.

The logic of the device is as follows:

When power is applied, the indicator displays the result of the previous measurement of the battery capacity and the value of the OCR1A register stored in non-volatile memory. After 2 seconds, the device switches to the mode of determining the type of battery by the voltage value at the terminals.

If the voltage is more than 2V, then it is a Li-ion battery and the full discharge voltage will be 2.9V, otherwise it is a Ni-MH battery and the full discharge voltage will be 1V. Only after the battery is connected, the control buttons are available. Next, the device waits for the Test or Charge buttons to be pressed. The display shows "_STOP". By briefly pressing the Test button, the load is connected via the MOSFET.

The discharge current value is determined by the voltage across the 5.1 Ohm resistor and, every minute, is added to the previous value. The device uses 32768Hz quartz to operate the clock.

The display shows the current value of the battery capacity "ххххmA/c" and the discharge rate "А.ххх", as well as the time "хх:хх:хх" from the moment the button was pressed. An animated low battery icon is also shown. At the end of the test for the Ni-MH battery, the inscription "_STOP" appears, the measurement result is displayed on the display "ххххmA/c" and stored.

If the battery is Li-ion, then the measurement result is also displayed on the display "xxxxmA / c" and stored, but the charge mode immediately turns on. The display shows the contents of the OCR1A register "S.xxx". An animated battery icon is also shown.

The charge current is adjusted using PWM and is limited by a 0.22 Ohm resistor. Hardware charge current can be reduced by increasing the resistance of 0.22 ohm to 0.5-1 ohm. At the beginning of the charge, the current gradually increases to the value of the OCR1A register or until the voltage at the battery terminals reaches 4.22V (if the battery was charged).

The value of the charge current depends on the value of the register OCR1A - more value - more charge current. When the voltage at the battery terminals exceeds 4.22V, the value of the OCR1A register decreases. The recharging process continues until the value of the OCR1A register is 33, which corresponds to a current of about 40 mA. This completes the charge. The display backlight turns off.

Setting

1. Connect the power.
2. Connect the battery.
3. Connect the voltmeter to the battery.
4. Using the temporary buttons + and - (PB4 and PB5), we achieve the coincidence of the voltmeter readings on the display and on the reference voltmeter.
5. Long press the TEST button (2 seconds), memorization occurs.
6. Remove the battery.
7. We connect the voltmeter to the 5.1 Ohm resistor (according to the diagram near the 09N03LA transistor).
8. We connect an adjustable PSU to the battery terminals, set it to a 4V PSU.
9. Briefly press the TEST button.
10. We measure the voltage across the 5.1 Ohm resistor - U.
11. Calculate the discharge current I=U/5.1
12. Use the + and - time buttons (PB4 and PB5) to set the calculated discharge current I on the "A.xxx" indicator.
13. Long press the TEST button (2 seconds), memorization occurs.

The device is powered by a stabilized source with a voltage of 5 volts and a current of 1A. Quartz at 32768Hz is designed for accurate timing. The ATmega8 controller is clocked from an internal 8 MHz oscillator, and it is also necessary to set the EEPROM erasure protection with the appropriate configuration bits. When writing the control program, training articles from this site were used.

The current values ​​of the voltage and current coefficients (Ukof . Ikof) can be seen if you connect a 16x4 display (16x4 is preferred for debugging) on ​​the third line. Or in Ponyprog if you open the EEPROM firmware file (read from the EEPROM controller).
1 byte - OCR1A , 2 bytes - I_kof, 3 bytes - U_kof, 4 and 5 bytes the result of the previous capacitance measurement.

Video of the device operation:

If you notice an error, select a piece of text and press Ctrl + Enter
SHARE:
Computers and modern gadgets