Sei sulla pagina 1di 32

APPLICATION NOTE

ST7537
POWER LINE MODEM APPLICATION
By Joël HULOUX and Laurent HANUS

SUMMARY Page
I FOREWORD : HOME AUTOMATION CONCEPT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
I.1 HOME AUTOMATION APPLIANCES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
I.2 THE GROWTH OF THE INDUSTRY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
II INTRODUCTION. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
III THE ELECTRICAL NETWORK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
III.1 IMPEDANCE OF POWER LINES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
III.2 NOISE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
III.3 STANDING WAVES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
III.4 TYPICAL CONNECTION LOSS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
IV ST7537 POWER LINE MODEM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
V DEMOBOARD FEATURES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
VI HARDWARE DESCRIPTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
VI.1 ABOUT CENELEC SPECIFICATIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
VI.2 POWER LINE INTERFACE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
VI.2.1 The Line Driver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
VI.2.2 The Line Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
VI.2.3 The Power Line Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
VI.2.4 Performances of the Power Line Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
VI.2.4.1 Output impedance of the power line interface versus the frequency . . . . . . . . . . . . . 9
VI.2.4.2 BER test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
VI.2.4.3 Transmit signal spectrum analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
VI.3 CARRIER DETECT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
VI.4 IMPROVING SENSITIVITY. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
VI.5 COMMUNICATION WITH A RS232C INTERFACE . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
VI.6 DEMOBOARD COMMUNICATING APPLICATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
VI.7 OVERVIEW OF THE ST90E28 MCU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
VI.8 IMPLEMENTATION OF THE ST90E28 MCU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
VI.8.1 Applicative Pin Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
VI.8.2 Power Consumption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
VI.9 POWER SUPPLY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
VI.9.1 Power Supply Features. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
VI.9.2 Power Supply Sizing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
VI.9.3 Using a 2x6 V Secondary Voltage Transformer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
VII PC SOFTWARE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

AN655/0994 1/32
ST7537 - POWER LINE MODEM APPLICATION

VIII TYPICAL APPLICATION : LOAD MANAGEMENT . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24


VIII.1 PROTOCOL DESIGN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
VIII.1.1 Frame Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
VIII.2 USE OF THE ST90E28 RESOURCES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
VIII.2.1 Initialization of ST90E28 Core and On-chip Peripherals . . . . . . . . . . . . . . . . . . . . . . . . . 25
VIII.2.2 Main Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
IX ANNEXES. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
IX.1 ANNEXE A : DEMOBOARD OUTPUT IMPEDANCE . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
IX.2 ANNEXE B : DEMOBOARD SCHEMATICS & LAY OUT . . . . . . . . . . . . . . . . . . . . . . . . 28
X REFERENCES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

I - FOREWORD : controls with preset dimming levels for banks of


HOME AUTOMATION CONCEPT lights. A future subsystem might permit a washing
machine or a dish-washer to request that a water
Kenneth P. Wacks, consultant to the home auto-
heater preheat water when needed or when the
mation industry, has written an article clearly defin-
energy cost is lowest.
ing the concept of home automation. An extract is
- Incorporation of Communications Standard :
given below :
Some of the subsystems mentioned already ex-
"... Over the past six years a new industry called ist. However, the components of each are inter-
"home automation" has been developing. This in- connected using custom-designed technologies
dustry will create the next generation of consumer and custom wiring. Home automation standards
appliances. The primary value added by home will relieve the manufacturer of the need to invent
automation is the integration of products and serv- an ad hoc communications protocol and to pro-
ices for household use. A few small companies are vide wiring for data signals.
marketing home automation systems. Large com- - Diverse Locations :
panies and institutions are exploring this emerging Once communications standards are developed,
industry to determine the market potential. manufacturers will be able to locate components
A communication network in the house will provide of appliances outside the cabinet. Control panels
the infra-structure for linking appliances, sensors, could be placed where convenient for the user,
controllers, and control panels inside the house. not necessarely mounted on the cabinet. Related
This has become feasible by tailoring the commu- appliances, such as clothes washer and a clothes
nications technologies developed for office auto- dryer, could share a control panel so the knobs
mation to the home environment. and dials are consistent and easier to operate.

I.1 - Home Automation Appliances I.2 - The Growth of the Industry


In home automation, the term "appliances" refers
not only to the familiar kitchen, audio/video, and Communications technology and standards play
portable appliances, but also to the components of important roles in forecasting the home automation
industry. However, the development of applications
a heating and cooling system, a security system,
to use these technologies will set the growth rate
and lighting features. Home automation covers a
broad range of products and services intended for that simplify routine activities, spark a desire con-
sumers, or save money.
consumer use. These items are expected to share
some common attributes, among which are : Thus, the growth rate of the home automation
- Emphasis on Subsystems : industry is ultimately determinated by the actions
Most appliances in houses today are self-con- of appliance manufacturers. Key among these de-
tained in metal or plastic cabinets. Each appli- cisions are :
ance operates independently to the others. Each - Adoption of an Emerging Communications
appliance has a different set of user control. Standard :
Appliances in a home automation environment The appliance manufacturers will greatly influ-
are able to exchange data. This allows appliances ence the establishment of a particular communi-
to be grouped into subsystems. Examples range cations standard. They may even force an
from familiar subsystems, such as security and amalgamation of standards from among the cur-
audio/video systems, to sophisticated lighting rent contenders.

2/32
ST7537 - POWER LINE MODEM APPLICATION

- Create New Appliances or Appliances Features : nity "ESPRIT" project on domestic automation.
The development of standard communications A typical household scenario is shown in Figure 1,
methods can benefit manufacturers and consum- where various appliances, sensors, utility controls,
ers. The design staff would more likely be encour- a telephone interface and a TV screen display are
aged and financed to invent appliances that all connected to the power line using power line
depend on the exchange of data if a communica- modem.
tions infra-structure were already in the house..."
If this automated house catches fire the detector
will send a warning message over the line. This will
be picked up by the gas control which can cut off
II - INTRODUCTION the gas supply, by an alarm system that can alert
In the latest generation of home automation sys- anyone in the house, and even by the telephone
tems, appliances can exchange information by interface that can call the emergency services.
transmitting data over the domestic mains wiring. The telephone interface also allows the house-
As a result there is no need to install extra control holder to give instructions to appliances from out-
cables and appliances can be connected to the side. You might, for example, phone home and tell
"network" simply by plugging them into the nearest the air conditioner to precool certain rooms at a
wall socket. Apart from the obvious saving in instal- specified time.
lation cost, this virtual network also makes modifi- Where there is a limit on energy consumption, or
cation and enhancement very simple since new where demand energy pricing is used (now that the
devices just have a wall socket to be instantly technology is available this is likely to be applied
connected to the network. extensively in future) various appliances can nego-
What makes these systems feasible is a new dedi- ciate power requirements through an energy con-
cated modem integrated circuit, the SGS-THOM- trol system. For example, a washing machine can
SON ST7537 Home Automation Modem IC, agree with the heating system when it can start a
developed specifically for this new high volume cycle to avoid sudden and unnecessary peaks of
consumer market as part of a European Commu- demand.
Figure 1 : Typical Household Scenario

GAS
CONTROL
LIGHTING
DIMMER TELEVISION
ALARM WATER
PHONE REMOTE INFORMATION
ON SCREEN SYSTEM CONTROL
SYSTEM
GAS
Phone line

MAINS

FIRE
DETECTOR

100

75

50

25
ALARM
0
SENSOR
ENERGY
TEMPERATURE HEATER CONTROL
SENSOR SYSTEM
WASHING
MACHINE
7537-07.AI

HOME AUTOMATION SYSTEM

3/32
ST7537 - POWER LINE MODEM APPLICATION

