Artificial Intelligence
Portable device power system solution based on ATmega 16L microcontroller
In response to the growing demand for power solutions in portable devices, a power system design centered around a microcontroller as the control core has been developed. This system employs the high-performance, low-power ATmega16L microcontroller to manage battery detection and control. It integrates a charging and discharging circuit, a DC/DC converter, an external adapter, and a lithium battery pack to create a flexible and fully functional power supply solution.
As technology advances, portable devices are becoming increasingly popular due to their convenience in both work and daily life. However, this trend also imposes higher demands on internal power systems. Portable devices typically require multiple power supply methods, including battery and external power, along with accurate charge/discharge control and battery state estimation. They must also interact with embedded motherboards and support compact, lightweight, and efficient designs. While existing power solutions for phones and laptops are well-established, they often lack adaptability for more specialized portable applications. Therefore, there is a pressing need for a power system that combines higher performance with these essential features.
The system architecture centers around the microcontroller, which oversees various components such as the adapter, battery pack, charge/discharge modules, and the DC/DC converter. As shown in Figure 1, this setup enables real-time monitoring of battery parameters like voltage, current, and temperature through dedicated sampling circuits. The microcontroller processes this data to manage power switching between the external adapter and the battery, ensuring seamless operation. Additionally, it communicates with the motherboard via an RS-232 interface, providing real-time power status updates. To support low-power embedded systems, the microcontroller simulates the ATX power interface signals, enabling full power functionality.
Thanks to the microcontroller’s flexibility, the system can handle complex logic operations, making it easy to expand or enhance its capabilities in the future.
### Battery Management
#### Battery Selection
Rechargeable batteries come in several types, including lead-acid, nickel-cadmium (NiCd), nickel-metal hydride (NiMH), and lithium-ion (Li-ion). NiCd and NiMH batteries suffer from memory effects, limited cycle life, and environmental concerns, making them less desirable. Li-ion batteries, on the other hand, offer high energy density, no memory effect, long cycle life, and low self-discharge, making them ideal for modern portable devices.
This system uses Sanyo’s 18650 lithium-ion cells, arranged in a 4S4P configuration, providing a total energy capacity of 130 Wh, which ensures sufficient endurance for portable use.
#### Core Control Chip
The ATmega16L microcontroller was chosen for its low power consumption and high performance. With 16 KB of Flash, 512 B EEPROM, and 1 KB SRAM, it supports multiple timers, ADC channels, and communication interfaces. Its RISC architecture allows for fast execution, making it suitable for real-time battery management tasks.
The microcontroller interfaces with various peripherals, including battery voltage/current sensors, charging ICs, MOSFETs for power control, and the motherboard via USART.
#### Charging Solution
The LTC4006 from Linear Technology is used for charging, supporting up to 4 A of charge current for 2–4 cell Li-ion batteries. It offers high efficiency, temperature monitoring, and protection against overvoltage and overcurrent. An external 19.8 V DC adapter powers the system, allowing the battery to be charged and managed by the ATmega16L and LTC4006.
The charging circuit uses two PMOS transistors connected in series to act as a switch, minimizing voltage loss. The charging current is set via resistors and monitored through the LTC4006’s IMON pin, feeding into the microcontroller’s ADC for real-time tracking.
#### Estimated Battery Remaining Capacity
Battery state-of-charge (SOC) estimation is challenging due to nonlinear behavior during charge and discharge cycles. Common methods include the integration method, open-circuit voltage (OCV), internal resistance, and Kalman filtering. However, each has limitations in terms of accuracy, complexity, or practicality.
For portable devices, the DC internal resistance method is most suitable. By measuring the voltage difference under load and dividing it by the current, the DC resistance can be calculated. Using this relationship, a lookup table stored in the microcontroller’s flash allows for accurate SOC estimation based on measured values.
#### Charge and Discharge Display
Unlike traditional systems, this design enables real-time communication with the embedded motherboard. Users can view detailed charging and discharging information on the device’s display, such as the AC plug icon when charging, a battery icon during discharge, and a percentage-based remaining power indicator. When the battery level drops below 10%, a warning is displayed, improving user awareness and experience.
48V Lithium Battery,lithium battery bicycle,Electric Bicycle Battery,lithium electric bicycle
Shenzhen Jentc Technology Co., LTD , https://www.phenyee.com