Anda di halaman 1dari 6
Email: info@sunrom.com Visit us at http://www.sunrom.com Document: Datasheet Date: 22-Oct-11 Model #: 1187
Email: info@sunrom.com Visit us at http://www.sunrom.com Document: Datasheet Date: 22-Oct-11 Model #: 1187
Email: info@sunrom.com Visit us at http://www.sunrom.com Document: Datasheet Date: 22-Oct-11 Model #: 1187

Visit us at http://www.sunrom.com

Email: info@sunrom.com Visit us at http://www.sunrom.com Document: Datasheet Date: 22-Oct-11 Model #: 1187

Document: Datasheet

Date: 22-Oct-11

Model #: 1187

Product’s Page: www.sunrom.com/p-1064.html

Power Line Communication Modem (PLC)

Power line modem is useful to send and receive serial data over existing AC mains power lines of the building. It has high immunity to electrical noise persistence in the power line and built in error checking so it never gives out corrupt data. The modem is in form of a ready to use circuit module, which is capable of providing 9600 baud rate low rate bi-directional data communication. Due to its small size it can be integrated into and become part of the user’s power line data communication system.

Features

the user’s power line data communication system. Features Transmit and Receive serial data at 9600 bps

Transmit and Receive

serial data at 9600 bps Data Tx/Rx LEDs

Powered from 5V

Low Cost & Simple to

use Built in Error Checking

Direct interface with microcontroller uart txd, rxd pins

Applications

Home Automation

Automatic Meter Reading

Process Control

Heating & Ventilation, Air conditioning Control

Lighting Control

Status Monitoring and Control

Low Speed Data Communication Networks

Intelligent Buildings

Sign and Information Display

Fire and Security Alarm System

Remote Sensor Reading

Data/File Transfer

Fire & Security Alarm System

Power Distribution Management

Reading Data/File Transfer Fire & Security Alarm System Power Distribution Management Back View of Modem

Back View of Modem

Information

The module provides bi-directional half-duplex communication over the mains of any voltage up to 250V AC and for frequency 50hz or 60hz. Half Duplex communication means it can either transmit or receive data at a time but not both at same time. Normally module is in receiving mode all the time listening to incoming communication on the power line. Once your 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. The transmission of data is indicated by Red LED. The reception of data by modem is indicated by Green LED which is on TX- out pin itself. Data communication of the modules is transparent to user’s data terminals and protocol independent, as a result, multiple units can be connected to the mains without affecting the operation of the others. There is no hassle of building interface circuits. Interface to user’s data devices is a simple data-in and data-out serial link.

Transmission is based on byte by byte basis. Once you give one byte to module for transmission, you will have to wait at least 500ms(mili second) 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. For example we want to transmit character “TEST”, then we will have to transmit ‘T’, then wait 500ms, then transmit ‘E’ and wait 500ms, then transmit ‘S’ and wait 500ms, then transmit ‘T’ and wait 500ms. This can be quite slow speed for big data transfer, but the purpose of this module is transfer of small data bytes like sensor readings and remote control for which this speed is ok to implement.

Application Diagram

Customer’s

Device

5V

GND

TXD

RXD

Specs Overview

Sunrom.com

L

PLC Modem

N

Model: 1187

 

AC Power Line

L

N

L

Sunrom.com

N

PLC Modem

 

Model: 1187

5V

GND

TXD

RXD

Customer’s

Device

Embedded ready-to-go Power Line Carrier Modem module with SMT components

Small form factor for easy of system integration

Bi-directional half-duplex data communication over the mains

Applicable to universal mains voltage and frequency up to 250v, 50 - 60 Hz

Protocol independent, data transfer transparent to user's data terminals

High noise immunity and reliable data communication

Simple serial interface to user's data devices of 9600 bps

Built-in on board AC coupling circuit with direct connection to mains

Built-in carrier generation and detection

Multiple units can be connected to the power line of the distribution transformer

TTL level serial interface to user's data devices

Built with industrial grade components for operation under harsh environment

Indicates Transmit and Receive with LEDs

Built in Error Checking so it never gives out corrupt data.

2 Sunrom Technologies

Your Source for Embedded Systems

Visit us at www.sunrom.com

Shock Hazard

It has built-in on board AC isolated coupling circuit, which allows direct and simple connections to mains. Due to isolation on AC part, there is no worry to get shock on the low voltage side when working with it which is shown in blue box below. When AC main line is connected to module do not touch the non insolated part which is shown in red.

