Note: * is a required field,
please fill it out during the registration stage↓
* 1. Project function introduction
This is a USB power meter, and it has a hub that can connect to the USB of the Bluetooth mouse and keyboard. The onboard CH340 chip is connected to the computer USB through the HUB. With the host computer software written in Labview, it can realize real-time monitoring of voltage, current, and power consumption. When debugging other hardware, it is easy to get the power consumption and power consumption level of the hardware.

*2. Project attributes
LiChuang training camp pure original project,
please fill it out during the competition stage↓
*4. The hardware part
uses the National Technology N32G430 series chip as the main control, which is responsible for sampling voltage and current, performing simple power consumption calculations and driving OLED (0.96).
The current sampling part uses the INA199 chip, and the sampling resistor is 40mΩ (because the power consumption of the projects I often do is not large, I need to pay more attention to the situation of small current and low power consumption, so I use a larger sampling resistor). The maximum current sampling of 1.6A can be achieved. If you want to achieve a larger current, you can replace the sampling resistor.
The power meter is equipped with a SL2.1A hub chip, which can provide USB 1 to 4 channels, one of which is connected to the onboard CH340 for serial communication and program downloading, and the other three channels can be connected to carry peripherals for data transmission. (The sampled current is the sum of the currents of the three channels)
The PCB design is carried out using the standard version of EasyEDA (will switch to the professional version as soon as possible~) The finished PCB is shown in the figure below. The

shell is designed using the professional version of EasyEDA, and the 3D shell is printed by 3D Monkey. The effect is very good
*5. Software part
The software part is programmed using Keil5, mainly referring to the official EasyEDA of National Technology. Specifically:
1. Enable the timer to generate 1s timing. Every 1s, the RGB blue light flashes to indicate that the program is running, and the serial port is used to send data to the computer once.
2. Enable the serial port printf printing function
3. Every 1s, multiply the current and voltage to obtain the power accumulation to obtain the mWh data.
The host computer software is written in LabVIEW, which is mainly for serial port information reading and power consumption drawing.
*6. All the chips in the BOM list

were bought at LiChuang. The ch340, sl2.1a, and n32g430 cost a total of 10 yuan. The oled cost about 10 yuan on Taobao. The shell cost 5 RCs and the interface cost 5 yuan, so it was easily bought for a total of 30 yuan. *7. I forgot to print
the competition LOGO verification PCB. I will print it next time when I make the second version of the board! ! ! * 8. Demonstrate your project and record it as a video to upload. The video is a bit large and the upload is a bit slow. You can move to B station: LiChuang & National Technical Training Camp_Power meter with USB hub_Bilibili_bilibili