ioD1SEYLt

CW32 Voltage and Current Meter

 
Overview
Function Description:
Voltage measurement ranges are 0-30V and 0-3V; current measurement range is 0-3A.
LED1 on the digital tube displays the voltage, and LED2 displays the current.
Analog voltage measurement corresponds to pin H2, and analog current measurement corresponds to pin H3. Jumper caps are required during use. No current sampling resistor needs to be soldered before using analog current measurement.
An external circuit provides a 2.5V reference voltage.
A 2mm banana plug is used for insertion into the multimeter for measurement.
 
Hardware Circuit:
DC Power Input:
To avoid introducing DC-DC ripple interference and reduce project costs due to the high voltage difference, this replication project uses an LDO as the power supply, specifically the SE8550K2-HF. Due to my oversight, the actual power supply used was the SE8533K2-HF, the difference being that the output voltage changes from 5V to 3.3V. Initial assessment suggests this will not significantly affect subsequent circuitry. Compared to the original project, only the current-limiting resistor at the TL431 reference voltage needs to be replaced from 1kΩ to 800Ω.
The SE8533K2-HF has a maximum input voltage of 40V and an output of 3.3V with an accuracy of ±2%. The series diodes are used to prevent reverse connection and protect the circuit. Schottky diodes are used to further reduce the voltage drop to approximately 0.2V. The 10-ohm series resistor is used for voltage division, reducing heat generation caused by the high voltage difference across the LDO. It also functions as a low-resistance fuse due to its small overcurrent.
 
Reference voltage circuit:
In this project, a TL431 is chosen to provide a 2.5V reference voltage to the CW32 ADC. Since the CW32 has built-in 1.5V and 2.5V reference voltages that can be configured in the program, the main purpose of this circuit design is to learn the relevant principles.
The TL431 output voltage is 2.5V with an accuracy of ±0.5%, and its sink current capability is 1mA~100mA (related to the resistor selection in the circuit, as shown in the figure below). More information can be found in TI's TL431 Chinese datasheet.
Since the LDO provides a voltage of 3.3V in this project, based on the above calculation, resistors with an Ω or lower and a package size greater than 0.08W should be selected.
 
MCU Circuit:
In this project, the CW32F030C8T6 has a wide operating voltage range of 1.65V~5.5V, a 12-bit successive approximation ADC, and four reference voltage sources (VDDA power supply voltage, PB0 pin voltage, built-in 1.5V reference voltage, and built-in 2.5V reference voltage). The voltage
 
sampling circuit
is shown in the figure. The voltage measurement circuit has two ranges to choose from. During measurement, according to the program settings, the more suitable measurement result is selected to improve the measurement accuracy. When the ADC internal reference voltage is selected as 1.5V, the maximum measurement voltage at the high range is calculated based on the voltage divider resistors, and the maximum measurement voltage at the low range is 3V.
The clamping diode limits the ADC pin input voltage to 3.3V. The ADC internal reference voltage can be selected as 1.5V or 2.5V as needed. Since the ADC is 12-bit, selecting the 2.5V range will reduce the measurement accuracy.
 
Wiring Port Circuit:
In the figure, U4, U5, U8, and U9 correspond to the 2mm banana plug interface on the PCB, used to insert multimeter probes for easy verification of measurement accuracy and calibration. U3, CN1, and CN2 are the corresponding connection ports for the measured values. +V connects to the voltage to be measured, T_V connects to the red probe of the multimeter, and TGND connects to the black probe. CN2 is connected to the current to be measured; the current flows in from I+ and out from I- on CN2. The red probe of the multimeter is inserted into TI+, and the black probe is inserted into TGND .
 
Analog voltage measurement:
An analog voltage is obtained through an adjustable potentiometer for measuring ADC accuracy and for calibration. A jumper cap needs to be connected during use. When using analog current measurement, the 100mΩ sampling resistor cannot be soldered
 
. Note:
VP is the provided analog voltage used for calibration;
V+ is the connected measurement voltage.
When there is no DC power supply, the 3.3V on pin header H1 can be used to power the microcontroller.
 
 
Software part: The firmware package and compiler version selected
for this project may encounter errors during compilation. Removing __weak will stop the errors. Due to the lack of a DC power line and the fact that the PCB was not traced from the 3.3V power supply, the voltage measurement cannot be verified at this time.



 

 
 
参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2026-03-27 00:25:22

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号