Click here to load reader
Upload
christina-reyes
View
8
Download
3
Embed Size (px)
DESCRIPTION
plc
Citation preview
“JAPED” — “rc07-18” — 2008/8/22 — 12:18 — page 331 — #1
J. of Active and Passive Electronic Devices, Vol. 3, pp. 331–340 ©2008 Old City Publishing, Inc.Reprints available directly from the publisher Published by license under the OCP Science imprint,Photocopying permitted by license only a member of the Old City Publishing Group
Design of Power-Line Communication System(PLC) Using a PIC Microcontroller
Q. Al-Zobi1, I. Al-Tawil
2, K. Gharaibeh
3and I. S. Al-Kofahi
1,∗
1Electronics Engineering Department,Hijjawi Faculty for Engineering Technology,Yarmouk University, Irbid-Jordan
2Power Engineering Department, Hijjawi Faculty for Engineering Technology,Yarmouk University, Irbid-Jordan
3Communication Engineering Department, Hijjawi Faculty for Engineering Technology,Yarmouk University, Irbid-Jordan
A Power line communication (PLC) system suitable for power meter read-ing is presented. A PLC transmitter, receiver and interfacing circuit aredesigned, fabricated and tested. Experimental results of digital data trans-ferred over 220V/50 Hz power lines are presented. The carrier frequencyused in this work is 140 kHz.
Keywords: Power line communication, utility services, electrical distributednetwork.
1 INTRODUCTION
Power line communication (PLC) is a technology that employs the infrastruc-ture of electrical power distributed system as communication medium. PLCtechnology could provide the consumer with a spectrum of services such asinternet, home entertainment, home automation, and enable the electricity sup-ply authority to efficiently mange their distribution networks in a competitivemanner.
This technique has immediate attraction for meter communication system,since every consumer is connected to the communication network and thatnetwork is owned and controlled by the electricity supply authority. In a meterreading communication system high power signals are transmitted throughthe network, which are then received by all connected meters. This system
∗Corresponding author. E-mail: [email protected]
331
“JAPED” — “rc07-18” — 2008/8/22 — 12:18 — page 332 — #2
332 Q. Al-Zobi et al.
has been extensively implemented in Europe and especially in France [1].PLC systems can also be used to transfer data inside buildings using powerlines discounting the cost of insulating communication cables. A recent sur-vey shows that one third of new broadband customers will choose power linecommunication by 2012 [2]. PLC technology could also let the power dis-tribution companies open lucrative revenue streams by bundling electricitysupply with broadband telecommunication access providing high speed andreliable communication traffic including Internet access [3,4].
PLC technology offers many advantages over other wire line and wirelesscommunication technology that makes PLC efficient and economic to use insome applications. First; PLC uses the existing infrastructure of power linenetworks which means a great savings in wiring. Second; PLC is more securethan wireless, and telephone line communication. Transmitted data within anyhouse, company etc, can not be hacked by anyone out of the sub-network.
On the other hand, there are some difficulties and disadvantages that hinderusing PLC as universal communication system. In addition to the interferenceproblem created the radiation from power lines, PLC systems suffer from thenoise created by loads and devices connected to the power-line network [5]which imposes restrictions on the available bandwidth.
In this paper we present a simple hardware implementation for a PLC sys-tem using a Peripheral Interface Controller (PIC) microcontroller [6] whichprovides data generation and interfacing. The system is suitable for data com-munications within a local power network area, such as remote automaticmeter reading, fire and security alarm control, etc. The system is built usingon-off-keying (OOK) modulation [7] to reduce complexity. The PLC systemis connected to power lines using proper interfacing circuits which are usedto provide electrical isolation and impedance adaptation between the PIC andthe power line network. This means that the system can be implemented usingthe available off-the-shelf components and hence a great reduction in the costof the overall system. The system was tested during many hours of continuousoperation, and it was found that the transmitted signal suffered from smalldistortion levels.
2 PLC SYSTEM
A PLC transmitter should be designed properly to enhance the signal againsta hostile environment. The transmission line medium is considered as a veryharmful environment against digital data. This is because power line transmis-sion environment may contain stray signals in the form of pulses that could benoisy at the receiver side [5]. These pulses may interfere with the transmittedsignals and create an unwanted distortion that disturbs the operation of thesystem. Therefore, base-band transmission of data is inefficient and hence one
“JAPED” — “rc07-18” — 2008/8/22 — 12:18 — page 333 — #3
Design of PLC System Using a PIC Microcontroller 333
Parallel/Serial Modulator InterfacePower
Network
OSC
Data
source
FIGURE 1PLC-transmitter block diagram.
Interface DeModulator Serial/ParallelPower
Network
OSC
Data
sink
FIGURE 2PLC-receiver block diagram.
of the digital modulation techniques needs to be used to obtain immune dataform and to guarantee safe transmission process.
A simple block diagram of a PLC transmitter is shown in Figure 1. A basicPLC transmitter consists of five main sub-stages: a data source, a serial toparallel converter, a carrier frequency oscillator, a digital modulator and aninterfacing circuit. The transmitter function is to modulate the data signal usingone of the digital modulation techniques and then to load it to the power-linenetwork. OOK modulation is usually used because it provides a reliable andyet a simple system. OOK modulation is a special case of ASK (AmplitudeShift Keying) modulation, where no carrier is present during the transmissionof a zero. An interfacing circuit is used to isolate the 220 V/50 Hz from thelow voltage environment.
Figure 2 shows a block diagram of a PLC receiver. A PLC receiver isconnected to the power-line network via an interfacing circuit. A preamplifieris used to compensate for the losses in the power lines. The amplified signalis demodulated to recover the original data, and then passed to a data sink.
3 PLC SYSTEM DESIGN USING PIC
In this paper we use a microcontroller to provide data generation and synchro-nization. The input data to the PLC transmitter is parallel data which may comefrom PC, a DIP switches, etc. A PIC microcontroller is used to read parallelinput data and then convert it into serial data ready for digital modulation. The
“JAPED” — “rc07-18” — 2008/8/22 — 12:18 — page 334 — #4
334 Q. Al-Zobi et al.
FIGURE 3Pin diagram of the PIC-16F87.
Carrier
Frequency
Oscillator
PIC16F876
Micro-
Controller
Level
Converter
Level
Converter
OOK
Modulator
Power
Amplifier
Interfacing
Circuit
FIGURE 4A block diagram of the proposd PLC transmitter.
PIC is also used to enable transmission of data after a certain delay to ensurethat the turns on/off spikes are removed. A pin diagram of a PIC 16F876 isshown in Figure 3.
3.1 PLC transmitterThe proposed PLC transmitter is shown in Figure 4 and consists of the PIC16F876 which is used as a data source and data synchronizer, an OOK mod-ulator, a power amplifier and an interfacing circuit. A level converter (anoperational amplifier which works as a simple comparator) is used to convertdata levels between the PIC and the OOK modulator.
Figure 5 shows a schematic of the proposed transmitter circuit. The inter-facing circuit used in both the transmitter and the receiver is shown inFigure 6.
To minimize the effect of the distortion problem, critical parameter selec-tions have been used based on working experience and best output results.The selected carrier frequency (fc) has to be constant, stable and much higherthan the Data Baud Rate. Therefore, an oscillator was built using LM566CNvoltage controlled oscillator [8,9] to produce a rectangular waveform withfrequency of 140 KHz which is much greater than the used data baud rate
“JAPED” — “rc07-18” — 2008/8/22 — 12:18 — page 335 — #5
Design of PLC System Using a PIC Microcontroller 335
+
+GND
NC
SQR O/P
TRI O/P Input
R1
C1
Vcc
MCLR'/Vpp
RA0/AN0
RA1/AN1
RA2/AN2/Vref-
RA3/AN3/Vref+
RA4/T0CKI
RA5/AN4/SS'
Vss
OSC1/CLKIN
OSC2/CLKOUT
RC0/T1OS0/T1CKI
RC1/T1OSI/CCP2
RC2/CCP1
RC3SCK/SCL RC4/SDI/SDA
RC5/SDO
RC6/TX/CK
RC7/RX/DT
Vss
Vdd
RB0/INT
RB1
RB2
RB3/PGM
RB4
RB5
RB6/PGC
RB7/PGDV5
V5
V5
K18
MHz4
pF22pF22
V12
V12
V12
V12
V12
V12
V12
K10
K.19
K.15K.22
pF470
nF1
K10
PIC16F876
LM566CN
LF347N
LF347N
CD4081B300
W,K 61
300
40071N
Interfacing
Circuit
FIGURE 5PLC transmitter schematic.
Tx
Rx
220V/ 50HzC3
1uF
C21uF
C110nF 11
To the
Preamplifier
FIGURE 6The interfacing circuit.
(500 bit/s). A rectangular waveform was selected because it achieves betterdistortion performance.
The modulated signal is loaded to the power-line by an interfacing circuitwhich consists of an LC resonant circuit after power amplification whichprovides the current level needed to drive the interfacing circuit. The poweramplifier was designed using the C3039 power transistor. The C3039 powertransistor is usually used for high voltage, high speed applications, especiallyin inductive circuits. The interfacing circuit isolates the 220 V/50 Hz from thelow voltage environment of the PLC transmitter. The interfacing circuit is alsoused to suppress the high voltage spike generated by switching.
“JAPED” — “rc07-18” — 2008/8/22 — 12:18 — page 336 — #6
336 Q. Al-Zobi et al.
3.2 PLC receiverIn the proposed PLC receiver, the received signal is first amplified using apreamplifier. Then the amplified signal is entered to the OOK demodulator,which recovers the original data. The received data is then passed to themicrocontroller which converts serial data into parallel data. An interfacingcircuit similar to the interfacing circuit used the transmitter is used to isolate thereceiver from the 220 V/50 Hz environment. Figure 7 shows a block diagramof the proposed PLC receiver and Figure 8 shows a schematic diagram of thereceiver circuit.
Po
werL
ine
Netw
ork
Interfacing
Circuit
OOK
Demodulator
PIC
Micro-
Controller
8-b
itP
ara
llel
da
ta
Serial
data
Received
Signal
FIGURE 7A block diagram of the proposed PLC receiver.
FIGURE 8PLC receiver schematic.
“JAPED” — “rc07-18” — 2008/8/22 — 12:18 — page 337 — #7
Design of PLC System Using a PIC Microcontroller 337
The OOK modulator/demodulator circuits were designed using a basic log-ical AND gates proceeded by level converters used to interface TTL to CMOSof the PIC and the OOK modulator. An operational amplified that operatesas a comparator was used as a level converter. The comparator converts datalevels to other levels where logic HIGH is greater than 8 V and logic LOW isless than 2 V. The carrier signal used in OOK modulation was obtained usingan LM566CN voltage controlled oscillator.
4 IMPLEMENTATION AND PERFORMANCE ANALYSIS
The microcontroller was programmed to read parallel input data on PORT B(from RB0 RB7), then converts it into serial. The PIC then transmits the dataserially via the RS232, (RC6/TX/CK) transmitting pin. The flowchart of theprogram used in PIC16F876 is shown in Figure 9. The microcontroller was
Start
Initialization
Read serial dat
fromRS232 RX pin
Convert data
into parallel
Output parallel on
PORT B
Enable interrupt
Finish
Delay ( 5 second )
Switch relay on
Start
Initialization
Read parallel data
from PORT B
Convert data
into serial
Output serial data
via RS232 XMIT
Delay ( 1 second )
Finish
Delay ( 5 second )
Switch relay on
FIGURE 9Flow chart used to program the PIC-16F876.
“JAPED” — “rc07-18” — 2008/8/22 — 12:18 — page 338 — #8
338 Q. Al-Zobi et al.
programmed to enable transmission of data after a time delay to ensure thatthe spikes generated from switching the circuit on are removed.
The interfacing circuit was tested by measuring the leakage voltage of the220 V/50 Hz signal that can be passed by this circuit. It was found that themaximum leakage signal amplitude was 36 mV which does not cause anyproblem to the electronic components of the transceiver.
The interfacing circuit was tested using three different types of signals;sinusoidal, triangle and rectangular signals to assess the attenuation, distortionand noise performance of the circuit. The transmitted signal was monitoredduring transmission in three points; at the transmitter terminal before enteringthe interfacing circuit, on the power-line, and at the receiver stage. It wasfound that sinusoidal signal suffers from high attenuation levels and hence arectangular waveform needs to be used as a carrier signal.
The frequency response of the preamplifier used in the receiver circuit isshown in Figure 10. It can be seen that low frequencies (50 Hz) are attenuated.
0
10
20
30
40
50
1E-2 1E-1 1E+0 1E+1 1E+2 1E+3 1E+4Frequency (KHz)
Am
plit
ude
(V).
FIGURE 10Frequency response of the preamplifier.
0.000ms 10.00ms 20.00ms 30.00ms 40.00ms 50.00ms 60.00ms 70.00ms 80.00ms 90.00ms 100.0ms
1.000 V
0.750 V
0.500 V
0.250 V
0.000 V
-0.250 V
-0.500 V
-0.750 V
-1.000 V
1 2
1: Input Signal (1V/50Hz)
2: Output Signal (10mV/50Hz)
FIGURE 11Preamplifier input/output waveforms.
“JAPED” — “rc07-18” — 2008/8/22 — 12:18 — page 339 — #9
Design of PLC System Using a PIC Microcontroller 339
FIGURE 12Transmitter PCB.
FIGURE 13Receiver PCB.
The preamplifier was tested with a signal of amplitude of 5 mV at 140 KHz.The input and output signal waveforms were as shown in Figure 11.
The transmitter and receiver circuits were implemented on a PCB as shownin Figures 12 and 13, respectively.
“JAPED” — “rc07-18” — 2008/8/22 — 12:18 — page 340 — #10
340 Q. Al-Zobi et al.
5 CONCLUSION
We have designed a simple and reliable PLC system. The system achieves therequired demands of stability, reliability, and accuracy. The system was testedduring many hours of continuous operation, and it was found that the transmit-ted signal suffered from very low levels of noise and distortion. The systemcan be implemented using off the shelf components and can be used for lowdata rate applications such as meter reading and remote control applications.
REFERENCES
[1] Duval G. Application of power line carrier at Electricite de France,Proc. 1997 Internat.Symp. On Power Line Comms. and its Applications, pp. 76–80.
[2] Dostert K.Telecommunication over the power Distribution Grid Possibilities and Limitations,Proc. 1997 Internet. Symp. on Power Line Comms. and its Applications, pp. 1–9.
[3] Waldec T., Zimmermann M. and Dostert K. Konzepte fur Powerline Kommunikation system.Furkschau 1 (1998), 40–43.
[4] Metcalfe B. Cheap, reliable, powerful net connections may be as close as an electric socket.Info World, Febuary 10, 1997, 44.
[5] http://en.wikipedia.org/wiki/Electromagnetic_interference.
[6] Gardner N.An Introduction to Programming the Microchip PIC in CCS C, 2002.
[7] http://en.wikipedia.org/wiki/On-off keying.
[8] Karris S. T.Electronic Devices and amplifier Circuits. Orchard Publications, 2005.
[9] Winder S.Analog and Digital Filter Design, 2nd edition, Butterworth-Heinemann, 2002.