The automatic weather station consists of meteorological sensors such as air pressure, temperature, humidity, wind direction and speed, rainfall, radiation, etc., as well as data acquisition, processing, and management systems. The automatic weather station has long-term stability issues, and meteorological sensors need to be calibrated regularly to ensure accurate observation data.
Meteorological observation data cannot be interrupted, so it cannot be disassembled and sent to the calibration room for inspection like ordinary measuring instruments. A better method is to use a standard instrument to compare and calibrate directly at the observation site. Therefore, a handheld calibrator is designed, which uses a wireless sensor network to read the observation data of the automatic weather station and the indication of the standard instrument, and calibrate it.
1 System Design and Implementation Principles
This design uses wireless sensor networks, Windows CE operating system, and ARM processor to develop a handheld calibrator for calibrating meteorological element sensors. During calibration, the data of the sensor under test is sent to the coordinator through the wireless sensor network using ZigBee technology, and the coordinator transmits the data to the handheld calibrator. The calibrator calculates the error. If the existing error is greater than the preset error of the corresponding element, it will automatically generate a calibration command and send the calibration value to the sensor until the error is eliminated. The working principle of the entire system is shown in Figure 1 [1].
Figure 1 System working principle
2 System Hardware Design
The hardware functional block diagram of the calibrator is shown in Figure 2. The hardware mainly consists of a data acquisition module based on CC2530 and a hardware platform module with an ARM9 core.
Figure 2 Hardware block diagram of the handheld calibrator
The data acquisition module is mainly composed of CC2530 chip, sensors and peripheral components. It also has the functions of operating system transplantation and data calibration on the hardware platform [2].
2.1 Data acquisition module design
The data acquisition module utilizes the ZigBee wireless sensor network, which is mainly composed of the ZigBee network coordinator node and the ZigBee sensor terminal node. This system uses TI's CC2530 as the wireless sensor network node [3]. CC2530 is a true system-on-chip solution for 2.4GHz IEEE 802.15.4, ZigBee and RF4CE applications. It can build powerful network nodes with very low total material cost.
CC2530 has extremely high receiving sensitivity and anti-interference performance, and only needs a few peripheral components to realize the signal receiving and sending functions[4].
2.2 Hardware Platform Design
This system uses the 32-bit ARM920T RISC processor Samsung S3C2440A, with a main frequency of 400MHz. It uses a 3.5-inch touch true color LCD screen with a resolution of 320×240. The SDRAM uses H57V2562GTR, which has 32 MB of storage space, and the NANDFLASH uses Samsung's K9F2G08ROA. The network coordinator node uses CC2530, which has a low cost and only needs a few peripheral components to work. The connection diagram of S3C2440, CC2530, NAND FLASH, and SDRAM is shown in Figure 3. The hardware system is simple in structure, small in size, fast in computing speed, and can be installed with operating systems such as Windows CE and Linux [5].
Figure 3 System connection diagram
3 Software Design
The calibrator enters the corresponding calibration interface according to the meteorological elements to be calibrated and automatically receives and processes data. If the detection error is greater than the preset error, after confirming the calibration password, it automatically generates a calibration command and sends it wirelessly to the corresponding meteorological sensor.
The system is installed with Windows CE 5.0 operating system. Windows CE is the foundation of Microsoft's embedded and mobile computing platform. It is an open, upgradeable 32-bit embedded operating system with good reliability, high real-time performance, small kernel size, scalability, and powerful communication capabilities. It is widely used in the development of embedded intelligent devices [6]. The calibrator system software consists of two parts: one is serial port communication, which is mainly used for real-time data transmission between the coordinator and the handheld calibrator, and the other is user interface software design and function implementation. Both are written in embedded C# language and use VS 2005's form interface for visual software development. Figure 4 is the system software flow chart.
3.1 Porting of embedded operating system Windows CE.NET
After the hardware system is completed, the operating system needs to be ported to the hardware platform and the application needs to be developed. Platform Builder is an integrated development environment (IDE) provided for building customized embedded platforms based on the WindowsCE.NET operating system. It provides design, creation, compilation, testing and debugging functions, as well as platform development wizards and BSP development wizards, basic configuration, emulators, Windows CE Test Kit, etc. The specific steps of porting are as follows:
Figure 4 System flow chart[page]
(1) Tailor the operating system, configure each component and modify related configuration files; (2) Develop the driver on the target device and create a customized CE operating system image file; (3) Download the target file to the target device for debugging; (4) After customizing the operating system kernel, export the platform SDK for developing upper-level application software in Visual Studio 2005 [7].
3.2 Development Environment Construction
For Windows CE 5.0 operating system, Visual Studio 2005 based on .NET 2.0 framework is selected for development. This article accesses .NET Compact FrameWork class library to perform graphical window programming, and selects the intelligent device Windows CE 5.0 device application template for development in the development environment.
3.3 Interface Design
In the system interface design, it is mainly divided into the main interface and the calibration interface of each meteorological element. The main interface is mainly used for the selection of meteorological elements. It uses the Menuitem control to create menus. It also provides functions such as editing and tools. In the calibration interface, several controls such as SerialPort, ComboBox, TextBox and Button are mainly used. The Serial-Port control is used to set the serial port and send and receive data; the ComboBox control is used to select nodes and calibration points; the TextBox control is used to store data; and the Button control is used to perform some command operations[8].
3.4 Calibration function design
Enter the calibration page of each meteorological element, first select the node and calibration point, then set the serial port number and baud rate, and open the serial port to automatically receive data. In the serial port application, the text box in the sending area is TxSend, and the text box in the receiving area is named Txrec. Add a SerialPort control in the project, named Port, and the send button is named Send. The following is part of the receiving and sending code [9].
The processing function of the DataReceived event in the Port control is:
Void port_DataReceived (object send,SerialDataReceivedEventArgs){int bytesToRead=port.BytesToRead;byte[]arr=new byte[bytesToRead];port.Read(arr,0,bytesToRead);string str=Encoding,Default,GetString(arr,0 ,bytes-ToRead);txrec.Text+=str;}
The processing function corresponding to the send button click event is:
Void Send_Click(object send,EventArgs e){Byte[]arr=Encoding.Default.GetBytes(txSend.txt);Port.Write(arr,0,arr.Length);}
The coordinator receives the data sent by the meteorological sensor nodes in the sensor network and sends it to the ARM processor through the serial port. The data adopts the data communication format of nine-byte hexadecimal numbers, as shown in Figure 5.
The first byte is the data identifier; the second byte indicates the type of meteorological element, 01 is air pressure, 02 is temperature, 03 is humidity, etc.; the next four consecutive bytes are the sensor data, followed by two check bits; the last byte is the terminator.
Figure 5 Coordinator serial port transmission format
When the coordinator sends a frame of data, the system parses the received data and converts it into a floating point number and displays it in the receiving sensor data area. If the identifier is "D", it indicates the data sent by the sensor. If it is "S", it indicates the data sent by the standard. The sensor data is compared and analyzed with the data of the standard. If the error is greater than the specified threshold, the error data is sent to the sensor through a calibration command. The operating interface of the temperature calibration is shown in Figure 6. The purpose of using the second serial port is to ensure that when the standard is not connected to the wireless sensor network interface, data communication is directly achieved through the serial port. The average value of 5 consecutive temperature detections is used for calibration to ensure calibration accuracy [10].
Figure 6: Real-time operation interface of the software during temperature calibration
3.5 Software Deployment and Migration
After the program is written, perform debugging, target device, transmission protocol and other related settings in the VS 2005 development environment, then connect VS 2005 to the hardware device platform for a handshake, and use the ActiveSync tool provided by Microsoft to deploy the program to the handheld calibrator, and it can run in real time on the target device.
In order to fix the above compiled application into the device so that it can run automatically every time it is turned on, the following steps are taken:
(1) Copy the application Regulation.exe to the FILES directory under the PlatformBuilder 5.0 installation directory.
(2) Create a shortcut file named Regulation.lnk and put it in the FILES directory.
(3) Open the Platform.bib file and add the following content:
Regulation.exe$(_FLATRELEASEDIR)Regulation.exeNK U;Regulation.lnk $(_FLATRELEASEDIR)Regulation.lnkNK U In this way, these two files will be added to the kernel when SYSGEN is executed, and finally they will exist in the system's Windows directory.
(4) Open Platform.dat and add the following content:
Directory("windows desktop"):-File("calibrator.lnk","windowsRegulation.lnk")This will create a shortcut named "calibrator" on the desktop.
(5) Finally, execute the menu Builder → Sysgen to generate NK.bin and NK.nb0. Burn or download them to the ARM system and start it. You will see the "Calibrator" shortcut on the desktop.
4 Conclusion
Through the circuit design and software programming of the system, the design of the handheld calibrator was completed. The handheld calibrator can conveniently perform real-time calibration of meteorological elements such as temperature, humidity, and air pressure at the site of the wireless sensor network automatic weather station. It is easy to use and low cost. Through improvement and perfection, the system can be applied to the calibration of the actual Internet of Things automatic weather station.
Previous article:Introduction to Audio Analyzer Measurement Issues
Next article:Analysis of the Differences between EMC Receivers and Spectrum Analyzers
Recommended ReadingLatest update time:2024-11-16 23:53
- Popular Resources
- Popular amplifiers
- Wireless Sensor Network Technology and Applications (Edited by Mou Si, Yin Hong, and Su Xing)
- Detailed explanation and engineering practice of unmanned monitoring technology (Xie Jianbin, Li Peiqin, Yan Wei, Liu Tong, Lin Chenglong, Hong Quanyi, Zhou Hongfei, Cui Yibing)
- Introduction to Wireless Sensor Networks (Edited by Ma Sasa et al.)
- Introduction to the Internet of Things (Liu Yunhao)
- Keysight Technologies Helps Samsung Electronics Successfully Validate FiRa® 2.0 Safe Distance Measurement Test Case
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- Seizing the Opportunities in the Chinese Application Market: NI's Challenges and Answers
- Tektronix Launches Breakthrough Power Measurement Tools to Accelerate Innovation as Global Electrification Accelerates
- Not all oscilloscopes are created equal: Why ADCs and low noise floor matter
- Enable TekHSI high-speed interface function to accelerate the remote transmission of waveform data
- How to measure the quality of soft start thyristor
- How to use a multimeter to judge whether a soft starter is good or bad
- What are the advantages and disadvantages of non-contact temperature sensors?
- 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
- Motorola to buy Siemens Telecom
- LIS25BA bone vibration sensor driver problem
- Driverless Steering System
- E104-BT05-TB Bluetooth module test board + unboxing
- Qorvo Provides USB Fast Charger PMIC for In-Vehicle Mobile Devices
- What are the main items of Bluetooth signal testing?
- [Must-read for engineers] Just three steps to teach you how to quickly amplify the sweep signal!
- Does perfect data communication exist?
- Showing goods + What is shown is not the board - it is the memory
- STM32F103X ulink cannot be set to other troubleshooting