You are on page 1of 4

Application of Communication and Remote Control in PLC Based on ZigBee

Technology
Li Pengfei
College of Electronic and Information
Xi’an Polytechnic University
Xi’an, China
Li6208@163.com
Li Jiakun
College of Electronic and Information
Xi’an Polytechnic University
Xi’an, China
ljk861290@163.com
Abstract—The communications and control of PLC in
industrial site usually adopt fieldbus technology such as the
CAN bus. In PLC communication, the process is that monitor
PC sends some simple communication codes to PLC and then
some PLC feedback status are transmitted to monitor PC
through bus. When the quantity of data transmitted is not
large, PLC’s data communications can adopt ZigBee
technology. On the basis of the concept of short distance
wireless communications technology and its characteristics, the
article discussed a method of wireless digital module in PLC
communications, based on ZigBee technology and 2.4 GHz
wireless RF technology, including hardware and software
design. Experimental results show that data loss phenomenon
of the digital module in wireless data transmission process is
few and transmission has high accuracy, and the results verify
that ZigBee technology is an ideal solution to realize the wireless
network.
Keywords-ZigBee; 2.4GHz; PLC; wireless remote control
I. INTRODUCTION
With the development of IT industry, especially some
embedded controller chip expand a lot of powerful functions,
many researches and related products such as wireless
communication, wireless control, wireless location, wireless
network and mobile connect appear in our life. ZigBee is an
open specification that enables low power consumption, low
cost and low data rate (250kb/s) for short-range wireless
connections between various electronic devices. The ZigBee
standard is built on top of the IEEE 802.15.4 standard. The
IEEE 802.15.4 standard defines the physical and
MAC(Medium Access Control) layer for low-rate wireless
personal area networks. The physical layer supports three
frequency bands with different gross data rates: 2.4
GHz(250Kbps), 915MHz(40Kbps) and 868MHz(20Kbps). It
also supports functionalities for channel selection, link
quality estimation, energy measurement and clear channel
assessment. ZigBee also defines the network layer, the
application layer and the security layer which are used to
form network and ensure security of wireless data
transmission[1]. The ZigBee architecture recognizes two
types of devices RFD (Reduced Function Device) and FFD
(Full Function Device), and can build three kinds of network
topology network, star topology, tree topology and mesh
topology[2]. Only the FFD defines the full ZigBee
functionality and can become a network COORDINATOR.
The RFD has limited resources and does not allow some
advanced functions (e.g. routing). Each ZigBee network only
has a COORDINATOR, which acts as the administrator and
takes care of organization of the network. In the star
topology network, all nodes only can communicate with
COORDINATOR, mutual communication is prohibited. But
in the mesh network, mutual communication is allowed.
Each full functional node has routing function. RFD can
communicate with nearby full functional nodes, in order to
achieve the optimal path of communications. The topology is
shown in Fig.1.
Figure 1. ZigBee ToPology
II. SYSTEMSTRUCTURE SCHEME
On the basis of discussion and analysis of the ZigBee and
related technologies, the paper put forward the overall
scheme of the wireless digital module. The structure is
shown in Fig.2.
Figure 2. System Frame
As Fig.2 shows that this design uses the star topological
network structure. The entire system is consisted of two parts
Monitor PC
UART/USB
COORDINATOR
RFD RS485
PLC
Elevator Model
RFD RS485
PLC
Elevator Model
Star ToPology
COORDINATOR
RFD FFD
Tree ToPology Mesh ToPology
2009 International Conference on Computational Intelligence and Security
978-0-7695-3931-7/09 $26.00 © 2009 IEEE
DOI 10.1109/CIS.2009.32
533
which are named COORDINATOR node and RFD nodes.
COORDINATOR node is connected with the PC, which
main function is to form network and send data codes. PC
sends data to COORDINATOR through a serial port, and the
COORDINATOR sends the data to all forms of wireless
nodes. RFD nodes are only as data receivers, its main
function is receiving data codes and judging mark code,
finally it will transmit code to PLC through RS485, which
will control elevator model. In the whole process of wireless
communication, each RFD node will receive code, but not all
RFD nodes will transmit data to PLC. Because each RFD
node in advance set up different mark through internal
programs, so a RFD node will transmit code data to PLC
only when the receiving code and the internal mark code
match successfully. But another RFD nodes, although also
can receive data through wireless but ignore because do not
match mark codes, waiting for the next COORDINATOR
sending. In addition, the expert software is designed to
achieve PC can remote monitoring to the actuator. The
expert system interface is realized by LabVIEW software.
III. DESIGNOF WIRELESS DIGITAL MODULEM
SYSTEM
A. Hardware Design
This design of wireless digital module is based on the
Chipcon company CC2430 chip. The CC2430 comes in
three different versions: CC2430-F32/64/128, with
32/64/128 KB of flash memory respectively. The CC2430 is
a true System-on-Chip (SoC) solution specifically tailored
for IEEE 802.15.4 and ZigBee™ applications. It enables
ZigBee™ nodes to be built with very low total bill-of
material costs. The CC2430 is highly suited for systems
where ultra low power consumption is required. This is
ensured by various operating modes. Short transition times
between operating modes further ensure low power
consumption. The main characteristics of CC2430 chips are
listed:
High performance and low power 8051microcontroller
core;
2.4GHz IEEE 802.15.4 compliant RF transceiver
(industry leading CC2420 radio core);
Very few external components and Wide supply voltage
range (2.0V–3.6V);
CSMA/CA hardware support and AES security
coprocessor[3].
CC2430 is a System-on-Chip, with abundant internal
system resources, so it only needs a little of peripheral
components to realize receive or send signals. Fig.3 shows a
typical application hardware circuit design of CC2430 chip,
which is adopted in the article. CC2430 can be used together
with various types of antennas. A differential antenna like a
dipole would be the easiest to interface not needing a balun
(balanced to un-balanced transformation network).
Figure 3. CC2430 Peripheral
The design of RFD node in system includes CC2430
circuit, converting circuit, and power circuit, as shown in
Fig.4. RFD node's main function is to receive the data sent
from COORDINATOR code, and if the received data match
with the RFD node’s defaults, the received data code will be
sent to the PLC through serial port (I/O Peripheral function).
Due to the communication interface RS485 of PLC and do
not match CC2430 serial interface type, sending data sent to
PLC should be processed by RS485 converting circuit. The
converting circuit includes a MAX3485 chip and a DB9
interface. With a drive input(DI) and a receiver output(RO),
and Driver Enable(DE) and Receiver Enable(RE) pin are
included on the MAX3485.In addition, RO is enabled when
RE is low, DI is enable by bringing DE high. MAX3485
adopts half-duplex mode of communication, so DE and RE
should be enabled effectively that sending data or receiving
data. DE and RE are all connected on the same pin(P1.1) of
CC2430. DI and RO are connected with TX(P0.3) and
RX(P0.2) of CC2430 respectively, as data transmission
channel between CC2430 and PLC. Power supply module
circuit includes AMS1117 chip and external filter
capacitances. AMS1117 output is 3.3V, for CC2430 power
supply. COORDINATOR node circuit is similar to RFD
node’s, also adopts CC2430 typical peripheral circuit. The
difference is that COORDINATOR is connected with PC by
a serial port/USB converter.
1
2
3
4
5
6
7
8
9
10
11
12
CN3
12 HEADER
1
2
3
4
5
6
7
8
9
10
11
12
CN4
12 HEADER
RO
1
RE
2
DE
3
DI
4
VCC
8
B
7
A
6
GND
5
U2MAX485
VIN
3
A
D
J
/G
1
VOUT
2
J1 AMS1117
VCC~5V
C1
10uF
C2
104
VCC~5V
R4
470
D1
LED
R5
470
12
VCC~5V
GND
1
GND
2
DC/P2.2
3
DD/P2.1
4
P2.0
5
SO/P1.7
6
SI/P1.6
7
CLK/P1.5
8
CSN/P1.4
9
P1.3
10
P1.2
11
RST
14
P0.0
15
P0.1
16
P0.2
17
P0.3
18
P0.4
19
P0.5
20
P0.6
21
P0.7
22
VDD
23
GND
24
P1.0
13
P1.1
12
U1
DTD243A
1
6
2
7
3
8
4
9
5
J8
DB9
R9
10K
R11
1K
C11
104
S1
SW-PB
Figure 4. RFD node circuit
534
B. Soft Design
This design of wireless digital module adopt star
topology, program structure are also divided into two parts:
the program of COORDINATOR node and RFD node.
COORDINATOR node program mainly includes parameter
setting of communications between CC2430 and monitor PC,
forming a network and distributing each RFD a unique
network ID, and sending control signal to RFD; RFD node
program includes initialization, joining the network,
receiving function and mark code judging function etc. At
last, if RFD node’s judgement correct, it will transmit the
control signal to PLC. And the program flowchart of
COORDINATOR node and RFD node’s are listed as follow:
Figure 5. Flowchat of COORDINATOR
Figure 6. Flowchat of RFD node
List some important programs and specifications as
follow:
#ifdef COORDINATOR
aplFormNetwork(); //Form a network;
while(aplBusy()){apsFSM();} //Waiting for network
formed successfully;
#else
do
{aplJoinNetwork(); //RFD node join the network;
While(apsBusy()){apsFSM();}
}else
{conPrintROMString(“Network Joined FAILED!
Waiting,then try again”);
my_timer=halGetMACTimer();
while((halMACTimerNowDelta(my_timer()<MSECS_T
O_MACTICK(2*1000)); //Waiting a period;
}
#endif;
void initRfTest(void)
{
UINT32 frequency = 2405000;
//setting frequency as 2.4GHz;
radioInit(frequency, myAddr); //initialization RF;
}
void contionuousMode(void) //sending function;
{
BOOL res;
BYTE sendBuffer[30];
while(1)
res=radioSend(sendBuffer,length,remoteAddr,DO_NOT
_ACK); //RF sending function;
}
void receiveMode(void ) //receivng function
Initialize
Successful
?
Join the network
N
Y
Send joined signal and
wait for receiving data
Correct?
N
Y
Send control signal to PLC
Receive PLC running
status signal and send it
to COORDINATOR
N
Show network ID
and channel number
Send data to RFD
Initialize
Form a new network
Enter wireless monitor status
Exist wireless
signal?
Distribute network ID
to RFD node
Y
Wait for receiving
RFD’s feedback
Send feedback to
monitor PC from
serial port
535
{
BYTE zz[] = "ctr1";
//RFD node’s internal mark codes
BYTE *receiveBuffer;
while(1)
res = radioReceive(&receiveBuffer, &length,
RECEIVE_TIMEOUT, &sender);
//RF receiving function;
memmove(zsz,receiveBuffer,0x04);
//extracting mark codes;
if((res==TRUE)&&(memcmp(zsz,zz,0x04)==0))
// judging mark codes;
UartsendPacket(receiveBuffer,length);
//UART sending data through RS485;
else
{wait(200);
} //if mark codes are incorrect, waiting for a period;
IV. EXPERT SOFTWARE DESIGN
Expert software is an interface on PC which is realized
through LabVIEW programming. It monitors PLC control of
elevator group control model after receiving data code
through wireless RF module. The communications between
PLC and expert software is through the PC/PPI cable, the
interface is shown in Fig.7. Fig.7 shows that the code is
“ctr20011”, which represents No.2 PLC control of elevator
running to the 3rd layer. And the code corresponding to PLC
control program is obtained by PLC programming.
V. CONCLUSION
In this paper introduce in ZigBee technology as a
representative of short-range wireless communications
technology, and the basic network topology structure and
ZigBee protocol stack. On the basis of introduction the paper
discussed a kind of wireless digital module scheme and
implement method based CC2430 which is applicated in
PLC control, including hardware and software design. The
article demonstrated the correctness and feasibility of the
scheme through some corresponding experiments. ZigBee is
an ideal solution when realized wireless communications and
remote control.
REFERENCES
[1] IEEE 802.15.4 Standard Specification,downloadable at
standards.ieee.org/getieee802/.
[2] CC2430 Datasheet, Chipon Product from Texas Instryment.
[3] Callaway,E.H,2004. Wireless Sensor Networks: Architectures and
Protocols.Auerbach Publication,USA,342pp.
[4] Estin,D. “ Wireless sensor networks: application driver for low power
distribute systems”.Low Power Electronics and Design,International
Symposium on 2001,194pp.
[5] Chee-Yee Chong,Kumar,S.P. “Sensor networks:
evolution,opportunities and challenges”.Proceedings of the
IEEE,2003,Vol,1347~1256pp.
[6] Y. Yorozu, M. Hirano, K. Oka, and Y. Tagawa, “Electron
spectroscopy studies on magneto-optical media and plastic substrate
interface,” IEEE Transl. J. Magn. Japan, vol. 2, pp. 740–741, August
1987 [Digests 9th Annual Conf. Magnetics Japan, p. 301, 1982].
Sajdl Ondej, Brada Zdenk, Fiedler Petr, Hynica Ondej, ZigBee
Technology and Device Design, Proceedings of the International
Conference on Networking, International Conference on Systems and
International Conference on Mobile Communications and Learning
Technologies, 2006 IEEE
[7] L. Ruiz-Garcia, P. Barreiro J.I.Robla: Performance of ZigBee-Based
wireless sensor nodes for real-time monitoring of fruit logistics,
Journal of Food Engineering 87, 2008
Expert Software Interface
536