yyBIK29Poc

CW32 Voltage and Current Meter

 
Overview
This is my first time running a training camp. I followed the tutorial step by step, and here's a sharing
of the results!
 
The main controller used is the CW32F030C8T6. The CW32's ADC is excellent and very suitable for the needs of this project.
Power supply circuit:
An LDO is used as the power supply, with an SE8550K2 chip selected. It can handle up to 40V input voltage, meeting 24V and 36V DC power supply scenarios.
A Schottky diode was used for reverse connection protection. Diodes have a certain voltage drop, and using a Schottky diode results in a smaller voltage drop. Using a diode for reverse connection protection also considered cost.
A small resistor (R7) is connected in series, which can be used for voltage division, reducing LDO heat generation when the input voltage is high, and also acts as a fuse.
Voltage sampling circuit:
        The voltage sampling circuit uses two sampling channels, with different resistors for voltage division, to achieve two measurement levels. With the ADC reference set to 1.5V, the sampling resistor ratio for 0~30V should be 20:1. To reduce power consumption, R14 is chosen as 10K, and a resistor slightly larger than 200K, R11, is chosen as 220K. Of course, the sampling resistor ratio can be changed to expand the measurement range.
The current sampling circuit
        uses a 100mΩ sampling resistor. The principle is that current passing through the resistor generates a voltage drop, and the current magnitude is obtained by sampling the voltage across R0. The accuracy of R0 should be as high as possible, and the resistor's heat generation should be considered; here, a power rating of 1W is chosen.
Physical demonstration:
This is a 3D-printed shell
placed on the panel. My buttons are relatively short, so they are not pressable with the shell on.
Function demonstration:
Pressing the K1 key enters calibration mode. The upper digital tube displays the value to be calibrated, and the lower digital tube displays the currently measured voltage or current. Pressing the K2 key updates and saves the calibration, and the K3 key returns to measurement mode.
Software part:
The code is uploaded as an attachment. For the digital tube display part, the code directly manipulates the registers, which is more efficient.
 
参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2026-03-28 04:10:40

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号