1. PROJECT PRESENTATION
ON
POWERLINE COMMUNICATION USING X10 PROTOCOL
in partial fulfillment of the requirements for the
award of the degree of
Bachelor of Engineering
in
ELECTRICAL AND ELECTRONICS
of
Visvesvaraya Technological University, Belgaum
AJITESH RAJ 1SI09EE004
GAURAV 1SI09EE016
KHAGESH MADHAV 1SI09EE022
MUKUND KUMAR 1SI06EE030
Under the guidance of
H. S. Sridhar, M.Tech
Assistant Professor
Department of Electrical & Electronics Engineering
SIDDAGANGA INSTITUTE OF TECHNOLOGY
TUMKUR-572103
2012-13
6/5/2013 Powerline Communication Using X-10 1
2. Abstract
In the latest generation of home automation systems,
appliances can exchange information by transmitting
data over the domestic mains wiring. As a result there is
no need to install extra control cables and appliances
can be connected to the network simply by plugging
them into the nearest wall socket.
Microcontroller can easily be used in conjunction with X-
10 technology to create home automation applications.
The PIC16F877A can be selected for this application
because of its versatility as a general purpose
microcontroller, its FLASH program memory(for ease of
development), data EEPROM, and ample I/O ports.
2Powerline Communication Using X-106/5/2013
3. Power Line Communication
“Power Line Communications” basically means any
technology that enables data transfer through power lines.
X-10 is a communication protocol designed for sending
signals over 230 VAC wiring.
X-10 uses high frequency bursts timed with zero crossing to
represent digital information.
PIC microcontrollers can easily be used in conjunction with X-
10 technology to create home automation applications
because of the versatility of PICmicro which can be used as a
general purpose microcontroller.
3Powerline Communication Using X-106/5/2013
4. PLC for Home Automation
Power Line Communications for home control applications
applies the modulation of frequency signals in a carrier wave
between 20kHz-200kHz into the household wiring at the
transmitter. This carrier is modulated by digital signals.
The receivers in the system has a specific address and can
be individually commanded by signals transmitted over
household wiring and decoded at the receiver.
The devices can be either plugged into regular power outlets,
or permanently wired in place.
4Powerline Communication Using X-106/5/2013
5. X-10 Protocol
X-10 is a technique based on transmitting a frame of data
preceded by a start code at every zero crossing of 50Hz signal.
Binary data is transmitted by sending burst of high frequency on
50Hz power signal.
A binary one is identified by the presence of a pulse followed by a
binary zero which is identified by the absence of a high frequency
pulse.
For the purpose of redundancy, reliability X-10 protocol designed
for every frame to transmit data twice.
6/5/2013 Powerline Communication Using X-10 5
6. Data Framing In Different Codes
The actual data to be transmitted
is first preceded by a start code
represented as 1 nibble of data
The receivers are designed only
for 6ms duration to receive 1ms
of X-10 data, thus every data
frame begins with at least 6
leading zero crossings.
The data frame is in the form of
device code sent after start code.
6Powerline Communication Using X-106/5/2013
Fig : Start code of data
Fig : Device code of data
7. Contd……
The change of data from
one address to another
address or from one
address to another
command or from one
command to another
command is again followed
by 6 clearing of zero
crossings (i.e “000000”).
The sequence of six
"zero’s" resets the shift
registers. As before, all X-
10 protocol transmitters
send their data frames
twice.
Fig: Frames of transmitted
data
7Powerline Communication Using X-106/5/2013
9. Power Line Communication Modem
PLC Modem is device which is useful to send and receive
serial data over the existing AC mains domestic power lines.
Device Features:
◦ Powered from 5V
◦ Direct interface with microcontroller UART ,Txd, Rxd
pins.
◦ Transmit and Receive serial data at 9600 bps
◦ Data Tx/Rx LEDs
◦ Low Cost & Simple to use
◦ Built in Error Checking
9Powerline Communication Using X-106/5/2013
10. PLC Modem
The module is designed to provide half-duplex
communication over the mains of any voltage up to 250V and
for a frequency of 50Hz or 60Hz.
Normally the module is in receiving mode all the time listening
to incoming communication on the power line.
Once the application gives serial data to transmit on its Rx-IN
pin, it switches over to transmit and transmits the data
through power line. Once transmit process is complete it
switches back to receive mode.
6/5/2013 Powerline Communication Using X-10 10
Fig : Application Diagram of PLC Modem
11. Transfer of Information through PLC Modem
Transmission is based on byte by byte basis. Once one byte
of data is given to module for transmission, it waits for at least
500ms before a new byte is given to module again since the
module waits for zero crossing of AC mains to transfer a bit.
For AC 50Hz system the zero crossing of AC signals
happens every 10ms and modem needs 50 zero crossings to
transmit one byte with error checking data. That is why it
takes 500ms for one byte.
f=50Hz
T=(1/f)=(1/50)=20ms
11Powerline Communication Using X-106/5/2013
12. Interfacing of PLC Modem with PIC MCU
Pin Pin name Details
Rx-In Receive Input. Usually
connected to Tx-D pin
of microcontroller
Input serial data of 5V
logic level.
Tx-Out Transmit output.
Usually connected to
Rx-D pin of
microcontroller
Output serial data of
5V logic level
+5 V Power Supply Regulated 5V input
supply.
Gnd( Vss) Ground Ground in common
with VSS of MCU
Fig: Table showing pin description of PLC
modem 12Powerline Communication Using X-106/5/2013
13. Interfacing MCU to LCD Module
Control Signal Function
E
Causing data/control
state to be latched
Rising Edge = Latches
control state (RS and
R/W)
Falling Edge= Latches
data
RS Register Select Control
1 = LCD in data mode
0 = LCD in command
Mode
R/¯w Read/ Write control
1 = LCD to write data
0 = LCD to read data
6/5/2013 Powerline Communication Using X-10 13
14. Relay Interfacing with MCU
In order to control the lamp module with its own house
and unit address.
Pic
16f877a
Relay
Driver
Relay LOAD
14Powerline Communication Using X-106/5/2013
15. Interfacing of PLC- Relay Driver-Relay with
PIC MCU
A relay is an electromagnetic switch which is used
to switch High Voltage/Current using Low power
circuits.
Relay isolates low power circuits from high power
circuits. It is activated by energizing a coil
wounded on a soft iron core.
Note :A relay should not be directly connected to a
microcontroller, it needs a driving circuit.
A microcontroller is not able to supply current required for the
working of a relay. The maximum current that a PIC
Microcontroller can source or sink is 25mA while a relay needs
about 50 – 100mA current.
A relay is activated by energizing its coil. Microcontroller may stop
working by the negative voltages produced in the relay due to its
back emf. 15Powerline Communication Using X-106/5/2013
16. Interfacing of PLC- Relay Driver-Relay
with PICmicro (contd…)
16Powerline Communication Using X-106/5/2013
17. Interfacing PLC Relay with PIC
microcontroller using IC2003
If more relays are used,
using transistors will be
difficult. In these cases
you may use ULN2003.
These are ICs consisting
of High Voltage High
Current Darlington
transistor arrays.
When using these driver
ICs we don’t need to
connect freewheeling
diode as they have built
in clamp diodes.
Fig: Relay interfacing with PIC
MCU through ULN 2003
17Powerline Communication Using X-106/5/2013
20. Algorithm for Transmitter
STEP 01: Do the basic initialization of microcontroller ports, LCD and
UART.
STEP 02: Check whether the status of pin connected to house switch1.
STEP 03: If status of the house switch1 is high, check the status of
device switch1.
STEP 04: If the status of the device switch1 is high, send 1 to UART.
STEP 05: If the status of the device switch1 is low, send 2 to UART.
STEP 06: Check the status of the device switch2.
STEP 07: If the status of the device switch1 is high, send 3 to UART.
STEP 08: If the status of the device switch1 is low, send 4 to UART.
20Powerline Communication Using X-106/5/2013
21. Algorithm for Transmitter
(contd..)
STEP 09: Check whether the status of pin connected to house
switch2.
STEP 10: If status of the house switch2 is high, check the status
of device switch2.
STEP 11: If the status of the device switch1 is high, send 5 to
UART.
STEP 12: If the status of the device switch1 is low, send 6 to
UART.
STEP 13: Check the status of the device switch2.
STEP 14: If the status of the device switch1 is high, send 7 to
UART.
21Powerline Communication Using X-106/5/2013
24. Algorithm for Transmitter
STEP 01: Do the basic initialization of first microcontroller1
ports, and UART.
STEP 02: Check Rx data pin connected to the Tx of the power
line communication module.
STEP 03: If the data received is 1, send signal to the pin
connected to the bulb to turn on.
STEP 04: If the data received is 2, send signal to the pin
connected to the bulb to turn off
STEP 05: If the data received is 1, send signal to the pin
connected to the fan to turn on.
STEP 06: If the data received is 1, send signal to the pin
connected to the fan to turn off.
24Powerline Communication Using X-106/5/2013
25. Algorithm for Transmitter
(contd..)
STEP 07: Do the basic initialization of second microcontroller
ports, and UART.
STEP 08: Check Rx data pin connected to the Tx of the power
line communication module
STEP 09: If the data received is 1, send signal to the pin
connected to the bulb to turn on.
STEP 10: If the data received is 2, send signal to the pin
connected to the bulb to turn off.
STEP 11: If the data received is 1, send signal to the pin
connected to the fan to turn on.
STEP 12: If the data received is 1, send signal to the pin
connected to the fan to turn off.
25Powerline Communication Using X-106/5/2013
27. Result :
Range of transmission : 100m of power line cable.
Time taken for switching on : 1 to 3 sec (approximately)
Baud rate : 9600
Program memory used : 5 Kilobyte
Total number relay drivers : 2 (1 for each home)
Total numbers of channels : 2 channels (each driving a
bulb and fan)
27Powerline Communication Using X-106/5/2013
28. Contd:
Crystal Frequency of PIC : 20Mhz
Port used for LCD interfacing : Port D
Frequency of PLC-Modem : 115kHz
HOME DEVICE STATUS CODE
House 1
BULB
ON 00000001
OFF 00000010
FAN
ON 00000011
OFF 00000100
House 2
BULB
ON 00000101
OFF 00000110
FAN
ON 00000111
OFF 00001000
28Powerline Communication Using X-106/5/2013
31. Advantages :
Simple to install and inexpensive.
Additional wiring is not required.
No interference due to sight obstructions
like wall, etc.
High availability of the power outlets.
31Powerline Communication Using X-106/5/2013
32. Limitations :
• Affected by interference of radio signals
• Difficult to incorporate over long distances
• Time delay in sending signals
• Complex form of communication is not possible.
32Powerline Communication Using X-106/5/2013
34. References :
John Burroughs, X-10 Home Automation Using the
PIC16F877A, Microchip Technology Inc., AN236, 2002.
V Chunduru and N Subramanian, Student Member IEEE, Effects
of Power Lines on the Performance of Home Control
Systems, 2006.
Jan Boer, Chair DS PHY Lucent Technologies WCND
Utrecht, Direct Sequence Spread Spectrum Physical Layer
Specification, March, 1996.
Mark Palmer/Scott Fink Microchip Technology Inc., Interfacing
PICmicro® MCUs to an LCD Module, 1997.
Myke Predko, Programming and customizing
PICmicro, Microcontrollers, McGraw-Hill, LCDs, page
271, reprint 2001.
34Powerline Communication Using X-106/5/2013