Você está na página 1de 55

Using this simple circuit, it is possible to measure ana-

logue signals via the serial port of a PC. The chosen


approach allows even a cast-off PC to be used for
measuring analogue quantities.

Design by J. F. Verrij

a simple A-D converter


works with the serial port of any PC

can be powered directly from the ser-


ial interface. A separate power supply
is thus not necessary. The accuracy is
also satisfactory; the measurement
error is limited to 1 bit, which repre-
sents 20 mV.

To the point
The A-D converter presented in this arti-
cle shows that it is possible to build
something nice using only a small num-
ber of components. An integrated A-D
converter (National Semiconductor
type ADC0804, a low-cost thorough-
bred which has been available for
many years) and a few 4000-series
buffers are basically all that is needed
to allow analogue voltages to be mea-
sured via the serial port. The parallel-to-
serial conversion of the output data is
implemented in the hardware in a sim-
ple manner by making clever use of
the serial ports handshaking signals.
Technical data The digital values are read in two steps
via the ports control lines. This means
measurement range: 0 to 5 V
that only a pair of inexpensive logic ICs
resolution: 8 bits
are needed in addition to the A-D con-
step size: 20 mV
verter chip.
measurement error: 1 bit
conversion time: 150 s
supply voltage: 5V The schematic
current consumption: 5 mA
interface: RS232 Figure 1 depicts the schematic dia-
software: QBASIC (for example) gram of the circuit. The serial port sig-
nals are shown at the right-hand side of
the figure, and the analogue input is at
the left-hand side. A 5-V supply voltage
It is by no means always necessary to cuit presented here is a typical exam- is produced from the RS232 signals by
use a super-accurate, fast A-D con- ple of a simple, inexpensive design means of three diodes, a capacitor
verter to measure analogue signals. If which is nonetheless quite useful. It has and an integrated voltage regulator.
reasonable resolution (such as 256 a resolution of 20 mV, is easily con- The reference voltage for IC1 is derived
steps covering a range of 5 volts) and trolled by a BASIC program (for exam- from the supply voltage using a simple
conversion speed are adequate for a ple), and does not make any extraor- voltage divider (P1). The RC network
given application, then there is no dinary demands on the computer. In consisting of R2 and C3 is added to fil-
need to make things more difficult for addition, it does not consume very ter out HF noise. The required supply-
ourselves than they need to be. The cir- much power (5 mA at 5 V), so that it decoupling capacitors are also pro-

2 - 6/98 Elektor Electronics EXTRA PC TOPICS


5V 5V 5V

R2
4k7
C5 R9 R3
C3

47K

47K
P1
100n IC3a
20k 100n D4
20 3 2
1
9
VREF INTR
5 2x
1N4148
18 D5
K1
6
6 DB0 A1 10
VI+ IC1 17 7 D1
D6 C2 DB1 B1 DCD 1
16 4 IC2
DB2 A2 11 DSR 6
100n 15 5 D2
7 DB3 B2 2
VI 14 2
DB4 A3 12 RTS 7
1N4148 R1 ADC0804 D3
13 3
19 DB5 B3 4019 TxD 3
10k CLKR 12 15
JP1 DB6 A4 13 CTS 8
11 1 D4
4 DB7 B4 DTR 4
CLK
1 2 SB SA RI 9
CS RD 5V
8 3 14 9 5
C1 AGND WR R8

47K
150p 10

DTR
3x
T1
1N4148
R7 R4 D3
IC3b IC4
IC3 = 4050 47k 47k
LP2950-CZ5.0
5 4
5V 1 BC547B D2 5V

IC3c IC3d
R5 D1
16 C6 1 C7 7 6 10 9 RTS
1 1 47k
IC2 IC3
100n 100n C8 C4
8 8
IC3f IC3e
R6 100n
14 15 12 11 TxD 100 25V
1 1 47k
980055 - 11

Figure 1. Schematic diagram of the simple A-D converter. The serial interface is used here as a sort of simple parallel port.

vided. For this approach to work, it is are four control lines of the RS232 port. controlled via the serial port. Transistor
necessary that the software ensures In this way, the serial port is adapted to T1 forms a discrete inverter, which
that a high-level voltage (+12 V) is act as a sort of parallel port. makes either SA or SB active depend-
always present on the TxD, RTS or DTR In addition, the /WR and /RD lines of the ing on the level present on the DTR line.
line. A-D converter, and the selection lines RTS and TxD are used to control /WR
The built-in clock generator of the A-D SA and SB of the multiplexer IC, are also and /RD respectively.
converter uses an external RC timing
network consisting of R1 and C1. With
the chosen component values, the
clock frequency is on the order of WR
400 kHz. The resulting conversion time
is approximately 150 s.
The analogue signal which is to be
A/D conversion busy
measured is applied to the terminals
marked PC1 (+) and PC2 (). The cir-
cuit works by default with an asymmet-
ric input, but this can be converted to INTR

a symmetric input by simply removing


jumper JP1. The input voltage may
range from 0.3 V to VCC+0.3 V. Diode RD
D6 prevents damage to the input of
IC1 if the input voltage is connected
with the wrong polarity, and C2 effec- read data 0 - 3 read data 4 - 7
tively suppresses HF noise.
The remainder of the circuit consists of
the interface logic. As already noted,
SA = DTR
the result of the conversion is read out
in two steps. The eight-bit conversion
code is made up of two nibbles. Data0-
Data3 are contained in the first nibble, SB = DTR

and Data4Data7 in the second nib-


980055 - 12
ble. The unusual feature of this design is
that the individual bits are read in via
Figure 2. The timing diagram shows the relationships of the various control and data signals.
the CTS, DSR, RI and DCD lines, which

PC TOPICS Elektor Electronics EXTRA 3 - 6/98


COMPONENTS LIST Semiconductors:
D1-D6 = 1N4148
Resistors: T1 = BC547B
IC1 = ADC0804LJN
H2

H3

R1 = 10k

