Note: * is a required field,
please fill it in during the registration stage↓
* 1. Introduction to project functions
1. First, it is a simple desktop power supply, which boosts the low voltage (such as 5V of the USB port) to different voltages such as 12V or 24V; 2. The ammeter made based on N32G430C8L7+INA199 has an accuracy of 1%, and can check the input current or output current; 3. Based on N32G430C8L7+resistor series voltage divider, a voltmeter is made to check the input voltage or output voltage; 4. In addition: based on N32G430C8L7+MPU6050 sensor, posture data can be collected and displayed; 5. In addition: the above signals (two currents, two voltages, posture) can be reported to the host computer through the serial port; 6. In addition: the motor drive and Hall orthogonal signal module can be externally connected, and I hope to make a two-wheeled balancing car in the end.
Note: The topic is not limited. It can be a solution to a problem in life/work, a solution designed for a certain group of people/scene, a graduation project/course design/DIY project/purely cool project, etc. Mainly talk about what problem you solved by what means.
*2. Project attributes
Please enter the content...
Note: Please indicate whether the project is publicly disclosed for the first time; whether the project is original; whether the project has won awards in other competitions, if so, please describe the details of the award; whether the project has participated in the defense at school.
* 3. Open source agreement
Open source agreement: GPL 3.0
Note: Altruism is self-interest, please read the following content carefully.
Embrace open source and give unlimited value to the project. 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 referencing 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 general modules on the market cannot be used as the core functions of your own project.
Please fill in the following in the competition stage↓
*4. The main
control
N32G430C8L7 microcontroller product of the hardware part 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

MCU burning interface
chip supports a variety of burning methods, such as the common ST-Link, USB-TTL, Jlink and other burners on the market.
Here, a 2.54 pitch pin header (socket) is used for burning.
The external 8MHz clock
is basically realized by the internal crystal oscillator (8Mhz) in this case.
It is only reserved here. Reset
circuit
The reset circuit does not have a button design, and two solder joints are used for shorting.
BOOT circuit
The BOOT circuit does not have a button design, and two solder joints are used for shorting.
Power conversion
Although the N32MCU supports a maximum voltage of 5V, considering the unstable voltage factor on the input voltage, and this case also has the function of DC-DC boost, a 3.3V LDO is used to power the chip.
Power filtering
According to the official document requirements, 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.
DC-DC boost
A simple desktop power supply, which boosts from a low voltage (such as 5V of a USB port) to 12V or 24V, etc. The output current can reach more than 2A.
Convenient for daily use. ;)
Current Sampling
The current sampling part is the INA199B1DCKR current sense amplifier, (also known as a current sensing amplifier) which is commonly used in overcurrent protection, precision current measurement for system optimization, or closed-loop feedback circuits. This series of devices can sense the voltage drop across the shunt resistor at a common-mode voltage of –0.3V to 26V that is independent of the supply voltage. There are three fixed gains to choose from: 50V/V, 100V/V, and 200V/V. This series of devices uses a zero-drift architecture with low offset, so the maximum voltage drop across the shunt resistor can be kept to a minimum of 10mV full scale when performing current sensing. The parameters are as follows:
Common-mode range: –0.3V to 26V
Offset voltage: ±150μV (maximum)
Supports 10mV full-scale shunt voltage drop
Quiescent current: 100μA (maximum)
Sampling resistor selection
Inserting a low-resistance sense resistor in series in the current path will form a small voltage drop, which can be amplified and treated as a signal proportional to the current. However, depending on the specific application environment and the location of the detection resistor, this technology will pose different challenges to the detection amplifier. Generally, the resistance value of the sampling resistor is below 1 ohm, which is a milliohm-level non-inductive resistor. However, some resistors have sampling voltage and other requirements, so large resistance value resistors must be selected, but the resistance base is large and the error is large. In this case, it is necessary to select high-precision non-inductive resistors (which can reach 0.01% accuracy, that is, one ten-thousandth accuracy) to make the sampling data very reliable. Products such as ultra-low resistance resistors (0.0005 ohms, 2 milliohms, 3 milliohms, 10 milliohms, etc.), chip alloy resistors, high-power resistors (20W, 30W, 35W, 50W, 100W), etc. have a temperature coefficient of plus or minus 5PPM.
Sampling method
This sampling uses low-side sampling, that is, the sampling resistor is connected to the GND loop. This design can calculate the complete differential, follow, amplify, and output when the differential signal is sent to the op amp. If high-side sampling is used, that is, the sampling resistor is placed at a high position between the power supply and the load, although this placement not only eliminates the ground interference generated in the low-side detection scheme, but also detects the accidental short circuit from the battery to the system ground, but the high-side detection requires the detection amplifier to handle the common-mode voltage close to the power supply voltage. This common-mode voltage value range is very wide, ranging from the level required to monitor the processor core voltage (about 1V) to hundreds of volts commonly seen in industrial, automotive, and telecommunications applications. Application examples include the battery voltage of a typical laptop computer (17 to 20V), 12V, 24V, or 48V batteries in automotive applications, 48V telecommunications applications, high-voltage motor control applications, current detection for avalanche diodes and PIN diodes, and high-voltage LED backlights. Therefore, an important advantage of high-side current detection is that the detection amplifier has the ability to handle larger common-mode voltages. Therefore, the current sampling method of sampling resistor plus op amp is best performed at the low end. Although, low-end sampling will affect the ripple of the signal due to common ground interference. But compared with high-end, the solution is simple, easy to implement, low cost and high reliability.
The sampling resistors R11 and R12 in this case (see DC-DC boost diagram) are used to test the input current Iin and output current Iout
voltage sampling respectively.
The voltage sampling part consists of a voltage divider circuit composed of two resistors (two groups), and its principle is the knowledge of resistor series voltage division. It
is used to test the input voltage Uin and output voltage Uout respectively.
The button circuit
uses two sets of buttons, human-computer interaction, and convenient debugging.
It is planned to achieve the equivalent of 4 or more buttons through short press, long press and combination press.
The LED circuit
is easy to debug.
OLED screen display
4-pin OLED display, resolution 128*64.
UI display, human-computer interaction.
Communication method: IIC.
MPU6050
MPU6050 is an integrated 6-axis motion processing component launched by InvenSense. The MPU6050 integrates a 3-axis gyroscope and a 3-axis acceleration sensor, and contains a second IIC interface that can be used to connect an external magnetic sensor. It also uses its own digital motion processor (DMP: Digital Motion Processor) hardware acceleration engine to output complete 9-axis fusion calculation data to the application end through the main IIC interface. The features of MPU6050 include
the digital output of 6-axis or 9-axis (external magnetic sensor required) rotation matrix, quaternion, Euler Angle format (Euler Angle forma) fusion calculation data (DMP support required),
131 LSBs/° /sec sensitivity and full-grid sensing range of ± 250, ± 500, ± 1000 and ± 2000°/sec 3-axis angular velocity sensor (gyroscope), integrated programmable control, 3-axis acceleration sensor with a range of ± 2g, ± 4g, ± 8g and ± 16g, removal of sensitivity between accelerometer and gyroscope axes, reducing the impact of settings and sensor drift;
built-in digital motion processing (DMP: Digital Motion Processing) engine can reduce MCU Complex fusion calculation data, sensor synchronization, posture sensing, etc.;
built-in operation time deviation and magnetic sensor correction calculation technology, eliminating the need for customers to perform additional calibration;
comes with a digital temperature sensor;
with a digital input synchronization pin (Sync pin) to support video electronic image stabilization technology and GPS;
programmable interrupts (interrupt), support posture recognition, panning, screen zooming, scrolling, fast descent interrupts, high-G interrupts, zero motion sensing, touch sensing, and shake sensing functions;
VDD supply voltage is 2.5V± 5%, 3.0V± 5%, 3.3V± 5%; VLOGIC can be as low as 1.8V± 5%;
gyroscope operating current: 5mA, gyroscope standby current: 5uA; accelerometer operating current: 500uA, accelerometer power saving mode current: 40uA@10Hz;
comes with 1024 bytes FIFO, which helps to reduce system power consumption;
up to 400Khz IIC Communication interface;
Ultra-small package size: 4x4x0.9mm (QFN) The detection axis and direction of the MPU6050 sensor are shown in Figure 1 below:

