TFT LCD Module Acceleration Gyroscope Sensor for the operation effect:
STONE TFT LCD Module Acceleration Gyroscope Sensor
Introduction To Display Screen
This document will teach you how to use an STM32 MCU +MPU6050 accelerometer gyroscope sensor +STONE STVC070WT-01 serial port display for a DEMO.
STVC070WT-01 is the serial display of our company, its development is simple and easy to use, you can go to the website of our company for all display differences.
It is worth noting that our screen supports serial port communication. Some models support TTL/RS232/RS485, but some only support RS232. If your MCU’s serial port is TTL logic level, you need to add an MAX3232 for level conversion. If you want to know which screen supports TTL and which supports both TTL and RS232, you can check it out on our website
“Industrial type” and “advanced type” screens generally only support RS232 or RS485, and only “civilian type” screens can support TTL/RS232/RS485.
If you choose the “advanced type” or “industrial type“, but your SCM only supports TTL, then you need to do the following conversion:
Other relevant information can be viewed or downloaded on the official website:
Three Steps Of STONE Display Screen Development
- Design the display logic and button logic with STONETOOLsoftware, and download the design file to the display module.
- The MCU communicates with the STONE display module through a serial port.
- With the data obtained in step 2, the MCU does other actions.
What I’m going to show you today is a Demo of gravity, gyroscope, Euler Angle,
Functions are as follows:
- Three text boxes display acceleration values
- Three text boxes display gyroscope values
- Three text boxes display Euler Angle values
- A text box displays the current refresh time
- Two buttons adjust the refresh time
First, We Need To Use Photoshop To Design Two UI Interfaces, And The Design Results Are As Follows:
The first image is the main screen image, and the second image is the button effect.
Then we open “TOOL2019” and design the effects in the TOOL:
Two main components are used:
Numerical display unit
After The Design, The Simulation Operation Effect Can Be Seen In The Simulation Interface:
The mph-6050 is the world’s first integrated 6-axis motion processing chip. Compared with the multi-component solution, it eliminates the problem of the difference between the combined gyroscope and the accelerator time axis and reduces a lot of packaging space. When connected to the three-axis magnetometer timing, the mpu-6050 provides a complete 9-axis motion fusion output to the I2C or SPI ports (SPI is only available on the mpu-6000).
The angular velocity sensing range of mpu-6050 is ±250, ±500, ±1000 and ±2000°/ SEC (DPS), which can accurately track fast and slow actions. Moreover, users can program and control the detection range of accelerators to be ±2g, ±4g±8g and ±16g. Product data can be transmitted via IIC up to 400kHz or SPI up to 20MHz (SPI is only available on mpu-6000).Mpu-6050 can work under different voltages, the voltage supply of VDD is 2.5v ±5%, 3.0v ±5%, or 3.3v ±5%, and the power supply of logic interface VDDIO is 1.8v ±5% (VDD only is used for MPU6000). The mpu-6050’s packaging size of 4x4x0.9mm(QFN) is revolutionary in the industry. Other features include built-in temperature sensors and oscillators that vary only ±1% in the operating environment.
Mobile sensing games an augmented reality, EIS: Electronic Image Stabilization (OIS: Optical Image Stabilization) user interface of pedestrian navigator with “zero-touch” gesture.
Smartphones, tablet devices, handheld game products, game consoles, 3D remote controls, portable navigation devices, UAVs, and balance cars.
The digital output of 6 – or 9-axis rotation matrix, quaternion, Euler Angle forma fusion calculus data.3-axis angular velocity sensor (gyroscope) with 131 LSBs/°/ SEC sensitivity and full grid sensing range of ±250, ±500, ±1000 and ±2000°/ SEC. It can be controlled by a program, and the program control range is ±2g, ±4g, ±8g, and ±16g. Remove the sensitivity between the accelerator and the gyroscope axis and reduce the influence of the Settings and sensor drift. The DMP (Digital Motion Processing) engine reduces the load of complex fusion algorithms, sensor synchronization, postural sensing, etc. The motion processing database supports the operating time deviation and magnetic sensor correction algorithms built-in in Android, Linux, and Windows. Temperature sensor with digital output and digital input Sync pin support video electronic shadow phase stabilization technology and GPS programmable control interrupt support gesture recognition, shake, zoom in and out of the picture, rolling, rapid descent interrupt, high-g interrupt, zero motion sensing, touch sensing, shake sensing. The supply voltage of VDD is 2.5v ±5%, 3.0v ±5% and 3.3v ±5%. The operating current of VDDIO is 1.8v ± 5%: 5mA; the Standby current of a gyroscope: is 5uA; the Accelerator operating current: is 350uA, the accelerator power-saving mode current: 20uA@10Hz I2C in fast mode up to 400kHz, or SPI serial host interface up to 20MHz built-in frequency generator at full temperature range only ±1% frequency variation. The minimum and thinnest packaging (4x4x0.9mm QFN) tailored for portable products has been tested to meet RoHS and environmental standards.
About The Pin
SCL and SDA connect to the IIC interface of the MCU, through which the MCU controls MPU6050.
There is also an IIC interface, AXCL, and XDA, which can be used to connect external slave devices, such as magnetic sensors, to form a nine-axis sensor.VLOGIC is the voltage of the IO port, and the lowest pin can reach 1.8v. Generally, we can directly use VDD. AD0 is the address control pin from the IIC interface (connected to MCU), which controls the lowest order of the IIC address. If GND is connected, then the IIC address of MPU6050 is 0X68 and 0X69 if VDD is connected. Note: the address here does not contain the lowest order of data transfer (the lowest order is used for reading and writing).
STM32F103RCT6 MCU has powerful functions. Here are the basic parameters of the MCU:
- Series: STM32F10X
- Kernel: ARM – COTEX32
- Speed: 72 MHZ
- Communication interface: CAN, I2C, IrDA, LIN, SPI, UART/USART, USB
- Peripheral equipment: DMA, motor control PWM, PDR, POR, PVD, PWM, temperature sensor, WDT
- Program storage capacity: 256KB
- Program memory type: FLASH
- RAM capacity: 48K
- Voltage – power supply (Vcc/Vdd) : 2 V ~ 3.6 V
- Oscillator: internal
- Operating temperature: -40°C ~ 85°C
- Package/housing: 64-lqfp
In this project, I will use UART, GPIO, Watch Dog, and Timer of STM32F103RCT6.
The following is the code development record for the project.
STM32 USES Keil MDK software development, about which you must be familiar, so I will not introduce the installation method of this software.
STM32 can be simulated online through j-link or st-link and other simulation tools. The following picture is the STM32 development board I used: