The measurement of meteorological parameters such as temperature, humidity, air pressure, wind speed, wind direction, etc. plays a very important role in daily life, agriculture, fishery, industry, forestry, navigation and other fields. The measurement of meteorological parameters in many areas mostly relies on local weather forecasts. However, the weather forecast covers a wide geographical range and cannot accurately measure the climate in a small area. The cost of building a meteorological station is high and the cost performance is very low. Therefore, it is very necessary to design a miniaturized, portable comprehensive meteorological measuring instrument. In response to the above problems, this paper designs a low-power portable meteorological instrument. The meteorological detection system can effectively measure the temperature, humidity, air pressure, wind speed, wind direction and other meteorological parameters in a small area. The accuracy can meet the requirements of ordinary meteorological measurement. It also has the functions of real-time display, real-time storage, and backtracking query. It has the characteristics of low power consumption, miniaturization, portability, and low cost. It is suitable for meteorological measurement in various small areas and has certain practical value.
1 System design and working principle
As shown in Figure 1, this meteorological measurement system uses the low-power single-chip microcomputer MSP430F149 as the core control component, and is composed of temperature measurement module, humidity measurement module, air pressure measurement module, wind speed measurement module, wind direction measurement module, clock module, as well as E2PROM, LCD display and independent buttons.
利用各个传感器将温度、湿度、气压、风速、风向转化为电信号,通过单片机处理后得到测量数据,各个数据和时钟芯片得到的时间信息一并在液晶上显示,实现气象参数的实时显示。
通过E2PROM和独立按键实现数据的存储和查询——按下存储键,储存当前的时间和数据;按下查询键,查询以前存储的测量数据。同时,还具有自动测量的功能,自动测量时,关闭液晶,测得数据每小时存入E2PROM一次。
2 硬件设计
2.1 MSP430简介
MSP430是TI公司推出的一系列超低功耗微处理器。它的显著特性是具有超低功耗,有5个低功耗模式可供选择,唤醒时间很短,只需6μs,同时还拥有强大的处理力,集成度高,嵌入模块丰富(12位A/D、16位定时器、FLASH等),多用于智能仪表、智能家电、电池供电等便携式设备中。本气象仪采用MSP430系列的MSP430F149单片机为主控芯片,不仅满足了设计的要求,可以直接运用内部集成的12位A/D和16位定时器,减少外围模块,从而提高了系统稳定性。同时还可使单片机进入低功耗模式,有效地减少系统功耗,节约电能。
2.2 温度测量模块
目前常用的温度传感器主要有模拟式和数字式两种。模拟式的温度传感器主要有PT100,它精度高,性能稳定,工作温度在-200~650℃之间,但是由PT100构成的温度测量电路十分复杂,功耗和成本较大,而且普通气象测量对于温度测量的精度要求并不是十分高,所以,本设计选用电路较为简单的数字式温度传感器AD7416。
AD7416 is a multifunctional temperature sensor, which uses a 10-bit successive approximation analog/digital converter. The typical temperature conversion time is 400μs, the resolution can reach 0.25℃, the measurement range is -40~125℃, the minimum power consumption can reach 1.2μW, and the I2C bus is used for data transmission. It also has over-temperature protection and sampling error mechanism. The selection of this sensor not only meets the accuracy requirements, but also has a simple circuit and can achieve low power consumption. The temperature measurement circuit is shown in Figure 2. The lower 3 bits A0, A1, and A2 of the serial bus address are all grounded, and its serial address is 48H; its data pin SDA and clock pin SCL are connected to the microcontroller I/O port with external pull-up resistors, and the control word is written through the I2C bus to control it to measure temperature.
2.3 Humidity measurement module
Humidity sensors are mainly divided into two categories: capacitive and resistive. The most widely used one is the HS1101 capacitive humidity sensor, which has good stability, high accuracy, external protective cover, anti-static, dust-proof, and can resist chlorine, ammonia, etc. The measurable humidity range is 1% to 100% RH, and the accuracy can reach ±2% RH, which meets the requirements of ordinary meteorological measurements. When the relative humidity changes, the relative capacitance of HS1101 changes. The change in the relative capacitance will cause the change in the charge and discharge time. When measuring, the relative humidity can be calculated only based on the charge and discharge frequency.
The humidity measurement circuit is shown in Figure 3. The relative humidity measurement is realized through the 555 multivibrator circuit. HS1101 is connected between pins 2 and 5 of the TLC555 chip as a capacitor variable. Pin 7 is used as a short circuit for resistor R5. The equal capacitance HS1101 is charged to the threshold voltage (about 0.67 V) through R3 and R4, and discharged to the trigger level through R4. Then R4 is short-circuited to the ground through 7. The sensor is charged and discharged by different resistors R5 and R4, forming a charge and discharge cycle and forming a square wave. The square wave frequency is measured by the single-chip microcomputer and converted into humidity according to the conversion relationship of HS1101. [page]
The barometric pressure sensor uses the integrated pressure sensor MPX4115 with temperature compensation capability produced by Motorola, USA. This chip has high reliability, and meets the requirements of economy and applicability. Its output is proportional to the external pressure. The measurement range is 15-115 kPa, and the output voltage range is 0.2-4.8 V. The relationship between the output voltage of MPX4115 and the atmospheric pressure is as follows:
Vo≈Vs(P×0.009-0.095) (1)
Where: Vs is the power supply voltage; P is the atmospheric pressure. The output voltage of MPX4115 is sent to the internal A/D of MSP430 microcontroller. Since the reference voltage of the internal A/D of the microcontroller is 2.5 V, which is less than the maximum output voltage of the pressure sensor, a resistor is used to divide the voltage at the output end of MPX4115. After inputting into the microcontroller, the barometric pressure value is converted according to formula (1). The barometric pressure measurement circuit is shown in Figure 4.
2.5 Wind speed measurement module The
wind speed measurement sensor uses the CS3144 Hall switch integrated circuit, which is a magnetic field sensitive circuit manufactured using semiconductor integrated circuit technology. It consists of a voltage regulator, a Hall voltage generator, a differential amplifier circuit, a Schmitt trigger, a temperature compensation circuit and an open collector output. Its input is the magnetic field induction intensity and its output is a digital voltage signal.
In order to measure the wind speed, a three-cup wind speed assembly is selected. A small magnet is added to the rotating body of the wind cup. The small magnet is small in size, small in mass, and strong in magnet. Its magnetic field is suitable for being received by the Hall sensor, and it is convenient to shield other magnetic fields in the environment. It can also reduce the influence of the mechanical system on the final induction, so as to make the measurement more accurate. The wind speed measurement circuit is shown in Figure 5. The CS3144 receives the magnetic field strength and outputs a digital signal, which is then converted into a pulse by the LM393 and finally transmitted to the I/O port of the single-chip microcomputer. Every time the small magnet rotates a circle, it will output a pulse to the single-chip microcomputer for reception. The single-chip microcomputer counts the number of circles per second and converts it into the current wind speed. The voltage comparator LM393 can also be used to adjust the sensitivity of the Hall element. By adjusting the potentiometer, the comparison voltage at the reverse input terminal changes accordingly. When the comparison voltage becomes low, the input digital signal is very small and a pulse will be output, and the corresponding sensitivity becomes higher, otherwise the sensitivity becomes lower.
2.6 Wind direction measurement module
In order to achieve better measurement results, the boost photoelectric encoder CHA3806 is selected for wind direction measurement. The boost photoelectric encoder generally outputs three pulse signals of A, B, and Z. The Z signal is mainly used for synchronization or zeroing. The A and B signals contain information such as the rotation direction and rotation rate of the object being measured. Its mechanical structure is relatively simple, and the average mechanical life can be more than tens of thousands of hours. It has strong anti-interference ability and high reliability. It has a 600-resolution encoder disk and a measurement range of 0° to 360°, which meets the measurement requirements. A
large wind vane is added to the rotating shaft of the photoelectric encoder. When the wind vane angle changes, the photoelectric encoder will send out two digital pulse signals A and B with a phase difference of 90°. When the angle is forward, A leads B by 90°, and when it is reversed, B leads A by 90°. The number of output digital pulse signals is proportional to the angular displacement. Therefore, the corresponding angular displacement can be calculated by counting the pulse signals. The wind direction measurement circuit is shown in Figure 6.
The output A and B pulses of the photoelectric encoder are connected to the I/O port of the microcontroller. A fixed photoelectric encoder position is selected to face north. Every time it rotates to a position, A sends a pulse to be received by the microcontroller. At this time, the microcontroller will determine whether the B pulse is high or low. If B is high, the photoelectric encoder is forward at this time, and the count is increased by 1; otherwise, the photoelectric encoder is reversed, the count is reduced by 1, and the count is equal to 600. It returns to zero. The same angle less than 0 is subtracted from 599, and the final count value is multiplied by 0.6, so that the wind direction is calculated. In order to intuitively see the wind direction, according to the wind direction representation method, 0° is due north, and every 22.5° is a category, which respectively represents north wind, north northeast wind, northeast wind, east northeast wind, east wind, east southeast wind, southeast wind, south east wind, south wind, south southwest wind, southwest wind, west southwest wind, west wind, west northwest wind, northwest wind, north northwest wind, and the wind type and deflection angle are displayed together on the LCD display.
2.7 Human-machine interface module
Keyboard module: 6 independent buttons are used, corresponding to the 6 functions of observation, query, storage, automatic measurement, up and down. The up and down keys are used to view the measurement values of different periods in the query function. LCD display module: low-power 12864 LCD, 3.3 V power supply, the working current is about 10 mA when the backlight is turned on, and the working current is less than 1 mA when the backlight is turned off. When observing, the current time, temperature, humidity, air pressure, wind speed and wind direction are displayed in real time; when querying, the actual recorded measurement value and measurement time; when measuring automatically, it can be controlled by the single-chip microcomputer to turn off the backlight, reduce power consumption, and achieve low power consumption.
2.8 Other hardware modules
System power module: 3.3 V and 5 V voltage values are used in the circuit. Since it is a portable product, it can be powered by a 5 V lithium battery. After entering the system, the 5 V voltage is obtained through the LM1117 3.3 V to power the MSP430 microcontroller.
Clock module: The real-time clock uses a low-power chip DS1302, which can automatically count seconds, minutes, hours, days, weeks, months, years and leap year compensation, and expand the perpetual calendar function display. It has low power consumption. When powered by 2.5 V, the power consumption is less than 300 nA, and the accuracy is high, meeting the system requirements.
E2PROM module: Due to the large amount of stored data, the AT24C256 memory with large storage space and low cost is selected. This E2PROM has a capacity of 32 KB and is connected to the microcontroller through the I2C bus to realize data storage and reading.
[page]
3 Software Design3.1 Software Process
The software design of the meteorological instrument includes 10 modules, including system initialization, temperature data acquisition, humidity data acquisition, air pressure data acquisition, wind speed data acquisition, wind direction data acquisition, clock, LCD display, storage, and buttons. The main process is shown in Figures 7 and 8.
After the system is initialized, each sensor starts to collect data, the clock chip starts timing, the microcontroller starts processing data, and the LCD starts to display data in real time. When different function buttons are triggered, the system enters the key interrupt and executes functions such as storage and data query.
The data collected by the sensor is interfered by external factors, and it is possible to collect data with large errors. In order to ensure the accuracy of the measurement, the average value of every 10 collected data is taken, and the average value is used as the final measurement data for display and storage to reduce the measurement error.
3.2 Low power design
The biggest advantage of the MSP430 microcontroller is its low power consumption characteristics. The system program is designed in a low power consumption mode. In addition to the necessary device initialization, the rest of the program (keyboard trigger, timer, A/D conversion) is completed in the interrupt. The microcontroller is in the LPM1 low power mode most of the time, and it is only awakened when the interrupt is triggered. This design scheme greatly reduces the system power consumption. In order to further reduce power consumption, when the measurement data is not observed, the system can enter the automatic measurement mode, and the microcontroller controls the LCD to turn off its backlight to reduce power consumption.
4 Comparison and analysis of experimental results
After software and hardware debugging, the system successfully realized the measurement, display, storage and query functions of temperature, humidity, air pressure, wind speed and wind direction. In order to test the accuracy of the meteorological instrument, the data read by the system at 18:45 on January 21, 2013 and 14:45 on January 22, 2013 in Nanjing were compared with the actual weather conditions in Nanjing released by the Central Meteorological Observatory at the same time. The test results are shown in Table 1.
From the comparison results, it can be seen that the temperature, humidity and air pressure of the meteorological instrument designed in this paper are basically consistent with those released by the Central Meteorological Observatory, the wind direction is exactly the same, and the wind speed is slightly different. Since the weather forecast range is very wide, and this meteorological instrument measures the climate in a small area, it is normal for the measured values to have slight differences, which can also explain that in a small area, the measured value of this design is more accurate. The slightly larger difference in wind speed in the comparison is caused by the difference between the measurement range of this meteorological instrument and the measurement range of the weather forecast, and the low wind speed, the small number of turns of the small magnetic steel, the friction between the wind cup and the pillar, and other factors cause low speed resolution. If the wind speed is larger, the measurement will be more accurate. In short, the experimental comparison shows that the accuracy of the meteorological instrument designed in this paper meets the requirements of ordinary meteorological measurement, has good stability, and is suitable for climate measurement in a small area.
5 Conclusion
In view of the current situation that the weather forecast range is too wide and cannot be accurate to a small area; the cost of the meteorological station is too high; and there is a shortage of portable meteorological instruments, a portable meteorological instrument based on the MSP430 low-power microcontroller is designed. The meteorological instrument integrates a variety of meteorological sensors, which can systematically measure meteorological parameters such as temperature, humidity, air pressure, wind speed, wind direction, etc. The accuracy reaches the measurement requirements of ordinary meteorological parameters, and has the functions of data storage and backtracking query. At the same time, the power consumption is very low, and it can be powered by batteries. Ordinary 5 V lithium batteries can work continuously for about 2 days. It is easy to carry and can be adapted to climate forecasts in various small regional environments, and has strong practicality.
Previous article:Software-based and networked Linux-based radar terminal system
Next article:Antenna Pattern Automatic Test System Based on MSP430 Single Chip Microcomputer
Recommended ReadingLatest update time:2024-11-16 19:43
- Popular Resources
- Popular amplifiers
- Analysis and Implementation of MAC Protocol for Wireless Sensor Networks (by Yang Zhijun, Xie Xianjie, and Ding Hongwei)
- Introduction to Internet of Things Engineering 2nd Edition (Gongyi Wu)
- 西门子S7-12001500 PLC SCL语言编程从入门到精通 (北岛李工)
- Modern Motor Control Technology (Wang Chengyuan, Xia Jiakuan, Sun Yibiao)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- TCP/IP Detailed Explanation (Layer 7/Layer 4 Protocol)
- FPGA Selection Strategy.pdf
- Medical device requirements for chip temperature
- Send Chip Coins: #What to do when you encounter problems with Guoxin#, technical support is rubbed on the ground?
- 【RPi PICO】MicroPython firmware with encryption support
- I want to use a 3.3v microcontroller to share power to control a relay, but the microcontroller stops working after grounding.
- Welfare is coming! The recommended chip list for the TI Cup is freshly released!
- Based on RT-Thread open source works show - rice field environmental information monitoring system
- A brief introduction and configuration of 28335 external interrupt
- Analyze the relationship between J-link hardware, firmware, and drivers