更全的杂志信息网

基于 CC3200 的大棚温湿度无线控制系统设计

更新时间:2016-07-05

0 Introduction

Nowadays, crops planted in greenhouses play an extremely important role in people’s lives. The temperature and humidity (TH) are important standards of greenhouse measurement, which directly affect the growth and yield of cultivated crops. The method of TH measurement by traditional thermometer and hygrometer is inefficient and difficult to control the TH in the greenhouse. Aiming at this problem, a TH monitoring system that can automatically control the TH is designed in this paper, which effectively solves the issues in TH controlling[1,2].

常见解热镇痛药物有盐酸哌替啶等,服用盐酸哌替啶会影响肝功能的检验结果,进而提升人体内的尿糖浓度,该药物通过影响胆总管开口处的相关组织,进而影响医学检验的结果,主要的影响时间为服用药物之后的3~4 h内,24 h之内影响失效。

1 Overall design of temperature and humidity monitoring system

The TH monitoring system mainly consists of digital TH sensor DHT22, FPGA, CC3200, heater, humidifier, air inlet and outlet devices and PC-side composition. The TH signals detected by the DHT22 are received by FPGA through the external input interface circuit, and are displayed on the PC (server mode) through the wireless MCU CC3200(STA mode)[3]. Meanwhile, FPGA takes the relevant measures for the air inlet and outlet devices, heater and humidifier, and improves the surrounding environment for the plants. Thus, a simple TH monitoring system is formed. The overall design block diagram of monitoring system is shown in Fig.1.

Fig.1 Overall design block diagram of TH monitoring system

2 Hardware design

2.1 DHT22 and its external interface circuit

DHT22 is a digital display sensor of measuring the humidity and temperature. It includes one capacitive humidity sensor and one high precision temperature measuring element, connected with a single chip microcomputer. The calibration coefficients are stored in the OPT memory of the microcontroller, and the calibration coefficients are called in the process of processing the detected signals to improve the accuracy of output digital signals[4].

DHT22 is a standard single bus interface with small size, low power consumption, space and resources saving, which makes the system integration more simple and convenient. Moreover, DHT22 has the characteristics of fast response speed, high performance price ratio and strong anti-interference ability. DHT22 has the ultra-long signal transmission distance, which can reach more than 20 m, and combines with CC3200 by wireless communication, so it is the best choice for remote monitoring of greenhouse TH system.

The DHT22 data flow diagram readed by FPGA is shown in Fig.9.

Fig.2 DHT22 external interface circuit diagram

2.2 Single bus communication

The communication mode of sensor DHT22 is single bus, that is, there is only one data line, and the FPGA control bus and the data transmission of sensor are completed by this data line. The data line needs an external pull-up resistor about 5.1 kΩ to ensure that the bus in idle state is in high level, so that the sensor can receive the signal sent by FPGA to start work.

FPGA and DHT22 are master-slave structure, and the FPGA must strictly follow the single bus sequence to call sensor. The user sends the start signal, namely the data bus is pulled down at least 800 μs, then DHT22 sends a response signal from a low power mode to a high speed mode, and outputs TH data of 40 bit from the serial data bus[5]. The data transfer order is high humidity (8 bit), low humidity (8 bit), high temperature (8 bit), low temperature (8 bit), the parity bit (8 bit). Each 40 bit can trigger a collection of information, then DHT22 will automatically turn into sleep mode until the next communication starts[6]. The specific single bus communication timing diagram is shown in Fig.3.

Fig.3 Specific single bus communication timing diagram of DHT22

2.3 FPGA control module

FPGA is the core of greenhouse TH monitoring system, and its function is defined through configuring the logic function of the device and I/O port, FPGA adopts modular design method, and is easy to do timing analysis and search problems. In addition, FPGA has the advantages of programmability, high reliability and integration. The traditional digital circuit system meets the requirements mainly through the circuit board design, but FPGA focuses on the chip, so using FPGA as the core greatly improves the flexibility and efficiency of greenhouse TH monitoring system.

经分析,大海子水库内部收益率11.25%,大于社会折现率8.0%,且效益费用比1.1,初步概算该工程在经济上是合理的。

In this system, FPGA is not only an important component of information transmission and processing, but also plays a certain role in controlling system. Through processing data collected by the TH sensor, FPGA completes the fan and other equipments control and plays an important role in improving the greenhouse living environment. The specific design of control system is shown in Fig.4.

Fig.4 Design of FPGA control module

2.4 Radio frequency peripheral circuit

The communication between FPGA and DHT22 can be completed by the following three steps.