ROTKELE )C(
1-550089
IC2 = 4019
K1

R2 = 4k7
IC3 = 4050
R3-R9 = 47k
D2 D3 IC4 = LP2950-CZ5.0
R4 P1 = 20k multiturn preset
R6

R3 D1
D5
Miscellaneous:

T1
IC4

R8
Capacitors: JP1 = jumper
C1 = 150pF K1 = 9-way sub-D socket (female), PCB
C4

IC2 C2,C3,C5-C8 = 100nF

R7
mount
C6
C8

R9
C5
C7

980055-1
IC1
plete. As soon as the DCD line goes command must then be issued (by
low, the computer knows that the con- making /RD low), which causes the A-D
IC3

R1 version has been completed. A read converter to place the result of the con-
C2
D4

D6
R2
JP1

COMadres = &H3F8
C1

C3

R5
LOOP1:
H4

H1

First switch on power supply by making DTR and TxD high


P1

- + T
read (TxD) not active, write (RTS) active
OUT COMadres + 4, INP(COMadres + 4) OR 1 DTR=SA=H, SB=L
OUT COMadres + 4, INP(COMadres + 4) AND &HFD RTS=WRnot=L
OUT COMadres + 3, INP(COMadres + 3) OR 64 TxD=RDnot=H
Wait 50 ms until circuit is stable before starting a conversion
Start = TIMER
DO
TIME = TIMER
LOOP UNTIL TIME >= Start + .05
Start conversion by making Write not active
OUT COMadres + 4, INP(COMadres + 4) OR 2 RTS=WRnot=H
Wait for interrupt (DCD), signalling end of conversion
DO
intr = INP(COMadres + 6) AND 128
LOOP UNTIL intr = 0 wait until DCD=L
Reset interrupt by making read active
OUT COMadres + 3, INP(COMadres + 3) AND 0 TxD=RDnot=L
980055-1
(C) ELEKTOR

Now the result can be read in 2 nibbles


READDATAL:
Datalow = (INP(COMadres + 6)) AND 240 read low nibble
Switch multiplexer input
OUT COMadres + 4, INP(COMadres + 4) AND &HFE DTR=SA=L, SB=H
Figure 3. The copper layout and compo-
READDATAH:
nent layout of the printed circuit board
Datahigh = (INP(COMadres + 6)) AND 240 read high nibble
for this project. Unfortunately, this board is
Optimize power supply and return circuit to standby
not available ready-made from the
Publishers. by making DTR and TxD high
OUT COMadres + 3, INP(COMadres + 3) OR 64 TxD=RDnot=H
OUT COMadres + 4, INP(COMadres + 4) OR 1 DTR=SA=H, SB=L
Diodes D4 and D5, together with R3,
Now the two nibbles are combined into the original byte
form an OR gate. The data outputs of
IC1 are undefined during the conver- DATAHL = Datahigh + Datalow / 16
sion process. Since the A1 input of IC2 Convert the result to the measured input voltage
is constantly held at a defined level by Range = 4.998
resistor R9, the D1 output of IC2 will be Voltage = Range * DATAHL / 255
logic high during the conversion Rounding the result to 3 digits
process, assuming that SA is active. The Voltage = INT(Voltage * 1000 + .5) / 1000
level on the DCD line is thus the same Display the result
as the level on the /INTR output of the PRINT counter; Voltage=; Voltage; Volt
ADC0804. The conversion process is Counter = Counter + 1
started by pulling the /WR input of the GOTO LOOP1:
A-D converter logic high. The rising
END
edge of the signal applied to the /WR
input initiates the conversion, which
Figure 4. This QBASIC program listing shows how easily the converter circuit can be controlled.
takes approximately 150 s to com-

4 - 6/98 Elektor Electronics EXTRA PC TOPICS


version on its outputs (DB0-DB7). In addi- sockets can be used for the ICs, expe- need some software as well with this
tion, the /INTR output is also automati- rienced constructors will prefer to solder project. Fortunately, the circuit can be
cally set logic high again. In case this them directly to the board. Naturally, controlled using a relatively small num-
all sounds a bit complicated, have a the remaining components are sol- ber of BASIC instructions, so that it can
look at Figure 2, which clarifies the dered directly to the board. Take care be easily integrated into your own par-
whole process in the form of a timing that the electrolytic capacitor (C4) and ticular applications.
diagram. the diodes are installed with the correct Figure 4 presents a listing of a sample
Before you ask: yes, its true that buffers polarization. QBASIC program for controlling the
IC3d and IC3e are driven directly by The analogue input uses three circuit- converter circuit. Between the com-
RS232 signal levels (12 V), even board pins. If only the asymmetric input ments and the descriptions of the reg-
though they are specified to handle is used (which is recommended), then ister functions of the serial port, you
signals which switch between 0 V and the pin marked can be omitted. Of should have no difficulty understanding
+12 V, and then only if the supply volt- course, jumper JP1 must then be how to use the program and the con-
age is also 12 V. This is possible (and the installed. verter. Specific descriptions of the reg-
circuit works under these conditions) The connection to the PC is made via a ister structure of the 8250 IC can be
because the internal input protection D9 connector. To avoid placing too found in the DataSheets section of this
diodes are utilized, in combination with much mechanical stress on the solder issue (an 8250 or compatible controller
the 47 k current-limiting resistors, to joints when attaching or removing the is the standard device used in a PC for
convert excessive input voltages into connector, it must be fastened to the the serial port).
small currents which are diverted via circuit board using two screws. Firmly Calibrating the circuit is easy: connect
the protection diodes. Under normal fasten the connector to the board with a known voltage source to its input
conditions the internal protection net- the screws before soldering its 9 pins to (such as a fresh button cell) and start
works can safely handle currents of up the board, since otherwise the solder the control software, so that the mea-
to 10 mA, which is much more than the joints will probably be subjected to sured value is calculated and dis-
currents encountered in this circuit. excessive strains. played. Now adjust P1 until the mea-
sured value agrees as closely as possi-
A small circuit board On the software side ble (20 mV) with the actual input
voltage.
Figure 3 shows the layout of the printed No matter how clever the hardware (980055-1)
circuit board for the converter. Mount may be, theres not much that can be
the four wire jumpers first. Although done with it without software. We thus

PC software
competition
8 test & measurement
8 circuit design
8 communications
As in the past two years, this magazine will pub-
lish a design competition in the July/August
issue (on sale 18 June), for which a number
of advertiser sponsors have made available cal quantity with the aid
some glittering prizes. of a PC, but which also
Since more and more readers are inter- needs some additional hardware. Oth-
ested and/or engaged not only in electronics, ers may create software for testing
but also in computers (although this is just a logic circuits, or a small circuit design system
branch of electronics), this years competition that is driven by a PC, or a program to
will link the two as the subtitle suggests: the decode the output of weather reporting sta-
design of PC software for use in test and mea- tions. The main thing is that the PC plays an
surement, circuit design, or communications. active role in the design.
The aim of the competition should be seen Full details of the competition and the prizes
in its broadest sense. Competitors may well will be published in next months issue of this
devise a program to test or measure a physi- magazine. Dont miss it! [980060]

PC TOPICS Elektor Electronics EXTRA 5 - 6/98


The circuit presented in this article enables you to
build a software-controlled 8-channel analogue
switching unit that will be hard to beat as far as sim-
plicity is concerned. The software for controlling the
switch is written in Visual BASIC, and available on disk.

Hardware design and software by B. Oehlerking

RS232-controlled
8-channel switch
Using CMOS logic and Visual Basic
tive voltage.
The type 4029 counter is automati-
cally reset at power-on by C3-R5. The
counter operates in BCD (binary coded
decimal) mode, and responds to rising
pulse edges at its clock input, pin 15.
This pulse transition is supplied to the cir-
cuit by the PC sending the word 0
(0000 0000 binary) over the TxD (trans-
mitted data) line. Potential divider R1-
R4 and the internal clamping diodes
protect the clock input of the 4029
against harmful voltage levels.
Binary outputs Q1, Q2 and Q3
(pins 6, 11 and 14) of the 4029 are
connected to the corresponding
inputs of a type 4051 bilateral 8-way
analogue multiplexer, IC2. Depending
on the channel selection code
received at its control inputs, the 4051
switches the voltage at pin 3 (COM) to
one of the eight outputs marked 0
through 7. In this way, the 4051 acts as
a digitally controlled rotary switch. A
Using a PC to control real-world loads software to control the switch in a user- high (+10 V) voltage level on the RTS
like lamps, relays and so on is an ever- friendly-way using an attractive user- line disables the 4051 via pin 6, caus-
popular subject, and various designs of interface which appears on the screen. ing all channels to be disconnected
PC-controlled switching units have simultaneously. Here, again, a resistor-
appeared in this magazine over the The hardware diode combination is used to ward off
past few years. However, many at you the risk of negative voltages on the RTS
may have hesitations about building Remarkably, there are only two inte- line damaging the 4051.
such complex circuits, which, in the grated circuits in this design, as evi- The 4051 is by no means a power
worst case, are insertion cards. Unless denced by the circuit diagram shown switch, and capable of switching cur-
you are into industrial control systems in Figure 1. Whats more, the 4029 and rents up to about 1 mA only, while the
and have lots of PCs to play around 4051 ICs are traditional CMOS devices voltage level should be between 0 V
with, it is best to opt for a switching sys- which anyone should be able to and 9 V. If you want the circuit to con-
tem which is connected to the PC as an obtain at a very small outlay. trol much heavier loads, say, a relay or
external unit, and controlled by way of The circuit is powered by the +10 V a lamp, then we suggest adding a
one of the PCs ports (RS232 or parallel). voltage tapped from the PCs RS232 BUZ10 MOSFET current booster as
The good news is that the present port via the DTR (data terminal ready) shown in Figure 2. Note that the +10 V
design is cheap, open to experiments, line. Because the DTR line can also control voltage arriving by way of the
totally external, RS232-driven, and it drop down to 10V, a diode, D1, is 4051 is again stolen from the DTR line,
does not even require a power supply! inserted in the supply line to the circuit and that the load (obviously!) has to
Whats more, we have available the to protect it against the harmful nega- be powered by an external supply

6 - 6/98 Elektor Electronics EXTRA PC TOPICS


capable of providing the necessary V+
current. D1 C3
The carry bit supplied by pin 7 of the C1 C2
4029 counter is read by the PC via the 1N4148
100n
100n 100n
CTS (clear to send) line, for reasons we R5

100k
will discuss further on. K1 IC1
That more or less wraps up the dis- 10
U/D
1 1 COM
cussion of the hardware. The circuit is R1 C3
6 15 IC2
connected to a free COM port on the 2
10k
R4 9
1.2+/1.2-
B/D 13
PC via a 9-way sub-D PCB-style socket, MDX 0

100k
7 RTS 5 3 0
G1 14
K1, and a standard serial interface 3 TxD 1
15
1
2 2
cable. 8 CTS 4
3D
6 11
0 12
4 DTR 12 11 10 3 3
1 8x 0 1
9 13 14 9 7 4 4
2
Construction 5 3 2 5
5
2
5
6 6 6
1.2CT=15 G8 4
7
The 8-channel switch is built on a small 1.2CT=0
7 7

printed-circuit board of which the art- 4029 4051


work (copper track layout and com-
R2
ponent mounting plan) is shown in
10k
Figure 3. This board is unfortunately R3

100k
not available ready-made from the
Publishers. 982042 - 11
Construction should not cause
undue difficulty even to (relative)
Figure 1. Circuit diagram of the RS-232 controlled 8-way switching unit.
beginners to the noble art of soldering.
It is recommended to use IC sockets
for the 4029 and the 4051. Watch their RTS high. Next, the value 0 is repeat-
+
polarity and also that of the diode! edly written (via TxD) until CTS drops
low. Next, the user can click on the
Control software Switch button in the user interface
box to step through the channels.
The program for controlling the switch Each mouse click causes a further 0,
was written in Visual BASIC 3.0. Its that is, a clock pulse, to be sent to the LOAD
flowchart is shown in Figure 4. First all 4029, which is incremented in this way.
channels are switched off by pulling Once channel 7 is reached, the next

4051 13
COMPONENTS LIST Semiconductors: 14
D1 = 1N4148 15
47k
Resistors: IC1 = 4029 BUZ10
+10V 12
R1,R2 = 10k IC2 = 4051 (DTR)
R3,R4 = 100k
Miscellaneous:
R5 = 100k MUX
K1 = 9-way PCB mount sub-D socket
(female), angled pins. (equivalent) 982042 - 12
Capacitors:
Control software on disk, order code
C1,C2,C3 = 100nF
986015-1, see Readers Services page.
Figure 2. Optional power driver extension
(up to eight required) to enable real
Figure 3. Copper track layout and component mounting plan of the PCB designed for loads to be controlled.
the switching unit (board not available ready-made).
mouse click causes the program to
send the number of pulses needed to
make Q1=Q2=Q3=0 again, i.e.,
channel 0 is selected again (assuming
(C) Segment

that all channels have been disabled


tnemgeS )C(

982042-1
982042-1

1-240289

using the button On/Off Chs, i.e., RTS).


The user interface will tell you which
K1

D1 channel has been selected, as well as


C1

the status of the supply voltage


C3
R2

R1

IC1 applied to the circuit (DTR on/off), and


the status of the channel
disable/enable control (On/Off Chs).
R4
R5

Pressing the Auto button causes the


R3

IC2
program to automatically step through
all eight channels at the indicated
C2
6
8
4
1
7
2
5
3

COM

interval (here, 1 s). The available


range of the auto-step interval is

PC TOPICS Elektor Electronics EXTRA 7 - 6/98


approximately 0.1 s to 1 s.
The complete executable program
and its project code file (written in
Visual BASIC 3.0) are available from
the Publishers on a floppy disk with

START

RTS = H all channels OFF

INIT SEND 0 binary 0 on TXD

N CTS
= LOW carry arrived?
Figure 5. The user interface is a window with buttons offering full control over
?
the eight switched devices, as well as useful status information indicators.
Y

SEND 0 order code 986015-1. No ling (dc-operated) loads if you extend it


until channel 0 selected
need to mention that VB fans with the power buffers shown in Figure 2.
Q1 = Q2 = Q3= 0
among you may edit and However, the 4051 containing bilateral
enhance the program to analogue switches, it also is possible to
CONTROL
their hearts content. use the circuit to collect, say, analogue
LOAD voltages from eight sources, and feed
these, one at a time, to an ADC (ana-
982042 - 13 Applications logue/digital converter) via pin 3 of the
Figure 4. Flowchart of the VB3 program developed for As already mentioned, the 4051.
the project. switch is suitable for control- (982042-1)

8 - 6/98 Elektor Electronics EXTRA PC TOPICS


The IRQ and DMA lines are used to manage commu-
nications between the computer and all other com-
ponents, extension cards and peripheral devices. It is
important that these lines are correctly allocated and
applied, since otherwise the PC will not work properly
with the various devices which are connected to it. In
this article we explain the functions of these lines and
the possibilities which modern PCs offer for resolving
possible problems and conflicts relating to their use.

By our editorial staff

IRQ and DMA usage


right-of-way rules for the PC

The computers processor must per- in question. After this communication is controller ICs are connected together
form a large variety of tasks. It must completed, the CPU continues with causes certain deviations from this rule,
execute programs, look after memory whatever it was doing at the time that it as indicated in Table 1.
management, maintain communica- received the interrupt request. Not all of the IRQ lines are available for
tions with various system components The interrupts are all handled by an expansion cards. Some are only pre-
(ranging from the real-time clock IC to interrupt-controller IC. The original XT sent on the motherboard, and the high-
the hard-disk drive) and much more. machines had 8 interrupt lines, while in er-numbered lines are only available
Good communications between the later models two controllers are with 16-bit ISA slots (which is of course
various elements of the system, and a arranged in series to provide a total of not a problem with relatively modern
certain amount of hierarchical structure, 15 available IRQ lines. computers). All available IRQ lines are
are needed for this to all work smooth- Unfortunately, several IRQs are claimed present on the PCI connectors.
ly and efficiently. The interrupt lines and by internal components such as the As can be seen from Table 1, there is
DMA channels of the PC were devel- timer IC, the keyboard driver and the not all that much room for expansion.
oped to aid in this process. Every coprocessor, so that relatively few free IRQ5, 9, 10, 11 and 12 are the only free
device which is either located inside the IRQs are left for use with ISA and PCI interrupt lines. When you consider that
computer or connected to the comput- expansion cards. Table 1 summarizes a sound card often takes two IRQs and
er (such as a joystick port or a sound the available IRQs and the devices to that a graphics card also demands an
card) first has one or more I/O which they are assigned. interrupt line, you can see that there is
(Input/Output) addresses assigned to it PC users are frequently confused by very little left over. We will return to this
for transferring data between the lines 2 and 9. IRQ9 from the second IC subject later on.
processor and the device. A special I/O actually replaces IRQ2 from the first IC,
address region is set aside for this pur- so that both of these lines have the DMA
pose. In addition, there are two addi- same function. In certain cases, prob- DMA (Direct Memory Access) is a radi-
tional types of signal lines present to lems can occur with a component cal technique which allows one system
support fast interactions between a sys- using IRQ2 or IRQ9. As a rule, the soft- component lay claim to other system
tem component and the CPU or ware will recognize one of these IRQ components. In contrast to IRQ, in
between two system components: IRQ lines but not both of them. If the com- which a component signals the CPU
and DMA. ponent in question does not work prop- that it must give its attention that com-
erly with IRQ2, try it with IRQ9 (or vice ponent, with DMA a component can
IRQ versa). One of these two settings will exchange data directly with another
IRQ stands for Interrupt Request. A usually work okay. component without the intervention of
system component sends such a The order of precedence (or priority) of the CPU. The CPU can thus continue to
request to the CPU to indicate that the the IRQ lines is also clearly defined. In perform its own regular tasks. In order
processor must temporarily suspend its principle it runs from low to high (IRQ0 to properly manage the DMA traffic, a
current activities and communicate as thus takes precedence over IRQ1), but special DMA controller IC is provided to
quickly as possible with the component in practice the fact that two interrupt execute the necessary tasks. Using

10 - 6/98 Elektor Electronics EXTRA PC TOPICS


DMA, a sound card can for example
write digitized audio signals directly to
the memory, with the aid of the DMA
controller. In this case the DMA con-
troller temporarily takes over the entire
system bus, coordinates the desired
data transfer and then releases the sys-
tem bus.
There are several DMA channels that
can be assigned to specific system
components. Originally (with the XT)
there were only four DMA channels; this
was extended to 8 with the AT. As with
the IRQ lines, certain DMA channels are
normally allocated to certain system
components. Fortunately, DMA chan-
nels are only needed for devices that
must transfer a large amount of data in
a short time, and there are not that
many. There is thus less demand for
DMA lines than for IRQ lines. The high-
er-numbered channels, as with the IRQ
lines, are not available with 8-bit ISA
slots.

Solving problems
If two components in the PC use the
same IRQ or DMA line, a conflict situa-
tion is produced which can have seri-
ous consequences for the stability of
the system. There are several ways to
see which components use which IRQ
and DMA lines. Under Windows 95 you
can simply have a look at the system
configuration under Settings - Control
Panel - System - Device Manager -
Properties. If you are still using
Windows 3.1 or DOS, you can use the
program MSD (which is normally pro-
vided along with Windows or DOS).
Figure 1 illustrates a situation in which
the computer is pretty well filled with
expansion cards. Based on this exam-
ple, lets have a look at the possible
problems and their solutions.

Serial ports
A modern PC normally has two RS232
connectors which use IRQ4 (COM1)
and IRQ3 (COM2). COM1 is usually
reserved for the mouse. If a modem is
added, it can always be connected to
COM2. An internal modem can be con-
figured to be COM3 or COM4. You
should choose COM4, since COM3
shares an interrupt line with COM1 and
COM2 shares an interrupt line with
COM4; COM1 and COM3 can thus not
be used at the same time. If you want to
also connect a drawing tablet or an IR
remote control, then it is a good idea to
use the special PS/2 connector for the
mouse (this connector is found on the
motherboard of most Pentium PCs)
but first make sure that the mouse can
be used with a PS/2 interface! IRQ12 is
normally reserved for a PS/2 mouse. If
you do not use the PS/2 bus, then the
Figure 1. An example of IRQ and DMA utilization in a Windows-95 PC.
IRQ assignment can usually be dis-

PC TOPICS Elektor Electronics EXTRA 11 - 6/98


one interrupt line (chosen from 9, 10, 11
Table 1. The PCs IRQ lines, showing the order of priority and 12, for example) and one DMA
and the devices having fixed assignments. channel (usually a 16-bit channel).

IRQ Priority Location I/O addresses Device Special cards


If you connect some kind of special
0 0 motherboard 040 - 043 system timer device to your computer, it usually
1 1 motherboard 060 - 064 keyboard comes with a separate plug-in card
2 2 motherboard diverted to IRQ 10 - 15
which also requires an interrupt line.
3 9 8-bit ISA slot 2F8 - 2FF/2E8 - 2EF serial ports COM2 and COM4
4 10 8-bit ISA slot 3F8 - 3FF/3E8 - 3E serial ports COM1 and COM3
There are also certain cards which only
5 11 8-bit ISA slot (278 - 27F) free (printer port LPT2) need an I/O address and which handle
6 12 8-bit ISA slot 3F0 - 3F7 floppy-disk controller all communications with the processor
7 13 8-bit ISA slot 378 - 37F printer port LPT1 via polling. This is somewhat slower,
8 14 motherboard 070 - 07F real-time clock but it can work quite well.
9 2 8-bit ISA slot replacement for IRQ2 Modern TV-tuner cards write their data
10 3 16-bit ISA slot free directly to the memory of the graphics
11 4 16-bit ISA slot free card via the PCI bus. They need both
12 5 16-bit ISA slot free (PS/2-bus mouse) an interrupt line and a DMA channel to
13 6 motherboard 0F0 - 0FF coprocessor
make this possible.
14 7 16-bit ISA slot 1F0 - 1F7 first IDE controller
15 8 16-bit ISA slot (170 - 177) free (second IDE controller)
You can see that once a few expansion
(priority: 0 = highest, 14 = lowest) cards are installed in the computer, the
competition for the available interrupt
lines becomes rather fierce.
Fortunately, we do not have to resolve
Table 2. The PCs DMA channels, showing the standard this all by ourselves. With a modern
motherboard and modern plug-in
assignments. cards, the card themselves check to
see which interrupt lines are available
DMA location device when the computer is switched on, and
they can each choose from three or
0 16-bit ISA slot free four possibilities. With older-model ISA
1 8-bit ISA slot free (sound card) cards this is not possible, which means
2 8-bit ISA slot floppy-disk controller that they must be configured manually.
3 8-bit ISA slot free (ECP printer port or sound card) An additional feature of PCI cards is
4 motherboard link between first and second DMA controller
that they allow interrupt lines to be
5 16-bit ISA slot free (sound card)
shared. Two cards can share a single
6 16-bit ISA slot free
interrupt line, as long as the software is
7 16-bit ISA slot free
smart enough to be able to recognize
which card has generated the interrupt.

abled by a jumper on the motherboard. booted up). The graphics card usually BIOS settings
However, Windows often has problems uses one of IRQ9, 10 or 11. The peripheral devices integrated on
with releasing IRQ12 for general use, so the motherboard use interrupt lines and
dont just take it for granted that you Sound card DMA channels which can be configured
can use it for some other application. Sound cards are frequently a source of via the BIOS. It is possible to choose
conflicts, since they use a relatively among several I/O addresses and
Printer port large number of interrupts and DMA (sometimes) several IRQ lines for the
The parallel printer port normally uses channels. The traditional 8-bit COM ports. This is a handy way to
one interrupt line (usually IRQ7). This SoundBlaster card normally used IRQ5 exchange COM numbers; you can (for
applies to the standard EPP printer and DMA0 or DMA1, under the example) assign COM4 to an internal
port. If you select an ECP port in the assumption that the second printer port modem even though it is physically
BIOS setup, then a DMA channel is also either would not always be used or was configured as COM3. The printer
used (channel 3). If you add a second not present (a single IRQ line can be port(s) can also be set up in the same
printer port, it usually uses IRQ5. assigned to two different devices as manner; it is thus possible to select one
long as they are not both used at the of two DMA channels and one of two or
Graphics card same time). The modern-day 16-bit three IRQ lines in the ECP mode. If the
Actually, a basic graphics card does not Soundblaster (as well as higher-perfor- second IDE controller on the mother-
need an interrupt line or a DMA chan- mance models, such as the AWE64) board is not used, you can disable it in
nel. However, modern cards with their still uses only one interrupt, but it needs the BIOS, so that IRQ15 can be made
extended functions normally do two DMA channels (such as 1 and 5) available for some other application.
demand an interrupt line. Older-model since it must transfer 16-bit data. Other
(982051-1)
cards which use an S3 chip are notori- types of sound cards almost always
ous for insisting on using IRQ11, which need two IRQ lines in addition to the
in many cases leads to annoying con- two DMA channels.
flicts. Modern graphics cards are gen-
erally more flexible and can choose Network adapters and SCSI cards
from several different interrupt lines Since these types of cards must
(this happens when the computer is process a lot of data, they normally use

12 - 6/98 Elektor Electronics EXTRA PC TOPICS


This article covers two projects. The first demonstrates
how to use a PC to decode RC5-style infrared
remote control signals, while the second project con-
centrates on using a remote control unit to transmit
PC keyboard commands.

With contributions by
E. Saccasijn and K.H.A. Duesman

projects for PC &


infrared remote-control
The two projects described in this arti- The signal analysis and decoder first is always a 1, the second, a 1
cle were awarded Dutch national program, RECO.COM, displays blocks (standard command follows) or a 0
prizes in the 1996/1997 International of eight received bytes on the screen, (command from extended set follows).
Software competition, and have in together with the system and function Next comes the control bit, which
common that they cover the use of codes. These bytes are used by the changes only when commands are
infrared (IR) remote controls in combi- second program, RC5.COM, which separated by pauses. In other words,
nation with a personal computer (PC) actually uses the RC5 function codes this bit does not change when you
of the IBM/DOS type. for software-controlled actions. The hold a key depressed for some time.
Infrared remote controls for TV sets, program to do so you have to write The control bit is followed by the 5-bit
CD players and VCRs often go by the yourself. system code and then the 6-bit func-
dozen in electronic surplus stores, but tion code. An overview of system
they are also seen at rallies and flea RC5 pulse structure codes and function codes will be
markets. The type of control to use for printed on the Datasheets in the
the present projects should be RC5 September 1998 issue of Elektor
compatible, which usually means that Electronics.
it has a Philips, Mullard or Aristona In the PC, a software counter is used
logo. Some Sony types are also suit- to establish minimum and maximum
able, but it is difficult to say exactly values of the short and long periods,
which ones as there are some many 0 0 1 taking into account the clock speed of
around. 982052 - 13 the computer. In this way, the length of
the start bit can be measured and
RC5 remote control Figure 1. RC5 IR remote control signals used as a reference (see RECO.COM).
analyser/decoder are bi-phase encoded. Once the values are known, they can
be used at any time (on the same
General The RC5 remote control system is computer) without the need for a new
This program, written by Mr. Eric based on the biphase modulation reference measurement.
Saccasijn of Belgium, enables a PC to principle, whereby a falling (negative-
analyse any infrared command emit- going) pulse edge represents a Hardware
ted by an RC5 (compatible) remote logic 0, and a rising (positive-going) A simple interface is needed to make
control unit. A simple IR pulse edge, a logic 1. In this system, the signals emitted by an IR remote
receiver/demodulator is used to feed no state change occurs when two control suitable for processing by a
received pulse trains to BUSY line on identical bits are transmitted succes- PC. The interface shown in Figure 2
the PCs printer port. sively. Consequently, two different peri- consists of a Siemens SFH506-36 IR
Next, the software takes over. ods can be observed in an RC5 sig- receiver/demodulator, three wires, a
Initially, a reference measurement is nal: a long period as a result of two 10-k pull-up resistor and a 25-pin
performed to determine the average identical bits, and a short period as a sub-D connector for the link to the PCs
bit length of the received pulses. This result of two different bits. The long printer port. The IC and the resistor
measurement is necessary to prevent period is exactly two times as long as may be fitted on a small piece of ver-
different results on computers operat- the short period. The basic structure is oboard connected to the sub-D con-
ing at different speeds. Based on the illustrated in Figure 1. nector via a short length of screened
reference data, the commands may A complete RC5 code word consists stereo cable. A mini jack socket was
then be analysed. of 14 bits: first come two start bits, the installed on the sub-D connector to

14 - 6/98 Elektor Electronics EXTRA PC TOPICS


enable the interface to be powered K1
Centronics
by a 5-volt mains adaptor. 13
5V 25
12
RECO.COM 24
As already mentioned, the main func- R BUSY 11
tion of RECO.COM is to establish a PC-

10k
23
2
related reference for the length of the 10
3 22
pulses received from the RC5 IR 9
remote control. It also displays a block SFH506
21
1 -36
of eight bytes, which hold essential 8

information for the decoder program, 20


7
RC5.COM. Each command comprises
GND 19
its system code, function code and 6
the value of the control bit. 18
After launching the program, you 5
17
are prompted to press a key on the
4
remote control. The received signal is 16
used to determine the length of the 3
start bit, on the assumption that a nor- 15

mal RC5 command is transmitted (i.e., 2


14
not one from the extended set, so to
1
begin with dont press any special 982052 - 14
function buttons on the remote con-
trol). Using the measured values, four
Figure 2. Circuit diagram of the simple IR receiver interface for use with the RECO and
limits are computed; the minimum and
RC5 programs.
maximum short time, and the mini-
mum and maximum long time. The
program employs these limits to particular remote control. In that case, received. If no argument is appended,
decide whether or not a command is the program returns errorlevel code then the system code is ignored, and
valid. The four extreme values are 128 if a wrong system code is the program returns the function code
stored in buffers as well as displayed
on the screen in the form of eight bytes
(two per extreme value). You may want
to make a note of the values for use D1 R1

later as a patch for RC5.COM. 470 U


D2 R8
After the reference measurement LL4148 C2 47k
the program waits for a key press to
enter a loop in which received com- 5V1 220
K1 IC1 2
mands are decoded, and their system IC2a
and function codes displayed sepa- 11
12
1 3
rately. You may quit the program by & 13
6 DSR
pressing the Escape key.
2
1
7 RTS
RC5.COM IC2b SFH506-36
3 TxD
This MS-DOS program waits for an IR R5 9
8 10
command received by way of the 10k 8 &
4 DTR
interface described above. Once a R7
9 RI
command is received, it returns the 4k7
LED1
5 GND
system to MS-DOS, having supplied the
RC5 function code as a return code.
high eff.
Used in a batch file, RC5.COM
R2
enables a function selection to be set R6
10k

up with the aid of, for example, the 68


U IRLED
ERRORLEVEL instruction.
This program can not work without
the eight reference-info bytes sup- IC2d LD271
14 6 IC2c Q1
plied by RECO.COM discussed above. 4 1 R4
These eight bytes have to be patched IC2 5 & 3
2 & 4k7
7
into RC5.COM at hex addresses 462 R3
through 469. BC
8k2
C1 847B
RC5.COM may be launched with an
RC5 system code appended as an IC2 = 4093
4n7
argument. Although the program does 982052 - 11
decode all bits, it only returns the func-
tion code as a DOS errorlevel code.
By supplying the system code before- Figure 3. Circuit diagram of the transmit/receive interface for the PCRemote project.
hand, you can selectively listen to one Note that this interface is connected to the PCs serial (RS232) port.

PC TOPICS Elektor Electronics EXTRA 15 - 6/98


COMPONENTS LIST

Resistors: (all SMA)


R1 = 470
R2,R5 = 10k
R3 = 8k2
R4,R7 = 4k7
R6 = 68

Capacitors:
C1 = 4nF7 SMA
C2 = 220F, 16V, radial

Semiconductors:
D1 = LL4148 (SMA)
D2 = 5V1 zener diode (SMA)
IC1 = SFH506-36 (Siemens)
IC2 = 4093 (SMA)
IRLED = LD271
LED1 = low-current LED, 3mm, red
Figure 4. Copper track layout and component mounting plan for the PCRemote inter- Q1 = BC847B (SMA)
face (shown at 200%).
Miscellaneous:
K1 = 9-way sub-D socket (female) cable
mount

mitter which is used for test purposes


(together with the utility TestFreq.com).
The supply voltage for the parts on the
interface board is stolen from the
RS232 port.
The board is built using the artwork
shown in Figure 4. To make for minia-
ture size, many parts are surface-
mount assembly (SMA) types. The print-
ed circuit board is not available
ready-made from the Publishers. The
board is connected to the PC via a
standard 9-way RS232 cable.

Software
In true experimenters spirit, Mr.
Duesman has supplied a number of
files for this project, including executa-
Figure 5. Prototype of the PCRemote interface.
bles, PCB designs in HPGL format and
documentation. The following are the
emitted by any RC5 remote control. and a miniature infrared receiver/inter- main files you will require:
Two small batch programs are pro- face for connecting to the PCs RS232 PCRemote.com driver
vided to get you going. R.BAT is an port. The combination of the hardware PCRemote.dat sample data file
example of RC5.COM being launched and software enables just about any Manage.exe learn & edit key-
without a system-code argument, infrared remote control to supply PC stroke combinations
while R5.BAT passes system-code 5 keyboard codes. The program even (shell program)
as a filter to RC5.COM, forcing the supports different brands of IR remote Turnoff.com a help utility
decoder software to return function control. By linking keystroke combina- Testfreq.com a help utility
codes from VCR1 remote controls tions on the PC keyboard to a certain
only. All other remote controls then key on the remote control, PCRemote Obtaining the software
return 128 as the errorlevel code. may be taught to put certain code
Noise and nonsense signals produce strings into the PCs keyboard buffer. All programs and files discussed in this
errorlevel code 255. The program The interface required for this purpose is article may be found on a CD-ROM
may be left by pressing the Escape of the KISS type (Keep It Simple Stupid). entitled Software Competition
key. 1996/97, available through the
Hardware Publishers Readers Services as order
PCRemote Figure 3 shows the circuit diagram of code 976003-1.
the infrared interface. As in the previ- RC5 decoder project: look in subdi-
Mr. K. Duesman from the Netherlands ous project, an SFH506-36 from rectory Nl/10/.
produced the second mini project we Siemens is used to receive and PCRemote project: look in subdirecto-
present in this article. The project is demodulate the infra-red signals. The ry NL/7.
comprised of a program for MS-DOS interface also comprises an IR trans- (982052-1)

16 - 6/98 Elektor Electronics EXTRA PC TOPICS


co-channel interference
suppression using stacked antennas
a clever solution
for VHF/UHF radio and TV

If you want to receive a dis-


tant or even overseas TV sta-
tion that happens to use the
same frequency as a strong
local transmitter, the received
signals will be weak and
always suffer from ghost
effects, moir and other inter-
ference. In some cases,
reception will be totally impos-
sible because of the much
greater signal strength of the
station around the corner.
This article describes an inter-
ference reduction method that
may be used for UHF TV as
well as VHF radio (including
amateurs).

Because of the plethora of satellite TV you should always remember that


broadcast stations currently crammed there is really no reason to complain.
into the available bandwidth of cable- After all, the radiated power, antenna
TV networks, terrestrial (foreign) pro- height and radiation pattern of the rel-
grammes are often neglected. Unfor- evant TV transmitter are such that its
tunately, most of these programmes designated target area is reliably cov-
(like Belgian, Dutch or Irish ones) are ered. Any signal that spills outside the
not on satellite, so interested viewers normal coverage area, by special prop-
in coastal regions of the UK mainland agation conditions or otherwise, is sim-
are forced to use ordinary TV anten- ply good fortune. Many viewers of for-
nas to receive these programs at just- eign terrestrial TV stations can live with
about-acceptable quality. that, were it not for the fact that recep-
Whenever these signals are weak tion often suffers from a national TV
Design by W. Fischer, DD0RQ and almost blotted out by interference, transmitter or relay that uses the same,

Elektor Electronics 6/98


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

or almost the same, frequency. Figure 1. Principle of co-channel interfer-


Although there is some international 1 ence suppression using two stacked anten-
co-ordination between TV transmitter nas directed at the same transmitter.
operators as regards channel alloca-
tions of high-power TV transmitters, in
general no responsibility is assumed
for interference inflicted by a national
transmitter on the reception of a for-
eign one. interfering
Similar problems often occur with A1 transmitter
VHF radio reception and amateur radio L
(for example, beacons using the same
frequency). cable 1

Interference readily occurs under
adder wanted
favourable propagation conditions. d
transmitter
Particularly with ordinary (AM) TV on
UHF, even the weakest station on the cable 2
same channel can cause very annoy- S

ing interference patterns in the nor- L


mally crisp and clear picture from a As 980041 - 11
strong nearby station.
Co-channel interference may be
suppressed to a considerable extent by
using a pair of stacked yagi antennas A1
rather than a single one. Although 2
they are directed at the weak station,
the two antennas are not stacked to
increase their total gain (by 3 dB in
180 0 direction
theory as a result of increased direc-

tivity). Rather, this is done to cancel
out the signal picked up from the
strong station that is the source of the
interference.
A2
980041 - 12

STACKED ANTENNAS
The underlying principle is illustrated Figure 2. Position of the nulls in the directivity diagram
in Figure 1. Two identical antennas are of a horizontally polarized pair of yagi antennas.
mounted at a distance d, and their
signals are taken to a power combiner
by way of two coax cables having the transmitter
same length.
As the antenna array is aimed at
3 X K55 A1
the desired (weak) station, the
received signals will arrive in-phase at 150
the inputs of the power coupler. If the transmitter
antennas are spaced by the so-called Y
optimum stacking distance, the gain so 180 0
obtained is 3 dB in theory. However,
this distance is not used here, because
we aim at cancelling interference, and
not increasing the antenna gain or
sharpening the antenna pattern!
A signal picked up from an inter- A2 980041 - 13
fering station at an angle will arrive
with different phase angles at each of Figure 3. A practical case based on two transmitters
the two antennas (actually, just the sharing the same frequency in the UHF band. Transmit-
dipoles). In fact, the signal arriving at ter X is the source of interference, transmitter Y, the
antenna A2 covers an extra distance, s, wanted station.
of

s = d sin equal and exactly 180 degrees out of


phase. / 2 + n
The phase shift, , incurred underway
d=
As shown in Figure 2, the stacked sin
equals antennas have four so-called nulls in
their directivity pattern. These nulls In case the calculated distance d is so
= 360 s/ occur at mirror-image positions with small as to cause the antenna reflector
respect to the main axis of reception. elements to touch each other, the con-
where is the wavelength of the sig- stant n may be made 1, 2, etc. (integer
nal. COMPUTING THE value required).
For total eradication of the signal STACKING DISTANCE Unfortunately, a phase shift of 180
received from this direction, the The distance d between the two yagi degrees can not be obtained from two
received signal voltages have to be antennas is computed from antennas stacked as described here,

Elektor Electronics 6/98 15


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

With weak antenna signals, a dif-


4 ferent method of coupling the antenna
signals is recommended. The alterna-
tive is the quarter-wavelength imped-
ance transformer (stub) whose con-
struction is illustrated in Figure 4. For
claritys sake, the antenna dipoles are
sketched only.
The two antennas are electrically
connected in parallel by two pieces of
75-ohm coax cable having the same
1
length. The impedance at the junction
4
of the cables is then 75/2=37.5 ohms.
A piece of 50-ohm coax cable (for
example, the ubiquitous RG58) is then
used to step up the 37.5 ohms source
impedance to 75 ohms as required for
the download cable. The impedance of
the matching stub is calculated from
downlead cable
ZL = ZsourceZdownl

The 50-ohm impedance of our real-


980041 - 14 world RG58 cable is sufficiently close
Figure 4. Basic con-
struction of the to the theoretical value of 53 ohms
impedance matching produced by the equation.
stub. 300
= The simple equation you will need to
f calculate the length of the matching
300 stub is given in Figure 4.
because in that case the wanted signal = = 0.403 m The factor v in the equations is the
would be cancelled, too. 743.25 MHz so-called velocity factor, a material con-
Using careful construction, how- / 2 + n 0.403 / 2 + 00.403 stant specified for coax cable by its
ever, co-channel interference may be d= = manufacturer. For RG58 cable as used
suppressed by at least 25 dB. sin sin 150 here, v is stated as 0.66 in the
d = 0.403 m datasheets. Using this constant, the
EXAMPLE length of the 50-ohm matching stub
The author lives in Southern Germany, d = 1.2096 m for the example in Figure 3 is calcu-
and wants to receive an Austrian TV lated as follows:
station situated just across the border.
The situation is illustrated in Figure 3. Because it is not possible to mount the f = 743.25 MHz
Both station X and station Y use chan- antennas at a distance of just 40 cm Cable = RG58CU; v = 0.66.
nel 55 (picture carrier at 743.25 MHz). (result of the first calculation), the next
In this example, the desired station
uses transmitter Y, whose reception is
higher distance is calculated using
n=1. The result is a distance, d, of =
30000
f
[cm]
to be freed from constant interference 1.2096 m, which was actually imple-

caused by high-power station X.
Well, these transmitters actually
mented by the author to build the
stacked antenna array. l= v cm
4
[ ]
exist, as well as the receiver location:
PRACTICAL REALISA- l= 6.66 cm
X = ARD (German regional TV), loca- TION
tion Cham, transmitter power approx.
100 kW. The two antennas are connected up Provided you carefully assemble the
Y = ORF 2 (Austrian national TV), loca- using a coax coupler device obtained stacked antenna array, the signal cou-
tion Zug peak, transmitter power from an antenna installer. The author pler and impedance matching stub,
approx. 2 kW. used a Reichelt coupler type RW021- the method described in this article
A = receiver location, Vohburg/Donau. DC. This simple and inexpensive solu- should enable a previously interfer-
tion does have a drawback, however: ence-ridden TV signal to be received
Using the above equations, the dis- its insertion loss of about 4 dB nullifies much better.
tance between the identical UHF yagi any extra gain obtained from stacking (960041-1)
antennas is calculated as follows: the antennas.

Elektor Electronics 6/98 17


electronic
accelerometer
measure acceleration, deceleration,
shock, tilt and vibration

Just over a year ago


From your physics lessons you may accelerometer is contained in a 10-pin
we published an recall that acceleration is normally TO100 metal case, and consists of a sen-
Application Note cov- measured in metres per second sor, an oscillator, a demodulator, pre-
squared. Acceleration due to the amplifier, voltage reference and a
ering the type ADXL05 earths gravity force is, however, usu- buffer amplifier. The device will mea-
ally expressed as a factor of g, where g is sure accelerations with full-scale ranges
accelerometer chip the internationally adopted value of 5g to 1g or less. Its typical noise
from Analog Devices. 9.80665 m/s2. Any forces considerably floor is 500 g/Hz, allowing signals
greater than 1 g can produce complex below 5 mg to be measured. The
Now its time to actu- sensations in humans beings: jetfighter ADXL05 can measure uniform acceler-
ally use this interest- pilots, and astronauts can tell you all
about them. For your very own experi-
ation, such as that due to gravity, as
well as variable accelerations, such as
ing device in a project ence, do some travelling up and down vibration.
in a fast elevator system in a tower flat! Since acceleration is a vector quan-
for home construc- Back to electronics, now. For those tity, the device has three axes: a sensi-
tion. of you who missed the above-men- tive axis (X) which is defined as illus-
tioned article, heres a quick rundown trated in Figure 1b, a transverse axis (Y),
on the main component in the present which is perpendicular to the axis of
project, the ADXL05. sensitivity in the plane of the package
From an idea by J. Wilkes As illustrated in Figure 1a, the circle, and a transverse axis (Z), which

Elektor Electronics 6/98


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

is perpendicular to both X and Y. The


transverse sensitivity is virtually nil. 1
CIRCUIT DESCRIPTION
As shown by the circuit diagram in Fig-
ure 2, the accelerometer is battery-
powered, and equipped with a digital
readout in the form of an LC (liquid
crystal) display.
At an acceleration of 0 g, the sensor
output supplies a nominal 1.8 V. Two
things have to be said about this value.
First, it is subject to a tolerance of
0.3 V. Second, this value allows posi- A
tive as well as negative g values to be
measured. To make sure the DVM indi-
cates 0 g at a sensor output of 1.8 V, we
need to raise its negative input () with
respect to ground, in other words, add
an offset of 1.8 V. This is done with the
aid of the 3.4-V reference voltage sup-
plied by the ADXL05, R1, R2 and pre-
set P1.
Preset P3 and resistor R6 allow any
deviation from the nominal 1.8-V (0-g)
output level supplied by the ADXL05 B
to be corrected.
Although the use of a DVM module
with a full-scale readout of 200 mV Figure 1. Block dia-
does make for a compact and state-of 50 mV, which, admit- gram (a) and axes of be about 15 mA, of
the-art circuit, it does cause some tedly, is not favourable sensitivity (b) of the which 2 mA goes on
apparently contradicting requirements, in respect of DVM ADXL05. account of the DVM
for which comprises have to be found. accuracy. There you module. Finally, the cir-
To fully exploit the meters sensitivity are, however, with two cuit contains a number
and accuracy, it has to be matched to switch-selectable ranges of 2-g and of decoupling capacitors at critical
the typical sensitivity of about 5-g ranges as trade-offs between dis- locations.
200 mV/g of the sensor. That is not too play accuracy and sensor accuracy.
difficult: simply design for a buffer Because the sensor sensitivity is also CONSTRUCTION
gain of 0.5 and so create a range of 2 g subject to a tolerance of 25 mV/g, the The accelerometer is easy to build on
which corresponds to a full-scale read- buffer gain is made adjustable with the printed circuit board whose art-
out of 200 mV. On the preset P2. work (copper track layout and compo-
other hand, the full Figure 2. Circuit dia- The accelerometer nent mounting plan) is shown in Fig-
drive margin the sensor gram of the accelerom- is powered by a 9-volt ure 3. The only point to note here is
is then not exploited eter. A low component PP3 battery whose that the sensor has to be soldered
because the device has count is achieved output voltage is directly on to the board (do not use an
a range of 5 g. By thanks to the use of an stepped down to 5 V IC socket). This is essential because the
choosing a gain of 1/20 integrated sensor and by an 78L05 regulator sensor has to be level when the board
(0.05), 5 g then pro- a ready-made voltmeter in position IC1. Cur- is level. The external components
duces a readout of just module. rent consumption will (on/off switch, battery, range selector

2 1V8 +5V
22k

R1 DVM
DVM
P3 P1

8V4 IC1 5k
50k
5V 3V4 MT
D1 78L05
C5
22k

R2
1N4001
47 1V8 0 DPM951
1 R6 10V DVM
S1
C4
270k

2 6
DC1 VREF
S2a 2g (200mV)
3 9
DC4 VOUT
22n IC2
BT1 C1 C2
7 10 5g (50mV)
ST VIN
100 100n ADXL05 R4 R3
9V 16V 4 8
ODC VPR C7 C6
28k7

3k16

5 100n 1
C3
1% 1%

22n P2 R5
47k 980047 - 11
20k MT

Elektor Electronics 6/98 21


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

COMPONENT LIST
3

H1
H3

Resistors: C1 P1
C5 0
R1,R2 =22k - R2 5V
IC1
R3 =3k16 1% (Philips MRS25 P2 +
BT1
series) -
R4 =28k7 1% (Philips MRS25 series) + C2
R5 DVM
R5 =47k IC2 R4 +

D1

R1
R6 =270k S1 C7
P1 =5k multiturn 10 turn horizontal R3

R6
S2
P2 =20k multiturn 10 turn horizon- C4 C3
tal C6
980047-1
P3 =50k multiturn 10 turn horizon-

H4
tal
H2

1-7400P3
89 980047-1

Capacitors:
C1 = 100F 16V radial
C2 = 100nF Sibatit (Siemens) Figure 3. Copper track layout and component
C3,C4 = 22nF MKT (Siemens) level (0 g), and mounting plan (board not available ready-made).
C5 = 4F7 10V radial adjust P3 for 1.80 V
C6 = 1F MKT (Siemens) again. Now con-
C7 = 100nF MKT (Siemens) nect the DVM module to the Finally a few words about the DVM
accelerometer board. module used in this project. This mod-
Semiconductors:
2. Change back and forth between ule has an option for floating mea-
D1 = 1N4001
IC1 = 78L05 the two ranges. The indicated surements, which allows the circuit to
IC2 = ADXL05JH (Analog Devices) value should remain the same. If be powered by a single battery. The
not, adjust P3. Next, adjust P1 accelerometer board has a 5-volt con-
Miscellaneous: again until the module indicates nection for powering the DVM mod-
BT1 = 9V battery PP3 block 0 g. Repeat these adjustments ule. It should be noted that the nega-
S1 = rocker switch, 1 make contact until a reasonable optimum is tive connection of the DVM module
S2 = rocker switch, 1 c/o contact, or
achieved. represents a low resistance. Conse-
3x c/o contact for decimal point on
dvm 3. Select the 2-g range, and hold quently it can not be connected to the
DVM = DPM951 DVM module (Con- the board perpendicular with negative terminal of the accelerometer
rad) pin 10 of IC1 pointing upwards. board. So it is connected to the
Adjust P2 for a reading of 1.000 (buffered) positive terminal instead.
(1 g). Now turn the board so that The only difference it makes is the ori-
pin 10 of IC1 points downwards. entation of the sensor (simply turn the
and DVM) are wired up as illustrated The DVM should then indicate accelerometer board 180 degrees). By
in Figure 4. Do not yet connect the 1.000. If not, adjust P2 until the using a triple changeover switch in
DVM module, however, because the deviation for +1 g equals that for position S2, the decimal point on the
accelerometer has to be adjusted first. 1 g. This deviation is caused by DVM module can be switched accord-
the above-mentioned (small) ing to the range selected.
ADJUSTMENT transverse sensitivity of the (980047-1)
1. Connect a digital multimeter to ADXL05.
the circuit ground and DVM ter- That completes the adjustment of the Reference:
minal, and adjust P1 for a reading instrument. Having boxed the project, Accelerometer Type ADXL05, Applica-
of 1.80 V. Next, you should be ready to tion Note, Elektor Electronics April 1997.
connect the multi- Figure 4. Suggested do some real-world g
meter between wiring diagram. The testing in a fast elevator
ground and decimal point on the or one of those stomach-
+DVM. Make DVM module is churning machines you
sure the board is switched with two sec- see at funfairs.
tions of S2.

DVM
4 -
BT1
1
INHI
2
INLO
LK4

3
9V VDD
C1 P1 0 4
C5 VSS
- R2 5V
+ IC1
P2 + 5
BT1 COMMON
- 6
+ C2
R5 DVM
IC2 R4 + 7
D1

R1

REFLO
LK5

S1 C7 5g 2g 8
S1 REFHI
R3 S2a
R6

S2 9
C4 C3 BP
C6
980047-1 10
BP
P3
11
12
S2b DP3
LK6

13
DP2
14
DP1

S2c DPM951
980047 - 12

Elektor Electronics 6/98 23


electronics on-line
PICs on the Internet
Microchips family of PIC
devices comprises a small
galaxy of single-chip microcom-
puters, which achieved tremen-
dous popularity mainly because
they are so easy to program.
We rummaged around on the
Internet for a bit and stumbled
on an overwhelming amount of
information relating to PICs.
Some of the more essential
sites are discussed here.

The number of sites (on the Internet) Windows soft-


covering PIC-related subject reflects ware may be
the widespread interest in these con- found on the
trollers. The contents of these sites Maribor Uni-
ranges from simple exchanges of infor- versity server
mation to commercial pages offering (in Slovenia) at
ready-built circuits for sale. Many do- www.uni-mb.si/
it-yourself (DIY) enthusiasts, including ~uel205e7b/
many readers of this magazine, will be (our thanks are
interested mainly in construction pro- due to Mr. E.
jects and free PIC software. Dekker for
As a matter of course we should supplying this
start by mentioning the site run by the URL).
manufacturer, Microchip: Another programmer for the Cen- Erics PIC page is very extensive an
www.microchip.com tronics port goes by the name of offers, among others, PIC projects, tips
Here, all elementary information may TOPIC. It may be found at and tricks, FAQs and a plethora of
be found. Then theres Parallax Inc., www.man.ac.uk/~mbhstdj/topic.html links to other PIC sources and suppli-
who supply the famous BASIC Stamp, However, if you want to keep things ers. Go to
a miniature board containing a PIC as simple as possible, you are well www.brouhaha.com/~eric/pic/
running a BASIC interpreter. Parallax advised to look for a PIC programmer Dave Tait, who is also responsible
can be found at for the serial port. One definitely KISS for the TOPIC programmer, runs a
www.parallaxinc. com/home/htm (Keep It Simple Stupid) and yet well- page called Links to Internet
There are many more companies tried design is, for example, COM84. Resources, which contains hundreds
supplying hardware and/or software All details on this ultra-simple design of links to books, commercial products,
employing PIC devices. For example, are available on application areas, and other people
ITU Technologies from Cincinnati: warthog.eece.maine.edu/segee/prog84.html experimenting with PICs:
www.itutech.com Finally, we should mention the Pro- www.man.ac.uk/mbhstdj/piclinks.html
The PIP02 software for the Mini PIC grammer 2 design at The South African PIC Microcon-
Programmer described our June 1997 www.gbar.dtu.dk/~c888600/newpic.htm troller Zone at
issue is available from Silicon Studio at www.ip.co.za/people/kalle/pic/default.htm
www.sistudio.com The above mentioned programmers has a nice collection of assorted PIC
are just a few of dozens of designs that information, like ftp sites, web pages
PROGRAMMERS may be found on the Internet. and mail lists.
Designs for PIC programmers and the Finally, if you think you need even
associated software may usually be LINKS more information, visit the PIClist
obtained from sites run by enthusiasts Because of the sheer volume of infor- Archive Website at
publishing their thinkware via the mation available on PICs via the Inter- www.iversoft.com/piclist/
Internet. A PIC programmer for the net, its a good idea to have a look at which can be browsed by subject, date
PC parallel port (P16PRO), complete pages maintained by people who have or author.
with printed circuit board design and done research work. (985045-1)

24 Elektor Electronics 6/98


PIC & AVR
programmer
Hardware and software to program
PIC and AVR microcontrollers

The hardware and


Windows 95 soft-
ware discussed in
this article
enables you to
program
Microchips
highly success-
ful 16C84 and
16F84 microcon-
trollers, as well as Atmels AVR types
AT90S1200, AT90S2313, AT90S4414 and Its almost impossible to
think of modern electronics without
AT90S8515. All of these RISC beasts are in- microcontroller applications. Micro-
circuit programmable, and offer internal controllers have a vast number of appli-
cation areas, ranging from the PC
Flash/EEPROM program memory, static RAM, mouse to process control units, not
various input/output lines and another EEPROM only in industrial systems but also the
latest washing machines. Admittedly,
for the microcontroller to write to. very few of you will be interested in
developing their own washing
machine. However, applications that
do come to mind for home develop-
ment may include a timer-controlled
window shutter, an infrared controlled
Design by W. Schroeder garage door, a sound-to-light unit, or a

Elektor Electronics 6/98


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

C13
K8 IC2 5V 5V

1
C6
7805 5V 5V
R13 2
100n K2
C15 V+

10k
1 16
C2 C1 C3 C4 C7 C10 14 C1+
1
6 TXD5 3 IC7 6
100 100n 100n 10 100n 100n RB0 C1
25V 16V PD1 18 7 RXD5 11 14 RXD 2
RA0 RB1 T1IN T1OUT
PD0 17 8 CTS5 10 7 CTS 7
R5 RA1 IC8 RB2 T2IN T2OUT
PD2 1 9 PMISO 12 13 TXD 3
12V 10k RA2 RB3 R1OUT R1IN
IC6 PD3 2 PIC16C84 10 RTS5 9 8 RTS 8
RA3 RB4 R2OUT R2IN
78L12 BS250 R6 DEBUG 3 -10/P 11 PONL 4 C17 4
MCLR RA4 RB5 C2+
1k 12 PMOSI 9
4 RB6 MAX232
5V MCLR 13 AT RES 5 15 5
R4 R7 RB7 C2
C26 C24 C23 C27 T1 C16 V-

100k

4k7
OSC1 CLKOUT
R9 6
10 100n 100n 10
16 15 5 5V C14
U D1

100

270
25V 16V R8 C13 ...C17= 1 / 16V
X2
IC5c 6 14 5V
1N4001 C5
C20 C18 C19 IC5 5V K1
1 100n
5V IC5 = 74LS07 7 P1 1
R3 1 8x 1k 5 100n 18p 10MHz 18p
2

PD3
3
10k B3 RS 4
B2 R/W 5
PD1

PD0

PMISO
U

PONL

PMOSI
2 3 4 5 6 7 8 9 B1 EN 6
S4
7

IC5a IC5b IC5d 8 IC5e IC5f 8


1 3 11 12 5V
C9 9
1 1 1 1 1 10
A0 100n A0 11
2 4 9 10 13
A1 20 A1 12
B6

B7

B7

B5

B6
A2 A2 13
A0 2 12 B0
A3 PD0 PB0 A3 14
A1 3
PD1
IC9 PB1
13 B1
A4 15
A2 6 14 B2
A5 5V PD2 PB2 16
A3 7 15 B3
A6 PD3 PB3
14 A4 8
AT90 16 B4
PD4 S1200 PB4
S3 A5 9 17 B5
6 B0 PD5 PB5 K3
RB0 A6 11 18 B6 MCLR MCLR VPP
A0 18 7 B1 PD6 PB6
RA0 RB1 19 B7 B6 CLK
A1 17 8 B2 PB7
RA1 IC1 RB2 RESET 1 B7 DATA
A2 1 9 B3 RESET
RA2 RB3
A3 2 PIC16C84 10 B4 XTAL1 XTAL2
RA3 RB4 5V 5V
A4 3 11 B5 5 4 10
RA4 RB5
12 B6
5V MCLR 4 RB6 R10 5V
MCLR 13 B7 S5
R1 1 8x 1k RB7 K6
10k

RESET
OSC1 CLKOUT
B7
16 15 5
DEBUG B6
K4
270

R2 5V B5
2 3 4 5 6 7 8 9
S1 X1 X3 1
AT RES

T3 T2 R11 B0 2
C25
10k

C11 C12 C21 C22 B1 3


PD2
B2 4 5V
10n
18p 4MHz 18p 18p 4MHz 18p B3 5 K7
B0
BS170 BS170 B4 6
B1 B7
B5 7
B2 B6
B6 8
B3 MCLR
B0
B1
B2
B3
B4
B5
B6
B7

A0
A1
A2
A3
A4
A5
A6

B7 9
B4
10
B5 19 1 IC3 19 1 IC4
2 3 4 5 6 7 8 9 2 3 4 5 6 7 8 9
B6 5V
B7 & &
5V K5
S2 EN EN
1
A0 2
A1 3
74HC541 18 17 16 15 14 13 12 11 74HC541 18 17 16 15 14 13 12 11
A2 4
5V
D10
D11
D12
D13
D14
D15
D16
D2
D3
D4
D5
D6
D7
D8
D9

A3 5
A4 6
20 C8 20 9 8 7 6 5 4 3 2 9 8 7 6 5 4 3 2 A5 7
IC3 IC4 A6 8
10 100n 10 9
10
R14 1 8x 2k2 R12 1 8x 2k2 980049 - 11

Figure 1. Circuit dia-


gram of the program- belong in the class of less powerful but opt for Atmels AVR controllers. The
mer and programming also less expensive devices. These RISC smallest of these, the AT90S1200, was
socket adaptor IC9. controllers have an instruction set of already the subject of a project for
just over 30 instructions (hence reduced home construction (Ref. 1,2), and it
instruction set). They can be operated at may be compared, as far as computing
a clock frequency of up to 10 MHz, and power is concerned, with the PIC
digitally controlled laboratory power then offer a command cycle time of devices. The larger AVR controllers
supply. In these examples, processor 400 ns, which equals 1/4th the clock fre- offer additional features like an inte-
controls using more or less powerful quency. grated RS232 interface, a serial SPI
microcontrollers are a great option. When more computing power is interface, pulse width modulation, two
The PIC controllers type 16C(F)84 required, or more I/O pins, you should timers, up to 120 instructions, and so

Controller Clock RAM Progr.Flash EEPROM I/O TIMER RS232 SPI PWM
PIC 16C(F)84 10 MHz 36 B 1024 W 64 B 13 1
AVR AT90S1200 16 MHz 0 B* 512 W 64 B 15 1
AVR AT90S2313 20 MHz 128 B* 1024 W 128 B 15 2 X X
AVR AT90S4414 20 MHz 256 B* 2048 W 256 B 32 2 X X X
AVR AT90S8515 20 MHz 512 B* 4096 W 512 B 32 2 X X X
* + 32 8 Bit Registers

Elektor Electronics 6/98 27


IC2 IC6 R14 R12 on. The fact that these
2 D2 - - - - - - - - - D9 D10 - - - - - - - D16 devices process instructions

H1
H2

C1

D1
+
C4 at the full clock rate makes
C26 C8 them four times as fast as a
- C23
IC3 IC4 PIC, assuming the same
C24 C10
K8
C27 C3
clock rate is used.
R3
C2 R7 For comparison pur-

980049-1 980049-1
R4 R1
R5 T1 R6 S1 S4 poses, Table 1 lists the main

R13
K2
C14 features of the individual
microcontrollers. Currently,
S3
C16
S2 the best available microcon-

IC8

IC5
trollers are the PIC16F84,
IC7

C9
C13 AT90S1200 and AT90S8515
IC1 IC9
(max. 8 MHz).
C17

C7
C15
C6
C20 R2 K4 S5 K5
X2 R9 X1
HARDWARE
R8

C5 DESCRIPTION
P1 C25 C12
C19

K3 AND

X3
C11 K1
C18 K6 CONSTRUCTION
T2 R10 R11 K7 T The hardware and software
T3 presented in this article

H3
H4

C21 C22
allows you to program
Microchips PIC16C84/16F84
as well as all currently avail-
able (early 1998) Atmel AVR
microcontrollers (AT90S1200,
AT90S2313, AT90S4414,
AT90S8515). All RISC micro-
controllers supported by the
present design are in-circuit
programmable using a
shell called PICAVR32
which runs under Win-
dows 95. These controllers
offer an internal Flash/EEP-
ROM program memory,
SRAM, a plethora of
(C) Segment
980049-1

input/output lines and an


EEPROM to which the
microcontroller has direct
access.
Building the hardware
should not present difficul-
ties if you work carefully
and take your time. With the
possible exception of the
ready-programmed PIC in
the circuit, only commonly
available parts are used. The
firmware-code PIC, by the
way, is available ready-pro-
grammed, either directly
from the Publishers or
through kit suppliers adver-
tising in this magazine.
The hardware is
designed in such as way that
980049-1

PICs as well as the DIL-style


AT90S1200 and AT90S2313

Figure 2. Every-
thing fits on this
double-sided
through-plated
board (available
ready-made
through the Pub-
lishers).

28 Elektor Electronics 6/98


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

COMPONENTS LIST Capacitors: IC7 = MAX232


C1,C3,C5-C10,C20,C23,C24 = 100nF IC8 = PIC16C84-10/P (ready-pro-
Items available from the Publishers: C2 = 100F 25V radial grammed, order code 986509-1)
PCB, programmed PIC and disk, C4,C27 = 10F 16V radial IC9 = AT90S1200 to be programmed
order code 980049-C. C11,C12,C18,C19,C21,C22 = 18pF
Firmware PIC only, C13-C17 = 1F 16V radial Miscellaneous:
order code 986509-1. C25 = 10nF S1-S4 = 8-way DIP switch block
Project disk only, C26 = 10F 25V radial S5 = 4-way DIP switch block
order code 986019-1. X1,X3 = 4MHz quartz crystal
Semiconductors: X2 = 10MHz quartz crystal
Resistors: D1 = 1N4001 K1 = 16-way boxheader
R1,R3 = SIL-Array 8 x 1k D2-D16 = LED, low current K2 = 9-way sub-D socket (female),
R2,R8 = 270 T1 = BS250 angled, PCB mount
R4 = 100k T2,T3 = BS170 K3,K6,K7 = 6-way SIL pinheader
R5,R10,R11,R13 = 10k IC1 = PIC16C84/F84 to be pro- K4,K5 = 10-way boxheader
R6 = 1k grammed K8 = mains adaptor socket,
R7 = 4k7 IC2 = 7805 PCB mount
R9 = 100 IC3,IC4 = 74HC541 Diskette containing PICAVR32 pro-
R12,R14 = SIL array 8 x 2k2 IC5 = 74LS07 gram, order code 986019-1.
P1 = 10k IC6 = 78L12

chips may be programmed and tested firmware PIC, IC8. This chip responds the PIC chips S1.7 and S1.8 are
by inserting them in a DIL socket on by forwarding control commands set switched on. The other switches in S1
the programmer board. Mind you, up by the PC software either to the PIC and all switches in S4 should be on.
these are the chips you want to pro- or the AVR to be programmed (posi- All switches in S2 and S3 should be set
gram, not the PIC mentioned above tions IC1 and IC9 respectively). In the to off .
(containing the firmware code). present programmer both microcon- The /RESET line of an AVR chip is
In addition, all microcontrollers troller types are programmed serially controlled via transistor T2. The falling
may be programmed in-circuit via con- by way of an SP interface. For this the pulse edge at the /RESET pin is essen-
nectors K6 (AVR) and K3 (PIC), which is AVR chips employ I/O pins 5, 6 and 7 tial to initiate a programming sequence
particularly useful for the AT90S4414 on Port B (MOSI, MISO, SCK)). The on an AVR chip. Because the /MCLR
and AT90S8515 which come in a PLCC PICs are programmed via I/O pins 6 pin on PIC chips has to be at 12 V dur-
case. and 7 of Port B (CLK, DATA). To these ing programming, T1 is required in
The programmer board is powered programming signals should be added addition to T3 which arranges the
by a mains-adaptor (15 V, 500 mA) con- the supply voltage (GND, VCC) and actual resetting of the PIC. Normally,
nected to K8. When only AVR chips are the /RESET or /MCLR signals, all of T1 and T3 are both switched off. The
programmed, a 9-volt adaptor is suffi- which are also needed during pro- junction R5-R7 supplies a voltage of
cient because AVR devices do not gramming. All relevant signals are about 4 V, which arrives at the /MCLR
require an additional programming taken into account in the pinning of input of the PIC to be programmed,
voltage. The supply voltage is stabi- the in-circuit programming connectors via resistor R6. To reset the PIC, the
lized by a 7805 voltage regulator (IC2) mentioned above. When designing /MCLR pin is pulled to ground via T3.
and its satellite decoupling capacitors your own (application) circuits in The programming voltage is applied
C1-C4 for smoothing and decoupling. which this type of programming is to by switching on the p-channel MOS-
A 78L12 regulator (IC6) is responsible be employed, you should make sure FET. When the MOSFET conducts, it
for the extra 12-V PIC programming that collisions between the program- short-circuits R5, so that 12 V is applied
voltage. mer hardware and the target system to R6.
The heart of the PICAVR32 pro- hardware are avoided! In particular, be PICs to be programmed are clocked
grammer is PIC IC8, which contains sure to provide series resistors on the at 4 MHz other clock frequencies are
the firmware code and arranges all signal lines used during programming. also possible. For AVR chips a quartz
communication with two parties: at To prevent the risk of your own cir- crystal is available, and, as an alterna-
one side, the PC, and at the other side, cuits under test causing damage to the tive, a complete crystal-controlled oscil-
the microcontroller to be read or pro- programmer hardware, the latter con- lator.
grammed. The link with the PC is tains an open-collector driver type The DIP switches provide assis-
established using an ordinary 9-way 1- 74LS07 (IC5) as well as transistors T2 tance with the testing of input/output
to-1 sub-D extension cable (socket & and T3, which buffer all lines of the operations of the two microcontrollers.
plug). The well-known level converter firmware PIC, IC8. The use of open- Switches S1 and S4 connect 1-k pull-
type MAX232 (IC7) on the program- collector drivers does, however, neces- up resistors to all port lines, while S2
mer board changes RS232 voltage levels sitate the switching on of the DIP and S3 allow port input lines to be held
(12 V) into TTL/CMOS compatible switches for the pull-up resistors. For logic low. Users should take care not to
signals (5-V), and feeds them directly the AVR chips, the Port-B lines are use the input switched on port lines
to the corresponding I/O pins of the pulled up (S1.6, S1.7, S1.8), while for declared as outputs! Doing so (by acci-

Elektor Electronics 6/98 29


dent) may cause damage to the rele-
3 vant port of the PIC or AVR chip to be
programmed.
Low-current LEDs D2 through D12
indicate the port-line states. They are
controlled via IC3 and IC4.
The hardware when finished is
tested with the aid of a couple of spe-
cially written test utilities. First, how-
ever, lets have a look at the control
software running on the PC.

