Design of A ZigBee Wireless Sensor Network Node For Aquaculture Monitoring PDF

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

2016 2nd IEEE International Conference on Computer and Communications

Design of a ZigBee Wireless Sensor Network Node for Aquaculture Monitoring

LuXia
Department of mechanical and electrical
LiXiaoman
engineering, Guangzhou City Polytechnic
Department of mechanical and electrical engineering,
Guangzhou, China
Guangzhou City Polytechnic
e-mail: 34377071@qq.com
Guangzhou, China
e-mail: 332092426@qq.com

Abstract-This paper proposes a wireless environmental to detect the culture temperature, salinity, dissolved oxygen
monitoring method for aquaculture based on ZigBee content, PH value, and other environmental factors affecting
technology, and the hardware and software hardware design fish growth, and this serves as an important enabler in
for the monitoring network and sensor nodes is presented. improving the modern culture regulatory level.
According to the architecture of the wireless sensor network An online monitoring system for aquaculture is also
system and the hardware design plan, appropriate devices are
established. During the culture process, overall monitoring of
selected to realize the desired functionality in each sensor node.
the culture object, netting and culture environment, etc. is
The necessary devices includes the RF ZigBee transceiver, the
carried out. The ZigBee-based wireless sensor network
communications module for the ZigBee parent node, the
collects and transmits various parameters including
circuit design for the communications module of the ZigBee
aquaculture temperature, salinity, dissolved oxygen content,
child node, and the fabricated the PCBs. The software design
PH values, etc. This allows for remote parameter acquisition
for the ZigBee node is also carried out, including the
while reducing the amount of cables and guaranteeing
communications software of the ZigBee coordinator device and
the ZigBee terminal equipment, and the control software for
reliable data transmission.
the terminal equipment. The ability of wireless sensor
II. OVERALL SYSTEM DESIGN SCHEME
networks to collect, process, and transmit aquaculture
environmental information reliably serves as solid technical The wireless sensor network for aquaculture monitoring
support for remote real-time monitoring and control consists of three parts: the sensor nodes for aquaculture
applications by combining sensor technology and ZigBee monitoring, the server, and the mobile app.
wireless network technology. The aquaculture monitoring sensors transmit the
collected culture environment information data to the ZigBee
Keywords- aquaculture ; ZigBee; nonitoring wireless wireless nodes via the CAN bus, and this data is then
sensor network node
transmitted from the sensor nodes to the primary node on the
PC server via the ZigBee wireless network. Once the server
I. INTRODUCTION monitoring platform receives the data, the mobile monitoring

The large-scale, intensive, and open sea breeding app obtains the aquaculture environmental data by logging in

development of aquaculture has lead to a requirement for to the server. The mobile app can also control the monitoring

more accurate and timely culture control. The entire culture sensor devices via the server.

monitoring process for aquaculture becomes very important,


III. EASE OF USE
and three dimensional monitoring is needed. Since the sites
of aquaculture are far away from the shore, monitoring
A. RF Module Circuit ofthe ZigBee Node
personnel must be present for long periods of time, which
consumes a lot of manpower and material resources. The RF module circuit of the ZigBee node is composed
Additionally, monitoring by manual methods is "imperfect", of a CC2530 wireless MCU, a CC2591 range extender chip,
and may result in data loss. Conventional cable monitoring is a crystal oscillator circuit, and an RF transceiver circuit. To
very inconvenient for the construction and culture ships due enable convenient debugging and communications extension,
to the marine culture environment, which can also easily the RF module circuit and the other circuits are designed
destroy the cable network[I-3]. separately. The RF module circuit is designed on a PCB
The development of wireless transmission and wireless board independently with a header for all 110 pins to realize
sensor network technology can be used to solve the above­ flexible docking of the communication module circuit. The
mentioned problems. This technology has the advantages of schematic ofRF module circuit is shown in Figure I.
low cost, low power consumption, a distributed system, and The CC2530F128 ZigBee chip from Texas Instruments
ad hoc network capabilities. Therefore, this paper presents a (TI) is adopted in this design. This chip is a complete system
monitoring system based on this technology for aquaculture on chip solution based on a 2.4GHz IEEE802.15.4
culture environments. Real-time monitoring is implemented transceiver with ZigBee and RF4CE capabilities that

978-1-4673-9026-2116/$31.00 ©2016 IEEE 2179