III - THE ELECTRICAL NETWORK mined by two parameters - the loads connected to
the network and the impedance of the distribution
Research has been done on the communication transformer. The loads at a neighbor’s residence
properties of the residential power circuit by J.B can effect this impedance. Wiring seems to have a
O’Neal Jr. An extract of his written work is pre- relatively small effect. The impedance is usually
sented below : inductive.
"... The primary objective in most residential power For typical resistive loads, signal attenuation is
line carrier systems is to communicate information expected to be from 2 to 40dB at 150kHz depend-
from one power outlet in a residence to another. ing on the distribution transformer used and the
The communication medium, therefore, consists of size of the loads. Moreover, it may be possible for
everything connected on power outlets. This in- capacitive loads to resonate with the inductance of
cludes house wiring in the walls of the building, the distribution transformer and cause the signal
appliance wiring, the appliances themselves, the attenuation to vary wildly with frequency.
service panel, the triplex wire connecting the serv-
ice panel to the distribution transformer and the
III.2 - Noise
distribution transformer itself. Since distribution
transformers usually serve more than one resi- The principal source of noise is caused by appli-
dence, the loads and wiring of all residences con- ances connected to the same transformer secon-
nected to the same transformer must be included. dary to which the power line carrier system is
connected. The two primary sources of noise will
be triacs used in light dimmers and universal mo-
III.1 - Impedance of Power Lines tors. Triacs generate noise synchronous with the
The most extensive data on this subject has been 50Hz power signal and this noise appears as har-
published by Malack and Engstrom of IBM (Elec- monics of 50Hz. Universal motors found in mixers,
tromagnetic Compatibility Laboratory), who meas- sewing machines, and sanders also create noise,
ured the RF impedance of 86 commercial AC but it is not as strong as light dimmer noise, and not
power distribution systems in six European coun- generally synchronous with 50Hz. Furthermore,
tries (see Figure 2). light dimmers are often left on for long periods of
These measurements show that the impedance of time whereas universal motors are used intermit-
the residential power circuits increases with fre- tently. The Figure 3 shows noise sources as well
quency and is in the range from about 1.5 to 80Ω as background noise in a typical residential envi-
at 100kHz. It appears that this impedance is deter- ronment.
Figure 2 : Aggregate European Power Line Impedance (by Malack and Engstrom)
IMPEDANCE MAGNITUDE (OHM)
1000

100

10

0,1
0,04 0,08 0,1 0,3 0,75 2,1 5 15 30
FREQUENCY (MHz)
7537-08.AI

MAXIMUM MEAN MINIMUM

4/32
ST7537 - POWER LINE MODEM APPLICATION

Figure 3 : Voltage spectra for 3 universal motors compared to light dimmers operating into the 60Hz
power circuit (by Vines, Trussel, Gale and O’Neal Jr.)
0

100 watt light dimmer

reversible drill
(dB)

50

sander seving
machine

background

100

7537-09.AI
0 20 40 (kHz) 60 80 100

III.3 - Standing Waves residential wiring..."


Standing wave effects will begin to occur when the III.4 - Typical Connection Loss (see Figure 4)
physical dimensions of the communication medium
are similar to about one-eight of a wavelenght, We notice two classes of value at a transmit fre-
which is about 375 and 250 meters at 100 and quency of about 130kHz :
150kHz respectively. The length of the communi- - from 10dB to 15dB : in this case, the transmitter
cation path on the secondary side of the power and the receiver are connected to the same
distribution system will be determined primarily by branch circuit.
the length of the triplex wire connecting the resi- - from 20dB to 30dB : in that case, the transmission
dences to the distribution transformer. Usually, sev- path goes from one branch circuit to another
eral residences use the same distribution through the service panel which induces an addi-
transformer. It would be rare that a linear run of this tional attenuation of 10dB to 20dB.
wiring would exceed 250 meters in length although Therefore, the transmit range of a home automat-
the total length of branches might occasionally ion system depends on the physical topology of the
exceed 250 meters. Thus standing wave effects electric power distribution network inside the build-
would be rare at frequencies below 150kHz for ing where the system is installed.

5/32
ST7537 - POWER LINE MODEM APPLICATION

Figure 4 : Static Attenuation for Several Paths (by Daniel CHAFFANJON)

TYPICAL CONNECTION LOSS


POWER LINE MODEM
0

-10

-20
LOSS in dB

-30

-40

-50
50 60 70 80 90 100 110 120 130 140 150 160 170 180 190 200 250 300 350 400
FREQUENCY ( KHz )

7537-10.AI
living room/kitchen kitchen/bedroom kitchen/bathroom
living room/hall kitchen/hall

