I. Introduction
This project uses the CW32F030 LCSC Diwenxing development board as the main control unit, utilizing the ADC function to measure the voltage and current being measured.
II. Function Introduction
This current and voltmeter has current measurement, voltage measurement, display, and calibration functions.
1. Current Measurement Function
When measuring current, connect the meter's current interface in series with the circuit under test, paying attention to the direction of current flow.
2. Current Measurement Function
When measuring voltage, connect the meter's voltage interface in parallel across the two ends of the circuit under test, ensuring the positive and negative terminals of the voltage correspond to the polarity of the meter interface.
3. Display Function
A 3-digit LED display is used. The advantage of LED displays is their simplicity and ease of use.
4. Calibration Function
The meter is calibrated using buttons and a potentiometer, making the measurement results more reliable.
III. Hardware Description
1. Power Supply Circuit
: This current and voltmeter uses an SE8550 step-down chip and an LDO (Low Voltage Regulator) circuit. The maximum input voltage of this chip is 40V. Compared to a DC-DC step-down circuit, the LDO has the advantages of lower output voltage ripple, simpler peripheral circuitry, and lower design difficulty. DC-DC circuits require careful design to reduce output ripple, but their output current is higher. However, in this project, due to the low power consumption of the microcontroller, the current output by the LDO step-down circuit is sufficient for the microcontroller's needs. A diode is connected in series in the circuit to prevent reverse connection from burning out the circuit.

2. Voltage Acquisition Circuit
: A voltage divider resistor is used to prevent the measured voltage from being directly connected to the microcontroller pin, which could burn out the microcontroller. The voltage divider resistor limits the voltage to within the allowable input voltage of the microcontroller pin, protecting the microcontroller. A diode is connected in parallel in the circuit to clamp the voltage, primarily by limiting the voltage amplitude to protect the circuit and prevent damage or malfunction caused by excessively large or small signals. Two voltage acquisition circuits are designed in this circuit to adapt to different voltage levels and improve measurement accuracy.

The left side has a range of 0-30V, and the right side has a range of 0-3V. When the voltage is within 0-3V, the right circuit is used; when the voltage is within 0-30V, the left circuit is used.
A 10nF capacitor is used in the circuit for filtering to reduce errors caused by input voltage fluctuations.
3. The current acquisition circuit
obtains the current value by detecting the voltage value across the sampling resistor.
4. LED indicator:
One end of the LED is connected to the microcontroller, and the other end is connected to the voltage divider resistor.

When routing the traces, pay attention to the trace width: power supply traces should be above 20mil, signal traces around 10mil, and ADC traces 8-10mil. The copper pour at the current acquisition point should be directly connected and not spread out.
IV. Software Description
V. Material Purchase
The resistors, capacitors, chips, etc. used in this project can be purchased from LCSC Mall using the numbers on the BOM.