WINDOWS 95
CONTROL SOF TWARE
The software developed for the PIC &
AVR Programmer also enables assem-
bly code for PICs and AVRs to be
developed, programmed and read. For
this purpose, the program as well as
the EEPROM memory may be read
and written. You can get started with
the programmer once it is connected
up to the PCs serial port (via a 9-way
sub-D cable with no crossed wires),
and connected to its power supply. To
begin with, you should burn a PIC
with the file TESTPIC.ASM, or an AVR
chip with the file TESTAVR.ASM. In
addition to a controller test, all LED
outputs are checked with the aid of a
running light. Follow this procedure.

Launch PICAVR32
The PICAVR32 shell first looks for the
programmer hardware. When the
hardware does not report back, a mes-
sage reading No COM Port Selected is
indicated near the bottom of the
screen.

Select RS232 port


Select a free RS232 port using the
menu OPTIONS|COM PORT. When
the programmer hardware is found,
the status line reads PICAVR32 (PIC
Version x.x.) ready. The menu option
CONTROLLER is then accessible.

Load assembly-code file


Under File|Open, load the above men-
tioned assembler source code file.
Alternatively, use the FILE|LOAD
option to fetch a finished Hex(adeci-
mal) file.

Assemble file
Use FILE|START ASSEMBLER to
launch the assembly-code to object-
code translation.

