1. Project Function Introduction:
This project is a lightweight, aesthetically pleasing, and accurate voltage and current meter. It uses the CW32 Diwenxing development board and an OLED display to show the measurement data. The project originates from the LCSC Training Camp.
2. Project Attributes:
This is the first time this project has been publicly disclosed.
The project design references the LCSC Training Camp
project. It has not won any awards in other competitions.
It has not participated in any school defenses.
3. Open Source License:
GPL 3.0
4. Hardware Part
: The schematic diagram is provided at the end of the document. For detailed explanations, please refer to the LCSC Training Camp: CW32 Digital Voltage and Current Meter Training Camp Project Tutorial Document | LCSC Development Board Technical Document Center (lckfb.com). A slight difference is the use of an OLED instead of a digital tube. This document mainly discusses some soldering experiences for beginners.
As I am a complete beginner, I purchased the following soldering equipment based on recommendations from experienced users:
an unknown T12 soldering station + Yamazaki solder wire (63 rosin core): Overall, it is very beginner-friendly. The soldering station heats up in 3 seconds, and the leaded solder wire makes it easier for beginners to get started. The rosin core is even more convenient, saving a lot of trouble.
Deer Fairy Teppanyaki + Solder Paste (Needle Tip): If you have the budget, I still recommend using a heating plate. Although this teppanyaki is cheap, it lacks temperature control and requires you to connect the power cord yourself, which poses certain safety hazards.
Since most of the components in this project are surface-mount, and the components are small and densely packed, it is not very user-friendly for beginners. Therefore, this set of equipment provides great assistance. The soldering diagram is as follows:
5. Software
Compilation Environment: Keil5
Burning Method: ST-Link
software is mainly composed of two parts: OLED display and voltage and current data reading.
The program idea of OLED display is that the main control chip CW32 controls the OLED display through the I2C protocol:
I2C is a two-wire bidirectional synchronous serial bus protocol. Bidirectional means that both parties can send and receive data; synchronous means that both parties have the same clock pulse (SCL line).
The complete I2C communication process mainly includes the following steps: master start timing; master address transmission timing; master waiting for slave response timing; master sending read/write data timing; master waiting for slave response timing; stop timing;
voltage and current testing is mainly implemented using the internal ADC of the CW32 main control chip. An analog-to-digital converter (A/D converter), or simply ADC, is an electronic component that converts analog signals into digital signals. A typical A/D converter converts an input voltage signal into an output digital signal. Since digital signals themselves do not have practical meaning, only representing a relative magnitude, any A/D converter needs a reference analog quantity as a conversion standard. A common reference standard is the maximum convertible signal size. The output digital quantity represents the magnitude of the input signal relative to the reference signal. For
the specific tutorial, I referred to the CW32 Digital Voltage and Current Meter Training Camp project tutorial document | LCSC Development Board Technical Document Center (lckfb.com). My software capabilities are limited.
6. The project demonstration video
uses two different dry batteries for testing.