introduction
Traditional attitude measurement uses high-precision attitude sensors such as gyroscopes and accelerometers, which are bulky and expensive. The current MEMS products are known as a major reform of the traditional inertial measurement combination due to their small size, low price and low power consumption, and are increasingly used in attitude measurement applications. In addition, with the rapid development of MEMS technology and its penetration into various disciplines, its performance in various aspects such as accuracy, robustness, dynamic response, etc. has been greatly improved.
With the continuous development of embedded technology, application-centric embedded systems have penetrated into all aspects of our daily lives and have been applied in all walks of life due to their small size, low power consumption, high reliability, good scalability, and high software and hardware integration. The combination of embedded and MEMS enables the attitude measurement system to meet the application requirements of low cost, low power consumption, and miniaturization, bringing great progress to the field of consumer electronics, such as gravity sensors and compasses in smart phones, and also bringing very broad application prospects to the fields of aviation, industry, automobiles, medical care, environmental monitoring, communications, etc.
This paper uses a three-axis MEMS gyroscope, a three-axis MEMS accelerometer, a three-axis MEMS electronic compass, and a Freescale microcontroller MC9S08QE8 to form an embedded attitude measurement system. The gyroscope is used to obtain real-time attitude information due to its good dynamic performance. However, the gyroscope will produce an offset, while the accelerometer and the electronic compass have superior static performance, so they are used to correct the error in the gyroscope attitude calculation process.
1 System composition and structure
This system is mainly composed of a single-axis gyroscope LY530AL, a dual-axis gyroscope LPR530AL, a three-axis MEMS accelerometer ADXL345, a three-axis MEMS electronic compass HMC5843 and a single-chip microcomputer MC9S08QE8. The dual-axis gyroscopes in the X and Y directions and the single-axis gyroscope in the Z-axis direction are combined into a three-axis gyroscope. Their signals are collected by the ADC module of the single-chip microcomputer MC9S08QE8, while the acceleration signal and the electronic compass signal are transmitted to the single-chip microcomputer through the I2C bus. These 9 signals are first processed in the single-chip microcomputer, and then the attitude calculation algorithm program in the single-chip microcomputer obtains 3 attitude angle information. These 3 information are transmitted to the host computer through the serial port module of the single-chip microcomputer MC9S08QE8 for demonstration. The structural block diagram of the embedded attitude measurement system is shown in Figure 1.
1.1 Three-axis MEMS gyroscope
The three-axis MEMS gyroscope in the system is composed of ST's single-axis Z-direction gyroscope LY530AL and dual-axis X and Y-direction gyroscope LPR530AL. They use the principle of capacitive micromechanical gyroscopes. Since ST uses the tuning fork method and the vibration drive circuit adopts a double closed-loop control structure, the stability and resolution of the gyroscope are significantly improved. The measurement range is ±300°/s, it has a self-test function, and the output end integrates a low-pass filter circuit. The operating voltage is 1.8~3.6 V, and the current in standby mode is less than 1μA.
1.2 Three-axis MEMS accelerometer
The three-axis MEMS accelerometer in the system uses the ADXL345 from ADI. The ADXL345 is a three-axis, digital output accelerometer based on iMEMS technology with a variable measurement range of ±2g, ±4g, ±8g, and ±16g. The 32-level FIFO storage on the chip can cache data, thereby reducing the burden on the processor and reducing system power consumption. The ADXL345 has high resolution and sensitivity, a 3 mm×5 mm×1 mm ultra-small package, 40~145μA ultra-low power consumption, and a standard I2C or SPI digital interface, making it very suitable for mobile device applications.
1.3 Three-axis MEMS electronic compass
The three-axis MEMS electronic compass in the system uses Honeywell's HMC5843, which uses Honeywell's anisotropic magnetoresistive (AMR) technology and consists of Honeywell's high-precision HMC11 8X series magnetoresistive sensors. It has high sensitivity and reliability in low-intensity magnetic field sensors. The low voltage power supply of 2.16 to 3.3 V, the current consumption of 0.66 mA, and the small size of 3mm×3 mm×0.9 mm have obvious advantages in consumer electronic devices and navigation systems.
1.4 MCU MC9S08QE8
The single-chip microcomputer in the system adopts Freescale's MC9S08QE8. MC9S08QE8 adopts many new technologies, such as battery life extension technology, enhanced low-power performance and advanced operation capability under ultra-low voltage. At the same time, it has a very high degree of integration and integrates many system-level functions, such as 12-bit high-precision A/D converter, timer, SPI, I2C, SCI and other common modules, which is very suitable for low-power and low-cost applications.
2 Application Circuit Design
2.1 Power Module
The power supply voltage regulator circuit of this system supplies power to all devices in the entire system. Considering that the system involves digital and analog sensors, a low-noise, low-drift, 3.3 V linear voltage regulator chip MIC5205 is used. The schematic diagram of the power supply voltage regulator circuit is shown in Figure 2. Among them, C1 is a capacitor connecting the internal voltage reference source of the chip and GND to reduce the noise of the output voltage, and C2 is a capacitor between the output and GND to prevent the circuit from oscillating. The capacitance of C2 is related to C1, but when C1 is 470 nF, C2 is generally 2.2μF. D1 is the indicator light of the power supply.
2.2 Gyroscope and ADC module
The ADC module in the MC9S08QE8 microcontroller is based on a successive approximation 12-bit analog-to-digital converter. It provides 10 input channels, can be configured to use time conversion speed and power consumption, and can set preset comparisons to ensure that some data that does not meet the requirements does not need to be saved. The most high-performance feature is the ability to set the continuous sequence conversion mode. In this mode, the ADC hardware can automatically realize the continuous conversion of several set channels and store the conversion results in the corresponding data register without program loops. This simplifies program design, reduces conversion power consumption, and reduces the burden on MC9S08QE8.
The interface between the gyroscope and the ADC module of the microcontroller is shown in Figure 3. In the figure, ST, HP, and PD are used as three pins for self-test, energy control, and high-pass filtering. They are connected to the general I/O interface of MC9S08 QE8 respectively. Generally, they are connected to pull-down resistors and are in normal working mode by default. If the corresponding working mode needs to be changed, the level of the corresponding MC9S08QE8 I/O port must be changed to a high level. The output signals (4xOTUX, 4xOTUY, and 4xOTUZ pins) and the output reference voltage (Vref pin) of LY530AL and LPR530AL are connected to the corresponding channels of the ADC module of MC9S08QE8 respectively. It is particularly important to note that LPR530AL has two output modes: one is the output after internal amplification by 4 times, and the other is the normal output. When the nonlinear amplification output mode is used, the 5th and 9th pins of LPR530AL should be connected to GND; if the amplification output mode is used and there is no external extended bypass filter, the 4th and 5th pins, and the 9th and 10th pins should be short-circuited respectively. In Figure 3, the working principle of LY530AL is similar to that of LPR530AL. [page]
2.3 Accelerometer, electronic compass and I2C interface
The high-speed I2C module in MC9S08QE8 has the characteristics of multi-master operation, programmable slave address, interrupt-driven byte-by-byte data transmission, support for broadcast mode and 10-bit addressing, etc. The bus can reach a speed of 100kbps under maximum load. In the system, the interface between the accelerometer, electronic compass chip and MC9S08QE8 I2C module is shown in Figure 4. In the figure, the CS pin of ADXL345 is used to control the selection of I2C or SPI communication protocol. The high level indicates the use of I2C protocol, and the SDA and SCL pins are connected to the I2C bus pins of MC9S08QE8 respectively. The electronic compass HMC5843 supports dual voltage operation, where the pin VDD represents the core voltage and the pin VDDIO represents the external I/O voltage. The single voltage mode is adopted in this system, that is, the core voltage is the same as the external I/O voltage.
Previous article:A few simple comparisons between ARM and x86
Next article:Minimum technical requirements for an electronic engineer
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- The US asked TSMC to restrict the export of high-end chips, and the Ministry of Commerce responded
- The US asked TSMC to restrict the export of high-end chips, and the Ministry of Commerce responded
- ASML predicts that its revenue in 2030 will exceed 457 billion yuan! Gross profit margin 56-60%
- Detailed explanation of intelligent car body perception system
- How to solve the problem that the servo drive is not enabled
- Why does the servo drive not power on?
- What point should I connect to when the servo is turned on?
- How to turn on the internal enable of Panasonic servo drive?
- What is the rigidity setting of Panasonic servo drive?
- How to change the inertia ratio of Panasonic servo drive
- What is the principle of keyless entry for cars?
- What does OVRD_ALERT in BQ76940 OVRD_ALERT mean?
- Can SDRAM chips be used on 2-layer boards?
- Let Arduino play with your useless STM32 board Part 2
- Recommend a low thermal potential relay
- Modern rectifier technology - active power factor correction technology
- About FlashBurn can not burn
- LED transparent screen signal transmission method
- The compiler keeps reporting an error, saying there is an error here. I have looked at it many times but can't find where the problem is.
- How to calculate the cathode potential of TL431?