IV - ST7537 POWER LINE MODEM and 131.85kHz for a "1"), derived from an inexpen-
sive 11.0592MHz crystal.
Fabricated in analog CMOS technology, the
ST7537 transmits and receives data up to 1200bps The modulated signal from the FSK modulator is
in half duplex mode using a carrier frequency of filtered by a switched-capacitor bandpass filter
132.45kHz, complying with Europe’s CENELEC (TX bandpass) to limit the output spectrum and to
EN 50065 standard (which specifies the use of reduce the level of harmonic components. The final
125kHz to 140kHz carrier frequencies for home stage of the transmit path consists of an operational
automation) and US FCC regulations (which speci- amplifier which needs a feedback signal from the
fies the use of carrier frequencies lower than power amplifier.
450kHz). In the receive section, the incoming signal is ap-
Frequency-shift keying is used for transmission, a plied at the RAI input (with a typical sensitivity of
fundamental design choice that makes it possible 1mVRMS) where it is first filtered by a switched-ca-
to achieve rugged transmission in a very noisy pacitor bandpass filter with a pass band of around
electrical environment at an affordable cost for high 12kHz, centered on the carrier frequency. The out-
volume consumer markets. Among the alterna- put of the filter is amplified by a 20dB gain stage
tives, amplitude-shift keying is too susceptible to which provides symetrical limitation for overvol-
noise and spread-spectrum, though theoretically tages. The resulting signal is downconverted by a
more reliable, requires complex and costly circuits. mixer which receives a local oscillator synthesized
Moreover, field trials in a critical remote utility meter by the FSK modulator block.
reading application have proven the dependability Finally, an intermediate frequency bandpass filter
of the SGS-THOMSON approach. whose central frequency is 5.4kHz improves the
Included on the chip are all of the functional blocks signal-to-noise ratio before entering the FSK de-
necessary for the transmission and reception of modulator. The coupling of the intermediate fre-
data over power lines. In addition to this IC the only quency filter output to the FSK demodulator input
external components needed are a line driver and is made by an external capacitor which cancels the
a transformer, plus, of course, the microcontroller receive path offset.
that prepares and interprets message data. In the ST7537 there are two important additional
Transmit data enters the FSK modulator asynchro- functions: the carrier detector and the watchdog.
nously with a nominal intra-message data rate of Carrier detection is needed because in practically
1200bps. Inside the modulator, the data is trans- all applications more than two appliances will be
formed into two frequencies (133.05kHz for a "0" connected to the power line. Before attempting to
6/32
ST7537 - POWER LINE MODEM APPLICATION

transmit, an appliance must first check that there is connecting relevant digital signals to SW5, SW6,
no carrier present, and if there is, it must wait and SW7 and SW8 (pin not used) and watchdog, mas-
retry later. ter clock and RSTO.
The watchdog function is provided to ensure that
the modem’s control micro is functioning correctly. VI - HARDWARE DESCRIPTION
Software in the micro must include instructions that
send a pulse to the watchdog input of the ST7537
VI.1 - About CENELEC Specifications
at least once every 1.5s. If no negative transition is
observed at this input for 1.5s a reset signal is The CENELEC specifications are given for an
generated to restart the micro. This watchdog imaginary network (50Ω/ 50µH + 5Ω) simulating
monitor scheme ensures that any disruption the power line. This network looks like a 54Ω
caused by glitches are quickly corrected. impedance at a transmit frequency of 132.45kHz.
The transmitted signal is measured in relation to a
reference of this network (see Annexe B). With this
V - DEMOBOARD FEATURES configuration, some of the specifications are :
- maximum output level : 116dBµV
Power line interface - harmonics level of less than 46dBµV mean.
The power line interface has been designed in In this chapter, the transmitted signal is measured
order to follow the CENELEC EN 50065-1 and US between the phase and the neutral of the simulated
FCC specification. It has to amplify and filter the power line. Then, the measured voltages are twice
output signal of the ST7537. the ones measured with CENELEC test configura-
tion. Thus, it is necessary to add 6dBµV to the
Test pin specifications given above :
It is possible to program the different test modes of - maximum output level : 122dBµV
the ST7537 with the switches SW1, SW2, SW3 and - harmonics level of less than 52dBµV mean.
SW4 corresponding to TEST1, TEST2, TEST3 and Henceforth, these values will be used .
TEST4. The most important test mode is TEST1
which allows continuous transmission. VI.2 - Power Line Interface
The power line interface connects the ST7537 to
RS232C interface the power lines and meets the CENELEC and FCC
On the application board, there is an RS232C specifications. It has the following functions :
interface allowing you to debug your system. This - in transmit mode : to amplify and filter the transmit
interface is connected to the ST7537 by four signal (ATO) from the ST7537
switches SW5, SW6, SW7 and SW8. - in receive mode : to provide received signal from
Remark : It is mandatory to provide the watchdog powerlines to the receive input (RAI) of the
clock to the ST7537. ST7537
- protection against spikes and overvoltages.
Wrapping area It is composed of a line driver and a line interface
You can wire your application and do its debug by as it is shown in Figure 5.
Figure 5 : Power Line Interface Description

ST7537 LINE DRIVER LINE INTERFACE

ATO MAINS
50 / 60 Hz
PAFB

PABC
PABC

RAI
7537-11.AI

7/32
ST7537 - POWER LINE MODEM APPLICATION

In transmit mode, the power line interface has to current of the ouput branch independently of the
be able to drive, via the line interface, power lines mismatch of the transistors. The Push-Pull is polar-
with impedances from 1 to 100Ω. The line interface ized with two common collector amplifiers com-
is not only used to put signals on the power line. It posed of Q1 (2N2222) and Q5 (2N2907). As far as
is also used as a bandpass filter, in order to reduce resistors R7 and R11 are concerned, their value
the harmonics of the transmit signal to a level of (180Ω) has been defined to obtain the optimum
less than 52dBµV . performances of the amplifiers thus define the bias
In receive mode, the line driver is switched off to current of the system.
avoid the low output impedance of the line driver The bipolar transistors Q2 (2N2222) and Q6
attenuating the received signals and to save en- (2N2907) are used to switch off the power amplifier
ergy costs. during the receive mode, thanks to the ST7537
output signals PABC and PABC which follow the
Rx/Tx mode.
VI.2.1 - The Line Driver
In order to avoid thermal runaways, it is mandatory
The line driver has to amplify the output signal to connect thermically Q1/Q4 and Q3/Q5. This is
(ATO) of the ST7537 (see Figure 6). possible since the collectors of the transistors used
First, a normal Push-Pull amplifier has been set up are connected to the metal package. Conse-
with two bipolar transistors Q4 (2N2222) and Q3 quently, both transistors will have the same tem-
(2N2907). These types of transistors (2N2222 and perature.
2N2907) have been chosen as they are cheap and Main characteristics of the line driver :
widely used. - voltage gain = 1
The resistors R4, R5, R10 and R12 degenerate the - high input impedance
emitter of Q5, Q4, Q1, Q3 in order to define the bias - low output impedance
Figure 6 : Power Line Interface Schematics

10V
Q1, Q2, Q4 = 2N2222
Q6 Q3, Q5, Q6 = 2N2907

R11
180Ω
LINE
Q4
DRIVER
R12
2.2Ω R10
2.2Ω
R9 47kΩ 707VX-T1002N
Q5
PABC 8 1-2 : 20 turns
2-3 : 100 turns
S R2 1kΩ C5 L1 4-6 : 20 turns 3 4
T RAI 3
10µH
7 1µF
PAFB 6 (r = 0.8 Ω) 2
R8 1kΩ
5 ATO 7 Q1 1 6
3 R6 47kΩ
R4
7 PABC 9 2.2Ω Bottom View
R5
2.2Ω C4 C1
LINE 3 4
TR1
Q3 INTERFACE
6.8nF 1µF
R7 Mains
2 50/60Hz
180Ω C21

1 6
D1 Toko 1µF
Q2 T1002N
7537-12.EPS

P6KE6V8CP
0V

8/32
ST7537 - POWER LINE MODEM APPLICATION

VI.2.2 - The Line Interface destroyed, or worse, danger might occur for per-
In order to adapt the line driver to the power line, a sons working with the interface and the ST7537.
transformer is used (see Figure 6). This trans- Moreover, since the TOKO transformer cannot
former has : overcome higher than 800V spikes, the safety
- to isolate the rest of the interface from the power norms are not met and the capacitor C1 is required
line to comply with them. An additional capacitor C21
- to put the transmit signal on the power line is used as the phase location is unknown.
- to extract the received signal from the power line As a final protection against any possible spikes, a
- to filter 50Hz/60Hz signal coming from the power transil (TRL 1) is used. It is a 6.8V bidirectional type.
line If a voltage greater than 6.8V appears, voltage
- to filter the harmonics of the transmit signal. between pins of the system will be set to 6.8V,
protecting the other parts of the power line interface
The used transformer is a TOKO T1002N. It has from damage.
two primary windings and one secondary winding. R1 is added to discharge C1 after disconnecting
The ratios of these windings are 4:1:1 (turns). the interface from the powerline. Without this resis-
Typical values of the transformer are : tor, C1 will not be discharged and schock hazard
- L1t windings : 9.4µH might occur if someone touches the powerline
- L4t windings : 140µH. connector. This resistor is only useful in evaluation
The primary windings of the transformer are used systems. In all other cases where disconnection
to create a bandpass filter. The resonance fre- from the power line never takes place, R1 can be
quency is set at the transmit frequency with C4. removed, saving undesired energy loss.
This capacitor is in parallel with the primary winding
(1t/4t). The equivalent value for those two windings VI.2.3 - The Power Line Interface
can be calculated according to : The complete power line interface has been de-
Leq = L1t + L4t + 2M scribed in the two preceding parts. The interface
has to be connected to the ST7537 as described in
Figure 7.
M= k⋅√
 
L1t ⋅ L4t The ATO and RAI are the analog output and input
from/to the ST7537. The control of the transmit/re-
With the given values : ceive mode is made with PABC and PABC signals
k = 1/21/2 from the ST7537. A high output (+10V) on PABC
M = (9.4µH ⋅ 140µH / 2) 1/2= 25.7µH line selects the transmit mode, whereas a low
Leq = L1t + L4t + 2 ⋅ M = 200.7µH output (0V) selects the receive mode.
The "pwr" outputs are the power line connections.
The resonance frequency of this LC network is On the application board, these connections are
dependant of C4 and Leq according to : located close to C1 and the transformer in order to
1 avoid long tracks carrying high voltage.
Fres =
2π ⋅ √

Leq ⋅ 
C4 VI.2.4 - Performances of the power line inter-
face
1 The following tests have been done on the power
C4 =
Leq ⋅ (2π ⋅ Fres)2 line interface :
- output impedance of the powerline interface ver-
For Fres = 132.45kHz → C4 = 7.2nF (6.8nF is sus the frequency
chosen since it is the nearest capacitor value avail- - Bit Error Rate (BER) test
able). - spectrum analysis of the transmit signal.
The capacitor C4 must be very linear in order avoid
VI.2.4.1 - OUTPUT IMPEDANCE OF THE POWER
harmonic distortion. That’s why a KS (styroflex or
LINE INTERFACE VERSUS THE FREQUENCY
NPO ceramic capacitor) capacitor has been used.
In order to filter the 50Hz/60Hz signal from the The output impedance of the power line interface
powerlines, C1 is used. The capacitor filters the low is measured with an impedance analyzer as it is
frequencies (50Hz/60Hz) and lets the high (Trans- shown in Figure 8. The board is set in receive
mit) frequencies pass. It is a class X2 capacitor. mode.
These capacitors have a short circuit protection, The results are given in annexe B.
which is absolutely necessary. Indeed if a short Test equipment : 41924 LF Impedance Analyzer
circuit in the capacitor occurs, the 50Hz/60Hz filter- 5Hz-13MHz (Hewlett Packard)
ing is lost, and the powerline interface will be Test conditions : T = +25°C
9/32
ST7537 - POWER LINE MODEM APPLICATION

Figure 7 : Power Line Interface Inputs and Outputs

+10V +10V PWR

POWER LINE POWER LINE

INTERFACE
0V 0V PWR

RAI ATO PABC PABC

7537-13.AI
RECEIVE TRANSMIT MODE
OUTPUT INPUT SELECTION

Figure 8 : Output Impedance Measurement Configuration

ATO
POWER LINE IMPEDANCE
ST7537 INTERFACE ANALYZER
RAI

7537-14.AI
VI.2.4.2 - BER TEST tively the B.E.R with a RAI input level of
Two boards are required : one for the transmission, 10.023mVRMS and 1.14mVRMS .
the other one for the reception. Conclusion
White noise is added to the ATO transmit output of Under the test conditions of the ST7537 specifica-
the ST7537 thanks to a mixer. The aim is to meas- tion (RAI = 10mVRMS and S/N = 15dB) the BER is
ure the BER under different Signal/Noise ratio con- 4.10-7. With an RAI input level of 1.14mVRMS the
ditions. The mixed signal is transmitted to the RAI BER is around 10-4 with the same S/N ratio. There-
receive input of the modem. The digital signal fore, the ST7537 is able to communicate with low
injected in TxD is a 215-1 pseudo-random pattern input signal level of about 1mVRMS. This test illus-
long, generated by a bit error rate analyzer (with trates the high sensitivity of the power line modem.
internal 1.2kHz asynchronous clock). In Figure 10, the measured BER (with an RAI input
In the reception board, a 1.2kHz clock (CRX) is built level of 10mVRMS) is compared with the theorical
thanks to the ST7537 MCLK clock. The received BER of a conventional BFSK modulator/demodu-
digital signal RxD is amplified (RxDL) and synchro- lator.
nized with the CRX clock. Both of them (CRX and Test equipment : SI7703B BER analyzer
RxDL) are analyzed by the BER analyzer. Rhode and Schwartz noise
The measurements are made with different RAI generator
input level. The Figures 10 and 11 gives respec- Test condition : T = +25°C

10/32
ST7537 - POWER LINE MODEM APPLICATION

Figure 9 : BER Test Configuration

B.E.R ANALYZER
NOISE SI7703B
GENERATOR
Rx CLK Rx Tx
IN DATA DATA

noise TxD

RAI ATO
ST7537 MIXER ST7537

RxD MCLK
transmission board

RxDL

CRX

7537-15.AI
Reception board

Figure 10 : BER Test for an RAI Input Amplitude of 10.023mVRMS

ST7537 B.E.R
T-26c Baud rate = 1200
V RAI = 10.023 mVrms
B.E.R
0,1

0,01

1,000E-03

1,000E-04

1,000E-05

1,000E-06

1,000E-07
8 9 10 11 12 13 14 15 16
7537-16.AI

B/N (dB)
V RAI = 10.023 mVrms Theorical B.E.R

11/32
ST7537 - POWER LINE MODEM APPLICATION

Figure 11 : BER Test for an RAI Input Level of 1.14mVRMS

ST7537 B.E.R
T-26c Baud rate = 1200
V RAI = 1.14 mVrms
B.E.R
0,01

1,00E-03

1,000E-04

1,000E-05
10 11 12 13 14 15 16
B/N (dB)

7537-17.AI
V RAI = 1.14mVrms

VI.2.4.3 - TRANSMIT SIGNAL SPECTRUM However, tests on a real site showed that the
ANALYSIS transmit level was very low with this inductance in
The transmit output signal of the power line inter- case of low power line impedance : with an imped-
face is measured with the power line simulated by ance of 1Ω, the output level is 87dBµV, so that
resistors : R = 1, 5, 10, 50, 100Ω. communication difficulties occur. At the transmit
A spectrum analyzer is used to display the output frequency (132.45kHz), the inductance looks like
signal frequency spectrum of the power line inter- an impedance of about 56Ω, which introduces
face (see Figure 12). significant attenuations on the transmit signal com-
pared to those induced by the 2.2Ω resistor.
In a first design of the board, a 2.2Ω resistor was
used instead of the inductance L1. In this configu- To improve the output signal amplitude, the induc-
ration, whatever the power line impedance, the tance value must be modified. A compromise has
output level was at least 106dBµV up to 119dBµV to be found between filtering the pertubation volt-
(see Figure 13). Thus no communication problems ages and lowering the impedance of the induc-
had been noticed during the test session. tance at the transmit frequency. An inductance of
To improve the frequency spectrum of the transmit 10 µH (0.8Ω) has been chosen which looks like an
signal, the resistor has been replaced by an induc- impedance of 8Ω at 132.45kHz frequency (see
tance L1 of 68µH, 1.6Ω (see Figures 14 and 15). Figures 16 and 17).
Figure 12 : Spectrum Analysis Configuration
POWER
Test 1 ATO LINE
POWER LINE SPECTRUM
ST7537 INTERFACE R ANALYZER
Rx/Tx PAFB

TXD
7537-18.AI

R : 1/5/10/50/100 ohm
TXD : "0" / "1" (0V / +5V)

12/32
ST7537 - POWER LINE MODEM APPLICATION

Figure 13 : Output Transmit Level (dBµV) with Figure 14 : Output Transmit Level (dBµV) with
2.2Ω Resistor 68µH Inductance

ST7537 APPLICATION BOARD ST7537 APPLICATION BOARD


WITH A 2.2 ohm RESISTOR WITH A 68 µH INDUCTANCE
TXD = "O" TXD = "O"

125 125

120
120
115

115 110
105
110 100

95
105
90
100 85
1 5 10 50 100 1 5 10 50 100

7537-20.AI
7537-19.AI

R power line (ohm) R power line (ohm)


VOUT (dBµV) CENELEC : 122 dB µV) VOUT (dBµV) CENELEC : 122 dB µV)