Authorized licensed use limited to: SASTRA. Downloaded on February 15,2023 at 14:35:33 UTC from IEEE Xplore. Restrictions apply.
integrates an industry-leading RF transceiver, a standard environmental information data via CAN data bus. The
enhanced 8051 CPU, a 128KB programmable flash memory, terminal devices need MCU control to achieve the necessary
and an 8KB RAM. It has very high anti-interference functions. Considering the generality, scalability, and
performance and receiver sensitivity. The output power can programming convenience of the communication module
be set up to 4.5dBm by the corresponding software, and the backplane for the child node, the STM32F103RCT6 chip
high level of integration and very few external components with the Cortex-M3 kernel from ST Microelectronics is
meets the requirements of the mesh network system. This adopted for this design. Additionally, the CAN bus and the
includes low power consumption, with a operating current of liquid crystal display (LCD) interface are integrated onto the
24mA in receive (RX) mode, and an operating current of same PCB.
29mA with an output power of IdBm in transmission (TX) The ZigBee child node needs a power supply circuit, an
mode. The sleep current is also low, at only OAuA, and the MCU peripheral circuit, a CAN data bus interface circuit, a
device has powerful peripheral functions, including the level conversion circuit, an LCD display interface circuit, a
communication interface which can operate over a serial port, ZigBee chip, an MCU control chip, a simulation debugging
SPI bus, etc[4-6]. interface circuit, and an RF module interface circuit for the
ZigBee node. The MCU with the minimum peripheral
circuits for the ZigBee child node is shown in Figure 2.

T
"IH :t :t :t l
T T T r
4"
·'IH I
.L :t :t l
T r T r
¥

Figure l.Schematic of the RF module circuit

Due to the high wireless signal attenuation caused by the


sea, a transmit power amplifier chip is necessary. The Figure 2.Schematic of the MCU with minimum peripheral circuit for
the ZigBee
selection of the power amplifier chip is based mainly on its
amplification capabilities, its compatibility with the selected
IV. ZToBEE NODE SOFTWARE
ZigBee chip, and its power consumption. The CC2591 chip
made by TI has a high level of integration for 2AGHz RF The software portion of the ZigBee node includes three
systems, and is used as the CC2530 RF front-end chip. The main parts: the ZigBee communication software for the
integrated power amplifier in the CC2591 chip can increase coordinator device, the ZigBee communication software for
the input power to +22dBm, and the low noise amplifier can the terminal device, and the control software for the terminal
increase the sensitivity of the receiver by +6dB. This greatly device.
enhances the communication quality and distance. The A. ZigBee Communication Software for the Coordinator
CC2591 chip has a low power consumption with a quiescent
Device
current of only 100nA, a low transmitter current of 100mA
The coordinator devices serve as the link between the
(when the power supply voltage is 3V and transmit power
upper computer and all of the ZigBee terminal devices in the
equals 20dBm), and a low receiver current of 3AmA in high
entire monitoring management system. It parses the control
gain mode, and only 1.7mA in low gain mode.
or production information received from the ZigBee terminal
B. Communication Module Circuit ofZigBee Parent Node device into transparent data, and transmits them to the upper
The function of the ZigBee parent node is to realize computer through the serial port. It can also encapsulate the
wireless communication with the ZigBee child nodes, and to control or production information received from the upper
display the communication results on the user-friendly computer into ZigBee network protocol data, and send them
interface of the upper computer through the serial port. The to the ZigBee network terminal devices[7].
power supply circuit, the RS232 to USB interface conversion After the ZigBee device is powered on, a series of
circuit, the simulation debugging interface circuit, and the initializations are carried out including the initialization of
RF module interface circuit for the ZigBee node are all the hardware layer, the initialization of the MAC layer, the
necessary. initialization of the NWK layer, the initialization of the ZDO
layer, and the initialization of the OSAL.
C. Communication Module Circuit o/the ZigBee Child Node After completing the initialization of the ZigBee
The function of the ZigBee child node is to realize coordinator device, the personal area network (PAN) is built
wireless communications with the ZigBee parent nodes, and automatically. If this is successful, it allows other devices to
the aquaculture terminal devices can collect the aquaculture access the network. When a terminal device applies to join
the network, the corresponding event will be triggered. At

2180

Authorized licensed use limited to: SASTRA. Downloaded on February 15,2023 at 14:35:33 UTC from IEEE Xplore. Restrictions apply.
the same time, the ZigBee coordinator device can wait for layer. Next, the data service function in the MAC layer is
other terminal devices to join the PAN network. When triggered, and the data is parsed into the format required by
terminal devices join the PAN network successfully, the the NWK layer. Then, the data service function in the NWK
coordinator device enters a trigger state to receive data and to layer is triggered, and the data is parsed into the format
send events. The flow of the ZigBee communication required by the APL layer[S-10]. Finally, the parsed valid
software for the coordinator device is shown in Figure 3. data in the APL layer is passed to the APL layer, and stored
in a data buffer which completes the data analysis.

