Application of PWM technology in single chip microcomputer controlled intelligent charger

Publisher:素心轻语Latest update time:2011-12-30 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

The basic principle of PWM technology

With the development of electronic technology, a variety of PWM technologies have emerged, including: phase voltage control PWM, pulse width PWM method, random PWM, SPWM method, line voltage control PWM, etc. This article introduces the pulse width PWM method used in the intelligent charger of nickel-hydrogen batteries. It uses a pulse train with equal pulse width as a PWM waveform. By changing the period of the pulse train, the frequency can be modulated, and by changing the width or duty cycle of the pulse, the voltage can be adjusted. The voltage and frequency can be coordinated by using appropriate control methods. The purpose of controlling the charging current can be achieved by adjusting the period of PWM and the duty cycle of PWM.

Specific application of PWM technology
PWM software method to control charging current

The basic idea of ​​this method is to use the PWM port of the microcontroller, and adjust the PWM control register of the microcontroller by software to adjust the PWM duty cycle without changing the PWM square wave cycle, so as to control the charging current. The microcontroller required by this method must have two necessary conditions: ADC port and PWM port. In addition, the number of ADC bits should be as high as possible, and the working speed of the microcontroller should be as fast as possible. Before adjusting the charging current, the microcontroller first quickly reads the size of the charging current, and then compares the set charging current with the actual charging current read. If the actual current is too small, the PWM duty cycle is adjusted in the direction of increasing the charging current; if the actual current is too large, the PWM duty cycle is adjusted in the direction of reducing the charging current. In the process of adjusting the software PWM, attention should be paid to the ripple interference introduced by the ADC reading deviation and the power supply working voltage, and digital filtering technology such as the arithmetic average method should be reasonably adopted. The software PWM method has the following advantages and disadvantages.

advantage:

  1. The hardware circuit of PWM is simplified and the hardware cost is reduced. Using software PWM does not require external hardware PWM and voltage comparator, only power MOSFET, freewheeling magnetic core, energy storage capacitor and other components are needed, which greatly simplifies the peripheral circuit.
  2. The trickle current can be controlled. During the PWM controlled charging process, the microcontroller can detect the size of the charging current on the ADC port in real time, and compare the charging current with the set trickle current to determine the adjustment direction of the PWM duty cycle.
  3. Battery wake-up charging. The microcontroller can set the charging current arbitrarily by using the ADC port and the PWM register. Therefore, for batteries with relatively low voltage, after power-on, a small current can be used to charge and wake up the battery. In the case of a small current, it can be approximately considered as a constant current, and the impact and damage to the battery is also small.

shortcoming:

  1. The current control accuracy is low. The sensing of the charging current is achieved through the current sampling resistor. The voltage drop on the sampling resistor is transmitted to the ADC input port of the microcontroller. The microcontroller can know the charging current by reading the voltage of this port. If the sampling resistor is set to Rsample (in Ω), the voltage drop of the sampling resistor is Vsample (in mV), and the reference voltage of the 10-bit ADC is 5.0V. Then the voltage value corresponding to 1 LSB of the ADC is 5000mV/1024≈5mV. A 5mV value converted into a current value is 50mA, so the maximum current control accuracy of the software PWM is 50mA. If you want to increase the current control accuracy of the software PWM, you can try to reduce the reference voltage of the ADC or use a microcontroller with an ADC of more than 10 bits.
  2. PWM uses a soft start mode. During the process of high-current fast charging, from the stop to the restart of charging, due to the existence of the back electromotive force on the magnetic core, the effective duty cycle of PWM must be reduced during recharging to overcome the problem of uncontrollable charging current due to the slow speed of software adjusting PWM.
  3. The charging efficiency is not very high. During fast charging, because of the use of charging soft start, coupled with the slow PWM adjustment speed of the single-chip microcomputer, the actual time to stop charging or charge with a small current and slow rise is relatively long.

    In order to overcome the low charging efficiency caused by the shortcomings 2 and 3, we can adopt a charging method with a longer charging time and a shorter stop charging time, such as charging for 2s and stopping for 50ms, plus the stop charging time converted from the slow start of the current during soft start, set to 50ms, then the actual charging efficiency is (2000ms-100ms)/2000ms=95%, which can also ensure that the charging efficiency is above 90%.

Pure hardware PWM method to control charging current

Since the operating frequency of the microcontroller is generally around 4MHz, the operating frequency of the PWM generated by the microcontroller is very low. In addition, the time required for the microcontroller to read the charging current using the ADC method is relatively low. Therefore, the frequency of adjusting the charging current using software PWM is relatively low. In order to overcome the above defects, an external high-speed PWM method can be used to control the charging current. The PWM control chips currently used in smart chargers are mainly TL494, etc. The operating frequency of this PWM control chip can reach more than 300kHz, and the external resistor and capacitor components can achieve the constant current and voltage limiting effect during the battery charging process. The microcontroller only needs to use an ordinary I/O port to control the TL494 to enable. In addition, a voltage comparator can be used instead of TL494, such as LM393 and LM358. The use of pure hardware PWM has the following advantages and disadvantages.

advantage:

  1. High current accuracy. The control accuracy of the charging current is only related to the accuracy of the current sampling resistor and has nothing to do with the microcontroller. It is not limited by the adjustment speed of the software PWM and the accuracy of the ADC.
  2. High charging efficiency. There is no slow start problem of software PWM, so the energy charged into the battery is high under the same constant current charging and the same charging time.
  3. Little damage to the battery. Since the current during charging is relatively stable and the fluctuation is small, the impact on the battery is small. In addition, TL494 also has a voltage limiting function, which can protect the battery well.

shortcoming:

  1. The price of hardware is relatively expensive. While the use of TL494 brings the above advantages, it also increases the cost of the product, which can be overcome by using LM358 or LM393.
  2. Trickle control is simple and pulsating. After the battery is charged, trickle charging is generally used to maintain the battery to overcome the capacity loss caused by the self-discharge effect of the battery. The ordinary I/O control port of the microcontroller cannot realize the function of the PWM port. Even if the simple PWM function can be realized by software simulation, due to the real-time requirements of the microcontroller, the PWM frequency of the software simulation is also relatively low, so the pulse charging method is finally adopted. For example, charging is performed for 10% of the time, and not for the other 90% of the time. This has less impact on the fully charged battery.

Integration of MCU PWM control port and hardware PWM

For the pulsation problem of trickle charging with pure hardware PWM, a single-chip microcomputer with a PWM port can be used, and then combined with an external PWM chip to solve the pulsation of the trickle current.

During the charging process, the charging current can be controlled as follows: when using constant current and high current for fast charging, the PWM outputs of the microcontroller can all be high level (PWM control chip high level enabled) or low level (PWM control chip low level enabled); when performing trickle charging, the PWM control port of the microcontroller can output a PWM signal, and then adjust the PWM duty cycle by testing the voltage drop on the current sampling resistor until it meets the requirements.

Reference address:Application of PWM technology in single chip microcomputer controlled intelligent charger

Previous article:What's wrong with using ARM as a super microcontroller?
Next article:High-performance three-phase variable frequency power supply based on SPMC752413A microcontroller

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号