chp_10.1007_978-981-10-0421-6_8.docx

上传人:a**** 文档编号:2063 上传时间:2017-10-19 格式:DOCX 页数:10 大小:672.23KB
返回 下载 相关 举报
chp_10.1007_978-981-10-0421-6_8.docx_第1页
第1页 / 共10页
chp_10.1007_978-981-10-0421-6_8.docx_第2页
第2页 / 共10页
点击查看更多>>
资源描述

《chp_10.1007_978-981-10-0421-6_8.docx》由会员分享,可在线阅读,更多相关《chp_10.1007_978-981-10-0421-6_8.docx(10页珍藏版)》请在得力文库 - 分享文档赚钱的网站上搜索。

1、Agricultural Data Acquisition and Communication Embedded System Based on MSP430 Hua-Jie Cao1(&), Hao-Dong Liu2, and Ming Liu3 1 School of Information Technology, Southwest Jioatong University, Chengdu 611756, Sichuan, China 2 School of Electrical Engineering, Southwest Jioatong University, Chengdu

2、611756, Sichuan, China 3 School of Information Science and Mathematics, Changzhou University, Changzhou 213164, Jiangsu, China Abstract. Under the background of big data and cloud computing, in order to design a kind of agricultural data collection and communication system, MSP430 is taken as core

3、 controller and processor. DS18B20 as temperature acquisition, DHT11 sensor as humidity data acquisition, BH1750FV1 as light sensor. The collected data will be transmitted through the wireless communi- cation module, and communication with the host computer. The design of the system is divided into

4、hardware design and software design. This system can extend to join the ZigBee or BeiDou communication module, which can be applied to the large-scale intelligent agricultural control. Keywords: Agricultural data acquisition MSP430 Temperature and humidity sensor Wireless communication 1 Introductio

5、n At present, Chinas agricultural production efciency is not high mechanization and information technology is also not high. Due to various reasons, farmland is not easy to management directly 1. With the development of the Internet of things (IoT), the IoT technology will quickly penetrate into eve

6、ry link of agriculture. Temperature, humidity, light intensity and other data are important environmental parameters in agricultural production, especially in greenhouse cultivation, aquaculture and other precision agriculture. They are essential for agricultural production, these parameter will dir

7、ectly affect the quality of agricultural production and agricultural production, especially in the environment changes, if not check and control timely, agricultural production will cause serious damage 2. In many agricultural and even industrial applications, the measurement of process, production

8、and environmental parameters is still a real time monitoring. The purpose of this design is to study the distributed node control and Springer Science+Business Media Singapore 2015 X. Zhang et al. (Eds.): ESTC 2015, CCIS 572, pp. 7786, 2015. DOI: 10.1007/978-981-10-0421-6_8 78 H.-J. Cao et al. commu

9、nication program, to further promote, it can be suitable for large-scale infor- mation agriculture. 2 Overall System Architecture The wireless data acquisition and communication system including three parts, the rst part is the universal application of DS18B20 as the core of the temperature measure-

10、 ment module, the digital sensor DHT11 as the core of the humidity measurement. BH1750FV1 is used for light intensity. In this system, NRF24L01 is selected for the wireless transceiver module. The microcontroller is MSP430, it is mainly responsible for real-time data display, and it can communicate

11、with PC through the USB interface, which can achieve real-time monitoring of temperature, light intensity, humidity and record the results of the measurement. The architecture diagram of this system is shown in Fig. 1. Fig. 1. Architecture diagram of this system 3 Hardware Design of This System The

12、hardware part is composed of MSP430F149 microcontroller, temperature sensor DS18B20 module, humidity sensor DHT11 module, light intensity sensor BH1750FV1 module, NRF24L01 wireless transceiver module and 1602 LCD module. The sender is to complete the measurement of three parameters which is temperat

13、ure, humidity, light intensity, and send them to the LCD for real-time display in the premise of high accuracy. The measurement data will be also send to the receiver. On the receiver, the received data will also display in the PC terminal for real-time monitoring and saving. Agricultural Data Acqui

14、sition and Communication Embedded System 79 The following will highlights the DS18B20 sensor, DHT11 humidity sensor and BH1750FV1 light intensity sensor and other modules. 3.1 Design of Temperature Sensor Circuit Temperature controller has been widely used in metallurgy, textile, chemical, medical a

15、nd many other elds. In this design, the temperature sensor uses DS18B20, which uses the three wire interface, which is a signal bus type device. It has the advantages of miniaturization, low power consumption, strong anti-interference ability, simple inter- face, high performance and so on, which ca

16、n be directly converted to digital signal Fig. 2. Temperature sensor circuit processing. Composed with the traditional method of thermocouple temperature mea- surement, DS18B20 can greatly improve the accuracy of temperature measurement, and its three-wire connection is very convenient. DS18B20 pins