Figure 15 : Second and Third Harmonics Level Figure 16 : Output Transmit Level (dBµV) with
(dBµV) with 68µH Inductance 10µH Inductance
ST7537 APPLICATION BOARD
WITH A 68 µH INDUCTANCE ST7537 APPLICATION BOARD
TXD = "O" WITH A 10 µH INDUCTANCE
60 TXD = "O"
125
55
50 120
45
115
40
35
110
30
25 105
20
1 5 10 50 100 100
1 5 10 50 100
R power line (ohm)
R power line (ohm)
7537-22.AI
7537-21.AI

CENELEC : 52 dB µV) HS (dBµV)


VOUT (dBµV) CENELEC : 122 dB µV)
HS (dBµV)

13/32
ST7537 - POWER LINE MODEM APPLICATION

Figure 17 : Second and Third Harmonics Level Figure 18 : Demoboard Transmit Performances
ST7537 APPLICATION BOARD ST7537 APPLICATION BOARD
WITH A 10 µH INDUCTANCE WITH A 10 µH INDUCTANCE
TXD = "O" TxD = "O"
55 dB
90

50
85

45
80
40

75
35

30 70
1 5 10 50 100
R power line (ohm) 65
7537-23.AI
H2 (dBµV) H3 (dBµV)
CENELEC : 52 dB µV)
60
1 5 10 50 100
VOUT/H2 and VOUT/H3 variations with the 10µH

7537-60.AI
inductance versus the power line impedance are R power line (ohm)
given in Figure 18. VOUT/H2 (dB) VOUT/H3 (dB)

Test results CENELEC specifications FCC specifications


(with L1 = 10µH)
VOUT < 122 dBµV VOUT < 122 dBµV,
H2 < 39 dBµV H2 < 56 dBµV mean H2 < 48 dBµV (extended to 60 dBµV)
H3 < 49 dBµV H3 < 52 dBµV mean H3 < 48 dBµV (extended to 60 dBµV)
VOUT/H2 > 70 dB
VOUT/H3 > 65 dB
Conclusion
With L1 = 10 µH, the required harmonics level is reached and the output voltage is smaller than 122 dBµV.
Therefore, the power line interface is fully operating according to the CENELEC and FCC specifications.
Moreover, for very low power line impedances, the output transmit level is high enough to ensure a good
communication quality.
Test equipment : 3585A Spectrum Analyzer 20Hz-40MHz (Hewlett Packard)
Test conditions : T = +25°C

14/32
ST7537 - POWER LINE MODEM APPLICATION

VI.3 - Carrier Detect In the ST7537, the clamping of CD on RxD is


The carrier detect output (CD) is driven low when programmable thanks to TxD pin.
the input signal amplitude on RAI is greater than
Figure 21
VCD typically 5mVRMS for at least TCD (typically
4ms). When the input signal disappears or be- CARRIER
comes lower than VCD, CD is held low for at least CD DETECTION
TCD before returning to a high level. VCD input is
the carrier detection threshold voltage which is set TxD GATE Clamping Prog
internally.

7537-41.EPS
The graph, given in Figure 19, represents the mini- RxD
GATE
FSK
mum amplitude of the received signal which can be DEMODULATOR

detected (which corresponds to CD = 0) according


to the frequency. Thus input signals at a frequency So we are able to receive data even if the incoming
of 133.05kHz (high logic level) and 131.85kHz (low analog receive signal is less than 5mV. When
logic level) can de detected at a very low level. For removing the clamping of RxD by CD we are able
frequencies smaller than 129kHz or greater than to get RxD data without error with a receive level
150kHz, the detection is made at a very high level of 400 micro Volt.
of input signal. Therefore, only significant frequen-
cies received signals are detected. Figure 22

Figure 19 : RAI Input Minimum Detection Level


RAI
Minimum received signal(Vin) amplitude for CD="0" ( Vcd = 5.098V )
Vin at transformer input
140
CD

130
TxD

7537-42.EPS
120
RxD Rand VALID DATA "1"

110
As you can see on previous Figure even when RAI
Vin (dBµV)

100
is lower than the carrier detect level we get the
datas because TxD = "0".
90 When TxD = "0" and the receive signal is not one
of the 7537 (e.g Noise), the RxD is random (in most
80 configuration the RxD is at "0").
70
Example of Implementation
7537-61.AI

125 129 131 133 134.5 138.5 142.6 145

Frequency (KHz)
We have seen that by programming the TxD to "0"
in receive mode we increase the sensitivity of the
VI.4 - Improving Sensitivity ST7537 because there is no more clamping by CD.
You will be able to have good communication with
In all modem, the carrier detector clamps the out- a receive signal of around 50dBµV which means a
going digital data RxD when the incoming analog dynamic of around 70dB.
receive signal is below a defined level (carrier
detector level 7537 typ = 5mVRMS). Because we want to get the benefit of the very good
sensitivity of the ST7537, we will program TxD to
That means we are loosing the data when the "0" in receive mode and create by soft a frame
signal is less than CD level. detector. We will use the CD signal as mentionned
Figure 20 by CENELEC only when we want to transmit a
frame.
RAI Different software frame detector can be imple-
mented depending of the ressources of your mi-
CD crocontroller.
7537-40.EPS