Download object code


Next, the menu option CON-
TROLLER|DOWNLOAD PROGRAM
is used to actually program your PIC or
AVR chip. Provided no errors occur
during programming, the relevant

Figure 3. Some
screenshots showing
PICAVR32 in action.

30 Elektor Electronics 6/98


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

controller is started, and the LEDs on procedure and the relevant routines settings are very simple, because they
the programmer board act as a (slightly are discussed in greater detail in the only cover the Flash program protec-
mixed-up) running lights. PICAVR32 Help file. tion option. With PICs, the settings not
By selecting OPTIONS|SHOW only control the program memory and
OPTIONS ERRORS you enable the program to EEPROM protection, but also the con-
The software offers various optional display the assembler s error report figuration of the oscillator and the
functions in addition to the straight- file. The Error-Viewer is also opened power-up and watchdog timers.
forward load-file-and-program-away automatically whenever the assembler CONTROLLER|ERASE CON-
sequence outlined above. Help with writes an error entry in the Error file. TROLLER enables microcontrollers to
the individual menu options can be be cleared (erased). This option is useful
summoned up by pressing the F1 key. All functions found under the menu if you want to reprogram a read-pro-
The menus FILE, EDIT and HELP option CONTROLLER cover the tected PIC.
should be self-explanatory, so they are downloading/uploading of programs, CONTROLLER|START CON-
not discussed here. EEPROM and the internal configura- TROLLER performs a hardware reset
Under OPTIONS|CONTROLLER tions of the individual microcon- of the microcontroller.
you can select the controller to be pro- trollers. The individual functions are,
grammed. If the controller type is of course, dependent on the selected PROGRAMMING THE
included in the first line of the assem- microcontroller type. MICROCONTROLLERS
bly-code file, behind the semicolon, CONTROLLER|DOWNLOAD writes A discussion of the programming pro-
then it is automatically selected when a currently loaded hex file or the object tocols for the two rival microcontroller
the assembly-code file is loaded. code (resulting from a previously com- families is, unfortunately, beyond the
The OPTIONS|EDITOR menu entry piled assembly-code file) into the con- scope of this article. Those of you inter-
allows you to select editor cosmetics troller. PICAVR32 has an internal buffer ested in these matters are referred to
like font, colour and type, as well as for the object code to be written into the following publications:
background colour. the microcontroller. A hexadecimal file - Atmel AVR Enhanced RISC Micro-
OPTIONS|ASSEMBLER OPTIONS loaded using the FILE|LOAD INTEL- controller Data Book
serves to adjust the assembler and the HEXFILE32 option is also transferred - Microchip Datasheets DS30430A and
parameter required for calling the to this buffer, which has no graphics DS30189D.
assembler. For PIC devices you should display in PICAVR32.
use Microchip Assembler Release 1.4. For These publications not only contain
AVR devices, use AVRASM Version 1.1. FILE|SAVE HEX enables a controller extensive descriptions of the program-
Be sure to obtain the DOS versions of to be read, and its contents to be writ- ming algorithms and procedures rec-
these programs, which are not ten into a hex file. ommended by the respective chip
included on diskette 986019-1. They manufacturers, but also provide dis-
are, however, available free of charge CONTROLLER/UPLOAD reads the cussions on the controller structures
from the Microchip and Atmel Internet program memory in the microcon- and explanations of all assembly-code
sites. troller, and provides a window dis- instructions.
OPTIONS|AUTODOWNLOAD, playing the contents word by word in Finally, excellent support for the
when enabled, automatically launches hexadecimal notation. If a microcon- Atmel AVR series of microcontrollers is
a program download operation, fol- troller is read-protected an empty available from our advertiser Equinox
lowing successful source code assem- program memory is displayed (FFFFh Technologies.
bly. for AVRs, and 3FFFh for PICs). Output (980049-1)
OPTIONS|PIC DIFF DOWNLOAD is in the form of words, because each
enables a difference-file download for of the two controller families has its References:
PICs. It is particularly useful if only cer- own memory organisation. With PICs, 1. Electronic Handyman,
tain parameters of a program are to be the word length is 14 bits, with AVRs, Elektor Electronics December 1997.
modified, or just a couple of bytes. This 16 bits. 2. Programmer for
option is only available for PICs CONTROLLER|WRITE TO EEP- Handyman/AT90S1200,
because AVR chips have to be com- ROM enables you to modify individ- Elektor Electronics December 1997.
pletely erased before any program- ual bytes in the EEPROM range of the
ming of the program memory. microcontroller. The EEPROMs in the
OPTIONS|SLOW PC should be PIC and the AVR are organised byte-
switched on when using a sluggish PC wise.
not having a serial FIFO for the RS232 CONTROLLER|UPLOAD EEPROM
interface. Use this option if errors occur enables the complete EEPROM to be
frequently when downloading pro- read, and the contents to be displayed
grams. bytewise in hexadecimal notation.
OPTIONS|DEBUG MONITOR Under CONTROLLER|CONFIGURE
launches a Debugging monitor that CONTROLLER you can define the
alows hex values to be produced using basic configuration data of the relevant
a test-output routine. The Debugging microcontroller. With the AVR chip, the

Elektor Electronics 6/98 31


flat-panel displays
current & new technologies

Flat-panel dis-
plays have been
in use in televi-
sion receivers
and computer
monitors since
the early 1980s.
Strictly speaking,
all electronic dis-
play devices,
except the cath-
ode ray tube
(CRT) can be
classified as flat
panel types. But
Sony introduced
a flat CRT television (Trinitron) as early as 1982. What the world is waiting
for now is the thin flat-panel display, which can be hung on a wall like a pic-
ture. However, in spite of early optimism after its introduction some years
ago, lowering the cost of materials for the monolithic types and, more par-
ticularly, the assembly costs of hybrid devices have posed far greater prob-
lems in practical applications than originally expected.

By our editorial staff

Elektor Electronics 6/98


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

Electronic display devices can be


transparent
divided into emissive and non-emis- 1 electrode
sive types. The former include:
supply supply
voltage voltage
CRT (cathode ray tube); off on
PDP (plasma display panel);
ELD (electroluminescent display);
VFD (vacuum fluorescent display);
liquid-crystal
LED (light-emitting diode); molecules

and the latter, transparent


electrode
LCD (liquid crystal display); light light 980020 - 11a

ECD (electrochemical display);


EPID (electrophoretic image display);
SPD (suspended particle display);
TBD (twisting ball display);
PLZT (transparent ceramics display).

The CRT was invented in 1897 in Ger-


many (Braun); LCD watches were put
on the market in 1972 in the USA; an light
ECD clock was introduced in 1982 in
Japan (Seiko); an experimental PDP
TV was shown in 1978 in Japan off
(NHK); the light-emitting diode (laser) transparent
polarizer electrode polarizer
was invented in 1962 in the USA
(Nathan) and the first trial LED TV
was shown in 1979 in Japan (Sanyo).
Undoubtedly, the bulk of the devel-
opment work on flat-panel displays
has been, and still is, carried out in the
USA.
light
THE MARKET
The CRT display, which has the
longest history (101
years), is still the lead- Figure 1. Basic con- on
ing type both economi- struction of a liquid 980020 - 11b

cally and for display crystal display (LCD).


quality: it has almost 85 Liquid crystal is sand-
per cent of the world wiched between two
market. In 1997, hun- glass substrates and
dreds of factories all the construction is
over the world pro- completed by an air- tion of 14 in (13 in teristics, such as double refraction,
duced 68 million CRTs, tight sealing material viewable) displays optical rotation, dichroism, or optical
and this is expected to around the periphery. within the next year or scattering caused by the reorientation,
grow to 85 million by so. It is, however, is converted into a visible change.
the year 2001. unlikely that these The most widely used types of
Number two is the LCD, which has developments will bring down prices, LCD are the thin-film transistor (TFT)
about 10 per cent of the world market. particularly since many manufacturers and the super twisted nematic (STN).
In 1997, this type of display was man- of LCDs also produce CRT displays. Basically, each of these is a passive dis-
ufactured in about 30 factories world- play that uses the modulation of light
wide. The size of aperture (diagonal) LCD VS CRT within a liquid crystal cell. This cell
of most of these displays varies from From the point of view of the user, the consists of a layer of liquid crystal
10 in to 12 in (9 in to 11 in viewable). LCD technology has advanced to the about 10 m thick sandwiched
Larger sizes are possible, but they are point where an LCD can replace a tra- between two glass substrates on which
only made in small numbers because ditional CRT, at least as far as the are formed transparent electrodes.
these displays require new machinery, smaller apertures are concerned. Tech- Grooves are etched in the surface of
which is costly. Coupled with the fact nical developments have made possi- the electrode to impart a fixed orien-
that, owing to the explosion in the ble better resolution, (relatively) larger tation to the liquid crystal molecules.
notebook market, the demand far out- apertures and higher frequency (cur- The grooves on each of the electrodes
strips the production capacity, manu- rently up to 240 MHz). However, all point in the same direction and are
facturers are loath to spend vast sums LCDs still suffer from a limited view- used to direct the molecules mechani-
of money on new machinery while ing angle, a limited contrast range, and cally, that is, the long molecules follow
this situation continues. In 1997, the a higher price than comparable CRTs. the grooves. See Figures 1a and 1b.
market demand for these displays was Owing to inter-molecular forces
6.9 million, whereas production capac- PRINCIPLE OF LCD between the crystals, there is no, or
ity was only 4.3 million. In a liquid crystal display, the applica-
Nevertheless, some manufacturers tion of a voltage changes the molecu-
are busy modifying existing factories lar orientation of the liquid crystal, and * Nematic = having molecules or atoms ori-
or building new ones to start produc- the resulting change in optical charac- ented in parallel lines.

