Sunteți pe pagina 1din 39

Broadband

RF preamplifier
For LW
For LW and
and MW
MW DX-ing
DX-ing
The preamplifier
described
described isis a push-
push-
pull type based on a
pair of inexpensive
JFETs. With a few
changes to the circuit,
circuit,
coverage may be
extended downwards
to VLF and
and LF,
LF, or
upwards to 30 MHz
and even VHF
(150 MHz).

While many designs


While many designs of broadband A PUSH-PULL
A PUSH-PULL active amplifier
amplifier devices,
devices, T1T1 and T2, are
and T2,
amplifiers
amplifiers covercover –3 -3 dB dB frequency
frequency AMPLIFIER
AMPLIFIER type BF256B JFETs
type BF256B JFETsthat
thatare
areintended
intended for
response
response limits
limits of of 33 to
to 30 MHz, or 1 to The basic concept of a push-pull ampli-
push-pull ampli- service up up totoVHF
VHF.TheThechoice
choiceofofJFETJFET
30 MHz, thethe VLF,
VLF, LF LF oror even
even thethe AMAM fier is illustrated in Figure
illustrated in Figure1. 1. Two iden- is not
not particularly
particularlycritical
critical—- the author
author
broadcast band (BCB, 540 to tical amplifiers,
tical amplifiers, A1 Al and A2, A2, each
each originally used the the NTE-451,
NTE-451, but but the
1700 kHz) isis rarely
1700 kHz) rarely covered.
covered. The pre- amplify one half
amplify -cycleof
half-cycle of the
the input general-purpose MPF102, MPF102, or or a rarer
rarer
amplifier discussed here here does,
does, offer-
offer- sinewave signal. At At the
the input, phase
phase bird like the
bird the 2N4416, shouldshould also work.
work.
ing a relatively high dynamic range splitting is achieved with the the aid
aid ofof a The JFETs sit
The JFETs sitbetween
between aa pair
pairof
ofsimilar,
similar,
and third -order intercept
third-order intercept point,
point, fea-
fea- transformer whose secondary winding winding back-to-back connected transformers,
back-to-back connected
tures whichAM
tures which AMBCBBCB Dxers will value value has a grounded
grounded centre
centretaptap(CT).
(CT). At the Tr1 and Tr2.
Trl and Tr2. The source bias resistor for
highly because
because of the the bone -crunching
bone-crunching output, aa similar,
similar, but
butreverse -con-
reverse-con- the JFETs, R1,
the JFETs, R1,and
and its
its associated
associated decou-
decou-
signal levels
levels put on the the air
air by
by local
local nected, transformer
transformer is is used
used toto recom-
recom- pling capacitor,
capacitor, C1,Cl, are connected to the
AM
AM BCBBCB transmitters.
transmitters.One One of of the bine the signal components. Here, the centre tap on on the
the secondary
secondary winding,
winding,B- B-
problems of AM
problems AM BCB BCB isis that
that those centre tap is on the primary winding, C, of input
input transformer
transformerTrl. Tr1.Similarly,
Similarly,
sought-after DX stations tend to be
DX stations and used
and used toto feed
feed in the supply
supply voltage. the positive supply
the positive supplyvoltage
voltage(approx.
(approx.99V) V)
buried
buried under
undermulti -kilowatt local
multi-kilowatt local sta- push-pull amplifier
The push-pull amplifier being
being bal-
bal- is applied throughaalimiting
applied through limitingresistor,
resistor,R2,
R2,
tions on adjacent channels. anced, it has a very interesting prop- to the centre tap on the the primary
primary of of the
the
The present amplifier
The amplifier achieves
achieves a erty: even -order harmonics are
even-order are can-
can- output transformer,
output transformer, Tr2. High and low
Tr2. High
decade (10:1)
(10:1) response (250 (250 kHz to to celled inin the
the output,
output, so the output
output sig- frequency supply decoupling is ensured
supply decoupling ensured
2,500 kHz). ItIt retains
2,500 kHz). retains the 50-Q 50-Ω input nal will be cleaner than for a by C3 and C2 C2 respectively.
respectively. NoneNone the
and output
output impedances
impedances that that are stan- single -ended (unbalanced
single-ended (unbalanced or asym- asym- less, the
the amplifier
amplifier should
should bebe powered
powered by
dard inin RF
RF systems
systems and is is is
is easily
easily metrical) amplifier
metrical) amplifier using
using the same same a reasonably stable and
reasonably stable andfiltered
filtered9-V
9-V sup-
sup-
modifiable
modifiable to to cover
cover other frequency active amplifier devices. Current consumption
ply. Current consumptionwill will be of the
ranges
ranges upup to
to 30
30 MHz. order
order ofof aa few
few tens
tens of
of mA.
mA.
As you will soon discover, a good
As good PRACTICAL
P R A C T I C A L CIRCUIT
CIRCUIT
directional antanna
antanna is is aa must
must forfor seri-
seri- The actual RF circuit is shown in
in Fig-
Fig- P O P U L A T I N G THE
POPULATING THE
ous
ous LWLW and and MW MW DX-ing.DX-ing. Some Some ure 2;
ure 2; it is derived from aa similar
derived from similar circuit BOARD
BOARD
sggested
sggested antenna designs designs are are given
given found in in Doug
Doug DeMaw's
DeMaw’sexcellent
excellent The PCB
PCB shown
shown in Figure 3 is unfortu-
unfortu-
(1).
reference(1).
reference book W1FB's
W1FB’s QRP QRP Notebook (2). The
Notebook (2). nately
nately not
not available
available ready-made.
ready-made.Pop
Pop--

This article is based oncircuit


based on circuitdiagram
diagramno.
no.7-12
7-12ininthe
thebook
bookSecrets
SecretsofofRF
RFCircuit
Circuit Design
Design by Joseph
Joseph
Design by Joseph J. Carr J. Carr,
Carr, published byTAB
published by TAB Books
Books (McGraw-Hill),
(McGraw-Hill),ISBN
ISBN0-07-011673-3
0-07-011673-3 (pbk),
(pbk), 0-07-011672-5
0-07-011672-5 (hc).
(hc).

Elektor Electronics 5/98


14
Visit our Web site at http://ourworld.compuserve.com/homepages/elektor_uk

ulating the board should not present


problems as only a handful of normal- 1
sized components are involved. The TR1 TR2
construction of the transformers is dis- A1
A
cussed below. It is advisable to house
the preamp in a metal case. In some
cases, particularly at HF and VHF (see
further on) a screen may be required CT U DC
between the input and the output so
that they can not ‘see’ each other. In
this way, you prevent oscillation or
other instability.
B
A2
BUILDING THE
TRANSFORMERS
In the case of this project, the key to 979012 - 12

success is a pair of carefully wound


transformers. By comparison, the con- Figure 1. Basic opera-
struction of the rest of the amplifier is these two ends ‘A1’ and tion of a push-pull Keep twisting until you
far less critical, as long as all connec- ‘A2’ using small pieces amplifier. Thanks to obtain a pitch of about
tions are kept as short as possible. of paper. The primary the balanced opera- 3 to 5 turns per cm.
The cores used are binocular (‘two- of Tr1 is now com- tion, even-order har- To start the sec-
hole’ or ‘pig’s snout’) ferrite beads type pleted. monics are cancelled ondary winding,
BN-43-202 from Amidon Associates (3), The secondary out at the output. remove the insulation
or beads made from 4C6 material windings, B-C, are of both wires at one
(Philips Components). wound together in the end of the twisted pair,
Each transformer contains three bifilar manner, and consist of 12 turns and tin the exposed parts. Label one
windings. In each case, the ‘B’ and ‘C’ each of 0.3-mm lacquered wire. First, free wire end ‘B1’, the other, ‘C1’. Pass
windings are 12 turns of 0.3-mm twist the two wires together using an the wire through the hole of the core
(SWG30; AWG30) enamelled copper electric drill with speed control. Take opposite ‘A1’, and wind 12 turns. Cut
wire wound in a bifilar manner. The two pieces of wire, each approximately the twisted pair wires off to leave
coupling link on each transformer is 85 cm long, join the about 1 cm free. Tin the
winding ‘A’. On the input transformer, ends together and ends as before.
Figure 2. Circuit dia-
Tr1, ‘A’ consists of 4 turns of 0.15-mm chuck them up in an Connecting the free
gram of the broad-
(SWG38 or AWG36) lacquered copper electric drill. The other ends of the twisted
band preamplifier.
wire (CuL), while on Tr2 it consists of ends of the wire are Provided you pay wire requires an ohm-
two turns of the same wire. The pri/sec also joined, and attention to the design meter or continuity
ratios of the transformers (1:9 for Tr1 anchored in a bench and construction of tester to see which wire
and 36:1 for Tr2) match the source and vise. Back off and pull the transformers goes where. Identify
drain impedances to 50 Ω input and the wire taut. Turning (using this month’s the end that belongs
output impedance. For clarity’s sake, the drill (careful, the Datasheets), the pre- with ‘B1’, and label it
the winding and connection reference wire may break and amp can be modified ‘B2’. The other pair is
letters and numbers at the output of whip around the drill for operation at VLF ‘C1-C2’. ‘C1’ is con-
the amplifier are shown in Figure 4a. chuck), causes the two (down to 10 kHz or nected to ‘B2’ to make
The other drawing, Figure 4b, is for wires to twist together. less) or VHF (up to the centre tap.
those of you who are interested in 150 MHz).
higher frequencies, say, up to 30 MHz
or perhaps even VHF, when a ferrite
K1
(or iron-powder) ring core is used.
More about this further on. 2 D1 R2
27Ω
First, let’s agree on what a ‘turn’ is.
Look at Figure 5, which shows what 1N4001
we mean by one turn on a ferrite binoc- C5 C4 C2 C3
ular core (left-hand drawing) and two
turns (right-hand drawing). 10µ 63V 100n 10µ 63V 100n
Start with the coupling winding, A,
on the input transformer, Tr1. Strip, TR1, TR2 = BN-43-202 Amidon;
scrape or burn the lacquer for about 4C6 Philips

5 mm from one end, and tin it with sol-


T1
der. Pass the wire through one of the TR1 TR2
holes of the core, across the barrier
A1 B1 B1 A2
between the two holes, and then back
through the other hole. This ‘U’ R1 BF256B
shaped turn counts as one turn. To B2 27Ω B2
make transformer Tr1, pass the wire
C1
through the holes three more times, to
C1 C1
make four turns. The wire end should

be back at the same core side as the BF256B
start. Cut the wire to allow a short A2 C2 C2 A1
length to connect to the PCB. Remove
the lacquer coating from this free end,
and tin the exposed part. Now label T2 979012 - 11

Elektor Electronics 5/98 15


Visit our Web site at http://ourworld.compuserve.com/homepages/elektor_uk

COMPONENTS LIST

T
3
H1
H4

Resistors:
TR1
R1, R2 = 27Ω

K1
C1

Capacitors:
C1 = 1µF solid MKT
C2,C5 = 10µF 63V radial
T2

T1 C3, C4 = 100nF
C4

D1
Semiconductors:
C3

D1 = 1N4001
R1

T1,T2 = BF256B (see text for alterna-


C5

tives)
R2
tnemgeS )C(

979012-1
1-210979

(C) Segment
979012-1
Miscellaneous:
C2

K1 = mains adaptor socket, PCB


TR2

mount
Tr1,Tr2 = Binocular core, Amidon
type BN-43-202, or Philips core
H3

H2

made from type 4C6 material (see


T

IN1

text).
Windings:
Tr1A = 4 turns 0.15 mm CuL wire
Figure 3. Printed cir- (SWG38/AWG36)
Transformer Tr2 is cuit board artwork has not been tested in TR1B = 12 turns 0.3 mm CuL wire
made just like Tr1, but (board not available practice. (SWG/AWG30)
with only two turns on ready-made). Alternatively, select TR1C = 12 turns 0.3 mm CuL wire
the coupling winding, a powdered-iron core, (SWG/AWG30)
rather than four. such as the Amidon T- Tr2A = 2 turns 0.15 mm CuL wire
Before removing the labels and 50-2 (red) or T-50-6 (yellow). About (SWG38/AWG36)
mounting the transformers onto the 20 turns will be needed for the ‘A’ wind- TR2B = 12 turns 0.3 mm CuL wire
(SWG/AWG30)
PCB, subject them to a final, thorough, ing on Tr2, and seven turns for the ‘A’ TR2C = 12 turns 0.3 mm CuL wire
wire-for-wire check using your ohm- winding on Tr1. You may want to (SWG/AWG30)
meter. experiment with other core types and
turns counts to optimise for the specific
MODIFYING FOR section of the shortwave spectrum you
HIGHER AND LOWER wish to cover. A tip: use Amidon’s con-
FREQUENCIES densed design information on toroid 43-202 device. Doubling the number of
A variation is to build the preamplifier cores found on this month’s Datasheets. turns in each winding is a good start-
for the shortwave bands (up to The third variation is to make the ing point for amplifiers below 200 kHz.
30 MHz). This can be accomplished amplifier cover much lower frequen- The type 73 core works down to 1 kHz,
easily enough. First, reduce C1 to cies (e.g., well down into the VLF so with a reasonable number of turns
100 nF. Second, build the transformers region). The principal changes needed should work in the 20 to 100 Hz range
on a toroid (ring) core rather than a are the cores for Tr1 and Tr2, the num- as well.
binocular one. In Dough DeMaw’s ber of turns of wire needed, and the (979012-1)
original design (op-cit.) a type FT-37-43 capacitors. The type 43 core (from Ami- References:
ferrite ring core was don) will work down 1. Small loop antennas for MW AM BCB, LF
used with the same to 10 kHz or so, but and VHF reception, Elektor Electronics
Figure 4. Naming the
12:12:2 and 12:12:4 turns wire ends of the pri- requires a lot more June and July/August 1994.
ratios. Winding lac- mary and secondary turns to work effi- 2. Published by the ARRL, 225 Main Street,
quered wire on a ferrite windings (a), and ciently in that region. Newington, CT 06111, USA. Internet:
ring core is not difficult using a toroid core to The type 73 material, www.arrl.org.
— see Figure 4b. Cores make the transformers which is found in the 3. Amidon Associates, 2216 East Gladwick,
made from 4C6 material if you want to use the BN-73-202 core, will Dominguez Hills, CA 90220, USA. Inter-
(from Philips) should preamp for VHF (b). provide an AL value of net: www.amidoncorp.com.
also be suitable for use On a toroid core, too, 8,500, as opposed to
above 50 MHz, but this the bifilar winding ‘just’ 2,890 for the BN-
technique is used. Figure 5. One turn
(left) and two turns
(right) on a binocular
4 A1
TR2 5 core.
A2
B1 A2

A1
B2
Ub

C1

C2 A1
A2 C2
B2
B1 979012 - 14
979012 - 13 C1

Elektor Electronics 5/98 17


7?,
Monitor/TV
refresh rate
rate meter
eye strain
obviates eye strain

The number of complete pictures per


The field
field frequency of a computer monitor
monitor or or TV second
second on aa monitor
monitor or ortelevision
television
screen is a compromise between the
compromise between the require-
require- screen is the frame frequency, which
which is is
half the number
number of of rasters per
per second,
second,
ment for as many horizontal
horizontal lines as possible
possible that
that is.
is. half the
the field
field frequency.
frequency. Euro-
Euro-
and the avoidance
avoidance of of flicker. Such brightness,
brightness, pean
pean television uses a field frequency
of 50
50 Hz,
Hz, and
and American televison
televison one
one
luminance or colour
colour fluctuations
fluctuations ifif fewer
fewer than
than of 60 Hz
Hz (these frequencies
frequencies are the the
same those of the
same as those the mains
mainssupply
supplyor,
or,in
in
25–30
25-30 perper second
second may
may cause
cause eye
eye strain
strain and
and the US,
US, the
the household
household AC AC supply).
supply).
headache. It is often possible to increase the field Since the
the consequent frame frequency
of 25 Hz
Hz and 30 Hz
and 30 Hz respectively
respectivelyisislow,
low,
frequency and so prevent such discomforts. The most broadcast television companies
meter described in this
described in this article
article enables
enables the the field
field
frequency to be determined.
determined. ** Definition
Definition is a measure of the resolution of the
the
system which in turn depends on
turn depends on the number
number ofof
lines per
per frame.
frame.
Visitour
Visit our Web
Website
siteatathttp://ourworld.compuserve.com/homepages/elektor_uk
http://ourworld.compuserve.com/homepages/elektor uk