17、 are power pin GND, data signal pin DQ and power supply pin VDD. Its application circuit is shown in Fig. 2. 3.2 Design of Humidity Sensor Circuit DHT11 digital humidity sensor is a kind of serial bidirectional interface, which has the advantages of fast response, strong anti-interference ability an

18、d high cost performance ratio. As shown in Fig. 3, a typical application circuit for the DHT11, if the signal between master and slave length of less than 20 m, a pull-up resistor will be required between data side and VCC. The typical value of the resistor is 4.7 K. When the signal line is more tha

19、n 20 m, the resistor should be adjusted resistance. 3.3 Design of Light Intensity Sensor Circuit BH1750FV1 is a digital intensity sensor integrated module, using two wire serial bus interface. In comparison with the analog device, the BH1750FV1 is more stable, less power consumption, simple hardware

20、 circuit interface. In the software design, it uses IIC protocol, which has a high transission efciency. The sensor adapt the double-wire 80 H.-J. Cao et al. Fig. 3. Typical circuit for DHT11 connection with the microcomputer. The communication between the two is followed by the IIC protocol, and th

21、e microcomputer provides the data transmission ports and simulation sequence. The SCL port and SDA port are respectively connected with the output port clock interface and data interface. As is shown in Fig. 4. Fig. 4. Circuit of BH1750FV1 4 Software Design of This System The software of the whole s

22、ystem is designed by each subroutine, which is composed of temperature measurement module, humidity measurement, light intensity data acquisition program and wireless communication program. After the initialization of Agricultural Data Acquisition and Communication Embedded System 81 the microcomput

23、er, the data of each sub module is collected, the data is transmitted through the wireless module and the other receiver also transmit the received data to the PC terminal. The program design of each sub module are introduced respectively. 4.1 Temperature Acquisition Program DS18B20 requires for a p

24、eriod of time waiting for the internal register to complete the rst numerical prole. The rst step is to set up the temperature register when it is in normal work, set the corresponding to 55. The temperature data is divided into high 8 bit and low 8 bit, working with 12 bit accuracy, the temperature

25、 index value is 0.0625. Above this paper, in the collection function of DS18B20, the data is collected of two bytes circularly, after the acquisition, the high 8 bit will multiply 256 and then add the low 8 bit. In order to overcome the fractional part, we will expand to ten times and then to displa

26、y them in LCD. 4.2 Humidity Acquisition Program The communication between MSP430 and DHT11 is based on signal bus data format, and the time of the master communicate with slave is about 4 ms. The data is 5 byte (40 bit) which is collected once. The rst 2 bytes of the 5 bytes are humidity parameter,

27、then the two bytes are temperature parameter. The actual temperature is consists of the integer part and the fractional part. Humidity parameter is also the same. The last byte of the 5 bytes is the check byte. When the value is equal to the sum of the rst four bytes, the acquisition is not fault. I

28、n this case, the collected data can be used as measurement data. The specic format are as follows (Table 1): Table 1. A sample data of the DHT11 Received data 0010 0001 0000 0000 0011 0000 0000 0000 0101 0001 Data bit High byte of humidity Low byte of humidity High byte of temperature Low byte of te

29、mperature Parity byte Calculation and Verication: If the 0010 0001 + 0000 0000 + 0011 0000 + 0000 0000 = 0101 0001, then the receiving data is collectively. The humidity is: 0010 0001 = 21H = 33 %RH and the temperature is: 0011 0000 = 30H = 48 C. If the received parity does not equal to 01010001, th

30、en the acquisition or data transmission is error. The result of the acquisition should be abandoned, then to recapture. Whats more, the communication protocol between DHT11 and micro- computer can refer to the datasheet. The programs running flow is shown in Fig. 5. 82 H.-J. Cao et al. START INITIAL

31、IZE DHT11 DELAY2S WRITE ORDER ANSWER BACK AND START CONVERSION READ TEMPERATURE N CHECK Y GET RESULT END Fig. 5. Flow of humidity acquisition program 4.3 Optical Intensity Acquisition Program The BH1750FV1 module and the MSP430 adopt the way of double line connection, the communication between them

32、follows the IIC protocol. When initialization the BH1750FV1, rst to send the local machine address to the microcomputer, then read the data from this address, then make a response to the host. At the same time, convert the data to the character and send it to the liquid crystal for display. The prog

33、ram design flow is shown in Fig. 6. 4.4 Wireless Communication Program NRF24L01 module uses the SPI communication interface, and it can connect to the SPI port of the microcomputer. Whats more, it can also uses the I/O port to analog the SPI communication. About the SPI protocol, designers can refer

34、 to the datasheet of NRF24L01. The wireless receiving module needs to congure the communication channel, working mode and so on. After the completion of the initialization, the register CONFIG will come into the receive mode, and the CE is waiting for the arrival of the data packet. In the end, the