Elektor Electronics 6/98 33


this case, light is transmitted when
Super TFT LCD (IPS)
2 Analyzer
there is no voltage applied, and light
is blocked when a voltage is applied.
Between parallel polarizers, however,
Black matrix Counter substrate the relationship between transmission
and blocking of light is reversed. So,
Color filter twisted nematic LCDs provide a black
Liquid-crystal
display on a white background or a
Pixel electrode Electric white display on a black background.
molecule field
(metal) A colour LCD contains in addition
a colour filter for each pixel. Each of
Thin-film transistor these pixels consists of three tiny dots
(red, green and blue). This means that
a colour display has three times as
many pixels as might be expected on
the basis of the graphic resolution.
Thin-film-transistor Counter electrode The background of an LCD is a dif-
substrate (metal) fuse source of light, usually fluores-
cent, placed behind or at the side of
Polarizer the display. A diffusor ensures that the
light falls uniformly over the display.
A serious drawback of an LCD is
that relatively little light is transmitted:
in practice only 35 per cent. This poor
Conventional efficiency is caused partly by the polar-
thin-film-transistor LCD Analyzer izers (50%), and partly by the other
transparent layers, particularly the
Black matrix Counter substrate black matrix (30%).
Manufacturers are constantly seek-
Color filter ing to improve the efficiency, which is
particularly important for users of
notebook computers. In such comput-
Counter electrode
(transparent: ITO) ers, the life of the battery is already a
Liquid-crystal Electric matter of concern so that any improve-
Thin-film transistor molecule field ment in efficiency will be more than
welcome.
The company 3M has developed a
special foil on which millions of small
prisms are deposited. These prisms
Thin-film-transistor Pixel electrode ensure that as much of the light as
substrate (transparent: ITO) possible is incident at right angles.
Because of the bundling effect of the
Polarizer prisms, the power of the light source
Source: Hitachi Ltd. 980020 - 12
can be halved.

Figure 2. In an In- ACTIVE OR PAS SIVE


Plane Switching-mode Liquid crystal displays come in two
hardly any, random (IPS) or Super Thin orthogonal polarizers. main types: the inexpensive passive
movement of the mol- Film Transistor (TFT) When a voltage is types (STN = super twisted nematic),
ecules which all adopt LCD, the twisting of applied to a twisted and the more expensive active type
the same orientation. the crystal molecules nematic cell, from a cer- (TFT = thin film transistor).
The direction of the is arranged with two tain threshold voltage, In the STN device, the liquid crys-
grooves on one elec- electrodes positioned Uth, the molecule axes tal is controlled by a two-dimensional
trode is, normally, at at the same side of the begin to align them- matrix of conductors. These indium tin
right angles to that of device. selves with the electric oxide conductors are deposited on to
the grooves on the filed. When the applied the glass substrate. A potential applied
other electrode. In the voltage is about 2Uth, to the crossing of two conductors
STN type, the molecular axis of the liq- the majority of molecules have their changes the orientation of the crystal,
uid crystal rotates continuously axes realigned in the direction of the which results in a pixel. Since the
through 90 between the two sub- electric field, so that the 90 optical matrix is driven by the scan principle,
strates. Since the pitch of the twist is rotary power is eliminated. In this this method is relatively slow. More-
sufficiently large compared with the case, in completely the opposite fash- over, variations in the electric field dur-
wavelength of visible light, the direc- ion to the case when there is no volt- ing fast image changes (as when text is
tion of polarization of linearly polar- age applied, between parallel polariz- being scrolled or a cursor is reposi-
ized light incident vertically on one of ers, light is transmitted and between tioned) cause annoying shadows. The
the electrode substrates is rotated orthogonal polarizers, light will be contrast and the number of colours to
through 90 by the twist of the liquid shut off. be reproduced are limited.
crystal molecules as it passes through The basic operation as just In a TFT device, each pixel has its
the cell. Therefore, the nematic cell described is illustrated in Figure 1b. It own transistor cell (whence its name).
shuts off light when placed between is based on the electrooptic effect Transistor are deposited on one of the
two parallel polarizers and transmits when a twisted nematic cell is placed two glass substrates and can be con-
light when placed between two between two orthogonal polarizers. In trolled accurately and rapidly. This

34 Elektor Electronics 6/98


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

type of display is therefore very suit-


Plasma display
able for use with a large colour spec- 3
trum and rapidly changing images.
Owing to the amplification of the tran- Front glas
substrate
sistor, the strength of the electric field
across the cell is greater than attainable
with passive displays. This, in turn, Sustain
electrode
results in a better range of contrasts. Dielectric
layer
VIEWING ANGLE Bus
electrodes
One of the more serious drawbacks of
Magnesium
LCDs is their limited viewing angle of oxide layer Separator
1540. The larger the angle the display
is viewed at, the more restricted the Rear glas
contrast. This is particularly disturbing substrate
in the case of a colour display. To solve Phosphors (R) (G) (B) Address electrodes
this problem, a number of manufac-
980020 - 13
turers have introduced
a new technique, called Figure 3. A plasma display panel (PDP)
variously In Plane is a good alternative to the LCD, but it
Switching-mode (IPS) will take some time before this kind of
or Super TFT. This display will become commercially as well.
enlarges the viewing affordable. The basic layout of a PDP is shown
angle to almost 140 in Figure 3. In current models, a
(depending on the potential of some 100 V is applied to
manufacturer). the electrodes. It is expected that in
The new technique has the addi- 41 in wide TV screen. At present, the near-future models this voltage may
tional benefit of simplifying the pro- price of PDP displays is much too high be lowered to about 60 V and in later
duction process. The two electrodes for commercial exploitation, but it is models to about 10 V.
that switch a pixel are deposited on to expected that it will come down The life of a PDP is reckoned to be
the glass substrate together with the appreciably within the next few years. some 10,000 hours, comparable to the
transistor cell. This means that there is At the same time, there are still some life a typical television receiver.
no longer a potential across the whole fundamental problems to be resolved Although the picture on a current PDP
LCD, but only across the pixel. The is good, it is not good enough. Annoy-
arrangement is shown in Figure 2. ing grey ghosting appears frequently
In the quiescent with moving images.
state, when there is no Figure 4. In field emission displays, high
voltage across the pixel, electric fields strip electrons from the Field emission displays combine the
the molecules are in tips of the cathode (whereas in a cath- technology of the CRT with that of an
parallel with the ode ray tube thermionic emission is LCD. This results in the excellent pic-
grooves in the elec- used). The field-emitted electrons ture obtainable from a CRT repro-
trodes. Twisting of the excite phosphors that may be identical duced on a flat panel display. The basic
molecules within the to those used in CRTs, thus producing a layout of an FED is shown in Figure 4.
liquid crystal, as in Fig- CRT-like image in a flat, thin package.
ure 1, does therefore
not occur. The polariz-
ers, which are at right angles to one
another, ensure that light is blocked 4 Field-emission display
over a large viewing angle, that is, the One pixel
display is black.
When a voltage is applied, the mol- Glass face
Red Green Blue plate
ecules direct themselves according to subpixel subpixel subpixel
the electric field, which is at right
angles with the orientation of the mol-
ecules in the quiescent state. The Gate row line
stronger the electric field, the greater
the rotation in the crystal, and the Anode
more light is transmitted.
ITO layer
PDP & FED Red
Blue
phosphor
Two other important flat-panel dis- phosphor
plays are the plasma display panel,
PDP, and the field emission display Green
phosphor
(FED).
Cathode
The plasma display panel was first Resistive
introduced in a paper in the USA in layer
1954 (Skellet). The first trial colour PDP
TV was exhibited in 1978 by NHK in Microtips
Japan. More recently, Fujitsu of Japan Column line
Cathode conductor
and Philips of the Netherlands have
collaborated in the development of a Glass 980020 - 14

Elektor Electronics 6/98 35


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

5
15,1" 15,1"
12,1" 12,1" 12,1"

19" 19"

15,1" 15,1"

12,1" 12,1" 12,1"

980020 - 15

Figure 5. In the manu- Any size you want,


facture of LCDs, use is
made on the production as long as it is standard
line of material of fixed
dimensions. The use of In 1997, there were in the whole world only three factories produc-
other dimensions ing the latest generation of glass substrates for liquid crystal dis-
results in lower effi-
ciency (profit!) and it plays (LCDs) in sizes 550 650 mm. As shown by Figure 5, this
may, therefore, be size substrate is ideal for the production of LCDs with an aperture
some time before larger
aperture displays will of 12 in. The production of different (more particularly, larger) size
become available. substrates is not economically viable.

In principle, use is made of phosphors some time for use in good-quality tele- modifications ensure that the electron
that are ignited by an electron beam. vision sets and computer monitors. gun gives a sharp picture at the edges
The cathode consists of a strip of The development of the flat panel an in the corners of the tube, and min-
conducting material on to which tiny CRT over the past twenty-odd years imizes any distortion resulting from
cones (some 10,000 per pixel) are has been one of overcoming a great spreading of the electrons in the cor-
deposited. The cathode in this type of many technical difficulties. One of ners.
display fulfils the same function as the these was the design of a rugged, Other firms, such as Hitachi, Pana-
electron gun in a CRT. A potential of mechanical construction able to with- sonic, LG, Mitsubishi and Samsung
200800 V applied between the cath- stand the large forces resulting from have also developed flat panel CRTs
ode and anode ensures that the phos- the high vacuum inside the tube. Such which will shortly be used in 17 in and
phor is ignited to generate light. a large, heavy tube is difficult to man- 19 in computer monitors (and, of
The FED technology is new. Pre- ufacture, but is now produced from course, in smaller TV sets).
production models are available to glass that is also used for automobile [980020]
designers with aperture diagonals of windscreens.
56 in. Another difficulty was the use by
most manufacturers of a shadow mask
THE CRT FIGHTS BACK or aperture grill that ensures correct
So as to ensure their ruggedness division of the electron beam for the
(remember that there is a high vacuum three primary colours.
inside), cathode ray tubes are curved Sonys Trinitron uses a single
at the front. This curvature causes electron gun with three cathodes
some distortion in the picture and aligned horizontally, an aperture grille,
results in increased sensitivity to reflec- and vertically striped phosphors. The
tions in the glass. cathodes are tilted towards the centre
Flat panel type CRTs have been so that the electron beams intersect
around for some time, but only with twice, once within the electron lens
small apertures. However, Sonys focusing system and once at the aper-
Trinitron, RCAs beam-guide CRT, ture grille. This type of tube is there-
and Mitsubishis Diamondtron that fore much lighter and cheaper to pro-
are now available in aperture diago- duce than three-gun tubes.
nals of up to 50 in (full colour) are to The accuracy with which the elec-
all intents and purposes large size, flat tron gun can focus the electron beam
panel CRTs. Moreover, the recently is of vital importance for the quality of
introduced Wega FD Trinitron from the picture. New technologies have
Sony is a true flat panel CRT. Because made it possible to modify the electron
of the frontal flatness of these CRTs, gun to such an extent that focusing is
the picture can be seen at large view- improved greatly. This means that the
ing angles without loss of contrast or tube need not be made deeper. More-
colour resolution. Moreover, the CRTs over, the deflectors have been made
do not suffer from annoying reflec- larger, which further increases the
tions They have been available for accuracy of the beam. Other, smaller

Elektor Electronics 6/98 37


introduction to
digital signal processing
Part 6 Modulation
and demodulation
This sixth and final
instalment deals 45 H (f)
AM
with the subject of
modulation and signal
f
demodulation.
rectifier low-pass scope
980015 - 6 - 11
O2@@@@@@@?
O2@@@@@@@@@@@@@L
?O2@@@@@@@@@@@@@@@@@@1
O2@@@@@@@@@@@@@@@@@@@@@@@@@@L?
?O2@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@1?
?O2@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@?
?O2@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@?
O2@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@?
O2@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@?
?O2@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@L
O2@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@1
O2@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
O2@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@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@@@@@@@@@@@@@@@@@@0M?
3@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@0M
N@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@0M?
?@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@0M
?@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@0M? Part 5, we use experiment file XDE- There are other means of demodulat-
Before using the
?@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@0M?
?@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@0M?
?3@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@0M?
?N@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@0M
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@0M
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@0?@M

MOD3.SPP. The result is shown in Fig- ing an AM signal. In the discussion


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@0M?
3@@@@@@@@@@@@@@@@@@@@@@0M?
N@@@@@@@@@@@@@@@0?@M
?3@@@@@@@@@@0M
?V4@@0?@M?

programs on the ESPRESSO disk, copy ure 46. The low-pass filtering is neces- about amplitude modulation, it was
the entire folder from the CD-ROM to the sary to suppress any unwanted spec- seen that when a signal is multiplied
hard disk: the programs can then be run tral components of the signal. with the sinusoidal output of a local
from the hard disk. This procedure is oscillator (LO), the spectrum is shifted
also explained in the README file on the BBC REVISITED by the frequency of the LO. It is, there-
CD-ROM. The envelope detector may be used to fore, possible to restore the original
demodulate the 198 kHz BBC signal spectrum by a second multiplication.
When copying a file or folder under Win-
(file BBC188. WAV) with a local oscillator The corresponding experiment, XDE-
dows, its read-only setting is also (LO) frequency of 188 kHz, which MOD5.SPP is shown in Figure 47, and
copied. With many ESPRESSO programs, results in an intermediate frequency the result in Figure 48. If the LO signal
the read-only attribute causes an error (IF) of 10 kHz. This is done with file is exactly the same as that used to
report to appear, or graphics to disap- XDEMOD3.SPP, and the result is heard modulate the original signal, that sig-
pear. This problem is solved by using the with the use of file TMP4.WAV. When we nal can be regained by multiplication
Explorer, selecting all files in the study the spectrum of file BBC188.WAV and low-pass filtering (Figure 3 and
(experiment XDEMOD2B), we will note a Figure 4 top).
ESPRESSO folder on the hard disk, and
peak at 10 kHz, which is the converted Should the phase of the LO signal
clicking on file Properties. Remove the carrier (IF) of the signal, and a less pro- be 90 out of phase with the carrier of
check in the read-only box by clicking on nounced peak at 5 kHz. the received signal, there would be no
it. Close by pressing OK, whereupon The weak spurious IF of 5 kHz signal left after the low-pass filtering. It
everything should function normally. results from the mixing of the LO sig- is, therefore, essential that the LO is in
nal with the carrier of Europa 1 (trans- phase with the carrier of the AM signal.
mitting at 183 kHz). And, indeed, This is called synchronous or coherent
By Dr. Ing. M. Ohsmann when file BBC188.WAV is demodulated demodulation. When the two frequen-

40 Elektor Electronics 6/98


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

46

Figure 46. Amplitude-


modulated and
-demodulated signals.
cies are shifted in phase able to view a spectrum shifted into this range when it is
with respect to one range more precisely, it reduced to 300 Hz by mixing it with a
another, the in-phase and 90 phase is possible to shift it into the low-fre- frequency of 5.3 kHz.
shift states alternate in the rhythm of quency region and subject it to low- If we start with 40960 samples, 4096
the frequency difference, resulting in a pass filtering and downsampling. remain, and these resolve file XSPEC.SPP:
fluctuation of the volume of the audio In practice, this will be be done in the result is in Figure 49. The carrier
signal. For that reason, when a coher- the following manner. To resolve signal and the two signals at its left and right
ent detector is used, the receiver WD1L.WAV at about 5 kHz, that is, to (originally 57 kHz) are easily recog-
requires a circuit, for instance, a phase- obtain a resolution of about 0.5 Hz nized. The signal at a distance of
locked loop (PLL), to ensure that the with a DFT of 4096 samples, it is neces- 125 Hz is the ARI signal which is
frequency and phase of the LO signal sary to reduce the sampling rate of switched on when there is travel
are correct at all times. Although syn- 22050 by a factor 10. At 2205 samples/s, news. The other signal, at 34.93 Hz
chronous detection of amplitude mod- it becomes possible to display signals at from the carrier is the station identifi-
ulated signals is complicated, it pro- frequencies of up to 1.1 kHz. The cation signal that indicates in which
vides optimum results. 5 kHz signal from WD1L.WAV can be region the transmitter whose signal has

HIGH-RESOLUTION
S P E C T R U M A N A LY S E R
We have already seen that with the aid 47 tmp1
H (f)
scope
of an AM signal generator or by means
tmp2
of multiplication with a sinusoidal fre-
f
quency the spectrum of a signal may
be shifted. This principle is used in
sine
modern receivers to convert the input
signal into an intermediate frequency LO

(IF) signal. In a similar manner, it is AM local oscillator

possible to enhance the resolution of signal


our spectrum analyser programme
SPEC1. When the origi- cosine
nal signal is scanned at Figure 47. Synchro-
a rate of 22050 samples nous or coherent
H (f)
per second, using a demodulation with the tmp3
scope
DFT of 4096 samples, original carrier and tmp4
the result is an interval with a phase-shifted
f
of 5.3833 Hz between carrier.
adjacent samples. To be 980015 - 6 - 13

Elektor Electronics 6/98 41


48

Figure 48. Top: coher-


ent demodulation; bot- just been received is situated. By the two, there is no output. This phenom-
tom: synchronous way, when the first portion of the file enon may be made use of when an
demodulation with the WD1L.WAV is viewed, that is, when the AM signal with sinusoidal carrier and
local oscillator fre- message is not yet coming through, the a second carrier of the same frequency
quency shifted by 90. 125 Hz peak will not be found, since but cosine shaped are used. It is then
the message recognition modulation is possible to convey both signals via the
then not yet actuated. same channel (Figure 50) and to
demodulate them with suitable LO fre-
QUADRATURE quencies into their original shape. This
MODULATION AND is simulated in experiment XDEMOD4.
DEMODULATION SPP. In this, the first signal is a triangu-
The discussion on coherent demodu- lar one and the second, a sinusoidal
lation showed that the phase of the one. Modulating processes that use
Figure 49. High defini- local oscillator signal must be equal to sinusoidal and cosinusoidal carriers
tion spectrum of the that of the carrier frequency, and that simultaneously are called quadrature
57 kHz subcarrier for if there is a phase shift between the processes. The main carrier and its con-
the ARI signal. stituents are normally identified by the
letter I (In-phase) and the other with
the letter Q (Quadrature).

49 RDS DETECTION
A practical application of quadrature
demodulation is found in VHF and
UHF radio. A car radio, for instance, is
switched on or off when travel news is
broadcast on a 57 kHz subcarrier. This
is amplitude-modulated with an audio
frequency of, say, 125 Hz when travel
news is being broadcast. This is the I
constituent.
Today, the same channel is used for
the radio data system (RDS). To pre-
vent the ARI and RDS signals affecting
one another, the subcarrier for the RDS
is 90 out of phase with the main car-
rier. This means that the RDS data are
conveyed in the Q constituent. Experi-

42 Elektor Electronics 6/98


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

ment XRDS2.SPP simulates the ARI and I-part low-pass


RDS demodulator in Figure 51. The 50
phase of the LO signal is normally con- signal 1
H (f)
signal 1
tmp3
trolled by a phase-locked loop (PLL) to
tmp7
ensure that it is correct with reference
f
to the carrier. The demodulated signals
may be seen in Figure 52. The upper
signal represents the sinusoidal station sine sine

