0 Preface
The monitoring of soil temperature in high-cold permafrost areas plays a vital role in the study of the instability mechanism of slopes in permafrost areas, as well as in the disaster prevention and mitigation of modern agricultural production, construction, oil pipelines and other infrastructure. When monitoring the soil temperature in the harsh environment of high-cold permafrost areas, it has long been necessary to collect data manually on site, which is labor-intensive, has a harsh working environment and is inefficient. Some relatively advanced monitoring systems at home and abroad have used the SMS service of the Global System for Mobilecommunication (GSM) operators to achieve ultra-long-distance wireless data transmission and alarm [1]. In order to achieve large-scale, unattended, long-term and multi-point monitoring, this paper provides a soil temperature automatic monitoring system based on GSM technology to meet actual needs, and introduces the construction process in detail. The reliability and practicality of this system were verified by analyzing the data collected at the test points.
1 System Hardware Design
1.1 System Architecture
The system is mainly composed of a single-chip main control board, a GSM module, a data acquisition module, etc., as shown in Figure 1. It has functions such as timing acquisition, data storage, temperature control in the box, power management, ultra-long-distance wireless data transmission, and display.
The microprocessor of the single-chip control board uses the ATmega128L chip of Atmel Company, the GSM module uses the TC35I of Siemens Company of Germany, and the data acquisition module group is composed of AT89C51 and TLV2543 ADC chips.
The single-chip control board integrates DS1302 clock chip, DS18B20 digital temperature sensor, AT45DB161 FLASH storage chip and relay. The control board reserves the interface of LCD1602. After debugging, the display screen can be unplugged to reduce power consumption. The main control chip ATmega128L is a high-performance, low-power 8-bit microprocessor based on RISC structure. The built-in watchdog timer can effectively prevent the program from running away. It has two programmable serial UARTs. ATmega128L communicates with AT89C51 in the data acquisition module in an addressing manner through one of the serial UARTs, and controls one of the multiple data acquisition modules to collect temperature. Its other serial UART communicates with GSM module TC35I, and sends the collected data to the target SIM card number in the form of SMS. The external crystal oscillator of ATmega128L uses 7.372 8 MHz to generate an accurate baud rate of 9 600 b/s.
Since there is no power supply in the wild, the power supply consists of a 12 V battery pack and a solar panel to provide a stable DC voltage for the system.
1.2 Temperature data acquisition circuit
The schematic diagram of the acquisition circuit is shown in Figure 2. The temperature sensor is a Class A precision platinum thermal resistor PT100 with a measurement accuracy of ±0.15 °C [2]. It is packaged with a stainless steel tube and filled with magnesium oxide MgO to protect the platinum thermal resistor. The interface between the shielding wire and the protective cover is treated with waterproof and anti-corrosion treatment.
The measurable range of the platinum thermal resistor PT100 is -200~500℃, while the temperature range of the soil is between -50~50℃. Therefore, the signal conditioning circuit converts the PT100 resistance value within the range of -50~50℃ into a standard current of 4~20 mA for transmission. PT100 uses a three-wire system [3?4] to reduce the influence of wire resistance on the measurement results. However, the three-wire measurement method cannot completely eliminate the influence of wire resistance. Therefore, in practical applications, the signal conditioning circuit should be as close to PT100 as possible to shorten the wire length.
The data acquisition module is composed of AT89C51 and three TLV2543 ADC chips. TLV2543 is a 12-bit 11-channel analog input channel analog-to-digital converter with SPI interface from TI, which has the characteristics of high speed, high precision and low noise. Since AT89C51 does not have SPI interface, it is necessary to use ordinary I/O port to simulate SPI and communicate with TLV2543, and select TLV2543 as 12-bit data output format with high bit first, and perform average processing on the same analog input port after three acquisitions to improve acquisition accuracy.
The data acquisition module has four reserved interfaces: VCC, GND, TX, and RX pins, which can be easily plugged into the microcontroller main control board. The AT89C51 E2PROM in the module can write the device ID through commands, and is connected to the data bus through the serial port. ATmega128L communicates with it in an addressing manner. Each data acquisition module has 33 analog input channels. If energy allows, a large range of soil temperature monitoring can be performed by expanding the data acquisition module on the microcontroller main control board.
1.3 GSM module communication interface circuit design
The commonly used GSM SMS modules in the market include Siemens TC35 series, Wavecome WM02 series, Ericsson DM10/20 series, etc. The functions and usage methods of these modules are not much different. This system uses the German Siemens TC35I GSM SMS module, which has the highest cost-effectiveness among the above SMS modules and has an electronic equipment network access license. TC35I can work in the 900 MHz/1 800 MHz dual band, the power supply voltage is 3.3~4.8 V, the idle current is 25 mA, the transmission current is 300 mA, and the peak current is 2.5 A. The power consumption when working in the GSM1800 frequency band is 1 W, the automatic baud rate range is 1.2~115 Kb/s, and it supports short messages in both Text and PDU formats. Restart and fault recovery can be achieved through AT commands [5.6].
ATmega128L communicates with TC35I SMS module through serial UART, with baud rate of 9 600 b/s, Text SMS mode, and outputs a 200 ms low level through PC1 port to start the module. After the connection is successful, only 4 AT commands are needed to edit the collected data into a Text SMS and send it to the target SIM card number. It should be noted that TC35I has extremely high requirements for power supply voltage stability. It will automatically shut down when the power supply voltage is lower than 3.3 V. At the same time, when the module sends SMS, the power supply voltage drop cannot exceed 0.4 V. The specific connection is shown in Figure 3.
2 Software Design 2.1 System Main Program Structure After the system main program starts, the DS1302, DS18B20, LCD serial port, and port register are initialized and configured, and the time setting and other parameters of the on-chip E2PROM are read. The parameters configured for the two serial UARTs are: 9 600 b/s baud rate, 1 stop bit, no parity check. The system corrects the current DS1302 time and sets the data acquisition time through the setting subroutine. The system time and the set data acquisition time and other information will be displayed on the LCD screen in real time through the display subroutine.
When the system time reaches the set acquisition time, the main program triggers the acquisition subroutine. ATmega128L broadcasts an acquisition device ID to the data bus through the serial port UART0. After receiving the device response, it sends an acquisition command to the bus and receives the data on the bus. After the acquisition is completed, the storage and transmission flags are set to 1, and the storage subroutine and the transmission subroutine are called to store and send data respectively. The system obtains the temperature data of the onboard digital temperature sensor DS18B20 in real time to determine the temperature in the incubator. When it is lower than the set temperature, the heating device will be started to ensure that the components of the system board work within their respective temperature ranges. The program is written using ICCAVR 6.31A software, and the flow chart is shown in Figure 4.
The short message specification used in this system is GSM07.05, and the sending mode is Text mode. The AT commands used to send SMS are: AT+Enter, to determine whether the SMS module is online; AT+CMGF=1, to set the SMS mode to Text mode; AT+CSCA=target SIM card number, to set the target SIM card number; AT+CMGS=SMS content, to load the SMS content to the SMS module. In order to determine whether the SMS is sent successfully, the program monitors the information returned by the TC35I module in each AT command link. If the "OK" character is received, it means success, otherwise repeat the operation. When the operation is repeated more than 20 times, the program will automatically exit this sending and wait for the next sending program to start and send it together.
2.2 Data acquisition equipment program
The microprocessor of the data acquisition device is AT89C51, and the program is written using the software Keil μVision 4. Its flow chart is shown in Figure 5.
After the program starts, the serial port is initialized first, and the serial port interrupt flag is turned on. When the user sets the device ID through the serial port, the system will call the ID setting subroutine and store the ID in the on-chip E2PROM. When the ID broadcast by ATmega128L on the data bus matches the device ID, AT89C51 responds to the data bus through the serial port. After receiving the acquisition command, the chip select of one of the TLV2543 in the device is first pulled low, the acquisition channel is selected, the converted data format is input, and the data is sent to the data bus through the serial port. When the acquisition is completed, a string is sent to the data bus to mark the end of the acquisition and wait for the next acquisition.
2.3 Monitoring system host computer software
The host computer software of the detection system uses the MSComm communication control of Visual Basic 6.0. Users only need to write a small amount of code to complete the serial port communication function with the device [7?9]. The MSComm control is a serial communication Activx control provided by Microsoft, which can send and receive data through the serial port. The host computer software regularly checks whether there are new SMS messages in the SMS module, reads the new SMS messages for processing, and converts them into temperature data to display them in graphical form, as shown in Figure 6. The main interface is divided into a data display panel and a SMS receiving panel. The operation is simple and can display the collected temperature data in real time in different forms, which is convenient for users to analyze the data.
3 Field trials
The experimental site was selected in the Greater Khingan Range, and 104 temperature measurement points were tested. Four data acquisition modules were plugged into the test system microcontroller main control board to reserve enough acquisition channels. Due to the high groundwater level at the site, the sensors and signal conditioning circuits were all packaged in a waterproof form.
The installation steps are as follows:
(1) Drill temperature wells at the predetermined locations. The temperature wells are 500 cm apart, with a diameter of Φ150 cm and a depth of 7 m. Each temperature well has 13 temperature measurement points, for a total of 8 temperature wells.
(2) Insert a galvanized protective pipe with a size of Φ100 mm × 7 000 mm into the temperature measuring well and then bury it;
(3) Dig a working pit with a size of 2 m × 1.5 m × 1.5 m near the temperature measuring well;
(4) Place a waterproof fiberglass barrel with a size of Φ700 mm × 2 000 mm into the working pit and then landfill;
(5) Place the sensor harness into the protective tube in order and seal the tube opening with glass glue;
(6) Install the solar panel near the waterproof fiberglass barrel; (7) After connecting each data cable to the system board, seal each cable hole with glass glue;
(8) Place the system insulation barrel and battery insulation barrel into a waterproof fiberglass barrel;
(9) Dig trenches about 20 cm deep along each wiring harness and bury the wiring harnesses underground.
4 Data Analysis
The system collects data at 5:00 a.m. and 14:00 p.m. every day. The data of August 2012 from the 6# temperature measuring well, 3 m away from the pipeline, was analyzed. Figure 7 is a temperature curve of 5 temperature measuring points within a depth of 2 m underground over time. Figure 8 is a curve of 13 temperature measuring points in the temperature measuring well over a month with depth.
Previous article:Design of control system for excavating robot based on AVR microcontroller
Next article:Single chip microcomputer design scheme for electric vehicle lithium battery protection circuit
- 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
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
- Problems in PCB design
- Please share the installation package of modelsim10.4 or other versions
- ATE1133 audio decoding solution, USB sound card solution, TYPE C audio adapter chip solution
- Baobaobao~~~After the Chinese New Year, what new developments are there in the evaluation industry? Hurry up and take a look at the Evaluation Intelligence Bureau~
- [NUCLEO-L552ZE Review] Small thermometer
- STM3L4R5 driver for hts221 and stts751
- Cytech’s award-winning live broadcast: Let you learn about ADI’s digital health biosensor series live!
- Evaluation Weekly Report 20220406: Germany's PHYTEC's i.MX 8M+ AI board and RTT Renesas high-performance CPK-RA6M4 are here
- Is this post of the study club incomplete? The formula part?
- [NXP Rapid IoT Review] + Review the Bluetooth function and learn how to program the application