You can program your microcontroller to go in


RxD DATA DATA
receive frame when it received the expected byte.

15/32
ST7537 - POWER LINE MODEM APPLICATION

Figure 23 face. As the electrical levels of the RS232 port


(±12V) do not match the electrical levels of the
ST7537 (TTL levels 0/+5V), a MAX232 is used to

7537-43.EPS
RxD PREAMBLE EXPECTED BYTE

RANDOM DATAS FRAME


make communication possible. This device has two
RS232 receivers to convert RS232 levels into TTL
levels and two RS232 transmitters to convert TTL
So the preamble is for demodulator training (when
levels into RS232 levels. The connections between
you start a communication the 3 first bits are lost
the ST7537 and the RS232 interface are given in
by the receiver) and when you will match with
Figure 25. Not all the pins from the RS232 port are
expected byte the microcontroller will go in receive
used. The RXD, TXD and Carrier Detect (CD)
frame routine.
signals are directly converted. The Request To
On the ST6 microcontroller we have implemented
Send (RTS) line is used to set the ST7537 in
the following frame detector.
receive or transmit mode, but also to give the PC a
Figure 24 Clear To Send (CTS) signal. The Data Set Ready
(DSR) line is connected to the Data Terminal Ready
(DTR) line. This simulates the transmission of the
7537-44.EPS
RxD

RANDOM DATAS "1" FFh DATA DSR signal by the power line modem when the PC
FRAME is ready. The RI output of the PC is only used for
telephone network modems, and therefore it is not
We put TxD = "1" on the transmitter for around 4ms connected. If the RS232 port of the PC is used, it
(for demodulator training) and after we send in is necessary to provide the board with a watchdog
asynchronous mode FFh following by the complete clock (e.g : 1kHz) in order to get the PC communi-
frame. cation working. A suggested clock generator is
On the receiver, we check that we have RxD equal given Figure 26. It uses a NE555 timer working in
to "1" for at least 7ms (we are looking for FFh), then astable mode.
we go in receive and we will have frame synchro- The output HIGH time of the clock is :
nization on the first start bit of the data. tH = 0.693*(R1 + R2)*C1
We did a trial in our lab with this system during
2 hours without having the ST6 going in frame The output LOW time of the clock is :
receive routine on bad datas dued to noise signal. tL = 0.693*(R2)*C1
Thus the total period T is : T = tH + tL
VI.5 - Communication with a RS232C Interface The frequency of oscillation is : f = 1/T = 1/(tH + tL)
The application board can be connected to a Per- Calculations provides the following results :
sonal Computer (PC) thanks to the RS232C inter- R1 = 1kΩ, R2 = 100kΩ, C1 = 7nF.
Figure 25 : Connections between ST7537 and RS232 Interface
+5V

+ 10µF

1 16
C1+ VCC +
+ 2 15 10µF
10µF V+ GND
3 14
C1- T1out
4 13
+ C2+ R1in
10µF 5 12 TXD
ST7537
C2- R1out
+ 6
V- T1in
11 RXD
7 10 CD
10µF T2out T2in
8 9 RX/TX
R2in R2out

MAX 232
1 2 3 4 5

1. DCD 6. DSR
2. RXD 7. RTS
6 7 8 9 (nc)
3. TXD 8. CTS
7537-25.AI

4. DTR 9. RI
5. GND

16/32
ST7537 - POWER LINE MODEM APPLICATION

Figure 26 : Watchdog Clock


5V

R1
4 8 1 K Ohm
Reset
7
Discharge

3
WD OUT NE555
R2
100 K Ohm
5 Control Threshold 6
Voltage Trigger
1 2
C C1
0.01 microF 7 nF

7537-26.AI
0V

RS232C Communication Problem VI.6 - Demoboard Communicating Application


We have discovered that with some computer the The ST7537 power line modem enables you to
communication program does not work correctly. In design "communicating" appliances, which meet
some new PC generation the UART is sensitive to your specific requirements and comply with the
the RxD jitter and then shows characters errors on CENELEC specifications. Equipped with a single
PLM communication. low-cost ST90E28 microcontroller, it makes it pos-
The following hardware avoid the jitter on RxD for sible to build a "smart" home network, where each
the UART of the PC. device is able to use any information required either
if it is local (sensors) or remote (inside any other
Figure 27 communicating appliance).
Reset
This paragraph is intended to provide design basics
VCC for the implementation of the ST90E28 on the
16 1.2kΩ 14 ST7537 demoboard.
6 1 100nF
33nF
C 7
7 D 9 7
7537-45.EPS

4 4
10kΩ
11 0 3 H
VI.7 - Overview of the ST90E28 MCU
BCLKR
16.4kΩ 4 3 C
12 6 4 7 RxDs The ST90E28 microcontroller chosen to equip the
5

5
B
14
RxD
2
4 to RS232C ST7537 demoboard is a 16Kbyte program memory
C B
N
EPROM version with 256 bytes of RAM and
8 From ST7537
256 bytes of register file. Within this file, 224 gen-
eral purpose registers are available as RAM, accu-
Figure 28 mulators or index pointers, allowing code
efficiency. This MCU has an internal clock gener-
RxD ator, a 16-bit watchdog timer for system integrity, a
powerful serial communications interface (SCI)
BCLKR with included baud rate generator and outstanding
7537-46.EPS

character search capability, and a 16-bit multifunc-


RxDs
tion timer for complex user applications; it provides
a reset input and up to 36 input/output pins, includ-
After power-up the 7537 demoboard, you have to ing 7 external interrupts and a non-maskable inter-
reset the receive recovery block. rupt.
Before doing this extra hardware we recommend Most of the instructions take 14 clock cycles: with
you to test your PC with the new program and if a clock frequency of 11.0592MHz, one instruction
there are time to time some errors the hardware lasts about 90ns. Connected to the ST7537, the
has to be adapted as shown above (you can use microcontroller has to deliver a maximum bit rate
BCLKR for the watchdog clock). of 1200 bauds: one bit is at least 833µs long.

17/32
ST7537 - POWER LINE MODEM APPLICATION

VI.8 - Implementation of the ST90E28 MCU must stay unconnected.


Two configurations have been set up, one for the - Port 5 bit 1 (Pin 42) : This output bit provides the
slave appliances, and one for the master system. PLM watchdog input with negative transitions,
Both versions will have their address initialized in before the timeout end is reached. The watchdog
the software in this first release. Besides, they use pulses must be at least 500ns wide with a period
one data output to display information about the of at least 800µs and up to 1.5s.
main program execution by means of a led: you
know that the main program is running well, when - Port 5 bit 0 (Pin 43) : This output controls the
this led is blinking as the appliance is powered on. Rx/Tx mode. When this bit is 0, the transmit mode
The main differences between the two controllers is set, otherwise the receive mode is selected.
are the input/ouput facilities. Remember that the ST7537 switches automat-
The slave configuration provides an ouput that ically in the receive mode, when this bit is held at
switches a load. This load will be simulated by a 0 longer than 1s.
LED (see Figure 29). - INT1 (Pin 26) : The PLM carrier detect signal
The master configuration provides a 3-bit com- channels through this external interrupt input pin,
mand input to control the slaves. This command will which is triggered on falling edge. On signal de-
be simulated by a KEYBOARD : one key is avail- tection, the carrier detect output is driven low and
able for each slave, and one specific key enables generates an interrupt request.
the user to supervise all the slaves inside a room - SOUT (Pin 30) : The microcontroller provides the
at once. This configuration also uses a 3-bit data ST7537 with Tx data by means of the SCI output.
output to let you know whether a particular slave is - SIN (Pin 31) : The ST7537 provides the microcon-
on, or whether the room is lit up. This information troller with Rx data through the SCI input.
will be displayed by one led attached to the key - NMI (Pin 18) : The PLM reset output signal acts
dedicated to a particular device (see Figure 30). All as an MCU external watchdog, in order to detect
the slaves addresses will be stored in the master hardware or software failures. This signal chan-
version of the software. nels through the MCU external non maskable
interrupt input pin, which is triggered on rising
Furthermore, both configurations need a 7 bit data edge. When the power supply is too low or when
exchange with the ST7537 : clock, transmit data, no negative transition occurs on the PLM watch-
receive data, reset, Rx/Tx control lines (see Fig- dog input for more than 1.5s, the reset ouput is
ure 31). No external component is needed to inter- driven high and generates a top level interrupt
face the microcontroller with the power line request, which resets the microcontroller. As for
modem, allowing cost savings. the MCU internal watchdog timer, the watchdog
- OSCIN (Pin 2) : The MCU oscillator is driven with mode is disabled, so that a second 16-bit pro-
the PLM master clock, so that no additional crys- grammable timer is available for customer appli-
tal is needed. In this case, the oscillator output pin cations.
Figure 29 : Slave Configuration

AC POWER LINE 50/60 Hz