In this design, strawberry growing in greenhouse in winter is as an example to introduce the specific control mode of FPGA. It is necessary to control the TH of the greenhouse by FPGA to ensure the normal development of strawberry plants in different growth stages. The specific control mode is shown in Fig.6.

Fig.5 RF peripheral circuit

3 Software design

3.1 FPGA specific control mode

采用现场实地踏勘方式进行外业核查。指结合岸线类型识别原则,通过将识别的海岸线类型进行实际勘察,对岸线的位置、类型进行核查,定性分析提取海岸线的形态。对内业提取的人工岸线的位置、拐点,进行不少于10%的核查并修改。

Fig.6 FPGA control mode

3.2 FPGA data flow reading

The radio frequency (RF) peripheral circuit of CC3200 is the basic configuration of the wireless communication, and its circuit diagram is shown in Fig.4. Thanks to the high degree integration of CC3200, the structure of the peripheral circuit becomes very simple. The transmitted signal is transmitted through RF_BG pin, 2.4 GHz band pass filter FL1 and impedance matching network, and finally sent out through the antenna[7]. The radio frequency peripheral circuit is shown in Fig.5.

1) DHT22 needs to wait for 2 s to get into the steady state after powered on. Then the sensor starts to measure the TH and records data. At this point, the data line turns to the low power mode, maintains at high level, stays in input state to detect the external signal at any time.

Data format of “0”: time for low level of 50 μs and high level of 26-28 μs[8].

Signal formats of the bit data “0” and “1” are shown in Fig.8.

Data format of “1”: time for low level of 50 μs and high level of 70 μs;

2) The FPGA outputs the starting signal (typically 1 ms) with a hold time no less than 800 μs, and then releases the bus; meanwhile, the data line of the DHT22 becomes as an idle state. After the release of FPGA bus, DHT22 sends a response signal, which is low level of 80 μs output, followed by a high level of 80 us output as the response signal to notify the FPGA to receive data. The signal transmission is shown in Fig.7.

3) Response signal of the sensor makes the FPGA to receive the data, and the data bus outputs 40 bit serially. The FPGA recognizes the 40 bit according to the change time of high and low levels.

Fig.7 Single bus response signal timing diagram

Fig.8 Signal formats of bit data “0” and “1”

DHT22 uses the standard single bus interface which is 3 pin single row pin package, and its external interface circuit is shown in Fig.2.

Effect of indoor humidity on the performance of VRF air conditioning

Fig.9 DHT22 data flow chart readed by FPGA

3.3 CC3200 communication

CC3200 is the hub of information transfer between PC and FPGA, and all data transmission is done by CC3200 through wireless communication. First, CC3200 starts and initializes, connects the wireless router (Router) and establishes communication with the PC. CC3200 is connected with FPGA. The data collected by TH sensor is transmitted to CC3200 through FPGA UART port.

Fig.10 Workflow of CC3200

After that, the signal is sent to PC by Wi-Fi with using the secure TCP/IP protocol, so that the TH information in greenhouse can be obtained at the PC terminal, so the real-time monitoring of TH in greenhouse is realized. The wireless communication characteristic of CC3200 overcomes the obstacle of long-distance communication, and this characteristic is also its advantage in greenhouse. Fig.10 is the workflow of CC3200.

4 Verification of test results

4.1 Data fetch

The 40 bit data collected by DHT22 include 16 bit humidity data, 16 bit temperature data and 8 bit check data. The experimental data are ten times of the actual data, so it is necessary to transform the collected data to the actual value of temperature and humidity in the measured environment. For example, the collected 40 binary data are 00000010 10001000 00000001 00111000 11000011, 00000010 10001000B, which are 648D under decimal system, so the environmental humidity is 64.8%RH; 00000001 00111000B, which is 312D under decimal system, so the temperature is 31.2 ℃, check bit 11000011=00000010+10001000+00000001+00111000 (16 bit humidity data plus 16 bit temperature data), which means the check bit is verified correctly. This data recording method improves the accuracy of the measured data.

自上世纪80年代以来,我国农村经济快速发展,农村金融体系稳步推进。但是,随着城乡经济的不断繁荣,对于资金的需求量每年逐渐提高,资金的多元化需求每日递增;现存的农村金融体系逐步体现出支持乏力的现象,对于城乡经济的协调发展产生不利因素,从而难以适应这种变化和需求,严重制约了农村经济的发展和农民增收,已不能有效保障社会主义新农村建设快速发展,同时一定程度上制约了构建和谐社会。