identification signal (34.93 Hz, while carrier LO


oscillator local oscillator
the lower one shows the RDS signal. channel
tmp5
FREQUENCY
MODULATION cosine cosine
In amplitude modulation, the modu- low-pass
lating signal is shifted in the frequency
H (f)
band by the carrier. In frequency mod- signal 2 signal 2
ulation, however, the modulating sig-
tmp9
nal, s(t), modifies the frequency of the mixer f
carrier. The transmitted signal is
Q-part 980015 - 6 - 16
y(t) = cos[2 fCt + s(t)].

Strictly speaking, this treats frequency Figure 50. Composition Figure 51. This is how
modulation as a variation of phase of a system for quadra- the ARI and RDS sig-
modulation. There is then no longer a ture modulation. nals are demodulated.
simple connection for calculating the
spectrum of the transmitted signal.
Even with a sinusoidal signal, the spec-
trum soon becomes fairly complex: 51 H (f)
ARI

y(t) = cos[2 fCt + cos(2 fMt)].


f

Figure 53 shows the spectra when the fC = 1500 Hz

carrier frequency, fC = 2000 Hz, the


modulating frequency, fM = 100 Hz or
200 Hz, and = 2.4048 or 4.0. It will be ARI + RDS

noted that single spectral frequencies


occur at a distance fM from the carrier.
The carrier itself must not be present in
the signal. The magnitude of the single
frequencies may be calculated with
H (f)
Bessel functions. Note that the FM RDS
spectrum of a transmitted signal is
wider than that of the modulating fre-
f
quency. Although the audio band-
width is only 15 kHz, the FM spectrum fC = 7500 Hz
980015 - 6 - 17
extends up to 150 kHz from the carrier.
It is this aspect that makes an FM sig-
nal less vulnerable to interference,
since the narrow-band interference Figure 52. Top: demodulation of
affects only a small part of the FM the ARI signal; bottom: demodu-
spectrum. The requisite Carson band- lation of the RDS signal.
width is calculated from the band-
width and the energy of the modulat-
ing signal.

WARBLE SIGNAL
52
The CD-ROM accompanying the
course contains an example of a simple
FM signal with sinusoidal modulation.
In Germany, ARD (Arbeitsgemein-
schaft der ffentlich-rechtligen Rund-
funkanstalten der Bundesrepublik
Deutschland or, simply, Germany I)
transmits a special signal to indicate
the onset of travel news. This consists
of a 2350 Hz carrier that is frequency
modulated at 123 Hz with a modula-
tion index of 1. See Figure 54.
[This is, of course, of no interest to
readers in the UK, where the BBC and
Independent Radio Stations provide a

Elektor Electronics 6/98 43


53

Figure 53. FM spec-


trum when the modu-
lating signal is sinu-
travel service under soidal. will increase a little to EON Enhanced Other Networks
TP/TA and EON. draw the drivers atten- provides a cross reference to other sta-
When the traffic mode tion to the tions for the Travel Service, and other
is selected on a receiver, it will switch bulletin.When used in conjunction features.
over to the local station when Travel with EON, the TA/TP mode allows lis- Editor]
News is broadcast. tening to BBC National
Cassette or CD listen- Figure 54. FM spec- stations to be inter- RADIO TELETYPE
ing will also be inter- trum of the special rupted with travel The radio teletype service invariably
rupted, and typically (warble) signal trans- reports for the area from uses frequency shift keying (FSK) to
the voluem of the set mitted in Germany BBC Local stations. convey teletype signals. Such a signal
ahead of travel news.

54

44 Elektor Electronics 6/98


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

(see Figure 55) has a quiescent state, START BIT STOP BIT
marked SPACE, which pertains when 55
the teletype service is not active. A sin-
gle character begins with the START BIT,
at which the signal transfers to the
MARK state. The start bit lasts, in case of
a transfer rate of 50 symbols, 1/50 = 0 1 1 0 0
20 ms. This is followed by the data bits. MARK = 850 Hz
The old Baudot code (which is still
used here and there) uses five bits to
represent 64 alphanumeric characters.
Each bit has the same length as the SPACE = 1300 Hz
start bit. These are followed by a STOP
BIT that lasts 1.42 data bits whereupon
the system is in state SPACE. There then 20 ms
leader bit
follows a fairly long pause (asynchro- BIT = 0 = MARK
nous transfer), after which the data bit
stream is continued BAUDOT character "8" = 00110
980015 - 6 - 21
In FSK, the MARK state is given a fre-
quency of 850 Hz, and SPACE one of Figure 55. Typical
1350 Hz. The signals are transmitted in radio teletype signal. Figure 56. Configura-
line with the prevailing state by means tion of a filter decoder
of, for instance, a voltage-controlled for radio teletype sig-
oscillator (VCO). The distance between 850 Hz nals.
the two frequencies is called the SHIFT. 56 band-pass

File RTTY1.WAV contains such a signal tmp1 tmp3


which has a rate of 50 bit/s, MARK = Schmitt
low-pass trigger
850 Hz and SPACE = 1350 Hz. The spec-
trum of the teletype signal may be gen- tmp.wav tmp5 tmp6 BITS
rectification
erated with experiment XRTTY1.SPP. This 1300 Hz tmp7
band-pass
shows two conspicuous peaks at the
SPACE and MARK frequencies. Since tmp2 tmp4

these signals are well within the range


980015 - 6 - 22
3003400 Hz, they are readily con-
veyed via a radio telephony channel.
Figure 57. Signals in
the filter decoder.

57

Elektor Electronics 6/98 45


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

58

Figure 58. Decoded text


of a radio teletype sig-
RADIO TELETYPE acronym for Elektor Electronics Signal nal.
DECODING PRocessing Experiments and Simula-
An FSK-modulated signal may be tion SOftware. With the knowledge
decoded by a traditional filter decoder gained by the course, readers will be
as shown in Figure 56; it has been able to conduct these experiments
done so in Experiment XRTTY6.SPP. The without further discussion. Neverthe-
resulting waveforms are shown in Fig- less, a small help programme is con-
ure 57, while the decoded text is given tained in file EXPS.DOC.
in Figure 58. The preferred test text is [980015-6]
the character string RYRYRYR since this
contains the fastest bit conversion
(XRTTY5.SPP). Additional experiments on the CD-ROM
Single-sideband generation
F I N A L LY Filter method and phase method
Although this is the end of the six-part Single-sideband demodulation
course, there are a number of aspects Phase modulation
that, owing to shortage of space, have AMDS
not been discussed. Experiments rele- BBC
vant to some of these are listed in the Terrestrial meteorological broadcasts
box and contained on the CD-ROM Satellite meteorological broadcasts
accompanying the course. The title of Time signal broadcasts
the disk (see Readers Services towards DTMF (dual tone multiple frequency)
the end of this issue) is ESPRESSO, an

Elektor Electronics 6/98 47


discharge circuit
for 1.2 V sintered NiCd batteries
Developments in the
world of rechargeable
batteries, and the new
models that have
appeared in recent
years, such as the
metal hydride battery
and the lithium-ion
battery, are mainly of
interest in the elec-
tronics industry. Many
experimenters, hob-
byists and other ama-
teurs have stuck to
NiCd cells and batter-
ies, which have now
been with us since
the 1950s. The main
reason for this popu-
larity is probably their
user-friendly behav-
iour (which is
exceeded only by sealed lead-acid batteries). Another factor in favour of
the NiCd battery is its low internal resistance (at least as far as sintered
types are concerned), which enables it to provide fairly large currents
(but not as high as lead-acid batteries).
The nickel-cadmium battery is any circumstances. The present circuit
mechanically rugged and long-lived. It is, therefore, primarily intended for use
has excellent low-temperature charac- with sintered NiCd 1.2 V cells.
teristics and can be hermetically sealed.
Cost, however, is higher than for the LOW INTERNAL
lead-acid or nickel-zinc battery. In RESISTANCE
many applications, the use of a sealed The ability of NiCd batteries to provide
lead-acid battery is to be preferred over fairly large currents (because of their
the other two types. low internal resistance at least as far
A slight drawback of a sintered as sintered types are concerned) is an
NiCd battery is its so-called memory important factor for the amateur frater-
effect, which is fortunately completely nity, since many home-made model
reversible. It should be noted that mass units draw fairly large currents. As a
plate nickel-cadmium cells and batteries comparison, the d.c. resistance of three
Design by K Walraven do not develop the memory effect in types of fully charged 1 Ah, 1.2 V

Elektor Electronics 6/98


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

sealed cell is comprising the battery.


Correct discharging can only take 1 R1 R2 R3 R4
Standard 110 m/cell place via a circuit that arranges for the

47

100

100

47
L1
Heavy duty 50 m/cell battery to be discharged to a certain D2

Sintered 19 m/cell level and then disconnects it from the C1 C2


BT
discharge circuit. 4mH7
220n 470n D1
The diagram of such a circuit see
ENVIRONMENTAL Figure 1 is pretty straightforward. BAT85
EFFECTS Nevertheless, such a discharge circuit
T1 T2
One of the most serious drawbacks of does the job correctly. It causes a bat-
NiCd batteries is their effect on the tery to be discharged to a level of
2x
environment. This type of battery con- 650 mV. This level ensures that the bat- BC639
tains cadmium which is toxic. In most tery is correctly discharged without the
980050 - 11
countries, discarded NiCd batteries are risk of polarity reversal. The battery is
dumped on the rubbish heap where not discharged at a constant current,
they remain toxic for a very long time. but in short bursts. This allows the bat- Figure 1. The circuit is basically
It is true, of course, that their life of tery to recover during the intervals, an astable multivibrator oscillat-
some 500800 charge/discharge cycles which, in practice, has been found to ing at a rate of 25 kHz.
does not cause millions of them to be extend its useful life.
disposed of on the rubbish heap. Nev- During the discharge, an LED lights
ertheless, this was a very important fac- to show that the process is continuing.
tor in the decision of manufacturers in Since the diode cannot work from a

-
general to discontinue the use of NiCd voltage of 0.651.2 V, the voltage has to 2 980050-1
R1
batteries in most consumer products. be raised. To this end, the astable mul- R2
tivibrator formed by T1 and T2 oscil-

C1
MEMORY EFFECT lates at a rate of 25 kHz. When T2 is on,
Another disadvantage of sintered (not current flows through inductor L1, so
mass plate) NiCd batteries is, as that energy is stored in the magnetic

T2 C2

T1
already mentioned, their memory field. When T2 is off, the inductor is
effect. This manifests itself in the cell discharged via the LED, whereupon

1-050089

980050-1
R3
retaining the characteristics of previous this lights.

tnemgeS )C(

(C) Segment
R4
cycling. That is, after repeated shallow- Diode D1 prevents the energy
D1
depth discharges the cell will fail to stored in the inductor from leaking
L1
provide a satisfactory full-depth dis- away via the base of T1. This might

D2
charge. Note, however, that Eveready happen because the capacitors in the

+
cylindrical nickel-cadmium cells are circuit have fairly high values, whereas
particularly noted for their lack of the resistors have low ones. The cho- Figure 2. The discharge circuit is
memory effect. sen values ensure that the discharge intended for 1.2 V batteries. If
The memory effect is a nuisance, current is sufficiently high. When the several of these, or a 9 V
because it means that a battery with a battery voltage is 1.2 V, the discharge rechargeable NiCd battery, have
nominal capacity of, say, 600 mAh, after current is some 200 mA; at 0.8 V, it has to be discharged, an appropriate
a number of charge/discharge cycles dropped to about 100 mA, and at number of PCBs are needed.
has a useful capacity of only 300 or 400 0.65 V to around 50 mA. When the bat-
mAh. This has nothing to do with the tery voltage drops to 0.65 V, the dis-
life of the battery: even a new battery charge process is discontinued.
if charged as stated will soon lose part Parts list
of its capacity. CONSTRUCTION Resistors:
Fortunately, this reduction in capac- The tiny circuit is best built on the R1, R4 = 4.7
ity can be prevented fairly simply. printed-circuit board shown in Fig- R2, R3 = 100
Moreover, batteries that already suffer ure 2, but this is not available ready
from the memory effect can be made. However, a small prototyping Capacitors:
C1 = 0.22 F
restored to their nominal capacity. The board will do very nicely as well.
C2 = 0.47 F
cure is simply to ensure that a battery Inductor L1 is a small choke which
is occasionally fully discharged before should be readily available from most Inductors:
it is recharged. Occasionally means electronics retailers. L1 = choke, 4.7 mH
before every third or so recharge. Note The LED should be a high-effi-
that there are chargers on the market ciency type, while, because of the Semiconductors:
that have the discharge facility built in, threshold discharge voltage, D1 must D1 = BAT85
but this will certainly not be the case in be a Schottky type. D2 = LED, red, high efficiency
T1, T2 = BC63
the less expensive types.
USAGE
CORRECT There is not much that can be said
DISCHARGING about using the discharge unit. It is sim-
There is no need for extensive circuitry ply a matter of connecting the 1.2 V bat- will be fine.
to discharge a battery: a simple resis- tery with correct polarity, checking that If a battery is suspected of suffering
tor or light bulb will accomplish it the LED lights, and disconnecting the from the memory effect, discharge and
readily. It is, however, necessary to battery when the LED goes (or is) out. recharge it two or three times in suc-
keep an eye on the discharge time, In general, the discharge period will cession. This action will in almost all
because otherwise there is the risk that normally be three to four hours. As cases restore the capacity of the battery
the battery is discharged beyond a cer- mentioned before, the battery does not completely (commensurate with its life,
tain voltage. When this happens, it need to be discharged fully before it is of course).
may cause polarity reversal in the cells recharged: before every third recharge (980050-I)

Elektor Electronics 6/98 49


AM/FM
Receiver IC
APPLICATION NOTE

for digital tuning


1

The U2514B is an
integrated bipolar
radio circuit suitable
for digital tuning sys-
tems. It contains an
FM front end with pre-
Figure 1. Block schematic of the
amplifier and FM Type U2514B AM/FM Receiver IC.
stereo decoder as
well as a complete
AM receiver and Features:
FM wideband AGC
demodulator. Stop-
manufacturers
not
from manufacturers
does not

LO buffer for digital tuning


signal generation is
and does

Integrated stop-signal generation for AM and FM


implemented for FM
their representatives and

Adjustable stop-signal sensitivity


consultants.
Electronics or its consultants.

and AM mode. The Automatic stereo-mono blend


received from

circuit is designed for High cut


information received

Mute function
use in small radios,
Pilot canceller
or their
imply practical experience by Elektor Electronics
on information

power packs and mul-


Supply voltage range 312 V
industries or

timedia applications.
electronics industries
based on
is based
and electronics

PIN DESCRIPTION signals the input alternating current is


note is

The FM preamplifier input, FMIN (pin bypassed via the wideband AGC tran-
this note

28) see the block diagram in Fig- sistor. A capacitor (C18 in Fig-ure 2), is
electrical and
content of this

ure 1 consists of a transistor connected between pins 2 (FMAGC) and


the electrical

grounded-base circuit that provides 4 (GNDRF) to smooth the AGC voltage


The content

excellent noise performance and large and to shorten the transistor base to
signal behaviour. It is recommended to ground (pin 4). A tuned r.f. (radio fre-
connect a source impedance of 100
in the

quency) circuit is connected between


in

to achieve optimal performance. The pins 3 (FMRF) and 27 (VS). The amplified
direct current through the amplifying r.f. signal is fed internally to the mixer
transistor is reduced by the internal input.
A Telefunken Semiconductors automatic gain control (AGC). This The FM local oscillator consists of a
Application means that in the case of large input transistor in a grounded-collector con-

Elektor Electronics 6/98


50
2

Figure 2. Typical
application of the
U2514B circuit in
conjunction with a
Type U4285B phase-
locked loop.

Parts list C2 = 0.015 F Integrated circuits:


Resistors: C3, C21, C23 = 10 pF IC1 = U2514B
R1 = not used C4 = not used
R2, R17 = 100 k C5, C18, C28, C29, C30, C65, C70, C71, Inductors & filters:
R3, R4 = not used C73 =0.1 F L1 = not used
R5 = 330 k C6, C14 = 10 F L2 = Toko 7PH-Type A119ACS-19000Z
R6, R7 = 5.1 k C7 = 0.47 F L3, L4 = Toko 7KL Type 291ENS2054IB
R8 = 150 k C8, C16, C26, C69 = 100 pF L5 = Toko 7P Type A7BRS-12938X
R9 = not used C10 = 0.0068 F L6 = Toko 7PH Type A119ACS-18999N
R10 = 33 k C11 = 0.068 F L7 = Toko 7P Type 7MC-312162NO
R11 = 6.8 k C12, C13, C67 = 0.01 F CF1 = Murata CSB456F10
R12 = not used C17 = not used CF2 = 10.7 MHz ceramic filter, BW
R13, R14, R61 = 56 k C19, C20, C68 = 0.0022 F 180 kHz or 150 kHz
R15, R16, R19 = 10 k C22 = 22 pF CF3 = 455 kHz ceramic filter
R18 = 470 C24 = 390 pF AM capacitance diodes = Toko
R20 = not used C25, C61, C64, C72 = 100 F KV1591A-2
R21 = 1.8 k C27 = 180 pF AM bar antenna:
R22R59 = not used C31 = 15 pF LW1 = 220 H (59 turns, 100.04 flex
R60 = 220 C32 = 3.9 pF wire)
R62 = 5.6 k C33C60 = not used Rpw2 = 25 k (23 turns) if w1 circuit is
R63 = 22 C62, C63 = depends on crystal in resonance at 1 MHz)
R64, R65 = 12 k C66 = 270 pF Ferrite material: diameter 10 mm, length
RP1 = 20 k preset potentiometer CT1, CT2 = 15 pF trimmer 80 mm
RP2 = not used
RP3 = 100 k Semiconductors: Miscellaneous:
CD1, CD5 = KV1591A-2 X = crystal, 4 MHz
Capacitors: CD2 = not used
C1 = not used CD3, CD4 = BB814

Elektor Electronics 6/98 51


mute function, and search sensitivity,
3 are selected by applying a control volt-
age to pin 22 (CTRLA). If this voltage is
higher than 800 mV, the receiver circuit
is in the reception mode, otherwise in
the search mode. When the voltage is
between 800 mV and 1.3 V, the audio
frequency (AF) level at pins 18 and 19
(OUTR and OUTL respectively) is
reduced (mute function). In the search
mode (0700 mV), the voltage level
determines the degree of the search
sensitivity.
The signal at pin 23 (CTRLB) indicates
stereo or mono reception: stereo if the
voltage is higher than 1.2 V, otherwise
mono. Furthermore, it is possible to
force the receiver circuit to mono by
applying an external voltage <800 mV
to pin 23. If the search mode is selected,
the low active stop signal appears at
pin 23. If output CTRLB is applied
Figure 3. Block dia- directly to the I/O port of a microcon-
gram showing the troller, its high level must be adapted
figuration. The nega- U2514B interfaced with (AMSADJ) to ground. by linking pin 23 to ground via a suit-
tive resistance at the a microcontroller. An external resistor able resistor.
base of the transistor is (R19-RP3 in Fig. 2) An internal voltage regulator gen-
generated by an external capacitor (C21 between pins 9 (AMSADJ) and 14 VREF) erates a stable reference voltage of
in Fig-ure 2) between pins 5 (FMOSCE) permits the alignment of the stop-sig- 2.4 V, which is needed for all function
and 4 (GNDRF). Another external capac- nal centre frequency. The width of the blocks of the IC. An external capacitor
itor (C22 in Figure 2) is connected stop window is typically 1.2 kHz. If AM (C29 in Figure 2) must link pin 14 to
between pins 6 (FMOSCB) and 5 search mode is not actuated, the pin is ground in order to achieve stability
(FMOSCE) to increase the resistance at pulled to ground internally. and noise suppression.
the emitter and to lead to a higher The input impedance of the AM IF When pin 26 (AMFM) is linked to
oscillator swing. The negative resis- amplifier is 3.3 k in accordance with ground, the receiver circuit is switched
tance at pin 6 is about 250 . Conse- to the required impedance of most to the AM mode; if the pin is open, the
quently, the resonant LO (local oscilla- ceramic filter. The input refers to VREF FM mode is selected. Switching
tor) tank resistance of about 5 k, (pin 14). between these two states may be per-
which depends on the Q(uality) factor The input impedance of the FM formed by a microcontroller with
of the coil, is transformed to this mag- IF amplifier is 330 in line with the open-drain I/O ports. A capacitor (C30
nitude via a capacitor. required impedance of most FM in Figure 2) must be connected
A resistor (R8 in Fig. 2) is connected ceramic filters. The input refers to GND between AMFM and ground for FM
between pins 8 (OSCOUT) and 14 (VREF) (pin 16). mode operation. It serves for smooth-
which determines the amplitude of the A tank circuit (L2-R11-C16 in Fig- ing the control voltage of the pilot can-
oscillator voltage that is fed to the PLL ure 2) is connected between pins 15 celler.
(phase-locked loop) circuit. The Tele- (FMDET) and 14 (VREF). The discrimina- A ceramic resonator of 456 kHz par-
funken U428xBM family of PLL circuits tor coil must be adjusted so that the allel resonance frequency (at 30 pF on-
is recommended as members of this voltage at pin 11 (AFSM) is 1.2 V at chip load capacitance) is connected
family offer a high signal-to-noise ratio 10.7 MHz to ensure that the FM stop between pin 20 (CERES) and ground
and low current drain. signal is generated correctly. (necessary for the pilot regeneration).
The AM antenna coil is connected A capacitor (C28 in Figure 2) is con- It should be mounted very close to
between pins 1 (AMIN) and 14 (VREF). To nected between pins 11 (AFSM) and pin 20 to avoid spurious radiation. In
ensure that the AGC operates correctly, a GND for smoothing the FM audio out- AM (VAMFM <1.1 V) search
coil impedance of about 25 k is put. As the deviation of the FM signal (VCTRLA<800 mV) mode, the resonator
required. The AM oscillator must be (max. 75 kHz) might be greater than is used for stop-signal generation. The
loaded by an external tank referred to the stop-signal window (42 kHz), FM parallel resonance frequency is then
VREF. audio output smoothing is necessary to reduced to 455 kHz by adjusting the
The IF output (IFOUT pin 10) of generate a modulation-independent current into pin 9.
both the AM and the FM mixer has to be stop signal. In AM search mode, C28 A phase-locked loop (PLL) circuit is
loaded into external IF tank circuits smoothes the FM demodulated AM IF used for the pilot regeneration of the
referred to VREF. The Q-factor of the IF signal. stereo decoder. Therefore, a loop filter
coils must be not lower than 50 . The METER pin (17) is driven by a formed by network R5-C10-C11 is con-
The ceramic resonator of the stereo current that corresponds to the level of nected between pin 21 (LPF) and
decoder PLL circuit is used as a stop-sig- the FM IF or AM IF signal. The required ground.
nal detector for AM signals. For this pur- external load consists of parallel net- The multiplexed signal is applied to
pose, the parallel resonance frequency work R8-C14 (see Figure 2). The voltage pin 24 (MPXIN) and thence fed to the
of the resonator, which, unloaded, is at this pin controls the high cut and stereo decoder. The input resistance at
about 456 kHz, is reduced by an inter- mono/stereo blend function in the this pin is about 10 k. It is recom-
nal load capacitor to 455 kHz. It is reception mode. These functions may mended to align the channel separa-
important that the AM IF is 455 kHz. be modified by the designer by choos- tion by an RC network between MPXIN
The internal loading capacitor is ing different values of the load resistor. and MPXOUT (pin 25) owing to toler-
defined by the current through pin 9 The reception mode, search mode, ances in the group delay of the IF filter.