PLI

7
ST7537 ST9 LOAD

PLM MCU
7537-28.AI

MAIN
PROGRAM

18/32
ST7537 - POWER LINE MODEM APPLICATION

Figure 30 : Master Configuration

AC POWER LINE 50/60 Hz


PLI

Command
LOAD_1

7
ST7537 ST9 LOAD_2

PLM MCU
ROOM

Status

7537-29.AI
MAIN LOAD_1 LOAD_2 ROOM
PROGRAM

Figure 31 : Interface between ST7537 and ST90E28

ST7537 ST9
18 2
MCLK OSCIN
19 42
WD P51
20 43
Rx/Tx P50
21 26
CD INT1
22 30
TxD SOUT
23 31
RxD SIN
24 18

7537-30.AI
RSTO NMI

VI.8.1 - Applicative Pin Configuration


- VSS (Pin 1) : Digital Circuit Ground Figure 32 : Reset Command
- VDD (Pin 21) : Main Power Supply Voltage +5V. A
decoupling capacitor of 47µF is connected be- +5V
tween VDD and VSS pins. The VDD of the micro-
controller should be connected also to the DVCC
of the ST7537 in order to reference the digital 100K
ST9
level of the ST7537.
- RESET (Pin 3) : This input is active low. To restart RESET
the microcontroller, the reset key has to be RESET +
pressed (see Figure 32). A capacitor (2.2µF) will KEY
keep the input low for a minimum startup period, 2.2µF
7537-31.AI

whereas a pull-up resistor (100kΩ) will keep it


high for normal operation.

19/32
ST7537 - POWER LINE MODEM APPLICATION

- Display Output : Light emitting diodes are used to VI.8.2 - Power Consumption
display data. The maximum current provided by
The power consumption of each configuration has
each output pin is 0.8mA. Therefore the serial
been measured. Both master and slave boards
resistor R has a minimum value of 4.7kΩ (see
were connected to the AC power mains : the slave
Figure 33 : current = (4.2-0.6)/4.7e3 = 0.77mA).
led and all master status leds are switched ON by
The slave configuration uses 2 display output pressing the master room key (worst case simula-
pins. tion).
Port 2 bit 3 (Pin 25) : blinking led
Port 2 bit 5 (Pin 27) : load (slave led) The current consumption is measured with a digit-
The master configuration uses 4 display output izing oscilloscope (channel 2) by means of a serial
pins. resistor, which value is small enough to avoid big
Port 2 bit 3 (Pin 25) : blinking led supply voltage drops (about 1Ω typically).
Port 2 bit 5 (Pin 27) : load 1 status A dual tracking power supply provides each board
Port 2 bit 6 (Pin 28) : load 2 status with the same power voltage, which value is dis-
Port 5 bit 5 (Pin 38) : room status played on a multimeter.
Figure 33 : Display Output Test equipment : Fluke 45 Multimeter, Tektronix
TDS460 Digitizing Oscilloscope
Test conditions : R = 1.04Ω , Valim = +10.006 V
ST9 T = +25oC
R - Slave board : the oscilloscope is triggered on the
Pxx falling edge of the Carrier Detect (CD) signal
displayed on channel 1 (see Figure 35). There-
fore, the current consumption is displayed on
channel 2 in receive mode on stand-by (CD = 1)
7537-32.AI

and active (CD = 0) states.


Current consumption (Rx mode) :+146mARMS
Power consumption :
- Keyboard Input : Switch keys are used to enter
(+10.006V - 1.04Ω ⋅ 146mA) ⋅ 146mA = +1.44W
commands. The keyboard pin is active high (see
Figure 34). A pull-down resistor of 10kΩ keeps the Slave board current consumption test results
input low, whereas a key press holds it high for (see Figure 36)
active operation. Channel 1 : Carrier Detect signal
The master configuration uses 3 keyboard input Channel 2 : Supply current
pins. - Master board : the oscilloscope is triggered on the
Port 5 bit 2 (Pin 41) : load 1 command falling edge of the Rx/Tx signal on channel 1 (see
Port 5 bit 3 (Pin 40) : load 2 command Figure 37). The current consumption is displayed
Port 5 bit 4 (Pin 39) : room command on channel 2 in both receive and transmit modes.
Current consumption :
Figure 34 : Keyboard Input
Rx mode +160mARMS
+5V Tx mode +230mARMS
Power consumption :
Rx mode (+10.006V - 1.04Ω ⋅ 160mA) ⋅ 160mA
KEY
ST9 = +1.57W
Tx mode (+10.006V - 1.04Ω ⋅ 230mA) ⋅ 230mA
Pxx
= +2.25W
10K Master board current consumption test results
(see Figure 38)
7537-33.AI

Channel 1 : Rx/Tx signal


Channel 2 : Supply current

20/32
ST7537 - POWER LINE MODEM APPLICATION

Figure 35 : Slave Board Current Consumption Test


MULTIMETER ALIM
+V +10V
-V 0V

R
OSCILLOSCOPE SLAVE MASTER
+10V Tx mode
CH2 0V
3 shots
CH1 CD

VAC VAC

7537-34.AI
AC POWER LINE 50/60 Hz

Figure 36 : Slave Board Current Consumption Test Results


Tek stopped 33 Acquisitions
[ T ]

T
Ch2 RMS
145.68 mv

Ch2 Max
1
172.4 mv

Ch2 Mean
145.44 mv

Ch2 Min
119.6 mv
2
7537-35.AI

Ch1 5.00 V Ch2 20.00 mV M 100 ms Ch1 3.2 V

21/32
ST7537 - POWER LINE MODEM APPLICATION

Figure 37 : Master Board Current Consumption Test


MULTIMETER ALIM
+V +10V
-V 0V

R
OSCILLOSCOPE MASTER SLAVE
+10V
CH2 0V Rx mode
CH1 Rx/Tx

VAC VAC

7537-36.AI
AC POWER LINE 50/60 Hz

Figure 38 : Master Board Current Consumption Test Results


Tek stopped 33 Acquisitions
[ T ]

T
Ch2 RMS
183.78 mv

Ch2 Max
1
268.2 mv

Ch2 Mean
180.84 mv

Ch2 Min
119.4 mv
2
7537-37.AI

Ch1 5.00 V Ch2 30.0 mV M 100 ms Ch1 3.1 V

V.9 - Power Supply


V.9.1 - Power supply features
The power supply features are : LM 7805, which already exists on the board.
- one reference voltage of 10 VDC The power supply schematic is given in Figure 39 :
- output current of 400 mA The LM317T regulator is ajustable between 1.2V
The 5 VDC voltage needed for the numeric part of and 37V thanks to the R1 & R2 resistors. It could
the application is provided by a voltage regulator be replaced by a +10V regulator.

22/32
ST7537 - POWER LINE MODEM APPLICATION

Figure 39 : Power Supply Schematics

Uca +10 V
LM 317T
+

220V
C1 C2 R1 C3
4700µF 100nF 220 1µF
R2
5K

7537-38.AI
OV

V.9.2 - Power supply sizing ⇒ C1 min = 10*I / Urtt max


The rectified voltage between pins of the capacitor C1 min = 2000µF
C1 is shown in Figure 40 : We choose a C1 capacitor value of : 4700µF
Uca = transformer secondary voltage (VRMS) The maximum voltage Vmax which can be applied
Ucc = voltage between pins of the capacitor C1 between C1 pins has to be higher than the maxi-
Urtt = ripple voltage mum secondary voltage of the transformer. There-
U = minimum voltage which has to exist fore, with a safety margin of 25% :
between input and output of the voltage
regulator Vmax = (2 * Uca) * 1.25 = 21.2V
Us = output power supply voltage The maximum power dissipated by the voltage
Ud = rectifier diodes voltage drop regulator is :
I = output power supply current
Hypothesis : Pd = U * I
- I = 400mA U = 2*Uca - Us - Urtt - 2*Ud
- Umin = 3V Urtt = (10 * 400) / 4700 = 0.85V
- Ud = 1V ⇒Pd = 1.6W
The minimum voltage the transformer has to pro- In short, the power supply sizing is :
vide is : - secondary voltage of the transformer : 2x6V
Uca = (Us + Umin + Urtt + 2Ud) / 2 - 5 VA transformer
- C1 = 4700µF with a maximum voltage of 25V
The ripple voltage is : between its pins.
Urtt = 10 * I / C1 (with I in mA and C1 in µF)

Figure 40 : Rectified Voltage Parameters VII - PC SOFTWARE


With the application board, we provide you a com-
V
munication program written in Turbo C language
which allows :
Urtt - to drive the RS232 interface
- to transmit data via power lines thanks to the
Umin
ST7537
10 V - to receive data from power lines thanks to the
ST7537
1.414*Ucarms - 2*Ud Uoutput - to process data
- to run character error test.
7537-39.AI

