张三叔

#The 7th Lichuang Electronic Competition# Real-time attitude meter based on N32G430

 
Overview

* 1. Project Introduction
       This design is based on the N32 microcontroller design project - a real-time attitude meter based on N32G430, which can collect attitude data from MPU6050 and then display it in real time on 0.96 OLED.
       The design architecture of this project is shown in the figure. It is mainly composed of the main controller N32G430C8L7, MPU6050 sensor, OLED display module and other parts. It can collect the original acceleration and gyroscope acceleration through the MPU6050 sensor. After receiving the data, N32G430 converts it into the attitude of the module and displays it using OLED.
*2. Project attributes
       This project is an improvement on the real-time attitude display based on N32G430 in the [Training Camp Official Case]. Due to my limited personal level, this work must have some shortcomings. I hope to communicate with you and make progress together.
 
*3. Hardware
       The hardware structure is shown in the schematic diagram. It is mainly composed of the main controller N32G430C8L7, the six-axis sensor MPU6050, and the display module 0.96OLED.
       (1) Main controller N32G430C8L7
         The N32G430C8L7 microcontroller adopts a high-performance 32-bit ARM Cortex™-M4F core, integrates a floating-point unit (FPU) and a digital signal processing (DSP), and supports parallel computing instructions. The maximum operating frequency is 128MHz, and it integrates up to 64KB of on-chip encrypted storage Flash, supports multi-user partition authority management, and supports 16KB of embedded SRAM. It has an internal high-speed AHB bus, two low-speed peripheral clock buses APB and a bus matrix, supports 40 reusable I/Os, and provides a wealth of high-performance analog interfaces, 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 operate stably in the temperature range of -40°C to +105°C, with a supply voltage of 2.4V to 3.6V, and provides multiple power consumption modes.
         More information: National Technology - Innovation Serving the People (nationstech.com)
       (2) Six-axis Sensor 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 axis difference when combining gyroscopes and accelerometers, and reduces installation space. 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 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. With DMP, we can use the motion processing database provided by InvenSense to easily implement attitude resolution, reduce the processing load on the operating system, and greatly reduce the difficulty of development.
         The features of MPU6050 include
the output of 6-axis or 9-axis (external magnetic sensor required) rotation matrix, quaternion, Euler Angle format (Euler Angle forma) fusion calculation data in digital form (DMP support required)
with 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,
remove the sensitivity between the accelerator and gyroscope axes, reduce 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)
         For more information: refer to the data sheet
       (3) Display module 0.96OLED
         OLED, namely organic light-emitting diode (Organic Light-Emitting Diode), is also called organic electroluminesence display (Organic Electroluminesence Display, OELD). Since 2003, this display device has been widely used in MP3 players because of its thinness, lightness and power saving. For DC and mobile phones, which are also digital products, engineering samples using OLED screens have only been displayed at some exhibitions. Since 2007, the life span has been greatly improved, and it has many advantages that LCD cannot match.

         This project uses 0.96-inch 4-pin OLED, driven by SSD1315. The OLED screen used in this project uses the IIC interface.
         IIC interface: GND: power ground VCC: 2.2V~5.5V SCL: CLK clock (high level 2.2V~5.5V) SDA: MOSI data (high level 2.2V~5.5V)
         Note: OLED display is different from LCD. OLED has no response when powered on. It needs program drive to display!
         More information: refer to the data sheet (purchased module)
 
*4.
       Due to personal time issues, the software will be optimized and updated later...
 
*5. Shell structure
 
       Considering the protection of the circuit and the aesthetics, I used SolidWorks to draw a base and tested it. The STL file will be shared in the project attachment.
Note: I used M2×6 screws.
 
* 6. Process video
      bilibili video link: https://www.bilibili.com/video/BV1xB4y1x7sL?spm_id_from=333.999.0.0
 
参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-06-19 05:15:01

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号