| Agriculture is a basic industry in China,and the government has always attached great importance to the development of agriculture,however,urbanization and soil desertification have reduced the arable land area year by year.It is particularly important to increase crop yields through modern technology without increasing the area of cultivated land.Sensors play an important role in modern agriculture,but the rapid development of sensor technology and complex manufacturers make sensor interfaces different and sensors on different platforms incompatible,which greatly increases difficulty and cost of agricultural informatization.In view of this,this paper designs and implements an agricultural Internet of Things sensor system based on ZigBee wireless network and raspberry pie.The system runs steadily and can accurately transmit field data.It can provide enough and accurate environmental data for scientific researchers.First the sensor interface is standardized.At present,most sensors have been divided into I~2C interface,voltage interface and RS485 interface.Because USB technology is quite mature and more convenient than other interfaces,this paper unifies I~2C interface,voltage interface and RS485 interface into USB interface.The raspberry development platform is used as the acquisition node,which is responsible for collecting data from various USB interfaces and collecting and processing them.Second based on the analysis and summary of the ZigBee protocol stack and the CC2530 wireless chip,the terminal node of the wireless sensor system is built,and the coordinator based on the USB interface is constructed by the CC2530 and CH341modules.Then according to the actual situations,the protocol stack is designed to make it more in line with the actual requirements.Finally,the host computer for remote data reception is written in Python,and the coordinator communicates with the host computer by using UART mode based on115200 baud rate.Python’s high portability makes the host computer not limited to a certain system,which lays a foundation for the future cross-platform system development.The wireless sensor system designed in this paper is not only easy to use,but also can re-develop the data obtained by sensors on the raspberry pie platform,which also lays a foundation for the future intelligent sensor nodes development. |