1. Project function introduction:
USB ammeter based on N32G430C8L7+INA199, with an accuracy of 1%. It can detect current, voltage, and power, and display them through 0.91 oled.
2. Project attributes
are not original, and reproduce the official case of the training camp.
3. Open source agreement
note: Altruism is self-interest, please read the following content carefully.
Embrace open source and give the project unlimited value. It is recommended that more than 80% of the core functions of the project be open source;
if a part of the function is irreplaceable and the project cannot solve the corresponding problem after deleting it, then the function implemented by this part is the core function of the project; for example, if an electronic load is designed and a host computer software is designed to monitor power changes, the electronic load is the core function and the host computer software is an auxiliary function; for example, an isolated 485 module is used in the electronic load to communicate with the host computer, then the communication function implemented by this 485 module is an auxiliary function;
the project should choose an open source protocol that suits it. If the project references other open source projects, the source should be indicated and the open source protocol of the original author should be followed; the original project is recommended to use the GPL3.0 open source protocol;
the functions implemented by directly citing the original circuit or original code of the open source project cannot be used as the core functions of your own project, and the functions directly implemented by using the general modules on the market cannot be used as the core functions of your own project.
4. Hardware
The N32G430C8L7 microcontroller product adopts a high-performance 32-bit ARM Cortex™-M4F core, integrates a floating-point unit (FPU) and digital signal processing (DSP), and supports parallel computing instructions. The maximum operating frequency is 128MHz, with up to 64KB of on-chip encrypted storage Flash, and supports multi-user partition authority management, and supports 16KB of embedded SRAM. It has a built-in internal high-speed AHB bus, two low-speed peripheral clock buses APB and bus matrix, supports 40 reusable I/Os, provides a rich high-performance analog interface, including a 12-bit 4.7Msps ADC, supports 16 external input channels and 3 internal channels, and provides a variety of digital communication interfaces, including 4 U(S)ARTs, 2 I2Cs, 2 SPI/I2S, and 1 CAN 2.0B communication interface. The N32G430C8L7 microcontroller product can work stably in the temperature range of -40°C to +105°C, with a supply voltage of 2.4V to 3.6V, and provides a variety of power consumption modes.
The chip used in this project is N32G430C8L7.
When designing the circuit, it should be noted that each power pin of the chip needs to be connected to an additional 100nF external filter capacitor, and the 1st pin of the chip needs to be connected to an additional 4.7uf filter capacitor. The circuit diagram is shown in the figure.
5. The source code of the software part
uses the official case program of the training camp without any changes... The compilation and burning are carried out using Keil5 IDE. It is necessary to add the National Technology N32 chip package in Keil. I use ST-Link for burning.
6. BOM list

7. Competition LOGO verification