Design of air pressure altimeter based on MCU

Publisher:火星Latest update time:2012-12-12 Source: 电子科技 Keywords:MCU Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
The altimeter uses the law of atmospheric pressure changes to measure the altitude and atmospheric pressure changes of the location, as well as the relative height caused by regional changes. It is generally suitable for outdoor activities, including mountaineering, rock climbing, skiing, and traveling. In view of the shortcomings of the current barometric altimeter products, such as large absolute height measurement error, single function, large size, high power consumption and inconvenient to carry, based on the small size of the SCP1000-D11 barometric pressure sensor launched by VTI, and the switching of 4 measurement modes, the barometric pressure data and barometric pressure conversion altitude software algorithm are used to improve the design. In addition, backlight display and alarm clock functions are added to the hardware design.

1 System Design
In order to make the system more streamlined, economical and practical, the 4-bit OKIMCU ML63189B is used. The SCP1000-D11 sensor is used as a slave to communicate with the MCU's I/O through the I2C interface. Clock timing, stopwatch, alarm and backlight display functions are added. Human-computer interaction is achieved through 5-key button operation and corresponding software.

a.JPG



2 System Hardware Design
The system includes MCU basic functions, key operation, backlight drive display, alarm and sound function, height, temperature and clock LCD display, SCP1000-D11 pressure sensor and MCU interface module. OKIML63189B has 4 bit, 32 kB Word ROM, 1.5 kB Word RAM/64×16 bit LCD ICONS. MCU high-speed clock selects external precision resistor 100 kΩ to ensure pressure data processing and communication needs. The key is externally connected to VDD, and the MCU interface is the external interrupt function pin PB. 3, PO port, with a pull-down resistor inside. When the key is pressed, it is triggered by the rising edge. The alarm driver is connected to the MCU 91PIN MD pin, and the buzzer chip is driven by a BC847BW NPN transistor. SCP1000-D11 has a total of 16 pins, 7 I/O pins and 9 power pins. Its wiring is shown in Figure 2. It is powered by a single power supply. TRIG is an external trigger for low power mode. In the design, this pin is connected to DVSS. DRDY is an output interrupt signal to remind the user that the temperature and pressure values ​​have been measured and can be read. When the PD pin is high, SCP1000-D11 can maintain low power mode for a long time. DRDY-PIN and PD are connected to PB. 0 and P9.0 respectively. SCK, SDA, MISO and CSB pins form the data communication line. This MCU has no dedicated I2C interface I/O. Its PA. 0 and PA. 1 are used as SCL, SDA and pressure sensor communication lines. Because SDA is an OPEN-DRAIN output, its line is connected to a pull-up resistor of 10 kΩ. MISO-PIN is open circuit and CSB-PIN is connected to VDD.

b.JPG [page]

Figure 3 shows the EL (backlight) driving circuit, which uses the SP4403MSOP-8 package. The inductance and capacitance in the circuit diagram can be adjusted according to the size of the EL (backlight) to achieve a balance between power consumption and brightness. The MCU I/O P9.0 controls a switch tube to turn on the positive power supply when needed, and generally keeps it on for about 3 seconds to save power.

c.JPG



3 System software design
The overall software design uses assembly and high-level C language. It includes software modules such as clock display, key function, temperature, altitude, backlight and reminder sound alarm. The initialization program includes MCU, I/O interface status setting, LCD driver, clock, pressure sensor initialization, etc. Normal display is in clock mode, Mode is the function selection key, Set is the key for each specific function setting, and the specific value can be quickly set through the Up and Down keys. El is the backlight button.

d.JPG


