石榴姐

#The 7th Lichuang Electric Competition# USB power meter based on N32G430

 
Overview
 1. Project function introduction
The USB power meter based on N32G430
supports 4.5~24V wide voltage input.
It supports measuring the voltage, current and power of the VBUS line, and can also measure the voltage of D+ and D-.
2. Project attributes
are designed by yourself.
3. Open source agreement
CC-BY-NC-SA 3.0
4. Hardware part
The MCU adopts National Technology N32G430K8L7, LQFP32 package.
The monitoring chip adopts Texas Instruments INA226, which supports a maximum input voltage of 36V. It supports measuring voltage and current, and automatically calculates power. Use I2C to output the measurement results.
The digital power supply adopts a DC-DC solution to power the MCU and OLED. The high efficiency of DC-DC can prevent the PCB from heating up when the high voltage difference occurs, which affects the measurement results. The chip uses TMI3359, which supports a maximum input voltage of 30V. A 4.7uH inductor in CD32 package is used to ensure that the inductor does not heat up. I personally like DC-DC with a higher switching frequency, so that smaller capacitors and inductors can be selected to reduce the area of ​​the circuit.
The analog power supply adopts LDO solution to power INA226. The output voltage fluctuation of LDO is smaller, which is more suitable for precise measurement. In addition, INA226 is a low-power component, and it will not heat up even if the voltage difference is relatively large. The chip uses SE8533, which supports a maximum input voltage
of 36V. The input capacitor uses a 50V MLCC capacitor. Because MLCC is a ceramic capacitor, it will deform to a certain extent as the voltage increases, resulting in a decrease in capacity. Therefore, the withstand voltage value of MLCC is generally selected to be 2~3 times the maximum input voltage.
The resistance of the current sampling resistor is 10mΩ. A smaller resistance value can minimize the voltage drop generated on this resistor. A lower temperature coefficient can ensure that the resistance value of the resistor changes less when the current is large, thereby improving the linearity of the measurement. The resistor selected this time has a 1% accuracy, a 2W power, and a temperature coefficient of ±70ppm/℃.
The display uses a 0.91-inch OLED screen with a resolution of 128x32 and a communication protocol of SPI.
In terms of interfaces, the input end is a USB-A male and a USB-C female, and the output end is a USB-A female and a USB-C female. Using USB-A can eliminate the need for data cables, while two USB-Cs take into account the PD protocol and the possibility of extending the cable during use to place the power meter in a position that is convenient for observation.
The soldered PCB is shown in the figure below.
Front
正面and back
背面INA226 close-up
N32G430 close-up
5. Since the software part
does not require a very precise clock, HSI is used as the clock source this time to save costs.
Since a large amount of calculations are not required, the PLL function is not turned on, which reduces the total power consumption of the system.
The system peripherals mainly use SPI, I2C and ADC. Among them, I2C is used for INA226 communication, SPI is used for OLED communication, and ADC is used to collect the voltage of D+ and D-.
This software development uses Nations.N32G430_Library.1.0.0.
The use of peripherals refers to the examples
6, BOM list
7, competition LOGO verification
8, demonstrate your project and record it into a video and upload it.
Demonstrate the normal working effect.
20V input demonstration
. Use a OnePlus mobile phone charger to produce 20V voltage with CH224K. No load is connected. The power meter works normally.
Xiaomi 27W fast charging protocol from the beginning to stability actual test video
参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-07-07 02:57:16

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号