B. Main Program
The essential part of a control program is the main
program, which is where the program is initiated and the
main functions are realized. After the terminal device is
powered on, a series of initialization processes are carried
out. These initializations mainly include the initialization of
the target board hardware, the peripheral interface
initialization, and the initialization of the related variables.
Then, the program enters an endless loop to continuously
detect which events are triggered. Once an event is triggered,
No the corresponding subprogram is called to implement the
ny devices join the
network? appropriate processing. The main program flow of the
terminal device control software is shown in Figure 4.
Any events are
triggered?

Figure 3.Flow of the ZigBee communication software for the


coordinator device

Receiving and sending data for the ZigBee coordinator


device consists of two aspects. The first is receiving the
control data from the PC through the serial port, i.e.
triggering the events of serial port receiving. Processed by
the OSAL, the customized serial port data format is parsed Figure 4. Main program flow of the terminal device control software.
"
into valid data. After that, the APL layer afStatus_t
C. SPJ Communication Ssubprogram
AF DataRequest(afAddr Type_t *dstAddr, endPointDesc_t
The communication between the STM32F103RCT6 and
*sr�EP, uint16 Cid, uintl6 len, uintS *buf, uintS
" the node's ZigBee RF transceiver is accomplished via an SPI
*transID, uintS options, uintS radius) is called. This
serial port interface, and the volume of the communication
function calls the APS layer to initiate the send function, and
data is large. In order to reduce the CPU burden and make
valid data is encapsulated according to the APS data format.
the execution of the control program more efficient, break
Next, the NWK layer is triggered for the data transmission
mode and DMA mode features are adopted.
task. The NWK layer sending function is called, and the
Writing The SPI communication subprogram needs to
program encapsulates the data according to the NWK layer
first initialize the SPI functionality. The main steps are to set
data format. Then the MAC layer is triggered to initiate the
the pins required by the SPI, and the clock phase and polarity
send function, and the program encapsulates the data
of the SPI communication protocol. This is done by calling
according to the MAC layer data format. Finally, the PRY
the appropriate library functions and moditying the
layer send task is called, and the program encapsulates the
parameters according to the requirements.
data according to the PHY layer data format. The PHY layer
When the SPI serial port interface sends data, it needs to
sets the RF coordinator device to transmit mode, and detects
read the TXE bit in the SPI SR register. When there is data
whether the current channel is in the idle state. When the
in the data register, the TXE bit is O. When all of the data is
detected channel is idle, it initiates the transmission and
transmitted from the data register send buffer to the shift
sends the data to the terminal node.
register, the TXE bit is a 1, and at this point, the data can be
The second aspect of the ZigBee coordinator is to receive
written into the data register.
the PHY layer data from the RF transmitter of the terminal
DMA mode of When the TXE or RXNE bits of the SPI­
devices, which triggers the scheduling mechanism of the
SR register in the SPI interface are equal to 1, the requests
OSAL service task. First, the data service task of the HAL
are transmitted to the corresponding DMA channel. The
layer is initiated and data is parsed into the format required
DMA channel sends a response signal after receiving the
by the MAC layer according to the data format of the PRY
request. The SPI revokes the DMA request signal after

2181

