Based on N32G430C8L7+INA199, it collects attitude data and converts it into the real-time attitude of the module and displays it on the OLED.
It is mainly divided into the following parts: host computer, main controller N32G430C8L7, MPU6050 sensor, and OLED display module. It is designed to use the MPU6050 sensor to collect the original acceleration and gyroscope acceleration. The N32G430 receives the data and converts it into the attitude of the module. , displayed using OLED and host computer.
Published for the first time.
GPL3.0 open source agreement
Using N32G430:
The N32G430 series uses a 32-bit ARM Cortex-M4f core with a maximum operating frequency of 128MHz, supports floating point operations and DSP instructions, integrates up to 64KB embedded encrypted Flash, 16KB SRAM, integrates a wealth of high-performance analog devices, and has a built-in 12bit 4.7M sps ADC, 3 high-speed comparators, integrated multi-channel U(S)ART, i2C, SPI, CAN and other digital communication interfaces. The N32G430C8L7 microcontroller product can operate stably in the temperature range of -40°C to +105°C, with a power supply voltage of 2.4V to 3.6V, and provides a variety of power consumption modes.
Using MPU6050:
MPU6050 is the world's first integrated 6-axis motion processing component launched by InvenSense. Compared with multi-component solutions, it eliminates the problem of inter-axis differences when combining gyroscopes and accelerators, and reduces installation space. The MPU6050 integrates a 3-axis gyroscope and a 3-axis acceleration sensor internally, and contains a second IIC interface that can be used to connect an external magnetic sensor, and uses its own digital motion processor hardware acceleration engine to provide applications to the application through the main IIC interface. Output complete 9-axis fusion calculation data. With DMP, you can use the motion processing database provided by InvenSense to realize attitude calculation very conveniently, reduce the load of processing operations on the operating system, and greatly reduce the difficulty of development.
OLED module hardware, etc. are also used. (It’s easier not to introduce it here)
MPU6050 initialization configuration process:
1. Initialize IIC interface
2. Reset MPU6050
3. Set the full-scale range of the angular velocity sensor (gyro) and acceleration sensor
4. Set other parameters
5. Configure the system clock source and enable the angular velocity sensor and acceleration sensor
OLED initialization configuration process:
1. Initialize IIC interface
2. Turn off the OLED display and set the OLED register parameters
3. Turn on OLED display
(Reference document: https://wenku.baidu.com/view/fb23e3a4bfeb19e8b8f67c1cfad6195f302be849.html)
The spatial coordinate conversion algorithm can be found on Baidu.
Software initialization process:
-log_init(): 500000Bd, no parity, 8-bit data, 1 stop bit
-i2c_master_init ()
-oled_init()
-MPU_Init()
-mpu_dmp_init()
All reference designs on this site are sourced from major semiconductor manufacturers or collected online for learning and research. The copyright belongs to the semiconductor manufacturer or the original author. If you believe that the reference design of this site infringes upon your relevant rights and interests, please send us a rights notice. As a neutral platform service provider, we will take measures to delete the relevant content in accordance with relevant laws after receiving the relevant notice from the rights holder. Please send relevant notifications to email: bbs_service@eeworld.com.cn.
It is your responsibility to test the circuit yourself and determine its suitability for you. EEWorld will not be liable for direct, indirect, special, incidental, consequential or punitive damages arising from any cause or anything connected to any reference design used.
Supported by EEWorld Datasheet