通通

#The 7th Lichuang Electric Competition#Summer training camp ammeter

 
Overview

1. Introduction to project functions
#The 7th LiChuang Electric Competition# Summer training camp ammeter can detect the current, voltage and power when USB2.0 is working.
USB ammeter based on N32G430C8L7+INA199, with an accuracy of 1%. It is mainly a reproduction of the functions in the summer training camp example, and the functions have not been changed much!
 
2. Project properties
The project is mainly a reproduction of the functions in the summer training camp example, and the functions have not been changed much! Relevant valuable components have been replaced, and they have been replaced according to the components I currently have.
 
3. Open source agreement
GPL3.0
4. Hardware part
MCU part
N32G430C8L7 related pin configuration, related capacitors should be placed reasonably according to the design manual! You can also open the pcb reference placement method of this project.
 
Pay attention to the position of pin 1 in actual welding, as shown in the figure below.
The reset circuit and BOOT circuit
refer to the live broadcast of Mo Gong operation. H1 and H2 use two pairs of top pads as contacts
for burning and 0.91-inch oled interface.
This time, PWLINK2 and keil mdk of Chuangxin Workshop are used for download and debugging through swclk and swdio. Current
sampling
INA199A1 gain: 50V/V voltage output, current shunt monitor (also known as current sensing amplifier) ​​is often used for overcurrent protection, precision current measurement or closed-loop feedback circuit for system optimization. This series of devices can sense the voltage drop across the shunt resistor at a common-mode voltage of –0.3V to 26V independent of the power supply voltage. This series of devices uses a zero-drift architecture with low offset, so the maximum voltage drop across the shunt resistor can be kept at a minimum of 10mV full scale when current sensing is performed. These devices are powered by a single power supply of 2.7V to 26V and consume a maximum power supply current of 100µA. All versions are rated for –40°C to 125°C.
When laying out the PCB, pay attention to the placement and routing of the sampling resistors. Refer to the Kelvin routing in the manual.
When purchasing original parts, pay attention to the difference in gain (this program uses x1: 50V/V)
INA199x1: 50V/V
INA199x2: 100V/V
INA199x3: 200V/V.

Also pay attention to the position of pin 1 when soldering.
 
hDZCburkFnk7P10e6BMu9gHnCI5LMyHyh0NOlswy.jpeg3.3V power supply conversion.
Due to the limitations of this circuit layout and cost, C2 and C3 directly use the 4.7uf capacitor in the MCU decoupling capacitor. Voltage
sampling
directly uses the MCU internal voltage conversion part and resistor voltage division collection.
Since only 90.9k resistors were purchased for this project boom, the program must be adjusted appropriately to ensure the accuracy of the display.
External crystal oscillator .
Considering that the circuit may be upgraded and iterated later, this project adds an 8MHz external crystal oscillator circuit.
If the engineering program is used directly, non-soldering measures can be taken for the crystal oscillator circuit.
rH5cx1T4d0LCtlRjaWwa6klnFOBU2SGqecUzg5uR.pngNote: For
boot and reset, refer to the placement of this project. Convenient for debugging and inspection.
ke7VSwUYarLLqgDvbyMd0KpcE5DsJ2Cni2zLCIKM.pngIf the relevant useless pins interfere with the routing, you can edit the components appropriately to facilitate routing and welding.
 
Po3RBRAlz41bVXuuBkrbm17KRaEMAbjsRUoAwRuc.png5.
Notes on the software part
. If the sampled voltage or current is inaccurate, you can modify the values ​​of VOLTAGE_FACTOR and CURRENT_FACTOR in the main.c file according to the actual value.
kiZutKGwgXo7uLcCuaqtD0Tj2tCjAEMuPNIWTsRI.png 
6. BOM list
TE5CfqZ2Mcq5SdcUR4lhlCxrCV5jxqyH0Apc3kmZ.png7. Competition LOGO verification
 
WxUhLQP92CcTkZhpyct7Yh9zEbXCuoXlRZlGOXgb.jpeg8. Effect demonstration
 
LiChuang Electric Competition: "Summer Training Camp Amperemeter"-Effect display
 
Picture display (Since the mother row was not purchased and there was no extra screen, the DuPont line connection method was adopted)
O6AKgjUhJis1xDrEO7Prbz3ZEVdJXHtI8XIKWzNg.pngVideo demonstration
See attachment
Note: For related programs, refer to the officially released summer training camp case
[Training Camp Official Case] ​​USB Amperemeter-Jialichuang EDA Open Source Hardware Platform (oshwhub.com)
Clear demonstration video link: Jialichuang 2022 Summer Training Camp USB Amperemeter_Bilibili_bilibili
The program in the attachment is used to test whether there is a problem with welding (light up the LED alone)
 
 
 
参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-05-29 00:28:06
  • Posting format issues
  • The competition will start tomorrow. Please raise your hands if you are nervous.
  • Problems with msp430 timer_b doing pwm output
  • Information about TMS320F28335
  • EDK underlying device driver [code example]
  • Today is International Family Day

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号