powerline communcation for home automation

35
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 24/04/2022 Powerline Communication Using X-10 1

Upload: gaurav-everyones

Post on 01-Nov-2014

2.332 views

Category:

Education


5 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Powerline Communcation For Home Automation

08/04/2023 Powerline Communication Using X-10

1

PROJECT PRESENTATIONON

POWERLINE COMMUNICATION USING X10 PROTOCOLin partial fulfillment of the requirements for the

award of the degree ofBachelor of Engineering

inELECTRICAL AND ELECTRONICS

ofVisvesvaraya Technological University, Belgaum

AJITESH RAJ 1SI09EE004GAURAV 1SI09EE016KHAGESH MADHAV 1SI09EE022MUKUND KUMAR 1SI06EE030

Under the guidance ofH. S. Sridhar, M.Tech

Assistant Professor 

Department of Electrical & Electronics Engineering SIDDAGANGA INSTITUTE OF TECHNOLOGY

TUMKUR-5721032012-13

Page 2: Powerline Communcation For Home Automation

08/04/2023 Powerline Communication Using X-10

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.

Page 3: Powerline Communcation For Home Automation

08/04/2023 Powerline Communication Using X-10

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.

Page 4: Powerline Communcation For Home Automation

08/04/2023 Powerline Communication Using X-10

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.

Page 5: Powerline Communcation For Home Automation

08/04/2023 Powerline Communication Using X-10

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.

Page 6: Powerline Communcation For Home Automation

08/04/2023 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.

Powerline Communication Using X-10

Fig : Start code of data

Fig : Device code of data

Page 7: Powerline Communcation For Home Automation

08/04/2023 Powerline Communication Using X-10

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

Page 8: Powerline Communcation For Home Automation

08/04/2023 Powerline Communication Using X-10

8

Block Diagram :

Page 9: Powerline Communcation For Home Automation

08/04/2023 Powerline Communication Using X-10

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

Page 10: Powerline Communcation For Home Automation

08/04/2023 Powerline Communication Using X-10

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.

Fig : Application Diagram of PLC Modem

Page 11: Powerline Communcation For Home Automation

08/04/2023 Powerline Communication Using X-10

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=50HzT=(1/f)=(1/50)=20ms

Page 12: Powerline Communcation For Home Automation

08/04/2023 Powerline Communication Using X-10

12

Interfacing of PLC Modem with PIC MCU

Pin Pin name DetailsRx-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

Page 13: Powerline Communcation For Home Automation

08/04/2023 Powerline Communication Using X-10

13

Interfacing MCU to LCD Module

Control Signal Function

E

Causing data/control state to be latchedRising 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 control1 = LCD to write data0 = LCD to read data

Page 14: Powerline Communcation For Home Automation

08/04/2023 Powerline Communication Using X-10

14

Relay Interfacing with MCU In order to control the lamp module with its own

house and unit address.

Pic16f877a

Relay Driver Relay LOAD

Page 15: Powerline Communcation For Home Automation

08/04/2023 Powerline Communication Using X-10

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.

Page 16: Powerline Communcation For Home Automation

08/04/2023 Powerline Communication Using X-10

16

Interfacing of PLC- Relay Driver-Relay with PICmicro (contd…)

Page 17: Powerline Communcation For Home Automation

08/04/2023 Powerline Communication Using X-10

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

Page 18: Powerline Communcation For Home Automation

08/04/2023 Powerline Communication Using X-10

18

Circuit connections on Transmitter side

Page 19: Powerline Communcation For Home Automation

08/04/2023 Powerline Communication Using X-10

19

Circuit connections on Receiver side

Page 20: Powerline Communcation For Home Automation

08/04/2023 Powerline Communication Using X-10

20

Algorithm for TransmitterSTEP 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.

Page 21: Powerline Communcation For Home Automation

08/04/2023 Powerline Communication Using X-10

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.

STEP 15: If the status of the device switch1 is low, send 8 to UART.

Page 22: Powerline Communcation For Home Automation

08/04/2023 Powerline Communication Using X-10

22

Flowchart for Transmitter

Page 23: Powerline Communcation For Home Automation

08/04/2023 Powerline Communication Using X-10

23

Flowchart for Transmitter (contd...)

Page 24: Powerline Communcation For Home Automation

08/04/2023 Powerline Communication Using X-10

24

Algorithm for TransmitterSTEP 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 offSTEP 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.

Page 25: Powerline Communcation For Home Automation

08/04/2023 Powerline Communication Using X-10

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.

Page 26: Powerline Communcation For Home Automation

08/04/2023 Powerline Communication Using X-10

26

Flowchart for Transmitter

Page 27: Powerline Communcation For Home Automation

08/04/2023 Powerline Communication Using X-10

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)

Page 28: Powerline Communcation For Home Automation

08/04/2023 Powerline Communication Using X-10

28

Contd:

Crystal Frequency of PIC : 20Mhz Port used for LCD interfacing : Port D Frequency of PLC-Modem : 115kHz

HOME DEVICE STATUS CODE

House 1BULB

ON 00000001OFF 00000010

FANON 00000011OFF 00000100

House 2BULB

ON 00000101OFF 00000110

FANON 00000111OFF 00001000

Page 29: Powerline Communcation For Home Automation

08/04/2023 Powerline Communication Using X-10

29

Transmitter

Page 30: Powerline Communcation For Home Automation

08/04/2023 Powerline Communication Using X-10

30

Receiver

Page 31: Powerline Communcation For Home Automation

08/04/2023 Powerline Communication Using X-10

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.

Page 32: Powerline Communcation For Home Automation

08/04/2023 Powerline Communication Using X-10

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.

Page 33: Powerline Communcation For Home Automation

08/04/2023 Powerline Communication Using X-10

33

Future Scope :

Page 34: Powerline Communcation For Home Automation

08/04/2023 Powerline Communication Using X-10

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.

Page 35: Powerline Communcation For Home Automation

08/04/2023 Powerline Communication Using X-10

35

Thank YOU