aytwartoofyoroo

#The 7th Lichuang Electric Competition#USB power meter with hub (with host computer software)

 
Overview

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. kEKx7O1kyctyl9Ur2nusmfus3zFwfXsPKqgEZcA4.png*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
vLfqcIzbZr7ZRvyZdwku5yRHD9pwhkF2x3UbNiiz.jpegshell is designed using the professional version of EasyEDA, and the 3D shell is printed by 3D Monkey. The effect is very good
11Yg5DapGzSi2ELpmJz2dr1p9DZleW2vMf9OLYud.png 
*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.
nL1dvhGpk4BwvZ1N6RSXRXGfb6Ap0sFRCgekd1rF.png 
*6. All the chips in the BOM list
DFA3u6ZVG6On3xpMcu7lrfY3vLAV5oFp0X3Z3C1K.pngwere 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
d53IOZ57baGhDsgxcKpgjYgN4Sz34E4gSbmDngNJ.png


参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-05-21 08:02:18

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号