11
C6
5V
:100n
K3
75`
0
0
25k RS
K2 0
RIW
20 0
5_0 015 0 PBO
2
5
0
0
10 CTRD11/101
0
CTRDIV101 3
PDO
'Cl PB1
13
-0
4_0 14 YSYNC DEC 2
DEC 14
MDX PD1 Pa2 -0
HSYNC
IC5 L IC4 2
4
14
6
PD2
AT90 PB3
15
-0
14 14 7 16
3-0 0113 3 3
2 IC3 PD3 S1200 PB4 0
3 10 13 IN 10 8 17
4 4 PD4 PB5 -0
2_0 012 4017 5 4017 5 8x °
10 9
PDS
16PC
PB6
16
-0
7_0 rt.
5 7 11
R136 PB7
1_0 o- 6 5 4051
RESET
L
7
6 5 6
CT=0 CTPO 4 G8 XT1 XT 2
11 7
9 9

CT -5 CT ->5 5V
12
+ 4
IC2f C2b

T3
IC6
X1 13

E,
IC2a 3

-
5V IC2e 32-758 kHz IC 2.21
C2
10 C11
1N4148 119

K1
!RFD
9120
22p
Er 1 061iov

2
+

IRFD9120
9V
13mS *zie tekst
02 * voir texte

H
1N4148
*see text
*siehe Text
U- C) 980040 - 11

Figure 1.
Figure 1. Circuit dia-
dia-
gram of the
gram the refresh
refresh
use aa system
system of
of inter-
inter- rate meter.
rate meter. Measure-
Measure- modern
modern displays
displays use aa of the display andand it will indicate the
laced scanning. In this ments may
ments may be taken
taken 4 frame
frame frequency
frequencywell
wellin
in frame frequency used. used. It It may
may also
also be
system, the lines of suc-
the lines ivia
via an
an electronic
electronic eye
eye excess of 100
100 Hz
Hz (at the
the connected to thethe video
video output
output(or
(orVGA
VGA
cessive rasters
cessive rasters are not or via an
or an electrical time of writing -– early
early output) when
when itit will
will indicate the line
superimposed on
superimposed on each
each link.
link. 1998–- aa frequently
1998 frequency andand the
the field
field frequency.
other, but
other, but areare inter- encountered value
value is circuit is
The circuit
The is based
based on ICi, IC1, an
an
laced. 132 Hz).
132 Hz). Modern
Modern video
video enhanced RISC processor from Atmel's
enhanced RISC Atmel’s
In the past, considering the the avail-
avail- cards can produce
cards produce such
suchhigh -value
high-value AVR
AVRfamily
family(see
(seedata
data sheets
sheets in our Jan-
able bandwidth
able bandwidth and the then current current frequencies with
frame frequencies with aabandwidth
bandwidth ofof uary 1998
1998 issue). The device device makes
makes
technology, a frame frequency
frequency of of 25 Hz 250MHz.
250 MHz.These
These values
values ensure
ensure anan available 15
available 15 I/O
I/0 lines,
lines, 11 Kbyte
Kbyte flash
flash
(or 30
(or Hz) was
30 Hz) was a reasonable
reasonable value.value. absolutely stable display. memory, andand64 64 bytes
bytes EEPROM.
EEPROM. It has has
However, many
However, many people can discern discern a number of of other
other facilities
facilities as
as well,
well,
fluctuations of 25 25 per
per second
second and they, CIRCUIT
C I R C U I T DESCRIPTION
DESCRIPTION such as an 88-bit
-bittimer
timerand and aa watchdog.
watchdog.
therefore, experienced
therefore, experienced eye eye strain or The meter,
The meter, whose circuit diagram is is internal structure is shown in Fig-
Its internal
headache
headache whenwhenwatching
watchingtelevision
television oror shown in Figure
shown in Figure 1,
1, is highly suitable for ure 2.
ure 2.
an old computer monitor. quickly monitoring
quickly monitoring the the frame
frame fre-
fre- This article is
is not
not the place to to give
give aa
Manufacturers of of television
television sets quency of a computer
computer monitor.
monitor. All that detailed analysis of the the operation of the
have
have solved
solved this
this problem
problem by by increasing
increasing needs to be is to hold the unit in front
front
the frame frequency
frequency to to 100 Hz with the the
aid of a digital
digital buffer
buffer memory.
memory. The The
result
result is
is a stable picture.
picture. The
The solution
solution
had
had to
to be
be incorporated
incorporatedin
receiver because the
inthe
thetelevision
the transmission
television
transmission stan-stan- On the
On the CD-ROM
CD-ROM
dard cannot
cannot be be altered.
The situation
The situation was even worse worse in in This
This project
project is one of the many
many contained
contained on
computer monitors, since users spend spend the CD-ROM
CD-ROM `bilD-µC
‘µP-µC Hard&Software
Hard&Software 97-98’.
97-98'.
many hours
many hours aa day
day in
in close
close proximity of This CD-ROM
This CD-ROM contains
contains more than 100 pro-
pro-
the screen. Moreover, the definition* of resulting from
jects resulting from the
the design
design competition
competition in
a monitor is muchmuch better thanthan that
that of
of aa our July/August 19971997 issue. On the disk can
receiver. This
television receiver. Thismeans
means that
that the be found all kinds of background information,
frame frequency
frame frequency (sometimes
(sometimes called called including source codes of of several
several projects,
refresh rate) of a monitor needs to be including the present one. If you wish to pro-
much higher
much higher than
than in in a television
television gram the processor yourself, this CD-ROM is 1..V.r.2 mn r2NN4. ed F. PA r
.1.
Jeie way red.

receiver†. Whereas in early monitors,


receivert. must. See
a must. See the Readers
Readers Services
Services section
section :1 IA I. lukr:uk ckil...2": FAYNI
signal. The multiplexer
multiplexer is controlled
controlled as as
2 appropriate
appropriatevia viaports
portsPD4
PD4 andandPD5.
PD5.

XTAL1
-III- XTAL2
Network
a reset
reset pulse
R1-C1-IC2a-IC2b provides
NetworkRj-C1-IC2a-IC26
pulse whenwhen the
provides
the supply
supply is is
8 -BIT DATA BUS switched
switched on. on.
-L- electronic eye
The electronic eye consists
consistsof T2 and
of T2 and
GND digital bufferIC2c.
digital buffer IC2c.
PROGRAM STACK WATCHDOG TIMING AND
power supply
The power supplyisis slightly
slightly more
more
COUNTER POINTER TIMER CONTROL
A
RESET
elaborate
elaborate than usual since since it is pro-
vided
vided with
with ananelectronic
electronic on/off
on/off switch.
switch.
PROGRAM
FLASH
HARDWARE
STACK
MCU CONTROL
REGISTER
This
This automatically
automatically switches
switches off the the
supply
supply when when the the meter
meter has has not
not
INSTRUCTION TIMER/
received any input input signal
signal for
for 30
30 sec-
sec-
REGISTER
GENERAL
COUNTER onds.
onds.
PURPOSE
REGISTERS The direct
The voltage output
direct voltage output of the
4
INSTRUCTION
DECODER
z INTERRUPT
UNIT 4
mains adaptor
adaptor is is applied
applied to to capacitor
capacitor
C3 via transistor
C3 via transistor T T3. Whether this tran-
3. Whether tran-
CONTROL
EEPROM
sistor isis on
sistor on or not depends
depends on on the
the
LINES
potential at
potential at its gate.
gate. When
When S1 S1 is is
pressed, the gate
pressed, gate becomes
becomes negative
negative
STATUS
REGISTER with respect to the source and and the tran-
sistor comes on. The meter is then actu-
then actu-
H PROGRAMMING 4 SPI
ated. Shortly afterwards,
ated. Shortly afterwards,IC1 enablesT1
IC1 enables T1
LOGIC
via port
port PD6,
PD6, so that, even even when
whenS1 S1 is
is
released, the supply remains
remains on. When When
port PD6
port PD6 isis made
made low, low, the meter meter
switches itself off again.
switches itself again.
DATA REGISTER DATA DIR. DATA DIR.
PORTB REG. PORTS REG. PORTD

1111111
PORTB DRIVERS PORTD DRIVERS CONSTRUCTION
C ONSTRUCTION
conveniently built
The meter is conveniently built on on the
the
single -sided printed-circuit
single-sided printed -circuit board in in
1111161, 980040 -12
Figure 3.
Figure 3.
PBS - PB7
The on/off switch, S Sj, and the
1, and the elec-
elec-
tronic eye, TT2
tronic eye, 2 must
must be
be fitted
fitted on the
figure 2.
Figure 2. Block
Block dia- dia- enclosure of the
enclosure the meter.
meter. All other com-
All other com-
processor, so the gram of the enhanced The oscillator is
The ponents are are soldered
soldered on on totothe
thePCB. PCB.
description is
description is restricted
restricted RISC processor,
RISC processor, which
which designed around two
designed two Mind the
Mind the polarity
polarityof ofT3.T3.
to the functions
functions itit ful-
ful- is housed
housed in in aa DIL20
DIL20 separate inverters to
separate to The inductor,
inductor, L1, L1, is easily made. made. ItIt
fils in
fils
meter.
meter.
in the

When the
the present
present

the processor
ase.
case.
I
ensure stable operation
ensure
of the crystal.
operation
crystal. The
The clock
clock
applied to pin
signal is applied pin 55
consists of twotwo turns
turns of 0.3 mm
elled copper wire around
rite bead.
around aa small
mm enam-
small fer-

is clocked at 12 MHz, it achieves an


12 MHz, an IC1 via buffer
of IC1 bufferIC2f.
IC2f. Connector K2
Connector should be fastened
K2 should fastened to to
operating
operating speedspeedofof1212MIPS MIPS(million
(million The B ports ports of of IC1
IC1 (pins
(pins 12-19),
12–19), the mother board board with
with screws,screws, nuts
instructions
instructions per per second),
second), which
whichisis far far which contain the the signals
signals for driving and washers
and washers before
before any any of of its
its pins
pins are are
more than
than required
requiredfor for the
the meter.
meter. Con- the liquid -crystal display (LCD),
liquid-crystal (LCD), areare soldered.
soldered.
sequently, a clock frequency is is used
used linked
linked to to connector
connectorK3. K3. There are various ways ways of of linking
linking
that makes
makes simplesimple timing
timing possible.
possible. The control signals for the the LC
LC dis- the motherboard to to the the LCDLCD board.board.
Crystal X1
Crystal X1 isis aa readily
readily available
available compo- play, RS RS,, RRiW and E,
/W and E, are available at the Ribbon cable is best best ifif aa permanent
permanent link link
nent with a fundamental frequency of
nent ports PD0, PD1
ports PD0, PD1 and PD3.
and PD3. is wanted. On On thetheprototype,
prototype,aasingle single--
32,768
32,768 kHz.
kHz. ItIt isisused
used extensively in the the The external interrupt
interruptinput, PD2,is
input,PD2, is row IC socket
socket with
with wire wrap pins is
watch and
watch andclock
clock industry,
industry,since
since its
its fre-
fre- used for monitoring
monitoring external
external signals.
signals. used. The LCD has a single row of pins
used. The
quency
quency isis aamultiple (215). This sim-
multipleofof22(215). Which signal depends depends on on multiplexer
multiplexer that protrude
protrude from from the the board
board at at two
two
plifies the derivation
plifies the derivation of of a signal
signal of of IC
IC33 ititis
isthe
the output
output of the electronic eye,
the electronic eye, sides. Provided everything
everything is is measured
measured
11 Hz.
Hz. T2, the horizontal
T2, the horizontal synchronization
synchronization sig- sig- accurately, this
accurately, this type of link link is is easily
easily
additional benefit
An additional benefitof ofaalow -fre-
low-fre- nal (reduced to to 1/100th
1/100th via via IC4
IC4 and
and uncoupled.
uncoupled.
quency crystal is its low low current
current drain. IC5),
IC5), or or the vertical synchronization
synchronization The display boardboard must must be be fitted
fitted toto
the mother
the mother board
boardon onfourfour10 10 mm
mm spac-spac-
ers. The
ers. The prototype
prototype construction
construction is
shown in
shown in Figure
Figure4. 4.
Experimentation
Experimentation When all construction
When construction work
pleted, connect a 9 V
workis
V battery
is com-
battery to the
com-

meter and press S. S1.TheThe display


display will will
The software
The software forfor the
the processor
processor was
was developed
developed with aa program that that can be then read 'searching
‘searching …’ ...' with under-
downloaded from
downloaded from the Internet: http://www.atmel.com neath it 'Hz'.
‘Hz’. When
When aa measurement
measurement
At this site will
will be found an assembler, aa debugger
debugger and software for the devel- value has been established, the the display
display
opment board. The
opment The processor is programmed with the the aid
aid of
of aa serial
serial pro-
pro-
reads 'Refresh
‘Refresh Rate'.
Rate’. If the the display
display
remains grey,
remains grey, it is possible that the the con-
con-
grammable interface
interface (SPI).
(SPI). In short, all requisite
requisite software
software is
is available
available free
free via
via trast has not beenbeen adjusted
adjusted correctly.
correctly.
the Internet.
the Internet. The
The processor
processor may be programmed with the the 'Handyman'
‘Handyman’ pub pub-- P1 until some text appears on the
Turn P1
Turn
Visitour
Visit our Web
Website
siteatathttp://ourworld.compuserve.com/homepages/elektor_uk
http://ourworld.compuserve.com/homepages/elektor uk

list
Parts list C5 C8 C9

H4
K2
Resistors: 3

H1
Resistors:
H2

R1 = 10kf2.
= 10 kΩ C IC3 IC4 IC5
R2= T2
R 2 =1MQ.
1MΩ

R4
R5
E
R
R33= 100kf2.
= 100 kΩ R3 R1
C1
R 4, R
R4, R55= 47kf2.
= 47 kΩ L1

