v2eqeP1

Voltmeter and Ammeter

 
Overview
This CW32030-based voltmeter and ammeter
image-20240820203915852.pngdesign is a simplified version. In actual soldering, voltage and current terminals are not soldered; instead, potentiometers are used to simulate voltage and current testing. This design can measure voltages from 0-30V, with a sampling current of 3A and a sampling resistor of 100mΩ.
The hardware design uses a DC
input power supply circuit
image-20240820204618161.png, stabilizing the voltage to 5V using an 8550. A small resistor R14 is connected in series to serve two purposes: firstly, to divide the voltage, preventing excessive overheating of the LDO if the DC input voltage is too high; secondly, to reduce the excessive voltage difference between VIN and VOUT of the 8550; and thirdly, to act as a fuse, burning out in case of a short circuit to protect the circuit. LD_PWR is the power indicator light, illuminating when a stable 5V is generated on the development board.
The MCU
uses the LCSC CW030 core board as the main controller. The CW030 has a wide operating voltage range: 1.65 - 5.5V. Furthermore, it features a 12-bit high-speed ADC, and the reference voltage Vref can be selected from 1.5V, 2.5V, and VDD, offering more options compared to the STM32F103 which only supports VDD. Lower reference voltages can result in lower resolution.
The digital tube
image-20240820205600185.pngdisplay circuit uses a 0.28-inch three-digit common-cathode digital tube. In this design, LD1 displays voltage information, and LD2 displays the acquired current information. The digital tube display uses dynamic scanning, utilizing the persistence of vision effect. In reality, only one digit can be lit at a time; as long as the refresh rate is fast enough, it appears as if all digits are displayed simultaneously. The MCU's GPIO
for the button circuit
image-20240820210143271.pngis configured as a pull-up input. When the button is not pressed, the GPIO exhibits a weak pull-up; when the button is pressed, the button circuit is pulled down to ground.
Voltage sampling
image-20240820210525783.pnguses two resistors to divide the +V voltage by a ratio of 22:1. The voltage is acquired by the microcontroller, and the +V voltage is calculated backwards.
+V = ADC / (R7 / (R7+R8)).
image-20240820211024825.pngA potentiometer is used to simulate voltage. A jumper cap is used to short-circuit the two pins of JP1, allowing the voltage signal from the potentiometer to be sent to +V. The voltage value is then measured again via voltage sampling.
Current sampling:
image-20240820214442463.pngThis design uses a sampling current of 3A. The selected sampling resistor R0 is 100mΩ (1W package).
R9 is connected in series in this design to provide some current, preventing high current from damaging the MCU's ADC pins. Combined with C6, it forms an RC low-pass filter, reducing the impact of high-frequency noise on ADC sampling.
image-20240820214909544.pngCurrent testing is simulated using a potentiometer. A jumper cap is used to short-circuit JP2. R17 and the voltage divider at the upper and lower ends of the potentiometer are used (R0 is not soldered when using a potentiometer to simulate voltage measurement). The voltage at the lower end of the potentiometer is measured.
Software design
code is detailed in the attached demonstration video
.
参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2026-03-26 15:09:41

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号