t It is possible to transmit :
- characters
- text ( maximum 80 characters )
V.9.3 - Using a 2x6 V secondary voltage trans- - hexadecimal data ( maximum 64 bytes )
former - file.
The transformer must be able to supply I = 400mA, The communication program allows you to run
so that a 5 VA transformer is required. different types of communication :
The maximum value of Urtt is : - communication between 2 computers.
Urtt max = 2*Uca - Us - Umin - 2*Ud = 2V - communication between 2 ports COM on the
same computer.
23/32
ST7537 - POWER LINE MODEM APPLICATION

VIII - TYPICAL APPLICATION home network.


VIII.1 - Protocol Design
The software described in the following parts pro- VIII.2 - Use of the ST90E28 resources
vides you with a simple efficient protocol kernel, - The Watchdog/Timer :
which is fully interrupt handled and uses almost no The watchdog mode is disabled and the timer is
CPU time. Therefore it enables you to develop operated in continuous mode.
friendly interactive applications with a short re- On each timer interrupt request, network access
sponse time. parameters, keyboard delay time, common sys-
tem clock parameters are updated. Besides, the
This protocol uses a packet encapsulation mecha-
ST7537 watchdog input is reset.
nism with two level error detection capability, both
for the packet level and for the byte level. During - The Serial Communication Interface (SCI) :
reception, burst noise can affect the communica- The SCI is configured in asynchronous mode to
tion channel, so that a frame check sum is used to exchange data between the power line modem
detect excessive errors. In many cases, impulsive and the microcontroller. Every character sent (or
noise may cause unpredictable data loss without received) by the SCI has the following format: 1
modifying the frame check sum. Therefore, each start bit, 8 data bits, 1 parity bit (odd parity se-
byte is transmitted and received in an asynchro- lected), 1 stop bit. The transmit rate is 1200
nous mode inside a 11-bit type word including a bauds.
start bit, one stop bit, and an odd parity bit to ensure To start transmitting a frame, the transmitter buff-
byte integrity. er register is loaded with the preambule value FFh
in order to run the SCI. Each data byte end of
VIII.1.1 - Frame Format (see Figure 41) transmission results in the generation of an
TXHEM (transmitter buffer empty) interrupt re-
Each frame consists of a preamble, a header, a quest to load the next transmit data byte.
house address, a link control, a source address, a An outstanding character search is performed to
destination address, a data block, and a frame detect the header of an incoming frame (see
check sum. Figure 42). This is achieved by comparing each
The preambule is 8-bit field with a fixed value FFh: received data byte to the content of the data
it trains the FSK demodulator, allows a good uart compare register. If the incoming character
synchronisation for next character. The header matches, an RXA (receiver address match) inter-
consists of a 8-bit pattern AAh chosen with a low rupt is requested to enable the analysis of the next
probability of wrongly detecting noise or preamble data frame fields. Every time the reception of a
as the header. On a message reception, a match- data byte is completed, a RxD (receive data)
ing test is run on the house address field to over- interrupt request is generated to store the re-
come perturbations coming from a neighbouring ceived data byte.
Figure 40 : Frame Fields

HOUSE LINK SOURCE DESTINATION FRAME


PREAMBULE HEADER DATA
ADDRESS CONTROL ADDRESS ADDRESS CHECK SUM
7537-54.AI

24/32
ST7537 - POWER LINE MODEM APPLICATION

Figure 42 : Character Search Function

DATA DATA MATCH DATA DATA

DATA DATA CHAR DATA DATA

7537-55.AI
INTERRUPT INTERRUPT MATCH INTERRUPT INTERRUPT
INTERRUPT

- The Register File (see Figure 43) : VIII.2.1 - Initialization of ST90E28 core and on-
Among the 224 available global purpose regis- chip peripherals
ters, 16 registers are reserved as a transmit frame - Core initialization : The user and system stacks
buffer, another group of 16 registers is reserved are set up in the internal register file. The internal
as a receive frame buffer, 48 registers are dedi- clock frequency is set to 11.0592MHz. The priority
cated to the protocol kernel, and another group level of the main program is set to 7 (lowest),
of 48 registers is allocated to the system & user whereas the non-maskable interrupt (RSTO sig-
stacks, which leaves 96 registers for storage of nal) has the top level priority.
applicative values. - Initialization of the Input/Output ports : Only six
- The Input/Output Ports : input/outputs are required to exchange data be-
Two of the port pins must be used for the Rx/Tx tween the ST7537 and the ST90E28. The corre-
(P5.0) and WD (P5.1) output signals. Four must sponding pins are initialized as follows :
be initialized as alternate function for the RSTO NMI (Port 2 bit 0) → Al t e rn at e f u nct io n,
(P2.0), CD (P2.4), RxD (P3.6) and TxD (P3.7) open drain, TTL
signals. Details concerning the initialization of CD (Port 2 bit 4) → AF, OP, TTL
these ports are given in next section. RxD (Port 3 bit 6) → AF, OP, TTL
TxD (Port 3 bit 7) → Al t e rn at e f u nct io n,
Figure 43 : Register File Map
Push pull, TTL
Rx/Tx (Port 5 bit 0) → Output, Push pull, TTL
FFh WD (Port 5 bit 1) → OUT, PP, TTL
F0h PAGE
EFh The NMI pin is programmed rising edge sensitive,
E0h
SYSTEM whereas the CD/ input signal triggers an external
DFh interrupt request on a falling edge (INT1 pin) with
SYSTEM STACK a priority level set to 1.
C0h
BFh
As for the applicative features, each port pin is
B0h USER STACK initialized as follows :
AFh
display pin → Output, push pull, TTL
keyboard pin → Input, tristate, TTL
- Timer : The watchdog mode is disabled. Continu-
ous mode is selected with count down from a fixed
APPLICATION value of 767, each underflow resulting in an inter-
rupt request and reload of the fixed initial counter
value. The internal clock rate, prescaler and initial
count value are chosen to give an interrupt re-
50h quest every 555.56µs (1.8kHz = 36*50Hz =
30*60Hz). The timer counter is loaded with the
4Fh
value 767 to complete an end of count every
PROTOCOL
555.56µs. On each counter underflow an inter-
KERNEL rupt request (INT0) is generated with a priority
20h
level set to 0 (high).
1Fh
10h RECV BUFFER - Serial Communication Interface : The asynchro-
7537-56.AI

0Fh nous mode is selected. The serial interface pro-


XMIT BUFFER
00h grammed characteristics are : 8-bit word length,

25/32
ST7537 - POWER LINE MODEM APPLICATION

odd parity generation and detection, 1 stop bit Figure 44 : Main Program Flow Chart
generation, AAh header search. In this mode,
each data bit is sampled 16 times, so that each
data bit period will be 16 SCI clock periods long. MAIN
Entered on

The counter of the baud rate generator is loaded System RESET

with the fixed value 576 to set the SCI clock rate
MCU INITIALIZATION
to 16*1200 = 19200 bauds. The priority level of
all SCI interrupts (RXA, RxD, TXHEM) is set to 1.
ENABLE INTERRUPTS

VIII.2.2 - Main Program


TIME BASE
The main is automatically entered on system reset,
and first initializes the internal clock, stacks, ports,
register file, serial communication interface, and KEYBOARD
timer. Then the timer starts counting down towards
zero from an initial value of 767. Each time the TX_APPLICATION
counter clears to zero, an high priority interrupt
request will be generated, which will initiate an BACKGROUND

7537-57.AI
update of the network access parameters.
The main program loops around the main modules.

26/32
ST7537 - POWER LINE MODEM APPLICATION

ANNEXE A : DEMOBOARD OUTPUT IMPEDANCE

Figure 45
ST7537 DEMO BOARD IMPEDANCE
160

140

120

100
module (OHM)

80

60

40

20

7537-58.AI
0 50 100 150
frequency (kHz)

Figure 46
100

80

60
I
m 40
a
g 20
i
n
a 0
r
y -20
150 KHz
-40

-60

-80
7537-59.AI

0 20 40 60 80 100 120 140 160


Real

27/32
28/32
+10V
P2A
R14 +5V
Q6
619Ω
2N2907 1 L7805 3
(1%) C12 C13 C14 C15
IC3
C11 R15 R9 10µF 10µF
C8 R11
2.2µF 9.09Ω 47kΩ 100nF 2
100nF 180Ω 16V 100nF 16V
C9 R3
(1%)
C10 Q4
C7 0V
0V 2.2µF 2N2222 0V
100nF 100nF 10kΩ (1%)
LD1 LD2 LD3 LD4 R12
2 14 27 26 5 2.2Ω R10
R16 R17 R18 R19 2.2Ω
R2

IFO
TXFI
10kΩ 10kΩ 10kΩ 10kΩ

AVDD
DVDD
1