35、LCD will display it. Agricultural Data Acquisition and Communication Embedded System 83 ANSWER BACK START DELAY 100mS INITIALIZE BH1750FVI SEND HOST ADDRESS READ ADDRESS NO ACK Y THE LAST ADDRESS? N CONVERT DATA Fig. 6. Optical intensity acquisition program 5 Debug the System After the completion of

36、 the debugging of the various modules, then come into overall debugging. The wireless transceiver module to send the data of light intensity, tem- perature and humidity to another receiver system. The original selection of USB was a way of direct power supply, and it has generated a problem that the

37、 power of the wireless transmission is not enough. When exchange a separate two-way power to supply the receiving module and transmitting module, this problem of the power is not stable can be solved well. The whole system can send and receive more smoothy after changing the circuit of power supply.

38、 To complete two rounds in one second. As is shown in Fig. 7, this system is the successful implementation of the function of data acquisition and transmission. The receiving data of temperature and humidity are specially 27.7and 42 %RH, because of the small delay of the system and the change of the

39、 environmental light, the result of the receiving data is in agreement with the reality. The PC terminal is designed by Studio Visual 2013 that is developed by Microsoft. It is mainly to receive the data from the wireless receiver, and it also can monitor the serial port. Open the serial port and se

40、t some parameters such as baud rate, parity bit 84 H.-J. Cao et al. Fig. 7. Test the system and word length. It also can be used in response to the acquisition. The PC is also can monitor the data from the receiver. The data can be saved at their own discretion or automatically. The interval of data

41、 it can be saved is one minutes. As is shown in Fig. 8, its a test of the system communicates with the host PC. Fig. 8. A test of data transmission Agricultural Data Acquisition and Communication Embedded System 85 6 Data Analysis In comparison with the actual measurement of the actual temperature,

42、humidity and light intensity, this paper collects some data, and the analysis is as follows: From the data in Table 2 can be found that the temperature range of the system is better when the temperature is below 55, and the error is lower than the actual tem- perature at 0.5. When the temperature is

43、 above 55, the temperature error of the system is about 1.5. But to some extent, it can meet the needs of agricultural production. Table 2. Comparison between the measured temperature and actual Actual range of temperature (C) Thermometer indicator System measurement 515 14.3 14.5 1525 20.6 20.1 253

44、5 28.8 28.2 3545 36.5 37.1 4555 48.2 47.8 5565 55.7 57.6 6575 70.5 72.9 More than 75 81.3 83.2 From Table 3, the error of the data from the system and the actual is about 5 %, so the accuracy of the system can not be achieved because of the precision of humidity measurement, the humidity sensor need

45、s to be upgraded, but to a certain extent, it can meet the demands of agricultural production (Table 4). Table 3. Comparision of the humidity and actual under different conditions Environment Humidity Gauge (%RH) System data (%RH) Outdoor (ne) 40 44 Indoor (ventilation) 45 49 Closed dry container 37

46、 31 Air conditioning 71 74 Sprayer action 75 81 Table 4. Light intensity under different circumstances Environment Test (Lx) Outdoor (ne) 356 Indoor (overcase) 126 Outdoor (not strong light) 4652 Outdoor (strong light) 65536 LED illumination (20 cm) 4078 86 H.-J. Cao et al. Through the analysis, the

47、 accuracy is very high, but it can not test strong light, its a limitation. 7 Summary This design can archive the information and transmit three environment factors, such as temperature, humidity and intensity, which is closely related to agricultural production and daily life. This paper mainly int

48、roduces the process of the design. The nal test shows that the whole system can work correctly. In this paper, the data is also analyzed in details. The next step of this system is to add the Zigbee module which can extend to large-scale nodes. At the same time, data can also be transmitted by GPS o

49、r BeiDou satellite. In the end, this system can process and control large-scale agricultural production. References 1. Xiang, Z., Zou, X., Liu, Z., Li, S.: Scheme of FPGA verication for scaler chip design, Huazhong Keji Daxue Xuebao (Ziran Kexue Ban)/J. Huazhong Univ. Sci. Technol. (Natural Science edn), 34(1), pp. 9092 (2006) 2. Viele, M., Shorey, E.E., Dase, C.G., Hoose, K.V. Light, K.H.: A novel approach to fr

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 研究报告 > 论证报告

本站为文档C TO C交易模式,本站只提供存储空间、用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。本站仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知得利文库网,我们立即给予删除!客服QQ:136780468 微信:18945177775 电话:18904686070

工信部备案号:黑ICP备15003705号-8 |  经营许可证:黑B2-20190332号 |   黑公网安备:91230400333293403D

© 2020-2023 www.deliwenku.com 得利文库. All Rights Reserved 黑龙江转换宝科技有限公司 

黑龙江省互联网违法和不良信息举报
举报电话:0468-3380021 邮箱:hgswwxb@163.com