52 Elektor 5/98
Pin Symbol Function AM FM
1 AMIN AM antenna input VRef High impedance
2 FMAGC FM AGC time constant VRef VRef 80 mV
3 FMRF FM RF tank High impedance VS / 0 to 1 mA
4 GNDRF Ground RF GND GND
5 FMOSCE FM oscillator emitter VRef 2VBE / 0 A 0.95 V
6 FMOSCB FM oscillator base VRef VBE / 0 A 1.7 V
7 AMOSC AM oscillator VRef /0.3 mA High impedance
8 OSCOUT Buffered AM/FM oscillator output VRef /0.3 mA VRef /0.7 mA
9 AMSADJ Current input for AM stop-signal adjustment AMsearch=VBE, AM=0.1 V 0.1 V
10 IFOUT AM/FM IF output VS /in 50 A VS /in 0.4 mA
11 AFSM AF smoothing 0.8 to 1.2 V 1.2 V
12 FMIFIN FM IF amplifier input VBE to GND/ 0 A VBE to GND
13 AMIFIN AM IF amplifier input 3.3 k to VRef 3.3 k to VRef
14 VREF Reference voltage input VRef = 2.4 V VRef = 2.4 V
15 FMDET FM discriminator VRef /1 A VRef /0 A
16 GND Ground GND GND
17 METER Field-strength output 0 to 2,3 V 0 to 2 V
18 OUTR AF output right 0 to 2.3 V/0.15 mA 0 to 2.3 V/0.15 mA
19 OUTL AF output left 0 to 2.3 V/0.15 mA 0 to 2.3 V/0.15 mA
20 CERES Ceramic resonator 456 kHz for AM search and for pilot-PLL in FM mode 0,1 to 2.3 V 0.1 to 2.3 V
Low-pass filter for pilot-PLL AM 0.2 V -
21 LPF
Low-pass filter for pilot-PLL AM search and FM 0.5 to 2 V 0.5 to 2 V
22 CTRLA Control input for mute, search mode and search sensitivity 0 to VRef 0 to VRef
Control input for forced mono, Control output for stop function,
23 CTRLB 0.1 V to VS ,30 k 0.1 V to VS, 30 k
Mono/stereo information
24 MPXIN Stereo decoder MPX input 0.8 V 0.8 V
25 MPXOUT AM/FM MPX output 0.8 to 1,2 V 1.2 V
26 AMFM AM/FM switch and pilot canceller time constant GND 1.54 V
27 VS Supply-voltage input 3 to 12 V/in 5 mA 3 to 12 V/in 9 mA
28 FMIN FM antenna input VRef VBE /0 A 1.5 V

To drive both the compensation pled out at the mixers output and fed in the stereo or mono mode. When the
network to pin 24 and an optional RDS via a ceramic filter to the demodulator. control voltage applied to pin 23 <1.1
(radio data service), the output imped- The demodulated audio signal is avail- V, the receiver is forced to mono.
ance at pin 25 (MPXOUT) is low. The able at pin 25 (MPXOUT) In the search mode (VCTRLA<0.8 V),
direct voltage is 1.2 V in FM mode In the AM mode, the signal is fed the internally generated stop signal is
(depending on the discriminator coil directly to the mixer. The antenna available at pin 23 as a low active sig-
alignment) and 0.81.2 V in the AM impedance must be higher than 25 k nal.
mode (depending on the signal level). to ensure correct operation of the level If both conditions
The open-collector output at pins 18 control in case of large signals. The LO
and 19 (OUTR and OUTL respectively) signal is generated by an integrated for AM: VMETER>VCTRLA
requires and external resistor to oscillator. The buffered LO signal is
ground (R7 and R6 in Figure 2 respec- used to drive the PLL. If the AM search for FM: VMETER (90/R8) >VCTRLA
tively). The deemphasis may be mode is required, the IF must be
achieved by an additional parallel 455 kHz. The IF output is fed via a and
capacitor (C13 and C12 respectively). ceramic filter to the demodulator. The
demodulated audio signal is available 1.1 V<VAFSM<1.3 V
FUNCTIONAL at pin 25 (MPXOUT).
DESCRIPTION When a control voltage is applied to for AM: current adjust into pin 9 for
In the FM mode, the antenna signal is pin 22 (CTRLA), the mode of the receiver fpin 20 = 455 kHz
fed via a tuned r.f. circuit to the inte- may be selected.
grated pre-stage, which consists of a The search mode is selected when for FM: detector coil adjust to
transistor grounded-base circuit. To the control voltage is <800 mV. Vpin 11 = 1.2 V for 10.7 MHz
protect the pre-stage against overload, The search sensitivity may be
an automatic gain control (AGC) is selected by varying the control voltage are fulfilled, a stop signal is generated.
included on the chip. in the range 100800 mV. When the [980058]
A tuned r.f. circuit on the collector is control voltage is 100 mV, the highest
necessary for amplifying and filtering sensitivity is achieved.
the FM signal, which is fed internally to In the reception mode, muting is
the mixer. It consists of a double-bal- possible by varying the control voltage
anced Gilbert Cell. in the range 0.81.4 V. When the con-
The local oscillator (LO) signal is trol voltage is 0.8 V, the highest mute
generated by an integrated oscillator. depth is achieved.
The buffered LO signal is used to drive The output at pin 23 (CTRLB) indi-
a PLL. THE IF signal (10.7 MHz) is cou- cates whether the receiver is operating

Elektor Electronics 6/98 53


conductance
tester
with buzzer or LED
indication

The conductance
tester goes one step
further than the usual
continuity tester found
in so many work-
shops. It contains a
buzzer to indicate a
very low resistance
between two points
along a conductor or
circuit and an LED
display to show the
order of resistance
between these points
Arguably, one of the most useful gad- (LEDs). These are driven by the well-
when the buzzer does gets in a small workshop is a continu- known display driver IC Type LM3915.
not sound. ity tester which enables the rapid
checking of whether a conductor or cir-
This circuit is designed specifically to
display the value of an analogue volt-
cuit is open-circuited or short-circuited. age via a row of LEDs.
It normally uses a buzzer to indicate a The LM3915 contains a reference
short-circuit (that is, a continuity in the voltage source and an accurate decadic
conductor or circuit). Such a device is potential divider. The voltages at the
improved considerably if it is given a taps of this divider are applied to a
means of showing the order of resis- series of comparators. These compara-
tance between the two probes when tors are driven sequentially in line with
the buzzer remains quiet. This quickly a rising input to the IC. The compara-
solves the question of is it a bad con- tor outputs can drive an LED directly.
tact? or is it a break in a cable?, and so The row of LEDs may be set to the dot
on. The simple indication provided in or bar mode. The brightness of the
the present tester shows at a glance the diodes can also be adjusted in accor-
relative magnitude of the resistance dance with individual needs.
between the two probes. One of the attractions of the
LM3915 is that it requires relatively few
INDICATOR external components (other than the
For a rough indication of a measured LEDs). The high-impedance input cir-
value of resistance (or its reciprocal, cuit of the IC accepts signals at levels
conductance) a liquid-crystal display from 0 V to 1.5 V below the supply
(LCD) or other fairly expensive indica- voltage. Provided that the input signals
tor is not necessary, and in the present do not exceed 35 V, there is no need
tester the indicator is formed by a for an external protection circuit. The
Design by L. Koch number of light-emitting diodes input voltage is indicated in 3 dB steps.

Elektor Electronics 6/98


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

RESISTANCE D11

MEASUREMENT 1 1N4148
Since the LM3915 is designed for indi- D10
C1
D9
cating voltages, and the present circuit BT1
100n
is intended for measuring conductance
9V 2V7
D8
(or its reciprocal, resistance), a means 400mW
3

has to be devised to convert voltage 9


MODE L10
10
D7
11 2x
into ohms or siemens. In the present R2
L9
BC557C T1
6 12
circuit, this is done by placing an addi- RHI IC1 L8 D6

2k2
13
L7
tional potential divider at the input of 14
P1 LM3915 L6 D5 T2
the LM3915 and ensuring that the divi- 5
SIG L5
15
sion ratio is influenced by the magni- R1 50 7 L4
16
D4
REFOUT
tude of the resistance between the test L3
17

75
8 18
probes. REFADJ L2 D3 R5 R6 R7
4 1
In the circuit diagram of the tester RLO L1

10k

10k

100
D2
in Figure 1, the external potential 2
divider at the input of IC1 is formed by D1
BZ1

D1, R2 and R3. The resistance, if any, R3 R4


between the test probes is connected in

17k8

1k2
parallel with R3 via resistor R1 and pre-
set P1. This means that this resistance
affects the division ratio of the divider,
980045 - 11
and thus the signal applied to pin 5 of
IC1.
The design arranges for resistance Figure 1. The circuit dia-
values of 10 to 7.5 k to be indicated effected by leaving pin 9 (MODE) of the (arrows), gram of the conductance
tester is an example of
in seven 3 dB steps by the sequential IC open. If the bar mode is wanted, two for the
simplicity.
lighting of D2D9. The first diode, D1, pin 9 must be linked to pin 3. b u z z e r
lights when the resistance is lower than (Bz 1), and
10 ; this level may be preset to 0 CONSTRUCTION two for the
(that is, full conduction) with P1. The tester must, of course, be as com- power supply.
Transistors T1 and T2 in parallel pact as possible so that it can be car- The tester is best powered by a 9 V
with D1 ensure that in case of very low ried about in ones pocket. battery. Since the current drain of the
resistance between the test probes only Consequently, the printed-circuit circuit is at most 30 mA (with buzzer
D1 lights and that the buzzer, Bz1, is board for it (see Figure 2) is small. sounding), an alkaline-manganese
energized. Building the tester on this board is battery should last about a year in
The diagram in Figure 1 shows IC1 simplicity itself, as is wiring it up. normal use.
configured for the dot mode, which There are only three connections to The tester, complete with battery, is
keeps the current drain low. This is be made: two for the probes best housed in a small plastic case.
[980045]

- + 980045-1 Parts list


2 Resistors: Figure 3. Photograph of
H4

D11 P1
D9

C1 R1 = 75 the completed prototype


1-540089

D10 R2 = 2.2 k tester.


D1 D2 D3 D4 D5 D6 D7 D8

R3 = 17.8 k
R4 = 1.2 k
R5, R6 = 10 k
R7 = 100
IC1

R4
R3
R2
R1

