Home > Industry News > Digital intelligent charger

Digital intelligent charger

This paper introduces the design of a general intelligent charger based on single chip microcomputer. The charger can collect the voltage and current of the battery in real time, control the charging process intelligently, calculate the charge of the battery and the remainder of the charging time. It can also communicate with the host by serial port and host computer, and show the necessary information to the user, and the function of the virtual instrument. In addition, it can also change the parameters to adapt to various kinds of batteries. Charging. Here are several different battery charging tests to illustrate the practical value of smart chargers.
1 Hardware Design of intelligent charger
The intelligent charger is shown in Figure 1. It mainly includes power conversion circuit, sampling circuit, processor, PWM controller and battery pack, forming a closed loop system [4]. The following is a brief description of the working principle of the system.

Figure 1 module diagram of intelligent charger circuit

Click here to see all the news pictures
1.1 processor
The processor uses 51 series of singlechip 89C51. The MCU has two timers, two external interrupts and one serial port interrupt, three eight I/O ports, and 11.0592MHz crystal oscillator. The task of singlechip is to collect the battery charge state by sampling circuit in real time, determine the charging current of the next stage by calculation, and then send the command to control the size of the current. SCM is connected to the host computer through serial port RS232, which is used for storing data and virtual display.
1.2 sampling section
Voltage and current sampling uses analog to digital converter AD574.  AD574 is a dual power supply of + 15V, 12 bit output, the maximum error is + 4bit, and the total voltage is 0.01V.
The charging current is converted to voltage by current sensor MAX471.  The voltage value of the current sampling and the end voltage of the battery pack are simulated by the analog switch CD4051, then the voltage follower is input to the AD574, and the conversion is carried out respectively. The results are read by the single chip computer and stored and processed. The main circuit connection is shown in Figure 2.

Figure 2 sampling circuit

Click here to see all the news pictures
1.3 controller
The controller uses pulse width modulation (PWM) to control the size of the supply current. The PWM generator is made up of another 20MHz single chip microcomputer. The main controller communicates with it by interruption, and controls its increase or decrease of pulse width. The PWM signal drives the MOSFET on the main loop by photoelectric isolation. Switch, diode and LC circuit constitute switching power supply.  The switching power supply controlled by PWM can reduce power consumption and facilitate digital control, but the ripple coefficient of bus bar is relatively large. The PWM control circuit is shown in Figure 3.

Figure 3 PWM control circuit

Click here to see all the news pictures
2 software design of intelligent charger
2.1 data measurement
In the single chip microcomputer measurement, the battery voltage value and the current measurement value are selected through the multiplexer, and then converted to 16 decimal number through the A/D converter and directly into the single chip microcomputer. The battery capacitance C needs to be indirectly calculated. Because the current is detected once every cycle, the capacitance C can be calculated by integrating the current value. Considering the influence of R on the internal resistance of the battery, the formula for calculating the capacitance is obtained.
Cn+1=Cn+I. T-I2. R. T
The charging time and the remaining charging time are calculated by the upper computer, and the remaining charging time is equal to the difference between the preset charging time and the charging time. The preset time can be obtained in advance according to the type of battery.
Control program design of 2.2 single chip microcomputer
For different batteries and different parameters, the microcontroller needs to set different charging parameters and choose different charging strategies. In addition, the program needs to stop battery charging under abnormal conditions such as battery overcurrent and overvoltage. Taking lithium ion battery as an example, the constant current constant voltage charging method is usually adopted, and its charging process includes small current precharge, large current charging, constant voltage charging and so on. The flow chart of its charge control program is shown in Figure 4.
Figure 4 charge control strategy program

Click here to see all the news pictures
In the process of controlling a constant current and a constant voltage, proportional control is adopted, that is, if the charge current I is greater than the set current Is, the pulse width is reduced in proportion, and on the other hand, the pulse width is increased in proportion. The MCU also needs to receive and process commands from the host computer, and send the data back to the host computer in real time according to the request of the upper computer. The communication protocol between them should be pre programmed in the program.
2.3 host computer processing program design
The host computer program is written by VisualC++. The task is to send a query command to the serial port every 1 second clock, and read the information of the SCM return, and extract the parameters of the charging current, the charging voltage, the working state and so on. The parameters are displayed after number conversion and calculation. The software has a good user interface, which can easily observe the current working state and the remaining charging time of the battery. The PC program will store the data read in the file at the same time, which can be processed by other mathematical software (such as Matlab).
In addition, when the program is initialized, the parameters of the battery are sent to the intelligent charger. The parameters generally include the type of the battery (lithium ion battery, nickel cadmium battery), the capacity of the rechargeable battery (mAh), etc. According to the different battery types, the MCU can set different charging parameters.