Z1TNK7zY

Diwenxing CW32 voltage and current meter

 
Overview
Project Overview:
This project designs a voltage and current meter based on the LCSC Divinstar development board, capable of simultaneously measuring 0-25V voltage and 0-3A current. Voltage measurement employs a resistor divider method, resulting in a simple and easy-to-implement circuit design. Current measurement utilizes an INA199 chip for signal amplification, improving measurement accuracy. The software employs a calibration algorithm to calibrate voltage and current, enhancing measurement precision.
Hardware Design:
1. Power Supply Circuit:
This project utilizes a DC 12V power input. An LDO is used to step down the DC 12V input to 5V for system power. For convenience, a Type-C power port is also added for direct 5V power supply.
Diodes are used for reverse connection protection, and resistor R1 prevents damage to the circuit due to excessive current; in case of excessive current, the resistor burns out, disconnecting the circuit. LED1 is the power indicator.
2. Voltage Sampling Circuit:
The voltage acquisition circuit uses two resistors to divide the input voltage. Since I usually use 0-24V, I used 10K and 100K resistors with a voltage ratio of 1:10. The microcontroller ADC reference voltage is 2.5V. The maximum voltage calculated using the formula is 27.5V, leaving a margin of 2.5V (25V). Therefore, the input voltage is set between 0-25V. A circuit with a 1:1 resistor ratio is also reserved for switching when measuring small voltages, improving measurement accuracy.
C5 and C6 are used for filtering, and two diodes are used to prevent damage to the microcontroller from excessive voltage.
3. Current Sampling Circuit:
The current sampling circuit uses a 0.01R resistor for sampling, then amplifies the current by 50 times using an INA199. The microcontroller ADC reference voltage is 2.5V. Calculations show that the maximum input current can reach 5A, and the INA199 supports bidirectional current acquisition. The schematic diagram includes R12 and a reference circuit. To achieve bidirectional current acquisition, R11 can be soldered while R12 is left unsoldered. Then, the reference voltage of the INA199 can be adjusted using a TL431 reference circuit to achieve bidirectional current measurement.
C8 is used for chip input power filtering, and D1 is a clamping diode; when the voltage exceeds 3.6V, it will be clamped at 3.6V to prevent damage to the microcontroller due to excessive input voltage.
4. Reference Circuit:
A reference circuit is provided, which can be used as the reference voltage for the microcontroller's ADC, or as the reference voltage for the INA199 when bidirectional circuit detection is desired. Using the TL431, the circuit is simple, easy to implement, and has good accuracy.
5. Display Circuit:
A 0.91-inch OLED with a resolution of 128*32 is used for display, which meets the usage requirements. The OLED communicates with the microcontroller using IIC, requiring only four wires, making it convenient to use.
6. Button Circuit:
Three buttons are used for mode switching, calibration, and interface switching of the voltmeter and ammeter. 1. 3D model
of the actual product 2. Front view of the actual product 3. Back view of the actual product Instructions and demonstration video are included in the appendix. Demonstration video





参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2026-03-28 07:03:52

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号