tnemgeS )C(
P1 = 47 k preset potentiometer

Capacitors:
R5

R6 C1 = 0.1 F
T
R7

T2 T1 Semiconductors:
D1D9 = LED, 3 mm
H2

H3

+ BZ1 D10 = zener diode 2.7 V, 400 mW


D11 = 1N4148
T1, T2 = BC557C

Integrated circuits:
Bz1 = buzzer, 12 V
Bt1 = 9 V battery with connecting clip
2 off test probes

(C) Segment
980045-1

Figure 2. The printed-cir-


cuit board for the conduc-
tance tester is not avail-
able ready made.

Elektor Electronics 6/98 55


Field Programmable
Analogue Array
MPAA020 from Motorola

The MPAA series of


Field Programmable
Analog Arrays from
Motorola is a new
family of products that
have programmable
analogue building
blocks that can be
configured to create
circuit functions that
solve real-world signal
processing problems. Table 1. Performance specifications of the MPAA020

When used with sup- Specification Typical Value


porting CAD tools and System Master Clock Frequency (clock) Internal Sampling Clock Rate TBD 1 MHz (max.)
Maximum Signal Frequency Recommende 200 kHz
macro library func- Maximum Signal Frequency Nyquist 500 kHz
tions, these products Input Signal Range 0.5 V to (Vdd 0.5V)
100 pF (max.)
allow the user to Analog Output Drive
1 k (min.)
address analogue cir- DC Offset < 10 mV
cuit design problems Harmonic Distortion 1 kHz < 0.1 %
Harmonic Distortion 200 kHz < 0.5 %
with low risk and mini- Differential Non-Linearity < 0.15 LSB
mum analogue exper- Integral Non-Linearity < 0.24 LSB
Slew Rate 10 V/ms
tise.
Signal to Noise Ratio (SNR) > 60 dB
Power Supply Rejection Ration (PSRR) TBD
Power Dissipation (max.) 200 mW
Each cell individually selectable (10 mW/cell)
Operating Temperature Range -40 to +85 C

Topology: (1) study of geometrical properties and spatial relations unaffected by contin-
uous deformation, such as twisting or stretching. Mathematical approaches employing
topology are of great importance in modern theories of the four fundamental interac-
tions (gravitational, electromagnetic, weak and strong); (2) in electronics: generic circuit
By M Kupfner structure or collection of working structures.

56 Elektor Electronics 6/98


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

1 logue signal processing without the


1 need for calibration or feedback. Ana-
logue resources in the MPAA020 are
C2 2 contained in configurable analogue
blocks (CABs) that incorporate a
switched-capacitor CMOS op amp,
1 comparator, capacitor arrays, CMOS
switches, and SRAM (static RAM). Data
stored in SRAM control the switches
U in 1 C1 that program various capacitance val-
U out ues (static and dynamic) in the input
and feedback signal paths of the
2 op amp. Analogue functions such as
programmable gain stages, adders,
subtractors, rectifiers, sample&hold cir-
cuits, and first-order filters can be
implemented in a single cell (CAB).
Higher level functions, such as biquad
980059 - 11
filters, PLLs (phase-locked loops), level
detectors, and so on, can be imple-
Figure 1. Layout of a mented using two or more cells.
single switched-capaci-
tor cell. SC TECHNOLOGY IN
THE MPAA020
Switched-capacitor cells are invariably
implemented in quantity in an inte-
The first available Field Programmable ucts are aimed at industrial motion, grated circuit. The layout of a single
Analog Array, the MPAA020, is an elec- process, and power control applica- cell is shown in Figure 1 (which, by the
tronic breadboard that provides an tions. Additional applications to which way, is a macro contained in the
ideal medium for quickly designing, the analogue arrays are suited include EasyAnalog software).
debugging, and implementing a wide communications (low to medium fre- The clock (switching) phases of the
array of analogue circuits, thereby quency applications), process control cell are designated 1 and 2, and the
reducing development cycle times. (temperature, heating and cooling sys- capacitors C1 and C2. The amplifica-
Additionally, the analogue arrays, tems, pressure control, and so on), tion, , of the cell is, as in a standard
when used with Motorolas MPA series automotive, and medical instrumenta- configuration, = C1/C2.
of field programmable gate arrays tion, and measurement systems. In accordance with Shannons the-
(FPGA), allow the user to implement orem, the clock frequency, fclk, must be
field programmable mixed-signal ANALOGUE at least twice the highest frequency
designs, using the products and soft- TECHNOLOGY occurring in the signal, fsig. If this con-
ware from each of the individual FPGA The technology for Motorolas field dition is not met, aliasing effects will
technologies. This mixed-signal design programmable analogue array is based occur. In the MPAA020, the clock fre-
capability extends the users flexibility on switched capacitor (SC) technology. quency is 1 MHz max, which means
even further by providing the capabil- The MPAA020s switched capacitor cir- that the signal frequency must not
ity to simultaneously design, debug, cuit topology (see box) is designed to exceed 500 kHz in practice, 200 kHz.
and implement, both the analogue and be insensitive to parasitic capacitances;
digital aspects of a system topology. consequently, arbitrary signal routeing ARCHITECTURE
is possible with minimal loss in signal The MPAA020 contains 41 op amps,
APPLICATIONS integrity caused by these parasitics.. 100 programmable capacitors, and 6864
Motorolas field programmable arrays Also, since the capacitors are integrated switches. The switches control circuit
can be used in a wide variety of appli- on silicon, the capacitance ratios are connectivity, capacitor values, and
cations. The first analogue array prod- tightly matched, allowing precise ana- other selectable features. The array is

of the capacitor.
switched-capacitor basics Because of its easy programmability, switched-capaci-
tor devices find application in adaptive filtering, anti-alias-
In switched-capacitor (SC) technology, a resistance is ing, phase-locked loops, and digital signal processing
replaced by a switched capacitance. The current through (DSP).
a resistance, and thus through a switched capacitor, is
directly proportional to the voltage, U, applied across the
resistance.
If, in the diagram, the switch is as shown, the capacitor, R
Cs, is charged to a charge Q = UCs. When the switch is in
the other position, the capacitor is discharged. The
process of the capacitor being charged and discharged
continuously results in an average current I = UCs/Ts, CS
where Ts is one charge/discharge cycle, that is, 1/fs (fs is the
switching frequency). Substituting fs for 1/Ts gives
I = UCs fs. In analogy to Ohms law, I = U/R, it follows that
R = 1/Cs fs. In other words, the resistance is inversely pro- 980059 - 15
portional to the switching frequency and the capacitance

Elektor Electronics 6/98 57


Figure 2. Block dia-
2 gram of the Type
MPAA020 field pro-
grammable analog
array.

SINGLE CAB
The diagram of a single configurable
analogue block is shown in Figure 3.
Each capacitor array consists of 255 sta-
tically switched capacitors, which
means that the array can be pro-
grammed in 255 stepped values.
The static switches, which can be
set only once during the program-
ming, are also used to control the
routeing resources.
The resistance (switched-capacitor
effect) is obtained by dynamic
switches, which also affect the phase of
the input signal.
Additional switches enable the
number and kind of limited local con-
nections between two adjacent CABs.
structured in a grid that contains 20 instance, anti-aliasing or smoothing fil- There are, however, also global lines to
CABs arranged in a 4 5 matrix (see ters (external resistors and capacitors enable non-adjacent CABs to be inter-
Figure 2). are then required). connected.
The programmable CABs rely on Configuring an analogue design
the configuration logic in the upper within the array is performed by 20-CELL VERSION
portion of the chip to control the con- downloading 6 kbits of data via RS232 The MPAA020 is a field programmable
nectivity within the array and func- communications from a PC or analogue array based on a general pur-
tionality in each CAB. Two buses move EPROM. The data stream contains pose analogue cell that may be config-
data from the shift register to the CABs; information to configure the individ- ured, either alone or in combinations,
the data control bus retrieves and ual cell, the cell interconnections, inter- as any of a wide range of analogue
moves the data from the shift register nal bandgap voltage reference, and functions from simple comparators to
and the transfer control bus latches the I/Os. During this configuration down- complex filters. These cells are
data into local SRAM. load process, all cells are placed in a arranged in a 45 array with support-
Custom functions can be added to power down mode. ing circuitry to provide input/output
the chip to meet customer specific
applications. An 8-bit programmable
bandgap voltage reference is available
to each CAB.
Op amps are provided on the chip
periphery that can be configured for Figure 3. Diagram of one of the Config-
unity gain buffering or filteringfor urable Analogue Blocks on which the
MPAA020 is based.

58 Elektor Electronics 6/98


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

signal buffering, programmable refer-


ence voltage, cell to cell interconnec-
tions, and so on.
Each cells function may be pro-
grammed to connect with any of the
other cells in the array. Unused cells
are powered down individually to
minimize power dissipation.
Digital interface circuitry is pro-
vided to write the analogue circuit con-
figurations data to on-chip SRAM in
the same manner as Motorolas digital
FPGAs (serial and parallel PROM, and
microprocessor mode).
Analogue circuit design is simplified
with EasyAnalog design software,
which handles bit level circuit configu-
ration details, allowing the user to do
analogue design using functional
macros in an easy to use point-and-
click graphical environment.

EASYANALOG
PROGRAM Figure 4. Example of a
The EasyAnalog program may be configuration possible
compared with a circuit editor. After with EasyAnalog
the desired function has been selected, software.
it is placed on one or more free CABs,
and the input and outputs connected
as needed. Freeware EasyAnalog
runs under Windows 95 or NT and
may be downloaded from the Internet (>80 dB), a bandwidth of 1 MHz, inter-
http://sps.motorola.com/fpaa nal feedback facilities, for instance, for
The available functions are listed in automatic gain control (AGC), and a
Table 2. multiplier. A higher voltage family is
also planned which will operate in
PERFORMANCE applications with voltages greater than
A summary of the MPAA020s perfor- 10 V.
mance features is listed in Table 1. The
MPAA020s circuit topology provides F I N A L LY
advantages relative to chip area, pin Use of the array may initially be prob-
count, and rail-to-rail voltage swing lematic since it is housed in a 160-pin
with improvements being made to the Quadratic Flat Pack (QPF) with a pin
signal-to-noise ratio and signal band- pitch of 0.25 mm. This makes manual
width in arrays that will be introduced soldering a little difficult.
later this year. One of these, the [980059]
MPAA132, has a signal-to-noise ratio

Table 2. Partial macro library analogue functions

Single cell macro functions Multi-cell macro functions

Gain stages (max=20 min=1/20) Low Q biquad filter (high- or low-pass); 2 cells
Sum & diff. amps (3 weight inputs) Low Q biquad filter (notch, band-pass); 3 cells
Sample&hold High Q biquad filter (high- or low-pass); 2 cells
Track&hold High Q biquad filter (notch, band-pass); 3 cells
Integrator Maximum cor ner frequency = T/10
N-path integrator Minimum cor ner frequency = T/100
Differentiator Limiter
Half-wave rectifier Interpolator
Full-wave rectifier Schmidt trigger
LPF rectifier Voltage-controlled oscillator
Cosine filter Sine-wave oscillator
Decimator Square-wave oscillator
Bi-linear filter Triangle-wave oscillator

Elektor Electronics 6/98 59


liquid-level
gauge
an original application for the ST62T20
Measuring liquid levels is a subject which never fails to
cause heated debates. Does a technique exist which
makes it possible to provide not only a tank empty
alarm, but also a continuous indication of the tank con-
tents? The circuit described here operates in one of two
modes: stand-alone or remote (using RS-232 communi-
cation). Once youve built the circuit, the fuel level in the
tank of a heating system, or the water level in the garden-
ing tank, is no longer a secret.

5V

C8
1 C3
D3 D2 C6 ...C9 = 1 /25V
2
1 V+
R2 R4 100n R6 R7 C6 C1+
D4 16
470

470
100k
10k

1 3 IC3
C1
11 14
19 T1IN T1OUT
PA0 10 7 K1
1N4148 5 18 T2IN T2OUT
NMI PA1 12 13
17 R1OUT R1IN TxD
R1 PA2 9 8
16 RE R2OUT R2IN
220k PA3 4
C7 C2+
IC2f IC2e IC1 15 S1 MAX232 15
PB0 5
13 11 2 14 1 C2
1 1 10 TIMER PB1 V-
12 13 2
PB2 6
ST62T20 12 3
PB3
11
PB4 12V C9
7 10 K2
SENSOR RESET PB5
9
6 PB6 C
VPP/TEST 8 D1 RE1
PB7
OSC 2 1
IN OUT NO
SK CS
3 X1 4 20 4 8 12V
DOUT
C13 1N4148 NC
IC5 T1
R3
S2 93C06CB1 R5
C5 C4 3 5 100n
4MHz DIN
10k

C1 C2 4k7

100 1 7 6 BC547
16V 16V 22p 22p

12V
IC4
IC2c IC2d
78L05 5V
5 6 9 8
K3 1 1

14
C10 C11 C12
IC2 1 2 3 4
1 1
7
100 330n 100n
16V IC2a IC2b
IC2 = 74HC14 970056 - 11

Figure 1. The liquid-level gauge consist of a handful of parts


only; most of the work is done by IC1, a pre-programmed
ST62T20 microcontroller.
Design by M. Vacher

Elektor Electronics 6/98


60
Looking at the increasing number of RS232 levels (as used by the PC port resenting a liquid level of 250 mm. Any
circuits based on a microcontroller, one with the same name), and vice versa. other value is possible provided you
may start to wonder how it was pos- Here, the MAX232 sends data supplied modify the relevant parameter in the
sible, only a few years ago, to design by the processor to the serial interface source code file before assembling the
electronics worthy of interest. If the of the PC, which uses them for further program. The source code file is avail-
microcontroller has changed the face processing. able on a disk, the order code is
of electronics for home construction, In the lower left corner of the cir- 976015-1.
we have to recognise, though, that the cuit diagram you can see the electron-
appearance of this type of component ics required for stand-alone operation As already mentioned, this circuit can
has also caused a considerable reduc- of the liquid-level gauge: were talking be used in one of two modes:
tion in comprehensibility of circuits about the relay which is directly actu-
based on a microcontroller. On the ated by the PA3 line of port A (pin 16). stand-alone: the system operates inde-
plus side, the use of a micro presents Actually, the port line controls the pendently, the relay being actuated
a number of indisputable advantages, relay via a switching transistor, T1. The when a programmed level is reached
including a much simpler circuit dia- relay contacts are connected to PCB (for instance, to switch on a pump).
gram, and cost reductions due to terminal block K2. Depending on the
fewer components and a smaller way an external circuit, pump, valve remote (RS232): the measured level is
board. or actuator can be controlled, the con- periodically sent to a serial link (run-
tacts have to be normally-open (NO) ning at 9,600 baud). The information is
THE ELECTRONICS or normally-closed (NC) types. then processed by another system (a
A look at the circuit diagram given in The power supply is entirely con- microcontroller or an alarm system).
Figure 1 allows you to discover that ventional, being based on a three-pin The liquid-level is directly supplied in
the electronics are reduced to a few voltage regulator type 78L05 (IC4). millimetres. The syntax of the ASCII
elements only. IC1, A microcontroller messages is
type ST62T10 from SGS-Thomson is at HOW IT WORKS
the heart of the circuit. One external Schmitt-trigger gate IC2f acts as an RC =00xxx<CR><LF>
part the controller cant do without is oscillator in which R1 is the resistive
an EEPROM, IC5. The third elemen- element. The capacitor you would where xxx is the measured liquid-level
tary component is the ubiquitous normally expect to see in the oscillator in millimetres.
MAX232 which looks after the previ- is formed by the two probes immersed
ously mentioned RS232 compatibility in the liquid. As the capacitance is a CONSTRUCTION
of the circuit. function of the liquid level, so is the The artwork for the printed circuit
The reasons for choosing an ST6 frequency produced by the Schmitt- board designed for this project is given
controller for this application are trigger oscillator. This frequency is in Figure 2. The circuit board is single-
mainly that the 62T20 version is afford- measured by the microprocessor, and sided and, unfortunately, not available
able (approx. 5), and that various then translated into a corresponding through our Readers Services.
entry-level development systems are level of the liquid in the tank. The pre- Although fitting all the parts is
available, for example, the ST6 Starter viously mentioned display enables the straightforward soldering work, you
Kit, or the ST6 Programmer described necessary values to be stored in non- should observe the orientation of
in Elektor Electronics November 1996. volatile memory (EEPROM 9306). This polarised components like integrated
The latter allows you to write your principle applies to different liquids. circuits (including the voltage regula-
own programs an also burn ST6 con- The author tried it with water and tor), electrolytic capacitors, LEDs,
trollers. heating fuel (light oil). As illustrated in diodes and transistors.
When S2 is pressed, the ST6 is reset. the following table, the frequency vari- The microcontroller should, of
Components R4 and C4 then briefly ation obtained with the immersion course, contain the right program. For-
pull the reset input of the CPU logic probes depends on the liquid in the tunately, you can obtain it ready-pro-
low, and so cause the microcontroller tank. grammed through our Readers Ser-
to be re-initialised. vices (order code 976515-1), or as part
A number of lines from port B, PB4 min. level max. level of a kit from a kit supplier.
to PB7, connect the processor to the Liquid resolution The integrated circuits are mounted
(0 mm) (250 mm)
EEPROM (electrically erasable pro- in sockets. There is only one wire link
grammable read-only memory), a type Water 280 kHz 70 kHz 0.07 mm on the board. Since the LEDs are only
93C06B1. The EEPROM has a serial Fuel 280 kHz 230 kHz 1 mm used during the calibration procedure,
communication channel, and offers a they may be fitted close to the PCB
capacity of 256 bits organised as Lets look at the level calculation in surface. Be sure not to fit DIL switch
16 words of 16 bits each (default mode greater detail. The signal supplied by S1 the wrong way around. The contact
used here), or 32 words of 16 bits each. the oscillator is applied to the TIMER marked 1 should be close to resistors
The on-chip oscillator uses a 4-MHz input of the microcontroller, which R7 and R6. When the switches are in
quartz crystal and the usual pair of measures the total duration of 32,768 the on position, the levers should be
satellite-capacitors, C1 and C2. The cycles of the signal. In this way we get moved towards the ST6.
crystal is connected between the a 16-bit number which is proportional Measuring just 8062 mm, the cir-
OSCIN and OSCOUT pins of the with the liquid level. Next, the ST6 cuit board should not be too difficult
microcontroller. micro performs the following calcula- to mount in a plastic (ABS) case of
The 3-way DIP switch block, S1, tion: your choice. The two immersion
has a function in the calibration of the probes may be made from plastic-cov-
circuit. It will be discussed further on. Level (mm) = ered curtain rods with a diameter of
The component at the right-hand 250 (xNlow) / (NhighNlow) 4 mm. Their length will obviously
side of the circuit is a MAX232. Theres depend on the depth of the tank. The
practically no way to avoid this com- where x is the measured value, Nlow probes should be fitted at a centre-to-
ponent because it provides everything the low calibration level stored in centre distance of about 10 mm. The
you need to convert TTL levels (as EEPROM, (NhighNlow) the difference rods should pass through four holes in
supplied by the microcontroller) into frequency stored in EEPROM and rep- the case (two additional holes at the

Elektor Electronics 6/98 61


C12
2

C2

C1
V2
V3

IC2

R4
D4

X1
R2 R1

C3
C4
R3
IC5 IC1

SENSOR

C5

D2
C13
R7

S1
R6
D1 R5

D3
C9

C7

C6
S2
T1
IC3
RE1

C10

970056-1
1-650079
IC4
C11

C8
970056-1

K3

K1
K2

V4
V1

TxD
T
NO
NC

+
0

COMPONENTS LIST Figure 2. Copper track


The power supply is a bit more rus- layout and component
Resistors: tic. The supply voltage is furnished by mounting plan of the
R1 = 220k a mains adaptor with an output capac- single-sided printed
R2,R3 = 10k ity of 12 V/40 mA. This output voltage circuit board
R4 = 100k need not be regulated, because it only designed for the pro-
R5 = 4k7 ject (board not avail-
powers the relay coil. The rest of the
R6,R7 = 470 able ready-made).
electronics draws its supply current
Capacitors: from the 78L05 three-pin voltage reg-
C1,C2 = 22pF ulator on the board. The 93C06 (or
C3,C12,C13 = 100nF 93C46) EEPROM memory works in 16- Programming the levels at which the
C4 = 1F 16V radial bit mode (ORG, pin 6 not connected), relay is actuated.
C5,C10 = 100F 16V radial which allows circuits of the old gener- This procedure is similar to the one for
C6-C9 = 1F 25V radial ation to be used. the calibration, only switch SW1-2 is
C11 = 330nF
set to the on position. The relay is
Semiconductors: SETTING UP energised when the liquid tops the
D1,D4 = 1N4148 Once all components are in place on high level, and is switched off when
D2 = red low-current LED the board, you are ready to proceed the liquid drops below the low level
D3 = green low-current LED with the calibration of the circuit. This (hysteresis).
T1 = BC547 procedure consists of two phases: Note that the three switch contacts
IC1 = ST62T20 (order code 976515- in S1 should be returned to the off
1)
1. Low level calibration, probes not position for normal use of the liquid-
IC2 = 74HC14
IC3 = MAX232N immersed. level gauge.
IC4 = 78L05 The switches in S1 should be set as fol-
IC5 = 93C06CB1 lows: SW1-1 on, SW1-2 off, SW1-3 off. OPTIONS
After switching on the supply voltage, This circuit may be used with or with-
Miscellaneous: or after a reset, followed by a stabilisa- out a serial RS232 link. If the computer
K1,K3 = 2-way PCB terminal block, tion period of about 2 seconds, the sys- system (or microcontroller) you want
raster 5mm
tem launches the frequency measure- to use for the processing of liquid-level
K2 = 3-way PCB terminal block,
raster 5mm ment. The value assigned to Nlow is data accepts TTL levels, then the
S2 = presskey, Multimec CTL3 written into EEPROM. The end of the MAX232 may be omitted. As it is not
S1 = 3-way DIP-switch process is signalled by one of the two required in the present application, the
X1 = 1 MHz quartz crystal LEDs coming on (the green one, D3, RxD line is not implemented in the
Re1 = relay, 12V, PCB-mount (e.g., for okay, or the red one, D2, for serial link. If you plan to extend the
Siemens V23057-B0002-A201) error). program with additional functions,
Optional: floppy disk with microcon- you may connect pin 15 (PB0) of the
troller source code, order code
976015-1 (see Readers Services
2. High level calibration, probes microcontroller to the R1OUT pin.
page). immersed in liquid with a column This allows the RxD signal to be
height of 250 mm. applied to the R1IN pin. It is then also
Set the switch contacts as follows: SW1- worthwhile to replace K1 with a 3-pin
1 on, SW1-2 off, SW1-3 on. Again, after header whose contacts may be con-
rear side to keep them in place). Inside switching on the supply voltage, or nected to wires to implement the
the case, the plastic covering is after a reset, followed by a stabilisation above mentioned function.
removed locally for the connection to period of about 2 seconds, the system (970056-1)
the two oscillator inputs marked SEN- launches the frequency measurement.
SOR. The four holes are sealed with The value assigned to Nhigh as well as
two-component glue or a potting com- the result of (NhighNlow) are written
pound to make the enclosure water- into EEPROM. The end of the process Warning. This circuit is not designed
tight. In spite of this measure, the case is signalled by one of the two LEDs or approved for use in tanks contain-
must also be mounted well out of coming on (the green one, D3, for ing highly flammable, explosive,
reach of the liquid in the tank. okay, or the red one, D2, for error). aggressive or corrosive liquids.

Elektor Electronics 11/97


62
Elektor Electronics

V23057 Card Relay E UM8250A

Passive Components Integrated Circuits


Relays DATASHEET 6/98 Microprocessor, Interfacing DATASHEET 6/98
V23057 Card Relay E UM8250A The CPU can read the complete status of the ACE at
Upright mounting, immersion cleanable. For PCB Asynchronous Communication Element (ACE) any time during the functional operation. It also
mounting, pin arrangement suits 2.5 mm and 0.1-in. includes a programmable baud rate generator capa-
grid in accordance with DIN 40801 and DIN 40803, ble of dividing the timing reference clock input by
fine. divisors of 1 to (2161), and producing a 16x clock
for driving the internal transmitter logic.
V23057-B0*** with creep distances and clearances
6/98

> 4mm*. Application


1 changeover contact, single or bifurcated, or 1 Manufacturer Analogue-to-Digital Converter, Elektor Electronics
make contact, single. United Microelectronics Corp (UMC), No 3, Li-Hsin June 1998 Supplement
V23057-D0*** with creep distances and clearances Road II, Science-Based Industrial Park, Hsin-chu The following tables of ACE register functions are
> 8 mm*. 1 make or 1 break contact, single. City, Taiwan, R.O.C. Fax: (+886) 3-577-4767. offered as a help to program the above converter.
Internet: www.umc.com.tw/. UK Distributors: Future
* between winding and contact. Electronics (01753) 76 3000; Ambar Cascom Interrupt Identification Register (IIR)
(01296) 395 635. The ACE has an on-chip interrupt capability that
Manufacturer allows for flexibility in interfacing popular micro-
Siemens. Siemens plc, Siemens House, Windmill General Description processor presently available. In order to provide
Road, Sunbury-on-Thames, tel. (0932) 752677, fax The UM8250A is a programmable Asynchronous minimum software overhead during data character
(0932) 752671. UK distributor: ElectroValue. Communication Element (ACE) chip fabricated using transfers, the ACE prioritizes interrupts into four lev-
the S-Gate NMOS process. It performs serial-to-par- els. When addressed during chip-select time the IIR
allel conversion on data characters received from a freezes the highest priority interrupt pending, and no
Ordering Code peripheral device or a modem, and parallel-to-serial other interrupts are acknowledged until the particular
conversion on data characters received from a CPU. interrupt is serviced by the CPU.
Block 1 Block 2 Block 3
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
h h h h h h 1 h h h h h 1 h h h h Interrupt Identification Register Interrupt Set and Reset Functions
Bit 2 Bit 1 Bit 0 Priority Level Interrupt Type Interrupt Source Interrupt Reset Control
0 0 1 None None
Basic type number
of card relay E Overrun Error
V23127 = suitable for processing on soldering lines for V23057-BO... for V23057-DO... or
69

V23057 = immersion cleanable Parity Error


Receiver Line Sta- Reading the
1 1 0 Highest or
tus Line Status Register
Framing Error
Version or
B0 = with creep distances Break Interrupt
and clearances > 4mm*.
1 changeover contact, Received Data Receiver Data Avail- Reading the Receiver
1 -0 0 Second
single or bifurcated, Available able Buffer Register
or 1 make contact, single.
D0 = with creep distances Reading the IIR Register
and clearances > 8 mm*. (if source of interrupt)
Transmitter Holding Transmitter Holding
1 make or 1 break contact, single. 0 1 0 Third or
Register Empty Register Empty
Writing to the Transmitter
Holding Register
Coil number
See Table 1 Clear to Send
or
Data Set Ready
Contact(s) Reading the MODEM Sta-
0 0 0 Fourth MODEM Status or
See Tables 2 and 3 tus Register
Ring Indicator
or
Data Carrier Detect
#
UM8250A V23057 Card Relay E

6/98
Integrated Circuits Passive Components
Microprocessor, Interfacing DATASHEET 6/98 Relays DATASHEET 6/98
Table 1 Coil voltages
Divisor Latch
0 DLAB = 1

Bit 10

Bit 11

Bit 12

Bit 13

Bit 14

Bit 15
(MS)

Nominal voltage Operating voltage range at 20 C Resistance at 20 C


DLM

Bit 8

Bit 9
Coil number
Order Code, Minimum voltage UI Maximum voltage UII
Block 2 V DC
V DC V DC

Elektor Electronics
Divisor Latch
0 DLAB = 1

001 6 4.2 10.6 80 8


Bit 0

Bit 1

Bit 2

Bit 3

Bit 4

Bit 5

Bit 6

Bit 7
(LS)

DLL

002 12 8.3 21.5 330 33


006 24 16.8 40 1200 180
Register
Scratch

013 48 33.6 79 4700 700


Bit 0

Bit 1

Bit 2

Bit 3

Bit 4

Bit 5

Bit 6

Bit 7
SCR
7

023 60 42 98 7200 1080

Delta Data Car-


Ready (DDSR)
Delta Data Set

Ring Indicator

Ring Indicator
Clear to Send
Table 2 Contact specifications V23127-A0*** and V23057-A0***/-B0*** with single contacts
Delta Clear to
MODEM Sta-

Detect (DCD)
Send (DCTS)

Ready (DSR)
Trailing Edge
tus Register

Data Carrier
rier Detect

Data Set
(DDCD)
(TERI)

(CTS)
MSR

(RI)
Ordering Code, block 3 A101 A201 A401 A102 A202 A402
6

silver, gold- silver-cadmium silver, gold- silver-cadmium


Contact material silver nickel silver nickel
Break Interrupt flashed oxide flashed oxide

Holding Regis-

Empty (TEMT)
Framing Error
Overrun Error
Line Status

Data Ready

Parity Error

Transmitter

Transmitter
ter (THRE)
Contacts (see also base terminals) double, change-over single, make
Register

(OR)
(DR)

(PE)
LSR

(FE)

(BI)
5

0
Max. switching voltage as per V DC 300
VDE 0110 group C V AC 250

5/151 8/151 5/151 8/151


Data Terminal

Max. switching current A


Modem Con-
Register address

trol Register

Ready (DTR)

Send (RTS)
Request To

Out 1

Out 2

Loop
MCR

Max. power rating 2, DC voltage up to up to


4

0
W 50...330 24 V: 100 35...330 50...330 24 V: 100 35...330
W 30 V: 80 30 V: 80
W (voltage 200 V: 30 (voltage (voltage 200 V: 30 (voltage
dependent) dependent) dependent) dependent)
Divisor Latch
Parity Enable
Word Length

Word Length
Line Control

Select Bit 0

Select Bit 1

Stick Parity
Even Parity

Access Bit
Number of

Set Break
Stop Bits
Register

(WLS0)

(WLS1)

W 250 V: 50 250 V: 50

(DLAB)
Select
(PEN)
(STB)

(TxD)
LCR
3

AC voltage VA 1250 2000 1250 2000

* Bit 0 is the least significant bit. It is the first bit serially transmitted or received. Max. continuous current A 8
Interrupt ID Bit

Interrupt ID Bit
0 if Interrupt
Ident. Regis-
ter (Read

approx. 2 x 107
Interrupt

Mechanical life Ops.


Pending
Only)

(0)

(1)
IIR
2

1 higher current may flow for a maximum of 4 seconds for up to 10% of on time.

Table 3. Contact specifications V23127-A0*** and V23057-A0***/-B0*** with bifurcated contacts


Enable Transmitter

Line Status Inter-


Interrupt (ERBFI)
Interrupt Enable

Holding Register
Enable Received

Enable Receiver

Enable MODEM
Empty Interrupt

Status Interrupt
Data Available
1 DLAB = 0

Ordering code, block 3 B101 B601


rupt (ELSI)
Register)

(DESSI)
(ETBEI)

70
IER

Contact material silver, gold-flashed gold F


0

Contacts (see also base terminals) double, change-over

Max. switching voltage as per V DC 300 36


Holding Reg-
0 DLAB = 0

ister (Write
Transmitter

Data Bit 0

Data Bit 1

Data Bit 2

Data Bit 3

Data Bit 4

Data Bit 5

Data Bit 6

Data Bit 7

VDE 0110 group C V AC 250 30


Only)

THR

Max. switching current A 4/101 0.2

Max. power rating


0 DLAB = 0

Buffer Reg-
ister (Read

Data Bit 0*

Data Bit 1

Data Bit 2

Data Bit 3

Data Bit 4

Data Bit 5

Data Bit 6

Data Bit 7
Receiver

DC voltage W voltage-dependent 5
Only)

RBR

AC voltage VA 500

Max. continuous current A 6 2


Bit no.

Mechanical life Ops. approx. 2 x 107


0

1 higher current may flow for a maximum of 4 seconds for up to 10% of on time.
#

Você também pode gostar