DEMI
VCM RAI 3
3 SW5 TP5
2 1kΩ
2 PAFB 6 Q5 R4
1 18 MCLK R8 C5
4 2N2907 2.2Ω 1µF
19 WD ATO 7
1kΩ
3 SW6 1 PABC 8 L1
2 20 Rx/Tx 10µH
Figure 47 : Application Board 7537 DEMO1

1 PABC 9 Q1 (r = 1.6)
P3 3
21 CD ST7537 TEST1 10 TP1 2N2222
SUBD9 (FEMALE)
1 3 SW7 22 TxD
2 TEST2 11 TP2
6 5
2 1
23 RxD TEST3 12 TP3
7 7
3 TEST4 13 TP4
8 3 SW8 24 RSTO +5V
2
ST7537 - POWER LINE MODEM APPLICATION

4 6 SW1 1
9 1 25 DVCC 2
5 8 3

AVSS
DVSS
XTAL1
XTAL2
C19 10µF
0V 28 15 16 17
IC2 XT1 SW2 1
C16 2
3 R5 3 TR1
1 C1+ VCC 16 +5V 2.2Ω C1
11.0592MHz 4
10µF C4
2 V+ GND 15 Q3 P3A
SW3 1
2N2907 6.8nF 2
3 C1- T10 14 2 470nF
R6 R7 R1
3 6
47kΩ 180Ω 1MΩ
C17 4 C2+ R1I 13 1
C20 C6 C2 C3
10µF P3B
5 C2- R10 12 10µF 100nF 22pF 22pF SW4 1
2 Q2 D1
6 V- T1I 11 3 2N2222
C18
10µF 7 T20 T2I 10 P2B
0V 0V 707VX-T1002N
8 R2I R20 9 1-2 : 20 turns
2-3 : 100 turns
3 4
MAX232CPE 4-6 : 20 turns

1 6
ANNEXE B : DEMOBOARD SCHEMATICS & LAY OUT

Bottom View

7537-74.EPS
ST7537 - POWER LINE MODEM APPLICATION

Figure 48 : Layout

F3 F4

SW1 TP1
C1
SW2 TP2

XT1 R1
SW3 TP3

TR1
SW4 TP4
R14 P1

R15
C19 C20 R3 C4
SW5 C2 C3
R2
5 C16 R19 LD4 C5 L1
6 SW6 Q2 C21
R18 LD3
Q3
P3 Q5
C17 SW7 R7
TP5

IC2 IC1 R6
R17 LD2
R5

R10
R4
9 SW8 R8
1 R12 D1
C18 R16 LD1 R9
R11
Q1 Q4
C6 C7 C8 Q6
C14
IC3

C13 C15

7537-75.EPS
C9 C10 C11 C12 P2
F6 F7

Bill Of Materials
Item Qty. Reference Part Item Qty. Reference Part
1 2 C11,C10 2.2µF 18 1 R14 619 (1%)
2 6 C7,C6,C8,C9,C12,C14 100nF 19 4 R19, R16, R17, R18 10kΩ
3 4 LD4,LD1,LD2,LD3 LED 20 5 C16, C17, C18, C19, C20 10µF
4 1 IC1 ST7537 21 1 C21 15nF
SW8, SW1, SW2, SW3,
5 8 22 2 PICO1, PICO2 PICO
SW4, SW5, SW6, SW7
6 1 XT1 CRYSTAL 23 2 C13, C15 10nF/16V
7 2 R8, R2 1kΩ 24 1 L1 10µH (r=0.8)
8 2 R6, R9 47kΩ 25 1 D1 DIODE
9 3 Q2, Q1, Q4 2N2222 26 5 TP2, TP1, TP3, TP4, TP5 POINT
SUBD9
10 3 Q3, Q5, Q6 2N2907 27 1 P3 (FEMALE)
11 1 C4 6.8nF 28 1 P2 ALIM
12 1 C1 470nF 29 1 P1 ALIM+
13 1 R1 1MΩ 30 1 TR1 TOKO
14 4 R4, R5, R10, R12 2.2Ω 31 1 R15 9.09kΩ (1%)
15 2 R11, R7 180Ω 32 1 R3 10kΩ (1%)
16 1 IC2 MAX232CPE 33 2 C2, C3 22pF
17 1 IC3 LM7805 34 1 C5 1µF

29/32
ST7537 - POWER LINE MODEM APPLICATION

Figure 49 : Master Configuration Board

+5V

SW10 SW11 SW12 0V


LOAD_1 LOAD_2 ROOM

R24 LD8

R24 10kΩ R22


4.7kΩ

R24 10kΩ

10kΩ
0V

+5V 0V
WD
C22
Rx/Tx 47µF
43 42 41 40 39 38 21 1
P50

P51

P52

VCC
P54

P55

GND
P53

10 P00 P30 30
11 P01 P31 31

12 P02 P32 32

13 P03 P33 33

14 P04 P34 34

15 P05 P35 35
RxD
16 P06 P36 36
ST90E28
17 P07 U1 P37 37 TxD

4 P10

5 P11
AS 22
6 P12
DS 23
7 P13
RW 24
XTALOUT

8 P14
XTALIN
RESET

9 P15
P20

P22

P23

P24

P25

P26
P21

P27

+5V
3 2 44 18 19 20 25 26 27 28 29
R19
100kΩ R23

4.7kΩ LD6
SW9 C23
RESET 2.2µF R20

0V 4.7kΩ LD7 0V

MCLK CD
R21
7537-77.EPS

RSTO 0V
4.7kΩ LD5

30/32
ST7537 - POWER LINE MODEM APPLICATION

Figure 50 : Slave Configuration Board


+5V 0V
WD
C22
Rx/Tx 47µF
43 42 41 40 39 38 21 1

P50

P51

P52

VCC
P54

P55

GND
P53
10 P00 P30 30
11 P01 P31 31

12 P02 P32 32

13 P03 P33 33

14 P04 P34 34

15 P05 P35 35
RxD
16 P06 P36 36
ST90E28
17 P07 U1 P37 37 TxD

4 P10

5 P11
AS 22
6 P12
DS 23
7 P13
RW 24
XTALOUT

8 P14
XTALIN
RESET

9 P15
P20

P22

P23

P24

P25
P26
P21

P27
+5V
3 2 44 18 19 20 25 26 27 28 29
R19 LOAD
100kΩ
R20
0V
SW9 C23 4.7kΩ LD6
RESET 2.2µF CD
LOAD
R21
0V 0V
MCLK 4.7kΩ LD5
7537-78.EPS

RSTO

31/32
ST7537 - POWER LINE MODEM APPLICATION

REFERENCES
1. WACKS (Kenneth P.) Utility load management using home automation, IEEE Transactions on
Consumer Electronics, Vol 37, N°2, pp 168-174, May 1991.
2. O’NEAL (J.B, Jr.), The residential power circuit as a communication medium, IEEE Transactions on
Consumer Electronics, Vol CE-36, N°3, pp 567-577, August 1986.
3. VINES (Roger M.), TRUSSEL (Jel), GALE (Louis J.), Noise on Residential power distribution circuits,
IEEE Transactions on Electromagnetic Compatibility, Vol EMC-26, N°24, pp 161-168, November 1984.
4. LEWART (Cass), Modem handbook for the communications professional, Elsevier Science Publishing
Co., 1987.
5. SGS-THOMSON Microelectronics, ST9 family 8/16 bit MCU programming manual, 1991, ST9 serie.
6. SGS-THOMSON Microelectronics, ST9 family 8/16 bit MCU technical manual, 1991, ST9 serie.
7. BORLAND, TURBO C : User’s manual, 1988.
8. CHAFFANJON D., Courants porteurs sur installation électrique d’un logement (aspects physiques).

Information furnished is believed to be accurate and reliable. However, SGS-THOMSON Microelectronics assumes no responsibility
for the consequences of use of such information nor for any infringement of patents or other rights of third parties which may result
from its use. No licence is granted by implication or otherwise under any patent or patent rights of SGS-THOMSON Microelectronics.
Specifications mentioned in this publication are subject to change without notice. This publication supersedes and replaces all
information previously supplied. SGS-THOMSON Microelectronics products are not authorized for use as critical components in life
support devices or systems without express written approval of SGS-THOMSON Microelectronics.

© 1995 SGS-THOMSON Microelectronics - All Rights Reserved

Purchase of I2C Components of SGS-THOMSON Microelectronics, conveys a license under the Philips
I2C Patent. Rights to use these components in a I2C system, is granted provided that the system conforms to
the I2C Standard Specifications as defined by Philips.

SGS-THOMSON Microelectronics GROUP OF COMPANIES


Australia - Brazil - China - France - Germany - Hong Kong - Italy - Japan - Korea - Malaysia - Malta - Morocco
The Netherlands - Singapore - Spain - Sweden - Switzerland - Taiwan - Thailand - United Kingdom - U.S.A.

32/32

Potrebbero piacerti anche