fZeh2U1O

#The7thLiChuangElectricityContest#USB current and voltage meter

 
Overview


1. Project Function Introduction
The USB ammeter made based on N32G430C8L7+INA199 has an accuracy of 1%. It can view the current, voltage and power of USB when it is working. It supports switching multiple viewing modes and supports fast charging (5.2V-24V).
 
2. Project Properties
The project design refers to the official case of the training camp, expands some functions, and rewrites the software part.
 
3. Open Source Agreement
The hardware design and software code of this project are all open source. The code of other projects is used, and the original protocol description is retained.
 
4. Hardware
The project design uses the professional version of EasyEDA, and refers to the fast charging version of the official case of the training camp, and some modifications are made.
Boot and Reset use physical buttons, and 3 more buttons are added for interactive operation.
The display screen uses TFT LCD 128x160, and the SPI interface communication
adds Type-C input interface.
Burning and debugging
lead to SWD and UART interfaces. Burning uses PowerWriter PWLINK2 Lite (9.9 yuan free shipping). At the same time, it supports viewing serial port input and output. It is easy to use. If you are not familiar with it, you can directly view the official description document, which is very detailed.
The DCDC
project refers to the official case and uses DCDC step-down. The official case indicates that it supports 4V-24V. The actual test found that when the input is 5V, the output is only 2.6V, which cannot drive the microcontroller and the display screen to work normally. Checking the data sheet found that it supports (6V-24V). The actual test found that the input is 5.2V and the output is 3.3V, which can work normally. The mobile phone charger was used to test the input of 9V to work normally. Due to the lack of relevant equipment, the higher voltage range has not been tested yet. 5.
 
Software development tools and environment configuration software are developed using VSCode. The environment configuration directly refers to the official document of National Technology "N32G430 Series GCC Development Environment Application Notes". In fact, you only need to install the arm-gcc compiler and make tool. Source code structure and code compilation The source code structure is directly modified by the official Demo of National Technology. For code compilation, you only need to enter the examples/GPIO/LedBlink/GCC directory and execute make. The build directory saves the build product. When burning PWLINK2 Lite, select the output.bin file. Source code introduction The display module has transplanted the driver of the display chip ST7735, using the SPI interface for communication. The hardware SPI and software SPI are implemented in the code, and all have been debugged. Try to transplant LVGL and want to make some convenient interactions. The three buttons are designed to adapt to the LVGL encoder operation. However, since the ROM of N32G430C8L7 is only 64KB, after the LVGL is extremely trimmed and only the core module is retained, the compiled program still exceeds 20KB, so LVGL is abandoned. Although LVGL cannot be used, the encapsulated drawing function is still used to implement two display modes. Real-time graph values ​​6. BOM list, see BOM 7. Competition LOGO verification 8. Demonstrate your project and record it as a video and upload it










 


 


 
 

参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-06-17 17:16:04

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号