Motor drive and Hall orthogonal sensing
P1, P2 are connected to the 2-way motor drive module based on DRV8833.
P3, P4 are connected to the DC reduction motor with Hall encoder.


PCB top surface
LiChuang Electronic Design Competition LOGO
PCB bottom surface
LiChuang Electronic Design Competition LOGO
PCB 3D
physical demonstration: voltage, current, power meter
Physical demonstration: posture acquisition and display
Note: It is recommended to use Jiali Chuang EDA. If you choose other EDA tools, please upload the schematic diagram in PDF format, the PCB drawing in PDF format, and the PCB file in Gerber format in the attachment. Here you can explain in detail the implementation principle and mechanism of your project, precautions, debugging methods, testing methods, etc. It is recommended to introduce your ideas to others in the form of pictures and texts.
*5. Software part
display menu

OLED demonstration

voltage, current acquisition and power calculation

real-time posture

game - push box

more
stay tuned~~~~
Note: If your project involves software development, please upload the corresponding project source code in the attachment. Here you can explain in detail your software flow chart, functional module block diagram, explanation or popular science of related algorithms, source code structure, compilation environment construction and configuration, source code compilation method, program burning method, etc. It is recommended to introduce your ideas to others in the form of pictures and texts.
*6. BOM list,
please enter the content...
Note: BOM list involved in the project. Please upload a screenshot of the BOM in this position. Please upload the list details in PDF format to the attachment. It is recommended to include model, brand, name, package, procurement channel, purpose, etc. The specific content and form should be based on the clear expression of the project composition.
*7. Competition LOGO verification
Please upload a project picture containing the competition logo, and the logo is printed on the PCB in the form of silk screen.
Click zip to download the competition logo! (Competition logo).zip
* 8. Demonstrate your project and record it into a video to upload.
Video requirements: Please shoot in horizontal mode, with a resolution of no less than 1280×720, in Mp4/Mov format, and a single video size limited to 100M;
Video title: LiChuang Electronic Competition: {Project Name}-{Video Module Name}; such as LiChuang Electronic Competition: "Autonomous Driving"-Team Introduction.
More details: https://diy.szlcsc.com/posts/d76d9cb41705430e9a54e7a5feed07a5