Blue Box Isolated Part, Ok to Touch

Red Box AC mains section, Shock Hazard, Do not Touch

Touch Red Box AC mains section, Shock Hazard, Do not Touch Interfacing Pin Details Pin Pin

Interfacing Pin Details

Pin

Pin Name

Details

RX-IN

Receive Input

Input serial data of 5V logic level Usually connected to TXD pin of microcontrollers.

TX-OUT

Transmit Output

Output serial data of 5V logic level Usually connected to RXD pin of microcontrollers.

+5V

Power Supply

Regulated 5V supply input.

GND

Ground

Ground level of power supply. Must be common ground with microcontroller.

Interfacing with microcontroller

with microcontroller. Interfacing with microcontroller You can interface the module with directly microcontroller

You can interface the module with directly microcontroller pins since the level of module is at 5V level. You can use any microcontroller like 8051, AVR, PIC or such. Just configure your microcontroller to communicate at 9600 baud rate.

The TXD pin of MCU will go to RX-IN pin of PLC modem The RXD pin of MCU will go to TX-OUT pin of PLC modem

Ground & +5V Power Supply between PLC modem and MCU should be connected.

This document below has remote control application notes below with source code.

3 Sunrom Technologies

VCC TTL UART INTERFACING U2 C1 AT89S52 100n U4 39 21 PLC MODEM SUNROM#1187 P0.0/AD0
VCC
TTL UART INTERFACING
U2
C1
AT89S52
100n
U4
39
21
PLC MODEM SUNROM#1187
P0.0/AD0
P2.0/A8
38
22
P0.1/AD1
P2.1/A9
37
23
P0.2/AD2
P2.2/A10
36
24
P0.3/AD3
P2.3/A11
35
25
P0.4/AD4
P2.4/A12
34
26
P0.5/AD5
P2.5/A13
33
27
P0.6/AD6
P2.6/A14
32
28
P0.7/AD7
P2.7/A15
1
10
P1.0/T2
P3.0/RXD
2
11
P1.1/T2EX
P3.1/TXD
3
12
P1.2
P3.2/INT0
4
13
VCC
P1.3
P3.3/INT1
5
14
P1.4/SS
P3.4/T0
6
15
P1.5/MOSI
P3.5/T1
7
16
P1.6/MISO
P3.6/WR
8
17
P1.7/SCK
P3.7/RD
31
VCC
EA/VPP
29
PSEN
+
30
ALE/PROG
C8
10uF 16V
9
RST
R1
10K
Y1
11.0592
C9
C10
33p
33p
20
GND
19
40
XTAL1
VCC
18
XTAL2
1
RX-IN
2
TX-OUT
3 4
+5V
GND

Visit us at www.sunrom.com

Your Source for Embedded Systems

Interfacing with RS232

If you wish to interface the module with RS232 level like a PC serial port or any other device you need a level convertor such as MAX232 as shown below.

U5 VCC PLC MODEM SUNROM#1187 C16 P2 100n DB9-CONN-F U6 1 MAX232 6 11 14
U5
VCC
PLC MODEM SUNROM#1187
C16
P2
100n
DB9-CONN-F
U6
1
MAX232
6
11
14
2
T1IN
T1OUT
9
8
7
R2OUT
R2IN
12
13
3
R1OUT
R1IN
10
7
8
T2IN
T2OUT
4
1
4
9
C+
C2+
+
+
VCC
5
C13
C12
10uF 16V
3
5
10uF 16V
C1-
C2-
2
6
V+
V-
+
C15
C14
10uF 16V
10uF 16V
1
RX-IN
2
TX-OUT
3 4
+5V
GND
15
16
GND
VCC
+

RS232 INTERFACING

VCC

You can also use our Max232 Board Model 1104

You can also use our Max232 Board Model 1104 http://www.sunrom.com/p-245.html

Interfacing to USB Port and Powering from USB Port

U7 U8 PLC MODEM SUNROM#1187 USB to Serial Board SUNROM#1151 You can us e our
U7
U8
PLC MODEM SUNROM#1187
USB to Serial Board SUNROM#1151
You can us
e our
USB to Serial Board
Model 1151
USB INTERFACING
http://www.sunrom.com/p-244.html
1
RX-IN
2
TX-OUT
3 4
+5V
GND
1
RX-IN
2
TX-OUT
3
GND
4
+5V

