smallembedded

#The7thLiChuangElectricityContest#USB Ammeter

 
Overview

1. Project function introduction
       The USB ammeter can display the power, voltage and power of the USB output in real time. The minimum voltage is 1mV, the minimum current is 1mA, and the minimum power consumption is 1mW. The theoretical maximum input voltage is 30V and the maximum input current is 16A. When the current is 0, it will enter the sleep state after 15 seconds. When the current is not 0, it will immediately exit the sleep mode.
 
2. Project attributes
This project is an open source project of the LiChuang Electronic Design Competition.
 
3. Open source agreement
GPL 3.0
 
4. Design principle
(1) Reset button
       SW1 is a button, R1 is a pull-up resistor, and C1 is a filter capacitor. The reset button is rarely used in practice and can be deleted. When downloading the program, you can directly check the reset option in Keil.
Tv4jeHoCQ5fgABAeT9Ql8PO6uFm3jbtWTs0N5UiS.png(2) BOOT
       reserves the BOOT interface. In normal use, you do not need to solder the pin header.
jqkuH7q0cLElq6b4sBNrjO7gnhOgnOKFCUEBhJuQ.png(3) The 3.3V
       power supply solution uses an LDO chip. The LDO in the schematic diagram is from UMW Semiconductor, with a maximum input voltage of 30V. Since the Vin and Vout pins were drawn in reverse in the first version, the actual product uses AMS117-3.3, with a maximum input voltage of only 18V.
       The schematic diagram has been updated to the chip from UMW (UMW Semiconductor). If you use AMS117-3.3, you need to change the schematic diagram and PCB.
tbcJ6jlHrI2B58zYf0AoA4kwnGfz2ZZtubyKq4Wv.png(3) Burning interface
       The N32G430 chip can be burned using ST-Link. The official burning interface adds a serial port, which is not added here.
uUtssB39vleI22ZDoWZ9MOAS9fx2cJ1yR49xvQUt.png(4) Current measurement
        The chip used for current measurement is INA199A3, which collects the voltage drop across a 1mΩ resistor. The voltage amplification factor is 200, and the theoretical maximum measurement current is 16A.
 
  In the PCB, the VCC line and GND line are thickened to 50mil.
CaMbXz5Jeadi20Efw2tMJYkoMySq4m6BXXiSqsbI.png(5) Voltage measurement
       The voltage measurement uses a 100K resistor and a 10K voltage divider.
F1oMXpt0rIwfXQ1v6KxiACC9XP1DJ9MuFnqneZmi.png(6) 0.96' TFTLCD color screen
      The TFTLCD color screen uses SPI communication and software SPI communication (hardware SPI communication transplantation failed). The backlight pin is connected to the PWM output pin of the microcontroller. The brightness of the LCD can be adjusted by changing the PWM pulse width (this part is not written in the software).
     TFTLCD only costs 6 RMB on Taobao, which is still very cost-effective.
qFrgfwcqxKn4M4c5RndrxbltlTo6vRJFoLHuK79y.png(7) The RGB
       schematic diagram designs a 3-color RGB colored light. Because the device package of the RGB light was not purchased correctly, two LEDs were used instead of RGB in the actual product.
aSoVBzPdZROb12iHn50hM6stmeTy7FdF7qNCW5XU.png(8) The MCU
         voltage and current measurement pins must be connected to the IO port with ADC function.
qGHZuPeu5JInZoTjU05INsAFssf03RMn9WM0nsm1.png 
5.
 
See the attachment for software design!
 
6. Actual display
 
(1) Front photo
 
GCtcBTiypitU4P6PuG0jLx3olwKuvbn10LTkO6ne.jpeg 
(2) Back photo
 
xPA3KNSmzTIZ1SRRbZdG9q6y5xtDvYgDypjDQZLd.jpeg 
(3) Startup photo
 
WJgLHOtxkeo5MDujpQKmMXsOxTSTyLV15Nw20ZO4.png 
(4) Running photo
 
EBvpUtNZC6TFfLB85vEOvft094BwfWIJMLrBkWyy.png 
(5) Sleep photo
 
vu5wE6m7FUEnAb6zqNIXX5StPYVCFUqgpsP1JmFs.png 
(6) Demonstration video
 
参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2024-11-22 12:25:26

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

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号