Menu English Ukrainian russian Home

Free technical library for hobbyists and professionals Free technical library


ENCYCLOPEDIA OF RADIO ELECTRONICS AND ELECTRICAL ENGINEERING
Free library / Schemes of radio-electronic and electrical devices

Universal microcontroller charger. Encyclopedia of radio electronics and electrical engineering

Free technical library

Encyclopedia of radio electronics and electrical engineering / Power Supplies

Comments on the article Comments on the article

The author set himself the task of creating a simple universal device for charging any small-sized batteries and their batteries of various types, capacities and nominal voltages.

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 falls below the set value for any reason, constant current charging will automatically start again.

The charger circuit is shown in fig. one.

Universal microcontroller charger
Rice. 1. Charger circuit (click to enlarge)

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 rising, 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.

Universal microcontroller charger
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.

Universal microcontroller charger
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 from ftp://ftp.radio.ru/pub/2016/09/va-256_16.zip.

Author: V. Nefedov

See other articles Section Power Supplies.

Read and write useful comments on this article.

<< Back

Latest news of science and technology, new electronics:

Machine for thinning flowers in gardens 02.05.2024

In modern agriculture, technological progress is developing aimed at increasing the efficiency of plant care processes. The innovative Florix flower thinning machine was presented in Italy, designed to optimize the harvesting stage. This tool is equipped with mobile arms, allowing it to be easily adapted to the needs of the garden. The operator can adjust the speed of the thin wires by controlling them from the tractor cab using a joystick. This approach significantly increases the efficiency of the flower thinning process, providing the possibility of individual adjustment to the specific conditions of the garden, as well as the variety and type of fruit grown in it. After testing the Florix machine for two years on various types of fruit, the results were very encouraging. Farmers such as Filiberto Montanari, who has used a Florix machine for several years, have reported a significant reduction in the time and labor required to thin flowers. ... >>

Advanced Infrared Microscope 02.05.2024

Microscopes play an important role in scientific research, allowing scientists to delve into structures and processes invisible to the eye. However, various microscopy methods have their limitations, and among them was the limitation of resolution when using the infrared range. But the latest achievements of Japanese researchers from the University of Tokyo open up new prospects for studying the microworld. Scientists from the University of Tokyo have unveiled a new microscope that will revolutionize the capabilities of infrared microscopy. This advanced instrument allows you to see the internal structures of living bacteria with amazing clarity on the nanometer scale. Typically, mid-infrared microscopes are limited by low resolution, but the latest development from Japanese researchers overcomes these limitations. According to scientists, the developed microscope allows creating images with a resolution of up to 120 nanometers, which is 30 times higher than the resolution of traditional microscopes. ... >>

Air trap for insects 01.05.2024

Agriculture is one of the key sectors of the economy, and pest control is an integral part of this process. A team of scientists from the Indian Council of Agricultural Research-Central Potato Research Institute (ICAR-CPRI), Shimla, has come up with an innovative solution to this problem - a wind-powered insect air trap. This device addresses the shortcomings of traditional pest control methods by providing real-time insect population data. The trap is powered entirely by wind energy, making it an environmentally friendly solution that requires no power. Its unique design allows monitoring of both harmful and beneficial insects, providing a complete overview of the population in any agricultural area. “By assessing target pests at the right time, we can take necessary measures to control both pests and diseases,” says Kapil ... >>

Random news from the Archive

vegetable mine detector 12.06.2006

Danish botanists have bred a variety of small weed - rezushki, the leaves of which change color if a mine or explosive is found in the soil under the plant.

Under the influence of small doses of nitrogen dioxide, which is slowly released during the decomposition of TNT, the leaves of the cress turn red. You can visually identify the mines left in the ground after the hostilities.

Other interesting news:

▪ Thecus N4 4350-bay NAS

▪ Heavy duty diamond laser

▪ Call across the stratosphere

▪ Solar panels working at night

▪ Blu-ray disc cost

News feed of science and technology, new electronics

 

Interesting materials of the Free Technical Library:

▪ section of the site Microcontrollers. Article selection

▪ article Energy crisis, its demographic and social consequences. Basics of safe life

▪ article How do goats eat? Detailed answer

▪ article Picker of goods. Standard instruction on labor protection

▪ article What is Frame Relay? Encyclopedia of radio electronics and electrical engineering

▪ article Focus with finding the map. Focus Secret

Leave your comment on this article:

Name:


Email (optional):


A comment:





All languages ​​of this page

Home page | Library | Articles | Website map | Site Reviews

www.diagram.com.ua

www.diagram.com.ua
2000-2024