Authorized licensed use limited to: SASTRA. Downloaded on February 15,2023 at 14:35:33 UTC from IEEE Xplore. Restrictions apply.
reception, and the DMA also revokes the response signal. hardware design for the ZigBee RF module node, the parent
This causes the SPI data transfer to start. After fmishing the node communication module, and the child node
data transfer, the DMA ends. communication module was described in detail. The design
of the communication software of the ZigBee node
D. CAN communication subprogram
coordinator device, the communication software of the
The communication between the STM32FI03RCT6 and ZigBee terminal device, and the control software of terminal
the aquaculture monitoring sensor device is achieved via device was also conducted. The ability of wireless sensor
interrupts on the CAN bus. The most important steps in the networks to collect, process, and transmit aquaculture
CAN bus application are the interface configuration, the environmental information reliably serves as solid technical
initialization process, and data transmission and reception. support for remote real-time monitoring and control
The initialization process of the CAN bus application applications by combining sensor technology and ZigBee
includes the CAN unit and packet filter initialization, where wireless network technology.
the baud rate setting is the most important parameter.
The baud rate can be set as follows: ACKNOWLEDGMENT
CAN InitStructure.CAN SJW CAN SJW 1tq; =
The research in this paper was sponsored by Guangzhou
Jump! /1 time unit of re�ynchronization width Higher Education Colleges Science and Technology
CAN_InitStructure.CAN_BSI = CAN_BS1_8tq; / / time Project(project No.l21421312), Guangdong province
period 1 is 8 time units industry university research project(Project No.
CAN_InitStructure.CAN_BS2 = CAN_BS2_7tq; / / time 2013B090600030).
period 2 is 7 time units
CAN_InitStructure.CAN_Prescaler = 9; / / set the time REFERENCES
unit length as 9 [1] Tao Tao.Tong Zhong-hua,Zhang Hui-yi. Depth Analysis of Zig8ee
The STM32F103RCT6 has 14 groups of filters in total, Protocol on Wireless Sensoractuator Network[1]. Energy
and each filter group has two working modes: an identifier Procedia,2011,13
list mode and an identifier mask mode. [2] Li X, Cheng X, Yan K, et al. A monitoring system for vegetable
The STM32F103RCT6 data transfer is realized by greenhouses based on a wireless sensor network [1]. Sensors,
2010,10(10): 8963-8980.
sending and receiving messages. When a message is sent, the
[3] 8alachander, D.,Rao, T. R.,& Mahesh,G. (2013, April). RF
first step is selecting an empty mail-box. Next, the identifier,
propagation investigations in agricultural fields and gardens for
data length, and sent data are set. After this, the request is
wireless sensor communications. In Information & Communication
sent. At this point, the mailbox is no longer empty (the Technologies (lCT), 2013 IEEE Conference on (pp. 755-759). IEEE.
software has no write permission to mailbox registers). After [4] CHEN, W. & WAS SELL, I. J. (2012) Energy-efficient signal
the request is sent, the mail box enters the registration state acquisition in wireless sensor networks: a compressive sensing
and waits until it is the highest priority. Once the mailbox is framework. Wireless Sensor Systems, lET, 2(1), 1-8.
the highest priority, its status becomes the packet of [5] Park D H, Kang8J, ChoKR, et al. A study on greenhouse automatic
predetermined transmission state. When the CAN bus enters control system based on wireless sensor network [J]. Wireless
Personal Communications, 2011, 56(1): 117-130.
the idle mode, the message in the mailbox of the
[6] Duan, Y. E. (2012). Design of agriculture information integration and
predetermined transmission state is sent immediately. After
sharing platform based on cloud computing. In Proceedings of IEEE
the message is sent from the mailbox successfully. it International Conference on Cyber Technology in Automation,
immediately becomes a vacant mailbox. Control,and Intelligent Systems, CYBER (pp. 353-358).
When a message is received, the identifier and the filter [7] Huynh, T. T. ,Dinh-Duc,A. V.,& Tran, C. H. (2013, October). Energy
configured in the identifier list mode are fust compared. If efficient delay-aware routing in multi-tier architecture for wireless
these parameters are matched, the messages are stored in the sensor networks. In Advanced Technologies for Communications
(ATC), 20131nternational Conference on (pp. 603-608). IEEE.
relevant FIFO, and the matched filter serial number is stored
[8] Li,C. M"Nien,C. C.,Liao, J. L. , & Tseng, Y. C. (2012, November).
in the filter matching number. If they do not match, the
Development of wireless sensor module and network for temperature
message identifier and the filter configured in the mask bit monitoring in cold chain logistics. In Wireless Information
mode are compared. If the message identifier does not match Technology and Systems (ICWlTS), 2012 IEEE International
any identifiers in the filter, the message is discarded by the Conference on (pp. 1-4).IEEE.
hardware without any interference to the software. [9] LIN, Y. G. (2012) An Intelligent Monitoring System for Agriculture
8ased on Zigbee Wireless Sensor Networks. Advanced Materials
V. CONCLUSIONS Research, 383(1),4358-4364.
[10] LIN, Y. (2011) Design of Zig8ee wireless sensor networks nodes for
The design of aquaculture wireless sensor network for
agricultural environmental monitoring. Energy Procedia, 11,1483-
data transmission via ZigBee technology was presented. The 1490.

2182

Authorized licensed use limited to: SASTRA. Downloaded on February 15,2023 at 14:35:33 UTC from IEEE Xplore. Restrictions apply.

You might also like