I. Design Background
This design aims to measure the voltage and current of an electric vehicle during operation. Future development will include a coulomb counter function via software.
The design utilizes a core board plus expansion board approach, employing plug-in components to simplify learning and facilitate deeper exploration.
The core board uses the domestically produced Wuhan Xinyuan Semiconductor CW32 as the main controller, while also being compatible with other similar development boards; however, the CW32 offers advantages.
The project is highly comprehensive and practical, and upon completion, it can be used as a desktop instrument.
The project offers abundant learning materials, including circuit design tutorials, PCB design, code programming, and training for engineers' debugging skills.
II. Hardware Design
1. Power Supply Circuit
: The OC5806L is used, with a wide input voltage range of 8V~120V, meeting the voltage range of ordinary electric vehicles.

2. MCU Selection Analysis:
When selecting the MCU (microcontroller unit) for this project, multiple aspects need to be considered to ensure that the selected MCU meets the project requirements.
Clearly define your project requirements: Understand the required computing power, including clock speed, processor core type, and whether a floating-point unit is needed.
Clearly define the required I/O ports and important peripherals for the project, such as the ADC peripheral. Since this is a development board project, the main purpose is debugging and learning; therefore, there are no strict limitations on the number of I/O ports, i.e., cost issues are not considered.
3. Voltage Sampling Circuit:
The voltage divider resistor in this project is designed to be 680K+10K, therefore the voltage division ratio is 68:1 (ADC_IN11). Later, we will consider using button control to switch sampling channels to improve low-voltage sampling accuracy.
4. Current Sampling Circuit:
The sampling current in this project is designed to be 40A, and the selected sampling resistor (R0) is 1mΩ.
5. Digital Tube Display:
This project uses two 0.28-inch three-digit common-cathode digital tubes as display devices. Compared to a display screen, digital tubes have better recognition in complex environments. Depending on the actual usage environment, smaller current-limiting resistors can be used to achieve higher brightness. Furthermore, digital tubes have better mechanical properties and are not as easily damaged by external forces as display screens. They are widely used in industrial and other applications requiring stable reliability. From a development board learning perspective, this makes it easier to purposefully learn about electronic measurement principles and related development.