You are on page 1of 54

Microsoft Windows looks poised to reign supreme as

the operating system for PCs used at home and in


the small office. Competition is weak, other manu-
facturers having given up or left the market after a
short death struggle. And yet, there is hope. An ope-
rating system called Linux appears to be a good
alternative for Windows. In stark contrast with Microsoft
Windows, Linux is the fruit of own users.

Linux a Windows
alternative?
Red Hat Linux 5.1 with simplified installation
The rapid evolution of the personal PCs in the world. Actually, that is a posi- king about Mac computers here, as
computer (PC) over the past fifteen tive point because a single operating they represent a different category).
years or so was not just due to sensa- system (or platform) promotes the Gone are the days when advanced PC
tional hardware developments, but compatibility of software, and urges users could mention four or five sup-
also to the availability of complex soft- hardware manufacturers to develop pliers of DOS systems!
ware. In this way, the PC slowly became and supply Windows drivers for their Fortunately, there are a few alterna-
the user-friendly machine for a galaxy products. On the other hand, competi- tives left. Of these, Linux is probably the
of applications. tion keeps the market alive. Unfortuna- best known. But why go for another
Today, the Windows operating sys- tely, there are not many suppliers of operating system than Windows? Two
tem is used on more than 90% of all graphics user interfaces (were not tal- important reasons can be mentioned:
first, Linux is much cheaper than Win-
dows (including the associated appli-
cations); second, Linux is much more
stable than Windows 95/98 or NT, and
that is why many Internet servers and
network computers run under Linux.

What is Linux?
For years, Unix has been among the
most popular operating systems for lar-
ger computer systems. Unix has slowly
become available for almost any type
of processor, and is marked by its
modular structure, and the fact that it is
almost entirely written in C. These two
aspects make it easy to extend or
modify Unix as required.
In 1991, Linus Torvalds from Finland
wrote a simple computer operating sys-
tem resembling Unix. He based his work
on Minix, which was fairly well known at
the time, and called it Linux.
Over the past couple of years, thou-
sands of programmers around the
globe worked on improving and exten-
Figure 1. KDE is a typical Linux window manager.
ding Linux. As we write this, Linux is an

2 - 10/98 Elektor Electronics EXTRA PC TOPICS


up-to-date computer operating system
with support for lots of different hard-
ware products. Meanwhile, there are
Linux versions for many different com-
puters, including Intel-compatible PCs,
and Alpha and Sun SPARC workstations.
You may wonder what makes Linux
so fascinating that lots of programmers
around the world keep contributing to
it. The most likely answer is that Linus Tor-
valds insisted on the price tag for Linux:
free of charge. In practice, this was
arranged by means of so-called GNU
public licencing. Although all modules
that make up Linux, as well as all appli-
cations, may be sold at cost by any
company or programmer, they are
always obliged to supply the source
code files with the product. Next, the
users of these products are free to
make modifications to the program, or
extend it, and offer the result to others.
It is almost incredible that an extre-
mely complex software application like
an operating system can be made by
Figure 2. The Afterstep desktop not only looks impressive, it is also easy to use.
so many people working at different
locations around the globe. Thanks to
the global communication possibilities
offered by the Internet, organised recognising nearly all computer com- Applications
groups of programmers mainly con- ponents during the installation. In fact, Good as an operating system may be,
centrate on the larger parts of the ope- a minimum amount of user action is it is worthless without application pro-
rating system. Even if programs are only required to arrive at a correctly working grams. During the past couple of years,
in an early beta stage, they are made system. Some of the best known distri- a large number of fine programs were
available so that other Linux users can butions include Red Hat Linux, Caldera written for Linux. For example, all utilities
help to improve and debug the pro- Open Linux, Debian GNU/Linux and you need to set up an Internet server
gram. S.u.S.E. Linux. come free of charge with almost any
To keep things in control, Linus still distribution. However, if we look at ordi-
has the final say about any important nary programs for use by everyone,
change to the kernel (i.e., the software X-windows the choice is limited because Linux is
core of Linux). Inside the Linux fraternity, the need was mainly used by people with a basic
Several distribution points may be felt to have a graphics user interface interest in programming and other
found on the Internet where the Linux which was comparable to Microsoft technical matters. These days, office
operating system may be downloaded Windows. The result was the X-windows computer users have grown accusto-
free of charge. Although there are system developed in co-operation with med to the luxury and ease of use of
companies that will make a charge for DEC and the MIT. The aim was to create program suites like Microsoft Office. For-
their distributing Linux on CD-ROM, the a graphic system which was equip- tunately, Linux is also developing into
price is either modest, or largely deter- ment- as well as system-independent, that direction. There are already a
mined by the printed manual and the freeing the programmer from the bur- couple of good Office-like packages
amount of support the user is entitled to den of ensuring that his/her program be like Applixware Office Suite and Star
receive. compatible with any system or hard- Office. The latter is even free of charge
You may wonder what distribution ware. In the mean time, X11 has evol- and very well suited to home and
entails. Because Linux is basically a col- ved into a global standard. SOHO use.
lection of small programs and modules, In addition to this basic system, a The Canadian company Corel has
it is pretty hard for the average user to number of other window managers announced Linux versions of an incre-
assemble these into a fully working were developed. Running under X11, asing number of its products, while
Linux system. A Linux distribution is a they take care of all display and dis- WordPerfect Corp. products are alre-
program package with an installation play updating functions. Some of the ady available. Of course, we should
section that ensures that the right better known are Motif, Open Look, not forget to mention that Netscape
modules, settings and programs end Fvwm95 and KDE. The latter in particu- Communicator is available in a Linux
up on your PC. In the past, the complex lar has become pretty popular lately, version. This is crucial for the very back-
structure of Linux was a serious stum- the final version, 1.0, being available bone of Linux: communication using
bling block for many computer users as we write this. KDE offers nearly all the Internet.
wishing to experiment with this interes- features Windows users have grown PC games written to run under Linux
ting operating system. That situation has accustomed to, and that is, of course, are few and far between. Apparently,
been improved considerably, and the crucial for any PC owner contempla- there are no PC game makers as yet
current distributions are so good that ting the move from Windows to Linux. willing to develop Linux-compatible
they are capable of automatically products, probably because of the

PC TOPICS Elektor Electronics EXTRA 3 - 10/98


CD-ROM is removed from the CD-ROM
drive. This is done by means of a
mount and u(n)mount command.
If you would like to work in a more
Windows-like environment, that is fairly
simple to achieve. By means of a Start
command (usually startx), X-Windows is
launched, and most tasks can be car-
ried out using the mouse, as you lear-
ned to do under Windows.
Some thought is also required when
switching off a PC running Linux.
Because the cache has to be emptied
first, and all running programs properly
terminated, it is necessary to run the
shutdown command before you actu-
ally switch off the PC. Fortunately, the
keyboard combination CTRL-ALT-DEL no
longer causes the computer to be reset
just like that. After pressing this key com-
bination, Linux first closes all applica-
tions and then tells you that the PC can
be switched off.

Red Hat Linux 5.1


Figure 3. The new Red Hat Linux version 5.1 is easy to install, also for beginners.
To illustrate the installation of Linux, we
decided to use the latest version 5.1
enormous cost. None the less, the PC trol, the change is radical, requiring from the American company Red Hat.
gaming market has a tremendous quite some getting used to. This particular distribution is known for its
potential. Maybe this situation will After the installation of Linux, which is simple installation.
change for the better in the near future. quite simple thanks to the modern dis- Red Hat Linux is available in different
Drivers are essential for the proper tributions (we will revert to this below), versions. There is, for example, a set of
controlling of all kinds of peripheral the computer is restarted, and a kind of six CD-ROMs (Red Hat Power Tools) for
devices. Although there are suitable DOS prompt appears on the screen as about 20 containing the latest Red
Linux drivers for most standard equip- you may remember it from 10 years Hat Linux version for different proces-
ment around, you should not expect ago. The obvious question is then: what sors, all source code files and a large
have instant access to a driver for the do I do now? number of Linux applications. Docu-
very latest model of, say, a laser printer. Linux has a very extensive command mentation is not supplied in book form
This requires (1) a Linux user willing and set, but all commands have different but as a file on the CD-ROMs.
able to develop the driver, and (2) a names than under DOS. Whats more, If you are new to Linux, it may be
manufacturer willing to part with all they have a different effect, and lots of better to obtain the CD-ROM set with
information necessary for this to be extra options. So it would seem wise to handbook, a number of bonus pro-
done. In the mean time, you will have have a list of frequently used com- grams and extensive support, all at the
to make do with a standard driver. mands available. price of about 30. The book provides
Corel estimates the total number of The strict network structure of Linux good coaching with the installation of
Linux users at about 7 million. Most users will strike single users as very odd. There Linux, while support (by email) for the
appear to be in the USA, although Ger- is no way to avoid logging on to the same installation is available for a
many and the UK also have a fair num- system. Depending on your status as a period of 90 days. A separate disk
ber. user you are allowed to make use of makes installing Linux very easy.
certain features. Obviously, as the sole First you have to ensure that a hard
user of the PC you can double as the disk partition of 0.5 Mbytes is available
Getting started with Linux system operator (called root in Linux), for Linux. This is required because Linux
Although there are many enthusiastic who has access to all levels. employs its own file system (although a
stories about Linux in the computer The DOS/Windows user will also have DOS partition may be used, this will
press, an unsuspecting Windows 95 to get used to the totally different struc- cause Linux to be slowed down). Dont
user moving to Linux is sure to feel left ture of his/her PC. All drive (station) let- worry about what will happen to Win-
out in the dark initially, and has to dis- ters have disappeared, and there is just dows, because the relevant part on the
cover that the lights will not come on one directory tree which includes ever- hard disk remains untouched as long
until a vast amount of Linux literature ything (hard disks, CD-ROM drives, as you do not change the partitioning
has been studied (complete hand- floppy disk stations, etc.). Moreover, system.
books are available on the Internet). removable media like floppy disks and After booting the PC from floppy disk
The migration from Windows to Linux CD-ROMs have to be dealt with in a (or direct from the CD-ROM), all main
may be compared to a Windows user quite different way. Because Linux components that make up your PC are,
forced to sit in front of a Macintosh employs a cache memory for all avai- in principle, identified by the installation
computer. Despite a certain similarity in lable storage media, you will have to program. Next, you are taken through
the graphics shell and the mouse con- inform the system when, for instance, a a number of menus in which to choose

4 - 10/98 Elektor Electronics EXTRA PC TOPICS


the keyboard, language, etc. After a After the network configuration, installation. Once you are in the sys-
number of other prompts you arrive at which is not normally required for single tem, you can type commands or
the partitioning section. Two options are users, the clock is set. Then the services launch programs.
available: the fairly Spartan fdisk (the are set that Linux has to launch auto- As you will soon find out, a number of
same name as used for the DOS pro- matically. Finally, you are asked to look things have to be configured at this
gram) and the more extensive Disk at the printer setting and selection. point, and you even have to report
Druid written by Red Hat. The latter pro- The next action on your part is ente- yourself the system as an ordinary user.
gram has a very clear structure. You ring a password for the root this is All this, and more, you will easily find
indicate where Linux is to sit by creating necessary to be able to enter the Linux out for yourself after using Linux for
a couple of Linux partitions in a free system as the main user, after the ope- some time, and, of course, reading the
section of the hard disk. The minimum rating system has started. manual. (Ex-)Windows users will like to
partitions you have to make are a swap The next part of the installation is cru- know that the command startx takes
partition (say, 50 MB), a root partition (/) cial because it involves the boot them to the X-Windows level of Linux.
for configuration files etc., and a user manager and the Linux start program We reckon none of this is too difficult
partition (/usr) for all other software. The called LILIO (Linux Loader). This program for the reasonably advanced compu-
user partition obviously takes up the lar- is normally written to the root sector of ter user. Once you know what to enter
gest part of the available disk space. the hard disk, and enables the user to with the various menus that pop up
Once the marked partitions have choose between different operating during the installation, the total confi-
been formatted, a list appears showing systems which may be available on the guration will take less than half an hour.
programs that have to be installed. The hard disk. The new Red Hat Linux distribution is
main programs have been activated For instance, the LILO may be confi- marked by a superb installation proce-
already, and Windows users will find it gured so that Linux is automatically star- dure during which most hardware is
worthwhile to select all X-window pro- ted a few minutes after the PC is powe- automatically recognised. Even inex-
grams. Initially, you will not need any of red up. If, during that period, you type, perienced users will be able to install
the development software this may say, win (or any other name you may Linux, provided he/she sticks to logical
be added at a later time. Once the have entered in LILO), Windows will be thinking. The manual is a fine product,
selections have been made, the com- launched. So, depending on what you and much more extensive than the one
puter is busy for a few minutes installing want to do on the computer, you can supplied with version 5.0. It provides a
all programs. make your selection and start the ope- step-by-step description of the installa-
Next, the installation program rating system you feel is better suited to tion procedure, comes up with lots of
detects the mouse type connected to the task on hand. useful tips for beginners and advanced
the PC, whereupon a configuration Finally, then, the moment has come users. There are also notes on important
module is started for the Xfree86 server, for the PC to be restarted. After a few matters like Glint, Control Panel and
the Windows-like program. Most grap- dozen messages on the screen the RPM. Furthermore there is an overview
hics cards are automatically recogni- Linux version appears, and you are of all programs that come with this dis-
sed, but you have to enter the highest prompted to log on. For the impatient tribution of Linux, as well as an FAQ
refresh frequencies for the monitor your- among you, we will tell what to do wit- reference section listing frequently
self. If autodetection is not successful, hout too much reading in the manual: asked questions and answers. Finally,
then there is always the possibility of type root to log on, and then enter the should you remain stuck with a problem
doing the settings by hand. password you supplied during the you are unable to solve, help is availa-
ble from a team of specialists at Red
Hat (but only if you have the version
with 90-days support).
In conclusion, Elektor Electronics
readers who like to experiment with PCs
and change lots of system settings are
well advised to have a serious look at
the Linux operating system. Linux repre-
sents a totally different world with a
galaxy of possibilities!
(982072-1)

Figure 4. The window-manager FVWM2 is supplied standard with Red Hat Linux.

PC TOPICS Elektor Electronics EXTRA 5 - 10/98


Atmels AT90S1200 AVR-RISC 8-bit RISC processor has been available for some
time now, and is generally recognised as a very fast device. The price, too, is
good at less than 3 even in the hobby market. So, substituting a couple of logic
ICs (and their sockets) by an AVR device may already pay off. The most interesting
aspect of this processor is, however, that it features a serial interface with direct
access to the on-chip memory. The general concept of the AVR processor was
already discussed in our January 1998 magazine. The present article aims at
showing some more practical applications of the 90S1200, using easy to obtain
hardware and software.

Design by Dr. M. Ohsmannn

AVR-RISC evaluation
system (1)
experiment with Atmels latest
RISC processors

To give its new AVR processor family a instance, a complete assembler (for downloading. So, if you want to famil-
head start, Atmel has made quite a few DOS as well as Windows) and a simula- iarise yourself with these new processors
software utilities available free of tor. The relevant datasheets and soft- without committing yourself to hard-
charge on their web site. There is, for ware documentation are also free for ware for the time being, our advice is

6 - 10/98 Elektor Electronics EXTRA PC TOPICS


ZIF (zero-insertion force) socket. Thats it!
Because of the simplicity of the circuit,
it may even be built on a piece of ver-
oboard or general-purpose stripboard.
IC2c
A more elegant solution is, however, to
R3
1k
6
1
5 use the PCB shown in Fig u re 2.
R4
5k6
5V
2
1
1
R1
10k
4
1
3
R5
10k
Serial download utility
K1 5V R2
IC2a IC2b To enable programs generated by the

100k
1 8
OE Vdd. C7 S1 PROG/RUN
C5 IC1
1 NC NC 24 Atmel Assembler to be loaded into the
2 NC NC 23
SG531P
100n 12.0000MHz 3 /RESET Vcc 22
100n
IC2d K2
processor, you need special download
JP2 R9
4
GND OUT
5 4 PD0
PD1
(SCK)PB7
(MISO)PB6
21 PB7 PB6 9
1
8
1k 1 software. Because the author was
5 20 PB6
6 XTAL2 (MOSI)PB5 19 PB5
IC2e
6
unable to find a suitable program on
2
XTAL1 PB4

X1
7
8 PD2(INT0) PB3
18 PB4
17 PB3
PB5
JP3 R8
1k
10
1
11
R10
10k
7 the Atmel web site, he came up with his
9 PD3 PB2 16 PB2
3
8
own solution. The resulting program and
10 PD4(TO) (AIN1)PB1 15 PB1 IC2f
C2 12MHz C1
R24 11 PD5 (AIN0)PB0 14 PB0 PB7
JP1 R7
12 13
R11 4 its source code file (written in Pascal) is
1k 1 10k 9
GND PD6 available on a disk with order code
1k

22p 22p 12 13
5
R6 R13 R12
986020-1. This disk, and the software
100k

100k

100k
T
ISP/
RS232
picked from the Atmel web site then
5V
forms a complete package, and you
R14

14
PB4
20k are ready to get started.
C6 1% R15

10k
IC2 K3
IC2 = 74HC14 100n R16 1%
7 1 PB3
20k
2
1% R17
Example programs
10k

3 PB0
R18 1% DAC
K4 5V 4 PB1 PB2
9...15V D1 7805 5 PB2
20k
R19
A good way to learn about micro-
1%
10k

IC3
R25
6 PB3
R20 1%
processor programming is to test fully
1N4001 7 PB4 PB1
functional programs, and then modify
1k

20k
8 PB5 R21
1%
10k

C3 C4 9 PB6
R22 1%
and extend them. In case of newly
10 PB7 PB0
100
25V
10
10V
D2 20k
1% R23 released processors, the decisive fac-
20k

FC10HB
1%
tor is often whether or not a supply of
5V
980082-11 ready-made modules is available.
PB0 PB1 PB2 PB3 PB4
Such modules may relieve you from the
burden of writing, say, your own char-
acter input/output routines, to mention
but one example. The project disk con-
tains a fair number of such modules
(see T a b l e 1 ), which should help to
unburden beginners, allowing them to
concentrate on more essential matters
Figure 1. Circuit diagram of the AVR evaluation system.
in the learning process. Unfortunately,
a full discussion of all modules on the
disk is beyond the scope of this article.
Those of you who are interested in the
to go to www.atmel.com, where you will shown in Figure 1. Actually, the circuit programming details are referred to the
find lots of interesting stuff, including consists of no more than a six-fold (hex) commented source code files on the
Schmitt trigger which translates the sig- disk, and to the file XAVR.DOC which
- an assembler for the Atmel AVR fam- nals at the serial PC-RS232 interface presents an overview of available pro-
ily; into levels that can be processed by grams, complete with concise descrip-
- a simulator for the AVR family; processors serial interface, which is nei- tions and application examples. In this
- example programs illustrating: ther RS232 compatible nor asynchro- article, we present just a few of the
simple arithmetic nous. Then there is a switch that many ideas that may be realized using
EEPROM use enables you to change from software the AT90S1200. Our aim is to pick out
download to run program, and a those applications in which speed is the
quartz crystal or crystal oscillator mod- decisive factor. After all, a fast beast
Evaluation system ule which generates the processor like the AVR-RISC processor is by no
Atmel also has available a demonstra- clock signal. If you foresee applications means required to switch a lamp on
tion board and the associated control requiring high accuracy (for example, and off every few seconds! You will not
software. Unlike the above mentioned frequency or time measurements), the find such applications in this article. By
software and documentation, this best choice is the oscillator module (fit- contrast, you will learn, for instance,
material is not free of charge. Because ted in a socket). In that case, only the how various clock signals may be
Elektor Electronics magazine constantly oscillator IC1 is mounted, while X1, C1 derived from a 10 MHz source. Such an
aims at addressing the active (i.e., sol- and C2 are simply omitted. With less application is surely too much to ask of
dering) electronics enthusiast, we critical applications, a simple crystal is, an 8051, while the AT90S120 can man-
started to develop our own experi- of course, the more economical age!
menting system for the AVR-RISC option. If you intend to program lots of
processors. The circuit diagram is processors, then it is advisable to use a

PC TOPICS Elektor Electronics Extra 7 - 10/98


C5
H2
H4

C1
C2
T
T

R24

IC1

X1

980082-1
R3
R4

C7
K1
T
B4 B3 B2 B1 B0

1-280089
ROTKELE )C(
980082-1
(C) ELEKTOR

S1

RUN
JP1

JP2
JP3
K3

R7
R8

PROG
R23 R2

C4
R22 R1

D2
R21
R20

IC2
R19

R25
R18

IC3
R17

C6
R16
R15
R14

R10
R11
R12
R13
R6
R5
R9

C3
DAC
T

D1
K4

H3
H1

Figure 2. Single-sided printed circuit board (available ready-made). K2

One instruction every 66ns: AT90S1200: a quick input/output ports (Port B and Port D) of
applications overview which each pin is individually address-
Tne AT90S1200 may be operated at a Mainly because of its RISC architecture, able as an input or an output. Program
clock frequency of up to 16 MHz. the structure of the AT90S1200 proces- execution runs under the control of the
Because most instructions are executed sor remains wonderfully simple. F i g- central clock frequency which may be
within a single clock pulse, it is possible u r e 3 provides and overview. The sec- any value between 0 and 16 MHz. In
to execute instructions at a rate of tion we are particularly interested in is addition, there is an interrupt control
16 million per second. So, if you want a an array of 30 8-bit registers that may system and a small 8-bit timer/counter.
certain routine to be executed one mil- be used to perform calculations and The complete description of the
lion times in one second, the relevant store results. Then there are two AT90S1200 covers about 50 pages,
program section may have a length of
10 to 16 instructions. Using this number
of instructions quite a lot can be done.
Of course, at the hardware level only,
who can imagine a Windows program
with a length of just a few tens of bytes? Table A
A really fast processor may often be
used when economising on the num- ; semicolon used as comment delimiter
ber of digital ICs while the speed is not
.def sum=20 ; use .def to assign symbolic names to registers
so high as to necessitate the use of mov r2,r3 ;copy contents of register R3 to R2
expensive programmable logic. The ldi r17,r123 ;load register r17 with 123
great thing about such a microcon- add r20,r21 ; register r20 becomes sum r20+r21
troller is that you have access to an adc r20,r21 ; register r20 becomes sum r20+r21+carry
army of registers, and to an accumu- sbi PORTB,2 ; set port B line 2
lator capable of doing sums! Those of clr r27 ; clear r20 to 0
brne loop ; jump to loop when not zero
you who have ever attempted to make sbrs r20,2 ; skip if bit in register set
programmable logic do simple calcu- ; skip next instruction when bit 2 of r20 is set
lations will appreciate this facility.

8 - 10/98 Elektor Electronics EXTRA PC TOPICS


and interested readers are strongly
advised to obtain it from the Internet or
the local Atmel distributor. For now, a
few programming examples to get
used to the AVR controller:

Simple digital word


generator
Because the AT90S1200 is capable of
working at any clock frequency
between 0 Hz (static operation) and
16 MHz, it is perfect for use as a gener-
ator for complex signal patterns, all
based on just one central clock fre-
quency. Normally, such a generator is
built using counter modules and
decoders, and the resulting circuit can
become quite complex because a lot
of additional components may be
needed to keep the effect of glitches
under control. At frequencies below
16 MHz is it, however, perfectly possible
to employ a RISC processor. For exam-
ple, the pulse pattern shown in F i g-
u r e 4 is created with the aid of the pro-

COMPONENTS LIST

Resistors:
R1,R5,R10,R11 =10k
R2,R6,R12,R13 =100k
R3,R7,R8,R9,R24,R25 =1k
R4 = 5k6
R14,R16,R18,R20,R22,R23 =20k 1% Figure 3. Atmel AT90S1200 processor architecture.
R15,R17,R19,R21 = 10k 1%

Capacitors:
C1,C2 = 22pF ceramic (see text) 17 18 19 20 21
C3 = 100F 25V radial
C4 = 10 F 10V radial 1 2 3 4 5 6 7 8 9 10
C5,C6,C7 = 100nF ceramic

Semiconductors:
D1 = 1N4001 B0
D2 = LED red high efficiency
IC1 = SG531P12.0000MHz EPSON
(Eurodis), see text
IC2 = 74HC14
IC3 = 7805
B1
Miscellaneous:
X1 = 12MHz see text
K1 = 24-way Aries 0.3-0.6inch (Farnell)
JP1,JP2,JP3 = 2-way jumper
S1 = slide switch, 1x changeover, PCB
mount
B2
K2 = 9-way SUB-D socket
K3 = 10-way boxheader (optional)
K4 = mains adapter socket, PCB mount 980082-13
PCB: order code 980082-1, see Readers
Services page.
Disk: order code 986020-1, see Readers Figure 4. Because of its speed, the Atmel controller is capable of generating complex
Services page. digital patterns at frequencies well over 10 MHz.

PC TOPICS Elektor Electronics Extra 9 - 10/98


PC programs 6 clock cycles, and then wait exactly
428376233 cycles for the game to
SER90 program download utility for evaluation board. Pascal source code
commence again. All you need for this
file included on disk.
function is a counter capable of keep-
V24C OM V24 serial communication program. Pascal source code file included ing track of the necessary number of
on disk. clock cycles. Four registers in the
processor, spanning a total width of
AVRASM.EXE AVR assembler (DOS version). Included by courtesy of Atmel UK. 32 bits, and a couple of addition
instructions are sufficient for this pur-
pose. No soldering is required when the
number of cycles has to be changed
AT90S1200 example programs for whatever reason. All you have to do
File Function
is change a few constants in the pro-
gram, and thats it. This kind of flexibil-
XSEROUT1 output characters via RS232, 9600 bits/s ity is simply not available in traditional
wired logic, and very expensive in pro-
XHEXOUT1 output registers via RS232, hex format grammable logic (in particular, devel-
opment tools).
XHEXOUT2 output all 32 registers (dump) via RS232 The collection of example programs
XDECOUT1 output 24-bit values (0-16777215), decimal format, via RS232
found on the project diskette includes
a simple pattern generator that reads
XSERIN Input characters via RS232, 9600 bits/s its pattern information from the serial
interface (via XPATGEN2.EXE and XPAT-
XFMES1 frequency measurement up to 5 MHz, 1s gate, RS232 output, decimal, GEN2.PAT).
at 9600 bits/s (980082-1)

XTMES1 time measurement, 1 ms to 8 s, 0.5 ms resolution, RS232 output, 9600


bits/s
Next months second and final instal-
ment will continue with programming
XNCO1 numerically controlled oscillator, output 77.5 kHz using 12 MHz crystal examples including frequency dividers,
numerically controlled oscillators
XNCO2 numerically controlled sawtooth generator, programmable via RS232 (NCOs), time measurement and fre-
quency measurement.
XFRQDIV1 divide by N scaler, N programmable via RS232

XPATGEN1 simple 8-channel pattern generator

XPATGEN2 simple 8-channel pattern generator, patterns adjustable via RS232

XDIV625 divide by 625 scaler, non-overlapping pulses

Table 1. Contents of the project disk


Figure 5
(order code 986020-1).
; XPATGEN1.ASM
; simple pattern generator
gram listed in Figure 5
(XPATGEN1.ASM). The program is short .include 1200def.inc
and its operation boils down to loading
registers r17 through r22 with the ldi r16,$0FF ; set output B to totem-pole
out DDRB,r16
desired signal combinations. Next, a
loop is used to output the values on ldi r17,0b0001 ; set patterns into registers
Port B at maximum speed. This program ldi r18,0b0010
may be modified in many ways. For ldi r19,0b0100
instance, by including delay loops you ldi r20,0b0110
ldi r21,0b0010
can create signals with very long peri- ldi r22,0b0000
ods, which are timed at crystal accu-
racy, or synchronous with the clock sig- LOOP: out PORTB,r17 ; output each register to PORT
nal. You should not find it too difficult to out PORTB,r18
out PORTB,r19
modify the program so that the signal
out PORTB,r20
shape does not change during the first out PORTB,r21
out PORTB,r22
nop ; two extra cycles
nop
Figure 5. This little program generates the rjmp LOOP ; this also takes 2 cycles
pulse sequence shown in Figure 4.

PC TOPICS Elektor Electronics Extra 11 - 10/98


Lots of advanced joystick units are available in the com-
puter shops for pretty realistic control of various flight sim-
ulator programs. Builders of model aircraft will fail to
appreciate this approach, being used to the control
sticks on their R/C transmitters. The circuit shown here
enables modellers to continue using these transmitters
for over-the-air control of a flight simulator running on a
PC.

Design by U. Har tog

R/C interface for PC


flight simulator
THE solution for the true modeller

model to be flown in all directions.


Unfortunately, the R/C modeller frater-
nity is simply overlooked by the mar-
keting departments of joystick manu-
facturers. So, out of doors the R/C mod-
eller controls his plane in a different
way than in front of the PC, and that, as
we see it, is not good if he wants to
improve his flying skills.
The circuit presented here can
change this undesirable situation. The
circuit not only promotes the use of the
familiar control sticks, it also allows the
flight simulator to be controlled over the
air, that is, with the R/C transmitter in
your hands.
So put on your cap and your sun-
glasses, switch on your R/C transmitter,
and take off

Interfacing
Converting the receiver unit normally
installed in the model in such a way
that it can be connected up to a PC
requires quite a few changes to the
electrical signals. After all, such a
Microsoft and other suppliers of PC a long shot as we write this. For now, we receiver normally drives a set of servo
peripherals have been successful at will have to content ourselves with very motors with pulse-width modulated dig-
producing joysticks whose feel comes high quality joysticks like the ital signals. These signals, in turn, con-
pretty close to that of the control sticks SideWinder. trol analogue actuators like the rudder
in a real plane. In fact, the realism of Over the years, model builders and ailerons. The control of the PC is
these joysticks is such that the next thing around the globe have grown accus- entirely different in this respect. Nor-
PC gamers will want is an imitation tomed to their own way of controlling mally, a pair of potentiometers is used
cockpit! Regrettably, that seems to be aircraft: by control sticks that allow the for the analogue part of the control,

12 - 10/98 Elektor Electronics EXTRA PC TOPICS


Figure 1 shows how the analogue sig-
5V nals are created. The digital servo sig-
R8
IC1 = 4093 C3 nal reaches the circuit and appears at
IC1c

1k5
10
8 the inputs of IC1b and IC1a. The output
& 9 10
R10 16V of IC1d supplies the buffered signal. Via
a monostable multivibrator consisting of

100k
CTR14
3
7 R1
47k
C2, R14, R15 and D1, this signal is used
IC1b 5 R2 to reset a counter type 4060. The reset
5 R11 IC2 4 39k
6 &
4
100k
C1 10p
5
4 R3
33k input of the 4060 is pulled high on the
9 !G 6 R4
R12 CX 6 22k rising edge of the input pulse. When the
10 14 R5
39k RX +
CT
7 15k monotime has elapsed, the counter is
11 13 R6 T2 R9
IC1a IC1d
RCX 8 6k8 enabled again. The component values

33k
15 R7
C2 9 2k2
1
3
12
11 12 1
in the monostable circuit result in a
2 & & CT=0 11
13 2 BC237 reset pulse with a length of 1 ms.
100n 12 5V
4060 3 Although R15 allows the pulse length to
13
R14 be accurately adjusted, it can be left
at mid-travel because this setting is not
4k7

14 16
D1
IC1 IC2 all that critical. All IC outputs are pulled
R13 R15
1N4148
7 8 low during the reset pulse. However,
10k

10k when the input signal is at logic 1, both


inputs of IC1b are also at 1, so that the
oscillator in the 4060 is enabled. Here,
982071-11
the oscillator operates at about
200 kHz. No counting takes place, how-
ever, as long as the reset input is acti-
Figure 1. Circuit diagram of the interface designed to convert servo signals into an ana-
vated.
logue signal whose level and timing can be recognised by the gameport on the PC.
After the monotime of about 1 ms,
the oscillator pulses are duly counted,
and a 7-bit binary code appears at the
output of IC2. In the quiescent state,
when the pot is at mid-travel, the servo
5V
IC1 = 4093
LED1 LED2 pulse has a length of about 1.5 ms.
T1, T2 = BC558B IC1c Depending on the position of the con-
8
10 R9 R4
& 9 C4 C7 C8 trol stick on the transmitter, the pulse
2k2

2k2

R10
length varies between 1 ms and 2 ms.
100k

100n 10 10
CTR14
3
7 16V 16V
2 For the present circuit, the result is that
IC1b 5 T2
5 R11 IC2 4 R6 the measurement is actually limited to
4 C1 10p 4
6 & 100k
!G
5 6k8
the parts of the servo pulse that are
9 6 3 x 1N4148
R12 CX 6
39k
10
RX + 7
14 D2
1
longer than 1 ms.
CT
IC1a IC1d
11
RCX 8
13 D3
R7
T1 The binary output code is converted
15 D4
1
3
12
11
C2
12
9
1
6k8 into a direct voltage by a D/A converter
2 & & CT=0 11
13 100n 12
2 built from discrete components. The
4060 5V
13
3 component values used here result in a
R14
direct output voltage range of 2 V to
4k7

14 16
D1 4 V. In practice, this can be relied upon
IC1 IC2
R13 R15
7 8
R8 R5 to give adequate results. This variable
1N4148
10k

22k

22k

10k direct voltage simulates the signal at


the wiper of the pot fitted in a joystick.
982071-12 The oscillator may be halted by feed-
ing back the digital output signal from
IC2 to IC1b. Disabling the oscillator
may sometimes be necessary when the
discriminator circuit is (yet) out of align-
Figure 2. The Fire buttons are also simulated. This circuit is a bit simpler than that of the
ment. If the setting is much shorter than
analogue interface, mainly because it has no D-A converter.
1 ms, the counter can shoot past its
highest state causing the output volt-
and a number of digital signals for the Because each of these signals will have age to return from 4 V to 2 V an
fire buttons. to be applied to the PC gameport in unpredictable result. As soon as
For optimum control of the flight simu- analogue and/or digital form, such an counter state 96 is reached, the output
lator, for instance, Microsoft Flight Sim- interface will be unknown to model of IC1c drops low, and the oscillator is
ulator 98, we need: builders. So, some electronics has been halted. The output voltage remains
thrown in to give the signals the proper frozen and the output remains stuck at
* Up shape and level. The circuit is designed the high level of about 4 V. Once the
* Down such that four digital signals can be circuit is properly adjusted, this circuit
* Left generated in addition to the usual four will not be actuated, and the oscillator
* Right analogue signals. What more can the stops as soon as the servo pulse is over.
* Two Fire buttons budding pilot aspire to have? The counter state remains frozen until a

PC TOPICS Elektor Electronics EXTRA 13 - 10/98


Figure 3. Copper track layout of the analogue interface board. This board contains all electronics to simulate four potentiometers (two
control sticks). Board not available ready-made.

new servo pulse appears at the input. has elapsed, the counter starts to oper- the author. One board is reserved for the
A kind of feedback is also applied in ate again. The first 15 clock pulses analogue section, and one board for the
the interface that generates the digital have no effect on the outputs con- digital section. The copper track layouts
output pulses (Figure 2). At a servo nected to diodes D2, D3 and D4. The and component overlays of the ana-
pulse length of 1 ms, output 1 is acti- output level of IC1c is then high, and T2 logue board are shown in Figure 3,
vated, or output 2 with longer pulses. is switched off. Transistor T1, on the other those of the digital board, in Figure 4.
Here, too, the pulse length needs to be hand, is allowed to conduct, and LED Making your own PCB from this artwork
examined. When the reset time of 1 ms D1 lights up. If a counter state between should not be too difficult if you have the
16 and 31 is right equipment and tools.
reached, the base The completed boards may be
of T1 is pulled high assembled in a sandwich construction
via D2. Both T1 to make a compact unit.
and T2 are then The construction we think should not
off, and neither of cause too many problems, mainly
the two fire buttons because there are no critical sub-cir-
is active. When the cuits. Simply fit all the parts in accor-
counter state dance with the component overlay
becomes 96 or and set the presets to the centre of their
higher, both inputs travel. Because the PCB layout is pretty
of IC1c are logic dense, you have to work carefully and
high, allowing T2 use a solder iron with a small tip. Note
to start conduct- that the components are consecutively
ing. The second numbered on the PCB. The first ana-
fire button is then logue interface contains components
active. In this sim- as used in the circuit diagram. The sec-
ple manner, the ond one has an extra 2 before each
tolerances in the component reference number. Likewise
pulse lengths are for interfaces 3 and 4, which have a 3
ironed out. and a 4 affixed, respectively.
It will be clear that the value of R1 is
the same as that of R21, R31 and R41.
Printed cir- This method of numbering the parts is
cuit board also applied with the digital interface.
Building this project
is made pretty easy
by the PCB designs Ten wires
submitted to us by The circuit does not need a separate

14 - 10/98 Elektor Electronics EXTRA PC TOPICS


Ladies and gentle-
men this is your captain
speaking. We are
ready for take-off. On
behalf of the crew: we
wish you a pleasant
flight.
(982071-1)

Figure 4. Copper track layout of the digital interface board. Board not available ready-
made.

power supply because its supply volt- Depending on the number of channels
age may be stolen from the game supported by the transmitter/receiver
port on the PC. So, make sure you have combination, a total of four fire buttons
two extra wires available in the con- and four analogue outputs are avail-
necting cable, and tap the necessary able. On the board, the outputs are
supply voltage from the port. The pin clearly labelled, so that the necessary
allocation of the gameport connector electrical connections are quickly and
shown in Figure 5 will help you find the easily made.
relevant signals and voltages.
The servo connections on the
receiver module may be wired directly
Figure 5. Pinout of the 15-way gameport
to the corresponding inputs on the
connector on your PC. Use this diagram
interface board. No new connectors
as a reference to connect up the inter-
have to be bought, or wires cut.
faces.

PC TOPICS Elektor Electronics EXTRA 15 - 10/98


Tape streamers are used not only to secure data, sys-
tem software, but also to transfer large files from one
computer to another. This article describes a simple
adapter that allows an internal tape streamer unit to
be used as an external back-up device. The adapter
employs a modified slot bracket and the PCs inter-
nal floppy disk controller.

Based on an Idea by H. Flohr

external port for tape


streamer
connects to floppy-disk controller

External backup devices are not only a direct connection to the floppy disk The coupling connector on the
harder to obtain than their internal controller unit. bracket leaves sufficient room for the
counterparts, but also more expensive. Our reader Mr. Flohr came up with power supply plug. Unfortunately, we
Whats more, they are usually slower an equally simple and practicable are not aware of disk drive power plugs
than internal versions, mainly because solution. He suggests using a slot with a flange, so that this assembly will
data to be copied to and from the bracket in which a clearance is cut that have to be secured by a small support
tape travels by way of the parallel allows a 34-way flatcable to be bracket, or suitable glue. Alternatively,
(printer) port. If it is no longer possible to passed. The flatcable is fitted with con- a completely different plug/socket
fit an internal tape drive in a PC, you nectors at both ends. At the side of the combination may be employed.
may want to consider fitting the unit in bracket, a connector with a flange is Whichever system you decide to use,
an empty floppy-disk drive case, and used, and at the controller side, one make sure it is effectively polarized to
use the streamer as an external unit. without a flange. The connectors sup- prevent wrong connections with disas-
This solution is economical, quick and plied by 3M are perfectly suitable for trous results!
straightforward, although it does require this application. (982061-1)

16 - 10/98 Elektor Electronics EXTRA PC-TOPICS


TEST & MEASUREMENT

418/433-MHz field-
strength meter
Reliable data trans- range-test and equip-
mission using a radio
link requires the trans-
ment positioning aid
mitter signal to be
received as clean as
for 70-cm SRDs
possible, and at suffi-
cient fieldstrength.
Particularly inside
buildings this is often
problematic because
of reflections and
attenuation. The field-
strength meter pre-
sented in this article is
specifically designed
for type-approved
licence-exempt
418/433 MHz short-
range signalling
devices (SRDs),
allowing the local RF
fieldstrength to be
measured, and
receivers and trans-
mitters to be installed
in favourable
positions.
Main Specifications
- Simple construction using few parts
- Simple to use
- Quantitative and qualitative evaluation of fieldstrength
- AM/FM modulation detection
- LED bar readout (dot mode)
Based on an Application Note from Heiland Electronics - Compact construction with integrated antenna
- Battery operated

Elektor Electronics 10/98


14
of two preset potentiometers in the
1 external voltage divider. In this way,
RF input stage mixer selection the RHI and RLO pins receive
adjustable voltage levels representing
the upper and lower switching thresh-
old, which define the range of the bar-
graph readout.
The measurement input of the
LM3916, labelled SIG (pin 5), is not
connected directly to the AM output of
oscillator the SRD module, but via peak detector,
D1-C2, and a level control, P3-R4.
When a frequency-modulated trans-
mitter is being received, the level at the
AM output is virtually independent of
the modulation signal. After all, the
AF amplifier IF amplifier carrier level remains virtually constant
pulse shaper FM demodulator when FM is used. In that case, the
diode and capacitor have no function
the diode could be replaced by a
980038 - 16 wire link, and the capacitor could be
Ub = 5V OUT omitted. The situation is different in
Figure 1. Block diagram of the case an AM transmitter is used because
The field- receiver module. This is basically ence voltage the demodulated signal then appears
strength meter is a superheterodyne receiver with source. Each at the AM output of the receiver mod-
based on a a SAW-stabilized local oscillator individual com- ule. In that case, the diode-capacitor
ready-made and an intermediate frequency of parator output combination ensures that the peak
SRD receiver 10.7 MHz. directly drives value of the demodulated signal is
module with a the associated taken as a measure of the fieldstrength.
factory-installed LED. The scale of Preset P3 allows the signal voltage to
output that supplies a voltage between the readout is linear in case of the be attenuated to some extent, enabling
0.2 V and 1 V which is logarithmically- LM3914, and logarithmic in case of the the scale factor of the LED bar to be set.
proportional to the RF signal strength LM3916. The latter scale has dB steps Because pin 9 (MODE) of the readout
at the receiver input. The receiver as usually applied in VU (volume unit) driver is not connected, the LED bar is
module type HE433/2R (UK: meters. As indicated by the block dia- operated in dot mode, in which only
HE418/2R), by the way, is the same as gram of the LM3916 (Figure 4), the one LED lights at a time.
the one used in the 418/433 MHz Con- internal potential divider is connected The circuit is powered by a 9-V bat-
trol System described in last months between the pins labelled RHI (pin 6) tery in combination with a 5-volt fixed
issue. and RLO (pin 4). In the circuit of the voltage regulator type 78L05 (IC1).
The pinning of the receiver module fieldstrength meter these two pins are Instead of a regular on/off switch, a
is shown in Figure 2. The receiver is connected to an external voltage push-button is used to power the
capable of demodulating AM (ampli- divider (R1, R2, R3, P1 and P2). This instrument. After all, your in-situ field-
tude modulation) and FM (frequency divider is supplied with the reference strength readings should only take a
modulation) transmissions. For FM voltage from the receiver module few seconds at different locations.
use, the AM output doubles as the sig- (2.4 V), so that the internal reference Because the current consumption is
nal strength (S meter) output, supply- voltage of the IC is not required here. modest at just 13 mA or so, the battery
ing a direct voltage which is logarith- This is in contrast with the standard will have along life. Finally, diode D12
mically proportional to the level of the application circuit of this integrated cir- acts as a polarity reversal protection,
received RF signal. Also of good use is cuit. and LED D14 as an on/off indicator.
the 2.4-volt (100 mV) reference volt- The output labelled REFOUT
age at pin 2 of the module. This voltage (pin 7) is therefore only connected to CONSTRUCTION
may be loaded with up to 1 mA. In the ground via resistor R5. This resistor is Provided you stick to the component
present circuit, it acts as a reference needed because the load on the mounting plan shown in Figure 5,
potential for an LED bargraph display. REFOUT pin determines the LED building the fieldstrength meter
brightness. should not cause problems.
BARGRAPH READOUT The internal voltage divider pins, If you do not have an RF signal
As you can see from the circuit dia- RHI and RLO, are taken to the wipers generator available for the final align-
gram in Figure 3, the electronics con-
sist of no more than a type-approved
and licence-exempt SRD receiver mod-
ule coupled to an LED driver IC type Technical Data
LM3916 (alternative: LM3914). This IC
accurately converts a direct voltage Receiver type: SAW-stabilized superheterodyne receiver
applied to its input into LED scale Power supply: 9-V battery (IEC6F22)
units. Many of you will be familiar Current consumption: approx. 13 mA
Receiver frequency: 433.92 MHz
with the basic operation of the
Range: 30-90 dBV
LM3914/16, because it is often used for
Intermediate frequency: 10.7 MHz
bargraph LED readouts. Ten compara- Modulation detection: AM and FM
tors compare the input voltage with Temperature range: 0-50 C
discrete values supplied by a voltage Size: 142 x 57 x 24 mm
divider. As you can see, the voltage to
be divided is obtained from the refer-

Elektor Electronics 10/98 15


as a function of the RF signal level (in
2 dBm V) available at the antenna input.
Because this characteristic was found
to be repeatable on several modules we
HE 433-2/R had on test, the possibility exist to enter
dBm V marks on the curve, where the

DATA OUT
FM/AM IN
adjustment is carried out using direct

30
AM OUT

FM OUT
voltages. This adjustment is the same

GND

GND
for the LM3914 and the LM3916 the

VCC
ANT

REF
RM 2,54 only difference is the print around the
readout.
Connect the 9-V supply voltage to
the board (LED D14 lights), short-cir-
50 cuit the push-button contacts, and first
check the presence of the 5-V supply
980083 - 12 voltage at pin 7 of the receiver module.
Figure 2. Pinout of the Next, see if the 2.4-V reference is pre-
ment of the instru- SRD receiver module fitted in the case, how- sent at pin 5 (normal tolerance:
ment, only the cathode from Heiland Elec- ever, until it has been 100 mV). If this value is correct, then
of diode D1 should be tronic. adjusted. the voltage at the wiper of P2 is set to
soldered the anode The antenna con- 200 mV, and that at the wiper of P1, to
terminal remains open as yet for direct nected to the receiver input is a straight 700 mV. Because of the loading of these
voltage measurements. It is not possi- piece of solid wire with a length of two pins by the internal voltage
ble to connect the module the wrong about 17 cm (see photograph). divider in IC1 (between RHI and
way around because its pinning RLO), the two settings will interact to
matches the PCB layout. A different ADJUSTMENT some extent. Consequently, the wiper
receiver module can only be used if it As already mentioned, there exists a voltages mentioned above will only be
has an S-meter output supplying the logarithmic relationship between the achieved by alternate tweaking of the
same voltage range as the HE433/2R. local fieldstrength and the voltage level two presets.
Also, you have to take a serious look at at the AM output of the receiver mod- Next, connect the anode of D1 to
the connections to the readout circuit, ule. Using the linear the above-mentioned
the readout range, the supply voltages, LM3914, you therefore Figure 3. Circuit dia- auxiliary voltage for
etc., and, of course, the final adjust- obtain an LED scale (dB gram of the field- the adjustment of P3
ments. Unfortunately, no SRD receiver scale) with a logarith- strength meter. The (scale factor). This
modules other than the ones from Hei- mic range. The charac- module has an AM helper voltage is best
land Electronic could be tested for this teristic shown in Fig- demodulator output derived from the stabi-
design. ure 6 illustrates the supplying a voltage lized 5-volt supply line
The printed circuit board fits exactly direct voltage at the which is proportional by means of a 3.9-k
in the transparent case mentioned in AM OUT output (pin 2 to the fieldstrength. series resistor and a 1-
the parts list. The board should not be of the receiver module) This S-meter voltage is k preset. The wiper
processed by a LED
bargraph driver.
5V D1
3
7
M1
2 P3
5V
* see text * zie tekst
AM-OUT BAT82
F/A-IN
3 100k * voir texte * siehe Text
C1 4
FM-OUT
C2
390k

R4 C3 D11
100n HE433 MIN
2/R 330n
1 8 100n
DIG-OUT D10
6 5
REF
3 D9
1
L1
3k3

R1 9
D12
IC2 MODE 18 D8
5 L2
1N4001 78L05 5V SIG 17
6 IC1 L3
RHI 16 D7
D13 P1 7 L4
S1 REFOUT 15
R5 L5
4V7 1k D6
14
L6
3k3

0W5
LM3916 * L7 13
220

R2
12 D5
R6 8 L8
REFADJ 11
BT1
820

4 L9
RLO 10 D4
P2 L10
9V C4 C5
1k D3
D14 2
100 10
16V 10V
390

R3
D2

MAX
980083 - 11

16 Elektor Electronics 10/98


Figure 4. Block diagram of the
4 LED driver type LM3916. It dif-
fers from the LM3914 and
3915 in respect of the values
of the resistors in the internal
voltage.

SIG input (pin 5 of IC1). LED D7 (the


one at pin 15 of IC1) should just go out,
and LED D6 (at pin 14) should start to
come on.
If you have a calibrated RF test gen-
erator available, its output is connected
to the antenna input of the receiver
module. Next, you set a generator out-
put level of 45.5 dBm, which equals
about 1.3 mV at the antenna input, or
60 dBV across 60 . D1 has to be sol-
dered in place at this point, and P1 is
adjusted to 530 mV at pin 5, as
described above.
When the LM3916 is used, the scale
shown in Figure 7 may be used, the
divisions were established on the basis
of field trials. The scale is shown at true
size for convenient copying (for private
ands personal use only).
When the LM3914 is used, the LED
scale has divisions of 5 dBV per LED,
allowing the respective values to be
easily printed on the case.

APPLICATIONS
of the preset is then connected to the that direct voltage level corresponds to The fieldstrength meter is suitable for
anode of D1, and a voltage of 0.75 V is a fieldstrength of about 60 dBV. Next, checking the operation of AM and FM
set. According to the graph in Figure 6, adjust P1 to a voltage of 530 mV at the transmitters operating at 418 MHz or
433 MHz, as well as for the evaluation
of transmission paths, the absolute
range of a certain transmitter, reception
5 quality and the suitability of certain
locations for a transmitter or receiver.
Also of great importance is the ability
D10

D7

D6
D14
D11

D9

D8

D5

D4

D3
D2

to spot sources of interference, and the


presence of foreign transmitter signals
C3

IC1
in the area normally covered by your
R5
own receiver system.
P3
P2

If, for example, you plan to imple-


P1

ment a wireless data transmission sys-


R4

R2

tem using SRD modules for the 70-cm


R3
band, the fieldstrength meter is
R1 installed at the planned receiver loca-
tion, and the test push-button is
C2

pressed. If the readout already shows


D1 an indication, that is, with your own
M1

R6
transmitter switched off as yet, then
D13
another user is on the same frequency.
ROTKELE )C(
1-380089
980083-1

Obviously, this signal may interfere


C5

with that to be picked up from your


(C) ELEKTOR
980083-1

D12
own transmitter. It is a simple matter to
S1 IC2
C1

determine whether the interfering sig-


nal is AM or FM. In the case of FM, a
fixed number of LEDs will light all the
C4

time. If an AM signal is picked up, the


BT1

readout will show some variation.


-

Figure 5. Single-sided
9V

printed circuit board


designed for the
instrument.

Elektor Electronics 10/98 17


18 Elektor Electronics 10/98
COMPONENTS LIST
6 1.1
1.0 Resistors:
UOUT (V) 0.9 R1,R5 =3k3
0.8 R2 =220
R3 =390
0.7
R4 =390k
0.6 R6 =820
0.5 P1,P2 =1k
P3 =100k
0.4
0.3 Capacitors:
0.2 C1,C3 =100nF ceramic
threshold 18 dB V approx. 8 V C2 =330nF MKT
0.1
C4 =100F 16V radial
0.0 C5 =10F 10V radial
0 10 20 30 40 50 60 70 80 90

980083 - 14 Semiconductors:
D1 =BAT82
Figure 6. Logarithmic D12 =1N4001
Weak interference and transmit the D2...D11=LED red high efficiency
characteristic of the S-
from an AM trans- results at certain inter- D14 =LED green high efficiency
meter output. The dia- D13 =4V7/500mW
mitter is generally gram shows the relation vals. In that case, it
IC1 =LM3916 (LM3914) (see text)
not a problem if you between the direct volt- will typically be suffi-
IC2 =78L05
use FM yourself. age at pin 2 of the cient if a temperature
The fieldstrength receiver module and the value is transmitted Miscellaneous:
meter also enables RF signal voltage at the every minute or so. BT1 = 9V PP3 battery with clip and
you to get an idea antenna input, measured For reliable recep- wires
how often an inter- on three modules of the tion of the kind of sig- S1 = push-button 1x make
fering transmitter is same type. nals transmitted by M1 =HE433 2/R* (UK: HE418 2/R*,
actually on the air. see text)
approved SRDs for
Case: Heddic type 222*
When the off-air 70 centimetres, a field- PCB, order code 980083-1 (see
periods are sufficiently long, there strength of about 50 dBV is required, Readers Services page)
should not be problems if your system or about 360 V at the receiver input.
is designed to perform measurements In many cases, a small change in the *Manufacturer: Heiland Electronics,
D-48351 Everswinkel, Germany. Tel.
(+49) 2582 7550, fax (+49) 2582
7887.

dB V, dB and dBm
Because the values involved may be considered (logarithmic) ratios rather than
physical units, measuring and expressing relative signal levels, both RF and
AF, is easier if the dB unit is consistently applied instead of, say, millivolts, micro-
position of the receiver or the trans-
volts or milliwatts. In principle, the dB (decibel) may be used to express the
ratio of two (measured) values. For voltage and power ratios, the following basic mitter will enable them to be moved
equations apply for expressions using dB numbers (here, expressed as a): out of a dead zone.
(980083-1)

Voltage ratio a = 20 log10 (U1/U2)

Power ratio a = 10 log10 (P1/P2)

The really practical thing about this notation is that it makes calculations involv-
ing gain and attenuation figures much easier. Whereas gain and attenuation
factors have to be multiplied to arrive at the overall gain or attenuation figure
of a certain circuit or system, the same values expressed in dB are simply
added or subtracted.
A value expressed in dB always expresses a ratio between two arbitrary volt-
age or power values. In RF technology, dBV and dBm represent two of the
most popular reference units. The first is referred to 1 V, the second, to 1 mW.
So, a level of 20 dBm means 100 mW.
To enable two dBV values to be compared to one another, the indi-
cation has to be based on one and the same impedance at which the voltages
have been measured. In RF technology, the reference impedance is normally
50 , 60 or 75 (the first is the most popular).
If you are interested in knowing the exact antenna voltage in V, this value may
be calculated using the above equation for voltages, by using the reference ON 20 45 55 65 75 85
value 1 V for 0 dBV.
The same applies to power levels expressed in dBm, only then the 980083 - 15
equation for power ratios is used, and a reference level of 1 mW is assumed.
Here, too, it makes no sense to compare values unless they refer to the same
impedance. Converting from dBm to dBV and the other way around is no
problem if the impedance, Z, is known. The relation between the three units is
expressed by Figure 7. Suggested scale
(actual size) for the LED read-
P[dBm] = U[dbV] 10 log Z[] out if the LM3916 is used.

Elektor Electronics 10/98 19


GENERAL INTEREST

digital cameras
how do they work?
Digital cameras may
not yet have captured
the imagination of the
consumer market
(although most pho-
tographic retail out-
lets stock them), but
with enhanced image
resolution made pos-
sible by recent devel-
opments, and price
falls they will take an
increasing slice of the
market over the next
few years. Market
research* indicates
that the digital cam-
era market in the USA
will grow from
US$240 million in
1997 to US$ 930 by
the end 2004.
photo: Philips
Europe, too, will see
a dramatic increase
in this market,
although spending All the well-known names are active in extended graphics adaptor type, fol-
on cameras has fallen the digital camera market: Agfa, lowed by vertical grid array cameras
Canon, Casio, Epson, Fuji, Kodak, and greater than megapixel types.
steadily over the past Mustek, Olympus, Ricoh, but few pro- Market researchers* expect that the
few years. This article duce models in each product segment.
There is currently no clear market
megapixel camera will retain its lead,
followed by greater than megapixel
takes a brief look at leader. Manufacturers are currently types and extended graphics adaptors
building up their product portfolios by 2004. The vertical grid array cam-
how a digital camera and concentrate on the increasing eras market share will then have
works. sophistication of the image resolution dropped to below 1 per cent. This arti-
provided by their cameras. Prices in cle will concentrate on megapixel cam-
the consumer market at the time of eras.
writing (July 1998) vary from 200 to
By our Editorial Staff 700. DEVELOPMENTS
In terms of product types, the Digital cameras are about to become a
megapixel camera is leading the field. real force in the market. Owing to
*Source: Frost & Sullivan Ranking in second place is the recent developments, manufacturers

Elektor Electronics 10/98


22
energy contained in the incident pho-
Photon Photon
1 tons by an amount equal to the energy
difference between the empty and
Gate valence bands. This means that for a
charge to be moved, the energy of the
SiO2
incident light must be greater than the
forbidden band. In CCDs, this nor-
n+ n+
mally means that photons can create
an electron/hole pair if their energy is
greater than 1 eV (electron-volt) and
their wavelength is <1 m. After this
energy has been stored in the sub-
strate, the negative electrons and pos-
p-Si
itive holes must be separated. This is
effected by applying an electric field
a b 980081 - 11 across the substrate, whereupon the
electrons are freed and the holes dis-
Figure 1. Two photon-convert- appear into the substrate.
ing cells: (a) a metallurgical Unfortunately, it is virtually impos-
are finally able to np-junction, and (b) a voltage- lens into electrical sible to move a free electron since its
produce a digital induced np-junction. signals. In most energy is so tiny. Therefore, the
camera that is digital cameras energy, that is, the free electrons are
cost-efficient, has this task is per- gathered over a given period to make
a reasonably storage capacity, and has formed by a charge-coupled discrete packets of charge available.
a resolution that makes it suitable for deviceCCD. These packets are then moved to the
a number of applications. A CCD is a semiconductor storage output, for which a small capacitor is
Although a breakthrough is in device in which an electrical charge is used.
sight, developments are nowhere near moved across the surface. Zeros and Figure 1 shows two variants of a
at an end. Two years ago, the few dig- ones are represented, respectively, by photo-sensitive cell: in (a) a metallur-
ital cameras on the retail market had a the absence or presence of a charge. In gical n-p junction and in (b) a voltage-
resolution of about 280340 pixels; most digital cameras, the charge trans- induced n-p junction. Both use a
today, some of the better-quality digi- fer system, in which a charge is created p-type substrate. The separation of
tal cameras have a resolution by an impinging photon, is contained holes and electrons is effected by an
approaching one million pixels. Of in MIS (metal insulated semiconduc- electric field across the n-p junction.
course, compared with film, this reso- tor) or MOS (metal oxide semiconduc- When the fieldstrength across the
lution is low. A film has not less than tor) capacitors fabricated on a single junction is reduced, the capacitance of
100 lines per millimetre, which means crystal wafer. the capacitor diminishes and the den-
that a standard 35 mm film image has Photons, which may be considered sity of the charge carriers increases.
a resolution of some 24003600 pixels. as elementary particles of light, pass This means that the sensitivity of the
It is expected that within a few years through the lens of the camera on to sensor can be adjusted with a control
there will be digital cameras in the the CCD. The energy contained in a potential.
shops with a resolution of two million photon is converted by the CCD into
pixels, which is, of course, still signifi- an electron/hole pair. If the total CHARGE TRANSPORT
cantly less than the 8.5 million of con- energy is sufficient, electrons may pass The next link in the imaging chain is
ventional film. from the valence band to the empty the transport of the packets of charge
(conduction) band. This causes a hole from the integrating sites towards the
TECHNOLOGY in the valence band. This charge output of the device. There are two
The technology that has made digital movement ways of doing
cameras possible comes partly from reduces the this: either
the semiconductor industry and partly amount of Figure 2. Read-out structure to con- with a MOS
from the film industry. nect the photodiode to the outside
world: (a) a MOS switch, and (b) a
The semiconductor industry has
CCD shift register.
developed compact , high-resolution
image sensors, while the film industry
2
Photon
has developed advanced compression
algorithms, such as JPEG (Joint Photo-
graphic Experts Group), which are
able to convert the enormous amount n+ n+ n+
of data that form a picture into very
compact files.
Today, microprocessors used in dig- p-Si a
ital cameras are able without any dif-
ficulty to compress in a very short time Photon
a digital file of several Mbytes to some
hundreds of Kbytes. These processors
are complemented by memory cards
that can store these data in semi-per- n+ n+
manent form.

LIGHT CONVERTER p-Si b


A digital camera needs a converter that 980081 - 12
transforms the light incident on the

Elektor Electronics 10/98 23


switch containing a sense line or with
a CCD shift register (see Figure 2). In
both, the imaging cell or pixel consists
of a photodiode constructed on a
p-type substrate. The choice between
a MOS switch with a sense line and a
CCD shift register depends to some
degree on the application. Both have
their advantages and disadvantages.
For the MOS switch with sense line,
the fabrication technology is rather
simple, but the switch connects the
small capacitance of the pixel to the
rather large capacitance of the sense
line. This arrangement causes the sig-
nal-to-noise factor to be rather poor.
On the other hand, the technology
for the CCD shift register is more com-
plex in production and requires a clock
to shift the packets of charge to the

photo: Sony
output capacitor via various interme-
diate capacitors. However, the charge
packet taken from the small pixel
capacitance is transferred to the small
capacitance of the output diffusion
and this results in an excellent signal-
to-noise factor. camcorders. see Figure 3. The CCD shift register is
With reference to Figure 2, the con- shielded from any incident light,
version from a packet of charge to a FRAME TRANSFER which means that it can be used as a
voltage at the output pin of the imager Digital cameras use frame transfer (FT) buffer memory.
is done in a classical way: sensing of CCDs, which are different from other The cycle of operation is then as fol-
the voltage changes on a floating types of CCD in the way imaging data lows. In the mode in which light is
n+-region by means of a source-fol- are transported from the light-sensitive registered, all cells are set to the inte-
lower. cell or pixel to the output. In FT-CCDs, grating mode. One part of the CCD
MOS cells, that is, cells that use MOS cells is connected to a high direct volt-
IMAGER CONFIGURATIONS capacitors, are used. Since the imag- age, and another to a low direct volt-
So far, only the operation of a single ing elements, the light-sensitive sensor age. In this mode, photons create a
imaging cell or pixel is explained. In and the capacitors are fabricated in charge, which are gathered into pack-
practical applications, images can be MOS technology, they can be, and ets. At the termination of a defined
built up in a one-dimensional path, for often are, combined in a single design. integration period (in a camera, this is
instance, facsimile, or in a two-dimen- Each photo-sensitive CCD array is the shutter time), the CCD shift regis-
sional configuration, for example, extended by a CCD shift register of ters ensure that their charge is stored
home video or equal length in the light-immune part of the array.
Figure 3. Device architecture of a The charge transport takes place as
frame transfer image sensor. quickly as possible to prevent mutila-
tion of the data.
3 When all packets of charge have
been transported, a start is made with
reading the CCD. During this phase of
Photo-sensitive CCD array

the process, the packets of charge on


one and the same horizontal line (but
on different vertical lines) are clocked
to a CCD output register, whereupon
the packets are shifted to the output
(parallel-to-serial conversion) and con-
verted into a direct voltage. Once a
line has been processed, the next one
is clocked to the output register. This
process continues until all lines have
been read. The video signal is then
available.
Memory array

In principle it is possible for the


photo-sensitive part of the CCD to be
active while data are read from its
light-immune part.

COLOUR
Since all CCD cells react to incident
light in a similar manner, the devices
are suitable for black-and-white imag-
Output Horizontal output CCD register ing only. For colour operation, the cells
980081 - 13
are combined with colour filters to

24 Elektor Electronics 10/98


ccd chip formats
The roots for describing the size of imaging sensors in inches go back to the time when there were only vidicons. A
vidicon with a diameter of 1 inch (25.3 mm) had a rectangular, active window with a diameter of 0.6 in (16 mm). This
format has been retained until today.
CCDs are available in various sizes: 1 in, 2/3 in, 1/2 in, and 1/3 in. Nowadays, 1 in chips are used rarely, whereas
1/2 in and 1/3 in types have experienced a constant growth in applications, mainly in the field of surveillance, miniature
cameras, and home video cameras
Reducing the active sensor surface results in smaller pixels, eventually lowering the resolution. For most applica-
tions, a highly detailed picture is more important than the size of the CCD and thus more important than the size of the

1" 2/
3" 1/
2" 1/
3"
5
11 6.

4.8

3.3
16

6.6
8
9.6

4.4
6.4
8.8
980081 - 16
12.8
dimensions in mm

camera. For instance, the Olympus C-1400L uses a 2/3 in CCD containing 1.4 million pixels. The horizontal resolution is
1280 pixels, and the vertical, 1024 pixels. Note that this deviates somewhat from the usual 4:3 picture ratio.
roots for describing the size of imaging sensors in inches go back to the time when there were only vidicons. A vidi-
con with a diameter of 1 inch (25.3 mm) had a rectangular, active window with a diameter of 0.6 in (16 mm). This for-
mat has been retained until today.
CCDs are available in various sizes: 1 in, 2/3 in, 1/2 in, and 1/3 in. Nowadays, 1 in chips are used rarely, whereas
1/2 in and 1/3 in types have experienced a constant growth in applications, mainly in the field of surveillance, miniature
cameras, and home video cameras
Reducing the active sensor surface results in smaller pixels, eventually lowering the resolution. For most applica-
tions, a highly detailed picture is more important than the size of the CCD and thus more important than the size of the
camera. For instance, the Olympus C-1400L uses a 2/3 in CCD containing 1.4 million pixels. The horizontal resolution is
1280 pixels, and the vertical, 1024 pixels. Note that this deviates somewhat from the usual 4:3 picture ratio.

make them react to the green, blue or developed for them: the progressive with this arrangement, the camera is
red component of the incident light CCD. fitted with advanced software. The
only. Since the human eye is more sen- quality of this determines to a very sig-
sitive to green than to the other PROGRESSIVE CCD nificant degree the quality of the out-
colours, there are more green-sensitive Progressive CCDs use square pixels put image (picture). Finally, a progres-
cells than red and blue ones. which are filtered in the primary sive CCD captures the picture in one
The measured light intensity per colours: red, green and blue (RGB). operation, that is, it does not use two
cell is divided into 256 levels of bright- Moreover, each pixel is associated with halves (frames). Mutilation of fast
ness. In this way, each composite pixel only one primary colour. To ensure moving objects therefore does not
gives 2563 shades of colour, so that true that a perfect image is constructed occur.
colour operation is possible.
There are two types of CCD: one
for video cameras and the other for
film cameras. CCDs for video applica-
tions have rectangular cells and are fil-
tered with cyan, magenta and yellow
filters. Moreover, in these CCDs use is
made of the fact that television pic-
tures are built up from two halves
(frames).
It might appear as if this type of
CCD could also be used in film cam-
eras, but this is not so because in the
case of fast moving objects the differ-
ence between the two frames would
be so large that serious distortion
photo: Olympus

would ensue. Nevertheless, this type


of CCD is easy and inexpensive to pro-
duce and it is therefore used in inex-
pensive digital film cameras. Up-mar-
ket digital cameras use a CCD specially

Elektor Electronics 10/98 25


4 5 source file
white-white-bright red-pink-red-dark red-red-pink etc.

source file light compression


white-white-white-white-white-red-red-red-yellow-yellow etc. 2x white-2x dark red-3x red-1x bright red etc.

heavy compression
lossless compression
2x white-6x red etc.
5x 3x 2x

980081 - 14 980081 - 15

Figure 4. Picture data may be compressed loss- Figure 5. Much more severe compression is pos-
less, for instance, by LZW compression as sible if certain data can be made redundant.
sketched. Illustrated is how the degree of compression
determines the loss of detail.

To ensure optimum results from the compressed in the camera with the aid made redundant. In such compression
CCD, taking account of various prop- of a microprocessor. Of a picture con- algorithms, for instance, JPEG, use is
erties, the device has twice as many sisting of 1028 768 pixels, each pixel made of the fact that the human eye
green-sensitive cells as red- or blue- must be stored with a resolution of 24 can perceive only about 2000 shades of
sensitive ones. bits. This is equivalent to 2.25 Mbyte of colour, which is appreciably fewer
It should be noted that in (good) digital data. In other words, the inter- than the 16.7 million that are regis-
digital cameras a separate sensor is nal memory of a camera, usually tered.
used for each primary colour. The 24 Mbyte, would be able to contain How such an algorithm analyses a
specified resolution does therefore only a few pictures. series of colour shades and replaces it
conform to the actual number of sen- The solution to this problem is an with a much more compact series is
sors. It might be thought that each integral compression algorithm. A dis- shown in Figure 5. The higher the
pixel is built up by three sensors, each tinction must be made between loss- compression, the more detail is lost
reacting to a different primary colour. less compression and redundant-bit and the poorer the quality of the
However, manufacturers have taken a compression. With loss-less compres- reproduced image. Nevertheless, with
different route by computing the sion, for instance, the TIFF (Tagged the use of this kind of algorithm and
desired colour data with the aid of Image File Format) with LZW (Lempel without much discernible loss of qual-
refined algorithms. The colour infor- Ziv Welch a Unisys patent) com- ity, a 2 Mbyte file can be reduced to
mation for each pixel is therefore the pression, use is made of the data struc- 100 Kbyte or less. The data so obtained
result of an arithmetic analysis in ture. Sequential series of identical may be stored in the internal memory
which the data of adjacent pixels are information are clustered as shown in or on the added memory card.
also taken into consideration. Figure 4, which results in a significant [980081]
compression of data.
COMPRESSION Much better efficiency is provided
When the digital data representing a by redundant-bit compression, in
picture have been gathered, they are which, as the name implies, data are

MOS or CMOS?
Currently, CCDs are produced in MOS technology, which has several disadvantages. For example, it is not suitable for
energy-saving circuits, and it is a deviant production pro-cess.
The semiconductor industry pre-fers energy-saving CMOS technology and researchers are therefore working
on the development of CCDs in this technology. Recently, it was announced that the first CMOS CCDs had been produced.
This will, in time, bring down the price of CCDs and, perhaps more importantly, it will become possible to add intelli-
gence to the device. For example, it will then be possible for the data of each and every pixel or cluster of pixels to be
processed on the CCD.
Moreover, a single pixel may be accessed so that new functions, such as picture analysis, can be provided by
the CCD.
The Fraunhofer Institute for Microelectronic Circuits recently announced the design of a CMOS CCD with
120,000 imaging cells and associated logic circuits.
Another research institute has succeeded in developing a single-row photosensor 2048 pixels wide and an
exposure-time range from 100 ns to 4 s. Each imaging cell in this design has its own read-out amplifier, a buffer and
dark compensation. This enables the CCD to be used even at very low light intensities.

26 Elektor Electronics 10/98


MICROPROCESSORS

versatile control
system PLC87(A)
part 1: a PLC based on the
Simatic S5 instruction set

In the industry, there is


no such thing as
process automation
without Programmable
Logic Controls (PLCs).
These systems are typi-
cally quicker and easier
to program than just
about any microcon-
troller circuit, and they
also allow variables to
be observed during pro-
gram execution. The
PLC87 and 87A boards
described here are basi-
cally 8751 (or 87C550)
based systems capable
of executing Simatic-S5
oriented command
sequences, the S5 com-
mand set representing The PLC87 is a small plug-on board
containing a microcontroller system
then has 10 digital inputs and outputs
as well as 6 analogue/digital inputs
a well-established that may be programmed like a tradi- available for your applications.
tional PLC. It also allows an LC (liquid The PLC87 board is connected to
industry standard. crystal) display to be connected in a the application circuit by way of four
simple way. In addition to the micro- boxheaders. The LCD module has two
controller, an 87C51 or 87C550, the lines of 16 characters, and is connected
small single-sided board also contains to another boxheader without the need
a serial EEPROM and a level converter for any additional hardware. If addi-
type MAX232. When the 87C51 is used, tional input keys are required, these
the PLC87 has 16 digital inputs and 12 may be connected to the multiplex
digital outputs. When the analogue inputs.
version, the PLC87A, is built, the The PLC87 board processes a com-
Design by R. Geugelin 87C550 controller used, and the system mand sequence (CS) which is built on

Elektor Electronics 10/98


28
IC4 5V

1 > 9V D2 7805

R6
5V

R1 1 8x 10k
1N4002

1k5
C6 C9
C1 5V
10 40 100n
C14 C13 D1 63V K3
10n
2 3 4 5 6 7 8 9
31 39 1 2
EA/VP P0.0
470 47
25V 63V 9 38 3 4
RESET P0.1
R3 37 5 6
29 P0.2
PSEN

10k
36 7 8
30 P0.3
ALE/P 35 9 10
5V P0.4
34 11 12
P0.5
K1 33 13 14
IC1 P0.6
2 1 1 32 15 16
P1.0 P0.7
4 3 2
P1.1
6 5 3
P1.2
5V 8 7 4
P1.3 87C51 P2.0
21 1 2
10 9 5 22 3 4
P1.4 P2.1
12 11 6 23 5 6
P1.5 P2.2
R4 R5 14 13 7 24 7 8
C12 P1.6 P2.3
2k2

2k2

16 15 8 25 9 10
8 P1.7 P2.4
100n 26 11 12
P2.5
1 27 13 14
A0 P2.6
2 IC3 SCL 6 12 28 15 16
A1 INT0/P3.2 P2.7
3 5 13
A2 SDA INT1/P3.3 14
T0/P3.4
X24C16 K4
7 T1/P3.5 15
11 TXD/P3.1 WR/P3.6 16
4 10 RXD/P3.0 RD/P3.7 17

X1 X2
C2 20 19 18
X1

K6 2 C7 C8
5V V+ 1
1 16 C1+ C3
27p 27p
6 K5
IC2 3 11.0592MHz
2 C1 1 2
14 11
7 T1OUT T1IN K2 3 4
13 12
3 R1IN R1OUT 2 1 5 6
8
R2IN R2OUT
9 5V
8 4 3 7 8
7 10
4 C11 C10 T2OUT T2IN 6 5 9 10
4
9 C2+ C4 8 7 11 12
100n MAX232 R2
5 15 10 9 13 14
5
C2 15 16

1k
V- 5V
6
C5

C2 ... C5; C10 = 4x 10 / 63V


980066 - 11

Figure 1. The PLC87 is really no more than a small microcon-


troller system.
a PC using a special program called
K7
PLC87. The command sequence is
actually the programming language of
the PLC, and will be the subject of K8
part 2 of this article, to be published 16 15
next month. The CS mnemonics are 14 13

transferred from the PC to the PLC87 12 11


10 9
by way of a serial link. The PLC87 pro- 8 7
gram also allows the values of variables 6 5

to be checked and modified. The same 4 3


2 1
software is used for the analogue ver-
sion PLC87A. The command sequence
is heavily based on the Simatic S5
instruction set, to with added com-
mands for display control and data
logging. Program structuring is, how-
ever, not possible because that would
exhaust the resources offered by the
microcontroller. Also, the PLC87(A) is
not suitable for fast events because the
D3 D4 D5 D6 D7 D8 D9 D10
command sequence is marked by a rel- R7
atively long cycle time.
1k

The analogue version PLC87A S1 S2 S3 S4 S5 S6 S7 S8

enables you to capture temperatures


and other measurement values from 8x 1N4148 980066 - 12
the real world. The only difference
with the all-digital PLC87 is the modi-
fied pinning of the control board. Any
analogue input may also be configured control, or a simple text output system ple, to implement an intelligent heat-
as a digital input. if its LC display is used. Alternatively, ing control, a code lock, a garage door
The PLC87(A) board may be the you may want to use it to learn the opener or even a simple datalogger.
heart of a small system for machine basics of PLC programming, for exam- The PLC87 board may also be used to

Elektor Electronics 10/98 29


CS program memory,

980066-1
IC4 C2
and a serial interface to
2

C10
H4

S1

H4
H1 H1

K6
C13 establish the link to the

R7

K8

C11
1-660089
ROTKELE )C(
PC. These sub-circuits are

D2
easily identified in the

H7
S2

H5

C3
D4

circuit diagram shown in


D3

IC2
Figure 1. The 87C51 con-

C4
C9
troller exploits only a part

R2

C14
D5

of its port P3 for internal


S3

C5
K4
operations (EEPROM,

C8 C7
X1
serial interface) all
other port lines are freely
D6

S4

C1
available for PLC applica-
tions. The LC display and

R5
R4
the input keys are wired
D7

S5

to connector K5. Because


the PLC87 inputs and

IC3
outputs make direct use

K2
K5
of the controller port
D8

IC1
S6

lines, it should be noted


1-660089
ROTKELE )C(

980066-1

C12
that input signals are TTL
K7

D1
compatible, and output

C6
D9

S7

signals can not be loaded

R3

R6
too heavily. In general, it
will therefore be neces-
D10

sary to add drivers to the


S8

H6

R1
K3
H2

H2
H3 H3

controller port lines.

K1
The few parts are
quickly installed on the
small printed circuit
board which is single-
sided. It is best to start
980066-1
(C) ELEKTOR

with the smaller compo-


nents like capacitors and
resistors, and finish with
the boxheaders and the
integrated circuits. We
recommend using sock-
ets for the ICs. The cop-
per track layout and
component orientation
aid of the board are
shown in Figure 2.
Once the board is
fully populated, it is wise
to run a thorough check
on the orientation of all
electrolytic capacitors
and integrated circuits.
980066-1
(C) ELEKTOR

Then inspect the solder


side of the board for dry
joints and short-circuits
caused by excess solder. If
everything appears to be
in order, you connect
pin 20 to ground and
pin 40 to the +5 V supply
line. Launch the PLC87
Figure 2. Although the printed cir- program on the PC, and
cuit board was designed to be as board is divided into control pins and establish the hardware connection
compact as possible, we managed signal pins, and input and output pins, between the PC and the PLC87 board.
to keep it single-sided. by the software as shown in Table 1. Once the right interface (COM port)
has been selected, and ENTER is
HARDWARE : FUNC- pressed in the ONLINE menu, the
design simple microprocessor circuits TION, CONSTRUCTION actual connection is made. If every-
if you dont know the first thing about AND TEST thing works so far, a menu pops up.
assembly-language programming. The The PLC87(A) is simple to build and Note that for first-time use the display
only thing that will constantly seem to test, after all, it is an ordinary mini- has to be excluded in the CONFIG
be in your way is the relatively slow mum configuration microcontroller menu if it is not connected. If you forget
program execution due to the serial system with the usual ingredients: con- to do this, the controller will not start
EEPROM. Depending on the configu- troller with integrated ROM for the CS properly, or simply hang. If this hap-
ration, the pin assignment of the PLC interpreter, an EEPROM acting as the pens, the only solution is to switch the

30 Elektor Electronics 10/98


COMPONENTS LIST want to use. Save these settings. DOS SHELL exit to DOS level (type
By pressing F1 you will be able to exit to return to PLC87).
Resistors: obtain online Help for most menu EXT PROG launch an external pro-
R1 = SIL array 8x10 k options. In the Help windows, you can gram as defined in the SETUP
R2,R7 = 1 k navigate using the arrow keys, and menu.
R3 = 10 k jump to references indicated by <....>. QUIT Leave PLC87, same as ALT-X.
R4,R5 = 2k2
A press on Enter then takes you to this
R6 = 1k5
reference. You can leave Help by press- ONLINE
Capacitors: ing the Esc key. Once the link to the PLC87 board is up
C1 = 10nF ceramic and running, and you select the
C2-C6,C10 = 10F 63V radial These are the main menu options: ONLINE window, a options list
C7,C8 = 27pF appears on the screen. Of these
C9,C11,C12 = 100nF ceramic SETUP options, STATVAR and READ PDS
C13 = 4F7 63V radial The SETUP window opens the follow- open sub-menus.
C14 = 470F 25V
ing options:
Semiconductors: START execute command sequence in
D1 = high efficiency LED COLOURS menu colour selection. PLC87 board.
D2 = 1N4002 MOUSE mouse speed setting. STOP stop execution of command
D3 = 1N4148 EXT PROGRAM path, name and sequence in PLC87 board.
IC1 = 87C51 (digital version, order parameters of an external pro- ERASE erase command sequence in
code 986513-1) or 87C550 (ana- gram that may be launched from PLC87 board.
logue version, order code 986514-
this menu. STATVAR interrogate/control vari-
1)
IC2 = MAX232CP (Maxim) COM selection of COM port to be ables.
IC3 = X24C16 (Xicor) or PCF85116-3 used with PLC87 board. SYS-INFO call up status of PLC87
(Phillips) or M24C16-BN6 (SGS) PRINTER printer selection board.
IC4 = 7805 SAVE SETUP save selections made in READ PDS read out Polling Data
this submenu, and the paths Memory.
Miscellaneous: defined in the OPTIONS menu. CONFIG configure PLC87 board.
X1 = crystal 11.0592 MHz
K1,K3,K4,K5 = 16-way boxheader
K2 = 10-way boxheader
OPTIONS ONLINE submenu: STATVAR
K6 = 9-way sub-D socket (female), If you open the OPTIONS window, a Here you can observe the status of vari-
PCB mount, angled pins menu list appears with the following ables in the PLC87 board on-line. To
LCD module, 2 x 16 characters entries: make use of this powerful option, sim-
S1-S8 = presskey D6-C-90 (ITC) with ply type in the desired variable in the
cap BTN-ED6-90 (Conrad Electron- DIR shows the contents of the current window (for example, MB1 or T5). The
ics o/n 700622) directory. readout is launched by pressing F2.
IC sockets
PATH defines the path followed to Three columns appear showing the
Solder pins
PCB, order code 980066-1 (see store command- value of the variable in
Readers Services page) sequence pro- Figure 3. Completed decimal, hexadecimal
Disk, order code 986026-1 (see grams with the prototype and a com- and binary notation.
Readers Services page). extension .S87. mand sequence on Using the F3 key (con-
paper.

PLC87 off, remove the EEPROM from


its socket, start the PLC87 without the
EEPROM, and only then insert the
memory chip again.

PC SOF TWARE PLC87


The DOS program PLC87 on the disk
supplied for this project will also run
under Windows 95. It creates, archives,
modifies and debugs command
sequences for the PLC87 board. Insert
the disk (order code 986026-1) into
your floppy disk drive and at the DOS
prompt type install. The program will
automatically install itself into the sub-
directory c:\plc87, and can be launched
from there by typing PLC87. For
mouse support under DOS you start
the program by typing PLC87 +M. No
mouse support is available under Win-
dows 95 because of possible conflicts.
A list of options appears, and individ-
ual options may be selected in the
usual way by means of the arrow keys
(and Enter) or the underlined letter.
To begin with, you select the serial
interface used to talk to the PLC87
board, the printer, and the colours you

Elektor Electronics 10/98 31


trol) you can modify variables, bytes PLC87 board PLC87A board
and words on-line. Before you can do
so, you have to select the variable using 16 digital inputs 10 digital inputs
the arrow keys. Note, however, that 12 digital outputs 6 analogue/digital inputs
only flags and output bytes/words may
be controlled in this way. Variables that 16 timers (0.1-2550s, 4 functions) 16 timers (0.1-2550s, 4 functions)
may be controlled have a coloured 8 counters 8 counters
background. Next, you have to press 256 flags 256 flags
the Tab key to select one of the three 1 flash pulse 1 flash pulse
columns, enter a new value, and trans- 1520 byte mnemonic memory 1520-byte mnemonic memory
mit it to the PLC87 board by pressing 512 byte polling data memory 512-byte polling data memory
Enter. Pressing the F4 key causes the
variables displayed in the window to Both Power GND Pin 20
Vcc +5V Pin 40
be cleared.

ONLINE submenu: READ PDS Table 1. Pin functions (independent of configuration):


The PDS (Polling Data Storage) is a PLC87
cyclic memory with a capacity of Outputs A0.0-A0.7 Pin 1-8 (Port 1)
512 bytes in EEPROM. It is used for Inputs E0.0-E0.7 Pin 39-32 (Port 0)
long-term storage of the variable states
(values). When the PDS is read, the PLC87A
data are stored in a CSV (comma-space Outputs A0.0-A0.5 Pin 39-34 (Port 0)
delimiter) file for further processing Inputs E0.6-E0.7 Pin 33-32 (Port 0)
using, for example, Excel. Before read- Analogue inputs AE0-AE5 Pin 3-8 (Port 1)
E0.0-E0.5 (if AEx > 2.7 V)
ing in the file, you have to define the
Reference voltage Avcc/Aref+ Pin 1
number of columns of the CSV file.
Agnd/Aref- Pin 2
PROGRAM Standard configuration:
If you open the window, a number of Outputs A1.0-A1.3 Pin 14-17 (Port 3)
options are shown which allow the fol- Inputs E1.0-E1.7 Pin 21-28 (Port 2)
lowing operations to be carried out:
Status configuration:
NEW clear program memory. (system Status display via pins)
LOAD FROM FD load command Outputs A1.0-A1.1 Pin 14-15 (Port 3)
sequence from disk into memory. Inputs E1.0-E1.7 Pin 21-28 (Port 2)
SAVE TO FD save command Status AWL loaded Pin 16 (Port 3)
sequence on disk. RUN Pin 17 (Port 3)
LOAD FROM PLC transfer command
sequence from PLC87 board to Display configuration:
program memory.* LC display 2*16 connected
SAVE TO PLC transfer command Inputs* E1.0-E1.7 Pin 21-28 (Port 2)
sequence from program memory Display D0-D7 Pin 21-28 (Port 2)
to PLC87 board. Enable Pin 16 (Port 3)
COMPARE compare program mem- R/W Pin 15 (Port 3)
RS Pin 14 (Port 3)
ory and PLC87 board memory.
PRINT print program and cross-refer-
* Inputs 1.0-1.7 are only available as multiplex inputs. They use pin 17 as a common reference and
ence list. may only switch it via a potential-free contact. The inputs must be mutually decoupled using a diode
to pin 17.
The options marked with an asterisk
(*) only appear when the PLC87 board
is already on-line.

EDITOR supports column-oriented inputting of only allowed in the comment column.


The Editor is a simple word processor data. The individual columns have the When the Enter key is pressed, the Edi-
program that allows a command following meanings: tor checks the syntax of the CS lines
sequence (CS) to be written line by and produces an error report when
line. The CS program memory on the 1st column: branch markers (4 necessary. If the PLC87 board is on-
PLC87 board has a size of 1520 bytes, characters) line, the status of variables may be
so that up to 1520 CS lines may be 2nd column: directives checked by pressing the F2 key.
memorised. In general, however, com- 3rd column: comment (max. 40 Because the variable states are read out
mands will be longer than one characters) at random instants, they may not rep-
mnemonic, so that the number of com- resent the actual values.
mands per CS. If a CS does not fit into The cursor defaults to the second col- The main subjects of next months
the available memory, the program will umn. To enter a branch (jump) marker, instalment will be the creating of com-
report this during the download you first move the cursor into the left- mand sequence lists for the PLC87.
process. hand column using Shift-Tab. The right- (980066-1)
Although the creating of the CS hand column (for your comment) can
(PLC program) will be discussed in be reached by pressing the Tab key
next months second and last instal- only. Once a line is complete, you fin-
ment, a few guidelines may already be ish it with Enter. Input in the left-hand
mentioned. A CS line is divided into and centre columns is in principle in
three columns. The editor program upper case lower case characters are

Elektor Electronics 10/98 33


GENERAL INTEREST

tachometer
for mopeds and
(motor) scooters
There are people who
feel that every moped
and motor scooter
should be fitted with
a tachometer (rev
counter) as standard.
There are others who
find it a dodgy instru-
ment since it tends to
distract the riders
attention from the
road. If you belong to
the first category and
have a scooter or
moped without a rev
counter, this article is
for you. It describes a
straightforward
design of such an
instrument that can
be fitted to any model Like many low-priced cars and motor- venience of a rev counter argue that
of moped or scooter. cycles, mopeds and (motor) scooters gear changing is done by ear, but the
tend not to have a rev counter fitted compulsory safety helmet does not
by the manufacturer, presumably on always allow this: the sound insulation
grounds of economy. However, such of some helmets is very good indeed!
an instrument is relatively inexpensive Best is, of course, to have an automatic
and may be very useful, particularly gearbox, fortunately chosen by more
on vehicles with manual gear change. and more riders. Second best is to
For instance, the combined readings of build and fit the present tachometer.
the speedometer and tachometer give The combined readings of speedo-
a good indication of whether the right meter and rev counter may also be
gear has been selected. A falling read- useful in improving fuel consumption,
ing on the rev counter is a sign to but this implies that the power curve
change down, while a rising one of the engine is known.
points to the need of changing up.
Design by L. Lemmens Many riders who do not have the con-

Elektor Electronics 10/98


34
SENSOR
Ideally, the sensor should produce a
1 5V pulse for each engine revolution and
5V
D1 this is most easily achieved with the
D2
aid of an inductor (coil) to pick up the
5V ignition pulses inductively. Since the
5V
3 D3 voltage in the ignition pulses is fairly
1
9
MODE
L1
18 D4
high, it suffices to construct the coil
L2
P1 5
SIG
L3
17 from 1020 turns of insulated circuit
50k 6
7
RHI
L4
16 D5 wire around the spark-plug cable.
REFOUT 15
R3 R5
R1
IC1
L5
14 D6
While the voltage level of the igni-
L6
tion pulses is fairly high, their shape

22k
green
22M

22k

LM3914 L7 13
8 4
8 L8
12 D7 groen
varies appreciably. Therefore, the sen-
R REFADJ 11 grn
7
DIS
4
RLO
L9
10 D8
sor is followed by a pulse shaper to
IC3 L10
C3
2
TR OUT
3 transform the ignition pulses into sta-
10n 6
TLC555 R6 2 D9 ble, uniform count pulses. This ensures
100k

THR
CV D10
that random variations in the width
R7
5 1 JP1 and amplitude of the ignition pulses

22k
R4 5V
D11 do not affect the readout.
15M

C4 C2 C1
D12

100n 10n 10 6000 rpm CIRCUIT DESCRIPTION


16V 3 D13 The complete circuit diagram of the
1
9
MODE
L1
18 D14
tachometer is shown in Figure 1. The
L2
5
SIG
L3
17 yellow pick-up coil (sensor) is linked to capac-
6
7
RHI
L4
16 D15 geel
itor C3. This capacitor, in conjunction
REFOUT 15 gelb
IC2
L5
14 D16
with resistors R3 and R4, forms a dif-
L6
4805
LM3914 L7 13
8000 rpm ferentiating circuit that narrows the
6...7V IC4 5V 12 D17
ignition pulses into usable trigger
8 L8
REFADJ 11
C5 C6 C7
R2 4
RLO
L9
10 D18
pulses an arrangement that prevents
L10
2k2

red double triggering of the rev counter.


10 10 100n
25V 10V 2 D19 rood
The reshaped pulses are applied to the
rot
D20
trigger input of monostable (multivi-
980077 - 11
10000 rpm brator) IC3. This circuit outputs pulses
whose width can be preset with P1.
The pulses output by IC3 are inte-
grated by a simple low-pass filter
formed by R6 and C1. This filter also
Figure 1. The circuit of removes any short-duration variations
the tachometer con- of the output which otherwise might
sists of a pulse make the readout unstable.
DESIGN shaper, an integrating The only other item The LED readout is driven by two
There are various ways circuit, and a readout. that is needed is an display drivers, IC1 and IC2. These cir-
of constructing a The sensor is placed electronic circuit with a cuits are specially designed for this
tachometer, that is, the around the spark plug sensor that provides purpose and contain a reference volt-
manner of its readout. cable. pulses in proportion to age source and an accurate decade
Basically, there are three the number of engine scaler.
ways of achieving this: revolutions. These Each of the drivers can control a
in figures via a seven-segment display, pulses are converted by the electronic maximum of ten LEDs, so that the
via an analogue scale consisting of circuit into an analogue direct voltage tachometer can use up to 20 diodes
light-emitting diodes (LEDs), or via a to drive the LED bar. which gives a sufficiently accurate
traditional moving coil meter with readout. Each of the LEDs represents
pointer. about 500 engine revolutions. The
The moving-coil type is the sim-
plest construction, but is also vulnera-
ble to shocks and vibrations. This
makes it not really suitable for use on Setting up
a moving vehicle.
A readout via a seven-segment dis- The pulse width of the output of the pulse shaper, and thus the drive voltage
play is highly accurate, but perhaps for the readout, can be set within a wide band with P1.
too sophisticated for use on a moped. Calibrating the scale may be done in a number of ways: with another
The high accuracy is not needed and tachometer as reference, with a pulse generator, and also without any special
would make the design more complex equipment. This is possible by using the pick-up coil to sense the frequency
of the mains voltage (in a safe manner!). This very stable signal at 50 Hz is
than necessary.
excellent for calibration purposes, since it corresponds to 5060=3000 rev/min.
An analogue (LED) readout is both
So, if the proposed maximum of 10000 rev/min is adopted, P1 should be
simple and robust. It can make use of adjusted at 50 Hz so that D6 (3000 rev/min) lights.
several types of control IC that enable An ideal source for the 50 Hz mains frequency is a demagnetizer for a
an analogue voltage to be displayed cassette deck. The electric field radiated by this is readily picked up by the
on a bar of LEDs with only a few tachometer sensor. Never, never connect the input of the rev counter sirectly
external components. If the bar con- to the mains: this may be lethal and, even if youre lucky to survive, will destroy
sists of, say, 20 diodes, the readout is the tachometer.
sufficiently accurate for most purposes.

Elektor Electronics 10/98 35


2 980077-1 980077-1 1-770089

R7

R1

IC1

IC2
R2

C2
C1

C3
R3

C4
IC3

D1

R6
R5
R4 T P1
(C) ELEKTOR 0 + ROTKELE )C(

LEDs may be of different colours to Figure 2. Construction means that the circuit cannot be con-
create, say, a safe (green) range of rev- of the tachometer is nected directly to the battery terminals
olutions of 5006000 rev/min (D1D12); straightforward when of the moped or scooter. A stable sup-
a caution (yellow) range of 60008000 this printed-circuit ply is obtained by the use of a 5 V reg-
rev/min (D13D16); and a danger (red) board is used. It is ulator between the battery and the rev
range above 8000 rev/min (D17D20). available through our counter as shown in Figure 1. Since
Different ranges may, of course, be Readers services. the voltage at the battery terminals is
chosen to individual requirements. only about 67 V, the regulator must be
Comparators are driven via each of a low-drop type such as the 4805: a
the junctions of the scaler in the dis- standard 7805 will not do!
play drivers in such a way that every P O W E R S U P P LY It is also possible to power the
time the input voltage to the display The tachometer needs tachometer indepen-
driver increases the next comparator is a power supply of Figure 3. The com- dently by a pack of
enabled. The comparator outputs are 56 V. The supply rails pleted board in the
capable of driving an LED directly. should be stable, which Conrad enclosure
The LED bar may be operated in mentioned in the text.
the dot or bar mode. In the dot mode,
pin 9 of the IC must be left open, and
in the bar mode it should be linked to 3
the positive supply rail. In the present
application the bar mode is used.

Parts list

Resistors:
R1, R5, R7 = 22 k
R2 = 2.2 k
R3 = 22 M
R4 = 15 M
R6 = 100 k
P1 = 47 k (50 k) preset

Capacitors:
C1 = 10 F, 16 V, radial
C2, C3 = 0.01 F, pitch 5 mm
C4 = 0.1 F, pitch 5 mm

Semiconductors:
D1D13 = low-current LED, green
D14D16 = low-current LED, yellow
D17D20 = low-current LED, red

Integrated circuits:
IC1, IC2 = LM3914
IC3 = TLC555

Miscellaneous:
JP1 = 2-terminal 2.54 mm pin strip
and pin jumper (Maplin)
Enclosure: Conrad Type 842230-55
(see text)
Sensor: see text
PCB Order No. 980077 (see Readers
services towards the end of this
issue).

36 Elektor Electronics 10/98


Figure 4. This photo
4 clearly shows how the
pick-up coil is wound
(25 turns) auround the
ignition cable.

a check, the jumper should be


removed.
When pulses are applied to capac-
itor C3, it should be possible to vary
the low direct voltage at the terminal
of JP1 linked to junction R6-C1 with P1.
If this is so, the pulse shaper operates
correctly.
When a variable direct voltage at a
level of a few volts is applied to the
other terminal of JP1, one of the dis-
play diodes should light.
Forming the pick-up coil around
the spark plug cable (1020 turns of
thin insulated circuit wire) should not
present undue difficulties. The coil
should be linked to the input pin of
the tachometer via insulated stranded
circuit wire.
four series-connected chargeable or dry ure 2. It is generally agreed that a cir- In some areas it may be possible to
1.5 V batteries (AA=HP7=LR6 or cular readout is to be preferred and obtain a round enclosure to house the
C=HP11=LR14). A regulator is then, this is why the 20 LEDs have been rev counter. A suitable one is produced
of course, not needed. The life of such arranged in a circle on the board. In by Conrad (Germany) and may be
batteries is lengthened by using the view of the sparsity of components, available from our regular advertiser
display drivers in the dot mode (in populating the board is simplicity itself Stippler Elektronik via another regular
which pin 9 of the devices is left open). if the circuit diagram and the parts list advertiser, Viewcom Electronics. The
are followed carefully. model number of the enclosure is
CONSTRUCTION Pin strip and jumper JP1 enables given in the parts list.
The electronics is best built on the the circuit to be checked on comple- [980077]
printed-circuit board shown in Fig- tion of the construction. During such

Elektor Electronics 10/98 37


GENERAL INTEREST

faultfinding
art or science?

Faultfinding, or trou-
ble shooting, is an art
to some and a sci-
ence to others. Some
people never get the
knack of finding a
fault or short-coming
readily, whereas oth-
ers seem to have
divine guidance when
it comes to locating
one. For those who
find faultfinding an
almost impossible
and tedious task, this
article gives a num-
ber of hints to make
the process a little
easier. It is also
describes a randomly
chosen actual case.
No matter how much care is taken in surface-mount assembly (SMA) sys-
the construction of an electronic cir- tematically and thoroughly on the
cuit, there is always the possibility that basis of the circuit diagram, the com-
it will not work in the first instance. If ponent layout drawing and the com-
that happens, stay calm. This is impor- ponents/parts list.
tant. There are constructors who can- Are all components and parts fitted
not accept that they may have made in the right place? Errors often happen
an error or that something unforeseen in the case of small resistors and capac-
has happened. They are unnerved by itors. Are all integrated circuits, elec-
such a situation and start doing all trolytic capacitors and diodes fitted
sorts of thing without considering the with correct orientation? Have the pos-
matter calmly. This is wrong. itive and negative supply lines been
Take your time to check the com- interchanged? Is there evidence of any
By our technical staff pleted printed-circuit board (PCB) or dry joints? Is there a short-circuit

Elektor Electronics 10/98


40
1 PROCEDURE
K1
TR1 * The variable power supply, published
+U 9V
C3 C5
in the March 1998 issue of Elektor Elec-
IC3
tronics, was built by one of our own
7809 A +9V
160mA T
B1 employees, who could not get it to
C4 C6
work and called in the help of our
*
C7 *
C8 C11 C9 C10
Central Design Department.
The trouble was that the unit pro-
10 100 100n
24V 1A25 B80C2200 63V 16V vided an output voltage, but that this
C3 ... C6 = 4x 100n 2x 1000
63V
0 could not be regulated. The unit had
been inspected thoroughly but noth-
+U
ing untoward had been found.
R24
9V Initial inspection

100k
R1 R3 R17 R5
The completed board was removed
1%
+V from the unit and given a thorough
1k

274k

3k3

3k9

R15
going-over on the workbench in com-
1% D2 D6
C1 C2
V parison with the circuit diagram (Fig-
3k3

B D 1
2 7
D1 100n 100 ure 1).
C 6
1N 1W 40V
R2 IC1 4001 V It appeared that a few small mis-
3 R22
5 E
46k4
4
BAT85 takes had been made by the construc-

100k
1% 8
tor. The first of these concerned IC3,
TLC271 R6 1% which was a 12 V type instead of a 9 V
274k
R4
1% R23 R21
type. This is not entirely correct, but it
F G
46k4

V P1 cannot be the cause of the malfunc-


1k02

1k02

1k
1% tion. Also, R1 was found to have a
9V 1% 1%
value of 100 instead of 1 k. This is
an instance of careless work, but,
K
R7* R16 again, cannot result in a non-variable
output.
3k3
15k

T1
(8k2)
D4
All this did not bring us closer to
R8
I
1
7
R10
the root of the trouble, and it was
3 220
T2
H 4k7
6
D3 therefore time to apply voltage to the
IC2 K
2
5 L R11 board. This was done carefully using a
BAT85
I 8
4 220 variable power supply connected
P2 R9 M
1k 4k7
K
2x
across C7-C8. The output of the supply
TLC271
R14 BUK455 N was increased slowly while the amme-
J
D7
4k7
R12 R13
ter was watched intently. Nothing
D5
untoward happened, however. At a
1

1N4001
supply output of 25 V the output of
5V6 5W 5W
R18 R20
the board was measured and proved
to be 25 V. So far, so good. However,
22k

22k

A 8V86 F 4V25 K 2V3


turning P1 made no difference to the
+I output which remained stable.
B 4V4 G 4V69 L 1V9
R19
C 4V17 H 1V1(0V56) M 0V48
Measurements
* zie tekst
A
2k7

D 4V24 I 0V5 N 0V47


* see text Since in the previous inspection tran-
E 1V J 0V48 * siehe Text
I sistors T1 and T2 passed the voltage
* voir texte 980024 - 21 from input to output, but nothing else,
the question arose whether these FETs
were connected properly or whether
Figure 1. The circuit they were perhaps faulty. Their termi-
diagram of the vari- nals were therefore checked with a
able power supply digital multimeter. The drain and
caused by a tiny bead published in our malfunctions, a more source voltages were low and about
of solder between the March 1998 issue. thorough investigation equal, which seemed to be all right
tracks of the board? is necessary. To start since the output voltage was maxi-
Have all wire bridges been soldered in with, all voltages, particularly those mum. Also, the potential difference
place? This is often a cause of mal- indicated on the circuit or wiring dia- between gate and source was 56 V,
functining of newly built equipment. gram, should be checked with a good indicating that the FETs were con-
Admittedly, all these questions may multimeter. It is normally advisable to ducting (a lower difference would
seem irrelevant and the answers obvi- start at the output of the circuit. have been sufficient). So, how was it
ous, but it is a proven fact that about It is virtually impossible to give possible that the FETs were driven into
three quarters of all faults are caused general rules for measuring the vari- full conduction by the control circuit,
by small errors in construction. The ous voltages and currents in a circuit. although they should be cut off with
other quarter is normally caused by a There is too great a variety of designs P1 set to minimum.
component that has given up the and layouts. It is undoubtedly much
ghost during soldering. It is very rare more instructive to describe a possible Backwards
for the fault to lie with the design of procedure on the basis of a practical To find the cause of the high control
the circuit or its adjustment. malfunctioning equipment, in this case voltage, the gate potential of T1-T2 was
When the construction has been a power supply. traced from back to front.
checked carefully and the circuit still The potential at the cathode of

Elektor Electronics 10/98 41


Pin 7 is linked to the auxiliary pos-
itive supply line, so 9 V is correct. Pins
4 and 8 are linked to the negative aux-
iliary supply line, so 0 V is also correct.
If this potential were different, it
would indicate something not quite
right with the earth connection of the
op amp, whereupon this might act in
a totally unpredictable manner.
The voltages at pins 2 and 3 were
quite different, which, since these are
the inverting and non-inverting inputs
of the op amp, could not be right. (By
definition, these voltages should be
equal or very nearly so). This
explained why the output of the op
amp was high: the non-inverting
input potential was higher than that at
the inverting input, so that the output
voltage was nearly equal to the supply
voltage.

The net closes


It was clear that the cause of the mal-
function lay in the inequality of the
input voltages of IC1.
The requisite voltage at pin 2 was
calculated readily since it is deter-
mined by potential divider R3-R4 and
the supply voltage. Since the supply
was still 25 V, the potential at test point
D had to be 46.4/(46.4+274)25=
3.62 v. This was virtually identical to
the measured voltage, which is correct.
So, the voltage at pin 3 remained as
the only possible culprit. It will be seen
from the circuit diagram that this volt-
age arrives from the wiper of P1. And,
indeed, when this potentiometer was
turned, the voltage at pin 3 varied, but
remained higher at all times than that
at pin 2. It was not surprising, there-
fore, that the circuit did not function
correctly.

Thats it!
The potential at test point G was the
same high output voltage that was not
affected by adjusting the potentiome-
ter. However, the potential at test point
C, that is, the wiper of P1, varied
between 4 V and 5 V, although it
should have been 0 V with the wiper
fully anticlockwise. This indicated a
faulty potentiometer and, indeed,
zener diode D7 was measured and circuit around operational amplifier when it was replaced by a new one,
found to be almost exactly the zener IC1. This device was overdriven, defect the regulation of the unit worked fine.
voltage, which is, of course, correct. or it had no connection to earth.
This potential is derived from the 9 V Again, a number of possible causes. Another problem
auxiliary supply via R5 and the design For completeness sake, the action of
of the unit is such that it can be low- Locating the fault the current limiting circuit was also
ered via D3 by reducing the current Once it was known that the error was tested. For this purpose, a 10 , 10 W
with P2 or via D1 by reducing the volt- somewhere around IC1, it could be resistor was connected across the out-
age with P1. located more accurately. For this pur- put terminals and the output voltage
Since the voltage setting was clearly pose, the voltages at all pins, not the set to few volts with P1. Subsequently,
the culprit, this branch was traced back socket, of the op amp were measured the current limit was slowly turned to
further by measuring the potential at (carefully). This ensured that a faulty a lower level with P2. At a given level,
the cathode of D1 (test point E). This socket or a broken track would not D4 lighted and the output voltage
potential was found to be much too cloud the issue. The measured values dropped back. All perfectly in order.
high: about 8 V. This indicated that were written down so that they could However, just when the tests were
something was not quite right with the be evaluated. Pin 7: 8.9 V; pins 4 and 8: about to be terminated, it smelled as if
0 V; pin 3: 5.2 V; pin 2: 3.6 V. something somewhere in the unit was

42 Elektor Electronics 10/98


from the heat sink, it was found that
owing to careless drilling and debur-
ring, the FETs could not be fastened
close to the heat sink. Once the holes
were deburred, and the FETs rein-
stalled (with heat conducting paste), all
was found to be in proper order.

Finally
The foregoing shows that the number
of possible causes of a malfunction is
great. Our engineer had never found
a defect potentiometer in this type of
equipment. The malfunctioning of the
heat sink was also a rare occurrence.
It also shows that what was said at
the beginning of this article is invari-
ably true: that a completed board may
at first sight look in perfect order, but
on close inspection prove to have been
finished, in some instances, in a care-
less manner. Also, in the case consid-
ered, there were two components with
incorrect rating. There was nothing
wrong with the circuit diagram nor
with the component layout.
[980089]
getting too hot and it was found to be was discovered that the FETs were not
the FETs, although these were in close contact with the heat sink.
mounted on a correct heat sink. It was Were the screws tightened sufficiently?
found that this heat sink was cool and Yes; in fact, they could not easily be
the FETs hot. On close inspection it undone. Once the FETs were removed

Elektor Electronics 10/98 43


AUDIO & HI-FI

clipping indicator
A little while ago a
reader wrote to say
that he had found
for compact disc
overdrive on some of
his compact discs.
This sort of news
comes of course like
a thunderbolt since it
is assumed by most
people that compact
discs are examples of
the quality of todays
digital technology.
The first reaction to
such an allegation is
one of outright disbe-
lief or at least scepti-
cism. Moreover, it has
been alleged by other
readers that several
producers have
admitted (sic!) to
overdriving, that is
clipping, of CDs at
the request of the rel-
evant artists. Be that
as it may, it was rea-
son enough to design
an indicator to bring
Most people will not believe that there with a VU (visual unit). To his surprise
overdrive to light and are CDs that are overdriven by the he found that the level varied around
producer: they generally assume that 0 dB. A surprise, indeed, for the level
help the consumer in manufacturers know what they are on a CD should reach 0 dB only dur-
his/her quest not to doing and supply discs that are tech- ing very brief peaks in the signal. The
nically correct within the confines of average signal strength should be not
buy flawed CDs*. modern digital technology. If the expe- less than 6 dB and preferably 1012 dB
riences of some of our readers are below 0 dB.
*It should be noted that overdrive on accepted, this may not always be true. In view of these findings, our
a CD is not a legal reason for asking One reader wrote to say that he reader decided to take his investigation
your money back. had noticed that some CDs in his col- a little further and connected an oscil-
lection sounded less than perfect and loscope to the output of his CD player.
others even downright poor. Since he This showed that on certain CDs the
Designed by T. Giesberts thought that his ears were playing him signal was clipped; on one or two, the
tricks, he decided to check the level clipping led to audible distortion. Fig-

Elektor Electronics 10/98


46
1

Figure 1. Two clear cases of over-


ure 1 shows a few examples (not nec- drive allegedly measured on mod-
essarily the worst!). commercial acu- ern compact discs (Sony Music at the retailer s
Apart from leading to distortion, men but not 099748 393227/1996 and 099748 premises nor-
clipping also results in another phe- impossible. Also, 698421/1997). mally does not
nomenon. Since the average signal the reason indicate any-
strength is too high, the dynamic given by these thing awry, but
range of the music is reduced, so that producers that they dared not go once it is played on a good-quality
the reproduced sound is much too flat, against the wishes of these artists installation at home a deficiency may
which can easily lead to listening seems highly suspect. No artist is big- come to light.
fatigue. ger than a bona fide recording studio. The solution appears to be a small
Editor]. portable indicator that can be taken to
COINCIDENCE? the retailer, assuming that it is possible
Could these findings be coincidence? DETECTION to connect it to the retailers playback
It is hard to say, but evidence from What can the consumer do to avoid equipment.
other readers and our own measure- buying a flawed disc? After all, a CD What should the indicator react to?
ments seem to indicate that there are cannot be repaired or enhanced. Over- It is clear that on a good-quality CD
CDs on which the signal has been pur- drive used in the recording studio can- the 0 dB level will be reached only
posely overdriven. [The allegation by not even be eradicated during manu- during short high-signal peaks. If the
another reader that two producers facture of the disc. 0 dB level is sustained for more than
admitted to him that they sometimes The only thing a consumer can do a fraction of a second, there may be
used overdrive on CDs at the request is not to buy the suspect CD. But how reason to be suspicious. Consequently,
of the relevant artists seems far-fetched is he/she to detect that a certain CD the indicator is designed so that an
because it would be contrary to their suffers from overdrive? Listening to it LED lights when two or more samples

Elektor Electronics 10/98 47


2 L1 R3 10 10
5V

12 S 9 12 S 9
D D
47H 1 4 IC3b MSB IC4b MSB'
R S 11 10
2 5 C 8 11 C 8
C4 C5 C6 C7 D
IC3a A 12 S 9
R R D
3 6 IC2c IC5b
10 25V 47n 10 63V 47n C
13 13 10
8 11 8
9 =1 C
D
C R
K1 22 7
13
S/PDIF C1 A D
9 17
RXP M3
18 4
R1 10n 25 M2
ERF IC1 24
28 M1 2 S 5
VERF 23 D
15 M0 IC2d IC4a
CBL 12 12
C2 SCK 11 3 6
10 27 13 =1 C
RXN F2
1 CS8412 2 R
10n C F1
14 3
U F0 1
C3 R2 26 5V
20 SDATA T1
1k FILT 4 R8
E2
47n 19 5 47k
MCK E1 2 5
13 6 D
FCK E0 IC2b IC5a BC557B
16 11 4
SEL FSYNC 6 3 6 R9
=1 C
A D 5
R S R6
21 8
1 4 PU
D1
JP1 R10
D2 PEAK

220 TTL
5V BAT82 AVG
R4
JP2
IC2 = 74HCT86 PEAK

IC3, IC4, IC5 = 74HC74 AVG


IC6 IC2a
2 PD
> 8V D4 7805 5V 3
1 =1 R12
D3
1N4002
T2
C14 C13 14 C9 14 C10 14 C11 14 C12 R5 CLIPPING R11
C8
IC2 IC3 IC4 IC5 R7 47k
220 47 7 100n 7 100n 7 100n 7 100n
25V 63V
100n BC547B

980072 - 11

Figure 2. The circuit of the indicator consists of an integrated


digital audio interface receiver and a number of gates and bista-
of the signal reach bles forming the signalling section. signal is generated
the peak value. The exclusively for the
probability that MSB in D-bistable
some clipping then occurs is great. IC1, an integrated interface receiver IC3a-IC3b. The FSYNC signal is clocked
When the LED lights only once or Type CS8412 (see Data Sheets else- into IC3a by the inverted bit-clock
twice per track, it must be assumed where in this issue). This circuit can (IC2d). The output of IC3a (signal A)
that this is caused by a couple of handle virtually all current sampling forms the clock for the MSB.
strong signals. If it lights more often, frequencies. The serial audio data The clock input of IC3b goes high in
or it remains on for longer than a sec- (SDATA) are read with the aid of a bit- the middle of the MSB, after which the
ond, there is something not quite right. clock and a word-clock (SCK and FSYNC bit is held for the duration of the audio
To make a possible error indication respectively). The output of the IC is sample (pin 9 of IC3b).
as clear as possible, two LEDs are set to a special format (normal mode To ensure that the MSB is applied
used: the green one lights as long as all FMT 4: M0 =M1=0; M2 =1 M 3=0) in to comparator IC2c simultaneously
is well, and the red one when there is which a clock pulse follows each audio with the next bit, it is clocked again in
something amiss. For those who have sample, irrespective of left or right. D-bistable IC4b.
not the patience to keep an eye on the The audio data are coded in 2s The remaining bits are clocked by
LEDs during the entire time the CD is complement. To check whether a peak IC4a. Since signal A is applied to the
played, there is an optional facility for value has been reached, the MSB S-input of this bistable, the inverted
connecting a counter module. This (most significant bit) must be inspected output remains low until the first of
shows how many times during the and compared with the remaining bits. the remaining bits is clocked (signal C).
playback clipping may have occurred. In the case of digital minimum and Use of the inverted output ensures
In the design of the indicator it was maximum values, all remaining bits that all bits there have the same level
assumed that the studio recording was must be the opposite of the MSB. The as the MSB if and when a minimum or
transferred 1:1 to the manufactured minimum and maximum values are maximum value is reached. If the level
compact disc. checked with an XOR function. is not the same, IC2 goes high at a cer-
tain moment, which causes IC5b to be
CIRCUIT DESCRIPTION Gates & bistables clocked. This means that the output of
The circuit diagram of the indicator is The comparing and indexing of the IC5b is high when there is neither a
shown in Figure 2. Audio socket K1 is bits is carried out by a number of gates minimum nor a maximum value.
for linking the indicator to the digital and D-bistables. The timing diagram So as to enable the actual state of
output of the CD player. of the most important signals is shown each sample to be determined, most
The relevant data are retrieved in Figure 3. bistables, including IC5b, are reset by
from the S/PDIF signal with the aid of At the start of a new sample, a clock signal A. Before this happens, the sta-
tus of IC5b for each sample is clocked Figure 3. Timing diagram of the most important
to IC5a by the FSYNC signal inverted by
IC2b. Since IC5a is not reset by signal A,
3 signals in the indicator.

the data transferred to it are retained.


Pin 6 of this bistable therefore remains
FSYNC
low as long as there is no sample that
contains a minimum or maximum
SCK
value. If a peak value does occur, pin 6
briefly goes high.
SDATA 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
Converting the change in level at
the output of IC5a into a usable optical
SCK
indication is not too difficult. The
design basis was to make a (red) LED
A
(D3) light for about one second if two
or more consecutive samples reach
MSB 16
peak value. Time constant R4-C8 aver-
ages a number of samples, while the
MSB' 16
discharge time of C8, determined by
R5, results in an afterglow of about one
C 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
second. The potential across C8 is
buffered by IC2a. The indication
D
exor
980072 - 13

Parts list

Resistors: becomes much clearer by the addition opposite of that of D3, so that when
R1 = 75 of a second (green) LED (D2). The clipping occurs there is a distinctive
R2, R7 = 1 k light-up behaviour of this diode is the change of colour.
R3 = 4.7
R4, R10 = 220
R5 = 10 M Figure 4. The printed-circuit
R6 = 560 board for the indicator makes
R8, R11 = 47 k construction childs play.
R9, R12 = 100

Capacitors:
C1, C2 = 0.01 F, ceramic
C3 = 0.047 F C13 0 + 1-270089
R3 D4 ROTKELE )C(
C4, C6 = 10 F, 63 V, radial
H1

H2

C5, C7 = 0.047 F, ceramic 4 IC6 C14 980072-1


C8C12 = 0.1 F C6

C11
L1

C13 = 4.7 F, 63 V, radial IC3 IC4


C5

C14 = 220 F, 25 V, radial


C10
IC1

C12
C7

C4

Semiconductors:
C9

D1 = BAT82
R8

IC2 IC5
D2 = LED, green, high efficiency
R2

R6

D3 = LED, red, high efficiency avg peak avg T1


D4 = 1N4002
C3

JP2
C1
C2

T1 = BC557B R11
R7

R5
R4

JP1

+
D1

T2 = BC547B K1 T2
R10

PU
R9
C8
R1

D2 D3 R12
Integrated circuits:
H3

H4

T T
IC1 = CS8412 (Crystal Semiconduc- TTL PD

tor)
IC2 = 74HCT86
IC3, IC4, IC5 = 74HC74
IC6 = 7805

Miscellaneous:
L1 = choke 47 H
JP1, JP2 = 3-way, 2.54 mm pin strip
and pin jumper (Maplin)
K1 = audio connector (male) for
board mounting
Enclosure 120 65 41 mm
(L W H), e.g., Bopla 430 (avail-
able from Phoenix 01296 398355)
PCB Order no. 980072 (see Readers
Services towards the end of this
issue)

(C) ELEKTOR
980072-1

Elektor Electronics 10/98 49


5

Figure 5. Photograph of
the completed proto-
COUNTER OPTION nals just reach the type indicator board. in view of the permis-
As mentioned earlier, there is provision 0 dB level. The aver- sible leakage current.
for linking a counter module to the aged count is a more Since the circuit
indicator to show the number of times realistic measure of the number of clip- provides for a 5 V regulator, IC6, a
that clipping has occurred over a given ping occurrences. A drawback of the mains adaptor with an output of not
period. There are three outputs: TTL, averaged count is that the toggling of less than 8 V may be used as power
pull-down (PD), and pull-up (PU), so IC2a may cause high-frequency pulses source. The circuit draws a current of
that almost any current type of mod- that may adversely affect fast counter about 25 mA. This low current also
ule can be used. modules. However, most modern facilitates the use of a 9 V battery if
Owing to the averaging by R4-C8, modules are immune to these pulses portable use is desired. A dry battery
the output remains active even when and in any case the risk can be will give some 10 hours operation.
brief interruptions occur. If, however, removed by connecting a 1 F capaci- For portable use it is, of course,
the output of IC5 is used, count pulses tor across the counter input. essential that the circuit is housed in
are obtained for all discrete samples or a small, neat enclosure such as that
strings of them. Both facilities may be CONSTRUCTION specified.
used thanks to JP1 and JP2. This The indicator is best built on the PCB [980072]
arrangement gives a choice at the TTL shown in Figure 4. Populating the
or PD output of either an averaged board with reference to the compo-
count of the number of times clipping nents list and the circuit diagram
has occurred or a count giving the should not present any undue diffi-
peak value. culties. Sockets should be used for the
In practice, peak counting may be ICs. Mind the the polarity of the elec-
a little too severe, since normally noth- trolytic capacitors and diodes. Note
ing much happens when the peak sig- that D1 must be of the type specified

Elektor Electronics 10/98 51


The content of this note is based on information received from manufacturers in the
electrical and electronics industries or their representatives and does not imply prac-
APPLICATION NOTE tical experience by Elektor Electronics or its consultants.

compact 3.3 V charge


pump converter
in 5-pin SOT-23 package

1
Figure 1. Block dia-
gram of the
LTC1517-3.3. Capaci-
tor C1, which forms
part of the charge
pump, is the heart of
the circuit.

As more and more circuits are pow- GENERAL


DESCRIPTION
ered by battery, there is a growing The LTC1517-3.3 is a micropower
need for voltage converters that can charge pump d.c.d.c. converter that
produces a regulated 3.3 V output from
derive a stable 3.3 V supply from a an input voltage range of 24.4 V.
Extremely low operating current (typi-
wide range of input voltages. This cally 6 A with no load) and low external
need may be met by Linear Technol- parts count (one 0.1 F flying capacitor
and two small bypass capacitors at
ogys LTC1517-3.3 and LT1517-5 input and output) make the part ideally
d.c.d.c. converters suited for small, light-load, battery-
powered applications. The total
printed-circuit board area of the appli-
cation circuit in Figure 2 is only 29 mm2.
The LTC1517-3.3 operates as a burst-
mode switched-capacitor doubler to
produce a regulated output. It has ther-
mal shutdown capability and can sur-
vive a continuous short-circuit between
output and ground. The device is avail-
LTC and LT are registered trade- able in a 5-pin SOT-23 package.
mark of Linear Technology Corpo- With an input voltage of 2 V and an
ration. output current of 0.110 mA, the effi-
Burst Mode is a trademark of Lin- ciency of the LTC1517-3.3 is 80%.
ear Technology Corporation. There is also a 5 V variant of the IC:
the LTC1517-5. This IC provides a reg-
ulated output of 5 V from an input
voltage range of 2.75 V. The maximum
A Linear Technology Application output current is 20 mA.

Elektor Electronics 10/98


52
TECHNICAL
DESCRIPTION 2 Figure 2. Diagram of
The block diagram of the LTC1517-3.3 the standard applica-
is shown in Figure 1. The IC uses a tion of the
switched-capacitor charge pump to LTC1517-3.3. Apart
boost VIN to a regulated output of from the IC, only three
3.3 V 4%. It achieves regulation by capacitors are
sensing the output voltage through an needed.
internal resistor divider and enabling
the charge pump when the divided
output drops below the comparators
lower trip point, which is set by VREF. propagation delays in the charge temperature exceeds about 160 C. The
When the charge pump is enabled, pump enable/disable circuits. High fre- charge pump is re-enabled when the
a 2-phase non-overlapping clock con- quency ripple is also present, mainly junction temperature drops to about
trols the internal charge pump from the equivalent series resistance 145 C. The LTC1517-3.3 will cycle in
switches. Flying capacitor C1 is charged (ESR) of the output capacitor. and out of thermal shutdown indefi-
to VIN on phase 1 of the clock. On Typical output ripple with VIN = nitely without latchup or damage until
phase 2 of the clock, C1 is in series with 2.5 V under maximum load conditions the short-circuit is removed from the
the input and connected to the output is 75 mV peak-to-peak with a low ESR output.
via an internal switch. This sequence of output capacitor of 3.3 F
charging and discharging the flying (minimum recommended Figure 3. Diagram of a low-power battery
capacitor occurs at a free-running fre- COUT). For applications backup supply with automatic switchover
quency of 800 kHz (typical) and con- and no reverse current.
tinues until the divided output voltage
reaches the upper trip point of the 3
comparator.
Once the output is back in regula-
tion, the charge pump is disabled. This
method of bursting the charge pump
on and off enables the LTC1517-3.3 to
achieve a high efficiency at extremely
low output loads.
A typical application diagram is
shown in Figure 2.

CAPACITOR
SELECTION
For best performance, it is recom-
mended that low ESR (equivalent
series resistance) capacitors be used for
both CIN and COUT to reduce noise and
ripple. The CIN and COUT capacitors
should be either ceramic or tantalum
and have a capacitance of not less than
3.3 F. Ceramic capacitors will provide
the smallest size for a given capaci-
tance. requiring VIN to exceed 3.3 V or for ANOTHER
If the input source impedance is applications requiring less than 75 mV APPLICATION
very low (<0.5 ), CIN may not be peak-to-peak ripple, a 6.810 F COUT
needed. capacitor is recommended. Slight fur- The diagram in Figure 3 shows an
Ceramic capacitors with values of ther decreases in output ripple can be application of the LTC1517-3.3 that
0.1 F or 0.22 F are recommended for achieved by using COUT capacitors illustrates what an important role the
flying capacitor C1. Lower values may larger than 10 F. IC can play in a power supply with
be used in low IOUT applications. integral buffer circuit. When in this cir-
PROTECTION cuit the input voltage fails, the logic cir-
OUTPUT RIPPLE CIRCUITS cuits are automatically switched to the
Normal operation of the LTC1517-3.3 During output short-circuit conditions, backup mode. In that mode, the MOS-
produces voltage ripple on the VOUT the LTC1517-3.3 will draw a current of FET conducts and the LTC1517-3.3
pin. This output voltage ripple is 40150 mA from the input, causing a ensures a continued VOUT derived from
needed for the parts to regulate. Low rise in junction temperature. On-chip two NiCd buffer batteries.
frequency ripple exists owing to the thermal shutdown circuitry disables [980078]
hysteresis in the sense comparator and the charge pump when the junction

Elektor Electronics 10/98 53


GENERAL INTEREST

refrigerator
economizer
for older models
If your refrigerator is
still one of the old
types with an auto-
matic defrost system,
this economizer can
help you reduce your
electricity billls. These
old models are pro-
vided with a small
heating element to
prevent icing up, but
in general this is at
best inefficient and
adds unnecessary
kilowatt-hours. The
circuit described in
this article limits the
number of defrost
cycles in such a way
that your electricity
bills are reduced with-
out an increase in ice It is a fact of nature that humidity to melt the ice.
tends to condense on the coldest part This is, of course, an
formation. of a space (think of single-glazed win- inefficient system:
dows in cold weather). This also hap- first the air is cooled
pens in a refrigerator. The coldest spot and then it is heated.
in this is easily recognized by the for- Since the heating element invariably is
mation of ice. This icing hinders the on for longer than necessary, it is pos-
heat conversion and so lowers the effi- sible in many cases to lower the energy
ciency of the system. In modern consumption of the fridge without
fridges the on and off switching of the affecting the efficacy of the defrost facil-
compressor motor is timed so that ice ity.
is never a problem: it can defrost natu-
rally, i.e., without a heating element. FIRST
Many older models, however, are pro- Before you start building the econo-
vided with an automatic defrost facil- mizer, make sure that it can be used
ity, which consists of a small heating with your fridge.
element. As soon as the compressor A diagram of the electrical circuit of
motor of such a refrigerator is switched a typical fridge is shown in Figure 1. A
Design by K A Walraven off, the heating element is switched on heating element, A, with an electrical

Elektor Electronics 10/98


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

resistance of about three kilohms is in the mains voltage. Figure 1. Basic electri-
series with the compressor motor, C. In the quiescent state, when relay 1 cal circuit of the auto
Thermostat B short-circuits the heating Re1 is not energized, the refrigerator is defrost facility in a
element when the compressor is to linked to the 12 V supply line on the refrigerator.
operate. This setup is shunted by door economizer via resistor R7. The fridge
switch D in series with the interior and this resistor then create a potential
light. divider, which provides a simple
A multimeter is needed to find out means of detecting whether the inte-
whether your refrigerator is suitable for rior light or the compressor motor is
use with the economizer. switched on. A B D
Unplug the refrigerator cable from When the resistance of the refriger-
the mains socket outlet. ator becomes low, the refrigerator is
Set the thermostat control to zero. switched on by IC1a via T1 and relay
Make sure that the door of the Re1. This results in a p.d. of more than
refrigerator is closed. 320 mV across R9. The relay remains
Measure the resistance between the energized until the load diminishes C E
L(ive) and N(eutral) pins of the mains (interior light or compressor motor off). M
socket terminating the refrigerator When the compressor motor works,
cable. The resistance should be about the p.d. across R9 is large enough to
3 k; if it is much more, exceeding
1 M, the refrigerator has no heating
element and the economizer cannot be Figure 2. Circuit dia- A = heating element (about 15 W)
used. gram of the econo- B = thermostat
mizer. It is linked C = compressor motor (about 135 W)
POWER directly to the mains D = door switch
E = interior light 980052 - 11
REQUIREMENTS supply, so that great
A refrigerator with an auto defrost care must be taken in
facility, and connected to the mains testing it.
supply, needs power at three different
levels.
R12 R11
470k 470k
When the compressor motor is work- 2 C3 R10 F1
ing: about 150 watts (W). 22
X2
When the compressor motor is off 1 1W 2A T

and the heating element is on: about D8


250V ~
1N4001
15 watts (W).
When the compressor motor is off
12V IC2
and the heating element and the inte-
7812 12V
rior light are on: about 30 watts (W). K1
R7 R2 C4 C5
RE1
When the refrigerator is discon- D9
5k6

33k

nected from the mains supply by 470


35V
10
63V
24V
the economizer, it may happen that: L
3V2

1. The refrigerator needs power R1 1N4001


RL1
100k

3 T1
at a level of more than 15 W. This D1 R6
RE1 = V23057-B6-A201
1
may be because the thermostat 2
IC1a 4k7

wants to switch on the compres- R3 BC547B


2x D3 C2
sor motor. In this case, the econ- 1N4148
10k

D2 K2
0V59

omizer must reconnect the 1N4148 10 63V L


7
refrigerator to the mains sup-
R4
ply.
1k

IC1b
2. The refrigerator needs power
at a level of less than 30 W. This 5 6
R8
10k
indicates that only the heating element R5
R9
12V
D7
is required to be on. The economizer
1k2

0V32

C1 D4 D5 D6
22

R16
then does not reconnect the refrigera- 10
4k7

tor to the mains supply. 24V 63V 5W

BAT85 12V
2x 1N5400 D11
CIRCUIT DESCRIPTION
R15
The circuit diagram of the economizer SAVE
47k

CTRDIV10/ 0 3
is shown in Figure 2. When the refrig- 10 9 12 DEC 2
S1
1
erator is connected to the mains sup- 14 IC3 4
IC1c IC1d 2
ply, the current drain is measured by 13 14
3
7
IC1 = TLC274 &
the potential difference, p.d., across D10
+ 4
10
1N4148 R13 13 1
resistor R9. If this is in accord with the 12V 8 5
100k 5
current drawn by the heating element R14
4017 6
6
7
and the interior light, the output of 4 16 1M 15 9
CT=0 8
op amp IC1b is low during part of the IC1 IC3 C6 11
9
positive half-cycle of the voltage. If the 11 8
CT5
12
220n
current is considerably larger since the
compressor motor is on, op amp IC1c is
on for part of the positive half-cycle of 980052 - 12

Elektor Electronics 10/98 55


C6
R14 R8 Parts list
3 R9

D10
H1

H2
R13

R2
R6
C2
Resistors:

R4
D11 D6
IC1 R1, R13 = 100 k

R3
R16 T1 D5 R2 = 33 k
D3 D9 ~ R3, R8 = 10 k
D1 D2 R4 = 1 k

R5
K2 R5 = 1.2 k

D4
L R6, R16 = 4.7 k

RE1
IC3

R7 = 5.6 k
L
R9 = 2.2 , 5 W
C1
R10 = 22 , 1 W

R1
K1 R11, R12 = 470 k
C5 S1 R7
R14 = 1 M
IC2 R15 R15 = 47 k
~
R12
C4 Capacitors:
R11 F1 2AT C1, C2, C5 = 10 F, 63 V, radial
C3 R10 C3 = 1 F, 250 V a.c., Class X2

H3
H4

C4 = 470 F, 35 V, radial
tnemgeS )C( 1-250089 980052-1 C6 = 0.22 F
D8 D7

Semiconductors:
980052-1
D1, D2, D3, D10 = 1N4148
(C) Segment

D4 = BAT85
D5, D6 = 1N5400
D1 = LED, 5 mm, high efficiency
T1 = BC547B

Integrated circuits:
IC1 = TLC274CN
IC2 = 7812
IC3 = 4017

Miscellaneous:
K1, K2 = 2-way terminal block, pitch
7.5 mm
S1 = octal DIP switch
Re1 = 24 V relay for board mounting
F1 = fuse, 2 A, slow
Enclosure as appropriate (see text)
PCB Order no. 980052 (see Readers
Services towards end of this issue)

Figure 3. The printed-circuit economizing), output Q1 is not linked economizer circuit works directly
board for the economizer is to a DIP switch. Diode D11 indicates from the mains supply, which means
available ready made see when the heating element is not on. that it must be housed in a double-
Readers Services towards the Diodes D1 and D3, in conjunction insulated enclosure.
end of this issue. with T1 and network R6-C62, form an
OR gate, so that T1 may be switched on The economizer is best built on the
by IC1a or IC3. printed-circuit board in Figure 3,
drive IC1c on in the rhythm of the A 24 V supply voltage is derived which is available ready made see
mains voltage. The consequent nega- from the mains voltage by network Readers Services towards the end of
tive pulses at the output of the op amp R1012-C3. This supply line is stabilized this issue. Depending on the enclosure
cause capacitor C6 to be discharged via by zener diode D7, and subsequently used, it may be necessary to round the
D10. The trailing edge is inverted and dropped to 12 V by regulator IC2. Var- corners of the board with a file as
enhanced by IC1d. In this way, the state ious reference voltages are derived shown. Figure 4 shows the prototype
of counter IC3 is then increased by one from the 12 V line by potential divider board in its enclosure.
for every trailing edge. When the com- R2R5. Solder all components on the board
pressor motor stops, C6 is recharged Diodes D5 and D6 protect op amp as indicated, but do not yet fit IC1 and
via R14. against high voltages at the input and IC3 into their socket. Connect the fin-
When the state of counter IC3 is also limit the dissipation in R9. ished board to the mains supply and
zero, that is, when output Q0 is high, measure the voltages at the points indi-
the relay remains energized. Every CONSTRUCTION cated in Figure 2. Take great care since
time the compressor motor is working, WARNING. Constructors in the United the full mains voltage is present on the
the next output of the IC goes high. Kingdom must ensure that the circuit board. Use an insulated workbench if at
When the output whose DIP switch is earth is NOT linked to the mains earth al possible. It is convenient to leave one
closed becomes high, the counter is which, by Regulation, must be perma- probe of the multimeter permanently
reset. It will be seen that the setting of nently connected to the refrigerator If connected to the circuit earth (NOT the
the switch determines after how many the two earths were linked, the Neutral mains earth!).
times the compressor motor has been line would be short-circuited to the When all voltages correspond with
on a defrost cycle is initiated. Since at mains earth. those indicated on the circuit diagram,
least one motor on cycle must be disconnect the circuit from the mains.
ignored (otherwise there would be no CAUTION. It will be noted that the

56 Elektor Electronics 10/98


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

Figure 4. Photograph
4 of the finished board in
its enclosure with the
lid removed. Great care
must be taken when
testing it.

the thermostat control, when the diode


should light. When this is so, the
remainder of the economizer may be
checked. When the refrigerator door is
opened, the interior light must come
on. When the door is being closed, the
click of the relay changing state should
be heard clearly.
It is not possible to say which set-
ting of S1 is the most propitious for
each and every case. As a guide, open
all switches so that the counter is reset,
and close S1.8. If this results in icing up
after a while, the economizing action is
too drastic. Open S1.8 and close S1.7. If
this still leads to icing up, open S1.7.
and close S1.6. and so on until there is
no icing up.
[980052]

ELEKTOR

Open all DIP switches, except S1.1. circuit to the mains supply. Briefly 240V ~ 50Hz

Insert IC1 and IC3 into their respective open and close S1.1. No. 980052
sockets. Connect the refrigerator to the When all is well, D11 remains off. F = 2A T max. 220VA
relevant terminals and reconnect the Turn on the compressor motor with

Elektor Electronics 10/98 57


software for electronics
Electronics Work-
bench Layout
simulation program starts to
design PCB layouts

Electronics Work-
bench (EWB), the
user-friendly simula-
tion program, has
been extended with a
new, powerful, pro-
gram for the design
of printed circuit
boards. The new pro-
gram, like the basic
Many electronics enthusiasts will agree one extend a program for simulation
simulation software, that by virtue of its simple user inter- of electronic circuits? Well, the most
is marked by ease of face and clearly structured menus, likely candidate is a circuit board lay-
Electronics Workbench paved the out utility. The new program EWB
control. Circuit dia- way towards simulation of analogue Layout we received for reviewing is
grams from EWB and digital circuits using the computer.
Despite their user-friendly setup, the
the result of close co-operation
between Interactive and Ultimate
may be exported to current versions of EWB offer the Technology. Users of Ultiboard soft-
same functionality as many simulation ware will not fail to notice lots of sim-
the PCB layout pro- programs aimed at the professional ilarities between their program and the
gram without any market. These days, a clear trend fledgling from Interactive.
becomes visible of suppliers of simula- Interactive has succeeded in inte-
trouble whatsoever. tion software and PCB layout pro- grating its new PCB layout program
grams extending the functionality of into the EWB suite. Having drawn the
Next, the compo- their products. The Canadian com- circuit diagram and put it through the
nents are simply pany Interactive Image Technologies, circuit simulation phase, you are ready
too, has been looking for ways to to export the lot to the PCB design
dragged to the widen its product in an attempt to program. You are instantly presented
desired positions on enable designers to cover the largest
possible range from circuit design to
with a board. Beside it appear all com-
ponents that make up the simulated
the board. the final PCB layout phase, all using circuit, and their interconnections. All
the computer, of course. But how does you have to do is drag these compo-

60 Elektor Electronics 10/98


nents to the desired position on the
board, and then leave the real work to
the autorouter. In this way, even inex-
perienced users can make a PCB lay-
out in no time at all. We put EWB Lay-
out through its paces by presenting it
to an unsuspecting person without
any previous experience in PCB
designing. In less than half an hour, he
came up with a circuit diagram and a
matching PCB design!
Of course, the layout program has
much more to offer than the rather
simple operations mentioned above.
The program contains a library with
over 4,000 footprints, and recognises
the right footprint for all 10,000 com-
ponents stored by EWB. With the aid
of the internal editor, the user is capa-
ble of creating new component shapes,
or modify existing shapes. Multilayers
are possible up to 32 layers. Two inter-
active autorouters provide formidable
assistance when it comes to dividing
the PCB tracks. All sorts of PCB shapes
are allowed, up to a size of 50x50. of RAM as a minimum requirement, it version has slightly reduced function-
Some other features that may be men- would seem unwise to use anything ality (fewer footprints, max. 500 pins,
tioned here: interactive editing, real older or slower than a 200 MHz Pen- and only one autorouter). These three
time design rule check, track density tium, if only to be able to work com- versions are shortly to be comple-
histograms, blind and buried vias, re- fortably. mented with an Educational version.
route while move, and user-defined EWB Layout comes in three ver- All prices are exclusive of VAT.
pads. sions: EWB Layout Professional with a (985065-1)
The program supports a number of maximum of 2,000 pins (price 995); In the UK and Ireland, contact Adept
plotters and printers, and is capable of EWB Layout Power Professional sup- Scientific plc, 6 Business Centre West,
saving files in foreign formats like DXF, porting unlimited pins (price 1995) Avenue One, Letchworth, Hertford-
Gerber and Excellon. both intended to complement EWB shire SG6 2HB. Tel: (01462) 480055, fax:
EWB Layout only runs on Win- EDA or PRO and the low-cost ver- (01462) 480213. Email:
dows 95 or NT PCs. Although Interac- sion for private use called EWB Layout ewb@adeptscience.co.uk. Internet:
tive indicates a 486 PC with 8 Mbytes Personal Edition (price 299). The latter http://www. adeptscience.co.uk.

Elektor Electronics 10/98 61


62 Elektor Electronics 10/98
Elektor Electronics

CS8412 AD22100

Integrated Circuits Integrated Circuits


Special Applications, Audio DATASHEET 10/98 A-D Converters DATASHEET 10/98

CS8412 +5 volts. AD22100* swings from 0.25 V at 50C to +4.75 V at +150C


Digital Audio Interface Receiver Voltage Output Temperature Sensor with Signal using a single +5.0 V supply.
VA+ Positive Analog Power Supply, pin 22. Conditioning Due to its ratiometric nature, the AD22100 offers a
Manufacturer Positive supply for the analogue section. Nominally cost-effective solution when interfacing to an ana-
Cirrus Logic, Inc. Crystal Semiconductor Products +5 volts. Manufacturer logue-to-digital converter. This is accomplished by
Division, P.O. Box 17847, Austin, Texas 78760, Analog Devices, One Technology Way, P.O. Box using the ADCs +5 V power supply as a reference
U.S.A. Homepage: www.crystal.com. DGND Digital Ground, pin 8. 9106, Norwood, MA 02062-9106, U.S.A. Home- to both the ADC and the AD22100 (See Figure 2),
10/98

Ground for the digital section. DGND should be con- page: www.analog.com eliminating the need for and cost of a precision refer-
Features nected to the same ground as AGND. ence.
Monolithic CMOS receiver Features
Low-jitter, on-chip clock recovery, 256x Fs output AGND Analog Ground, pin 21. 200C Temperature Span * Protected by U.S. Patent Nos. 5030849 and
clock provided Ground for the analogue section. AGND should be Accuracy better than 2% of Full Scale 5243319.
Supports: AES/EBU, IEC958, S/PDIF, & EIAJ CP- connected to the same ground as DGND. Linearity better than 1% of Full Scale
340 professional and consumer formats Temperature Coefficient of 22.5 mV/C
Extensive error reporting Output Proportional to Temperature x V+
- repeat last sample on error option Audio Output Interface Single Supply Operation
On-chip RS422 line receiver SCK Serial Clock, pin 12. Reverse Voltage Protection
Serial clock for SDATA pin which can be configured Minimal Self Heating
Application Example (via the M0, M1, M2 and M3 pins) as an input or High Level, Low Impedance Output
Digital Clipping Indicator, Elektor Electronics October output, and can sample data on the rising or falling
1998. edge. As an output, SCK will generate 32 clocks for Applications
every audio sample. As an input, 32 SCK periods per HVAC Systems
Description audio sample must be provided in all normal modes. System Temperature Compensation
The CS8412 is a monolithic CMOS device which Board Level Temperature Sensing Figure 1. Simplified block diagram.
receives and decodes audio data according to the FSYNC Frame Sync, pin 11. Electronic Thermostats
AES/EBU, IEC958, S/PDIF & EIAJ CP-340 interface Delineates the serial data and may indicate the par-
standards. The CS8412 receives data from a trans- ticular channel, left or right, and may be an input or Markets
mission line, recovers the clock and synchronisation output. The format is based on M0, M1, M2 and M3 Industrial Process Control
signals, and de-multiplexes the audio and digital pins. Instrumentation
data. Differential or single-ended inputs can be Automotive
decoded. SDATA Serial Data, pin 26.
65

The CS8412 de-multiplexes the channel, user, and Audio data serial output pin. Application Example
validity data directly to serial output pins with dedi- PLC-87 Board, Elektor Electronics October 1998.
cated output pins for the most important channel M0, M1, M2, M3
status bits. Audio data is output through a config- Serial Port Mode Select, pins 23, 24, 18, 17. General Description
urable serial port that supports 14 formats. The Selects the format of FSYNC and the sample edge of The AD22100 is a monolithic temperature sensor Figure 2. Application Circuit.
channel status and user data have their own serial SCK with respect to SDATA. M3 selects between with on-chip signal conditioning. It can be operated
pins and the validity flag is ORed with the ERF flag eight normal modes (M3=0) and six special modes over the temperature range 50C to +150C, mak-
to provide a single pin, VERF, indicating that the (M3=1). ing it ideal for use in numerous HVAC, instrumenta-
audio output may not be valid. This pin may be used tion and automotive applications.
by interpolation filters that provide error correction. The signal conditioning eliminates the need for any
Pin Descriptions Control Pins trimming, buffering or linearization circuitry, greatly
VERF Validity + Error Flag, pin 28. simplifying the system design and reducing the over-
Power Supply Connections A logical ORing of the validity bit from the received all system cost. Pin Configurations
VD+ Positive Digital Power, pin 7. data and the error flag. May be used by interpolation The output voltage is proportional to the temperature TO-92
Positive supply for the digital section. Nominally filters to interpolate through errors. times the supply voltage (ratiometric). The output SOIC
#
AD22100 CS8412

10/98
Integrated Circuits Integrated Circuits
A-D Converters DATASHEET 10/98 Special Applications, Audio DATASHEET 10/98
Ordering Guide
Model/Grade Guaranteed Temperature Range Package Description Package Option
Clearing is accomplished by bringing SEL high for
AD221001 KT 0C to 100C TO-92 TO-92
U User Bit, pin 14. more than 8 MCK cycles.
AD22100 KR 0C to 100C SOIC SO-8 Received user bit serial output port. FSYNC may be
AD22100 AT 40C to +85C TO-92 TO-92 used to latch this bit externally. F0, F1, F2 Frequency Reporting Bits, pins 2-3, 27.

Elektor Electronics
AD22100 AR 40C to +85C SOIC SO-8 Encoded sample frequency information that is
AD22100 ST 50C to +150C TO-92 TO-92 C Channel Status Output, pin 1. enabled by bringing SEL low. A proper clock on FCK
AD22100 SR 50C to +150C SOIC SO-8 Received channel status bit serial output port. must be input for at least two thirds of a channel sta-
AD22100 Chips +25C N/A N/A FSYNC may be used to latch this bit externally. tus block for these pins to be valid. They are updated
three times per block, starting at the block boundary.
Specifications (TA = +25C and V+ = +4V to +6V unless otherwise noted)
CBL Channel Status Block Start, pin 15.
AD22100K AD22100A AD22100S The channel status block output is high for the first ERF Error Flag, pin 25.
Parameter Min Typ Max Min Typ Max Min Typ Max Units four bytes of channel status and low for the last Signals that an error has occurred while receiving the
16 bytes. audio sample currently being read from the serial
TRANSFER FUNCTION VOUT = (V+/5 V) x [1.375V + (22.5mV/C) x TA )
port. Three errors cause ERF to go high: a parity or
TEMPERATURE COEFFICIENT (V+/5 V) x 22.5 mV/C SEL Select, pin 16. biphase coding violation during the current sample,
TOTAL ERROR Control pin that selects either channel status infor- or an out of lock PLL receiver.
mation (SEL=1) or error and frequency information
Initial Error TA = +25C 0.5 2.0 1.0 2.0 1.0 2.0 C
(SEL=0) to be displayed on six of the following pins.
Error over Temperature Receiver Interface
TA = TMIN 0.75 2.0 2.0 3.7 3.0 4.0 C C0, Ca, Cb, Cc, Cd, Ce RXP, RXN Differential Line Receivers, pins 9, 10.
Channel Status Output Bits, pins 2-6, 27. RS422 compatible line drivers.
TA = TMAX 0.75 2.0 2.0 3.0 3.0 4.0 C These pins are dual function with the C bits select-
Nonlinearity ed when SEL is high. Channel status information is
TA = TMIN to TMAX 0.5 0.5 0.5 % FS1
displayed for the channel selected by CS12. C0, Phase Locked Loop
which is channel status bit 0, defines professional MCK Master Clock, pin 19.
OUTPUT CHARACTERISTICS (C0=0) or consumer (C0=1) mode and further Low jitter clock output of 256 times the received
Nominal Output Voltage controls the definition of the Ca-Ce pins. These pins sample frequency.
are updated with the rising edge of CBL.
V+ = 5.0 V, TA = 0C 1.375 V
FILT Filter, pin 20.
V+ = 5.0 V, TA = +100C 3.625 V CS12 Channel Select, pin 13. An external 1k resistor and 0.047-F capacitor are
V+ = 5.0 V, TA = 40C 0.475 V This pin is also dual function and is selected by required from the FILT pin to analog ground.
bringing SEL high. CS12 selects sub-frame 1 (when
V+ = 5.0 V, TA = +85C 3.288 V
low) or sub-frame 2 (when high) to be displayed by
V+ = 5.0 V, TA = 50C 0.250 V channel status pins C0 and Ca through Ce.

66
V+ = 5.0 V, TA = +150C 4.750 V
FCK Frequency Clock, pin 13.
POWER SUPPLY Frequency clock input that is enabled by bringing
Operating Voltage +4.0 +5.0 +6.0 +4.0 +5.0 +6.0 +4.0 +5.0 +6.0 V SEL low. FCK is compared to the received clock fre-
quency with the value displayed on F2 through F0.
Quiescent Current 500 650 500 650 500 650 A
Nominal input value is 6.144 MHz.
TEMPERATURE RANGE
Guaranteed Temperature Range 0 +100 40 +85 50 +150 C E0, E1, E2 Error Condition, pins 4-6.
Encoded error information is enabled by bringing
Operating Temperature Range 50 +150 50 +150 50 +150 C
SEL low. The error codes are prioritized and latched
PACKAGE TO-92, SOIC TO-92, SOIC TO-92, SOIC so that the error code displayed is the highest level
1 FS (Full Scale) is defined as that of the operating temperature range, 50C to +150C. The listed max. specification limit applies to the guaranteed temperaturevrange. For of error since the last clearing of the error pins.
example, the AD22100K has a nonlinearity of (0.5%) x (200C) = 1C over the guaranteed temperature range of 0C to 100C.
CS8412, Typical Connection Diagram
#

You might also like