When the Mode key is pressed to enter the altitude mode, the default value is the ultra-low power mode. Since the data reading frequency of each mode is different, the high-resolution and high-speed measurement modes can be switched according to the actual situation. The measurement accuracy can be indirectly selected by switching the three data reading frequency modes of the pressure sensor. DRDY-PIN sends a data preparation request interrupt to MCU PB. 0. At this time, Bit5 of the Status register changes to 1, and the registers Datard8 and Datard16 are read to read a total of 19 bits of valid pressure data. The decimal raw data obtained needs to be converted to the pressure unit Pa data value
Pres[Pa]=0.25×Pres[dec] (1)
where Pres[dec] is the decimal raw data. The obtained pressure data is not corrected because the SCP1000-D11 pressure sensor contains temperature compensation. Therefore, the height under the current air pressure can be converted according to formula (2).
e.jpg
When the starting reference position is low, Pa=101.324 kPa is the atmospheric pressure at the standard sea level, and the corresponding pressure height Ha is 0; R is the air gas constant, R=287.052 78 m2/(K·s2); g=9.80 665 m/s2 is the gravity acceleration at the standard sea level; β=-0.006 5 K/m is the vertical temperature change rate Ta=273.16K is the temperature at the standard sea level. Pb is the air pressure at the location. If the true elevation of the reference point is known, Ha can be set directly to avoid the principle error caused by the large fluctuation of the air pressure and temperature at the local sea level at high altitude.
After actual mountaineering tests, the absolute height error can reach ±10 m, and the 240 mA/3 V button battery can be used for at least one year.

Keywords:MCU Reference address:Design of air pressure altimeter based on MCU

Previous article:MCU keyboard C program
Next article:Application of magnetoresistive sensors in robot toys

Recommended ReadingLatest update time:2024-11-16 15:49

Audio-enabled applications based on simple 8-bit MCUs
Audio capture and playback is becoming a necessity for many microcontroller (MCU)-based applications. However, the range of audio support in terms of fidelity and codecs is very wide. You can host an audio-enabled application using a platform based on a simple 8-bit MCU, but high-quality audio may require a digital
[Embedded]
Audio-enabled applications based on simple 8-bit MCUs
C51 MCU - Infrared Remote Control Driver
This article is a summary of the study notes for the HC6800-EM3 V2.2 development board. The pin package of the infrared receiver used in this article is as shown below: Driver function encapsulation Disclaimer: Please write a matching delay function based on the crystal oscillator. IrReceive.h file #ifndef __IRREC
[Microcontroller]
C51 MCU - Infrared Remote Control Driver
AVR microcontroller drives passive buzzer
Internal 1 M crystal. Timer implementation, periodic signal drives passive buzzer, these experiments are based on the CTC mode of the timer, the frequency signal is generated by hardware. The program implements a single frequency periodic prompt tone. The program uses a single task mode and software dela
[Microcontroller]
AVR MCU controls RTL8019AS to implement Ethernet interface design
Introduction: This article introduces a method of using AVR microcontroller to realize Ethernet interface circuit, which has few hardware circuits, simple structure and easy use. With the rapid development of the Internet, various household appliances and instruments are gradually becoming networked in order to shar
[Microcontroller]
AVR MCU controls RTL8019AS to implement Ethernet interface design
16-bit external bus expansion and application of 8-bit microcontroller
  With the advancement of electronic design technology and the improvement of chip manufacturing technology, 16-bit and 32-bit microcontrollers are becoming more and more widely used. However, 8-bit microcontrollers still occupy a considerable market share due to their mature manufacturing technology and low price. pr
[Microcontroller]
PIC microcontroller interrupt service routine
There is a special definition method for interrupt service routines: void interrupt ISR(void); the function name "ISR" can be changed to any legal combination of letters or numbers, but its input parameter and return parameter types must be "void", that is, there are no input parameters and return parameters, and ther
[Microcontroller]
Design of digital inclination sensor based on C8051F single chip microcomputer
1 Introduction With the development of market demand and technology, people have put forward higher requirements for the reliability and stability of engineering, machinery, aviation, and navigation equipment, among which attitude measurement is an important indicator. Inclination sensor is a device that measur
[Microcontroller]
Design of digital inclination sensor based on C8051F single chip microcomputer
Multi-machine parallel communication system based on single chip microcomputer
1 Introduction This article introduces a single-chip multi-machine parallel communication system, using 89C51 as the master and multiple 89C2051 as slaves. (89C2051 is a 20-pin 300MIL package with 2K FLASH E2PROM. Except for the lack of two parallel ports, it has all the functions of the MCS-51 ser
[Microcontroller]
Multi-machine parallel communication system based on single chip microcomputer
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

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号