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:
-
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.
-
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.
- 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:
-
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.
-
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.
-
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:
-
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.
-
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.
-
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:
-
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.
- 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.
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
- Popular Resources
- Popular amplifiers
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- [EETALk] What knowledge do I need to master as a Bluetooth engineer?
- Interconnecting automotive 48V and 12V rails in dual-battery systems
- Do I need to draw a system architecture diagram before designing a digital circuit using Verilog?
- The difference between new energy buses and passenger cars in terms of BMS structure
- Please recommend some learning materials for system verilog and uvm
- 【IoT Development Based on Raspberry Pi Education Kit】Project Submission
- [RISC-V MCU CH32V103 Review] PWM Test
- See what others have written
- How do you know the capacity of the chip capacitors on the circuit board?
- Request information on the Antminer Z9mini mining machine control board