It will appear as virtual serial port on PC to which you can communicate two ways through any software which can transmit / receive by this serial port like hyperterminal or custom made software.

4 Sunrom Technologies

Your Source for Embedded Systems

Visit us at www.sunrom.com

Remote Control Application

To show what the PLC modem is capable of we will see one remote control application. In this application there will be first unit which will be control panel with ON and OFF switch. When ON switch is pressed, character ‘A’ is transmitted, When OFF switch is pressed character ‘B’ is transmitted through PLC modem.

VCC

CONTROL PANEL ON/OFF

U3 C2 AT89S52 100n U9 39 21 PLC MODEM SUNROM#1187 P0.0/AD0 P2.0/A8 38 22 P0.1/AD1
U3
C2
AT89S52
100n
U9
39
21
PLC MODEM SUNROM#1187
P0.0/AD0
P2.0/A8
38
22
P0.1/AD1
P2.1/A9
37
23
P0.2/AD2
P2.2/A10
36
24
P0.3/AD3
P2.3/A11
35
25
P0.4/AD4
P2.4/A12
34
26
P0.5/AD5
P2.5/A13
33
27
P0.6/AD6
P2.6/A14
32
28
P0.7/AD7
P2.7/A15
1
10
P1.0/T2
P3.0/RXD
2
11
P1.1/T2EX
P3.1/TXD
3
12
P1.2
P3.2/INT0
4
13
VCC
P1.3
P3.3/INT1
5
14
P1.4/SS
P3.4/T0
6
15
P1.5/MOSI
P3.5/T1
7
16
P1.6/MISO
P3.6/WR
8
17
P1.7/SCK
P3.7/RD
ON
31
SW1
VCC
EA/VPP
29
SW
PSEN
+
30
ALE/PROG
C17
10uF 16V
9
RST
OFF
R2
10K
SW2
Y2
SW
11.0592
C11
C18
33p
33p
20
GND
19
40
XTAL1
VCC
18
XTAL2
1
RX-IN
2
TX-OUT
3 4
+5V
GND
VCC REMOTE UNIT RELAY U10 C3 AT89S52 100n U11 39 21 PLC MODEM SUNROM#1187 P0.0/AD0
VCC
REMOTE UNIT RELAY
U10
C3
AT89S52
100n
U11
39
21
PLC MODEM SUNROM#1187
P0.0/AD0
P2.0/A8
38
22
P0.1/AD1
P2.1/A9
37
23
P0.2/AD2
P2.2/A10
36
24
P0.3/AD3
P2.3/A11
35
25
P0.4/AD4
P2.4/A12
34
26
P0.5/AD5
P2.5/A13
33
27
P0.6/AD6
P2.6/A14
32
28
P0.7/AD7
P2.7/A15
1
10
P1.0/T2
P3.0/RXD
2
11
P1.1/T2EX
P3.1/TXD
3
12
P1.2
P3.2/INT0
4
13
VCC
P1.3
P3.3/INT1
5
14
P1.4/SS
P3.4/T0
6
15
P1.5/MOSI
P3.5/T1
7
16
VCC
VCC
P1.6/MISO
P3.6/WR
8
17
LS2
P1.7/SCK
P3.7/RD
5V Relay
31
R5
5
VCC
EA/VPP
CN2
29
1K
3
PSEN
+
30
4
ALE/PROG
C20
D3
1
10uF 16V
9
1N4007
2
RST
D4
LED
PBT2
R3
10K
Y3
R4
4K7
Q2
11.0592
C19
C21
BC547
33p
33p
20
GND
19
40
XTAL1
VCC
18
XTAL2
1
RX-IN
2
TX-OUT
3 4
+5V
GND

Your Source for Embedded Systems

Visit us at www.sunrom.com

The receiver side listens to the data through power line modem and switches on or off relay accordingly.

Source Code for this application can be downloaded from link below

The source code is in Keil C51 compiler.

Transmit Code View

The source code is in Keil C51 compiler. Transmit Code View Receive Code View 5 Sunrom

Receive Code View

The source code is in Keil C51 compiler. Transmit Code View Receive Code View 5 Sunrom

5 Sunrom Technologies

Module Dimensions

Module Dimensions 6 Sunrom Technologies Your Source for Embedded Systems Visit us at www.sunrom.com

6 Sunrom Technologies

Your Source for Embedded Systems

Visit us at www.sunrom.com