Design of Smartphone Charger Based on Single Chip Microcomputer

Single chip microcomputer STM32L151CCU6
Mobile phone crystal 3.2*2.5mm 3225 26M (26.000MHZ) 7.5PF 10PPM 20PPM 30PPM
1206RGB (single)
0201 package SLP0603 ESD electrostatic diode 5V one-way ESD
Photocoupler

Summary:

Mobile phone battery chargers are essential for mobile phone users. With a smartphone-controlled smartphone charger, you can charge all your current mobile phones on the market. This article describes the current development of mobile phone chargers. Based on this, a smart phone charger for all mobile phones was designed. Choose simple, efficient hardware, design stable and reliable software, to meet the requirements of charging all current mobile phones. The hardware components of the system are introduced in detail, including the sampling circuit, control circuit, power supply, man-machine interface and single-chip controller. The core device of the charger, the single-chip microcomputer, is introduced in detail. The software design of the system is emphasized. Firstly, the demand analysis of the control software is carried out. The overall goal is to realize the reliability, stability, security and economy of the system. According to this goal, the overall framework of the system was designed using software engineering methods. Using assembly language as a tool, using object-oriented principles and techniques, detailed design and coding implementation.

one. system design

1. Design purpose
1) Familiar with and master the development process and application method of the embedded system of the single chip microcomputer.
2) Real-time monitoring of the battery charging process.
3) Make an intelligent charger. I found that when I charge my mobile phone, I often don't know how long the battery can be fully charged, and often forget when it started charging, so it is easy to cause overcharge or insufficient charging, which will affect the battery life of the mobile phone. There may be dangers. So I came up with the idea of ​​designing a mobile phone charger that can display time.

2. Function introduction
1) It can communicate with the chip in the lithium battery to obtain parameters such as capacity, voltage and current of the battery pack.
2) Use LED to display the remaining charging time of the battery.
3) With anti-overcharge function, reduce the charging current after the battery voltage reaches a certain value until the battery is full.

3. The application can charge various lithium-ion batteries and display the remaining time of charging in real time.

Experimental principle

Circuit schematic

Note: The lower left is the AD module, the Mega16's PA port is connected to the AD, and the PWM is output at the same time. The PB3 is connected to the PWM for charging control. The lower right is the regulated source based on the TLC431, which is connected to the AREF port of the microcontroller.

2. Experimental principle:

The charging process of lithium battery is divided into three steps of pre-charging, fast charging and turbulence. Our principle is to summarize the capacity of the battery by scanning the battery in the pre-charging stage, and corresponding to the library in the program. The time required for charging is obtained; after the fast-charged battery voltage reaches a certain high value, in order to prevent the actual voltage of the battery from being insufficient due to excessive charging, a trickle charge is added for a certain period of time. The remaining charging time is displayed in real time through the LEDs throughout the process.

See the uploading documentation for details (click to download)

1.0nm-8mm Connector

YUEQING WEIMAI ELECTRONICS CO.,LTD , https://www.weimaicarconn.com