RRdWkNh9U

CW32 Voltage and Current Meter

 
Overview
Hardware Design:
Power Supply Circuit
& Voltage Sampling Circuit (Important)
This project uses a 220K+10K voltage divider resistor, resulting in a voltage division ratio of 22:1 (ADC_IN11). A 4148 clamping voltage is used to protect the ADC port.
Details:

The maximum measured voltage is 30V for safety (actual maximum display is 99.9V or 100V).
Power Consumption: To reduce power consumption in the sampling circuit, the low-side resistor is typically chosen as 10K based on experience.

The high-side resistor can then be calculated using these parameters .

Calculation of the required voltage division ratio: ADC reference voltage: Design input voltage, calculated as 1.5V/30V = 0.05 using known parameters.
Calculation of the high-side resistance: Low-side resistance/voltage division ratio, calculated as 10K/0.05 = 200K using known parameters.
Selection of a Standard Resistor: Choose a resistor slightly higher than the calculated value of 200K. We typically choose E24 series resistors; therefore, in this project, we choose 220K, which is greater than 200K and closest to the calculated value.

Considering the potential fluctuations in the measured power supply, a 10nF filter capacitor was connected in parallel with the low-side voltage divider resistor in the circuit design to improve measurement stability. For
the display section , a digital tube was used as the display unit, which is convenient and easy to read, and a 300-ohm resistor was used to limit the current.
The voltage measurement calibration circuit design used a TL431 , and high-precision ADC voltage reference software was employed. Through Keil software, I learned LED driving, button detection, digital tube display of numbers and dynamic displays, ADC sampling and display, and the development of a digital voltmeter and ammeter with calibration function. Under the teacher's guidance, I learned a lot of new knowledge, especially in software. In summary , for an amateur enthusiast, this training camp, which followed the thermometer and hygrometer training camp project, was slightly more challenging than the previous one. Learning to design and build digital voltmeters and ammeters is very helpful for improving professional skills. This project covered multiple aspects, including microcontroller circuit design and implementation, signal acquisition and processing circuit design, user interface development and optimization, and product appearance design. The core board used the domestic Wuhan Xinyuan Semiconductor CW32 microcontroller as the main controller, and there was abundant documentation available. Attached are the LCSC CW32F030C8T6 development board [open source software materials]: https://lckfb.com/project/detail/lckfb-dwx-cw32f030c8t6?param=baseInfo LCSC development board official website: https://lckfb.com Voltage and current meters [project documentation materials]: https://wiki.lckfb.com/zh-hans/dwx-cw32f030c8t6/training/voltammeter-bootcamp/voltammeter.html Bilibili video submission: https://www.bilibili.com/video/BV19JsceLEUi/









参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2026-03-24 15:55:20

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号