tnemgeS )C(
1-040089

R7

R8
R9
R 6, R
R6, R77= 4.7kf2.
= 4.7 kΩ
IC1 IC2 T1
R
R88= 3.9kf2.
= 3.9 kΩ

D2
D1
R
R99= 15kf2.
= 15 kΩ

C7
C6 P1
Pi1 ==25
P 25kf2.kΩ (27
(27 kf2.)
kΩ) preset
preset poten-
poten- S1

T3
R6 R2 + -
tiometer
tiometer K1
C2 X1

H5

H3
H6

C4
Capacitors:
Capacitors: K3 C3 980040-1
IC6
Ci1 ==10
C 10[IF,
µF, 16
16 V,
V, radial
022 =
C = 22
22 pF
pF
C3,
C 3, C04
4== 4.7
4.7 [IF,
µF, 16
16 V,
V, radial
C5-09
C 5–C9 = = 0.1
0.1 [IF
µF

Inductors:
Inductors:
LLi1 ==22turns
turnsofof0.3
0.3mm
mmenamelled
enamelled
copper wire on
on aa ferrite
ferrite bead
bead 980040-1
(C) Segment
Semiconductors:
Semiconductors:
Di,
D 1, D2=
D2 =1N4148
1N4148
Tl1 =
T =BC547
BC547
T2
T 2 == SFH309-4
SFH309-4 (do not use -F
-F ver-
ver-
sion)
T
T33== IRFD9120

circuits:
Integrated circuits:
IC
IC11 =
= AT90S1200 (Order
(Order no
no
986510-1)
986510-1)
IC2
IC 2= = 74HC04 Figure 3.
Figure 3. Printed -cir-
Printed-cir-
IC on the display.
display. The measurement is cuit board for for the
IC33= 4051
= 4051
IC 4, IC
104, 5=
IC5 4017
= 4017 continued as long as the
continued the signal is pre- refresh rate
rate meter.
meter.
IC
IC66= 78L05
= 78L05 sent at the relevant input. When it is
no longer
no longer there,
there, bothboth inputs
inputs areare
Miscellaneous:
Miscellaneous: scanned again
scanned again for
for 250
250 ms. If If no
no input
input
Ki1 ==clip
K clipfor
for99 VV battery
battery signal isis detected for 30 seconds, the
K
K22= 15-pole
= 15 HD-sub-D
-pole HD -sub -D connector,
connector, meter switches
meter switches itself
itself off
off automatically.
automatically.
female, right-angled, for board
mounting (for link to to VGA
VGA connec-
Make sure
sure that
that the
theswitching
switchingoff off occurs
occurs
tor on
on computer)
computer) only when no light is incident on the the
K3
K 3= = 14 -way SIL header
14-way header meter. It is
is advisable
advisable to to cover
cover the
the meter
meter
S1 = = push-button
push-button switch,
switch, 11 make
make when it is not in use.
when
contact The source code may be found found onon
X1
X 1= = crystal 32,768 kHz the CD-ROM ‘µP-µC 'OTC Hard &Software
Hard&Software
9 V battery 97-98’
97-98' in
in directory NL/01.
directory NL/01.
LC module,
LC module, 2×16
2x16 characters
characters
[980040-1]
[980040-1]
PCB Order no.980040 (see Readers Readers
Services towards the end of this this
issue)
issue)
Programmed controller Order no.
986510-1 (see Readers Services
towards
towards thethe end
end ofof this
this issue)
issue)

with the optical sensor is not the only


with
way: measuring direct at at the
the output
output of
the video
video card
card is is also
also possible.
possible. This
This is
effected by linking the meter meter via
via aa suit-
suit-
able cable
able cable to to the
the output
output and waiting
until the
the measurement
measurement results results appear
appear
the display.
on the
software
software
The software
The software is is contained
contained in in the
the
processor. Immediately after the meter
the meter
has
has been
been switched
switched on, on, aa routine
routineisis
started by which the two inputs inputs
of the meter are scanned for
of 4. Photograph
Figure 4. Photograph of
250ms.
250 ms. IfIf the
the optical sensor the completed
the completed proto-
proto-
detects a signal, or the vertical vertical type. Note how the
the LCD
LCD
synchronization appears
synchronization appears on the board fitted to the
board is fitted the
relevant
relevant connector, the appropriate
appropriate mother board
mother board onon four
four
f
DCF-controlled
LED clock
Replica of
Replica of
Rhine Tower
Clock
Visitors to Germany maymay
have seen the world's
world’s
largest digital clock which is
largest
housed in a 234 metres high high
transmitter tower on the
banks of the Rhine in Dus-
Düs-
seldorf. The time is indicated
indicated
by vertically arranged lamps
lamps
that shine their light through
through
`portholes' (glazed round
‘portholes’ round
windows). This article
describes a miniature
replica of this Rheinturmuhr
Rheinturmuhr
Tower Clock).
(Rhine Tower Clock). It is
controlled byby an
an Atmel
Atmel
processor and synchro-
nized by a DCF
DCF module.
module.

If you have never


never visited
visited Diisseldorf
Düsseldorf form the 'clock'.
‘clock’. They
They indicate,
indicate, from
from
(about 35 miles
miles northwest
northwest of Bonn andand top to
to bottom,
bottom, tens
tens of
of hours,
hours, single
single
only 27 miles
miles from
from the Dutch border)
border) hours, tens of minutes, single minutes,
you
you can see see photos
photos of of the
the world's
world’s tens of
of seconds,
seconds,andand single
singleseconds—
seconds-
largest digital clock
largest digital clock on
on the Internet
Internet Figure 2.
see Figure 2.
and download
download aa display
display version
version from
from
it (http://www.düsseldorf.de),
(http://www.diisseldorfde), which
which is
is CIRCUIT
C I R C U I T DESCRIPTION
DESCRIPTION
reproduced
reproduced in in Figure
Figure 1.
1. In the
the electronic replica of the tower
tower in
in
Thirty-nine of the sixty-two
sixty-two win-
win- Figure 3, diodes
Figure D2–D40 show
diodes D2-D40 show the time;
Design by D. de Mulder
Mülder dows along
along the height of the tower
tower

A26
26 Elektor Electronics
Electronics 5/98
Visitour
Visit our Web
Website
siteat
athttp://ourworld.compuserve.com/homepages/elektor_uk
http://ourworld.compuserve.com/homepages/elektor uk

ment and digit


digit lines
lines are all linked to
11 connector K1,K1, itit would
would be possible to
use
use aa standard
standard77-segment
-segment LED LED display
display
for indicating the time (with suitably suitably
modified software
modified software in in IC1),
IC1), but the the
result would
would nono longer
longer be
be aa replica
replica of
the Rhine
Rhine Tower
Tower Clock.
Clock.
When the towertower display
display is is used,
used,
K1
K islinked
1 is linked via
via aa length of flatcable
flatcable
to its counter part,
part, K2, on the display
K2, on
board. On this
board. this board,
board, all
all segment
segment
and digit lines are used to drive the
LEDs.
LEDs. In In the circuit
circuit diagram,
diagram, the the
groups of LEDs (with (with interconnected
interconnected
anodes) are connected (from left to
right) to the
the relevant
relevant digitdigit line
line ofof the
the
display driver as shown in the the table.
table.
The horizontal
The horizontal segment
segment lineslines run
run

} restaurant lighting

0 hours: tens
hours:

0
Figure 1. The Rhine
Figure 0
0
Tower Clock
Tower Clock on
on which
which 0
0 hours
the present
the present replica is 0
0
!Lased.
based. 0
0
0 0 } tower lights(red)
tower lights (red)
0
0
0 Iminutes:
minutes: tens
tens
diodes D46-D48 portray the
D46–D48 portray the lighting of and Mode,
Mode, which
which cause
causeeither
either44-bit
-bit 0
0
the revolving
revolving restaurant, and diodes control information or or an
an88-bit
-bit (one
(one 0
D41-D45
D represent aircraft
aircraft warning byte) data
data word to be displayed. The 0
41–D45 represent warning byte) 0
lights. sequential data words are
sequential are automati-
automati- 0
0 minutes
arrangement of
The arrangement of the
thelight -emit-
light-emit- cally stored in
in an
an88-byte
-byte buffer at at each
each 0
0
ting diodes
ting diodes on the the display
display boardboard positive WRITE pulse.
positiveWRITE pulse.They
They may
may be dis-
dis- 0
0
shown in Figure
Figure 4 coincides with the the played directly
directly or in in decoded
decoded formform 000 }tower
towerlights
lights(red)
(red)
representation in
diagrammatic representation in Figure (hexadecimal
(hexadecimal or or binary
binarycode
code-to-7
-to -7 seg- 0
0
2, so that aa faithful
2, faithful small-scale
small-scale replica
replica ment). In the present application the
ment). 0 Iseconds:
seconds: tens
tens
0
is obtained.
is obtained. This
This arrangement
arrangement is, is, of
of decoder is, of course, not used. The The 0
course, not necessary: the the LEDs
LEDs may individual LEDs
LEDs of of the clock
clock can be 0
0
just as well be arranged as a tradi- tradi- enabled by the
enabled the microcontroller 0
0
horizontal bar.
tional, horizontal bar. through direct
through direct control
control of the
the eight
eight seg-
seg- 0 seconds
seconds
0
The use of a programmed
The programmed Atmel Atmel ment drivers. 0
0
saves a lot of components.
controller saves Normally,
Normally, IC IC2 can control
2 can control up to to 0
Apart from the
Apart the controller,
controller, IC1,IC1, and
and eight 77-segment
-segment displays
displays with com- com-
voltage regulator IC3, only one more
IC3, only mon anode
anode in
in multiplex.
multiplex. Since
Since the
the seg-
IC is needed: IC2.
needed: IC2.
Display driver IC2 is aa very
IC2 is very useful
circuit element,
circuit element, which
which contains all that
is needed to drive
is drive anan LED
LED display in in Figure 2. The arrange-
multi -modeoperation
multi-mode operation under
under thethe con-
con- ment of
of the
the LEDs
LEDs on
on
trol of a microprocessor or microcon- the display board
board is
is
troller. identical to that of the
The device is linked
linked to to the
themicro
micro-- original clock.
original clock.
controller viatwo
controller via twocontrol
controllines,
lines,WRITE
WRITE 980035 - 11
980035-11

Elektor Electronics
Electronics 5/98 27
5V
5V
3 R6 R3
C1 C5
R1 R2
C6 K1

220Ω
10k

47k

47k
zie tekst
* see text 4µ7 100n 100n 1
* voir texte 63V 2
* siehe Text C7
20
19 3
* SEGA
27 4
100n 1 12 12 3 5
RST P10/IN+ ID0 SEGB
13 11 1 6
IC1 P11/IN– ID1 SEGC
6 14 13
D1 INT0/P32 P12 ID2 IC2 SEGD 25 7
7 15 14 2 8
INT1/P33 P13 ID3 SEGE
8 16 10 24 9
T0/P34 P14 ID4 SEGF
2 9 17 6 26 10
T1/P35 P15 ID5 SEGG
18 5 4 11
89C1051/ P16 ID6 7218A DP
3 11 19 7 15 12
DCF77 P37 89C2051 P17 ID7 DIG1
16 13
DIG2
1 2 8 23 14
RXD/P30 WR DIG3
3 9 20 15
TXD/P31 MODE DIG4
17 16
X0 X1 DIG5
22 17
K5 D49 IC3 10 4 5 DIG6
X1 21 18
1N4001 7805 5V DIG7
18 19
DIG8
R7 C2 20
C4 C3
* 28 R5 R4

JP1 C8 C9
47p
12MHz
47p 4...22p * *
1000µ 10µ
25V 63V
5V

D41 D39 D30 D25 D16 D11 D2

D42 D40 D31 D26 D17 D12 D3

D43 D32 D27 D18 D13 D4


K2
1
2
D44 D33 D28 D19 D14 D5
3
4
5
6 D45 D34 D29 D20 D15 D6

7
8
9
D46 D35 D21 D7
10
11
12
13 D47 D36 D22 D8

14
15
16
D48 D37 D23 D9
17
18
19
20 D38 D24 D10

980035 - 12

Figure 3. Circuit dia-


gram of the DCF
D41–D48 (aircraft warning lights and restaurant lighting): digit line 7 clock. A DCF module that diodes D41–D45
D39–D40 (tens of hours) digit line 6 is linked to the DCF77 (aircraft warning) flash
input. each second, while the
D30–D37 (single hours) digit line 5 other diodes, D46–D48
D25–D29 (tens of minutes) digit line 4 (restaurant lighting)
light continuously.
D16–D23 (single minutes) digit line 3
Resistors R4 and R5 may serve as
D11–D15 (tens of seconds) digit line 2 series resistors for the LEDs in case a
D2–D9 (single seconds) digit line 1 different display or other kind of
experimental circuit is connected to K1.
For the same reason, pin 1 of K1 is
from top to bottom in sequence A, B, linked to the digit 8 line (pin 18 of K1, strapped to ground, and pin 2 carries
C, …, DP. This is a total of eight lines, K2 and IC2). the 5 V supply line. Similarly, resistor
which is, in principle, one short in the On the display board, the sequence R7 is intended for experimental pur-
case of the single (hours, minutes, sec- is exactly the opposite. There, the three poses: it may be used as a series resis-
onds) LEDs. Therefore, special LEDs occupy the top position of the tor for an LED (in place of JP1) which
arrangements have been made for the relevant rows. shows whether the supply is on or
three bottom diodes in the relevant Diodes D41–D48, whose anodes are not. If the circuit is used as a replica of
row, D10, D24 and D38. The anodes of linked to the digit-7 line, are driven via the tower clock, the three resistors may
these diodes are commoned and then the segment lines in such a manner simply be omitted.

28 Elektor Electronics 5/98


Visit our Web site at http://ourworld.compuserve.com/homepages/elektor_uk

4 D43 D41 D42


D15

D44
tnemgeS )C( 1-530089 D45
D14
H2

H3

D29
R7
JP1

D49
D13
C8 D28
D12 D47 D48 D46
D27
D11
K5

D26 D40

IC3
D25 D39
D10
K1 C9
C6 D9
R4 D24 D38
R5 D8
D23 D37
D7
D22 D36
980035-1

R1
R2
R6
D6
IC2 3 D21 D35
- D5
1 D20 D34
+ D4
D19 D33
R3

C5 2
D1 D3
IC1 D18 D32
D2
C3 K2 D17 D31
C1
C4

C7
D16 D30
H4

H1

X1 C2

(C) Segment 980035-1

Figure 4. Printed-circuit boards for the clock. The control and display boards are single-sided, not
through-plated. The three boards for the display must be cut apart before any work is done.

Apart from decoupling capacitor ule) are decoupling elements on the Atmel controller is used.
C6, the display drivers needs no fur- supply line. Capacitor C1 provides a Diode D1 at the output (pin 9) of IC1
ther external components, but IC2 power-on reset; the resistor in series lights at every correctly received DCF
does. Capacitors C5 and C7 (DCF mod- with it may be omitted when an pulse and is, therefore, a useful aid in

Elektor Electronics 5/98 29


pointing the ferrite rod antenna antenna of of the
the
5 DCF module
module in the right right direction.
The pulse outputoutput of of the
the module
module isis
applied to to input
inputpin pin11 11(P3.7)
(P3.7) ofof ICi,
IC1,
whereupon ititisis decoded
whereupon decoded(see (seebox).
box).
The DCF DCF module is linked to the the
control board via terminalsterminals earthearth (1),
(1),
+5
+ 5 V (2)(2) and
and DCF pulse (3). Resistor R
pulse (3). R66
is a pull-up
pull-up element
elementfor forthe
theopen -col-
open-col-
lector output
output of of the
the DCF
DCF module.
Owing to the
Owing theexternal
external12 12MHz
MHz
quartz crystal,
quartz crystal, the
the internal
internaloscillator
oscillator of
IC2
IC2 isis so
so accurate
accurate that that even
even when
when the the
DCF synchronization fails,
DCF fails, the
the clock
clock
continues without
without discernible
discernible error.
error. If
necessary, however, the accuracy may
be enhanced with trimmer trimmer C 2. Note
C2.
that itit is
is not
not possible
possible to to use
use the
theclock
clock
without the the DCF
DCF module
module sincesince this
this is
is
needed
needed when whenthe thecircuit
circuitisisfirst
first taken
taken
into use
use to to set
set the
theclock
clock accurately.
accurately.
Power
Power is is provided
provided by by aa 9-12
9–12V V
mains adaptor
adaptor ratedrated at at150
150 mA.
mA. TheThe
output
output of of this
this is
is connected to K5. The
to K5. The
current drawn by by the
the control
control board,
board,
incl. the DCF module, is small: about
DCF module
Figure 5. The DCF module 18mA.
18 mA.In Inoperation,
operation, the the display board
board
board is populated mostly with draws about
draws about120 120 mA.mA.
SMTcomponents.
SMT components. ItIt is
is linked
linked to
control board
the control boardvia
viaaa33-core
-core CONSTRUCTION
CONSTRUCTION
(screened) cable. Before any work
Before any work on the
the boards
boards isis
started, that for the
the display
display should
should be
be

Parts list
Parts PC 1–PC3 =
PC1-PC3 = soldering pin
soldering pin
Semiconductors:
Semiconductors: X1
X 1= = 12 MHz quartz crystal
crystal
D1,
D D46-D48
1, D 46–D48 == LED,
LED, high
high efficiency, K
Resistors:
Resistors: 1, K
K1, 2=
K2 = 20-way
20 -waybox
box header
header with pro-
pro-
Ri, green
green tective shell for board mounting
mounting
R 1, R2
R2 == 47
47 kf2
kΩ
Ω D2-D40
D 2–D40 = = LED,
LED, high efficiency, yellow
yellow K5
K = socket for connecting
connecting mains
R3 ==220
220 f2 5= mains
R D4i-D45
D 41–D45 == LED,
LED, high
high efficiency,
efficiency, red
red adaptor for board
board mounting
mounting
4, R
R4, 5, RR7
R5, 7== see
see text
R6= D 49 =
D49 1N4001
= 1N4001 JP1
JP 1== 2.54 mm pin strip and pin jumper
R 6 = 10
10 kf2
kΩ
20 -wayflatcable
20-way flatcable terminated
terminated into mating
mating
Capacitors:
Capacitors: Integrated circuits:
Integrated circuits: connectors for box
box header
header
C
Ci1 ==4.7
4.7[IF,
µF,63
63V,V, radial
radial ICi1 =
IC =89C1051
89C1051 or
or 89C2051
89C2051 (Atmel),
(Atmel), pro-
pro- Heat
Heat sink IC3 (e.g.,
sink for IC3 (e.g., Fischer CK35SA
C2
C = 4-22
4–22 pFpF trimmer grammed Order No.
grammed Order No. 986505
986505 from Dau)
Dau)
2= trimmer
C 102
IC 2= = 7218A
7218A (Intersil,
(Intersil, Harris, Plessey) DCF module
DCF module (see Stippler advert in this
3, C4
03, C4 = 47 pF
= 47 pF
C5-07
C5–C7 = = 0.1
0.1 [IF
µF IC
IC33== 7805 issue)
issue)
C8 =1000
C8= 1000[IF,
µF, 25
25 VV PCB with
PCB with programmed
programmed controller,
C Miscellaneous:
Miscellaneous: Order NoNo 980035C
980035C
C99= 10 [IF,
= 10 µF, 63
63 V,
V, radial
radial

Decoding process
Decoding process
The DCF
The DCFclock clock is
is aa compact design: it uses uses only
only 829
829 maintained by this routine: one of them them counts
counts from
from 00 to
to
bytes of machine code.code. The
The software is relatively straight- 100 (250
100 ps ×
(250 µs x 100
100 ==2525ms),
ms),andandthetheother
otherfrom
from 00 to
to 40
40
forward and
forward and consists
consists ofof two
two dissimilar
dissimilar blocks.
blocks. One
One of of (40 ×
(40 x 25
25 ms
ms == 1 s). The resultant 1 s pulse increments
1

these enables
these enables thethe reading of serial data (via P3.7) and the registers, whereupon the clock becomes available.
clock becomes available.
storing the information
storing information in various
various registers.
registers. Figure
Figure 66 When valid
When valid DCF
DCF information
information hashas been received, the the
shows the make-up of the code word word transmitted
transmitted by the contents of the hour register and minute registerregister are
are syn-
DCF
DCF transmitter.
transmitter. When
Whenaavalid
validcode
code isis read for at least two chronized.
chronized.
consecutive minutes, the data is used to set the clock. Reproducing the information on aa display
Reproducing display requires
requires
The controller
The controller maintains
maintains its
its own
own clock
clock function. After more arithmetic. First, aa byte
byte isis split into two digits, after
a reset, several registers are erased and then used used toto which
which the hexadecimal code is converted into a position.
store the information as to number of hours, minutes and For in-stance,
in -stance, decimal
decimal 77 has
has the
the hexadecimal
hexadecimal code 0111
code 0111
seconds.
seconds. and causes the seventh LED to light. light. The
The conversion
conversion is is
Also after a reset, timer 0 is set to the the 88-bit
-bit auto reload carried out by successive comparison
comparison of of the with the dig-
mode, whereupon
whereupon itit generates
generates anan interrupt
interrupt every
every 250 ps.
µs. its 0-9.
0–9. When
When the position code has has been
been found,
found, itit is
is
At an
an interrupt,
interrupt, the
the content
content of the accumulator and the added to the display
display code
codevia
via an
an instant
instant instruction.
instruction.
program status word
program status word (PSW)
(PSW) are stored. Two registers are

A30
30 Elektor Electronics
Electronics 5/98
visit our Web
Visit Web site at
http://ourworld.compuserve.com/homepages/elektor uk
http://ourworld.compuserve.com/homepages/elektor_uk

cut into separate boards as as indicated


indicated pin
pin 20
20 of the
the socket
socket for
for IC1,
IC1, pin 19 of
by the relevant
relevant lines.lines. the socket for IC2, IC2, and pin pin 22 of of K1
K1
Populating the boards should not
Populating not must
must be be ++5
5V V± ±5%.
5%.
present undueundue difficulties.
difficulties. Do Do notnot Switch off
Switch off the supply,
supply, insert
insert IC1IC1
overlook the
overlook the two wire bridges bridges on the and IC2
and into their sockets, and
IC2 into and connect
connect
control board
control board and and the many on the the DCF
the DCF module
module and the the display
display
display board. boards.
Owing to
Owing to thethe closeness
closeness of of the
the Switch on
Switch on the supply, whereupon
whereupon
tracks, soldering
tracks, soldering must be carried with with the restaurant
restaurant lighting
lighting should
should come
come on on
great care. and the
the aircraft
aircraft warnings
warnings lights
lights should
should
Make sure that that thethe correct
correct polarity
polarity start to
to flash
flash atat11-second
-second intervals.
intervals. At At
of all
all diodes
diodes and and electrolytic capacitors the same
the same time,
time, thethe display
display showsshows
is observed. 00:00:00.
00:00:00.The The clock
clock will
will set
set itself
itself to
to the
The broad tracks at the edges of the correct time whenwhen the the DCF
DCF signal has has
display boards serve to interconnect been received flawlessly
flawlessly for for at least
these boards. They are best linked by two minutes.
two minutes. Faultless
Faultless reception is is
laying them
laying them flat on the the workbench
workbench indicated by
indicated by the regular
regular lighting
lighting of
with the track
with track layout
layout upward.
upward. The The diode D1 D1 at each DCF pulse.
connecting wires should be as short as Owing to the multiplexing
multiplexing of the
feasible. The
feasible. The boards may be be stiffened
stiffened display the reception in the immediate
by soldering stout wire or metal strips proximity of the control and and display
display
at their edges. It is also possible to use boards may suffer from interference. It
small, metal clips available from sta-
small, sta- therefore, be
may, therefore, be necessary
necessary whenwhen tak-
tionery suppliers. ing the clock into use for the first time
The DCF DCF module is connected as as to place the DCF module away away fromfrom
shown in Figures 5 and 6. 6. When the the remainder of the the unit.
unit. Alterna-
Alterna-
four screw terminals are viewed from tively, connect
tively, connectthe the module
module to to the
the
(Figure 6),
above (Figure 6), the
the terminals from antenna via
antenna via aa longer,
longer, screened
screened cable.
cable.
to right
left to right are: DCF output output (inverted);
(inverted); Reception difficulties
Reception difficulties may may alsoalso be be
DCF output;
DCF output; supply
supplyline line(+ 1.2-15 V);
(+1.2–15 V); encountered when when the theclock
clock is is close
close
and earth. less than
(that is, less than one metre) to a tele-
Figure 5 shows the the SMD-populated
SMD-populated similar equipment.
vision set or similar equipment.
track side
track side ofof the
the DCFDCFboardboardand and the When
When reception
reception has has been
beensatisfac-
satisfac-
connecting leads to the control board tory for more than two minutes, the the
(from left to right: right: earth;
earth;++5 5 V,V, DCF
DCF will show the correct time. If
display will
output). If the connecting
output). connecting leads leads are
are reception fails during the
reception the two
two minutes,
minutes,
long(ish), screened
screened 33-core -core cable
cable should
should a new period of two minutesminutes is started.
be used. Once the clock runs, however, it needs
The outputs
The outputs of of the module
module are are to be synchronized with with the
theDCFDCF sig-sig-
open -collector outputs
open-collector outputs of of nn-p-n
-p -n tran-
tran- nal only once or twice during every every
sistors that
sistors that can
can handle voltages up to twenty-four period.
30 V
30 Vandand are
are able to to switch
switch currents of [980035]
[980035]
up
up toto 11 mA to ground.
ground.
Do not yet yet insert
insert IC1IC1 and
and IC2IC2 into
into
their respective sockets, and and check the
completed boards
completed boards carefully.
carefully. Then Then
switch on
switch on the power and check check that
the supply
supply lineslines areare asas specified.
specified. The Make-up of
Figure 6. Make-up
potential
potential at at the
thejunction
junctionof ofIC3
IC3 and
and C 9,
C9, the 35 -bit data
35-bit data word
transmitted by
transmitted byDCF.
DCF.

6
year P3 miscellaneous
(8 bits) applications
1

10

month 8
(5 bits) 4

day of week 2, see text


(3 bits)

day of month 8
(6 bits) 10
minute
4 2
(7 +1 bits)
hour
(6 +1 bits) 980035 - 13

Elektor Electronics
Electronics 5/98 31
31
418/433 MHz
short-range communication
licence -exempt data transmission
licence-exempt
and remote control
control systems
systems

In the UK, two small history of


The history of licence
licence-exempt
-exempt
O
use of radio transmitters
sections
sections of of the
the 70
70-cm
-cm started aa few decades
started decades ago ago with
with
band, around
around the private
private use useof of low -power
low-power
transmitters for radio-con- radio -con-
418 MHz and and trolled models. Much
trolled models. Muchlater,later, CB
CB
radio in
radio in the
the 27 -MHz band
27-MHz band was
433 MHz, have been legalised and type -approved
type-approved
available for some radios for this band were
radios for were
freely available.
available. However,
However,
time for licence
licence-- the useuse ofoftype -approved
type-approved
exempt wireless com- radio -control transmitters
radio-control transmitters as as
well as that
that of of CB rigs was tied to to
munication using a licence fee
fee and
and some administration.
administration.
And then, the mere disappearance of In Europe, the national radio radio regula-
regula-
type-approved
type -approved low low-- the dreaded
dreaded paperwork
paperworkand, and,possibly,
possibly, tion authorities
authorities(in (in the
theUKUK :: Radiocom-
power devices a test, to get your
your licence was hailed hailed as as munications Agency,
Agency, RA) have their
RA) have
a great liberalisation. The result result of this
this own say about the the useuse ofof the
theSRD
SRD
(LPDs), also called
called de -regulation on
de-regulation on part
part of the govern-
govern- bands.
bands. In In the
the UK,
UK, the
the 418
418 MHz section
short-range devices ment authorities was a boom in the the may be used for telemetry transmitters
transmitters
sales of CB radios.
radios. A few few years later, the and receivers,
receivers, telecommand
telecommand and andinin--
(SRDs). In this article overcrowded CB
overcrowded CB band was extended extended building security equipment,
equipment, while the the
with
with quite aa few few channels,
channels, higherhigher 433 -MHzsection
433-MHz section isis only
only available for
we look at the use of transmit power
transmit powerwas wasallowed,
allowed,as as well
well as
as in -vehicleequipment
in-vehicle equipment including
including radio
these frequency FM (frequency modulation).
Although small
Although
modulation).
small sections
sections of of the
keys. This is
keys. This is in contrast with many
other European countries, where the
many

bands, and some MHz and


40 MHz and 173173 MHz MHz bandsbands (the latter around 433
section around 433 MHz is is much
much wider
exclusively
exclusively in in the
the UK)
UK) have have long been and
and also
also available for all of the afore-
general design con- available for low -power devices like
low-power like mentioned applications,
mentioned applications, and and even
even
siderations forfor SRD
SRD ‘stage microphones'
'stage microphones’ and and remote
remote con-con- voice communications using using 10-mW
10-mW
trols (for example, for garage garage doors),
doors), FM handhelds.
handhelds.
modules. nothing
nothing was allowed without paying a In the UK,UK, the
the specification
specification with
licence -feeand
licence-fee andproofproof thatthat the equip- number MPT1340
number MPT1340 is is applicable to all
ment was
ment was type -approved.
type-approved. LPDs using
LPDs using the the 418 418 MHz MHz and and
Many of of the
the regulations,
regulations, but but not
not the
the 433 MHz sections of the
433 MHz the 70 -cm band.
70-cm band.
type -approvals, have been relaxed or
type-approvals, or The Radiocommunications
Radiocommunications Agency Agency
changed radically
radically over over the past few few (RA)
(RA) isis an
an Executive Agency of the the DTI
DTI
years. Initially, licence
licence-exempt
-exempt remote
remote (Department of Trade and Industry) Industry)
control systems appeared appeared for for the
the CB
CB responsible for the allocation, mainte-
27 MHz (11-m)
(11-m) band. band. The real activity nance and
and supervision
supervisionof of the
the UK
UK radio
radio
did not start however
however until until two
two small
small spectrum. The
spectrum. The RA contacted at
RA can be contacted at
sections ofof the
the70 -cm band,
70-cm band, 418
418 MHz the following address: Radiocommu-
and 433
and 433 MHz, were were 'released'
‘released’for forlow
low- - nications Agency, New King's King’s Beam
Beam
power
power type -approved devices
type-approved devices(LPDs),
(LPDs), House,
House, 22 22 Upper Ground,Ground, London
London
also called short-range
short-range devices devices(SRDs).
(SRDs). SE1 9SA. Tel. (0171) 211 0211, fax fax 211
211

Elektor Electronics 5/98


34
434
Visit our Web site at http://ourworld.compuserve.com/homepages/elektor_uk

0507. Internet: www.open.gov.uk/


radiocom. 1 1 1 1 1
Document number I-ETS 300 220 1 2 3 4
describes the type-approval require- 3 4 5 6
ments for 418/433-MHz SRDs. Accord-
ing to the RA, new equipment can only
be type approved to this standard pro-
vided parameter limits stated in LPD/SRD Band
MPT 1340 are met.

433.720 MHz

434.120 MHz
Range: 433.72 MHz to 434.12 MHz
EX-ISM FREQUENCIES Width: 400 kHz
A long time ago, the current SRD band Channels: 16
section at 433 MHz was part of a Raster: 25 kHz
slightly larger section reserved for ISM Specification: MPT 1340
(industrial, scientific and medical) For Vehicle Radio Keys only.
equipment producing RF radiation. Licence-exempt, max. 10 mW ERP
980038 - 11a
Mainly as a result of pressure from
licensed radio amateurs who use this
part of the band on a shared and/or
secondary basis, the use of ISM equip-
ment has been phased out, and the
band section is no longer identified as 1 2 3 4 5 6 7 8
such, at least not in the UK. Several
other ISM frequency bands are defined
in the UK, including 167 MHz, 83 MHz
and 40 MHz, all subject to strict regu- LPD/SRD Band
lations, the most essential of which
being very low ERP (effective radiated
433.720 MHz

434.120 MHz
Range: 417.9 MHz to 418.1 MHz
power) levels. Width: 200 kHz
The exact frequency allocation of Channels: 8
the 418 MHz and 433 MHz SRD bands Raster: 25 kHz
is shown in Figures 1a and 1b. It
should be noted that the channel divi- Specification: MPT 1340
sion and channel widths have been Low-power general telemetry,
adopted by SRD manufacturers, there telecommand and alarms.
being no strict RA regulation in this Licence-exempt, max. 0.25 mW ERP
980038 - 11b
respect.
It is expected from radio amateurs
using the 70-cm band to accept the Figure 1. Frequency
activity of low-power SRD users in this allocation and (man-
part of the band and not cause inter- ufacturer-proposed)
ference. Likewise, SRD users have to channel division of
live with interference caused by radio the two 70-cm SRD
amateurs, or prevent interference by bands available in
using low transmission rates, sure the UK.
codes, high redundancy and selective
receivers. All of this is, of course, in the
hands of the manufacturers of SRDs,
because the users are not allowed to
make changes to type-approved equip-
ment. Figure 2. Plans are
afoot to open the
886-MHz band for
A NEW SRD BAND
SRD use.
Meanwhile, because they are so small,
the 418 MHz and 433 MHz SRD bands
have become quite overcrowded. A
new band, around 886 MHz, is ‘identi- 2
fied’ by the relevant authorities for use 7 7 7 8
1 2 3 4 5 7 8 9 0
by SRDs (Figure 2), with reference to
CEPT Recommendation T/R 70-03. In
this band, it is planned to reserve sev-
eral channels exclusively for security
applications. Some channels in the pro- Future SRD band
posed frequency range are, however,
868.000 MHz

870.000 MHz

still in use for analogue cordless tele- Range: 868 MHz to 870 MHz
phone sets of the CT2 generation. Width: 2 MHz
For all SRD bands, the intention has Channels: 80
always been to arrive at unified regu- Raster: 25 kHz
lations. In the UK, however, the Radio-
communications Agency “has not CEPT Recommendation T/R 70-03 refers.
adopted CEPT recommendation
980038 - 12
TR 01-4 which allows general low-

Elektor Electronics 5/98 35


ules we have seen so far contain SMD
3 parts to keep the overall size as small
as possible.
The simplest versions of SRDs used
C1
L1 to rely on an amplitude-modulated
470p 27nH transmitter (Figure 3) and an associ-
L2 C5 ANT. ated regenerative receiver (Figure 4).
Note that such systems are probably
68nH
DATA IN T1 470p no longer allowed under RA specifica-
R1 C3 tion MPT 1340. The transmitter consists
4k7 of a one-transistor oscillator. Modula-
3p
tion is obtained by applying the data
signal to the base of the transistor. A
single surface-acoustic wave (SAW)
R2 R3 R4 resonator is used as the frequency-
X1 C4
determining element. A highly similar

200Ω
100Ω
6k8

circuit for experimental use was pub-


7p
lished in Elektor Electronics July/August
1993, page 54. Note, however, that this
433,92 MHz 980038 - 13 design is based on frequency modula-
tion (FM) using two varicap diodes,
Figure 3. Circuit dia- while the SAW has a fine-tuning
gram of an ultra-sim- power devices to approved receivers and transmitters adjustment.
ple 433-MHz SRD operate in this for short-range communications in the The receiver shown in Figure 4 also
transmitter using band”. Hopefully, 418/433 MHz bands. In this context, we contains just one transistor. It is biased
amplitude modulation the 886 MHz SRD should also mention the activities of to act as a regenerative oscillator, in
(not type-approved by band will be graced the LPRA, the Low-Power Radio Asso- which the received antenna signal
RA). by cross-European ciation, who publish an interesting and causes the transistor to switch to high
standards, and highly topical newsletter, as well as amplification, thereby automatically
receive an ETS maintain a fine Internet web site at arranging the signal detection. Next,
Figure 4. Circuit of a (European Telecom- www.lpra.org.uk the ‘raw’ demodulated signal is ampli-
simple AM receiver munication Stan- The ready-made, UK type- fied and shaped-up by opamps. The
module using a single dard). approved LPD modules from result is a fairly clean digital signal at
transistor in the RadioMetrix and RadioTech come in a the output of the receiver. The logic-
(regenerative) RF sec- LPD variety of frequencies and transmit high level is at about 2/3 of the supply
tion (not type- MODULES powers, depending on your applica- voltage, i.e., between 3 V and 4.5 V.
approved by RA). In In this country, tion and country of use. Modules are The range of the simple system
some cases, there’s RadioMetrix and also available for digital communica- shown in Figures 3 and 4 is much
an additional pream- RadioTech are the tions between, say, a PC and a printer, smaller than that of more expensive
plifier stage using a main suppliers of the radio link effectively acting as a units, mainly because of the low trans-
second transistor. ready-made, type- very long RS232 cable. All LPD mod- mit power (approx. 1 mW) and the rel-

4 R18 VCC
10Ω

R7 R14
C21 C12
12k

3M

ANT.
L1
* 47µ 10µ

C4

R5 R9
2p R12
20k

5k6

6M8
C5
D2 DATA OUT
T1 R10
33p 100k R15 IC1b
C7
R11 IC1a 47k
D1
2p 100k D3
C6

1n 2x
1N4148
1N
4148
2µH2 * 1,5 Wdg.
R8 R6
* 1,5 wdgn.
C8 C9 C10
* 1.5 turns
680Ω

18k

1n 1µ
* 1,5 spires. 4µ7

980038 - 14

36 Elektor Electronics 5/98


Visit our Web site at http://ourworld.compuserve.com/homepages/elektor_uk

ative insensitivity and wide-band


nature of the receiver. Moreover, ampli- 5 data input
tude-modulated noise is not sup- switching threshold FM RF output
pressed in any way. hysteresis modulator stage
For more demanding applications,
FM (frequency modulation) is the obvi-
ous alternative. Block diagrams of an
LPD-type 433-MHz FM transmitter
and its associated receiver are shown
in Figures 5 and 6 respectively. Integrated
The transmitter is automatically antenna
actuated by means of pulse edge detec-
tion, and uses an accurately defined 4- supply regulation
ms time slot to transmit, as soon as RF carrier enable
data pulses are detected at the input.
When the data signal is removed, the
transmitter automatically returns to pulse edge
standby mode after recognition
about 200 ms. As in the Figure 5. Block dia-
lower-spec transmitter, gram of a typical FM
the frequency stability is transmitter module for IN Ub = 5 - 12V
980038 - 15
derived from a SAW res- one of the 70-cm SRD
onator. The main advan- bands.
tage of these resonators
is their low cost. On the
down side, they are subject to rela-
tively large production tolerances, and 6
their temperature stability is a far cry RF input stage mixer selection
from that of a quartz crystal.
To keep the bandwidth of the fre-
quency modulated transmitter output
signal within limits, the frequency devi-
ation is limited (±2.5 kHz to ±20 kHz,
depending on the SAW type and man-
ufacturer). The input data rate is also
oscillator
limited (low-pass filter). The upshot is
that the highest data rate of the FM
modules is about 10 kBit/s (using a high-
est modulation frequency of 5 kHz).
The antennas used for SRDs are tra-
ditionally produced in the form of a
printed-circuit board track, while ⁄- AF amplifier IF amplifier
lambda flexible anten- pulse shaper FM demodulator
nas are also seen occa- Figure 6. FM receiver
sionally. modules may be super- 980038 - 16
The FM receiver heterodynes or even Ub = 5V OUT
module shown in the double-conversion
block diagram (Figure 6) designs.
is a superheterodyne modules with even used to manufacture these modules is
design. Here, too, an higher specifications the same as found in handhelds for the
SAW resonator is used in the oscillator are not necessarily larger, but dearer 70-cm amateur radio band.
to ensure frequency stability. All of the and more complex.
intermediate-frequency (IF) filtering Higher-spec transmitters achieve DATA TRANSMISSION
can be done with low-cost 10.7-MHz better frequency stability thanks to the For simple data transmission applica-
ceramic filters. Because of the possible use of a crystal-controlled synthesiser, tions, such as a remote control link,
frequency offset caused by the SAW while the harmonics suppression is you need a suitable encoder at the
resonator, a fairly large bandwidth also better as a result of extensive fil- transmitter side, and a matching
(approx. 280 kHz) is required anyway. tering at the output. decoder at the receiver side. Specially
Most ready-made SRD receiver mod- Likewise, high-end SRD receiver designed integrated circuits are avail-
ules are compatible with 5-V or 3-V sys- modules are usually double-conversion able like the MM57410N from
tems. types using synthesiser tuning and nar- National Semiconductor, the
Thanks to miniaturisation, SRD row-band IF filters. The technology MC145026/MC145028 from Motorola,

Elektor Electronics 5/98 37


5V and 4 data bits) to
bits, and to the
the transmitter.
7 The decoder
decoder receives
receives thethe12 -bit word
12-bit word
and extracts
and extracts the the first
first 88 bits
bits asas an

0_
18
SW-DIP8

p
SW -DIPS
address, and the the remaining
remaining 44 bits bits asas
_0
1
1 9
9 1
1
A0
AO DOUT
DOUT
17
17
IN OUT data. The four data bits only appear appear at
0-0
0-
2
2 10
10 2 16
16
0 Al
A1 OSC1
OSC1 11M
M the output
output ifif the thereceived
received addressaddress
0--Ct
3 3 11
11 3
A2 OSC2
OSC2
15
15
matches the DIP switch setting in the
ADDRESS

10 450-0
09 4 12
12 4
A3 TE
TE
14
14

R.-0
cc

ago
5

6
0
13
13

14
14
5
5

6
A4
A5
HT12E--
HT12E
D3
13
13
12
12 HT433-1/T
HT433-1/T
decoder. The 44-bit
decoder.
latched andand then
-bit dataword
then used
dataword is first
usedto tocontrol
first
control exter-
exter-
D2
D2

0-0 7 15
15 7 11
nal devices (here,
(here, LEDs
LEDs are used).
used).
00
11
A6 D1
D1
8 16
16 8 10
8
A7 D0
DO START To make
To make sure the the transmission
transmission
0 arrives securely
arrives securely at at the decoder,
decoder, the
9
encoder transmits
encoder transmits the the 12 -bit serial
12-bit serial
word four times times each time time the the /TE
/TE
DATA
DATA input is
input is activated. The decoder
decoder with-with-
holds the
the data
data until
untilthree
threeidentical,
identical, suc-
suc-
5V cessive, copies
copies have
have been
been received. The
VT output
VT output then
then flags
flags the
the availability
availability of
SW-DIP8
SW -DIPS
18 valid data.
1 9 1 17
This process is very well suited suited toto
A0 VT
2 10 2 16 slow data transmission. For higher higher data
A1 OSC1
OSC1 47k
3 11 3
A2 OSC2
OSC2
15 rates, a microcontroller is an obvious obvious
alternative to special encoder/decoder
encoder/decoder
ADDRESS

4 12 4 14
A3 DIN
DIN OUT IN
5 13 5
A4 D3
D3
13 ICs. Note,
ICs. Note, however,
however, that opting for for aa
6 14 6 HT12D
HT12D 12 HT433-1/R
HT433-1/R
7 15 7
A5 D2
D2
11
microcontroller (like
microcontroller (like aa PIC)
PIC) almost
almost
8 16 8
A6 D1
D1
10
always means that you have to write
A7 D0 MP
DO
your own software aimed at achieving
secure andand reliable transmissions.
9
exchanged between
If data is to be exchanged
equipment having aa serial serial interface,
560Ω

560Ω

560Ω

560Ω

interface,
the first solution thatthat comes to mind mind is
often one as adopted in the
often the project
project
DATA
DATA 980038 - 17
980038 'Long-distance IrDA link’
‘Long-distance link' published
published in
Elektor Electronics May 1997.
May 1997.
Figure 7. Application
Application For more demanding
For demanding telemetrytelemetry
circuit
circuit for
foran
an address
address- or the HE8
or HE8 and
and larly, the
larly, the HT12D
HT12D decoder
decoder IC is found applications, special data modems modems are are
able digital link using HT12 from
HT12 from Hei-
Hei- directly at the output
output of
of the
thereceiver.
receiver. employed in
employed in combination
combination with withhighhigh--
an SRD
modulation
and frequency
SRD and frequency
modulation (FM).
(FM). A land Electronic
(D-48351
(D-48351 Ever-
swinkel, Germany.
Germany.
On the DIP
you
DIP switches in the encoder
you set the same
receiver to
receiver to be
be addressed
encoder
same address as in the
addressed (multiple
the
(multiple
end 418
end -MHz SRD
418-MHz
mission protocol
mission
SRDmodules.
protocol is
improve the data
modules. A
is then
then used
data security.
A trans-

security. Often, the


trans-
used to to

Tel.
Tel. +49
+49 2582-7550, receivers may be addressed
addressed byby a single AX.25
AX.25protocol
protocolisisemployed,
employed, a spin-off
fax +49
+492582-7887).
2582-7887). transmitter). of the X.25 protocol which
X.25 protocol which has has been in
An example of an addressable
addressable sig-sig- In addition to the
the receiver address, use for
use for several
several years
years for for amateur
amateur
nal transmission
transmission link
link for
for the
the433
433 MHz
MHz four data bits may be applied to the packet radio.
SRD band
SRD band is shown in Figure
Figure 77 (note:
(note: input. Here,
input. Here, these
these four
four bits
bits come
come from
from
this application may notnot be
be allowed
allowed inin push-button switches.
push-button switches. By applying the MODULATION
M ODULATION
the UK). The encoder
the encoder IC IC type
typeHT12E
HT12E transmit -enable signal (/TE), the
transmit-enable TECHNIQUE -
TECHNIQUE —
supplies its data directly to the modu- encoder
encoder isis prompted
promptedtotosupply
supplyaa1212-bit
-bit A BOTTLENECK
A BOTTLENECK
lation input
input of
of the
the transmitter.
transmitter. Simi-
Simi- serial word (consisting
serial (consisting ofof 8 address While most datadata transmission modules
approved for
approved for SRD
SRD use are usually said
'FM', in practice the
to use ‘FM’, the actual mod-
ulation methodisisFSK
ulation method FSK (frequency
(frequency shift
keying). Though simple from a design
8 and technology
and technologypointpointofofview,
view,FSK FSK isis
burdened by
burdened by a large
large bandwidth
bandwidth
requirement whichisis the
requirement which the chief
chief cause of
the
the relatively short distances thatthat can be
covered. Assuming
covered. Assuming a receiver
receiver band-
width of
width of 25 kHz (at –36
-36 dBm) is is being
being
used for data transmission,
transmission, then the
highest
highest achievable datadata rate
rate using
using FSK
FSK
would be
would be aa measly
measly 500
500 bits per second!
second!
Consequently, professional applications
applications
of SRD
SRD modules
modules call for special modu-modu-
lation techniques
techniques like
like GMSK (Gaussian
(Gaussian
Minimum Shift
Minimum Shift Keying)
Keying) which
Figure 8.8. AA professional reduce the bandwidth
professional1 reduce bandwidth require-
require-
data modem designed ment by a factor of 15 and and more,
for use
for use with
withaa70 -cm
70-cm while considerably improving the the
SRD (not
SRD (not type-approved
type -approved transmission security.
transmission security.
by
by RA).
RA). (980038-1)

Elektor Electronics 5/98


38
introduction to
digital signal processing
Part 5 – More about filters and
modulation

In this instalment, we
have another look at 31
filters and their
synthesis and then turn
our attention to
modulation techniques.

980015 - 5 - 11

Figure 31. Impulse response


with various weighting fac-
tors (window functions).

WEIGHTING REVISITED either end of the waveform, which


There is considerable freedom in may lead to side lobes in the frequency
designing a filter from a predesignated response. A larger value of α will
frequency response. The first factor to reduce the size of these lobes, but the
be decided is the number of samples in frequency response is then no longer
the step response, that is, the order, N, completely identical with the predesig-
of the filter. If too high an order is cho- nated response: it becomes more and
sen, the consequent computation more rounded. The only alternative to
becomes enormous. It is, therefore, in either of these two unfortunate aspects
general better to choose n as small as is a higher filter order.
feasible. Furthermore, in our program,
SPECFIL1.EXE, window parameters, α, PHASE RESPONSE
have to be chosen. Their influence can The filter design program produces fil-
be seen in Figures 31 and 32. For the ters with a linear phase response. All
oscillogram generated with the pro- frequency components appear to be
gram, values of 0.1, 3, 5 and 14 were delayed by the filter for a constant time,
used for α. A small value for α results which is numerically exactly equal to
in hardly any weighting being applied. half the filter order. Entering ‘hilbert’
By Dr. Ing. M. Ohsmann The step response shows spikes at instead of ‘normal’ in the second row of

Elektor Electronics 5/98


40
Visit our Web site at http://ourworld.compuserve.com/homepages/elektor_uk

32 33
1 cntre=taps–1;
2 mr=0, mx0=dm(i2,m2),
my0= pm(i7,m7);
3 do firl until ce;
4 firl:mr=mr+mx0 · my0(ss),
mx0= dm(i2,m2),
my0= pm(i7,m7);
5 mr=mr+mx0*my0(rnd);
6 if mv sat mr;

Figure 33. Listing of a


program for the
design of a non-recur-
sive (FIR) filter.

case of a stereo signal. This means that


an FIR filter for stereo signals can have
980015 - 5 - 12
a maximum of 10/0.03 = 333 delay ele-
ments, that is, N≤ 333. This makes it
Figure 32. Frequency response clear that even modern DSPs are not
with various weighting factors. filter is not easy and cannot capable of executing a number of long
be dealt with in an introduc- filters simultaneously. This is why in
tory article; the reader is DSP developments, the aim is at all
referred to the reference works listed times to use low sampling rates and
the filter specification results in a filter at the end of this instalment. There are simple filters. An alternative is the use
whose frequency response is retained, also a great many commercially avail- of an IIR filter instead of an FIR type,
but shifts all frequency components by able programs which enable the pro- but often this cannot meet the specific
90°. Such a filter is used for specific fessional designers of DSP systems to requirements of the phase response.
applications as will be seen later. design top-of-the-range filters. A sec-
tion of the design program for an FIR F I LT E R E D N O I S E
B E T T E R F I R F I LT E R S filter contained on a DSP, the As a final experiment with filters, we
Simple design program SPECFIL1.EXE ADSP2181 from Analog Devices, is will design a simple narrow-band
often does not produce the best possible shown in Figure 33. When the usual band-pass filter, use this to filter noise
filter; it is frequently possible to arrive 16.66 MHz crystal is used, an instruc- and analyse the WAV file so produced
at a design closer to the predesignated tion is carried out in 30 ns. on a spectrum analyser. When you lis-
one with a lower filter order. ten to this file, you will notice that
Unfortunately, the design of such a
The inner loop, line 3/4, takes about although the signal can be heard, it can
30 ns per run, so that, if the sampling be over a narrow frequency range only.
rate is 48,000 samples per second, only File XFILDES3.SPP provides a suitable
20 µs are left per sam- band-pass filter about 300 Hz wide
Figure 34. Frequency response of a ple, and only 10 µs in with a centre frequency of 1150 Hz.
Butterworth filter of various orders.
B U T T E RW O RT H F I LT E R
Once you have started designing an
FIR filter as just described with steep
34 skirts and narrow pass band, you will
notice how tedious and numerous the
calculations are.
For low-pass filters, it is best to use
the program BUTTER1.PAS, which
enables the simulation of steep-skirted
IIR filters that are appreciable faster
than similar steep-skirted FIR filters.
The steepness of the skirts is deter-
mined by the filter order (which must
be an even number). The second para-
meter is the cut-off frequency. The fre-
quency responses produced by file
XBUTTER2.SPP for a cut-off frequency of
800 Hz, a sampling rate of 11,025 sam-
ples/sec and filter orders of 2, 4, 8 and
12 are shown in Figure 34. The
response is flat up to the cut-off fre-
quency and shows no overshoots, but
the attenuation increases in proportion
with the filter order. The step response
980015 - 5 - 14
for orders 2, 4 and 8 produced by XBUT-

Elektor Electronics 5/98 41


quencies contained in the rectangular
35 Figure 35. Step signal are derived from the sinusoidal
response with vari- frequency. The frequency content of a
ous filter orders. periodic signal is determined by a
Fourier analysis performed by a spec-
trum analyser.

FOURIER SYNTHESIS
The menu contains a program that
computes the relevant signal from a list
of frequency components (frequency,
amplitude, and phase). For example,
for a square-wave signal (duty factor is
1:1), the following table correlates the
number of the harmonics (first col-
umn) with their constituent value (sec-
ond column):

1 10 (=10/1)
3 3.3333 (=10/3)
5 2 (=10/5)
7 1.428 (=10/7)
980015 - 5 - 15
9 1.111 (=10/9)
11 0.9090 (=10/11)
13 0.7692 (=10/13)
36 oscilloscope TER1.SPP is shown in Figure 35. Note 15 0.6666 (=10/15)
that the amplitude of the overshoots
increases with rising filter order to the The result of the Fourier analysis, in
same extent as the response time. which a number of different harmon-
Other types of filter, such as Chebi- ics are included, is shown in Figure 38.
sine wave shev and Butler, encountered in ana- The corresponding experiment is car-
generator Schmitt trigger logue filter designs, are also available ried out by file XFOUR2.SPP.
in digital filter design. Unfortunately,
owing to space considerations, these A HEARING TEST
cannot be discussed here: the reader is Experiment XFMSYN2.SPP generates sig-
referred to the references at the end of nals TMP1.WAV and TMP2.WAV, which
this instalment. have the same frequency components
but with different amplitude. The oscil-
PERIODIC SIGNALS logram in Figure 39 shows the signifi-
spectrum analyser When periodic signals are viewed on a cant effect of the phase relations of the
spectrum analyser, it will be noticed frequency components. The first signal
that they contain frequency compo- has a virtually constant amplitude.
nents only at frequencies that are a During a hearing test, weak frequency
whole multiple of the fundamental fre- modulation may be detected. How-
quency. This is in accordance with the ever, when listening to signal TMP2.WAV
980015 - 5 - 16
mathematical axiom that a periodic sig- a strong amplitude modulation will be
nal is composed of a fundamental fre- discerned. Signal TMP1.WAV is a
Figure 36. A Schmitt quency and a number of harmonics. VHF/FM signal reduced by weak sig-
trigger generates a rec- Let us carry out an experiment with a nal components. It has a linear spec-
tangular signal. setup as shown in Figure 36. In this, a trum, but is symmetrical with respect
Schmitt trigger (SCHMITT.EXE) produces to a given frequency. Thus, we can no
from a sinusoidal signal a rectangular longer speak of a fundamental fre-
one whose spectrum is shown in Fig- quency with harmonics.
Figure 37. Spectra of ure 37 (experiment XFOUR1. SPP). All fre-
the sinusoidal and rec- MODULATION
tangular signals. PROCESSES
Digital signal processing is also used
more and more frequently in radio
receiver technology. For instance,
37 mobile telephones invariably use com-
plex modulation processes. An
overview of several modulation and
demodulation processes is therefore
instructive. Although these processes
are in the main classical, the overview
gives an interesting picture of the rela-
tion between spectra of various signals.

SOURCE MATERIAL
To keep the course as practical as pos-
sible, we will use readily available data
980015 - 5 - 18
whenever possible. Signals WD1L.WAV

42 Elektor Electronics 5/98


Visit our Web site at http://ourworld.compuserve.com/homepages/elektor_uk

and WD1R.WAV are obtained with the


38 setup shown in Figure 40. In several
countries, VHF transmitters emit an
amplitude-modulated 57 kHz sub-car-
rier with traffic news (ARI*). At the
same time, the sub-carrier transmits,
with the aid of phase-shift keying
(PSK) digital RDS signals. To be able to
sample this signal, it is converted to
5 kHz±2kHz by mixing it with a
62 kHz oscillator signal. The resulting
signal, which contains both amplitude
modulation and digital phase modula-
tion, is available in file WD1R.WAV.

BBC: AM AND PM
Amplitude modulation may be looked
at more closely with the aid of the
198 kHz BBC broadcast transmissions.
The carrier of this signal is mixed with
980015 - 5 - 19 a signal of 188 kHz, resulting in an out-
put of 10 kHz (see Figure 41), which is
Figure 38. Fourier readily sampled at 44.1 kHz. This
analysis of a rectan- enables amplitude modulation to be
gular signal with tested with a real audio example.
many harmonics. Figure 39. Signals It is interesting to note that the
with equal amplitude same 198 kHz signal is also phase mod-
but with different ulated to enable control data to be
phase spectra. transmitted. This is also contained in
39 the file BBC188.WAV.

AMPLITUDE MODULATION
In amplitude modulation, the modu-
lating signal, s(t), is superimposed onto
the carrier frequency, fc.(ωc = 2π fc). In
case of a cosinusoidal carrier, the trans-
mitted signal is

x(t) = [C+Ms(t)] cos(ωct),

where C is the carrier amplitude and M


is the depth of modulation.
Normally, fc is much greater than
the frequencies in s(t). The simulations
in this course use relatively low carrier
frequencies of about 10 kHz. This
means that the modulating frequencies
must lie in the low audio range.
In experiment XAM1.SPP in Figure 42,
a sinusoidal carrier with a frequency of
2 kHz is modulated by a triangular sig-
980015 - 5 - 20
nal at 150 Hz. The triangular signal,
s(t), is shown in Figure 43 (left) with
beside it the resulting amplitude-mod-
62 kHz
40 ulated waveform. The spectra of the
VHF FM receiver sample & record triangular signal and the AM signal are
shown in Figure 44. Note that in the
AM spectrum at the left and right of
MPX WD1L.WAV: the carrier spectral components (side-
discriminator bands) of s(t) occur. These may be
ARI + RDS
explained by the equation of a cosinu-
soidal carrier modulated by signal s(t):
audio card
left-hand (PC)
stereo Figure 40. Recording a radio
decoder right-hand WD1R.WAV:
signal containing ARI and
AF RDS data. (ARI = Autofahrer
Rundfunk Informationen =
motorists’ broadcast infor-
mation; RDS = Radio Data
980015 - 5 - 21 System).

Elektor Electronics 5/98 43


Visit our Web site at http://ourworld.compuserve.com/homepages/elektor_uk

[C+Mcos(ωmt)] cos(ωct) = amplifier


ferrite-rod
Ccos(ωct) + 41 antenna
M/2cos[(ωc–ωM) t] + mixer
M/2cos[(ωc+ωM) t]. BBC188.WAV

This shows that the signal consists of


three individual cosinusoidal signals:
the carrier and two sidebands at a
given distance from the carrier.
The modulating signal contains
many cosinusoidal frequencies:
188 kHz
s(t) = a0cos(ω0t) + a1cos(ω1t) + 980015 - 5 - 22
a2cos(ω2t) + …

Each of the terms in this equation pro- Figure 41. Set-up for generating an AM
vides a spectral line to the left and right signal.
of the carrier. To enable AM signals to
be investigated, the menu contains a
program AMGEN1.EXE for the generation
of AM signals with which the various
experiments may be carried out. 42 oscilloscope
[980015-5]

mixer
References
AM
Digital Processing of Signals, C.M. Rader 150 Hz
signal
and B. Gold, McGraw-Hill
spectrum analyser
Analog Interface and DSP Source-
book, 1993, ISBN 0 07 707694 X,
Alan Clements, McGraw-Hill
10 kHz
Communications Technology Hand-
book, 1997, ISBN 0 240 51461 0, 980015 - 5 - 23
Geof Lewis, Focal Press
Figure 42. Recording an AM broadcast
Digital Audio Signal Processing, 1997 IS signal.
BN 0 471 97226 6, Udo Zölzer, Wiley

Digital Systems Reference Book, 1991, IS


BN 0 7506 1008 5 43
B. Holdsworth & G.R. Martin
Buterworth-Heinemann

Notice tmp. wav 1 .. 600 AUTO am. wav 1 .. 600 AUTO


980015 - 5 - 11

Before starting to use the programs, copy


the entire folder ‘Espresso’ from the Figure 43. Modulating signal (left) and
CD-ROM to the hard disk. The programs AM signal (right).
may then be run from the hard disk. This
procedure is also explained in the ‘readme’
Figure 44. Spectrum of the modulating
file on the CD-ROM. signal (left) and AM signal (right).
When copying a file or folder under Win-
dows, its read-only setting is also copied.
With many Espresso programs, the 44
read-only attribute causes an error report to
be displayed, or graphics to disappear. This
problem is solved by using the Explorer,
selecting all files in the Espresso folder on
the hard disk and then clicking on File –
Properties. Remove the check mark in the
‘read only’ square by clicking on it. Close
the program by pressing OK after which
everything should function correctly. 980015 - 5 - 25

Elektor Electronics 5/98 45


n line
electsr nics on-line
electronics
design-hunting
design -hunting
IfIf you are
are looking for a circuit diagram for
for aa specific
specific application,
application, there
there
is a fair
is fair chance that you can find it onon the
the Internet.
Internet. Hobbyists,
Hobbyists, technical
technical
colleges and universities are just a few sources of that that elusive
elusive circuit
circuit
diagram, and, if you are lucky, a complete description to go with it.

BIB EL yew Go CommmIcetor Help What was


What was it again you
it again you Washington University's
University’s server
were looking
looking for?for? A A small
small (www.ee.washington.edu/eeca/circuits) also also
Bookmarks Location Ihttp //m. ee washnglon eduleecakIrculls/prdx1html
motor control circuitcircuit or a holds a number
number of of interesting
interesting circuit
circuit
1,PRDXL PaRaDoXicaL Sound Synthesizer`
'"IKEYB°ARD ffillrnllllllffiffif.rllegok
solar -powered
solar-powered battery diagrams like a paradoxical sound
diagrams sound syn-
syn-
ENCODER
WAVE GENERATOR
charger?
charger? Of Ofcourse,
course,Elektor
Elektor thesizer and an
thesizer an RFRF sniffer
sniffer (see
(see for
for
Electronics magazine, our
Electronics magazine, yourself what
what this
this isis all
all about).
about).
books andand CD-ROMs
CD-ROMs are Then there is the technicaltechnical depart-
depart-
the best and
and largest
largest source ment of the Poole Poole Grammar
Grammar School School
you'll want to turn to
you’ll want to for
for which runs
runs aa site
site showing beautifully
help, using the the invaluable
invaluable designed
designed Internet pages
help of our Item
Item Tracer
Tracer on (users.bournemouth.net.co.uk/-pooleg-
(users.bournemouth.net.co.uk/~pooleg-
diskette. And yet, there there are
are stech/htm/circuits.htm).Although
stech/htm/circuits.htm). Although you you
subjects that have not not been
been may find just aa couple
couple of of circuit
circuit dia-
covered by Elektor,
Elektor, or you you grams at this site, there are are extensive
extensive
al
may be
may be looking for aa descriptions to go with them, and the the
slightly different approach
approach pages have an an attractive
attractive layout.
layout. This
This
to the
to the project
project you you are are site is certainly worth
worthaavisit!visit!
working on.
working on. In
In those
those cases,
cases, Private individuals, too, show their
File Edit PAW Go Commkneater Help the Internet can be be very
very circuit diagrams
circuit diagrams on on the web, web, often
often
useful, because it has has aa vast
vast using links to other
other sites
sites containing
containing cir- cir-
4- Bookmark, A Location Ihttp //avers bournernouth net co uk/Hpoolegstech/htm/elecprohtm

When these two voltage are applied to the OP Amp, we will have a situation where there is only a Voltage A
number of
number of subjects
subjects in store store cuits.
cuits.
from the output of the Op Amp when the temperature is sufficient drat the supply voltage exceeds the which are offered
offered free free of of Tomi Engdahl’s
Tomi Engdahl's Electronics
Electronics Info Info
reference voltage of 4 5V
charge to interested readers Page at www.hut.filMisclElectronics
www.hut.fi/Misc/Electronics is
or aspiring constructors. very extensive.
extensive. Here you are sure to
Broadly speaking,
Broadly speaking, the the find diagrams
diagrams for for a wide variety variety of
sites holding electronics cir-
holding electronics cir- applications, as well as addresses of
applications, of
cuit diagrams (also (also called
called electronic -part manufacturers,
electronic-part manufacturers, and
schematics) may be divided divided even information
even information on onsubjects
subjects like
like EMC
into two
into two classes:
classes: educa-
educa- or GPS.
GPS.
tional on
tional on the one one hand,
hand, The Electronics
ElectronicsPage Pageatatwww.world-
www.world-
and hobby
and -oriented, on the
hobby-oriented, the net.net/~muldowne/schems.html
net.net/-muldowne/schems.html also also
Notice the red bar at the ouput - meaning that there is a+ voltage there. You can now see that if a buzzer other. Especially on serversservers offers an impressive
impressive collection
collection of of cir-
cir-
were to be placed at the output it would only sound when the temperature exceeded 40 degrees This
could be used for a project such as the bath -o -meter, a project which I personally did, and it worked well
at technical
technical colleges
colleges and cuit diagrams for for power
power supplies,
supplies,RF, RF,
The point was that we should have a bar graph as well, which I also did - it displayed the temperature of universities vast amounts
universities audio/video, etc.
audio/video, etc.
ffi .ffillim 44 of electronic
of electronic circuit
circuit dia-dia- Other addresses you may want want to to
grams may be be found.
found. We We turn to
turn to for
for interesting
interesting schematics
schematics are,
Ete Edt ,/rerm Go communicator Help launched our browser and among others,
others, Circuit Land
A d paid aa visit to some of these
paid these (www.uoguelph.ca/~antoon/circ/circuits),
(www.uoguelph.ca/-antoon/circ/circuits),
Bookmarks ls Location. [blln.//www.eklekix.com/gfc/elect/cant/contaif
sites.
sites. Electronic Schematics (www.web- (www.web-
rralla="
eeekOeltleloizoon.
Vsp
see 1-(17F,WWW EKLEKTIX COM:SOLAR
for cmourl boards
The Circuit Cookbook
Cookbook span.com/pjohnson/schematics.htm),
span.com/pjohnson/schematics.htm), FC’s FC's
WBORIO Ackvaton
RI Comparator TCB
) Cl=
Archive at thethe university
university of Electronic Circuits
a Cell Solar Panel
SPBIBAT
Set
Vbat
Alberta (ftp.ee.
(ftp.ee. (www.eklektix.com/gfc/elect/)and
(www.eklektix.com/gfc/elect/) and Dr.Dr.
ualberta.ca/pub/cookbook/ Bob's
Bob’s Electronics Resource
index.html)
index.html) contains a (www.drbob.net/).Note,
(www.drbob.net/). Note,however,
however, that that
number of
respectable number of sub- the references
references on these these pages
pages often
often
jects in various fields, point to one and and the
thesamesamecircuit
circuit dia-
dia-
including audio, comput- comput- gram, and that that many
many designs
designs areare sim-
sim-
ers, RF,
RF, software
software as well as ply copied from databooks. None the the
Spice files. This is is definitely
definitely there's lots of interesting
less, there’s interesting stuff out
a source
source that has a lot to there, just waiting to be discovered.
-
Enevil
lI, tars
TCs
12 Volt
Satter
offer.
offer. (985037-2)
(985037-2)
The Circuits Archive at

A46
46 Elektor Electronics
Electronics 5/98
battery-resistance
battery -resistance
meter
for all kinds of battery

A measurement of the e.m.f. of a bat- Both


Both dry and and rechargeable
rechargeable batteries
batteries
retain
retain their e.m.f. more or or less
tery (dry or rechargeable) does not unchanged over about three quarters
say anything about the condition of of their useful
useful life
life (dry) oror charge/dis-
charge cycle (rechargeable). However,
charge/dis-

the battery or its


its constituent
constituent cells.
cells. To
To a useful
useful indication
indication of the the residual
residual
obtain a useful indication of that con- capacity
capacity or or state
state of charge
charge can can be be
obtained only whenwhen aa current
current is is drawn
drawn
dition it is necessary to measure
measure the from the battery by a load. If then the
terminal voltage changes
changes little,
little, it may
may
battery voltage under load. The circuit be assumed that the the battery
battery is is in
in rea-
rea-
described in this article
article allows
allows this
this to
to sonable condition.
condition. If,
appreciably,
appreciably, the
If, however, it drops
the battery is very nearly
drops
nearly
be done readily, and goes even fur- flat or near the
the end
endof ofits
itslife.
life.
In the
the case of a rechargeable battery,
ther since it enables
enables the
the extent
extent to to an even
even better
better indication
indication of of its
its condi-
condi-
which the battery is able to to follow
follow tion is obtained when when itit isis first
first fully
fully
charged and thenthen discharged
discharged at at a well
rapid changes in the load to to be
be defined current. The product of the
monitored.
monitored. time taken for the battery
battery to to become
become
discharged and the discharge
discharge current
gives
gives an accurate
accurate indication
indication of the the
capacity of the battery.
Design by
by KK AA Walraven
Walraven Tests like
Tests likethese
theseare
are useful
useful when
when the

48 Elektor Electronics
Electronics 5/98
48
Visit our Web site at http://ourworld.compuserve.com/homepages/elektor_uk

battery is used for normal applications + CEL


that draw normal currents. Unfortu- 1 R3 T1
nately, this is not true for a number of 12k
10
R7
applications; electronic flash devices, 9V 8
IC1c 220Ω
R4 9
for instance, draw fairly large currents.
22k BUZ10 BT
And they are not the only ones. R1 BUK455
C4
P1
Many batteries, such as dry alkaline

12k
C2
47k
R8
manganese and rechargeable metal R9 C 10µ
63V

0Ω47
220n
hydride types, cannot handle large

10k
A
3 A B 9V
discharge currents. Nickel-cadmium 1
R5
6 R10 D 5W
IC1a 100k R6
batteries can, provided they are in 2 7 2M2 D1 – CEL
IC1b 12k
good condition. The reason for this dif- 5
13
ferent behaviour lies in the internal A
14
R11 OK
C IC1d 3k9
resistance of the battery. That of a 12
Ni-Cd battery in mint condition is very R2
C1 C3
R12

10k

1k8
low, whereas that of an alkaline man- IC1 = TLC274
K1 IC2
ganese type is high, as is that of a 10µ
63V
2µ2
16V D2 7809 9V
nearly discharged Ni-Cd type. 12V
8mA5
The present circuit serves to mea- 1N4001
sure the internal resistance of a battery. C6 C5 4
47mVAC
It does so by monitoring how well the A 4V C 470mV DC IC1
10µ 11
battery is able to follow rapid varia- 0V5 AC 63V 100n
B D 0V9
tions in the discharge current. This 4V DC

does not give an accurate indication of 980027 - 11

the capacity of the battery, but it does Figure 1. The circuit con-
give a good idea of the condition and sists of two main sec-
quality of the tested battery. tions: an alternating-volt-
angular type. The age generator (IC1a and put of the op amp is
TEST METHOD output voltage may IC1b) and a current source then high, so that the
A test with a large, constant discharge be set, within certain (IC1c and T1). voltages at pins 13
current does not suffice to get an idea limits, with P1. The and 14 are not equal
of the quality of the battery, since it triangular-shaped and the diode does
does not show how the battery reacts voltage at the output of IC1b is shaped not light.
to variations in the load current. It is by low-pass filter R6-C3 into roughly a Power for the circuit is provided by
only when the terminal voltage of the sine wave. a standard 12 V mains adaptor con-
battery is measured under rapidly The near-sinusoidal voltage is nected to K1. The current drawn from
varying load current conditions that a superimposed on to a direct voltage. the adaptor remains small: about
good picture will emerge of how the This is done by linking the –ve input 8.5 mA. Voltage regulator IC2 converts
battery reacts. The way to do this is to of IC1a and the +ve input of IC1b to the adaptor output into a stable 9 V
test a new battery (or one of proven the junction of R1 and R2 instead of to direct voltage. Diode D2 prevents any
good quality) and note the measure- earth as is usual. The voltage at the mishaps if the mains adaptor were
ment results. Test results on other, junction is about +4 V. connected with wrong polarity.
probably older, batteries can be com- Potential divider R6-R12 reduces the
pared with those of the new battery generator output to a direct voltage of CONSTRUCTION AND
from which clear conclusions may be about 47 mV with superimposed on it CALIBRATION
drawn. an alternating voltage of 47 mV. This The impedance meter is best built on
The terminal voltage is measured complex signal is applied to current the printed-circuit board shown in Fig-
with a common or garden digital mul- source IC1c-T1. The battery, connected ure 2, which is not available ready
timeter. The varying load is provided to terminals +bat and –bat, is dis- made.
by the present circuit. The load current charged via the drain-source junction It makes sense to start with build-
consists of two parts: a 1 A direct cur- of transistor T1 and resistor R8 in the ing the power supply and checking
rent and a 100 mA alternating current. rhythm of the generator signal that that the potential across C5 is 9 V. Next,
The frequency of the alternating cur- drives the gate via op amp IC1c. The complete the circuits around IC1a and
rent is 50 Hz, since both the battery potential at the +ve input (pin 10) of IC1b, set P1 to its centre position and
and the multimeter can handle this IC1c is equal to the voltage across R8, verify with a multimeter or oscillo-
without any problem. so that a direct current of 1A and a scope that the voltages at various
The internal resistance is calculated pulsating one of 100 mA is drawn from points are in line with those specified
by simply multiplying the meter read- the battery. Capacitor C4 improves the on the circuit diagram. Make sure that
ing (with the multimeter in the rele- stability of the current source and sup- the meter is set to the correct range
vant a.c. range across the battery ter- presses any oscillations. (a.c. or d.c.) for each measurement
minals) ×10. The circuit based on IC1d is a sim- and, if an oscilloscope is used, bear in
ple indicator network that prevents mind that 470 mV rms has a peak-to-
CIRCUIT DESCRIPTION any measurement errors. Note that peak value 2.8 times larger.
The circuit in Figure 1 consists of two diode D1 lights only when the voltages Build the remainder of the circuit
parts: a current source via which the at pins 13 and 14 of IC1d are equal or and connect a 1.5 V battery to the bat
battery is discharged and a generator very nearly so. At the onset of the terminals, whereupon D1 should light.
that controls the current source. measurement, it should be ascertained If it does not, there flows insufficient
The generator is based on opera- that this diode lights to prevent a flat current through R8, which means that
tional amplifiers IC1a and IC1b. Since battery being confused with one with the entire current source should be
only the amplitude of the generator a low internal resistance. In case of a inspected thoroughly.
output is of essence, and not its shape, flat battery, the current is small, so that Connect the multimeter, set to the
the oscillator is a straightforward tri- the potential at pin 13 is low. The out-

Elektor Electronics 5/98 49


Visitour
Visit our Web
Website
siteat
athttp://ourworld.compuserve.com/homepages/elektor_uk
http://ourworld.compuserve.com/homepages/elektor uk

C6
Parts list
list
2
H4
H1

D2
Resistors:
Resistors:
980027-1
1-720089

980027-1
tnemgeS )C(

(C) Segment
K1
R
Ri1,, R 3, R
R3, R66 = kΩ
= 12 kf2

IC2
R2,
R 2, RR99 == 10 kf2
kΩ

C5
R4
R 4 = = 22 kf2
kΩ
R5
R 5 = = 100
100 kf2
kΩ
C2

R
R77 = Ω
220 f2
= 220
Ω, 5 W
R2
R1

R5
R3
R4
R8
R 8 = = 0.47
0.47 f2, W
Rio
R 10 = = 2.2
2.2 Mf2
MΩ

R8
R
Rii
11 ==3.93.9 kΩ
kn
P1 R 12 =
R12 kΩ
= 1.8 kf2
C1 C3

IC1 P1
P 1 = = 47
47 kf2
kΩ preset
preset potentiometer
potentiometer
D1

Capacitors:
Capacitors:
C1, C
C1, C66 = 10 [IF,
= 10 µF, 63 V,
V, radial
C4
R12

R10
R11

C2 =
C2 0.22 [IF
= 0.22 µF
R7
R6

R9

C3 =
C3 2.2 [IF,
= 2.2 µF, 16
16 V,
V, radial
radial
C4 =10
C4= 10µF,
µF, 63
63 VV
T
D

C5 =
C5 0.1 [IF
= 0.1 µF
T1

H2

H3

Semiconductors:
Semiconductors:
D1
D = LED,
1 = LED, low current
current
D2
D = 1N4001
2 = 1N4001
Figure 2.2.The
Figure Theprinted -
printed- T1 == BUZ10
BUZ10 or
or BUK455
BUK455
relevant
relevant a.c.a.c. range, circuit board guaran-
circuit guaran- warm. Nevertheless,
Nevertheless, itit
across R and adjust
R88 and adjustP1
P1 tees construction
tees construction it is advisable to mount
mount Integrated circuits:
circuits:
for a reading
readingof of47
47mV,
mV, without problems.
without it on a small heat
heat sink.
sink. IC
IC11 = TLC274
= TLC274
that
that is, 1/10 of the
the resis- Housing the meter IC2
IC = 7809
2 = 7809
tance value.
tance value. Set thethe in a suitable enclosure
enclosure
meter to the relevant d.c. range and is a matter
matter of
of personal
personal preference
preference Miscellaneous:
K11 = mains adaptor connector
K connector
check the direct
check direct voltage
voltage across
across R 8,
R8, which, in view of the modest dimen-
Heat sink for Ti
Heat T1
which should
should bebe about
about500
500mV. mV. The sions of
sions of the board, will not prove tootoo Connecting cables (see text)
text)
exact value
exact value is
is not
not important. difficult.
Finally, measure the frequency of
Finally, measure Heavy-duty, insulated circuit wire Mb -

the alternating
alternating current.
current. IfIf all
all is
is well,
well, (red for the + ye terminal and
+ve and black
black for
this should be about
about 50
50 Hz, but again, the -ye
–ve one)
one) terminated
terminated inin suitable
suitable check that
check that D1 lights, and
D1 lights, and shunt the
this is not terribly important:
important: 25 25 Hz
Hz or
or clips should
clips should be used for connecting the battery with
battery with a digital
digital voltmeter
voltmeter or or
100Hz
100 Hz will
willdo
do as
as well.
well. Note
Note that
that the battery to the
the meter.
meter. multimeter set to the appropriate
appropriate a.c.a.c.
frequency is affected by the the position
position A photograph of
A of the
the completed
completed range. The meter readings
readings are are best
best
P1.
of P1. impedance meter
meter is shown
shown inin Figure
Figure 3. compared with those obtained with a
Although the internal
internal resistance
resistance of battery known to be in mint
battery mint condi-
condi-
a battery isis measured
measured quite
quitequickly,
quickly, USAGE
U SAGE tion. The value of the internal
internal resis-
resis-
transistor T1 will not
T1 will not become
become unduly
unduly Connect a battery to the
the bat
bat terminals,
terminals, tance in ohms is the value of the mea-
sured alternating
sured alternating voltage
voltage in
in volts
volts
divided by
divided by 10.
10.
The meter may also be used
3 to determine the the contact
contact resis-
resis-
tance of battery holders and and con-
necting leads. Contact resistances
affect the
adversely affect the performance
of a battery. First, First, measure
directly on the battery, then on on
the terminals
terminals of of the
the battery
battery
holder, and finally at the far end end
of the connecting
connecting wires.
wires. This
This will
show quickly where the the largest
largest
losses occur.
[980027]
[980027]

3. It is advis-
Figure 3.
able to mount
mount T1 T1 on a
heat sink.
sink.

Elektor Electronics
Electronics 5/98 51
51
1
Fibre optic
data
data communication
RS232 interface
RS232 interface
with fibre optic links
with
When in 1870 John
Tyndall, an Irish
physicist working in
the USA, showed
that light can be
guided, he could
not have foreseen
foreseen
that little over a
century later an
increasing propor-
propor-
tion of the world’s
world's
communications
would bebe carried
by fibre optic
cables. Now, fibre
optics finds application not only
only in vast telecommu- The serial interface is used
host of peripheral
used to connect a
peripheral equipment
equipmentto toaa com-
com-
nication systems all over the world, but also in the puter and
puter and enables
enables relatively
relatively large
large dis-
tances toto be
be bridged.
bridged.TheTheRS232
RS232 inter-
home (hi-fi system, cable
cable television).
television). The
The RS232
RS232 face described in this article
face described article is is con-
con-
interface presented in this article enables a com-
com- nected to the serial port of a computer
and provides,
provides, apart from from the the well-
well-
puter to be connected to aa variety of peripheral
connected to known advantages,
known advantages, the the further
further benefit
benefit
equipment via fibre optic cables. electrical isolation
of electrical isolationthrough
through the the use
use of
fibre optic
optic cables.
cables.
Depending on
Depending on the
the control
control system in
use (no handshaking
handshaking via via hardware
hardwaresig- sig-
nals, but via the X XoN/X,
ON/XOFF protocol)
protocol) ser- ser-
Brief specification ial links enable a duplex connection
connection to to
Carrier fibre optic cable
cable be established withwith only
only three
three electrical
electrical
Input levels CMOS, TTL or or RS232
RS232 signals. If use is made of light signals,
Output level RS232
RS232 only two channels are required for data
Supply line 5 V regulated communication, and
communication, andthis
thisisis the
thebasis
basis ofof
the present
present article.
article.
Current drain (each interface)
interface) mA
45 mA
Each of thethe data channels, TxD and and
Maximum data rate 115,200 symbols
symbols
RxD, requires
RxD, requires itsits own
own dedicated
dedicated fibrefibre
Interface connectors sub-D
sub 25
-D 25
optic cable,
cable, which ensures complete complete
optic cables
Number of fibre optic 2
2
electrical isolation
electrical isolation between two two com-
com-
Maximum length
Maximum length of cables 2-3
2–3 metres
metres puters or between a computer and and aa
peripheral unit.
arrangement entails
The arrangement entailsfor forall
all elec-
elec-
Design by T. Giesberts
T. Giesberts trical handshake
trical handshake signals
signals (RTS, , CTS,DTR,
(RTSCTS, DTR,

MK= 452
52 Elektor Electronics 5/98
Visit our Web site at http://ourworld.compuserve.com/homepages/elektor_uk

D25
1 1
2 D25

1 DCD 1
D9

14
14 DSR 6
2 TxD
TxD 2 TxD RxD 2
15
15 RTS 7
3 RxD
RxD 3 RxD TxD 3
16
16 CTS 8
4 RTS
4 RTS DTR 4
17
17 9
5 CTS
5 CTS GND 5
18
18
6 DSR
6 DSR
19
19
7 GND
GND 7 GND
20 DTR
20 DTR
8 DCD
8 DCD
21
21
9
9
22
22
10
10
23
Figure 1. By appropri- 23 Figure 2. If the com-
11
24
ately interlinking the 11 puter has a 9-way ser-
24
12 hardware handshake ial connector, a suit-
12
25 signals, a serial con- 25
able adaptor as shown
13 nection may be 13 here must be used.
reduced 980042
to just
- 11 three 980042 - 12

wires.

DSR and DCD) to be intercepted by the THE DESIGN from a 5 V supply line.
interface, which is effected by links on The circuit diagram of the interface is While IC3 arranges the conversion
the connectors. It also requires a suit- shown in Figure 3. Signals RTS and CTS of RS232 levels to TTL levels, IC1 and
able software protocol to be chosen. and DTS, DSR, and DCD, are interlinked IC2 arrange the transformation from
Figure 1 shows how a practical, ser- on connector K1. This arrangement dis- TTL signals to optical signals and vice
ial Xon/XOFF communication may be ables the entire hardware handshaking versa respectively.
established. If the computer is procedure. All that remains are data Circuits IC1 and IC2 are well known
equipped with a 9-way connector signals RxD (pin 3) and TxD (pin 2), in the audio world, since they are nor-
instead of a 25-way one (on which the and these signals are applied directly mally used in digital audio equipment
present circuit is based), a simple adap- to IC3. fitted with optical connectors. They are
tor must be used. Figure 2 shows how Integrated circuit IC3 contains two coupled to fil-
a suitable one may be fabricated. RS232 drivers, two RS232 receivers, ters that sup- Figure 3. The design of
and an integral voltage converter. The press any r.f. the interface is
SIMPLICITY IS THE converter enables the interface to work signals, which straightforward. Serial
WORD signals TxD and RxD
Not only is the design of the interface are carried by separate
straightforward, but the optical parts of 5V 5V
fibre optic cables.
the circuit have also been kept fairly 3 C3
R1
simple. This has resulted in a commu-
4Ω7

100n
nication system without special coding IC1
IC3 7 TOTX173
techniques, which means that each
V+ 3
data channel needs its own fibre optic K1 R2
4 R1 3 2
carrier. It would have been possible to 1
8k2
4
use only one fibre optic cable, but this 14 19 R2 20
requires a complex method of modula- 2 TxD C1 1
tion, which in the present circuit was 15 5 T1 2
100n
not felt justified. Also, the additional 3 RxD
16 18 T2 1
cost of a suitable modem (modula-
4
tor/demodulator) would be well in 17 10 ADM233LJN
5V
IC2
excess of the cost saving on one fibre 5 16 C2– 12
L1 TORX173
optic cable. 18 11 V– 17
1
In spite of its simplicity, the inter- 6 15 C2+

face may be used with virtually any 19


47µH 3
7 6 9
serial connection. On the basis of rele- C2
20
vant manufacturer’s specifications, the 8
2 4 5 6
100n
interface may be used even with the 21
highest current bitrate of 115,200 sym- 9
bols*. 22 IC4
10 > 9V D1 7805 5V
23
11 1N4002
24
C5 C4
* In modern data communications, the symbol is 12
now commonly used to replace the baud as the 25 220µ 4µ7
25V 63V
unit of transmission rate. Like the baud, a symbol 13

may (and frequently does) represent more than 980042 - 13


one data bit.

Elektor Electronics 5/98 53


Visit our Web
Web site
site at
athttp://ourworld.compuserve.com/homepages/elektor_uk
http://ourworld.compuserve.com/homepages/elektor_uk

Figure 4. The
The printed-circuit
printed -circuit board
board for
for the
the two interfaces must be cut
Parts list into
into two
two before
before any
any work
work isis started.
started.
Resistors:
Resistors: 4
Ri1 ==4.7
R Ω
4.7 f2
R
R22= 8.2 kΩ
= 8.2k52

Capacitors:
C1-C3
C 1–C3 == 0.1
0.1 µF,
µF, ceramic
C K1
K1 K1
K1
C44= 4.7 µF,
= 4.7 µF, 63
63 V,
V, radial
radial
00000_91.1_1100000
C
C55= 220 µF,
= 220 µF, 25
25 V,
V, radial
radial 000000GO _91.1_1100000
010tini00000 3 0100GOtini00000 O
Inductors:
Inductors: flfjp 000

C4
IC4

C4
IC4
LL1
1== 47 pH
µH IC3 IC3

980042-1

980042-1
1-240089

1-240089
tnemgeS )C(

tnemgeS )C(
Semiconductors:
!DI***
QUM R1 %lipR1
D
D11= 1N4002
= 1N4002 C1 C
C3 3 11!1
L1 C1 Z3:-C3c3 11!1
L1 0

D1

D1
I [01 I

MEM
R2 C2
C2O' rILLL
R2 J C2
C2 IP I

circuits:
Integrated circuits:
u' u'

C5

C5
OUT OUT

IC1
IC 1== TOTX713
TOTX713 (Toshiba)
(Toshiba)

H3

H3
H4 H4

IN

+
0

0
IC
IC22= TORX173 (Toshiba)
= TORX173 (Toshiba) 'Cl
IC1 IC2
1C2 'Cl
IC1 IC2
1C2
IC3
IC 3== ADM233LJN (Analog
(Analog Devices)
Devices)
or MAX233 (Maxim)
(Maxim)
IC4
IC 4== 7805

Miscellaneous:
Miscellaneous:
K
K11= 25-way
= 25 -way female D
D-connector,
-connector,
right-angled, for board mounting
PCB Order no. 980042 (see
(see Readers
Readers
Services towards the end of this
this
issue)
issue)

might mutilate the data.

980042-1

980042-1
(C) Segment

(C) Segment
The optical link and the the fibre
fibre optic
cables to
cables to be
be used
used are readily available
since they
they are identical to to those
those used
used in
good -qualityaudio
good-quality audio equipment.
equipment.
Since the
the interface draws
draws aa relatively
high current
current (about
(about45 45 mA), it has been
provided with a dedicated power sup-
ply. This
This is
is fed
fed by
by a 12
12 VV mains
mains adaptor,
and consists
consists of of capacitors
capacitors C4 C4 and
and C5,
C5, and the
the receiver (X (XoN/X,).
ON/XOFF). work
work as
as before,
before, but
but the
theelectrical
electrical con-
con-
diode D1,
D1, and voltage
voltage regulator
regulator IC4.
IC4. Note that each interface needs its its nection has successfully been replaced
replaced
Diode D
Diode D1 merely protects
1 merely protects the
the supply own power
power supply, that that is,
is, two mains
mains an optical
by an optical one.
one.
against polarity reversal. adaptors are needed.
needed. Since
Since each inter- [980042]
[980042]

draws a current
face draws current ofof about
about45 45 mA at
CONSTRUCTION
C ONSTRUCTION an input
input voltage
voltageof of9-12
9–12V, V, it may be
be
The interface is
The interface is best
best built
built on
on thethe possible to derive power
power fromfrom the
the 12
12 V Figure 5. Photograph
Photograph of the completed
printed -circuitboard
printed-circuit board shown
shown in Fig- Fig- supply in the computer. prototype.
prototype. The
The fibre optic
optic cables
cables enable
enable
4, but
ure 4, but before
before any construction is is Switch on
Switch on the
the supply
supply to the inter- communication
communication at at aa data transmission
transmission
started, the board mustmust be cut into two faces. If
faces. If all
all isis well,
well, the
the serial link will rate
rate of
of 115,200
115,200 symbols.
symbols.
as indicated. The resulting two identi-
cal boards
boards enable a complete
complete fibre
fibre optic
optic
link between
link between two two computers
computers or or
between a computer an a peripheral
unit to be established.
5
Except for IC IC3, allcomponents
3, all components are
to be soldered directly on to the rele-
vant board.
board. Mind
Mind thethe polarity
polarity ofof the
the
diode and
and the
theelectrolytic
electrolytic capacitors.
capacitors.
Also, take
take care
care not
not to confuse IC ICi1 with
IC2
IC and vice
2 and vice versa.
versa. Although these
similar, they
devices look very similar, they are not
interchangeable!
soldering the
Before soldering the pins
pinsofof K1,
K1, the
connector should
connector should be be fastened
fastenedon on the
board with
board with two
two screws, nuts and wash-
and wash-
This procedure
ers. This procedure prevents
prevents any any
undue mechanical
undue mechanical stresses.
When
When allall soldering
soldering has has been
been com-
com-
pleted, the ready for use.
the interfaces are ready
Connect them, together with the the fibre
fibre
cables in
optic cables in a serial link and select
the correct protocol for for both
both the
the driver

Elektor Electronics 5/98 55


PICXEX
an operating system
for PIC16C7x processors
Today most electronic XEX00

enthusiasts realise 1 EXECUTE ALL


ACTIVE TIME
TASKS
that software-based XEX01
control circuits offer GOTO CURRENT
ENTRY POINT
certain advantages
over their hard-wired TIME
EXECUTE ALL
ACTIVE EVENT
EXIT
counterparts, but… TASKS

SERVICE
WATCHDOG

Figure 1. Task ENTRY POINT = 0


Executive.
980034 - 11

for me the big question was how to intervals, others at a particular event or UNDER THE HOOD OF
progress from that first piece of soft- state, and the rest at a rate fast enough PICXEX
ware that flashed an LED (my wife to give real-time results. In most micro- The basic idea is that you have 16
could not understand the euphoria) to controller applications, considerable CALL instructions, each associated
that ‘real’ application I always wanted programming effort is spent on the with a bit (flag). If a flag is set then its
to implement on a microcontroller. code that controls/regulates the execu- CALL instruction is executed, other-
tion of the code that makes up the wise it is skipped. This provides a
After a lot of code writing, debugging actual application. Sometimes these two mechanism to selectively execute the 16
and (re)burning of chips the system code types are so interlocked that no subroutines referred to as “tasks”. The
was doing more or less what it was clear borders exist. This situation com- flags of 8 of the tasks, called the Event-
intended to do, but I was beginning to plicates debugging in all but the very Tasks, are set/reset by any of your code.
have doubts about ease-of-use of soft- small software applications. PICXEX is So you can activate and deactivate
ware-based systems. Still, the idea of an effort to solve this problem. Despite Event tasks if and when required. The
using software appealed to me and it its simplicity and size it turned out to be flag bits associated with the other 8
was back to the drawing board. an enabling-tool for those ‘real’ micro tasks, the Time-Tasks, are set by a
controller applications. scheduler routine at time-intervals you
WHY AN OPERATING With hardware borrowed from a select, and thus we have Time-Tasks
SYSTEM? friend and lots of encouragement that are being executed at regular time
It is a well known fact that one of the from the same gentleman, PICXEX intervals.
most successful methods of system was implemented on a PIC16C73 PICXEX consists of two sections, the
design is to break the problem down from Microchip using their MPASM Task-Executive and the Time-Task
into smaller, simpler, tasks. These parts assembler and MPSIM simulator. The Scheduler.
or tasks must now be coded, keeping in code uses about 140 program loca-
mind that to function as a system their tions, 4 registers and you loose one Task Executive
execution must be co-ordinated. Some level of the stack. PICXEX is simplicity Figure 1 is a flowchart of the Task Exec-
must be executed at predetermined itself and the idea can be applied to utive. In the first section all Time-Tasks
other microcontrollers with ease. If with their flag bits set are executed. If
you have an existing assembly lan- the Scheduler sets the flag for a partic-
guage based application using any of ular Time-Task every 20 ms. the Task
the PIC16C7x range you can probably Executive will oblige and execute that
apply PICXEX to your code without task on average every 20 ms.
By L. Legrange major software surgery. Event-Tasks are executed in a similar

Elektor Electronics 5/98


56
way. Flags of Event-Tasks are manipu- SCHED-COUNT
lated by any application code, i.e., 2 1 2 3
other tasks, interrupt service routines,
etc. by using the macro’s SELECT
XEX_ON_EVENT and ADDR. + =
1 20
XEX_OFF_EVENT.
R
Time-Task Scheduler
4
The Scheduler is in the form of a sub- MASK1 1 TIME-TASK
routine that must be called at regular MASK2 2 FLAGS
OUT OR
intervals from a timer interrupt service MASK3 3
routine. Every time this routine ...... ...
(SCHED00) is executed it takes the next ...... ...
...... ...
entry from a ‘circular’ lookup table and
loads (actually logic ORs) this ‘mask’ MASK19 19
into the register that holds the activa- MASK20 20
980034 - 12
tion flag bits for the 8 Time-Tasks. See Figure 2. Time-Task
Figure 2 for a functional diagram of the Scheduler.
Scheduler. If we provide for 20 entries also the task names.
in the Scheduler lookup table, and Arrange for a timer interrupt service
arrange to execute the Scheduler every routine to include a ‘call SCHED00’ data and events is the responsibility of
10 ms., then every 10 ms another instruction so that the Scheduler sub- the tasks. Remember PICXEX is igno-
‘mask’ will be loaded into the register routine is executed every 10 ms. rant of any interrupts while it is hap-
holding the eight Time-Task flags. So Include code after your start-up initial- pily going about its way executing
by setting bit 0 in each of the 20 masks ising code to set the active flags of the tasks. Interrupt service routines, and all
Time-Task number 1 will be executed Event-Tasks you want running at start- that goes with them, are your respon-
every 10 ms, or if bit 0 is set in every up, and to pass control to the Task- sibility. After all you also are entitled to
alternative mask, then Time Task num- Executive of PICXEX. Listing 2 is an some of the fun.
ber 1 will be executed every 20 ms, etc. example. That final ‘goto Main_00’ The format to use for tasks. Both Event
With a 20-mask table, and if you call instruction is very important. and Time-Tasks must be in the form of
SCHED00 every 10 ms you can select PICXEX contains a ‘configuration’ file subroutines. That is, they start with a
any of the following execution periods where you specify task names, the 4 unique name and have one or more
for individual Time-Tasks by setting the registers used, timing information for ‘RETURN’ instructions. Use the macro
appropriate bits in the masks: Time-Tasks (in the form of masks) and XEX_RETURN, which is equivalent to
10, 20, 40, 50, 100, or 200 ms. the number of masks. Listing 1 is a the return instruction, but gives a clear
A good idea is to ‘spread’ your bits. If copy of PICXEX’s configuration file as indication in the listing of where you exit
you want to execute more than one used in the application example dis- a task to return to the Task Executive.
task at, say, 40 ms, then do not set their cussed later in this article. Avoid any but the shortest delay
associated flag. bits in the same masks. loops inside a task, it will delay other
This way you can even-out your USING PICXEX, tasks from getting executed. With
processor load. GENERAL GUIDELINES PICXEX you now have far more ele-
Divide the application into simpler func- gant ways to implement delays.
USING PICXEX, THE tions/processors. The time-independent The size of a task. Keep Event and
BASICS functions will be Event-Tasks, and the Time-Tasks to a size and functionality
As PICXEX is not part of your applica- ones that require execution at specific that will ensure an execution time of
tion code it is straightforward to apply. intervals the Time-Tasks. about 2 ms. This is enough time to
Keep Interrupt Service Routines short. block-write 8 bytes to a serial EEPROM,
Make your application tasks in the Use interrupts to gather and dispatch and if you use an 8-MHz clock, more
form of subroutines. The data, and to register than enough instructions to do a PID
subroutine names are Figure 3. Setpoint Sta- events. Processing routine using floating point maths.
tion (Event-Task 3)

3 INC 3_3
SW-B 3_7
3_11
CNTLIM-16 SPEED
KEY01
BIN02 BIN03 SETPOINT
INC OUT
& WORD01
3_2
DEC
ON-DELAY
IN 3_3
3_1 BIN01 LLWORD TEMPB1
TIME #1 50 LLim
LLBYTE
0.6 HLim
TEMPB0
DEC 3_6 3_10
SW-B 3_8 LLWORD TEMPB3
KEY02 350
BIN05
& BIN06
3_5
ON-DELAY
IN
3_4 BIN04
TIME #2
LLBYTE
0.6
TEMPB0

MANUAL
980034 - 13
BIN07

Elektor Electronics 5/98 57


LISTING 1 Time-Task 1.
Application Timer Handler to service
; Define start of task code here. For unused tasks function module timers, executed
; leave as is at 0. every 100 ms. Timing periods available
#DEFINE TimeTask1 APP_TIMERS ; service task for timer modules are in the range 0.1 to 6.4 seconds.
#DEFINE TimeTask2 0 ; TimeTask2 code label
....................... Event-Task 3.
....................... Setpoint Station implemented using
#DEFINE TimeTask6 0 ; TimeTask6 code label function module programming. See
#DEFINE TimeTask7 0 ; TimeTask7 code label Figure 3. This method of programming
#DEFINE TimeTask8 0 ; TimeTask8 code label
is quick to implement and easy to
debug. A 16 Bit counter, function mod-
#DEFINE EventTask1 0 ; EventTask1 code label
#DEFINE EventTask2 0 ; EventTask2 code label
ule 3_11, is incremented or decre-
#DEFINE EventTask3 SETP_STATION ; setpoint station mented by two input keys each with
....................... an auto-repeat function if the key is
....................... operated for longer than 0.65 seconds.
#DEFINE EventTask6 0 ; EventTask2 code label The MANUAL state interlocking
#DEFINE EventTask7 Debug ; Debug tool ensures that the setpoint can only be
#DEFINE EventTask8 PERF_PROC ; Performance Processor changed during manual mode. The
counter output is limited between 50
; registers in Bank0 used by operating system and 350. Notice the function code
; TIME_TASK_STATUS EQU 0 ; time-task active flags modules are numbered according to
; EVENT_TASK_STATUS EQU 0 ; event-task active flags task number and execution sequence.
; EVENT_TASK_ENTRY EQU 0 ; task loop entry point These same numbers are used as labels
; SCHED_COUNT EQU 0 ; Scheduler counter
in the source code to mark where the
particular function module starts.
; definitions for Scheduler look-up masks
#DEFINE Mask1 B’00000001’ ; Mask 1
#DEFINE Mask2 B’00000000’ ; Mask 2 Event-Task 7.
#DEFINE Mask3 B’00000000’ ; Mask3 Debug Tool. This task is a valuable aid
#DEFINE Mask4 B’00000000’ ; Mask4 when debugging function module
#DEFINE Mask5 B’00000000’ ; Mask5 applications. Together with
....................... ASYNCH03 (a serial port message han-
#DEFINE MASK10 B’00000001’ ; Mask10 dling utility) and PICSCOPE (PC based
....................... software) you can monitor and write
#DEFINE Mask17 B’00000000’ ; Mask 17 PIC’s registers in bit, byte, word, and
#DEFINE Mask18 B’00000000’ ; Mask 18 floating point format.
#DEFINE Mask19 B’00000000’ ; Mask 19
#DEFINE Mask20 B’00000000’ ; Mask 20 Event-Task 8.
Performance Processor. Also imple-
NR_OF_MASKS SET D’20’ ; no. of scheduler masks
mented with function modules, this task
will calculate how many times it is get-
ting executed per second. With PIC-
SCOPE it is now a simple exercise to
One last thing, there is a clear- some of the possibilities when using monitor this value and see how busy
watchdog-timer instruction (clrwdt) at PICXEX with the PIC16C73 micro- your system is. Below 60 you can expect
the bottom of the Event-Task section to controller. The source code for the the PIC’s internal watchdog to time-out.
guard against getting stuck in some tasks described, system support utili-
task’s code. If you follow the guidelines ties, function module macros, and
given above for task lengths etc. the PICSCOPE are supplied on the pro- FOOD FOR
nominal time-out period of 18 ms, ject disk to allow a working system to PROGRAMMERS
(with no prescaler) is fine. be assembled. When running this All programs, source codes files,
application on the MPSIM simulator macros and utilities mentioned in this
USING PICXEX; AN keep in mind that the output from article, except Microchip’s (free)
APPLICATION EXAMPLE the Performance Processor (see MPASM and MPSIM, are available on
The best way to get familiar with Event-Task 8 description below) is a floppy disk, available from the Pub-
PICXEX is to study a working appli- updated every 2 seconds and this lishers as order code 986017-1.
cation. The following describes sec- could mean a long wait. Task alloca- (980034-1)
tions of a working system, showing tion is as follows.

LISTING 2
.....................................
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
clrf TIME_TASK_STATUS ; ensure no Time-Tasks active
clrf EVENT_TASK_STATUS ; ensure no Event_Tasks active
clrf EVENT_TASK_ENTRY ; reset Event-Task loop entry-point
clrf SCHED_COUNT ; clear Scheduler mask selector
XEX_ON_EVENT 3 ; start with Event-Task 3 on
goto Main_00 ; make it fly!

Elektor Electronics 5/98 59


Home Automation
Modem
APPLICATION NOTE

The home automation


automation
modem Type
modem Type
TDA5051A is an inte- 11 DGND

5
AGND

112
VDDA

113
VDDD

1
VDDAP

grated circuit specifi- modulated


carrier
POWER
DR VE 10

cally designed for ROM D/A


WITH
PROTECTION
TXOUT

amplitude shift keying


keying DAC clock
APGND

(ASK) transmission
transmission CONTROL LOGIC
DATAIN

via the domestic


TDA5051A
mains supply (US: CLKOUT
filter clock PD

household AC sup- OSC1

ply), at a data rate of OSC2 4


OSCILLATOR +2

600 or 1200 sym-sym-


bols*.
bols*. ItIt operates
operates from
from DIGITAL -4-
DIGITAL 14
DATAOUT BANDPASS A/D R )(IN

a single 5 V supply.
supply. DEMODULATOR
FILTER

5,

PEAK U/D
DETECT COUNT

16 6

TEST1 SCANTEST 980048-11

Figure 1. Block
Figure Block dia-
gram of
of the
the Type
Type
TDA5051Aintegrated
TDA5051A integrated
Automation
Home Automation
Modem.
Modem.
characteristics
Main characteristics
ä
Full digital
Full carrier
digital carriergeneration
generationand andshaping
shaping
ä
Modulation/demodulation
Modulation/demodulation frequency
frequencyset setbybyadjustment
adjustmentofofthe
theinter-
inter-
manufacturers
not
from manufacturers
does not

of the digital filter, thereby making


filter, thereby making the
the
nal clock oscillator or an external
external clock
clock (driven byby microcontroller)
microcontroller) performance wholly
wholly independent of
and does

ä
Digital -to -analogue converter
Digital-to-analogue converter(DAC) (DAC)for
for rejection
rejectionof
of aliasing
aliasing com-
com-
application disturbances,
disturbances, such
such as
as com-
com-
high (6
ponents with high (6-bit)
-bit) clock rate
representatives and

ponent tolerances,
tolerances, temperature
temperature drift,
drift,
Elektor Electronics or its consultants.

ä Fully
Fully integratedoutput
integrated outputpower
powerstage stagewith
with overload
overload protection
or their representatives

supply
supply voltage
voltage drift, and
and so
so on.
on.
ä
Automatic
Automaticgaingaincontrol
controlatatreceiver
receiver input
received from

ä 8-bit
8 -bit analogue-to-digital
analogue converter (ADC)
-to -digital converter (ADC) with the mains supply
The interface with supply
(US: household AC
(US: household AC supply)
supply) is via aa
information received

äNarrow
Narrowdigital
digitalfilter
filter
ä
Digital demodulation
Digital demodulationproviding
providingbaseband
basebanddata data hybrid LC
hybrid LC network.
network. The
The output
output stage of
ä
Compliance
Compliance with
withEN50065-1
EN50065-1throughthroughsimple
simpleinterfacing
interfacingnetwork
network the modem is is capable
capable of applying aa

on information

ä
FewFew external
externalcomponents
componentsfor forlow-cost
low-costapplications
applications 120
120 dBµV
dBuV r.m.s. signal to aa (typical)
signal to (typical)30
3052
äS016
> SO16plastic
plasticpackage
package load.
load.
industries or

To
Toreduce
reduce current
current drain, the modem
the modem
electronics industries

is disabled
disabled by by aapower -down (PD)
power-down (PD)
imply practical experience by Elektor
based on

input
input pin
pin (15). When this
(15). When this happens,
happens, the
this note is based

FUNCTIONAL
FUNCTIONAL DESCRIPTION on -chip oscillator
on-chip oscillator remains
remains active and and
and electronics

Both transmission and reception stages


and reception stages the clock continues to be supplied via
are controlled by the
the master
masterclock
clock of a pin
pin 44 (CLI(0,T). low -power opera-
(CLKOUT). For low-power
* In modern data
data communications,
communications, the the symbol
symbol microcontroller
microcontroller oror by
by the
thethe
theon -chip
on-chip tion in the
the receive
receive mode,
mode, pin pin 44 may
may bebe
electrical and
of this

replaces
replacesthe
thebaud
baudasasthe
theunit
unit ofoftransmitted
transmitted data.
data reference driven by
reference oscillator driven by aa crystal.
crystal. controlled
controlled dynamically
dynamically by by thethemicro
micro--
in the electrical

Like the baud, a symbol may (and


(and frequently
frequently does)
does) This ensures requisite
requisite accuracy
accuracy of of the
the controller (see Power-down
Power -down mode mode later
content of
The content

represent more than one data


than one data bit.
bit. transmitter
transmitter carrier and
and exact trimming on).
on).
imply

** For
For full
full details, see Data Sheet
details, see Sheet TDA5051A
TDA5051A available from Philips
available from Philips Semiconductors or at
Semiconductors or
The

A Philips Semiconductors Application


Application
in

http://207.87.1.43/acrobat/datasheets/TDA5051A.pdf

A60
60 Elektor Electronics
Electronics 5/98
Visitour
Visit our Web
Website
siteatathttp://ourworld.compuserve.com/homepages/elektor_uk
http://ourworld.compuserve.com/homepages/elektor uk

Table 1. Pinning
Table 1. Pinning
Pin
Pin Symbol Description
Description
11 DATA
DATAIN
IN digital data input (active logic low)
low)
2 DATA
DATAouT
OUT digital data output (active logic low)
low) DATAIN I 16 TEST1
3
3 VVDDD
DDD supply voltage for digital circuits
circuits
DATAouT I 2 15 PD
4
4 CLK
CLKow-
OUT clock output (fosc/2)
(fOSC/2)
5 DGND
DGND ground (earth) for digital circuits
circuits VDDDI 3 711 RXIN

6
6 SCANTEST test input (logic low
low in
in application)
application) CLKOUT I 4 13 VDDA
77 OSC1
OSC1 oscillator input TDA5051 AT
DGND I 5 12 AGND
8
8 OSC2 oscillator output
9
9 APGND
APGND ground for (analogue) power amplifier SCANTEST I 6 rl I VDDAP
10
10 TX
TXPUT
OUT analogue signal output OSC1 17 711 TXOUT
11
11 VVDDAP
DDAP supply voltage for (analogue) power amplifier
OSC2I 8 APGND
12
12 AGND ground for analogue circuits
circuits
13
13 VVDDA
DDA supply voltage for analogue circuits 980048 - 12

14
14 RX
RXIN
IN analogue signal input
15
15 PD
PD power-down
power -down input
input (active
(active logic
logic high)
16
16 TEST1
TESTI test input (logic high
high in
in application)
application)

When
When thethe modem
modemisis controlled
controlledbyby so providing an easy connection
connection to to aa down resistors).
down resistors).
the on -chip oscillator,
on-chip the requisite
oscillator, the requisite standard microcontroller
standard microcontroller 1/0I/O port.
crystal is
crystal is connected
connected between pins 77 The digital
The digital part
part of
of the modem is TRANSMIT
T R A N S M I T MODEMODE
and 8.8. An
An external
external clock
clock (microcon-
(microcon- fully scan
fully -testable.Pins
scan-testable. Pins 66 and
and 16, The carrier frequency is generated by
troller driven by a crys- SCANTEST and
SCANTEST TEST
and TEST the scanning of a read-only memory
tal) is connected
connected Figure 2.. Typical
Ty appli- respectively,
respectively, are used
used (ROM) under
(ROM) under the
the control
controlof
ofaamicro
micro--
between pins 5 and 7;
between 7; tion diag
cation ram of the
diagram for production
production tests;
tests; controller clock
controller clock or
or the reference fre-
fre-
pin 88 must then
then bebe left
left A5051A Home
TDA5051A these pins
pins must
must be
be left
left quency provided
providedbybythe
theon -chip oscil-
on-chip oscil-
open. Modem 411 open in the
tornation Modem
Automation the functional
functional both methods provide
lator: both provide the
the accu-
accu-
All logic
All logic inputs
inputs and
and 'th power line isola-
with mode (correct
(correct levels
levels required by
racy required
racy by environmental
environmental
outputs are
outputs are compatible
compatible tionn and im proved
improved are defined internally
internally conditions.
with TTL/CMOS levels,
with TTL/CMOS nsitivity.
sensitivity. by pull-up and and pull-
pull- High-frequency
High -frequency clocking rejects the
the

2 250 V (AC) T 630 mA


max I
MOV 100 470 nF
250 V (AC) (0.5 W) 250 V (AC)

TOKO
I T1002
230 V n=1
4 6
1 VA -
6V
+5 V
6.8
nF
78L05 FDB08

2 33
470 uF nF
(16 V)
7,7

47 nF +100µF
T (16 V) nF
72
VDDD VDDAP VDDA
+5 V 10
DATA! 11 13
150
RXIN 10 nF kS2
DATA0uT 14
MICRO - 10 nF
CONTROLLER TDA5051 A TXOUT BC547B
CLKOUT 10
4
PD 33
1 kS2
15 kS2
12
OSC1 OSC2 DGND APGND AGND
2.2 MO P6KE6V8:
1-
XTAL

-0-
8.48 MHz

T- 27 pF T-27 pF
P6KE6V8

47. 980048 - 13

Elektor Electronics
Electronics 5/98 61
61
Visitour
Visit our Web
Website
siteatathttp://ourworld.compuserve.com/homepages/elektor_uk
http://ourworld.compuserve.com/homepages/elektor uk

Table2.2.Electrical
Table Electrical characteristics
characteristics
Symbol Parameter
Parameter Conditions
Conditions Min Typ
Typ Max Unit
TRANSMIT
TRANSMIT MODE MODE
ffcr
cr carrier frequency ffosc
osc =
= 8.48 MHz -- 132.5
132.5 -- kHz
ttssu set-up time of the shaped burst ffosc
osc =
= 8.48 MHz -- 170
170 -- µs
ps
tthh hold time of the shaped burst ffosc
osc =
= 8.48 MHz -- 170
170 -- µs
ps
ttW(DI)(m
W(DI)(min)
in) minimum pulse
pulse width
width of
of DATA
DATA IN signal ffosc
osc =
= 8.48 MHz -- 190
190 -- µs
ps
tfkb urst)(m in)
W(burst)(min) Minimale Burst-Zeit ffosc
osc =
= 8.48 MHz -- 360
360 -- µs
ps
VVO(eff)
O(eff) output carrier
carrier signal
signalZ,=
ZL =CISPR16
CISPR16 DATAIN == Low
DATAIN Low 120
120 -- 122
122 dBµV
dBpV
Ilo(max)
O(max) power amplifier output current
current (peak DATAIN == Low
(peak value) DATAIN Low -- 160
160 -- mA
ZZoO output impedance of the power amplifier -- 55 -- Ω
Q
VVoO direct voltage output
output at
at TX
TX,-
OUT -- 2.5 -- VV
RECEIVE
RECEIVE MODE
MODE
VVi(eff)
i(eff) input (r.m.s.)
analogue input (r.m.s.) 66 (82)
(82) -- 122
122 dBµV
dBpV
VVil directvoltage
direct voltageatatRX,N
RXIN - 2.5 -- VV
R AGC
RAGC automatic gain control range -- 50
50 -- kΩ
k52
ttc(AGC)
c(AGC) automatic gain control time constant ffosc
osc =
= 8.48 MHz -- 36 -- dB
dB
BBddet
et bandwidth
detection bandwidth ffosc
osc =
= 8.48 MHz -- 33 -- kHz
BER error rate
bit error rate ffosc
osc =
= 8.48 MHz -- 10 -4
10-a -- --

aliasing components
aliasing components toto an extent extent RECEIVE
R E C E I V E MODE MODE minimum when the pin is
drain is a minimum is
which ensures that when when theythey are are fil-
fil- The input
The input signal
signal received
received by by thethe high. When
When this
this is
is so,
so, all
all functions,
functions,
tered by thethe interfacing
interfacing LC LC network, modem is applied
modem applied to to aawide -band
wide-band apart from the
apart from theclock
clock oscillator, are
are then
then
they do notnot cause
cause any any significant
significant dis- input amplifier
amplifier with automatic
automatic gain gain disabled.
disabled .
turbance. control, AGC, from -6 –6 dBdB to
to ++30
30 dB.
dB.
The data modulation
The modulation is is applied
applied This arrangement
This arrangement improves the the noise DATA
D A T A FORMAT
FORMAT
through pin
through pin11(DATAIN)
(DATAIN) and and applied
applied performance
performance and andprovides
providesaa means
means for for Transmit mode
smoothly
smoothly by by specific digital circuitry to signal level
level adjustment
adjustment to ensureensure max-
max- The data
datainput, DATAIN, is active
input,DATAIN, low,
active low,
the carrier (shaping). Harmonic com- imum sensitivityof
imum sensitivity ofthe
the88-bit
-bit ADC. which means that a burst is generated
ponents are are limited
limited in in this
this process,
process, Subsequently, the signal is passed on the
theline (TXOUT) when
line(TX0UT) pin DATA
when pin DATA, is
IN is
thus avoiding
avoiding unacceptable
unacceptable distur- distur- through the
through the ADC
ADC and and a digital band- low.
bance of the transmission channel channel (as (as pass filter so as to meet the
pass the CISPR
CISPR nor- Pin TX,
TXOUT uT is in the high-impedance
the high -impedance
laid down
laid down in in Recommendations malization and to comply with some
malization long as
state as long as the
the modem
modem is notnot trans-
CISPR16 and
CISPR16 and EN50065-1).
EN50065-1). Total Total har- additional limitations in current current appli- mitting. Successive logiclogic 1s
is are treated
treated
monic distortion is attenuated
monic distortion attenuated by by cations. After
After digital
digitaldemodulation
demodulation and and non -return to zero (NRZ) mode.
in a non-return
55 dB
55 dB when
when a typical
typical LC LC interfacing pulse shaping,
shaping, the the baseband
baseband datadatasig-
sig-
network
network isis uused*.
sed*. nal is available
availableatatpin (DATAOUT).
pin2 2(DATAD,T). Receive mode
Receive
digital -to -analogue converter
The digital-to-analogue converter Pin 14 (RX,N)
(RXIN) isisaahigh-impedance
high -impedance The data
dataoutput,
output,pin
pin DATAOUT, is
DATAOUT, is active
active
(DAC)and
(DAC) and the
the power
power stage are set to pin that
that has
has toto be
be protected
protected and and d.c.
d.c. low,which
low, whichmeans
meansthatthat the
the data
data output
output
provide a maximum
maximum signal signal level
level of of decoupled for
decoupled for the samesame reasons
reasons as is low
is low when a burst
burst isis received.
received. The The
122 dBµV
122 dBuV r.m.s.
r.m.s.atatthe
the output
output (pin
(pin 10).
10). pin
pin 10 (TX,T).
10 (TX OUT). The highhigh sensitivity
sensitivity at at pin
pin remains
remains low
low asas long
long as
as aa burst
burstisis
The output of the power power stage, pin the input
input(82-122
(82–122 dBuV)
dBµV) makes the use received.
received.
10 (TX
10 (TXT)
OUT) must
must be be connected
connected at at all
all of a 50
50 HzHz (US:
(US: 6060Hz)
Hz)rejection
rejection filter
filter –-
times to a decoupling capacitor, since
decoupling capacitor, since aa formed
formed by by the
the LC
LC interfacing network
direct voltageofof500
direct voltage mVDD exists
500mVDD exists atat this -a
–a must.
must. This
This filter
filter also
also serves
serves as as an
an
pin, even when the the modem
modem is is not
not anti-aliasing filter for for the
the internal
internal digi-
transmitting. The pin
transmitting. pin must
must also
also be pro-pro- tal processing.
tected against overvoltage and nega- Figure 3. Representa-
Figure
transient signals.
tive transient signals. TheThe direct
direct volt-
volt- POWER
P O W E R --DOWN
D O W N MODEMODE tive relationship
tive relationship
age referred to may be used used to to bias
bias a power -down input,
The power-down input,pin
pin15
15(PD)
(PD) is
is between DATA IN and
DATAIN
unipolar
unipolar transient
transient suppressor.
suppressor. high; this
active high; this means
means that
that the
the current TX
TXoup
OUT .
Direct connection
connection to the the mains sup- M.
ply (US: household
household AC AC supply)
supply) is is via
an LC
LC network for for low-cost
low-cost applica-
However, when
tions. However, when power line insu- 3
lation has to be ensured,
ensured, aa suitable
suitabler.f. r.f.
transformer should
should be used.used.
Note
Note that
that in
in the
the transmission
transmission mode, mode,
the receiving part of the modem modem is is not
not
disabled and the the transmitted
transmittedsignal signal is is
detected normally.
normally. In this mode, the
gain chosen
gain chosen before
before the onset of the
transmission is stored and and the
thea.g.c.
a.g.c. isis
set internally
set internally to to -6
–6 dBdB asas long
long as as
DATA
DATA, IN is low.
low. When
When this is not so, the the
previous
previous gain
gain setting
setting is is restored
restored auto-auto- (21 tiViDixrnro =

matically.
wrong operallori gatia46 - 10

Elektor Electronics
Electronics 5/98 63
Elektor Electronics

ICM7218A T-series Iron Powder Cores

Integrated Circuits Passive Components


Microprocessor, Interfacing DATASHEET 5/98 Inductors DATASHEET 5/98
ICM7218A T-series Iron Powder Cores Application example
8-Digit LED Display Driver Amidon Associates Broadband RF preamplifier for VLF, LF and AM BCB,
Elektor Electronics May 1998.
Manufacturer SEG C 1 28 GROUND
SEG E 2 27 SEG A Manufacturer
Maxim Integrated Products Inc., 120 San Gabriel SEG B 3 26 SEG G
Amidon Associates, 2216 East Gladwick,
Drive, Sunnyvale, CA 94086, USA. Internet: D.P. 4 25 SEG D
ID6 (HEXA/CODE B) 5 24 SEG F Dominguez Hills, CA 90220, USA. Internet:
www.maxim-ic.com. ID5 (DECODE) 6 23 DIGIT 3
www.amidoncorp.com.
5/98

ID7 (DATA COMING) 7 22 DIGIT 6

General Description WRITE 8 ICM7218A 21 DIGIT 7


MODE 9 20 DIGIT 4
The Maxim ICM7218 display driver interfaces micro- ID4 (SHUTDOWN) 10 19 V +
ID1 11 18 DIGIT 8 Material
processors to an 8-digit, 7-segment, numeric LED ID0 12 17 DIGIT 5
display. Included on chip are two types of 7-segment ID2 13 16 DIGIT 2 #3 (Gray)
ID3 14 15 DIGIT 1
decoders, multiplex scan circuitry, segment and digit #15 (Rd & Wh)
drivers, and an 8x8 static memory. 983005 - 13

The ICM7218A accepts data in a serial format and dri- Pin configuration #1 (Blue)
ves common-anode displays. Data can be displayed #2 (Red)
in either hexadecimal or code-B format. The
#6 (Yellow)
ICM7218A also features a NO Decode mode where
each individual segment can be independently con- ICM7218A/B #10 (Black)
MODE WRITE
trolled. This is particularly useful in driving bar graphs. (ID0 - ID7) 8 (ID3 - ID7)
INPUT
DATA
CONTROL
INPUTS 1 1
#12 (Gn & Wh)
The Maxim ICM7218 is an alternative for both the 8 4

Intersil ICM7218 and ICM7228. DECODE


#0 (Tan)
CONTROL SHUTDOWN
HEXA/CODE B
LOGIC

Applications 1
Freq. (MHz) .05 .1 .5 1. 3. 5. 10 30 50 100 200 300
1
ç Instrumentation 983005 - 11
Iron-powder material vs. frequency range
ç Test Equipment 8
Higher Q will be obtained in the upper portion of a material’s frequency range when smaller cores are used. Likewise, in the
8x8 WRITE ADDRESS
ç Hand Held Instruments 1 STATIC
RAM
8 COUNTER
lower portion of a material’s frequency range, higher Q can be achieved when using the larger cores.
ç Bargraph Displays 1
1 7
ç Panel Meters 220
4
34-t
67

8 READ Test Core:


Application Example HEXADECIMAL/
ADDRESS. DIGIT
MULTIPLEXER
25-t T50 - 6
CODE 8
7
210 42-t
DCF-controlled LED Clock, DECODER
3 Q
Elektor Electronics May 1998. 7
200
Features MULTIPLEX 19-t
OSCILLATOR
DECODE/ 62-t
ç Fast access time: 200ns write pulse width NO-DECODE 1 190 Wire Turns
ç Microprocessor compatible 20 19 1.63
7
180 22 25 2.64
ç Hexadecimal and code B decoders DECIMAL
POINT
8 1 INTERDIGIT
BLANKING
24 34 4.72
1
ç Individual segment control 82-t 26 42 7.20
8 SEGMENT 8 DIGIT
with ‘No Decode’ feature DRIVERS DRIVERS 170 28 62 14.40 Typical Q curves resulting from
92-t 30 82 25.20
ç Digit and segment drivers on chip 983005 - 14 31 92 31.40
various winding on the same
ç Common-anode (ICM7128A) or 160 core (here; T50-6).
ICM7218A/B Block Diagram
common-cathode (ICM7218B) versions
1 3 5 7 9 11 13 15 17 19
ç Low-power CMOS Frequency (MHz) 983005 - 12
#
T-series Iron Powder Cores ICM7218A

5/98
Passive Components Integrated Circuits
Inductors DATASHEET 5/98 Microprocessor, Interfacing DATASHEET 5/98
AL values (µH / 100 turns) For complete part number, add Mix number to Core Size number.
Electrical characteristics (V+ = 5 V ±10%, TA = 25 °C
Range (MHz) Þ to 0.1 .05 - .5 .1 - 2 .5 - 5 1 - 30 3 - 50 5 - 100 20 - 200 50 - 300
PARAMETER SYMBOL CONDITIONS MIN TYP MAX UNITS
Outer 26 Mix 3 Mix 15 Mix 1 Mix 2 Mix 6 Mix 10 Mix 17 Mix 0 Mix
Core size diam. Yel-Wh Grey Rd-Wh Blue Red Yellow Black Grn-Wh Tan Supply Voltage V+ -20ºC ≤ TA ≤ Operating 4 6 V
µ = 75 µ = 35 µ = 25 µ = 20 µ = 10 µ=8 µ=6 µ = 3.5 µ=1

Elektor Electronics
(in.)
T-12- .125 na 60 50 8 20 17 12 7.0 3.0 +85ºC Data Retention 2 6
T-16- .160 na 61 5 44 22 19 13 8.0 3.0 Shutdown Supply Current IQ ICM7218A, B 5 300 mA
T-20- .200 na 90 6 52 27 22 16 10.0 3. Operating Supply Current IOP Decoding all 8’s, display open 200 450 µA
T-25- .250 na 100 100 70 34 27 19 12.0 4.5 No Decode, display outputs open 200 450 µA
T-30- .307 325 140 93 85 43 36 25 16.0 6.0
Display blank, driving display 200 450 µA
T-37- .375 275 120 90 80 40 30 25 15.0 4.9
Decoding all 8’s and D.P.s,
T-44- .440 360 180 160 105 52 42 33 19.0 6.5
T-50- .500 320 175 135 100 49 40 31 18.0 6.4 driving display 240 mA

T-68- .690 420 195 180 115 57 47 32 21.0 7.5 Digit Drive Current IDIG Common Anode VOUT = V+ – 2.0V –200 –300 mA
T-80- .795 450 180 170 115 55 45 32 22.0 8.5 Common Cathode VOUT = 1.0 V 50 70 mA
T-94- .942 590 248 200 160 84 70 58 32.0 10.6 IDLK
Digit leakage Current Shutdown, V+ - 2.0V
T-106- 1.060 900 450 345 325 135 116 na na 19.0
Common Anode, VOUT = 0V –10 µA
T-130- 1.30 785 350 250 200 110 96 na na 15.0
T-157- 1.57 970 420 30 320 140 115 na na na
Common Cathode, VOUT = 5V 10 µA
T-184- 1.84 1640 720 na 500 240 na na na na Peak Segment Drive Current ISEG Common Anode, VOUT = 1.5V 20 30 mA
T-200- 2.00 895 425 na 250 120 100 na na na Common Cathode, VOUT = V+ – 2.0V -10 -20
T-200A- 2.00 1550 na na na 218 180 na na na
Segment Leakage Current ISLK Shutdown, V+ = 5V
T-225A- 2.25 950 424 na na 120 100 na na na
T-225A- 2.25 1600 na na na 215 na na na na
Common Anode, VOUT = 5V –1 –50 µA

T-300- 3.00 825 na na na 115 na na na na Common Cathode, VOUT = 0V 1 50 µA


T-300A- 3.00 1600 na na na 228 na na na na Input Leakage Current IIL All inputs
T-400- 4.00 1320 na na na 185 na na na na V+ = 5V, -20 ≤ TA ≤ +85ºC
T-400A- 4.00 2600 na na na 360 na na na na
VIN = 0V –0.01 –1 µA
T-500- 5.00 1460 na na na 207 na na na na
VIN = 5V 0.01 1 µA
na = not available

68
µ = permeability Display Scan Rate fMUX V+ = 5V 75 250 Hz
Interdigit Blanking Time tidb V+ = 5V 2 10 µs
The following equations are useful for calculating the number of turns, inductance, or the AL value of any iron powder toroidal
core. Each core has been assigned an AL value that may be found in the preceding chart. Input High Voltage VIH 2.0 V
All inputs, -20ºC ≤ TA ≤ +85ºC
Input Low Voltage VIL 0.8 V
Write Pulse Width (Low) twl 200 100 ns
desired ' L'( µH ) AL ×N 2 10 000 × ' L'( µH )
N = 100 L( µH )= AL ( µH / 100 turns ) = Write Pulse Width (High) twh 1.0 µs
AL ( µH / 100 turns ) 10 000 N2
Input Setup Time tids All inputs 250 150 ns
Input Hold Time tidh All inputs 0 -20 ns
N = number of turns L = inductance (µH) AL = inductance index (µH/100 turns)
#
READERS’
Letters
We can only
only answer
answer questions
questions or
or remarks
remarks ofof general
general interest
interest to
to our
our readers, concerning projects notnot
Box
older than
than two
two years
years and
and published
publishedin inElektor
Elektor Electronics. view of
Electronics. In view of the
the amount
amount of post received,
O . possible to
it is not possible to answer
answer all
all letters,
letters, and we
we are
are unable
unable to respond to individual wishes
wishes and
and
P. 14 requests for modifications to, or additional
additional information
informationabout,
about,Elektor
Elektor Electronics
Electronics projects.
14
exposed metal
exposed metal box
box of of the
the We
We totally
totally agree
agree with
with your find-
your find- is suitable
is suitable for
for aa programming
programming
power supply.
supply. This
This could
could leadlead ings in regard
ings regard of of this
this rather
rather voltage
voltage of
of 12.5 V (the pro-
12.5 V pro-
sparks and
to a few sparks and mysteri-
mysteri- unfortunate arrangement
unfortunate arrangement of of the
the work with
grammer does not work with
mains fuse
ous mains fuse failures
failures or or the
the earth wiring as
earth as shown
shown in in the
the 21-V types).
21-V types).
transformer overheating
transformer overheatingand and photograph you mention.
photograph mention. We We -- Are
Are you sure the
you sure the EPROM
EPROM usedused
(potentially more dangerous-
dangerous- advise all
advise all readers
readers building this
building this with the
is compatible with the 1-ms
1 -ms
the earthing
ly) the ear thing wire
wire insulation
insulation project, or
project, or planning
planning toto do
do so,
so, to
to programming algorithm
algorithm
burning.
melting and possibly burning. the safety
follow the safety guidelines as as employed by the programmer
employed
On the subject of (essential)
On (essential) earth-
earth- set out in Mr. Mr. Joy's
Joy’s letter.
letter. We
We (50-ms
(50 -ms types
types are
are not
not suit-
Earthing in Variable ing there is no indication
indication inin the
the cir-
cir- also recommend
also recommend consulting
consulting the the able)?
able)?
Power Supply diagram that
cuit diagram that the
the metal
metal box box && Safety Guidelines
Safety page which
Guidelines page which is is -- Is the correct programming
programming
Dear
DearEditor
Editor— - I Iread
read with
with interest
interest chassis should be be earthed nor is is included in
included in the
the magazine
magazine aa fewfew voltage
voltage being
being applied to the the
Variable Power Supply article
the Variable article construction.
it mentioned in the construction. times
times in every year
in every year volume.
volume. EPROM?
EPROM?Check Check the
the value
value dur-
dur-
in the March 1998 1998 issueissue of Elek-
of Elek- Also II suggest that the
Also the (usual)
(usual) ing programming with the the aid
aid
tor
tor Electronics,
Electronics, and particularly the warnings should
warnings should have
have been
been includ-
includ- of aa voltmeter.
of voltmeter.
photograph of of the
the prototype
prototypeand and ed in the construction about mak-
construction about mak- EPROM
EPROM Programmer
Programmer
the circuit diagram. sure that:
ing sure that: Dear
DearEditor
Editor— Your March
- Your March 1997
II would
would refer you to the the earth con-
con- råThe
Thebolt
bolthead
headofofthethetoroidal
toroidal issue contained a fine design for for Motorola software
software utilities
utilities
visible on
nection visible on the
the photograph
photograph transformer fixing does not
transformer an EPROM programmer,
programmer, which I'm I’m ftp
pack now by ftp
from the mains input socket socket to
to the
the touch the
touch the top
top cover.
cover. sure many of your your readers
readers hadhad Dear
Dear Editor
Editor — Viayour
- Via yourP.O.P.O. Box
Box
the fixing
top of the fixing of of the
the toroidal
toroidal å That primary side wiring
wiring should
should eagerly looked forward to. Having
forward to. Having 1414 column II would
1414 column would like
like to
to advise
advise
transformer.
transformer. have been
have segregated or
been segregated circuit I was delighted
built the circuit delighted to to readers of your
your magazine
magazine that that the
the
II would
would suggest that this connec- connec- sleeved near the secondary
sleeved secondary note that it worked spot-on,spot-on, albeit
albeit self-extracting
self -extracting archive file file
tion should be be routed
routed to to metal
metal circuits to
winding / circuits to maintain
maintain 27C512EPROMs
for 27C512 EPROMs only. only. I did
I did ‘ELEKT494’.EXE’ mentioned
`ELEKT494'.EXE' mentioned in in the
the
box/chassis by by another
another pathpath to
to safety insulation sincesince thesethese not discover this until until after
after aa few
few article ‘RS232
article interface for
`RS232 interface for
avoid becoming
avoid becoming an an effective
effective short-
short- accessible connections
accessible connections are are not
not months when when I had
I had to burn aa 68HC11’ (Elektor Electronics
68HC11' Electronics
ed turn ifif another
another piece
piece of
of earthed
earthed earthed.
earthed. 27C256 EPROM.
27C256 EPROM. That proved proved to to 1998, PC
March 1998, PC Topics
Topics supple-
supple-
touches the
equipment touches the external
external John H.H. Joy,
Joy, CC Eng
Eng MIEEMIEE impossible!
be impossible! also available
ment) is also available from
from thethe
Other EPROMs like the 27C64 and
Other and following Internet
following Internet site:
site:
the 27C128 can
the 27C128 not be
can not be pro-
pro-
grammed either.
grammed either. The control soft-soft- http://skynet.stack.nl/ftp/68hc11w
http://skynet.stack.nl/ftp/68hc11w
warethen
ware thentells
tellsmeme COULD
COULD WRITE.
NOTWRITE.
NOT g/m68hc11
g/m68hc11
IfIf I read out the EPROM,
EPROM, itit appears
appears
that one or two two bytes
bytes have
have been
been Thought I’d know!
I'd better let you know!
written in spite of this this error
error report.
report. Martin Lemke
Martin Lemke
Are you aware of this problem?
R. Becker Thank
Thankyou youfor
for this useful tip.
this useful
Actually,
Actually, somesome time
time ago ago wewe
Assuming that the
Assuming the programmer
programmer already received
already received information that
information that
handles ‘512
handles EPROMs correctly
'512 EPROMs this
this file had
had made
made it allall the
the way
way
we’d
we'd say
say that the hardware
that the hardware and
and from Munich
from Munich down
down toto aa Motoro-
Motoro-
software are
software are probably
probably okay.
okay. la BBS in
la BBS in Australia.
Australia. We We are
are
Check
Check the the following
following points:
points: pleased to see that it has has now
now
-- In the program, did you you select
select landed at a site that shouldshould bebe
the
the right EPROM type?
right EPROM type? accessible to
accessible to anyone
anyone at at the
the cost
cost
-- Are
Are you sure the
you sure the EPROM
EPROM used
used of aa local
of local phone
phone call.
call.

S
SWITCHBOARD
WITCHBOARD
WANTED AA VHF
VHF to
to UHF
UHF convertor,
convertor, or
or FOR SALE
FOR Intel Prompt
SALE Intel Prompt 48
48Develop-
Develop-
Switchboard allows PRIVATE READERS of
PRIVATE READERS of Elektor
Elektor Electronics
Electronics one
circuits, as
circuits, as I have a display unit with
with aa for 8048/8748
ment System for 8048/8748Micro
Micro-
-
FREE advertisement of up to 106 characters, including spaces, com-
VHF output,
VHF and II wish
output, and wish to connect a with manuals
controllers, with manuals £150.
£150. D.
D.
mas, numerals, etc., per month. The The advertisement
advertisement MUST
MUST relate to
electronics, and it MUST INCLUDE
INCLUDE aa private
private telephone number or TV. Mr. T.
TV. T. Collins,
Collins, 215 Arlott
Arlott Crescent,
Crescent, Fittes, 8 Elisabeth
Fittes, Elisabeth Court, Warwick
Warwick
name and
and address;
address; post
postoffice
office boxes
boxes are
are NOT
NOT acceptable.
acceptable. Oldbrook, Milton
Oldbrook, MiltonKeynes
KeynesMK6
MK62QT.
2QT. CV34 6QB. Tel.
Tel. (01926) 493092.
(01926) 493092.
Elektor
Elektor Electronics
Electronics (Publishing)
(Publishing) can
can not
not accept
accept responsibility for any
correspondence or transaction as a result of a free advertisement or FOR
FOR SALE
SALE EPROM programmer
programmer GP GP FOR SALE
FOR SALE Due to workshop
workshop clear-
clear-
of any inaccuracy in the text of such
such an
an advertisement.
advertisement. EP8000
EP8000 £75,
£75, Spectron D-586 datas-
datas- multimeters, transistor
ance: 3 multimeters, transistortester,
tester,
Advertisements
Advertisements will willbebeplaced
placedininthethe order
order inin which
which they
they are
are Intel MDS
cope £185, Intel MDS ++ ICEICE with
with counter, valve
frequency counter, valve voltmeter.
voltmeter.
received. Elektor Electronics (Publishing) reserve the right to refuse
refuse manuals
manuals etc.
etc. £100.
£100. P. Clark
Clark (01344) Phone for detailed list.
list. Ken
Ken Phillips,
Phillips,
advertisements without giving reasons or without returning
returning them.
them. 868985.
868985. phone (01376) 323164(Essex).
(01376) 323164 (Essex).

A70
70 Elektor Electronics
Elektor 5/98
5/98

S-ar putea să vă placă și