fZeh2U1O

Battery power tester (with C source code)

 
Overview
This project provides a clear
        and intuitive display of dry cell battery voltage and charge percentage, allowing users to easily monitor battery information.
The working principle
        utilizes a PW5100 boost IC to raise the battery voltage to 3.3V, powering the STC8G1K08A microcontroller and a 0.96-inch display (160*80 resolution). The microcontroller's ADC pin acquires the positive terminal voltage of the battery, determines the corresponding charge percentage based on the voltage, and sends the data to the display via the SPI interface.
Key concepts include:
        51 microcontroller, boost circuit, ADC, SPI, color screen, dot matrix, character modeling, line drawing, and graphics. Suitable for microcontroller beginners.
Design features:
1. Single-layer PCB design, voltage detection range 0.4V~3V (suitable for 1.5V dry cell batteries; above 1.56V, the charge is displayed as 100%).
2. Simple circuit, material cost around ¥5, can be hand-soldered, suitable for beginners.
3. Reserved serial port for easy program modification and debugging.
4. Consumes approximately 10mA of current, closer to the battery's operating voltage than a multimeter measurement.



Item No. |
Item
Price |


1 |
PW5100-3.3
| 0.30¥


| 2
| STC8G1K08A (must include the 'A' suffix, supports ADC)
| 0.70¥ |


3
| Molded Inductor 0420 4.7uH |
0.30¥ |


4
| 0.96-inch Color Display 160*80
| 3.70¥ |


5
| 12V23A Remote Control Battery Spring
| 0.10¥ |



Program
        Includes Keil project source code, Keil version 5.38.
参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2026-03-26 15:16:44

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
community

Robot
development
community

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号