南川地处重庆南部,辖3个街道、31个乡镇,面积2 602平方公里,人口66.1万人,其中农业人口55.4万人。2011年出栏生猪 61.73万头,禽兔 502万只,肉牛 2.88万头,肉羊 2.72万只,中蜂6.22万群。近年来,南川区畜牧兽医部门强化“免疫、检疫、监测、监管”综合管理措施,确保了无重大动物疫病发生、无肉食品安全事故发生,保障了以生猪为支柱,以南川鸡、金佛山中华蜜蜂、涪陵水牛为特色的南川畜牧产业持续快速发展。南川区连续多年被上级评为兽医工作先进单位,许多创新的管理模式,一直处于全市乃至全国同行业领先水平,并多次代表重庆市接受了农业部领导工作调研和检查。

4.2 Conclusion verification

In the TH monitoring system, when the temperature reaches 25 ℃, the FPGA opens the fan. Fig.11 shows that during the cooling process, data is transmitted by CC3200 and displayed on PC when the distance between DHT22 and FPGA is 24 m.

2)该盘根盒在4.5 MP的压力下能正常运行,适合于有杆泵采油的任何情况,特别对于压力高的长输井、井口偏磨井、含水率高的油井,断液、断杆的油井都有很强的适用性。

Fig.11 PC data

It can be seen from the screenshot that the temperature value drops from 00FA to 00E1, that is, from 25 ℃ to 22.5 ℃, and the humidity value is kept constant, i.e., atmospheric humidity. It is verified that DHT22 can complete the data transmission in long distance, and FPGA can control the system in the absence of monitoring and provide a more suitable growth environment for plant.

5 Conclusion

The design of greenhouse temperature and humidity monitoring system based on CC3200 with digital sensor DHT22, FPGA, CC3200 and PC has the advantages of high measurement accuracy and high monitoring efficiency compared with the traditional temperature and humidity measurement used in traditional greenhouse. Moreover, the system can automatically take corresponding measures according to the change of environment, so that crops can grow in better environment. In addition, the transmission mode of wireless communication can give full play to the advantages of long-distance transmission in this system, and has strong practicability and broad prospects for development[9].

References

[1] Du Y F. nRF905 & DHT11 based wireless temperature & humidity logger. Information Technology, 2012, (1): 193-195.

[2] Du Z N. Implementation method of the greenhouse environment monitoring system based on wireless sensor. Value Engineering, 2014, (34): 242-244.

[3] Tang Z Y,Wang M S, Shu L. Design of remote data acquisition system based on NRF24L01. Automation & Instrumentation, 2011, (4): 44-45.

[4] Lin Z M. Design of a digital hygrometer based on DHT22. Journal of Jiamusi University (Natural Science Edition), 2016, 34(2): 223-225.

[5] Gao Z B. A digital storge temperature and humidity measuring system. Journal of Changzhou Institute of Technology, 2016, 29(5): 35-38.

[6] Liu Z F, Li X J, Lü Y P, et al. Design of RF heating temperature and humidity monitoring system based on STM32F103VBT6. Microcomputer & Its Applications, 2012, 16: 28-31.

[7] Lin T. The research and application of Wi-Fi developing oriented microcontroller CC3200. Suzhou: Soochow University, 2015.

[8] Jiang G Y. Design of remote temperature monitoring system based on ARM NUC 140. Computer Programming Skills & Maintenance, 2014, 20: 97-98.

[9] Chen M J, Xiong S C. Based on the P89LPC932 microcontroller system controlling the temperature and humidity in the greenhouse. Computing Technology and Automation, 2004, (2): 19-21

[10] Tian Z P. Design of remote monitoring system based on CC3200. Beijing: North China University of Technology, 2016.

赵成城, 丁海飞, 刘文怡, 康 曦 (中北大学 电子测试技术重点实验室, 山西 太原 030051)
《Journal of Measurement Science and Instrumentation》2018年第2期文献

服务严谨可靠 7×14小时在线支持 支持宝特邀商家 不满意退款

本站非杂志社官网,上千家国家级期刊、省级期刊、北大核心、南大核心、专业的职称论文发表网站。
职称论文发表、杂志论文发表、期刊征稿、期刊投稿,论文发表指导正规机构。是您首选最可靠,最快速的期刊论文发表网站。
免责声明:本网站部分资源、信息来源于网络,完全免费共享,仅供学习和研究使用,版权和著作权归原作者所有
如有不愿意被转载的情况,请通知我们删除已转载的信息 粤ICP备2023046998号