100% found this document useful (2 votes)
294 views80 pages

Ee 1989 12extra

magazine issue - extra
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (2 votes)
294 views80 pages

Ee 1989 12extra

magazine issue - extra
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 80

Converting parallel information into serial format is a

function often performed by complex logic or other


dedicated hardware. The approach shown in this arti-
cle proves that there is a good alternative based on
a handful of discrete parts. The reverse process, serial
to parallel conversion, is of similar simplicity.

Design by G. Visschers

parallel-to-serial converter
and the other way around, with just four ICs

5V
R4
5V
4k7

8 MUX
K2 0
7
1 R5
6 C7
5V

10k
2
5 3
4 100n
R1 R2 4
3 K1
10k

10k

5
2 IC4
5V 6 1
IC2 1 5
7 10 3 7 6
74HCT160 23 W
C1 IC1a 8 IC3 6 2
1 CTRDIV10 22
3 1 9 74LS150 2 8 7
2 & CT=0 21
22n 9 10 4 3
M1 20 11 1
8
M2 19 CA3130
10 15 12 4
S1 G3 3CT=9 18
C2
5 7 13 R6 9
4 G4 17 C8
&
10k

6 2 14 5
100n C5/2,3,4+ 16
15
3 14 15 100n
IC1b 1,5D [1] 0
4 13 14
[2] 0
5 12 13 G
[4] 15
P1 6 11 11 5V
[8] 4
9
G
4k7
5V
IC1c IC1d
8 12 R8 R7
10 11
& &
10k

1k

9 13
5V

C3 14 C4 16 C5 14 C6
T1 IC1 IC2 IC3
100n 7 100n 8 100n 7 100n

IC1 = 4093
BC547B
982081 - 11

Figure 1. Circuit diagram of the parallel-to-serial converter. Using just four simple TTL ICs, parallel data is converted into serial format at
a bit rate of 9600 per second.

Lets start by mentioning that the pre- defined baudrate (speed) of 9600 bits actual parallel-to-serial conversion.
sent circuit is not a state-of-the-art per second. The transmission format is Eight of the 16 inputs of this multiplexer
superfast parallel-to-serial converter. very common: 8 databits, 1 stop bit are connected to K2, the parallel
However, it may be just the right circuit and no parity bit in practice this set- input of the converter. Input E0 of the
or sub-circuit if you were looking for a ting will be fine for all but the most IC represents the start bit, and E1
simple and rather clever solution. exotic cases. through E8, the databits. Input E9,
This article describes how a couple of The circuit diagram of the bidirection- finally, is used to generate the stop bit.
common-or-garden TTL ICs are al converter may be found in Figure 1. The inputs of the 74LS150 are
employed to convert parallel data The heart of the circuit is IC3, a type scanned by a 74LS160 BCD counter.
into serial format, using a hardware- 74LS150. This IC is responsible for the Every time S1 is pressed, the 74LS160

2 - 12/98 Elektor Electronics EXTRA PC TOPICS


5V
15
C3 EN3
1
C2
IC4
1n R4
SRG8 4094

4k7
3
C1/
5V K2
2 4
1D 2D 3
5
6
7
14 C4 14 C5 16 C6 16 C6
14
IC1 IC2 IC3 IC4
100n 100n 100n 100n 13
7 7 8 8
12
12 11
IC1f IC2d 11

1 & 9
IC1 = 74HCT14 10
13 12 13
IC2 = 4093 IC1e
R3
11 10
47k 1
C4
IC1b 4
5V
10n
IC3
K1 1 74HCT160
CTRDIV10
1 3 1
CT=0
6 P1 9
M1
2
M2
7 IC1a 4k7 10 15
R1 IC2a G3 3CT=9
3 1 2 1 IC2c IC1d 7
22k 1 3 8 G4
8 2 & 10 9 8 2
9 & 1 C5/2,3,4+
4
3 14
9 1,5D [1]
4 13
5 [2]
IC1c 5 5 12
R2 4 [4]
5 6 6 & 6 11
1 1k C3 [8]

IC2b
C1 100n

10n

982081 - 12

Figure 2. The other way around is no problem either. This simple circuit converts serial information into parallel.

counts up from 0 to 9 and so applies increased accordingly. For a bit rate of serial communication.
the associated BCD code to the A-D of 2400, for example, a 1-F capacitor A simple power supply with +5 V and
inputs of IC3. Because of the action is a good choice. In this way, the cir- 5 V outputs is sufficient for this project.
of capacitor C2, this also happens cuit can be tweaked for nearly every The other way around
when the supply voltage is first bit rate you may want to use all you
switched on. One byte is then con- have to do is modify the oscillator as So far weve only discussed the con-
verted and transmitted. required. version from parallel to serial format.
If the circuit is used as a sub-assembly The reverse process, serial to parallel,
in a larger unit, components R1, R2, RS232, step by step is also implemented in a very simple
C1 and S1 may be omitted. The input manner.
of IC1a is then connected to the dri- The only missing element is the line The relevant circuit is shown in
ving circuit. interface. For this purpose we call in Figure 2. Connector K1 is connected
The operation of the rest of the cir- the help of a symmetrically powered to the serial port on the PC. The con-
cuit is should be easy to understand CA3130 opamp. This opamp, config- nector has a number of links to make
because a really simple counter cir- ured as a comparator, converts the TTL sure hardware handshaking is dis-
cuit is used. The flip-flop built around signal received from the multiplexer abled. By way of inverter IC1a, the ser-
IC1a and IC1b may be set with S1, into a serial signal which toggles ial signal (TxD) arrives at the D (data)
and reset by the BCD counter at the between +5 V and 5 V. In this way, we input of IC4, a binary counter.
end of the serial code transmission. strive to meet the electrical require- IC2a and IC2b together form a SR (set-
Once the flip-flop is set, the BCD ments defined for the RS232 interface. reset) flip-flop. In conjunction with an
counter is enabled, and each clock Only one line of the serial interface is oscillator built around IC1d and IC2c,
pulse then causes a new bit to be actually used: TxD (transmitted data). and a counter type 74HCT160, they
placed on the serial output line. A sim- On the connector, the handshaking act as the heart of the circuit, that is,
ple RC clock generator is built around lines RTS (request to send) and CTS as far as timing is concerned.
buffers IC1c and IC1d. It is dimen- (clear to send) are interconnected, as When data is received at the serial
sioned such that a bit rate of 9600 per well as the triplet DSR (data set ready), input, it is converted to TTL level (R1,
second is achieved. The exact bit rate DCD (data carrier detect) and DTR IC1a), and then applied to the input of
is set with the aid of preset P1. For (data terminal ready). In this way, the the SR bistable. This bistable starts the
lower bit rates, capacitor C3 has to be RS232 port is enabled, and capable oscillator whereupon oscillator (clock)

PC TOPICS Elektor Electronics EXTRA 3 - 12/98


Now hear this The serial to parallel converter is also simple to test. The program
printed below continually sends the number sequence 00 through
25r to the parallel port:
The RS232 port in an MS-DOS computer has to be set up (or con-
figured) to make sure it is in the right mode (not mood) for recep-
tion of data. The command to use is
FOR X = 0 TO 255
OUT &H2F8,X
mode com2:9600,n,8,1 FOR Y = 1 TO 1000: NEXT Y
NEXT X
Next, a simple program may be employed to read data. The fol-
lowing QBASIC program shows the way The line

start: FOR Y = 1 TO 1000: NEXT Y


IF INP(&H2FD)>96 THEN PRINT INP(&H2F8)
GOTO start: has been added to slow down the resulting datastream if a fast
computer is being used. Thanks to this setting, you can even see
In this example, 2F8H is the address of the COM port, and 2FDH that a new value is transmitted on every loop iteration.
that of the status register which may be read to see if there is new Both programs make use of communications port COM2. If you
data. If another COM port is used, then these addresses have to want to use another COM port, then the port address has to be
be changed accordingly. modified accordingly.

pulses are transmitted to the clock and R4 supplies the strobe pulse which adjusted. Unfortunately, adjusting the
input of the counter (IC3) and the shift enables data to be read into the out- clock oscillator is not as easy as we
register (IC4). Eventually, the shift regis- put register of IC4. This signal is sup- would like it to be. The problem is that
ter shifts out the bits one by one. plied by the RC0 output on IC3. Data the oscillator is only active when serial
One the oscillator has produced nine will remain present on the output until data is being received. For the purpose
clock pulses, the SR flip-flop is reset the next strobe pulse appears. A of aligning the circuit, this problem
again via the signal at the RCO output peripheral device connected to the may be solved by temporarily con-
of IC3 (which is inverted by IC1c). The parallel port is furnished with a strobe necting pin 8 of IC2c to the +5 V line
RC network consisting of R2 and C1 pulse via R3 and C4. (i.e., temporarily break the link between
lengthens the last pulse. If that was not When properly dimensioned the circuit pin 3 of IC2a and pin 8 of IC2c). Next,
done, there would be a fair chance of is suitable for serial signals travelling at the clock frequency may be measured
the shift register missing the last pulse, a rate of 9600 bits per second. By at pin 8 of IC1d (2400 Hz for 2400 bits/s,
mainly because IC4 (a CMOS IC) is increasing C2 to 470 nF, the bit rate or 9600 Hz for 9600 bits/s).
considerably slower than IC3 (a HCT may be dropped to 2400. Preset P1 (982081-1)
IC). The RC network consisting of C3 allows the bit rate to be accurately

4 - 12/98 Elektor Electronics EXTRA PC TOPICS


Most soundcards have a line input and one for an
electret (condenser) microphone. To be able to con-
nect an inductive tape-recorder head or a dynamic
microphone, an add-on preamplifier is needed.

Design by M. Wenzel

preamplifier for soundcard


for inductive pick-up elements and dynamic microphones

configuration, biased to provide a cur-


R6 rent amplification of about 300 times.
33k Together with the source impedance
of the microphone or pick-up element,
R2 R4 P1
capacitors C2 and C3 form a low-pass
filter which lightly reduces the band-
22k

470

10k
K2 width. In addition, the output low-pass,
R2-C3, reduces the dynamic collector
R8
resistance at higher frequencies. In this
10k

T2
C4 way, the filter reduces the gain in the
C3
270p
higher part of the frequency spectrum
56p T1 BC T3 and so helps to eliminate any oscilla-
C1 548B
K1
tion tendencies.
1
16V BC BC
The first, high-gain, stage is terminat-
549B 548B ed by T2. Unlike T1, this transistor does
R1 R3 R5 R7
C2 C5 C6 C7 not add to the overall gain, because
47k

22

10k

2k2

120p 10 1n 10
the output signal is taken from the
16V 16V emitter (common-collector circuit). T2
982092 - 11 thus acts as an impedance converter,
with C4 reducing any tendency to
oscillation.
The output stage around T3 is a com-
Figure 1. Circuit diagram of the preamplifier for PC soundcards.
mon-emitter circuit again. In it, preset
P1 determines the voltage amplifica-
tion. T3 is biased by means of a direct-
Even in this day and age of integrated bias voltage supplied by the micro- current feedback circuit based on
microelectronics, a transistorised cir- phone input eliminates a separate components R7 and C5. To this is
cuit built from discrete part has a right power supply for the preamplifier. added an overruling dc feedback
of existence. The preamplifier The microphone input of a soundcard path back to the input transistor, via
described in this short article goes to will typically consist of a 3.5-mm jack R6. This measure guarantees good dc
show that it will be some time before socket in stereo version, although only stability in the preamplifier.
discrete transistors are part of the sili- one channel is available. The free
con heritage. The preamplifier is suit- contact is used by the soundcard to The circuit is small enough to be built
able for use with a soundcard or the supply a bias voltage to the mono on a piece of veroboard or stripboard,
microphone input of a modem. electret microphone. This voltage is and yet remain reasonably compact.
As you will probably know, most sound- accepted with thanks by the present To prevent interference from external
cards have input sockets for signals at preamplifier, and conveniently obvi- sources, the completed board should
line level (stereo), as well as one for a ates an external (mains adaptor) be mounted in a properly screened
(mono) electret microphone. For the power supply. (metal) enclosure, with the connec-
applications we have in mind, connect- tions to the input source and the sound
ing-up an inductive pick-up element or A classic design card made in screened cable.
a dynamic microphone, both inputs are The preamplifier provides a frequency-
in principle suitable, provided the In true transistor-design fashion, the linear response. In case the source sig-
source signal is amplified as required. preamplifier consists of three stages. nal is marked by frequency correction
The author eventually chose the micro- Capacitor C1 decouples the signal (e.g., RIAA), then a matching lineariza-
phone input on the soundcard. Firstly, received from the microphone or pick- tion circuit should be used if the rele-
because the line inputs are usually up element, and feeds it to the input of vant signals are used by the computer.
occupied, and secondly, because the the first stage, a transistor in emitter (982092-1)

PC TOPICS Elektor Electronics EXTRA 5 - 12/98


Todays top-line PCs are fully equipped and ready to function as
true multimedia machines. Many PC users extend their machines
with a TV card to be able to view TV pictures on the PC monitor, and
digitize pictures for further processing. Such a combination of a PC
and a TV card offers even more possibilities, however, such as
reception and storage of Teletext pages. Recent developments in
this field also allow Internet pages to be received from cable TV net-
works. This is a free service, as no telephone company or Internet
Service Provider is involved. In Europe, the German TV station ZDF
leads the way with Intercast.

By our editorial staff

Intercast
free Internet pages via TV signals

(broadcasters) have been busy


developing several methods to
enable extra information to be con-
veyed via existing communication
channels. As far as our regular TV
channels are concerned, most of us
are used to having Teletext, a facility
that allows broadcasters to transmit
lots of (text) information that reaches us
by way of a couple of (normally invisi-
ble) TV lines in the vertical blanking
interval.
Recently, a number software and
hardware manufacturers came up
with a method of information supply
which is more up to date than the
Teletext system. Using a number of TV
lines in the vertical blanking interval,
data is transmitted that allows HTML
pages to be built in a suitable receiv-
er. In this way, an Internet-like display is
created. The advantage of these sys-
tems is that anyone with a TV antenna
or a cable-TV connection is in a posi-
tion to receive these signals, and that
the service is normally free of charge.
Note, however, that this is basically
one-way traffic. For a real Internet
link, you will need two-way communi-
cation in the form of a telephone con-
nection or a two-way cable-TV link,
and that is not the case with the recent
Figure 1. In the top left-hand corner, the Intercast Viewer shows the TV picture. This is
developments. The inherent disadvan-
flanked by an overview of received Intercast pages. The lower part of the Window
tage is, therefore, that the transmitted
shows the selected page.
information is always the same, i.e., it
can not be adapted to reflect the
requirements of individual users.
Functionally, the TV set and the PC while the computer is being trans- In spite of this handicap, there seems
seem to be in a merging process. formed into a TV set by the addition of to be a lot of interest in broadcasting
Using special Internet set-top boxes it is a TV tuner insertion card. Internet-like pages by way of regular
possible to surf the Net using a TV set, Traditionally, information suppliers TV channels. After all, you only have to

6 - 12/98 Elektor Electronics EXTRA PC TOPICS


switch on your PC, start the right pro-
gram, and the information is delivered
to your hard disk, automatically and
free of charge. After some time, you
can browse around for information
you find useful. Meanwhile, two differ-
ent systems have emerged that seem
to have a fair chance of survival:
Intercast (developed by Intel) and
WaveTop (from US based WavePhore).
The latter system seems to be used in
the USA only, and will not be discussed
in detail here.
Intercast technology goes back to
1995, and NBC, CNN and MTV have
been transmitting Intercast pages for
quite some time. In Europe, the
German broadcaster ZDF started to
put Intercast transmissions on the air in
1997. This initiative was followed by a
another German TV station, DSF, in
August 1998. If and when other broad-
casters jump the bandwagon remains
Figure 2. This utility program that comes with the Viewer may be used to gauge the
to be seen.
reception quality of the Intercast service.

How does Intercast work?


The name Intercast is a contraction of example, news headlines, are updat- should be noted, however, that this
the words Internet and broadcast, ed at regular intervals, so that it is not version is not suitable for PAL TV signals.
and so indicates the merging of TV necessary to leave the PC switched on When we write this, version 2.0 of
pictures and Internet pages. At the all day to catch a certain page. Intercast has just been released by
transmitter side, the HTML pages to be Special overviews are transmitted Intel, and it is available for download-
broadcast are first built and then showing transmission schedules for ing from www.intercast.de. This version
added to the TV signal. The HTML infor- specific subjects. is suitable for Windows 95 as well as
mation is conveyed in a number of The received HTML pages allow hyper- Windows 98 (older versions are only
free lines in the vertical blanking, links to be entered that point the way compatible with Windows 95).
which in the PAL TV system lasts to Internet sires. If the user clicks on
22.5 lines. Although up to 10 of these one of these hyperlinks, the internet WaveTop
TV lines may be reserved for Intercast, browser is automatically launched,
the actual number will depend on any and a connection to the Internet is In the US of A, WaveTop pages are
services which already be available in established. Currently, this works with being broadcast by a large number of
different countries (Teletext, VIT lines, Microsoft Internet Explorer only. TV stations. WaveTop resembles
etc.) Each line in the vertical-blanking Windows 98 comes with a module Intercast in that vertical blanking lines
period allows up to 10 kbits of data to called WebTV, which has to be are employed to convey data. The
be transmitted. A (maximum) capacity installed before you can receive essential difference between the two
of 10 lines therefore allows a data rate Intercast. But thats not all, because systems is that Intercast supplies infor-
of up to 100 kbits/s to be achieved. you also have to install (manually!) the mation to go with the programs of a
At the receiver side, we require a PC program iit22020.exe which may be specific transmitter. Consequently, the
and TV tuner card which is compatible found in the folder drivers/webtv/ broadcaster determines which sub-
with the Intel Intercast program, for intercst on the Windows 98 CD-ROM. It jects appear on the Intercast pages.
example, a card from Hauppage or
Miro (Pinnacle). After starting the pro-
gram you are presented with a three- Intercast on the Internet
part window (Figure 1). In the top left-
If you are interested in Intercast and would like to know more about this interesting tech-
hand corner you see the TV picture,
nology, there a number of excellent sources of information available on the Internet.
flanked to the right by an overview of
received pages. Below these two sub- Although there is an official organization involved in Intercast, co-ordinating the activities
windows is an area showing a page of all companies with an interest in the technology, the relevant web site, www.inter-
selected from the overview, or the cur- cast.org, has little of interest to us.
rently received page. An extensive story on Intercast may be found at www.fhr.ch/~rvogt/intercst. Well worth
The user creates a cache of, say, having a look at!
25 Mbytes on the hard disk to enable If you are after information about compatible TV cards, we suggest stopping by at Haup-
all received data to be stored. As long page (www.hauppage.com, www.hauppage.co.uk and www.hauppage.de) and Miro
as the computer is switched on with (www.pinnaclesys.com and www.pinnaclesys.de).
the Intercast program running, a con- For further information on Intercast broadcasts in Europe, consult the German ZDF web
tinuous flow of data will be received site at www.zdf.de/programm/intercast/index.html.
and stored. Important pages, for

PC TOPICS Elektor Electronics EXTRA 7 - 12/98


By contrast, WaveTop supplies a spe-
cific programme (divided in topics
such as news and sports) which is set
up centrally. In this system, every TV
station supplies the same pages.
Windows 98 comes with a WaveTop
viewer which may be installed as a
component of WebTV. In spite of this,
we doubt if this system will ever make it
to general acceptance in Europe.

Other systems
Traditionally, Germany has been the
leader in the development of other
technologies that enable data to be
transmitted along with TV signals. Way
back in 1986, the WDR Computer Club
came up with their Videodat
decoder, and the system has been in
use ever since for the free software-
over-air service linked with the relevant
TV programme.
Figure 3. MTV also broadcasts Intercast data in the US; alas, not yet in Europe.
Deutsche Telekom have also teamed
up with Dresdens Technical University
for the development of Broadcast
Online TV. As opposed to WebTop and
Intercast, this system employs the hori- a special receiver card is needed. Intercast. If you can pick up an
zontal blanking interval (sync pulse, For the time being, we will have to make Intercast-savvy TV station, and you have
front and rear porch) to convey data. do with whats available on a larger a TV card in your PC, do give it a try.
A major disadvantage, however, is that scale, and in Europe that means (982091-1)

8 - 12/98 Elektor Electronics EXTRA PC TOPICS


A PC, most of us would say, consists of a complete computer case
with a keyboard and a monitor, all wired up and installed in the
workplace. And yet, the functionality of a PC is increasingly
employed for so-called embedded control systems. Compactness
is the buzzword in this field. US-based ZF Microsystems recently intro-
duced a chip that reduces all major functions of a PC to a single
component with the size of a credit card.

PC-on-a-chip
ZF Microsystems present an integrated solution
lowing functions: a DRAM controller, an
ISA bus interface, a keyboard inter-
face, two serial ports and one parallel
port, a connection for a floppy disk
drive and an EIDE interface for two
devices, for example, a hard disk and
a CD-ROM drive. Apart from these
functions, the CSS also contains an AT
compatible BIOS ROM, and a ROM in
which Calderas embedded DR-DOS is
stored. The standard DRAM memory
has a size of 2 Mbytes. The system may
be extended with external RAM up to a
size of 64 Mbytes using standard 3.3-V
EDO RAM (70 ns).
With the chip powered up and a dis-
play interface connected, your PC
monitor will show the DOS prompt. In
addition to the standard system soft-
ware, the flash memory has sufficient
Anyone who has ever looked inside specially developed for rugged room for the storage of system-specif-
an PC must have come to the con- embedded-control applications. The ic routines. Standard DOS software
clusion that the machine consists of a heart of a PC has been integrated into may be used without problems in this
number of integrated circuits (or a single functional module (SCC, environment.
chips), insertion cards, a power sup- Single Component Computer) suitable Interestingly, purchasing an
ply and cable bundles. The inherent for surface-mount assembly. To be OEMModule486 means that you auto-
disadvantage of using so many sep- able to connect the SCC to standard matically get a free licence for the use
arate components is that they have PC extension cards, the system pro- of the DOS and the BIOS. Traditionally,
to be linked by connectors! vides support for the ISA bus, thus these two components represent a
In the common-or-garden variety PC securing a direct link to the reliable major investment when it comes to
installed in our homes and offices, the and widely used PC/104 interface. This developing an embedded control sys-
screw links used to secure individual interface combines the versatility of tem.
components can be relied upon to the ISA bus with a compact and reli- The circuit is suitable for use with a sin-
provide the necessary mechanical able connection system which is also gle 5-V supply, and consumes about
stability for quite some time. This is in suitable for stacking interfaces. 2.5 watts of power at a clock frequen-
stark contrast with a PC used at the cy of 100 MHz. The complete circuit
heart of an embedded control system, A closer look at the SCC measures approximately 56 x 76 x 12
mainly because of the much stricter mm, and has 240 connections
requirements in respect of mechanical The single-chip computer developed arranged at a pitch of 0.04 inch.
loading. If control systems are fitted by ZF Microsystems is designed around (982094-1)
inside machines, mechanical reliabili- an 80486SX CPU clocked at 100 MHz
ty becomes a major issue, requiring a to which is added the full complement For further information, contact:
totally different structure of the PC and of I/O functions PC users would expect ZF Microsystems, 1052 Elwell Court,
the interfaces connected to it. to get. Palo Alto, CA 94303 USA:
The OEMmodule486 (OEM = original Because the entire system is compati- toll-free: 800-683-5943;
equipment manufacturer) from the US ble with the PC/AT Industry Standard tel.: 650-965-3800; fax: 650-965-4050; e-
company ZF Microsystems has been Architecture (ISA), it integrates the fol- mail: [email protected];
Internet: www.zfmicro.com.

PC TOPICS Elektor Electronics EXTRA 9 - 12/98


With the introduction and general proliferation of the
Soundblaster card and its derivatives, almost any PC can be
beefed up with a number of new multimedia functions. While
some functions like the wavetable synthesizer and the sound-
sampler are only found internally in the PC, others are avail-
able that are typically used in combination with peripheral
equipment. The interface described in this article enables sig-
nals on the multifunctional joystick connection to be convert-
ed into a number of standard connections and signal levels.
Any joysticks and MIDI equipment you may have available
may then be hooked up in a simple manner.

Design by L. Lemmens

joystick and MIDI interface


for Soundblaster cards
expand those soundcard connections!
A few years ago, the PC achieved a
decent sound option thanks to the
Soundblaster expansion card. In addi-
tion to the requisite analogue inputs
and outputs, this card also came with
connections for a joystick and MIDI
equipment. Once other manufacturers
of soundcards started to use this con-
figuration as an example, the
Soundblaster soon became the de
facto standard.
Once a soundcard has been fitted
into a PC, a synthesizer function and a
sound-sampler become available.
Furthermore, the card contains all
logic to connect two joysticks, while a
complete MIDI interface is also sup-
plied as a standard.
Users of a rather simple soundcard will
usually not be satisfied with the
capacity of the built-in FM synthesizer.
A real wavetable synthesizer as avail-
able on up-market soundcards, pro-
duces much more natural sounds. An
external MIDI expander or MIDI key-
board may fill this obvious blank, pro-
vided the computer has a standard-
ised MIDI interface with the full com-
plement of connections. As far as
hardware is concerned, most sound-
cards meet this requirement only
the interface is not equipped with the
standardised MIDI connection and

10 - 12/98 Elektor Electronics EXTRA PC TOPICS


associated signal levels. Thats why it is MIDI signal. With a standard MIDI inter- built around inverters from the
not possible to directly connect a key- face, use is made of current loops. 74HCT14 integrated circuit. These
board or other MIDI hardware. Ergo, a Consequently, the transmitter side has inverters have a TTL compatible input
special converter cable has to be a current source, and the receiver and a TTL output which is turned into a
made, complete with signal level side, an optocoupler. On the sound- current source with the aid of a couple
adaptors. This solution is not only awk- card, however, the MIDI signals are of resistors.
ward, it also creates new problems only available at TLL level. Using gate IC1d the MIDI output from
because the MIDI signals are found on Looking at the connectors typically the computer is converted and used,
the joystick connection, and the plug found on MIDI equipment, a MIDI input among others, to make LED D3 light.
you want to use will obviously preclude is usually complemented by two MIDI When this indicator lights, MIDI signals
the connection of the joysticks! outputs and a MIDI thru connection. are being transmitted.
Fortunately, this little problem is easy to All four connections make use of 5-pin Although buffers IC1b and IC1c are
eliminate using some creativity and a DIN plugs. The two MIDI outputs supply connected in parallel, each of them
small circuit. identical signals, while the MIDI-thru drives its own output. The two 220-
connections supply a copy of the sig- resistors are found in any MIDI inter-
Transistors and gates nal applied to the MIDI-in socket. face, and so turn the TTL output into a
The soundcard only supplies electrical current source.
The circuit diagram of the joystick/MIDI signals for one MIDI output and one The MIDI input is a traditional configu-
interface is shown in Figure 1. As MIDI input. The standard circuit ration based on an optocoupler.
already mentioned, the main function described here ensures that all four Resistor R10 and diode D1 protect the
of the interface is to convert already previously mentioned connections optocoupler against reverse and/or
available connections and signal lev- become available, based on these excessive input voltages. The resistor
els into standard connections and two signals only. The circuit diagram limits the current through the optocou-
matching levels. clearly shows that this is by no means pler. Received MIDI signals cause LED
This level conversion is relevant to the a formidable task. The entire circuit is D2 to light.

IC1b K6
5V R4 5V
3 4 K2
1 220 1
5 3
9
C4 14 C1 2 2
OUT
IC1 1 10
4
10 100n
25V
7 5V R3 1 3
220 11
4
C3
IC1c 12
R2
IC1d 8 R5 5 6 5
1 220 K3 10 25V
1
100

3 13
5
6
2 OUT
5V 9 D3 2 14
MIDI OUT

K7 4 7
5V R1 1
1 15
220
9 8
2
10
3
K5
11 5V
4 1
12 9
5 2
13 10
6 3
14 11
7 4
C2
15 MIDI IN 12
8 10 25V 5
5V 13
IC1e 10
R9 6
1
4k7

14
7
IC1f IC1a
11 R7 15
13 12 1 2
R10 1 1 220 K1 8
K4 220
IC2 R8 5 3
1 6 5 THRU
1
100

IN D1 2
4
4
2 D2 5V R6 1
5 1N4148 220 IC1 = 74HCT14
3 2 4

CNY17-2 982090-11

Figure 1. Circuit diagram of the joystick & MIDI interface. The circuit converts signals on the joystick connector of a soundcard into stan-
dardised connections and signals.

PC TOPICS Elektor Electronics EXTRA 11 - 12/98


COMPONENTS LIST

H7
Resistors:

H10
K4
R1-R4,R6,R7,R10 = 220
K1 J2

K2 J1

K3
THRU R5,R8 = 2k7

D1
R9 = 4k7

R6
R7
K7

R10
R3

R4

R2
R1
IC1 IC2
Capacitors:

R5
C4
D2 C1 982090-1 C1 = 100nF
R8 1-090289
C2,C3,C4 = 10F 25V

R9
D3 ROTKELE )C(
C2
C3
II K5 I K6 Semiconductors:
D1 = 1N4148
D2,D3 = LED
IC1 = 74HCT14
H8

IC2 = CNY17-2

Miscellaneous:
K1-K4 = 5-way DIN-socket, PCB-mount
K5,K6 = 15-way sub-D socket (female),
angled, PCB-mount
K7 = 15-way sub-D plug (male), PCB-
mount
Case: 120x64x40mm, e.g., Bopla type
E430.
(C) ELEKTOR
982090-1 PCB, order code 982090-1, see Readers
Services page.

Figure 2. Copper track layout and com-


ponent mounting plan of the PCB
designed for the extension circuit (board
available ready-made).

Figure 3. One of our built-up prototypes.


The board fits exactly in a Bopla plastic
case Type E430.

12 - 12/98 Elektor Electronics EXTRA PC TOPICS


Figure 4. The MIDI connections allow commonly used MIDI instruments to be hooked up, like this expander from Yamaha, or Casios
electronic saxophone.

Because the supply voltage is taken installed first so that they are not over- two joysticks and a number of MIDI
from the joystick connector, the circuit looked later. Next, you fit the connec- devices to be connected up to your
does not require a separate power tors and the remaining components. PC, which is, dare we say it, function-
supply. So, its all a matter of connect- Build the circuit as neatly as you can, ally extended. (982090-1)
ing it all up and start using it! In and connect it to the joystick port on
Microsoft lingo: plug and play. the PC via a 15-way flatcable. Thats it
you have an interface which allows
Two joysticks
Although the joystick interfaces of most
soundcards are complete, it should be
noted that all signals are combined on
MIDI hardware a closer look
a single connection, where they sit MIDI is an acronym for Musical Instrument Digital Interface. Essentially, it is an inter-
together with the MIDI signals! Our aim
face that allows electronic musical instruments to communicate with each other.
is therefore to untangle the signals for
the two joystick ports, and direct each The standard was defined in the early 80s. Over the past decade or so, the com-
set to its own connector. puter industry has gradually adopted the relevant interface, which is currently
Now, on the connectors we find two available on almost any PC equipped with a soundcard. Thanks to the MIDI inter-
pins for the Fire buttons (a and b) as face, software may be employed to control electronic musical instruments. The
well as the connections for the poten-
tiometers that control the movements reverse is also possible: using a keyboard and a sequencer, a piece of music may
in the horizontal and vertical directions be stored in a computer.
(x and y respectively). To these should The MIDI interface hardware typically found on PC soundcards is derived from
be added the positive power supply the RS232 interface. It comprises a kind of current loop which is used by the trans-
voltage and, of course, ground.
mitter to send information to the receiver. At the receiver side, an optocoupler is
The design of the printed circuit board
developed for this project may be used with a switching level of 5 mA. The switching times should be shorter than
found in Figure 2. The PCB has a clear 2 s. The bit rate is defined as 31.25 kbits/s (1%). The asynchronous communi-
layout with four sockets for the MIDI cation is based on one start bit, eight databits and one stop bit. The physical con-
interface arranged at one side, and
nection is made using 5-way 180-degree style DIN plugs and sockets, of which
the two joystick connectors, at the
other. Finally, theres a 15-way connec- only pins 4 and 5 are used. Pin 4 is connected to +5 V via a 220- resistor, and
tor for the cable link with the PC. pin 5 to the output of the driver, also via a 220- resistor. Pin 2 may be used as a
The single-sided PCB contains a cou- ground terminal for the MIDI cable screening. Pins 1 and 3 are not used. MIDI
ple of wire links which have to be cables are screened and have twisted wires. Their length should not exceed 15 m.

PC TOPICS Elektor Electronics EXTRA 13 - 12/98


Together with a small program running under DOS,
the circuit discussed in this article acts as an ADC-
based voltmeter that allows you to calculate the
capacity of a rechargeable battery. The PC also
lends a helping hand by displaying graphs showing
the instantaneous battery capacity and terminal
voltage.

Design by F. Simonnot

battery capacity
measurement by PC
run true-capacity tests on rechargeable batteries

step size of the input voltage is 5 V, the


voltage characteristic range is 5-30 V, and the lower resis-
capacity characteristic tance in the ladder is connected to
the input of an analogue-to-digital
converter (ADC) type ADC0804. This IC
resistor should not be a problem to obtain
locally as it is produced by several
semiconductor giants like Harris,
PC National Semiconductor and Philips
Semiconductors.
The ADC0804 is flanked by a type
converter
74HC257 quadruple 2-to-1 line multi-
battery plexer with 3-state outputs.
The ADC0804 is a CMOS 8-bit A/D con-
verter based on the successive
982093 - 11
approximation principle. Its differen-
tial analogue input is marked by
Figure 1. This block diagram of the system shows the basic elements: battery, converter and PC.
excellent common-mode rejection
characteristics, and allows the zero
If you have ever considered giving an resistor. Using a certain measurement level of the analogue input to be
old PC any sort of useful function and interval, the PC, by way of its printer given an offset. If necessary the refer-
a second lease of life, this project is a port, requests measurement data from ence voltage may be made
great opportunity because of its mod- the converter. adjustable to suit any voltage range
est hardware requirements: a 386 PC By computing the V/R ratio, the control smaller than the one normally allowed
with a VGA display and a classic print- program determines the current in the by the available 8-bit resolution.
er port (EPP not required) is basically all battery-resistor circuit, as well as the The 6-way rotary switch at the input of
you need as far as the PC is con- battery charge, and multiplies the latter the ADC acts as a voltage divider and
cerned. However, if your PC does not quantity with a factor representing the allows one of the input voltage ranges
have a maths co-processor, the con- discharge time. The result of this opera- between 5 and 30 V to be selected,
trol program were about to describe tion is added to the mAh (milli-ampre the step size being 5 V. The 5.1-V zener
may have to be recompiled. hour) counter. In this way, the proposed diode in this part of the circuit has a
system acts like an integrator. protective function.
Principle of operation The multiplexer at the output of the
Hardware ADC0804 serves to split the 8-bit digital
As shown in the block diagram in data at chip outputs DB0 through DB7
Figure 1, were talking about a mea- The circuit diagram of the converter is into two 4-bit words which are sent to
surement circuit based on an inexpen- shown in Figure 2. At the input of the the PC printer port by way of dataline
sive and widely available converter. circuit we find a voltage divider con- D0 (pin 2) and control lines Error
The converter is connected to the bat- sisting of resistors R1 through R6, and (pin 15), Select (pin 13), Paper End
tery under examination by means of a an associated 6-way rotary switch. The (pin 12) and Acknowledge (pin 10).

14 - 12/98 Elektor Electronics EXTRA PC TOPICS


IC3 K1
1
9...12V 7805 5V DB25
14
2
15
C3 C4 16
3
R6 IC4
100 10 16

1k
8
5V 4
17
R5 5

1k
18
20 6
IC4
S1 R4 19
+ BATT F1 6 18 2 MUX
VI+ DB0

1k
4 7
17 3
9 DB1 20
100mA VREF 16 5
R3 5 IC1 DB2 7 8
INTR 15 6
DB3
1k
3 21
WR 14 11
DB4 9 9
R7 13 10
19 DB5 22
R2 10k CLKR 12 14
DB6 12 10
ADC0804
1k

11 13
4 DB7 23
CLK
11
7 1
VI CS 24
8 2
R1 D1 AGND RD 15 1 12
C1 EN G1
1k

25
10
150p 74HC257 13
5V1

BATT 982093 - 12

Figure 2. Simple hardware for the PC-aided battery capacity meter.

The clock frequency in the circuit is formed by connecting a resistor the measurement values obtained
determined by RC network C1-R7, across the + and terminals of the from the ADC, the program first calcu-
according to the following equation: battery. The value of this measurement lates the battery tension. Next, the
resistor will depend on the battery load current is computed using the
FCLK = 1 / 1.1RC type, and the program can help you resistor value and the battery voltage.
when it comes to determining the bat- The result, multiplied by the duration of
which gives approximately 606 kHz tery characteristics. the measurement, yields the instanta-
using the respective 150-pF and 10-k neous battery capacity.
components. Software Now, lets have a look at how this works
The conversion time of the ADC is in practice. The control program is
smaller than 100 s. You have to inform the program about called Accbench.exe, and may be
The input of the converter is protected the value of the battery load resistor, found on the project diskette with
by a 100-mA fuse. and the voltage range set on the ana- order number 986034-1, along with
The capacity measurement is per- logue-to-digital converter. Based on the source code file written in Turbo

Figure 3. PCB artwork designed by the author copper track layout and component mounting plan.

PC TOPICS Elektor Electronics EXTRA 15 - 12/98


In conclusion
It goes without saying that the present
circuit may be used to perform pretty
exhaustive capacity tests on all sorts of
rechargeable batteries.
The approach chosen, discharging by
a fixed resistor (as opposed to con-
stant-current discharging which is also
frequently employed), allows a mea-
surement process to be used that
closely resembles real life conditions.
For instance, it allows you to get a fair-
ly good idea of the life expectancy of
a rechargeable battery used in a
torchlight, provided you know the
characteristics of the lamp used.
As shown by the screendump Figure 4,
the disk supplied for this project con-
tains the following files

accbench.cir
Simulation file for Microcap V.

accbench.exe
Figure 4. Screendump showing the files found on the project disk.
Compiled, executable file.

Pascal 7.0. Although parts of the ing plan of the printed circuit board accbench.lmc
source code are written in French, the designed for this project by the author. Circuit diagram, Layo1 format.
relevant file will still be of use, we reck- Note that this PCB is not an Elektor
on, to those of you wishing to make Electronics design, and that it is not accbench.pas
modifications to the program. available ready-made through our Source code file in Turbo Pascal 7.0.
Once launched, the Accbench pro- Readers Services.
gram asks you if you want to do the Fitting the components on the board cuivben.lmc
calculations to determine the various should not present problems. Although Copper track layout of PCB, Layo1 for-
parameters. At this point you may it is necessary to refer to the circuit dia- mat.
enter the nominal battery voltage, gram to be able to locate the compo-
nominal battery capacity and the nents on the PCB, that should not cuivlpt
value of the load resistor. Using these cause difficulties because there are Print file for the PCB copper track lay-
input parameters the program calcu- only a couple of parts to mount, and out, for LaserJet or DeskJet printers
lates the discharging current, the their values are printed on the board. (300 dpi).
amount of time it takes to fully dis- If you want to avoid any risk of dam-
charge the battery, the power dissi- aging the ADC0804 and 74HC257 egavga.bgi
pated by the load resistor, and the integrated circuits, we suggest using a DOS driver that allows any IBM-com-
estimated duration of the discharging good quality IC sockets. patible PC to display the battery
cycle, by means of sampling. The completed circuit board may be graphs.
It should be noted that the program fitted in a small plastic case. The case
uses a number of maximum values as is drilled to accept a 25-pin sub-D seriben.lmc
far as the battery voltage and the bat- socket, like the one normally used for Print file for the component overlay,
tery capacity are concerned the the PC printer port. This connector is Layo1 format.
relevant values are 30 V and linked to the PCs printer port via a
12,000 mAh. If you enter higher values, standard cable. Two other wires leave Serglpt
the program will notify you by produc- the case: these are for the connection Print file for the PCB component over-
ing an error message. to the battery under test. The free ends lay, for LaserJet or DeskJet printers
The more audacious among you may of these flexible wires are fitted with (300 dpi).
want to have a go at modifying the crocodile (croc) clips for easy con-
converter control section of the con- nection to the battery terminals. The The disk also contains a number of
trol program, starting with the proce- relevant connections on the converter authentication files.
dure called convert, in order to board are marked + batt -. (982093-1)
make the program work with MAX187 Pins 2, 10, 12, 13, 15 and 25 of the
used in the CPU Thermometer pub- sub-D socket are connected to the
lished in the October 1997 issue of 257 outputs, G1 and ground, as indi-
Elektor Electronics. cated in the circuit diagram.
The regulated supply voltage of
Construction between 9 and 12 V is connected to
the solder pads labelled +12V and
Figures 3a and 3b show the copper 12V; these are found near the 7805
track layout and component-mount- voltage regulator.

16 - 12/98 Elektor Electronics EXTRA PC TOPICS


1998 International
PC-SOFTWARE CONTEST
The Winners
Squarely aimed at anyone with an Ontario, Canada, for their superbly designed, novel and
extremely useful Electrocardiograph project. The Jury is
active interest in the subjects not only extremely pleased and honoured to be able to
award the prize to these Canadian readers of Elektor
Measurement, Development and Electronics, but also deeply impressed by the great soft-
Communication, an International ware and hardware as well as the excellent multimedia
presentation supplied by Messrs Nowinski.
Software Design Competition was
launched in our July/August 1998 National Prize Winners
magazine. Apparently, these subjects Winners of the national prizes mostly sponsored by
advertisers in the UK version of Elektor are listed in the
were much harder to master than last table below. Congratulations! All prizewinners have been
individually advised of their good fortune by our Editorial
year, because only 80 Competition Secretariat. Unfortunately, because quite a few
entries landed on the desks of the Jury Competition entries we received did not meet the
Competition Rules, a number of prizes could not be award-
members. Despite the smaller number ed. These prizes, it has been agreed with the relevant spon-
sors, will remain in store for next years Competition.
of entries, however, the Competition
did produce some very nice projects. Presentation of the designs
In the PC Topics Supplement of the January 1999 magazine
we will endeavour to publish a selection of prize-winning
projects. This will be an international choice, presenting
International First Prize Competition entries we received from many countries in
Last year, as the Competition drew to a close and the points which Elektor Electronics (or its sister magazines) is read, in
were totted up, the winning design quickly emerged other words, from all over the world! As a matter of course,
because of the very high grades the Jury members gave to the project that won the International First prize will also be
his project. This year, the Jury witnessed a photo finish, with included (in condensed form).
fierce competition till the last moment between four A number of prize-winning Competition entries will be
extremely well-designed projects. In the end, the copied integrally onto a CD-ROM which we hope to publish
International First Prize, an ST1000 EMC master Spectrum by early February 1999. Furthermore, a number of projects
Analyzer/Tracking Generator with a value of more than will be discussed in greater detail in forthcoming (1999)
3,000 (sponsored by EMC Master International), was issues of Elektor Electronics.
awarded to the brothers Jack and Mark Nowinski from (990010-1)

Prize no. Description Sponsor Awarded to Project


Temperature Recorder; a wonderfully simple
1 Ultiboard Challenger Unlimited; Ultimate Technology J. T. Kokkoris temperature logger based on the DS1620
value 1833 transducer.
535 Simulator; use this intuitive program to
2 Proteus IV package; value 1625 Labcenter Electronics H. Vasquez Matute simulate this CPU and others in the 80x51
family.
ANSI C Compiler for the 8051 +
3 Source Level Simulator; Crossware Products D. D. Aggelos UPIO; use the PC to control up to 8 relays.
value 1040
EMC Master Info CD, Extended Log2ps; a QSL card machine for the active
4 EMC Master International O. Kvindesland
Version; value 775 radio amateur.
ADC-200 Multifunction Test Hell/CW Tx/Rx program; your PC turned into
5 Pico Technology S. Jonsson
Instrument; value 499 a HellSchreiber (for radio amateurs).
Remote Experiments with PIC17C43; a
(1)
6 EMC Master Info CD; value 285 EMC Master International M. A. Wisintainer et al. remote, didactic laboratory wholly controlled
by students via an Internet link.
Frequency Counter on Printer port; for TTL
(2)
6 EMC Master Info CD; value 285 EMC Master International M. Hewitt pulses, max. frequency about 100 kHz on a
P133 PC.

Elektor Electronics 12/98 11


electronics on-line
oscilloscope software
soundcard becomes A-D converter
The oscilloscope is
generally recog-
nized as an indis-
pensable test
instrument when it
comes to measur-
ing electrical quan-
tities. However, as
an occasional
user, you may
object to forking
out 300 or more
for a scope. If you
restrict yourself to
relatively low fre-
quencies only, the PC
oscilloscope is a much an oscilloscope. With this in mind we the download site is at:
set out to find PC-oscilloscope free- http://www.c3sys.demon.co.uk/winspec.htm
cheaper alternative. ware, shareware and affordable soft- The website run by PAS has a number
ware on the Internet. of measurement programs in store,
If you want to keep things as simple including a spectrum analyser, a fre-
as possible, and you are satisfied with quency generator and a signal analy-
viewing just one signal, you will find sis centre. Most programs also offer an
There are several ways of implement- that Yukinon Yamasakis shareware oscilloscope function to view signal
ing an oscilloscope function on a PC. program Graphic Level Meter goes a shapes. Although the programs are not
To mimic a real oscilloscope, you use long way. Besides a (pretty Spartan) as cheap as the two mentioned above,
a special type of insertion card or an two-channel oscilloscope, this Win- they do offer a lot, and the graphic
external box containing the requisite dows program offers three types of presentation is impressive. 14-day trial
amplifier stages and fast A-D convert- VU meter. Registration is just $10, and versions of all programs may be down-
ers. For many applications, however, it the download addresses may be loaded from:
is sufficient to be able to just view the found at: http://www.audio-software.com
occasional low-frequency signal. In http://www.hitsquad.com/smm/ Oscilloscope for Windows is a
that case, consider exploiting the programs/Graphic_Level_Meter/ remarkable program by almost any
soundcard installed in your computer. download.shtml standard: firstly, it is free of charge;
After all, it will typically have an input A more sophisticated scope function secondly, its size is less than 100 kB. It
amplifier and a stereo A-D converter is offered by WinSpec32. This pro- offers all normal scope functions: two
with a maximum sampling rate of gram offers more than just an oscillo- channels, an XY function, a spectrum
44.1 kHz or even 48 kHz, and these are scope on your PC screen: being a analyser, trigger controls, delay, mem-
just what you need to realize an oscil- spectrum analyser it also sports an ory function, and lots more. The pro-
loscope on your PC. Other ingredients FFT function. The front panel controls gram was written by Konstantin Zel-
include an oscilloscope program for that appear on the screen allow you to dovich and may be downloaded from
proper processing and displaying of set the sampling rate and trigger level, the Moscow server of the Russian
the data supplied by the soundcard. to mention but a few. The spectrum State University:
Besides, this software should provide analyser is even capable of producing http://polly.phys.msu.su/~zeld/oscill.html
the user controls normally found on 3D plots. Registration costs $20 and (985089-1)

12 Elektor Electronics 12/98


GENERAL INTEREST

anemometer
based on Hall-effect sensor
An anemometer is not an
instrument one finds in
many homes. It is only
those whose hobby is
sailing, surfing or meteo-
rology who find an
anemometer a desirable
instrument. Since a good
anemometer is fairly
expensive, it is well worth
while to consider building
one yourself. The design
presented here has been
tested in all kinds of
weather during which it
stood up well and proved
its worth.

INTRODUCTION faster the flow, the lower the tempera- dle. Another method is the use of a
An anemometer is, in general, an ture of the wire and the lower its resis- small magnet mounted on a spindle to
instrument for measuring the rate of tance. So, the rate of flow can be calcu- generate pulses in a pickup coil or reed
flow of a gas. More particularly, in lated by measuring the resistance of relay as seen in certain speedometers
meteorology, it is an instrument for the wire. for bicycles. Yet another, and a very reli-
measuring the speed of the wind. A In yet another, simple, version, the able, method is used in the present
common type consists of four hemi- force of the wind is used to depress a design. In this, a rotating small magnet
spherical cups carried at the ends of plate suspended from a spring. Any is combined with a Hall-effect sensor.
four radial arms pivoted so as to be change in the length of the spring
capable of rotation in a horizontal forms a directly readable measure of FREQUENCY COUNTER
plane, the speed of rotation being indi- the wind speed. Such an instrument is, The basic setup of the anemometer is
cated on a dial calibrated to read wind however, not terribly accurate. shown in the block diagram in Fig-
speed directly. An anemograph records Most practical meteorological ure 1. This shows that the electronic
the speed and sometimes the direction anemometers consist of two distinct part is very simple and, indeed, in this
of the wind. parts: a sensor and an indicator or dial. type of design the mechanical work is
A different type is the hot-wire The sensor normally consists of an invariably the most tedious. In essence,
anemometer which is based on an elec- assembly of three or four hemispheri- the electronic part is nothing more than
trically heated wire that is cooled by cal cups mentioned earlier. a frequency counter. The pulses gener-
the fluid or gas passing around it. The The rotary movement of the sensor ated by the rotating magnet in the Hall-
can be translated into an electrical signal effect sensor are counted in relation to
in various ways. For instance, a light time, then decoded, and finally applied
barrier or reflection sensor may be to a light-emitting diode (LED) display.
used to scan the light/dark pattern pro- The display is calibrated in m s1.
Design by R. Veltkamp duced by a crenellated disk on a spin- The simplicity of the electronic cir-

Elektor Electronics 12/98


14
Visit our Web site at http://www.elektor-electronics.co.uk

1
oscillator

Hall-effect
sensor

counter decoder

980079 - 11

Figure 1. A simple frequency


cuits indicated in the block diagram is four-fold latch at the output of each counter is used to determine the
reflected in the circuit diagram in Fig- counter enables any selected counting number of pulses induced by a
ure 2. result to be stored. This information is rotating magnet in a Hall-effect
The circuit is based on a Type then multiplexed into a single BCD sensor. The magnet is rotated by
MC14553B counter, IC2, to which the coded output. the wind via a hemispherical cup
pulses from the Hall-effect sensor are The counter state is stored in the assembly.
applied via pin header K1 and Schmitt latches when the input to the relevant
trigger IC1a. Circuit IC2 consists of latch is high. The data stored in the
three binary-coded decimal (BCD) latches are read after the counters have
counters that are triggered by the trail- been reset, provided that the latch
ing edges of the incoming pulses. The enable input (pin 10) remains high Figure 2. The circuit of the elec-
counters are cascaded in synchrony. A during the whole reset cycle. tronic part of the anemometer is
based on counter IC2.

IC5
5V
2 CTR14
3
4
7
5
R5
4 JP3
4k7

4k7
1M 5 R3 R2
11 !G 6
P1 R4 RCX 6
10 14 IC1b IC1f IC1e
4k7 RX + 7 JP2 C3 C2
9 CT 13 3 4 13 12 11 10
500k C1 CX 8 1 1 1
15
9 4n7 1n
12 1 JP1
10n CT=0 11 IC1c IC1d
2 5 9
12
3
4060 13
IC1 = 40106 1 1
6 8

5V
T3
R6
22k
T2
R7
BC557
22k
T1
R8
BC557
22k
5V
2 1 15 IC3 BC557
LD1 8 3 LD2 8 3 LD3 8 3
DS1 DS2 DS3 BCD/7SEG
13 14 1 9 R10 10 CA CA 10 CA CA 10 CA CA
RST OF C9 a10 100 a a a
10 6 10 R11 9 9 9
LE N10 [T] b10 100 b b b
4 IC2 9 5 11 R12 7 7 7
C1A Q0 9D,1 c10 100 c c c
C9 7 3 12 R13 5 5 5
Q1 9D,2 d10 100 d d d
6 2 13 R14 4 4 4
Q2 9D,4 e10 100 e e e
1n 3 4553 5 4 15 R15 2 2 2
C1B Q3 9D,8 f10 100 f f f
12 11 7 14 R16 1 1 1
CLK DIS EN g10 100 g dp g dp g dp
6 6 6
HD1105 HD11050 HD11050
74HCT4543
330

R9

5V IC4
D1 7805 5V 5V
R1 K2
10k

K1 1N4001
IC1a 14 C10 16 C11 16 C8 16
C4 C5 C6 C7
2 1 IC1 IC2 IC3 IC5
1
7 8 8 8
22 100n 100n 10 100n 100n 100n
63V 63V

980079 - 12

Elektor Electronics 12/98 15


Parts list
R1
3 R8

H4

C11
H1

C3

C10
R16

K1 JP2
Resistors:
R15
R1 = 10 k

LD1
R3
R2
R14

C9
IC1

T1
IC3
R13 R2R4 = 4.7 k

IC2
R12 R5 = 1 M
R11

C2
R6R8 = 22 k

LD2
R10
R9 = 330

C1

T2
R5 R9
R10R16 = 100
JP1
JP3 R6
R7 P1 = 500 (470) k preset poten-

C7
P1

LD3

980079-1
C6

T3
tiometer

C8

C4
IC5
R4
Capacitors:

IC4
D1 1-970089
C5 C1 = 0.01 F, ceramic
+
0

H2
H3

ROTKELE )C( C2, C9 = 0.001 F, pitch 5 mm


C3 = 0.0047 F, pitch 5 mm
C4 = 22 F, 40 V, radial
(C) ELEKTOR C5, C6, C8, C10, C11 = 0.1 F,
ceramic
C7 = 10 F, 63 V, radial
980079-1

Semiconductors:
D1 = 1N4001
T1T3 = BC557B

Integrated circuits:
IC1 = 40106
IC2 = 4553
IC3 = 74HCT4543
IC4 = 7805
IC5 = 4060

Miscellaneous:
Hall-effect sensor = OHN3040U
(TRW)
Figure 3. Populating the printed-circuit LD1LD3 = HD11050, Class >L
board for the electronic part of the K1 = 3-way pin header
anemometer is absolutely straightfor- K2 = 2-way terminal block for PCB
ward. The board is, however, not available mounting
ready-made. Mains adaptor: >9 V, 300 mA
JP1JP3 = 2.54 mm pin strip with pin
jumper
Roller bearing
Magnets 7 mm long, 15 mm dia.
It will be clear that the measure- Set ring
ment interval is equal to the time lapse Brass spindle, 4 mm dia.
between resetting and latching. This
time lapse is determined by oscillator
IC5, which gives the requisite switch-
ing pulses to IC2 inputs LE and RST. Note that, strictly speaking, the value
Since IC5 also contains a 14-bit binary of R5 needs to be 210 times that of
counter, it is possible to use a much R4+P1. In practice, this is not very crit-
higher oscillator frequency than ical, however.
needed for the requisite measurement The BCD-to-7-segment conversion
time, which improves the overall sta- is carried out by IC3, while the display
bility. The pin jumpers, JP1JP3, at the is formed by LD1LD3.
relevant outputs of IC5 enable setting Resistors R10R16 prevent the cur-
an oscillator frequency that is 28, 29, rent through each of the display diodes
or 210 higher than needed for the exceeding 10 mA.
measurement time.
The required positions of the pin P O W E R S U P P LY
jumpers and the frequency set with P1 Power for the anemometer is provided
depend entirely on the construction of by a mains adaptor with an output of
the hemispherical cup assembly. not less than 9 V. This voltage is regu-
Assuming a maximum readout of lated by IC4 at 5 V.
99.9 m s1, and two sensor pulses per
revolution, the basic requisite fre- CIRCUIT BOARD
quency in the prototype worked out at The electronic circuits are best assem-
82.6 Hz, which is multiplied by 210 bled on the printed-circuit board in
(JP3 closed other two jumpers open). Figure 3. As this board is not available
In some cases it may be necessary to ready-made, it needs to be produced
alter the value of one or more compo- privately.
nents in the oscillator circuit. The oscil- Note that the board just visible in
lator frequency, fo, is given by: the introductory photograph is that of
the first prototype and deviates in
fo = 1/2.3C1(R4+P1) [Hz). some important points from that
shown in Figure 3.

16 Elektor Electronics 12/98


Visit our Web site at http://www.elektor-electronics.co.uk

Hall-effect sensor
1
When a current-carrying conductor or semiconductor is placed in a magnetic VCC
field, a potential difference is generated between the two opposed edges of the REG.
conductor or semiconductor in a direction mutually perpendicular to both the OUTPUT
field and the conductor or semiconductor. This effect is called the Hall effect, 3
and the generated voltage, the Hall voltage. The voltage level depends on the
kind and thickness of the conductor or semiconductor material, the magnitude
of the current, and the strength of the magnetic field.
A Hall element is very suitable for use as a contact-less switch and as test
probe for measuring direct currents. Since, in contrast to inductors, the voltage
GROUND
generated by the magnetic influence does not depend on the speed with which 2
the field changes, a Hall-effect sensor is eminently suitable for measuring relatively
slowly changing or even stable magnetic fields. OHN3040U
The Hall-effect sensor used in the anemometer is a Type OHN3040U from OHS3040U
TRW, which is a monolithic IC that incorporates a Hall element, a linear ampli-
fier, a Schmitt trigger, and a bandgap voltage regulator to allow operation over
a wide range of supply voltages.
The device has a logic level output and provides sink currents of up to 15 mA.
This allows the driving of more than five TTL loads, or any standard logic family 980079 - 14
using power supplies ranging from 4.5 V to 24 V. The output amplitude is con- 1 2 3

stant at switching frequencies from d.c. to over 200 kHz.

MECHANICAL Positioning the instrument correctly


CONSTRUCTION is, of course, of paramount importance.
In its simplest form, the hemispherical High buildings in the immediate vicin-
cup assembly may be made from a ity lead undoubtedly to poor and
rotor with three equidistant (120) arms unpredictable results. It is advisable to
to each of which half a table tennis ball place the hemispherical cup assembly
is glued (see Figures 1 and 4). A small as high as possible on a sturdy mast. Figure 4. A roller bearing is
magnet should be glued to the central Strictly speaking, an anemometer used in the prototype to
axis, whereupon the Hall-effect sensor should be placed at a height of 10 ensure frictionless transfer
is mounted so that the distance metres (33 ft) in an open area. of the windpower into rota-
between it and the small magnet is an [980079] tional speed of the magnet.
absolute minimum.
For good and accurate perfor-
mance, it is, of course, essential that the
spindle moves as frictionless as possi-
ble. In the prototype, use is made of a
4 55.5 mm
roller (ball) bearing, combined with a
magnetic trunnion to remove any axial
pressure. If the magnets are not strong
enough to bear the weight of the cup
assembly, two or three on top of each
magnet
other may be used. 47
In the prototype, hemispherical
cups with a diameter of 47 mm are
used. These are simply bolted to a spe-
cial flange that serves as cover. The
assembly is shown in diagrammatic
form in Figure 4. The most important magnet
aspects are that the bearing is of good
quality and that the Hall-effect sensor
is positioned correctly. Hall-effect sensor
stripboard
CALIBRATION AND spindle, 4 mm
INSTALLATION
The instrument can be set up correctly
only with reference to a calibrated ball bearing
anemometer. Start by placing pin
jumper JP2 (leaving the other two set ring
open) and check that the correct value
can be obtained by adjusting P1. If the
measurement is too large, remove JP2
and place JP1 or JP3. Again adjust P1
until the correct value is obtained. In
the rare instance that the instrument
can not be calibrated in this manner, it 980079 - 13
may be necessary to change the values
of R4 and C1 to some extent.

Elektor Electronics 12/98 17


RADIO, TELEVISION & VIDEO

RF signal generator
part 2 (final): construction,
operation and adjustment
IC1 +12V 0 +30V +5V
C9
C8

C6 C7 R1

K1 D3

R2
C5 T1
C3 IC2
~ D8
D6

D2
TR1 C12
R4

C2
~

R3
D1
D5
R5
D7

C1

D4 C13

980053-4
C4
4-350089
C11 ROTKELE )C(
C10

(C) ELEKTOR
980053-4

Figure 6. Copper track


layout and component
overlay of the power
supply board.

The RF signal generator is a quite com-


Although the main subject of this months plex instrument, and we should really
second and final instalment is all matters advise beginners not to attempt to
build this project without the help or
constructional, theres also information on guidance of someone with consider-
adjusting the instrument and, of course, on able experience in building RF and
microcontroller circuits.
how to use it! There are no fewer than four boards
to build up, and each of these boards
contains a fair number of components.
Add to that the mounting of the four
Design by G. Brunner boards in a case and the inter-board

Elektor Electronics 12/98


20
Visit our Web site at http://www.elektor-electronics.co.uk

COMPONENTS LIST C6,C8 =220nF MKT IC2 = LM317T


C7,C9 =2F2 16V radial
POWER SUPPLY BOARD C10 = 470F 63V radial Miscellaneous:
Resistors: C11 = 220F 63V radial TR1 = mains transformer, 15V 8VA,
R1 =22 5W C12 = 1F 63V radial Monacor/Monarch type VTR8115
R2 =270 C13 = 10F 63V radial K1 = PCB terminal block, 2-way, raster
R3 =820 7.5mm
R4 =1k Semiconductors: K2 = mains socket, integral switch and
R5 =10k D1-D6 = 1N4001 fuseholder, with fuse 63mAT
D7 = 33V 400mW zener diode Heatsink type SK59 37.5mm (Fischer,
Capacitors: D8 = LED, red, high efficiency Dau Components)
C1-C4 =47nF T1 = BC141 PCB, order code 980053-4 (see Read-
C5 =1000F 35V radial IC1 = 7812 ers Services page)

Figure 7. Finished PSU


board (prototype).
ulating it should be straightforward, more densely populated than the PSU
using the relevant Components List board. Hence, great care and precision
and the component overlay shown in is required when it comes to soldering
wiring, and you are looking at a project Figure 6. Resistor R1 may run fairly hot
the parts in place.
which should take even advanced hob- and should not touch the circuit board. Start with the two wire links on the
byists several hours, winter evenings or The LM317T voltage regulator may be board youll find them near preset
rainy Sunday afternoons to complete. mounted directly on to the heatsink P1. Next, fit the components, the best
The four boards are built up one by an insulating washer is not required. order is probably from low-profile
one in the order indicated by the text The power on LED is not fitted parts (resistors, IC sockets) to upright
to follow. As usual, great care should be directly on the board instead, it ismounted parts (crystal, transistors,
taken to fit each and every part in the connected up via a pair of thin wires radial electrolytic capacitors).
right position on the board. The com- with an length of about 20 cm. The three push-buttons, S1, S2 and
ponent overlays and associated parts This board is simple to test by pro-
S3, are not mounted directly on to the
list should guide you through the visionally connecting it to the mains board. Their pins are inserted in socket
process of assembling the boards. Par- and using a voltmeter to check the strips or stacked IC sockets so that their
ticularly with the 1% resistors in the indicated output voltages: +5 V, +30 Vheight can be adjusted a little. Alterna-
attenuator section, you should (1) and +12V. The finished PSU board is tively, their pins are lengthened using
ascertain the value and (2) look up the shown in Figure 7. Check your work pieces of stiff wire. This is necessary to
position on the board, before (3) fitting against this photograph! enable the cap tops to protrude a little
any resistor. through the front panel. The same
CONTROLLER BOARD mounting method is used for LCD. As
POWER S U P P LY B O A R D The controller board with the push-buttons,
This board is the simplest to build. Pop- shown in Figure 8 is far Figure 8. Controller the height of the LCD
board artwork.

A1 A2 A3 A4 A5 A6 A7 A8 3-350089
RES ROTKELE )C(
H6

H7
T1

T2

T3

T4

T5

T6

T7

T8

T0 S1 S2 S3
C1
R1 C8
H3

H1

C2 X1 R11 R10
R9 R8
R7 R6
C10
R13 R12
IC2

IC1 R15 R14 980053-3


C3 R17 R16 C9
C11

R19 R18 S4
C4 R21 R20
R5 C5
C6
R28
R26
R24
R22
R23
R25
R27
R29

H5

H8
ALE

C12

K1 Lock C7
H4

PSen
P2.4 R2 T
out in 0
T9 T10 T11 T12 R4
R3 RS232
P1 +5V
B2 B3 B4 B5 A C B

Elektor Electronics 12/98 21


(C) ELEKTOR
980053-3

COMPONENTS LIST Capacitors: Miscellaneous:


C1 =1F 16V radial X1 = 11.059MHz crystal
CONTROLLER BOARD C2,C3 =33pF S1,S2,S3 = pushbutton, 1 make con-
C4,C5,C12 =100nF ceramic tact, ITT type D6-R-RD; cap type D6Q-
Resistors: C6-C10 =10F 63V radial RD-CAP (Eurodis)
R1 = 22k C11 = 220F 16V K1 =14 way SIL pinheader
R2,R3,R4 = 4k7 K2 =9-way sub-D socket (female)
R5 = 10k 8-way SIL array Semiconductors: S4 = rotary encoder, Bourns type
R6,R8,R10,R12,R14,R16,R18,R20,R22,R T1-T12 = BC557B ECW1J-B24-AC0024 (Eurodis)
24,R26,R28 = 1k IC1 =AT89C51-20PC or LCD, 2x16 characters, Sharp type LM
R7,R9,R11,R13,R15,R17,R19,R21,R23,R SC87C51CCN40 (order code 986515- 16A211 (Eurodis)
25,R27,R29 = 3k3 1) PCB, order code 980053-3 (see Read-
P1 =10k preset, H IC2 = MAX232 ers Services page)

above the controller board may need tom plate of the case. Several slots are before fitting it, and double-check its
to be adjusted later, so do not mount it available, and the pair you actually value and position using the Compo-
securely as yet. The rotary switch choose to use should ensure that the nents List and the component overlay.
encoder, S4, is mounted directly on to metal frame around the face of the As usual, start with the wire links
the board, but its spindle is not yet cut LCD is pressed firmly against the (there are three), so they are not for-
off. Later, rectangular clearances are cut inside of the front panel. The three gotten or overlooked. Then follow the
in the front panel to allow the LCD to type D6 push-buttons should then low-profile parts and, finally, the verti-
be viewed, and the push-buttons to be protrude a little from the front panel. cally mounted parts. IC sockets should
pressed. The holes marked In, Out and not be used for the NE592 and the
It is recommended to use sockets ground to the right of preset P1 are SAA1057 on this board.
for IC1 and IC2. All holes in the PCB for an optional 3-wire RS232 link to a The value of the inductors is usually
with a label printed near it (like A1, T0, PC. If you do not require PC control, printed on these parts in the form of
Psen, Lock, etc.) are for inter-board the MAX232 may be omitted. The prac- colour bands (like resistors) or dots.
wires. Solder pins are not strictly nec- tical use of the RS232 interface will be The PLL/VFO board is fitted in a
essary direct wire connections to the reverted to further on. tinplate enclosure from Teko. After the
board are also fine. As with the PSU solder work, inspect the board, and
board, check your work against our VFO/PLL BOARD compare yours with our prototype
fully working prototype. This time, As you can see from the PCB artwork shown in Figure 11.
refer to the photograph in Figure 9. in Figure 10, this is the board with the
The board is fitted vertically behind the highest component density of all four.
metal front plate (which has to be pur- Care and precision are essential if you Figure 9. Finished con-
chased separately). It is held in position want to avoid a tedious faultfinding troller board (proto-
by a pair of slots moulded on the bot- session. Identify and check each part type).

22 Elektor Electronics 12/98


Visit our Web site at http://www.elektor-electronics.co.uk

H4 C1 0 +12V L7 C26 C20 980053-1 H3

10 L1 C9 L6 C29
1-350089 R35

C27
C18

R41
R16

R15
R13
R14
R2 D2 C24C23 C34

D12
C12 P1

R34

R33
R36

D11
R24

C13

IC3
B2 C2 L2
R25 R37 ROTKELE )C(
D1 R1 R42 +5V
C8 T2 T1 R18
R4 D4 C28 C25 +30V
R23 R26 C35 0
B3 C3 L3 C10 C7
T3 C19 C11 B A C

R28
D3 R3 C40 C33

R27
R17 T5

R12

R22

IC2
R6 D6 R20 C17 IC1
C14 C36 C38

R32
B4 C4 L4 T4 R19
R39
D5 R5 R21 C6 LOCK
C15 C16 C39

R29
R30

R31
R8 D8 D10 OUT C31

R9
FM AM L8
B5 C5
H1
L5 R11 T T T C30
H2

R10 R40 C21 C22 X1 R38


D7 R7 C37
D9 C32

(C) ELEKTOR

980053-1

Figure 10. VFO/PLL resistor, and then check its position on and the trimmer to the centre of their
PCB design. the board. travel. It is assumed that the power
The attenuator board has relatively supply board has been tested already
large copper areas to assist in screening (with good results, of course).
AT TENUATOR BOARD and preventing unwanted signals from After applying power, the first thing
The main point to mind about assem- being generated and picked up by the to do is set the LCD contrast with pre-
bling the attenuator board (Figure 12) circuit. The attenuator board is shown set P1. Next, use an oscilloscope to
is that each close-tolerance (1%) resis- in Figure 11, together with the check that the VFO/PLL board sup-
tor goes to the right position on the VFO/PLL board. For RF screening pur- plies an RF signal to the attenuator
board. One error in this respect may poses, both boards are fitted in Teko board.
cause wrong attenuation levels later, tinplate cases. The output frequency supplied by
with possibly difficult to explain behav- the generator may be checked with a
iour of some of the radio equipment ADJUSTMENT calibrated frequency meter, a fre-
you may be aligning! Our advice is, The boards may be wired up experi- quency standard (off-air Rugby MSF or
therefore: read the Components List mentally for an initial test and a few similar) or a calibrated SW receiver
carefully, check the colour code, use a adjustments. (zero-beat). The relevant adjustment is
DMM to measure the value of each To begin with, set the two presets trimmer capacitor C33.

COMPONENTS LIST C6,C25,C30 = 2nF2 ceramic L6,L7 = 39H


C7 = 220nF MKT L8 = 3H3
VFO/PLL BOARD C8,C9,C16,C23,C24 = 330pF ceramic
C11 = 68pF ceramic Semiconductors:
Resistors: C12,C18,C38 = 10F 63V radial D1,D3,D5,D7 = 1N4148
R1,R3,R5,R7,R12,R22,R23,R31,R34,R36 C13 =100nF ceramic 5mm D2,D4,D6,D8 = BA243
,R37 = 10k C19,C27,C35,C39,C40 =100nF ceramic D9,D10 = BB130
R2,R4,R6,R8 = 390 C14 = 180 p ceramic D11,D12 = AA113
R9,R14,R15,R21,R27,R33,R40 = 1k C15 = 27 p ceramic T1,T2,T3 = BF494
R10,R41 = 330k C17 = 33n ceramic 5mm T4 = BF256B
R11,R13,R16,R18 = 100k C20,C32 = 47F 16V radial T5 = 2N5179
R17,R26 = 100 C21 = 4n7 ceramic IC1 =NE592N (N14)
R19 = 2M2 C26,C28 = 2F2 16V radial IC2 = SAA1057 (Philips)
R20 = 1M C29,C31 = 10nF ceramic IC3 = LM358P
R24,R25,R35 = 22k C33 = 40pF trimmer
R28,R29 = 3k3 C34 = 100F 10V radial Miscellaneous:
R30 = 560 C36 = 1F MKT X1 = 4MHz
R32 = 47 C37 = 330nF MKT Tinplate case, Teko, size 160x25x49mm
R38 = 180 Case, Bopla type Ultramas UM52011
R39 = 18k Inductors: (size 224x72x199mm)
R42 = 10 L1 = 330H Front panel type FP50011 or FPK50011
P1 = 2k multiturn preset, H L2 = 100H PCB, order code 980053-1 (see Read-
L3 = 22H ers Services page)
Capacitors: L4 = 3H9
C1-C5,C10,C22 = 33nF ceramic L5 = 0H56

Elektor Electronics 12/98 23


11

Adjustment of the RF signal level is Figure 11. Finished PLL/VFO board (below) and attenuator
only possible if you have an accurate board (above), both fitted in Teko ready-made tinplate cases.
and calibrated RF voltmeter. With the
attenuation set to 0 dB, preset P1 may
be adjusted for an output level of WIRING AND FM inputs on the PLL/VFO board and
630 mVpp into 50 at the generator MECHANICAL WORK the associated BNC sockets on the
output. Failing the necessary test Although there are quite a few wire front panel. If you can get hold of it,
equipment, you may leave the multi- connections between the boards, there use the 3-mm dia. type RG174/U, else,
turn preset at mid-travel. are no special precautions in this the much thicker RG50/U or /CU is a
respect. The RF signal connection good alternative.
between the PLL/VFO board and the All other inter-board connections
attenuator board must, of course, be are made in light-duty flexible wire or
Figure 12. Attenuator made in coax cable. The same goes for flatcable, although slightly thicker wire
PCB artwork. the connections between the AM and should be used for the 0-V, 5-V and 12-
H2

12 H3
R11
R12

R13
R14

R17
R18

R19
R20

R23
R24

R25
R26

R29
R30

R31
R32

R35
R36

R37
R38

R41
R42

R43
R44

R47
R48
R1
R2

R5
R6

R7
R8

R4 R10 R16 R21 R27 R33 R39 R45


R3 R9 R15 R22 R28 R34 R40 R46
ROTKELE )C(
2-350089
980053-2

T T
OUT

RE1 A1 RE2 RE3 RE4 RE5 RE6 RE7 RE8


0
C2 C3 C4 C5 C6 C7 C8
C1 H1 A2 A3 A4 A5 A6 A7 A8
D1 D2 D3 D4 D5 D6 D7 D8
H4
(C) ELEKTOR
980053-2

24 Elektor Electronics 12/98


Visit our Web site at http://www.elektor-electronics.co.uk

COMPONENTS LIST R13,R17 = 243


R14,R18 = 2k74 Capacitors:
ATTENUATOR BOARD R15,R20,R24 = 3k65 C1-C8 = 100nF SMD
R16 = 243
Resistors (all 1%): Semiconductors:
R19,R23 = 121
R1,R5,R21 = 909 D1-D8 = 1N4148
R2,R6 = 20k R22 = 562
R3 = 681 R25,R29,R31,R35,R37,R41,R43,R47 = Miscellaneous:
R4 =392 75 RE1-RE8 = relay, 2 x change-over, type
R7,R11 = 475 R26,R30,R32,R36,R38,R42,R44,R48 = V23042-A1001-B101 or V23042-
R8,R12 = 6k19 825 A2001-B101 Siemens (Eurodis, Elec-
R9 = 368 R27,R33,R39,R45 = 3k92 troValue)
R10 = 121 R28,R34,R40,R46 = 162 PCB, order code 980053-2 (see Read-

V supply wiring. Do not make any of on to the bottom plate of the enclosure. lated. At the PCB side in particular, the
the wires longer than necessary to pre- As already mentioned, the PSU board live and neutral wires should not be
vent digital noise being picked up from is fitted vertically, using a pair of the stripped longer than strictly necessary,
the controller board. moulded PCB slots towards the back and they should be inserted into the
The wires and the coax cables to panel. The three holes at the empty clamps right up to the insulation.
and from the PLL/VFO board and the right-hand side of the controller board Finally, once the wires are connected,
attenuator board should pass through are drilled to a diameter of about 8 mm the terminals on the mains
holes drilled in the short side panels of to allow the coax cables to the three socket/switch combination must be
the Teko tinplate cases. Once these front-panel mounted BNC sockets to insulated using heat-shrink sleeving.
boards are fully operational, the top pass. The metal front panel is cut, drilled
covers are fitted for optimum RF The mains voltage is switched on and lettered using the template shown
screening. and off by a double-pole switch inte- in Figure 13. This front panel foil is not
Guidance for mounting the four grated into a mains socket fitted onto available ready-made.
boards into the Bopla enclosure may the plastic rear panel of the enclosure. In the (ABS plastic) back panel, you
be obtained from the photographs in The wires between the mains have to cut rectangular clearances for
this article, and in particular, Figure 13. s o c ke t / s w i t c h the mains
Note that the solder side of the power combination and Figure 13. A look inside our pro- s o c ke t / s w i t c h
supply board is protected by a perspex the PCB terminal totype of the RF Signal Generator. combination
cover plate cut to roughly the same block on the PSU The covers of the tinplate cases and, optionally,
size as the board. The VFO/PLL and board should be of the VFO/PLL board and the for the RS232
attenuator boards are screened by tin- mains-rated and attenuator board were removed connector (a 9-
plate boxes, and mounted horizontally properly iso- for this photograph. pin sub-D type).

13

Elektor Electronics 12/98 25


with you via an LCD encoder is immediately passed on to
14 with two lines of 16 the VFO/PLL unit. In this mode, the RF
characters. output frequency is continuously
The functions of adjustable, but only within the selected
the left and right range (one of five). If you turn the
pushbuttons are self- encoder to a frequency outside a cer-
evident, we reckon, tain range, the PLL will drop out of
because they move lock, and the lock indication will dis-
the cursor on the LC appear from the LCD. By pressing any
display in the direc- key, the PLL is returned to asynchro-
tion indicated by the nous mode, and the last selected fre-
arrows on the front quency is automatically restored. If you
panel then move the cursor to a decimal digit
From the starting of the frequency readout, and press the
position (cursor on Enter key, the generator changes to the
MHz), the cursor relevant frequency range, allowing you
may be moved to the to change to synchronous mode again
left on to any of the and continue tuning again using con-
post-decimal posi- tinuous frequency variation.
tions of the fre- One more position to the right, the
quency. The number cursor reaches the dB position, indi-
at which the cursor cating the currently valid attenuation.
arrives may then be The desired attenuation may be set
changed by turning with the aid of the rotary encoder. As
the rotary encoder. with the frequency setting, the
The frequency set in desired attenuation becomes effective
this way is however only when you press the Enter key.
not actually gener- This is done to reduce wear and tear
ated until you press on the relays.
the Enter pushbut-
ton (asynchronous OPTIONAL
operation, this is R S 2 3 2 I N T E R FA C E
indicated in the The RS232 interface on the controller
upper right-hand board is an optional extension whose
corner of the dis- function has not been fully developed
play). After any fre- out by the author/designer. Basically, it
quency change, the was designed into the circuit to enable
PLL status is indi- the generator frequency and output
cated by lock in the signal attenuation to be controlled by a
left-hand bottom PC.
corner of the read- The communication parameters are
out. as follows: 9600 bits/s, 8 data bits, 1
From the initial stop bit. The communication works
position to the right, with character strings, and is easily
the cursor jumps to tested with the aid of a terminal pro-
M0 (memory 0). gram. To set the frequency you have to
This indicates two send an F (for frequency), then five
memories, M0 and numbers for the frequency in kilo-
M1, in which fre- hertz, and, finally, a carriage-return
quency and attenua- (CHR$(13)). An additional Line-Feed
tor settings may be (CHR$(10)) will be ignored. If every-
stored. You press the thing is correct (first character is F, a
Enter key to change total of 6 characters and the frequency
between these mem- in the right range), the controller
ories. In this way, returns a D (for done), followed by
you can quickly a CR-LF sequence, otherwise, an E
change between two (for error) and a CR-LF.
previously stored The attenuation is set by sending an
settings, which may A, two numbers and CR. Again the
be useful, for exam- controller answers as described. The
Figure 14. Suggested front- ple, for aligning a filter. Alternatively, main purpose of the serial interface
panel layout. Use it as a tem- you may use the same frequency was to create a basis for using the gen-
plate to drill the metal front twice, but with two different attenua- erator in an environment like Lab-
panel of the instrument, and tor settings. This facility is useful for ViewTM.
apply the lettering/symbols. adjusting, say, a receiver AGC (auto- (980053-2)
matic gain control).
Moving further to the right, the cur-
OPERATION sor jumps on asy. Here you can ELEKTOR
The instrument is controlled by means switch to asynchronous operation by 240V ~ 50Hz
of three pushbuttons and a rotary pressing Enter. In synchronous
No. 980053
encoder, all accessible on the front mode, any frequency change
F = 63mA T
panel. The instrument communicates requested by way of the rotary
COMPUTERS

32-channel
PC-controlled light dimmer
de luxe controller for
ohmic and inductive loads

Over the years this


magazine has pub-
lished a variety of light
dimmers. Invariably,
these were designs
based on discrete
components. This
time, the design is a
more advanced one
that may be controled
with the aid of a com-
puter. Each channel is
capable of controlling
ohmic as well as
inductive loads rated
at up to 300 watts.

INTRODUCTION components are replaced by a micro-


To most people a light dimmer is a gad- controller driven by a computer pro-
get with a rotary control that takes the gram. The design may consist of 832
place of the usual light switch. The channels, each of which can be indi-
Hardware design by H. Bonekamp dimmer described in this article is vidually controlled with Windows soft-
Software design by G. Janssen rather different. The usual standard ware.

Elektor Electronics 12/98


30
Visit our Web site at http://www.elektor-electronics.co.uk

L1

1 R17
5V
10A

56k
K3 K4
1W

C7 IC3
2 3
X2 5V F1 CH8
D2
470n IC4
1A25 T

1N4001
1 CNY65 4
TR1
K5

IC2 5V
S202S11
7805 5V F2 CH7
B1 IC5

10k
R15 1A25 T

C8 C9 C10

T2 K6
9V 470 100n 100n
1VA5 B80C1500 25V
S202S11
R16 F3 CH6

1M
IC6
BC547B 1A25 T
5V

K2 ISP K7
10k

R6

5V S202S11
F4 CH5
IC7
C4 1A25 T
5V C5 C3 C6
K1
10n 100n 10 10V 100n
1 R4 K8
20
10k

6
2 S202S11
F5 CH4
7 1 19 R7
R2 R3 RESET IC1 (SCK)PB7 390 IC8
3
TxD 2 18 R8
100k 100k PD0(RxD) (MISO)PB6 390 1A25 T
8 3 17 R9
PD1(TxD) (MOSI)PB5 390
4 6 16 R10
R5 PD2(INT0) AT90 PB4 390
9 7 15 R11 K9
PD3(INT1) S2313 (OCI)PB3
1k

390
5 R1 T1 8 14 R12
PD4(T0) PB2 390
S202S11
10k

9 13 R13
PD5(T1) (AIN1)PB1 390 F6 CH3
D1 11 12 R14
PD6(ICP) (AIN0)PB0 390 IC9
RS232
BC547B 1A25 T
XTAL1 XTAL2
5 X1 4 10
K10
S1

C1 8MHz C2 S202S11
F7 CH2

22p 22p IC10


1A25 T

S1 ON DIP
K11
1 2 3 4
S202S11 CH1
F8
IC11
1A25 T

Figure 1. The 32-channel dim-


mer is constructed of four S202S11 980076 - 11
identical sections, each of
which supports eight channels.
One section is shown here.
The dimmer as a burglar deter- modules, each with eight controllers. It
may be used for rent. may, of course, be used with just one,
stage lighting in a small or home the- Since the design can handle induc- two or three modules.
atre, for controlling domestic lights, or tive loads, the dimmer may also be
for illuminating an aviary or aquarium. used for controlling motors, halogen DESIGN
Another use is the controlled but ran- lamps and transformers. SPECIFICATION
dom switching on and off of domestic The unit can control up to 32 indi- The original requirements laid down
lighting during the residentss absence vidual loads for which it contains four that the design must be of the open
type, that is, it must be possible for
individual users to develop a program
or alter an existing one for controlling
Features: the dimmer. There is a standard elec-
tronic mixer for 32 (light) channels
controls eight loads per module available that works under Windows
up to four modules per serial gate 95.
suitable for ohmic and inductive loads Communication between the com-
switches in synchrony with mains puter and dimmer takes place via the
operates with simple protocol usual RS232 link on the basis of a com-
four integral control curves pact and clear protocol. This will be
reverted to later.
simple to program
The instructions sent by the com-
batch operation possible
puter to the dimmer include the final
up to 300 watt loading per channel value of the setting and fade time per
uses Windows 95 software step. Dimming occurs of course in syn-
all source codes available chrony with the mains voltage. The
controller stores, of each and every

Elektor Electronics 12/98 31


CH8 CH7 CH6 CH5 CH4 CH3 CH2 CH1

H1
H2

K4 K5 K6 K7 K8 K9 K10 K11

F1 F2 F3 F4 F5 F6 F7 F8
980076-1 1.25AT 1.25AT 1.25AT 1.25AT 1.25AT 1.25AT 1.25AT 1.25AT

IC4 IC5 IC6 IC7 IC8 IC9 IC10 IC11

C6 K2
C9 C5
T2 R16 C4

R15

R10
R11
R12
R13
R14
R7
R8
R9
IC3
B1

C3
R17 IC1
L1 C8
X1

D2
T
TR1 S1

R6
R5
C2
TXD
C7 C1
R1
K3 R4 R3
~ ~ C10
1-670089 IC2 R2

H3
H4

D1 T1
ROTKELE )C(

(C) ELEKTOR
980076-1

Figure 2. The printed-circuit board


channel, the set maximum value, the linked to the computer via a for a single section of the 32-
fade time and the actual value. Every TxD line, drives optotriacs channel dimmer. To be able to use
time there is an alteration, the com- IC4IC11 via pins PB0PB7. One all 32 channels, four of these
puter sends a new set of parameters. set of terminals of the optotriacs boards are needed.
This arrangement ensures that there is is connected to the mains volt-
relatively little need for the exchange age, whereas the set of terminals
of information between the computer at the other side is switched to earth snubber network, the dimmer can be
and the controller. via the I/O lines of the controller and a used for controlling inductive loads.
390 resistor. Optoisolator IC3 serves to detect
CIRCUIT DESCRIPTION The optotriacs are protected at the the mains zero crossing. The zero
It is clear from the circuit diagram of mains voltage terminals by a fuse rated crossing is used for synchronizing
one of the four modules in Figure 1 at 1.25 A. At a mains voltage of 240 V, the controller. The optoisolator is
that the key component of the design this means that loads of up to about linked directly to the mains supply
is a Type AT90S2313 microcontroller 300 watts can be controlled. since the transformer causes a small
(from Atmel). The controller, which is Since the optotriacs incorporate a phase shift that may cause errors in

32 Elektor Electronics 12/98


Visit our Web site at http://www.elektor-electronics.co.uk

Parts list

Resistors:
R1, R4, R6, R15 = 10 k
R2, R3 = 100 k
R5 = 1 k
R7R14 = 390
R16 = 1 M
R17 = 56 k, 1 W, 400 V

Capacitors:
C1, C22 = 22 pF, ceramic
C3, C6, C9, C10 = 0.1 F, ceramic
C4 = 10 F. 10 V, radial
C5 = 0.01 F, ceramic
C7 = 0.47 F, 250 V a.c., Class X2
C8 = 470 F, 25 V, radial

Inductors:
L1 = suppressor coil, 10 A,
Type T60405M6108X2 (Siemens)

Semiconductors:
B1 = rectangular rectifier bridge
Type B80C1500
D1 = LED, red, high efficiency
D2 = 1N4001
T1, T2 = BC547B

Integrated circuits:
IC1 = AT90S2313 (Order
Figure 3. The completed proto-
no. 986524-1 see Readers Ser-
Vcc, and to six-pole header K2. The type of a single section.
vices towards the end of this issue)
IC2 = 7805 interface enables the user to program
IC3 = CNY65 the controller.
IC4IC11 = S202S11 (Sharp) Some pins of the controller are
linked to DIP switches, which enable a larger length than usual to ensure
Miscellaneous: the user to select a number of options. good electrical contact. Note that at
X1 = crystal, 8 MHz This will be reverted to later. maximum load, a current of up to 10 A
S1 = 4-section DIP switch The serial interface has been kept flows through the coil: a good reason
K1 = 9-pole female sub-D connector
K2 = 6-pole SIL header
simple. The controller uses only the for ensuring good contacts.
K3K11 = two-way terminal block, TxD signal of the computer. The RS232 The finished prototype board is
pitch 7.5 mm voltage level is converted to TTL level shown in Figure 3.
Tr1 = mains transformer, secondary with the aid of a transistor and some Readers who have obtained the
9 V/1.5 A resistors and then inverted. No other ready programmed controller via the
F1F8 = fuse holder with 1.25 slow RS232 lines need to be linked in the Readers Services (towards the end of
fuse connector, provided only the pro- this issue) can start work immediately.
Enclosure Bopla EG2050L (available
gramme supplied is used. If a self-writ- Insert the controller into its socket
from Phoenix Tel. 01296 398 355)
PCB 9800761* ten program is used, some other lines and assemble the board in the specified
Windows 95 software, incl. source may well need to be linked. plastic case.
code, EPS 986025* The clock generator, C1-C2-X1 pro- Since several tracks carry the full
Source code for programming Atmel vides a clock of 8 MHz. mains voltage, extreme care is required
controller: EPS 9860331* The circuit contains all the electron- in the assembly. Always unplug the
Programmed controller EPS ics for controlling up to eight loads. unit from the mains before doing any
9865241* The available Windows 95 software is work or checking something after
* (see Readers Services towards the
arranged so that four of these circuits assembly.
end of this issue) can be driven simultaneously. Finally, make the serial link with the
computer. After the Windows software
CONSTRUCTION (only 95 or 98) has been installed, the
The circuit is best built on the printed- dimmer is ready for use. The intuitive
circuit board shown in Figure 2. It will user interface (see the screendump in
the measurements. be seen that in spite of the versatility of Figure 4) readily points the user into
The synchronizing pulse is buf- the unit, the board has been kept com- the right direction.
fered by transistor T2 and applied to pact. Readers who wish to extend the
input PD3 (INT1). Most of the work is straightforward program can do so right away because
To ensure correct operation, the as long as the specified components the program is supplied with the
dimmer should be connected to a fre- are used. This is particularly true of the source code (in Delphi format).
quency-stable mains supply only. suppressor circuit, L1-C7. The capacitor
must be a Class X2 component. HANDYMAN
DIY PROGRAMMING The inductor consists of two parallel PROGRAMMER
As the controller is in principle InCir- wound windings that are twisted at As mentioned earlier, it is possible to
cuit Programmable, the printed-circuit the ends. Untwist them about 1 cm, programme the controller to ones own
board incorporates a special ICP inter- remove the enamel from the ends, wishes and requirements. This is pos-
face. This interface is linked to pins push them through the relevant holes sible because the diskette containing
RESET, SCK, GND, MIS0, MOS1, and in the board and bend them. It is the Windows software also contains
important that they are soldered over the source code and the ROM file of

Elektor Electronics 12/98 33


4

Figure 4. The software available through the Readers


Services enables the easy control of up to 32 chan-
nels via Windows 95 or Windows 98.

the controller program. Moreover, the C:/...handyman.exe../AT90S8515.


board has a special ICP connection.
The Handyman Programmer fea- This option appreciably enlarges the
tured in the December 1997 issue of reserved memory range of the con-
this magazine may be used for this troller. The capacity of the 2313 used is
purpose once an adaptor lead is made about twice that of the 1200. The 8515
to link the 10-way box header to the processor is the largest in the Atmel
single-row header on the board. catalogue so that the memory range ELEKTOR
When the associated program is can now be set to maximum. 240V ~ 50Hz
started, add the switch /8515 to the [980076]
No. 980076
instruction line, which then looks as
F = 8x 1.25A T
follows:

the software revisited


In essence, the program consists of two interrupt routines. Five bytes are also reserved to enable an RS232 frame to
The sync routine synchronizes the phase modulator with be stored in its entirety.
the zero crossing of the mains supply voltage. The phase Fade time is expressed in units of 10 milliseconds (ms).
modulator counter runs from 0 to 240; there is also a half- The end value is 0127, which is multiplied 2 by the soft-
period counter which is 0 or 0xff. The first counter scans ware.
the half-period, while the second indicates which part of There are four tables, each with 256 reference values, in
the period. the program memory. The reference values are 0249 and
At each call, the timer interrupt routine increments the are composed so that they represent a specific control
counter of the phase modulator. Each time the count cycle operation (i.e., characteristic curve).
is finished, the half-period counter is inverted. New data are stored at the appropriate memory
The synchronization interrupt routine checks whether addresses via the RS232 port.
the phase modulator counter is in synchrony and in phase The instantaneous content of the phase modulator is
with the mains voltage. If they are not in phase, the routine incremented or reduced until the final value is reached.
increments or reduces the counter content by one unit, The speed at which this happens depends on the set fade
depending on the nature and extent of the detected error. time. The fade time is entered into the fade counter, where-
In this way, the phase difference will be eradicated within upon the content of this counter is reduced every 10 ms
a very short time. until it is 1. Subsequently, the setting of the phase modu-
Space is reserved in the RAM for each and every chan- lator is modified by 1, whereupon the fade value is again
nel for storing all relevant data: entered into the fade counter. This process is repeated
until the end value has been reached. When the fade value
fade time: 3 bytes is 0, the setting of the phase modulator is made equal to
fade counter: 3 bytes the end value. All these routines are initiated via a timer
end value: 1 byte interrupt.
step size: 1 byte
phase modulator: 1 byte

34 Elektor Electronics 12/98


Visit our Web site at http://www.elektor-electronics.co.uk

dip switch positions


Sections 1 and 2 of DIP switch S1 enable setting a curve Sections 3 and 4 are for setting the address of the con-
along which the controller sets the ignition angle of the troller board.
optotriacs. Four curves are provided which enable the
most propitious angle for a number of applications to be S1(3) S1(4)
on on channels 18
off on channels 916
on off channels 1724
off off channels 2532

For those readers who may not be very interested in these


curves, but rather know what the effect of shifting the con-
trols is, the curves in the illustration below give the answers.
The two linear curves (power consumption with = 0 and
average voltage) are identical and form a straight line. The
other two (exponential)curves are those pertaining to the sit-
uation where = 5 and = 25.

selected (see illustration below).

S1(1) S1(2) Curve


on on 1
on off 2
off on 3
off off 4

Curve 1 represents control based on the average voltage.


Curve 2 represents control based on power consumption
with = 0.
Curve 3 represents semi-logarithmic control based on
power consumption with = 5.
Curve 4 represents logarithmic control based on power
consumption with = 25.

protocol
The protocol used in the dimmer makes control straight- byte 4
forward. The serial format is: 0 T6 T5 T4 T3 T2 T1 T0

9600 baud byte 5


1 start bit 0 D6 D5 D4 D3 D2 D1 D0
1 stop bit
no parity bit where
A = address of channel
1st byte: b7 = 1 (marking the start of a frame). With all S = size of step
other bytes, b7 = 0. T = duration of step
D = end value
Frame construction
A frame consists of five words and is composed as fol- If, on reception, there is an error within a frame, the entire
lows: frame will be ignored and the system will wait for the start
of a new frame (b7 = 1).
byte 1
1 A4 A3 A2 A1 A0 S1 S0 When the step resolution is 1, a control time of
255 10 ms is needed. When a short fade time has been
byte 2 set, an error of not more than 1.27 s may ensue. For this
0 T20 T19 T18 T17 T16 T15 T14 reason, the software will alter the size of step to 2, 3 or 4
when the fade time is shorter than 2.55 seconds. This
byte 3 ensures that the fade time is altered to ensure that the error
0 T13 T12 T11 T10 T9 T8 T7 never exceeds 15 per cent.

Elektor Electronics 12/98 35


TEST & MEASUREMENT

barometer/altimeter
Part 2
programming, calibration,
software and operation
When construction of
the barometer/altime-
ter, which is based
on a precision air-
pressure sensor with
integral signal
processor from
Motorola, is com-
pleted, the unit has
to be programmed
and calibrated in
accordance with the
correct reference.
Evaluation, storing,
display and inter-
change of data are
effected by a micro-
controller system.

CHOICE OF PROGRAM PROGRAMMING


Since the 12 kbyte flash-ROM in the Programming of the microcontroller
Atmel microcontroller is relatively can be effected only with software
small for the present application, two diskette Type 986031-1 available
versions of the program are available: through our Readers Services (see
towards the end of this issue). The
normal.hex diskette should be copied to a hard disk
which arranges for the reference pres- or other write medium that is not
sure to be derived from the indicated write-protected.
height;
1. Start program SISP (Serial in System
vsl.hex (virtual sea level) Programmable) in the real DOS
which allows the pressure at sea level mode (not in the DOS window of
as given by the nearest airport or Windows).
Design by H. Bonekamp weather station to be input.

Elektor Electronics 12/98


38
MAIN MENU FUNCTION

FUNCTION FUNCTION FUNCTION

Barometer Altimeter Datalogger Preferences

1 xxxx.x hPa xxxx meter Enter for menu Enter for menu

ENTER ENTER
ESC ESC

Datalogger Preferences
menu menu

DATALOGGER MENU FUNCTION

FUNCTION FUNCTION FUNCTION FUNCTION

Sample time Clear datalogger Pres. logger on/off Pressure logger Pressure logger
Enter to set Enter to clear Enter to switch Enter to view Enter to send

ENTER ENTER
ESC ENTER: clear datalogger ENTER: swich datalogger ESC ENTER: transmit datalogger info
on/off to PC
+: select pressure/altitude +: select pressure/altitude
Enter -: select pressure/altitude View logger -: select pressure/altitude
Sample time

+: select pressure/altitude
-: select pressure/altitude
ENTER SAMPLE TIME FUNCTION

FUNCTION FUNCTION FUNCTION FUNCTION

Interval Interval Interval Interval Interval


h:mm:ss h:mm:ss h:mm:ss h:mm:ss h:mm: ss

ENTER: set new interval +: current digit + 1


ESCAPE: keep old interval -: current digit - 1

VIEW LOGGER

day: d hh:mm:ss
xxxx.x hPa.mbar

+: next time
-: previous time

ENTER NEW VALUE FUNCTION

FUNCTION FUNCTION FUNCTION FUNCTION

Pressure Pressure Pressure Pressure Pressure


xxxx.x hPa xxxx.x hPa xxxx.x hPa xxxx.x hPa xxxx.x hPa

FUNCTION

FUNCTION FUNCTION FUNCTION FUNCTION

Ref. altitude Ref. altitude Ref. altitude Ref. altitude Ref. altitude
xxxxx meter xxxxx meter xxxxx meter xxxxx meter xxxxx meter

ENTER: set new value +: current digit + 1


ESCAPE: keep old value -: current digit - 1

PREFERENCES MENU FUNCTION

FUNCTION FUNCTION FUNCTION

Altitude mode Ref. altitude Rest. sea-lvl P Send direct: on/off


Enter to set Enter to set Enter to restore Enter to switch

ENTER ENTER ENTER: set sea-level pressure ENTER: switch send direct
ESC ESC to 1013.25 hPa on/off

Set altimode Enter new


value

P at sea level
Enter to set

ENTER
ESC

Enter new
value

FUNCTION

FUNCTION FUNCTION

Calibration 1 Calibration 2 Default CAL


Enter to CAL Enter to CAL Enter to restore

ENTER ENTER ENTER: set default calibration


ESC ESC

Enter new Enter new Figure 1. The main menu


value value
contains four sub-menus,
two of which, data logger
SET ALTIMODE and preferences, are
themselves divided into
Altitude mode
abs./rel. alt.
sub-sub-menus.

: select absolute/relative altitude

FUNCTION FUNCTION
980097 - 2 - 11
: select absolute/relative altitude

Elektor Electronics 12/98 39


Visit our Web site at http://www.elektor-electronics.co.uk

2. Select input file normal.hex or be obtained from the nearest airport or higher menu without this being
vsl.hex at option 5. weather station. This value must be stored in the eeprom.
input into calibration 1 in the prefer-
3. Enter the wanted serial interface ences menu. This value is then com- These keys take the operator through
(com-port) at option 5. pared with the actually measured all the menus as shown in Figure 1.
value and a new offset value com- The Main Menu consists of four
4. Link the barometer to the computer puted. The new offset value is stored sub-menus: barometer, altimeter, data
via an RS232 cable (1:1). Do not yet in the eeprom. logger, and preferences.
switch on the unit. In the two-point method, not only The data logger sub-menu itself
the offset of the sensor is compen- consists of a number of sub-sub-menus
5. Set pin jumper JP2 to position I sated, but also its transconductance. as shown.
(ISP). The procedure is as with method 1, When Input Sample Time has been
but in this case a second value is selected, the sample interval may be
6. Switch on the barometer unit. entered in calibration 2 in the menu. set between 10 seconds and 8 hours
This value must differ by at least 5 hPa with a resolution of one second.
7. Insert the pin jumper into JP1. (5 millibar) from the first one. This The measurement results stored in
margin is needed by the software to the data logger can be viewed by
8. Select option 1 of SISP (write code reduce the effects of rounding-off selecting View Logger.
memory) and wait until the pro- errors and any interference. The The elaborate Preferences menu
gramming has been completed greater the difference between the two contains the functions Ref. Altitude
values, the more accurate the (normal.hex) and P at Sea Level
9. In case of an error message, remove transconductance is computed. (vsl.hex). In both, as during calibration,
the pin jumper from JP1, switch off The second value is obtained after enter the value for altitude or atmos-
the barometer, and repeat the fore- the atmospheric pressure has risen or pheric pressure into Input New Value
going procedure from point 6. fallen sufficiently with respect to the digit by digit.
first value. Check this second value Set Altimode determines whether
10. Insert the pin jumper of JP2 into with the nearest weather station and the relative or absolute altitude is dis-
position R (RS232) and remove the input it at CALIBRATION 2. played. The absolute altitude is the
pin jumper from JP1. height above sea level, and the relative
OPERATION altitude is the height above a set refer-
Before commencing any measure- ence. In both cases, the actual atmos-
CALIBRATION ments, leave the barometer/alitmeter pheric pressure at sea level must be
Without correct calibration, the barom- for about two minutes to enable it to entered. The reference atmospheric
eter/altimeter would not have the req- warm up. The unit is operated by five pressure at sea level, that is,
uisite accuracy. Only correct calibration touch keys on the front panel: 1013.25 millibar (1013.25 hPa), is reset
ensures that the program uses the stan- with Rest. sea-|v|P. Default cal pro-
dard transconductance and offset val- MODE (S2), which enables any of the vides a similar function: it erases any
ues (0.01509 and 0.1518 respectively) of functions on each of the menus to calibration entries and replaces them
the sensor specified by the manufac- be accessed and utilized. with standard values.
turers to compute the air pressure. Not much more can be said about
Apart from this, there is no other com- (UP) (S3) with which the value of the display than that the atmospheric
pensation of the tolerances of the volt- the selected digits is increased. pressure is shown in hPa (hecto-Pascal,
age divider. There are two which is identical to millibars) and the
methods of calibrating the unit: the sin- (DOWN) (S4) with which the value altitude in meters. Two arrows indicate
gle-point and the two-point. In single- of the selected digits is decreased. whether the measurement is moving
point calibration only the offset is cor- up or down. When the data logger is
rected, which shifts the pressure vs ENTER (S5) with which a selection is active, the display shows an asterisk.
output voltage characteristic upwards. confirmed or altered (stored in the
Single-point calibration requires a eeprom). DATA TO COMPUTER
reliable, actual value of the atmos- Communication between the barome-
pheric pressure, which can normally ESCAPE (S6) to return to the next ter/altimeter and the computer is in
8-bit format, 9600 baud, no parity bit,
and no handshake. Basically, any PC
using DOS or Windows is suitable.
There are two ways of transferring

home-made software data to the computer: individual, by


which a measurement value is trans-
ferred to the computer as soon as it is
available, or stream, by which the con-
Since the diskette contains the source code of the software, competent read- tent of the data logger is transferred in
ers are able to incorporate their own requirements and other special functions, one operation.
provided they have a Tasking C development tool available. A demonstration [980097]
of the C compiler is available as freeware on the Internet: www.tasking.com
Communication with the display is made possible by _IOWRITE in the basic
function. This enables the standard print commands in C to be used. This
means that conversions must not be written. Printer formats are supported by
FPRINTF().
In the same way, communication via the RS232 interface takes place with
_IOREAD() and _IOWRITE(). The total package of I/O routines available in C must
be entered.

Elektor Electronics 12/98 41


GENERAL INTEREST

digital terrestrial
television (DTT)
An inevitable development

The future of television is largely in digital ter- Based on a report by Bill Higgins
restrial broadcasting. Britain is forging the way
in this new field, but other countries in Europe INTRODUCTION
Digital terrestrial television provides
and North America, as well as Japan, are substantial benefits to viewers: more
quality channels, better sound, better
bound to follow soon. Most of the European pictures, and new services. In the near
development was carried out under the DVB future, many of these services will be
interactive, enabling the viewer to
(Digital Video Broadcasting) Project launched shop, bank, send e-mail messages, and
in 1993 and approved by almost 200 signato- others. Many countries in Europe will
undoubtedly discontinue the analogue
ries from 25 countries in 1995. The launching transmissions and switch to digital
broadcasts over the next 1015 years
group consisted of representatives from indus- time (in Britain, suggestions have
try, public and private broadcasters,tele-com- already been made for this to happen
as early as 2008).
municationss companies, research institutes Viewers will need a new digital tele-
vision receiver or a digital terrestrial
and the European Commission. Because of set-top box to receive the new broad-
this wide-ranging participation, the DVB Project casts. Viewers who wish to make use of
the interactive services need a tele-
has taken over the leading role in the introduc- phone socket near their TV set. There
tion of digital television in Europe. will be no ghosting or snow with
digital terrestrial TV. Viewers with

Elektor Electronics 12/98


44
Visit our Web site at http://www.elektor-electronics.co.uk

widescreen television receivers will be


able to take advantage of the higher
proportion of widescreen material
1
included in digital broadcasts.

HOW DOES DIGITAL A


TELEVISION WORK?
An analogue signal can be sampled
and digitized as shown in Figure 1,
and then represented by a stream of
logic 1s and 0s . The planning of digital
terrestrial television started in the USA t t t t t t
in the late 1980s and soon thereafter, in
the early 1990s, separate projects and
pilot developments came about in
Europe also.
Essential to the concept of digital
video coding is data compression tech- T
nology which makes possible much
narrower bandwidths than with ana- t = Duration of sampling
T = Period of analogue signal
logue TV signals. The compression is
A = Amplitude of analogue signal 980102 - 12
applied to quantized images provided
by the television camera. The picture
area is sampled pixel by pixel and a Figure 1. Principle of
value is allocated in each case to the sampling and quantiz-
luminance value Y and the chromi- new frame that have ing an analogue signal. tion) with motion com-
nance values R-Y and B-Y of each pixel. moved owing to the pensation.
This pulse-code modulation is carried movement of the In the decomposi-
out initially with binary numbers. The object are transmitted. The unchanged tion, use is made of the Discrete Cosine
resultant bit stream has a data rate of pixels are redundant and are repro- Transform (DCT), which is a variant of
166 Mbit/s. duced from the frame buffer in the the Discrete Fourier Transform (DFT).
In the case of High Definition Tele- receiver. A further reduction in the There are two kinds of DCT: the hybrid
Vision (HDTV), a new aspect ratio of number of pixels to be transmitted is and the intraframe, both of which have
16:9 is used (current standard is 4:3). obtained by specifying the frame-to- advantages and disadvantages. There-
The scanning rate of the HDTV lumi- frame displacement of a moving object fore, full frames are normally
nance signal is increased to 72 MHz by a displacement vector. This vector is intraframe coded at fixed intervals in
(currently, 13.5 MHz). This results in a used in the receiver to take the pixel for the hybrid method. This is the basis of
total data rate of 1.52 Gbit/s for the the moving object from the buffer. The the ISO MPEG standard.
Y-U-V video source signal. background data must, of course, also The ISO (International Standard-
A giant step forward in coding tech- be transmitted in this method, which is ization Organization), which is a con-
nology was achieved by motion-com- called interframe sultant to the United
pensating coding. In this, to start the DPCM (Differential Figure 2. The program Nations, was deci-
data compression, only the pixels of a Pulse Code Modula- and transport stream in sively involved in the
the MPEG-2 standard.

2 V MPEG video PES


video coder Packetizer Program

MUX Program
stream

A MPEG audio PES


audio coder Packetizer

Transport
data
supplementary Transport
data MUX
PES stream
Packetizer

MPEG systems
980102 - 19

Elektor Electronics 12/98 45


Frequency Time
3 domain domain 12 ...16 bit
DSB AM
I D
Re
(Re)
A

pre-proc.
DVB-T If RF

(LCA)
IFFT clock 90
Gross data
rate
lm

Q D
(lm) f RF - f IF
A

Al - Tp
(1/2 B) REF.
synthesizer
f ZF
1 N 980102 - 20

Figure 3. Typical OFDM


(Orthogonal Frequency
advances made in video coding. Since ing of enhanced PAL Division and Multiplex- The MPEG-2 Video
the early 1990s, the ISO and IEC (Inter- (Phase Alternate Line) ing) modulator used in Coding Standard was
national Electrotechnical Commission) quality. It also includes DTT (Digitial Terrestrial conceived as a generic,
have been coordinated by the JCT1 HDTV. The standard Television). that is, application-
(Joint Technical Committee 1) in the specifies sampling rates independent solution.
telecommunications field. of 215 Mbit/s. The cor- In other words, the
A subgroup (called the Motion Pic- relation between the sampling rate, the syntax of its algorithm makes it suitable
tures Expert Group MPEG) of the duration of the sample, and the num- for many different applications and
JCT1 was set up to define a standard ber of samples per television line is their relevant data rates. In addition to
for full-video communication. The shown in Table 1. this flexibility in source formats,
standard specifies storage, for instance, MPEG-2 has become a world stan- MPEG-2 allows different profiles. A
in multi-media workstations, and can dard for video, applying both to the profile offers a collection of compres-
also be applied to transmissions on the transmitting side and to the receiver at sion tools that together make up the
established media. the output of the demodulator: OFDM coding system.
The MPEG-1 standard is suitable (Orthogonal Frequency Division and The specification for DVB-T (Digital
for the coding of small-format images Multiplexing) for terrestrial reception, Video Broadcasting Terrestrial) was
with low data rates (up to 1.5 Mbit/s). QSPK (Quadrature Phase Shift Keying) finalized in late 1995. It lays down that
The second project phase, MPEG-2, is for satellite reception, and 64QAM the DVB-T transmission system con-
a specification for a (Quadrature Ampli- tains the following fundamentally new
method that is compat- Figure 4. P(redicted)- tude Modulation) for elements: baseband coding for video
ible with MPEG-1, but frames at 3, 6, and 9 reception via a cable and audio, MPEG-2 transport stream
which allows the cod- frames from the refer- network. (see Figure 2), terrestrial channel cod-
ence frame. ing, OFDM modulation, and coverage
using single-frequency network tech-
nology. The OFDM modulation
method (see Figure 3) and the single-
4 frequency network technology lead to
a number of system engineering con-
sequences.
One of the consequences of apply-
ing data compression at the signal
source is that conventional sinewave
test methods with swept-frequency
signals in the frequency domain and
Ref 3 6 9 with reference to test line signals in the
P-Frame P-Frame P-Frame
980102 - 13
time domain are not usable for the dig-
ital transmission channel.
The consequence of transporting
signals in time division multiplex is
Sampling rate Duration of sample Number of samples
(Mbit/s) (s) per TV line

2 0.5 128 Table 1. Correlation of


MPEG-2 sampling rates,
6.75 0.148 432 duration of sample, and
13.5 0.074 865 number of samples per
television line.
15 0.066 969

46 Elektor Electronics 12/98


Visit our Web site at http://www.elektor-electronics.co.uk

1 2 4 5 7 8 10 11

P P P P

Ref B-Frames B-Frames B-Frames B-Frames


980102 - 14

Figure 5.Location of B(i- Figure 6. Location of


directional) frames. I(ntraframe) signals.

1 2 3 4 5 6 7 8 9 10 11 1 2 3 4 5 6 7 8 9 10 11 1 2 3
6

Ref New ref Newer ref


I-Frame I-Frame I-Frame
980102 - 15

7 Video Subsystem Service Multiplex and Transport RF/Transmission


System
Video Video
Source coding
and Compressing

Channel
Transport Coding
Audio Subsystem
Service
Audio Audio Multiplex
Source coding
and Compressing

Modulation
Ancillary Data

Control Data

Figure 7. Block diagram Receiver Characteristics


of the proposed Ameri-
can digital terrestrial
television structure.
980102 - 16
(Courtesy ITU)

Elektor Electronics 12/98 47


8 f 27 MHz Program Clock
Reference

program clock reference base


33 9
program clock reference extension
Frequency
Divider
Network Adaptation
Header
fv fa Encoder

Video In Video f TP f sym RF Out


Transport FEC VSB
A/D Encoder and Sync Modulator
Encoder
Insertion

Audio In Audio
A/D Encoder
980102 - 17

Figure 8. High-level
encoding equipment for
that digital terrestrial the proposed American same path without B-frames are generated by interpo-
broadcasting service standard of DTT. (Cour- interaction. This can be lation from P-frames and the reference
technology need not tesy ITU) achieved by separating frame and are therefore called bi-direc-
remain confined to the the signals in time or tional. As shown in Figure 5, they slot
transmission of televi- frequency. in between the reference and the
sion signals and associated data, but Frequency division multiplexing P-frames, at 1, 2, 4, 5, 7, 8, 10, and 11,
that video, audio and data signals can (FDM) is an analogue technique which frames from the reference.
be freely assembled and transmitted is still used on satellite and microwave
transparently for multi-layer services. links, although many of these now use Intraframe
Programme distribution can be digital techniques. In the interframe system, the reference
effected via standard copper lines, opti- Time division multiplexing (TDM) frame occurs every 12 frames. This is
cal fibre cables or microwave links. is a method of interleaving digital sig- effectively the intraframe signal or
Digital terrestrial transmitter engi- nals from a number of channels on to I-frame. A new I-frame occurs after
neering requires novel transmitter one circuit. For instance, six 600 bit/s every eleven interframe difference sig-
measuring techniques. This involves channels may be multiplexed on to one nals throughout the transmission (see
parameters such as BER (Bit Error 3600 bit/s circuit. Both ends of the cir- Figure 6).
Rate), pattern analysis, spectrum cuit must be synchronized to ensure
analysis, OFDM power measurement that the data on one channel input AMERICAN STANDARD
and the measurement of the operating reaches the correct channel output at In the USA, the Advisory Committee
characteristics of multi-carrier power the far end. on Advanced Television Service
amplifiers. (ACATS), which was set up by the FCC
Operating DVB-T transmitters in DATA COMPRESSION (Federal Communications Commis-
single-frequency mode presupposes In general, data compression is a sion), and the Advanced Television Test
frequency- and bit-synchronous oper- method to reduce the amount of trans- Center (ATTC), a collaboration
ation by the transmitters. This requires mitted data by applying an algorithm between broadcast service operators
new approaches to frequency and time to the basic data at the point of trans- and the television receiver industry,
synchronization providing operational mission. A decompression algorithm have devised a different standard for
reliability on a regional and national expands the data back at the receiver digital television.
level. into its original format. There are two The specification is basically the
Terrestrial transmission over radio major methods in use: Interframe and Digital Spectrum Compatible HDTV
paths with single transmitters and sin- intraframe. (DSC-HDTV) proposal by Zenith and
gle-frequency transmitters requires AT&T. Basically, it splits the digital TV
novel coverage measuring techniques Interframe system into:
in which, in addition to the traditional The interframe method is based on a source coding and compression
field-strength measurement, parame- difference signal generated by the the service multiplex and transport
ters such as channel impulse response, frames before and after the present RF transmission.
raw bit error rate, intersymbol interfer- frame. These difference signals are A block diagram of the system for dig-
ence, and selective C/I (Carrier over termed P(redicted) frames and B(i- ital terrestrial television is shown in
Interferer) are important factors. directional) frames. P-frames are pre- Figure 7. The coding is based on the
dicted from the preceding reference MPEG-2 standard, but uses 27 MHz
M U LT I P L E X I N G frame and are normally 3, 6 or 9 frames sampling and special digital extensions
Multiplexing is the process of trans- from the reference as shown in Fig- to allow for any new formats in the
mitting two or more signals over the ure 4. future, picture extensions, and indica-

48 Elektor Electronics 12/98


Visit our Web site at http://www.elektor-electronics.co.uk

Although digital satellite signals can be received all over in digital TV that allows for the transmission of data about
the UK, digital terrestrial signals will, at least for the time programmes that are being broadcast. One of the features
being, not cover the whole country. Where possible, the of this programme is that it allows viewers to order TV
new digital transmission will be on frequencies close to channels for special events or films on the appropriate
those used for the current analogue TV broadcasts, which pay-TV channel. EPG also has the possibility of providing
means that viewers can continue to use their existing interactivity with the home customer in offering a whole
antennas. range of consumer services, from home banking to home
The BBC has already started transmitting DTT signals: shopping.
from 23 September last, viewers with suitable equipment
have been able to watch the first regular digital terrestrial
channel in the world, together with wide-screen versions
of BBC1 and BBC2. The inset table correlates some UHF
channels with analogue and digital TV programmes (based Useful telephone numbers:
on Crystal Palace transmitter).
BBC: 0990 118 833 for a digital information pack; 0870
Channel number (UHF) DTT programme Analogue programme 010 0123 for other queries; web site:
www.bbc.co.uk/digital/
22 DMx2
23 ITV (London)
ONdigital: 0171 819 8000; web site www.ondigital.co.uk
25 DMx1
26 BBC1 (London)
BSkyB: 0870 242 4200
28 DMx4
29 DMx6
The photograph (A) shows the Mediamaster 9850T from
30 Channel 4 (London)
Nokia which was introduced at the Cable & Satellite Show
32 DMx3
in London earlier this year. It is fully compliant with the
33 BBC2 (London)
ONdigital standard, ready for pay-per-view and other inter-
34 DMx5
active services, and has an integrated modem. It comes
37 Channel 5 (London)
with a remote controller for ease of operation.
DMx = Digital Multiplex

The existing terrestrial channels will be free-to-air on


digital terrestrial TV, as will the new digital channels: BBC
News 24, BBC Choice, and existing free channels on ana-
logue TV: Sky News, CNN, and Eurosport.
Open standard integrated digital television sets are now
available in the shops, enabling viewers to receive all the
digital services from the BBC, ITV, Chan-
nel 4, Channel 5, and ONdigital with-
out the need for set-top boxes,
satellite dishes or cable con-
nections. Six manufacturers will
be producing set-top boxes
needed to receive DTT on ana-
logue TV sets: Grundig, Nokia,
Pace, Philips, Sony and Toshiba.
Video cassette recorders
(VCRs) can be used with digital
terrestrial set-top boxes. Unfortunately, there is the same
serious and annoying flaw as with satellite receivers: only
the digital programme being watched can be recorded.
This is an area where analogue TV will retain its current
MOTOROLA TO REVOLUTIONIZE
popularity for some time to come. M U LT I M E D I A I N T H E H O M E
ONdigital, formerly called British Digital Broadcasting
(BDB), has been granted 24-year licenses by the Inde- In a move to set the standard in the home entertain-
pendent Television Commission to be the terrestrial pay-TV
ment market, Motorola has launched the first system to
platform in the United Kingdom. ONdigital is a partnership
bring together digital TV, audio, Internet, 3D computer
between Carlton Communications and the Granada Group.
A smart card, which looks like an ordinary credit or games and other multimedia applications in one box.
bankers card, but which has an integrated microproces- At a time when digital TV-based services establish
sor and memory instead of a magnetic recording strip, will themselves in Europe, as defined by the DVB-T project,
be used by ONdigital for subscription services and pay- the open system will liberate viewers by allowing them
per-view events. to receive the services of all competing digital services,
Smart cards are already used for mobile telephones, whether terrestrial, cable or satellite.
loyalty cards and by BSkyB to control subscription viewing The system, named Blackbird, has been offered to
to its satellite service. Owing to the extended reach of manufacturers of set-top boxes and other manufacturers.
Astra 2, Sky smart cards will be needed for the free-to-air Consumers can expect to see set-top box products,
channels to prevent viewers in other European countries based on Blackbird, within the next six months.
tuning in to programmes that have been copyright-cleared Motorola 0049 172 678 9545 (David Jones), or 0044 802
for the UK only. 365 956 (Una Kent)
Electronic Programme Guide (EPG) is a technique used

Elektor Electronics 12/98 49


Visit our Web site at http://www.elektor-electronics.co.uk

tions of use of the system in the appro- in their RF modulation technique. The
priate signal. American system uses the single-car- FCC: www.fcc.gov
A high-level view of the encoding rier, 8-VSB (Vestigial Side Band) modu-
equipment is shown in Figure 8. In this lation scheme, whereas DVB-T uses General Instruments: www.gi.com
drawing, fTP is is the transmission fre- multiple-carrier COFDM (Coded
quency of the transport stream, while OFDM). Even in the USA, there is con- Grundig: www.grundig.com
fsym is the frequency of the vestigial siderable interest in CODFM because
sideband (VSB). These frequencies, it provides the most rugged and flexi- ITC: www.itc.org.uk
which must be locked, are related by: ble delivery mechanism for informa-
tion available today. ITU, Geneva, Switzerland
fTP = (188/208)(312/313)fsym. [980102] www.itu.int/newsroom

As stated earlier, the MPEG-2 Video MPEG: www.mpeg.org


Coding Standard is used by all pro- Sources:
posed DTT systems to achieve an ade- Digital Terrestrial Television Broadcasting NEC Benelux, the Netherlands
quate throughput of the vast amounts by Paul Dambacher, Springer Verlag,
of data required by the American 1998. (Reviewed in the September 1998 Newman Carter Hill, London, Eng-
HDTV and DVBs multi-channel Stan- issue of this magazine) land
dard Definition TeleVision (SDTV).
Although current DTT plans in Europe BBC, London, England Nokia Multimedia, London, England
are geared towards SDTV, it should be www.bbc.co.uk www.nokia.com
noted that the choice of HDTV or
SDTV has nothing to do with the BSkyB, Isleworth, England Pace Micro Technology, Shipley, Eng-
transmission of the MPEG-2 bit stream. www.sky.co.uk land; www.pacemicro.com
In other words, there are no obstacles
to broadcasters using DVB-T to carry DigiTag: www.digitag.org Panasonic: www.panasonic.co.uk
HDTV: all of the MPEG-2 compliant Snell & Wilcox, Peterfield, England
formats in the American HDTV stan- Digital TV Group, Hants, England
dard can be delivered by DVB-T. dtg.org.uk TV/COM International, Weybridge,
The difference between the Ameri- England; www.tvcom.com
can and DVB-T standards exists largely Echostar, the Netherlands

Test Card M
The Test Card for use in digital video
broadcasts (DVB), called Test Card M
as illustrated, is based on existing test
cards, showing (in the UK) the famil-
iar girl, blackboard and balloon,
together with graticules, circles, and
so on. Additional test areas for digital
broadcasts are shown in the diagram
for location.
1) Frame identifier, which shows
which frame is present, I, B or P,
and gives it a number, for instance,
2nd B or 3rd P. This is considered
the most useful parameter for fault
diagnosis.
2) Rolling colour cube. Since differ-
ence signals are generated by the
digital equipment, it is useful to
have some movement in the test
card and this is provided by the cube moving across Test card M has been sponsored by the Department of
the screen from left to right, weaving in front and Trade and Industry (DTI) under the Test Bed Pro-
behind the letters BBC, M test, VID001g, and so on, gramme. Leaders of the project are Snell & Wilcox, while
always on the same line of the card. other members include the BBC, ITV, Channel 4, and
3) Moving clock hand, which moves on every second; ITC. It is financed by and geared to the European market
useful for time/movement measurement analysis.
4) Colour phase rotation area. This is to show colour dif- The structure of the test card enables rapid diagnosis of
ference signal since the colour spectrum is changing faults, system stress, and so on, without the need of spe-
continuously. cialized (expensive) equipment. A quick look at the test
5) Moving colour zone plate to determine any image card should in many cases be sufficient to ascertain the
impairment on colour caused by cascading of multi- nature of a fault.
plex stages.
6) Moving black&white zone plate to determine any The test card does not provide test sequences for the
impairment on B&W pixels owing to cascading multi- American system. It is expected that the American orga-
plex stages. nizations will produce their own in due course.

Elektor Electronics 12/98 51


treble tone control

Design: T. Giesberts their counterparts in the bass tone


The treble control works in a control; their influence is seen
similar manner as the bass con- clearly in the characteristics.
trol elsewhere in this issue, but Good symmetry between the left-
contains several modifications, hand and right-hand channels is
of course. One of these is the obtained by the use of 1% ver-
series network C1-C2R1R11. sions of R1R13 and C1, C2.
The d.c. operating point of The value of resistors
IC3 is set with resistors R12 and R2R10 is purposely different
R13. To ensure that these resis- from that of their counterparts in
tors do not (adversely) affect the the bass tone control. In the pre-
control characteristics, they are sent circuit, the control range
coupled to the junction of R9 starts above 20 kHz. To make
and R10. In this way they only sure that a control range of
affect the low-frequency noise 10 dB is available at 20 kHz,
and the load of the op amp. the nominal amplification is
Their value of 10 k is a rea- 3.5 (11 dB).
sonable compromise. The control circuit draws a
The functions of switches current of about 10 mA.
S1S3 are identical to those of [984115]
002 torchlight dimmer
Design: F. Rimatzki as possible, a power MOSFET
This circuit was originally with a very low on-resistance is
designed to control the bright- used. The BUZ10 used here
ness of an electric torchlight, but does, however, call for a drive
may find many other applica- voltage of at least 6 V, so that an
tions because of its high effi- additional voltage step-up con-
ciency, ease of operation and verter is required.
ability to control (lamp) loads Counter IC2b only acts as a
drawing several amps. The dim- bistable to allow the circuit to be
mer offers brightness control switched on by means of the
from nil to maximum in 16 steps lamp brightness push-button,
by means of a small push-but- S1. The circuit is switched off
ton. When the push-button is (current consumption: less than
released, the selected brightness 5 A) if output Q0 of IC2b
is retained. One of the most (pin 11) supplies a logic high
remarkable things about this cir- level. The 27-kHz (approx.)
cuit is that it hardly adds to the oscillator built from gates IC1a,
battery load, its own current IC1b and IC1c is then disabled,
consumption amounting to no so that the outputs of IC1a and
more than about 4 mA (at a bat- IC1b are logic high. The ICs in
tery voltage of 3.5 V). the circuit are then powered via
The 16 discrete brightness val- choke L1 and the output tran-
ues are obtained by comparing sistors of IC1a and IC1b. This is
two counter states. One of these unusual but possible because
actually determines the lamp these transistors can also pass a
brightness, while the other per- voltage level at the IC outputs to
forms a cyclic count from 0 to the supply connection, instead
15. The lamp current is then of the other way around (which
only switched on if the second is far more usual). Because of
value is smaller than or equal to the logic-high level at the reset
the first. To make sure the inputs of counters IC3 and IC2a,
switching losses remain as small comparator IC4 receives input

BUZ10
CTR14 7
3 D
5
IC3 4
4
5 COMP
11 !G 6 10
RCX 6 0
10 14 7
RX + 7
9 CT 13 2 P
CX 8 IC4
15 15
9 3
12 1 4 13
G S D
CT=0 11 P>Q P>Q T1
IC1f La1
2 6 3 D
12 P=Q P=Q
4060 3 5 12 14 15 G
13 P<Q P<Q 1
11
0
9
S BUZ10
4585
1 Q

14 R2 C3
3
120k
270p

UB UB IC1c IC1a
R1 D2 L1 R3
3 11 7 6 3 2
2 0 10 0 39k 1 1 10
EN 4 EN 12 10mH
1 IC2a 1 9 IC2b 1 2x
C 5 C 13
7 2 15 2 1N4148 IC1b
R 6 R 14 D1
3 3 5 4 BT1
1
C1
3...6V
22
63V
UB IC1 = 4049
R5
IC2 = 4520
47k

UB
IC1d
R4
9 10
120k 1
C4 C2 1 C5 16 C6 16 C7 16 C8
S1 IC1 IC2 IC3 IC4
IC1e
4n7 22 8 100n 8 100n 8 100n 8 100n
12 11 63V
1
984075 - 11

54 Elektor Electronics 12/98


Visit our Web site at http://www.elektor-electronics.co.uk

S1
COMPONENTS LIST L1 = 10mH choke
R5
R1 R2
C7 T1
H2
H1

C8 D2 R4 Resistors: Semiconductors:
D1 C3 R1 = 39k D1,D2 = 1N4148

+Bat-
C6 R2,R4 = 120k T1 = BUZ10 (Siemens)
R3 = 10 IC1 = 4049
IC3

IC1
C4 R5 = 47k IC2 = 4520

IC4

La1
IC3 = 4060

R3
IC2

L1
Capacitors: IC4 = 4585
C5 C1,C2 = 2F2 63V radial
C2 C3 = 270pF ceramic Miscellaneous:

H3
H4

ROTKELE )C( 1-570489 984075-1 C1 C4 = 4nF7 S1 = push-button, 1 make


C5-C8 = 100nF contact
984075-1 (C) ELEKTOR Bt1 = torchlight battery, 3-6V
Inductor: La1 = torchlight lamp

cascading input of IC4, pin 4, causing the lamp to light at the


causes the P>Q output, pin 13, selected brightness. The next
to be enabled, so that IC3 is action on S1 resets the entire
clocked. The counter slowly circuit and switches the lamp off
increases the value at the P If so desired, the brightness con-
inputs of the comparator, trol rate may be reduced by dou-
thereby controlling the duty fac- bling or trebling the value of C3.
tor (mark/space ratio) of the sig- To compensate the resultant
nal at the comparators P<Q drop in the IC supply voltage,
data which causes it to pull its R2. The oscillator output signal output, pin 12. As soon as IC3 the value of choke L1 then has
P<Q output (pin 12) logic high. is filtered by R3 and C1. reaches its maximum counter to be increased proportionally.
The result is that inverter IC1f Although the step-up converter state, the signal at pin 13 of IC4 The IC supply voltage should
pinches off the BUZ10 MOS- is only capable of supplying a no longer changes, so that the always be between 8 V and 16 V
FET, and the lamp remains off. few mA, that is sufficient for the counter is not started at 0 again. (maximum value of 4000 series
When the push-button is actu- CMOS ICs and the BUZ10 The P<Q output then also CMOS ICs).
ated for the first time, the MOSFET. For battery voltages remains at 0, so that T1 is dri- The circuit is best built on a
bistable in IC2b receives a between 3 and 6 V, the indicated ven hard and the lamp lights at printed circuit board of which
clock pulse from switch values of R1 and R2 enable a maximum brightness. If the the templates are shown here.
debouncing circuit IC1c-IC1d. voltage of 8.5 V to about 16 V to push-button is released before Unfortunately this board is not
Next, the counters and the oscil- be created for powering the ICs the maximum brightness is available ready-made through
lator are enabled. The duty fac- and driving the BUZ10. reached, counter IC3 no longer the Publishers.
tor of the oscillator signal is As long as the push-button is receives clock pulses and (984075-1, Gb)
determined by resistors R1 and held depressed, the level at the freezes at the current state,
003

battery-charging indicator
for mains adaptor
Design: J. Gonzalez the LED lights when the base-
D1
Although you may well be the emitter potential of the transis-
proud owner of the very latest tor exceeds about 0.2 V. Using a
NiCd battery charger, you may R2 resistor of 1 as suggested this
still come across the odd 'incom- happens at a current of about
470

patible' battery, for example, one 200 mA, or about 40 mA if R1 is


having a rare voltage or requir- changed to 4.7 .
T1
ing a much higher charging cur- The voltage drop caused by
rent than can be supplied by this indicator can never exceed
your off-the-shelf charger. In the base-emitter voltage (UBE) of
BU406
these cases, many of you will R1
the transistor, or about 0.7 V.
1
resort to an adjustable mains 984083 - 11
Even if the current through R1
adaptor (say, a 500-mA type) continues to increase beyond
because that is probably the the level at which UBE = 0.7 V,
cheapest way of providing the which is adjustable but of much to be preferred over a the base of the transistor will
direct voltage required to charge the unregulated, low output voltage indicator. 'absorb' the excess current. The
the battery. Not fast and not very current type, you can adjust 3. To prevent you from forget- TO-220 style BU406 transistor
efficient, this 'rustic' charging the current by adjusting the ting all about the charging suggested here is capable of
system works, although subject output voltage. cycle, the indicator should accepting base currents up to 4
to the following restrictions: 2. You have to know if the cur- be visible from wherever you A.
1. You should have some idea rent actually flows through pass by frequently. Using this charging indicator
of the charging current. In the battery. A current-detect- you have overcome the restric-
case you use an adaptor ing indicator is therefore Using the circuit shown here, tions 2 and 3 mentioned above.

Elektor Electronics 12/98 55


What remains is the problem of put voltage settings on the adap- lower the charging current, the age in the adaptor housing. A
knowing the required current. tor. Next, you choose between smaller the risk of damage to the safer alternative is to install the
As long as UBE remains below reasonably fast charging, say, in battery if you forget to switch off circuit in a remote control box.
0.6 V or so, the voltage across about 5 hours using C(Ah)/5, or the charger. The circuit is not protected
R1 is a faithful indication of the slower, say, 10 hours at In some cases it will be pos- against reversal of the battery
charging current. Alternatively, C(Ah)/10. C(Ah) is the battery sible to incorporate the circuit polarity. If such protection is
you may insert an ammeter to capacity in (milli-) ampere- into the mains adaptor. That may required, a fuse or circuit
find out about the charging cur- hours, which is usually printed be dangerous, however, because breaker should be added.
rents produced at different out- on the battery. In general, the of the presence of the mains volt- [984083]
004

playback amplifier
for cassette deck
Design: T. Giesberts
For some time now, there have C2 C4
been a number of tape cassette
decks available at low prices 56n 68p
from mail order businesses and R3
*
1k5
R4
56k
R7
100k
electronics retailers. Such decks
do not contain any electronics, C1
5
of course. It is not easy to build a L 7
C3
3
220n IC1b C5 L
recording amplifier and the 6 1
220n IC1a
fairly complex magnetic biasing 2
1
circuits, but a playback ampli- MKT

fier is not too difficult as the pre- *


R1 R2 R5 R6 R8
sent one shows.
100k

1k2

100k

1k

100k
The stereo circuits in the
diagram, in conjunction with a
suitable deck, form a good-qual-
ity cassette player. The distor- C2' C4'
tion and frequency range (up to
23 kHz) are up to good stan- 56n 68p

dards. Moreover, the circuit can *


R3'
1k5
R4'
56k
R7'
100k
be built on a small board for
C1'
incorporation with the deck in a 5
C3'
suitable enclosure. R 220n IC1b'
7 3
C5' R
Both terminals of coupling 6
220n IC1a'
1

capacitor C1 are at ground 2


1
MKT
potential when the amplifier is
switched on. Because of the *
R1' R2' R5' R6' R8'

symmetrical 12 V supply
100k

1k2

100k

1k

100k

lines, the capacitor will not be


charged. If a single supply is
used, the initial surge when the
capacitor is being charged
causes a loud click in the loud- * Metallfilm Widerstand 12V
speaker and, worse, magnetizes * metaalfilm weerstand C6 D1

the tape. * metal film resistor 8 8 47n 1N4148


The playback head provides IC1 IC1'
an audio signal at a level of 4 4 C7 D2
200500 mV. The two amplifiers
raise this to line level, not lin- IC1, IC1' = NE5532 47n
1N4148
early, but in accordance with the 12V 984113 - 11
RIAA equalization characteris-
tic for tape recorders. Broadly
speaking, this characteristic
divides the frequency range into corresponding to a time con- This characteristic is deter- rumble filter, C3-R5 (C3-R5)
three bands: stant of 70 s, for chromium mined entirely by A1 (A1). To with a very low cut-off frequency
Up to 50 Hz, corresponding dioxide tape, the signal is make the amplifier suitable for of 7 Hz. The components of this
to a time constant of amplified at a steadily use with chromium dioxide tape, filter have exactly the same
3.18 ms, the signal is highly decreasing rate. add a double-pole switch (for value as the input filter, C1-R1
and linearly amplified. Above 1.326 kHz or stereo) to connect a 2.2 k (C1-R1).
Between 50 Hz and 2.274 kHz, as the case may resistor in parallel with R3 (R3). The second stage, A2 (A2)
1.326 kHz, corresponding to be, the signal is slightly and The output of A1 (A1) is amplifies the signal 100, that
a time constant of 120 s, for linearly amplified. applied to a passive high-pass is, to line level (1 V r.m.s.).
normal tape, or 2.274 kHz,

56 Elektor Electronics 12/98


Visit our Web site at http://www.elektor-electronics.co.uk

Capacitor C4 limits the upper the amplifier to oscillate. that can provide a current of up the deck; the electronic circuits
frequency range to avoid r.f. The amplifier needs a sym- to 0.5 A. The greater part of this draw only 15 mA.
interference and any tendency of
005 metrical 12 V power supply current is drawn by the motor of [984113]

memory change-over tip


Design: L. Lemmens MOV dummy,var1 XOR var1,.var2 higher programming languages
When the contents of two exist- MOV var1,var2 XOR var2,var1 to save having to declare an
ing memory address have to be MOV var2,dummy XOR var1,var2 additional variable.
interchanged for one reason or [984080]
an other, there is usually a need This dummy variable is not This tip may well be of use
for an additional address or vari- always necessary: when the memory space is lim-
able: ited. It may also be used with
006

improved power-down
for the 8051
Design: G. Kleine address/data bus
Members of the 8051 family of
microcontrollers (MCS51) are
well-known and widely used. 40 1 28
74HCT573
The controllers have a power- VPP
down mode in which the pro- 16 WR
P0.0
39 AD0 AD0 2
1D
19 A0 A0 10
A0
38 AD1 AD1 3 18 A1 A1 9
gram processing is suspended 17
RD
P0.1 A1
37 AD2 AD2 4 17 A2 A2 8
by the clock oscillator and 9
P0.2
36 AD3 AD3 5 16 A3 A3 7
A2
D0
11 AD0

ended with a power-down RESET P0.3


35 AD4 AD4 6 15 A4 A4 6
A3
D1
12 AD1
P0.4 A4
instruction. To reduce the cur- 34 AD5 AD5 7 14 A5 A5 5 D2
13 AD2
P0.5 A5 15 AD3
rent drain, the supply voltage is 33 AD6 AD6 8 13 A6 A6 4
EPROM
D3
C P0.6 A6 16 AD4
reduced to a minimum of 2 V P0.7
32 AD7 AD7 9 12 A7 A7 3
A7
D4
17 AD5
after the powered-down mode MCS-51 A8 25
A8 27C256
D5
18 AD6
D6
has been selected. This mode ALE/P 30 11
C1
A9 24
A9 19 AD7
1 1 A10 21 D7
can only be disabled by a reset, P1.0/T2 EN A10
2 21 A8 A11 23
for which the supply voltage 3
P1.1/T2X P2.0
22 A9 A12 2
A11

needs to be returned to 5 V. 4
P1.2 P2.1
23 A10 A13 26
A12
P1.3 P2.2 A13
In simple applications of the 5 24 A11 A14 27
P1.4 P2.3 A14
8051, the EPROM containing 6
P1.5 P2.4
25 A12
OE CS
the program to be executed is 7
P1.6 P2.5
26 A13
22 14 20
enabled by making PSEN (pro- 8
P1.7 80C31 P2.6
27 A14

gram storage enable) active via 12


INT0 P2.7
28 A15

its OE (output enable) terminal. 13


INT1
14 T0 29
There are also circuits where PSEN address bus
15 T1
PSEN acts on the CS (chip TXD 11 5V
select) terminal of the EPROM. 10 31
10k
RXD EA/VP 1n
Use of the power-down mode 15 14
X1 X2
has a drawback: line ALE RX/CX CX
20 19 18 3 13
(address latch enable), like 2 &
PSEN, remains low during the 1 4
power-down mode and so holds
the EPROM active. It occupies 74HCT123 984127 - 11
the address/data bus with the
accidentally same addressed
byte. high edges of the ALE signal, the EPROM when the power- pulse).This arrangement ensures
This drawback can be which after a power-down and down mode is selected (and that the EPROM can also be
removed by the circuit in the before a reset has a clock pulse. when, consequently, the dis- switched to the power-down
diagram. A retriggerable mono- The output of the monostable abled quartz oscillator can no mode.
stable evaluates the low and sets a high on the CS input of longer generate an ALE Moreover, the monostable

Elektor Electronics 12/98 57


output may also be set on the Note that with component
address decoder of the system, values as specified, the mono- Further reading: Elektor Electronics, September
or the combined CS lines of stable has a time constant of 1997, Data acquisition system
other peripheral equipment, so about 4.5 s. Elektor Electronics, March 1998,
that these are also in the power- [984127] 80C32-BASIC control com- Elektor Electronics, June 1997,
down mode. puter. 80C537 microcontroller board
007

general-purpose alarm
9V

R1 R4 R6 T6 T7
14
30M

1M

56k

IC1
R18 R19
7 C4

3M9

2M7
T2 2x 68p
IC1d
IC1a BC557 13 IC1c
1 D2 11 9
3 12 & 10
2 & 8 &
R17
3M9

R5 R9 R12
1N4148 BZ1
*
330k

1M
C1
R13
D1
220n 100k
T1
1N T4 T5
4148 R15
R3 R7 10M
2x
BC
220k

3M9

R10 BC547 IC1 = 4093


547
270k

T3
IC1b 4
R2 R8 P1 R11 R14 R16
C2 C3 &
4M7

3M9

1M

1M

BC547
1n
- * 4n7 5 6
NTC
100k
984078 - 11
* zie tekst * see text * siehe Text * voir texte
Design: K. Syttkus Transistor T1 then comes on and Resistors R13 and R15 pro- alarm. For the same reason, C1
The alarm may be used for a causes T2 and T3 to conduct vide through a kind of hystere- should be a type with very low
variety of applications, such as also. Thereupon, C1 is charged sis a Schmitt trigger input for leakage current.
frost monitor, room temperature via current source T1-T2-D1, the differential amplifier, which If operation of the alarm is
monitor, and so on. until the current from the source results in unambiguous and fast required when the resistance of
In the quiescent state, the becomes smaller than that flow- measurement results. R11 is higher than that of the
circuit draws a current of only a ing through R3 and T3 (about Capacitor C2 compensates fixed resistor, reverse the connec-
few microamperes, so that, in 3 A). This results in T1 switch- for the capacitive effect of long tions of the elements of the bridge
theory at least, a 9 V dry battery ing off, so that, owing to the cou- cables between sensor and cir- and thus effectively the inverting
(PP3, 6AM6, MN1604, 6LR61) pling with C1, the entire circuit cuit and so prevents false and non-inverting inputs of the
should last for up to ten years. is disabled. alarms. differential amplifier.
Such a tiny current is not possi- Capacitor C1 is (almost) fully If the sensor (R11) is built in An NTC thermistor such as
ble when ICs are used, and the charged, so that the anode the same enclosure as the R11 has a resistance at 18 C
circuit is therefore a discrete potential of D1 drops well below remainder of the circuit (as, for that is about ten times as high as
design. 0 V. Only when C1 is charged instance, in a room temperature that at room temperature. It is,
Every four seconds a mea- again can a new cycle begin. monitor), C2 and R13 may be therefore, advisable, if not a
suring bridge, which actuates a It is obvious that the larger omitted. In that case,C3 will must, when precise operation is
Schmitt trigger, is switched on part of the current is used for absorb any interference signals required, to consult the data
for 150 ms by a clock generator. charging C1. and so prevent false alarms. sheet of the device or take a
In that period of 150 ms, the Gate IC1a functions as To prevent any residual number of test readings.
resistance of an NTC thermistor, impedance inverter and feed- charge in C3 causing a false For the present circuit, the
R11, is compared with that of a back stage, and regularly alarm when the bridge is in resistance at 18 C must be
fixed resistor. If the former is switches on measurement equilibrium, the capacitor is dis- 300400 k. The value of R12
less than the latter, the alarm is bridge R9R12-C2-P1 briefly. charged rapidly via D2 when should be the same. Preset P1
set off. The bridge is terminated in a this happens. provides fine adjustment of the
When the circuit is switched differential amplifier, which, in Gates IC1c and IC1d form an response threshold.
on, capacitor C1 is not charged spite of the tiny current (and oscillator to drive the buzzer (an Note that although the proto-
and transistors T1T3 are off. the consequent small a.c. type). type uses an NTC thermistor, a
After switch-on, C1 is charged transconductance of the tran- Owing to the very high different kind of sensor may also
gradually via R1, R7, and R8, sistors) provides a large ampli- impedance of the clock, an be used, provided its electrical
until the base voltage of T1 fication and, therefore, a high epoxy resin (not pertinax) board specification is known and suits
exceeds the threshold bias. sensitivity. must be used for building the the present circuit. [984078]

58 Elektor Electronics 12/98


009
ultra low-noise
MC preamplifier
COMPONENTS LIST C3,C5,C7 = 220F 25V radial
C4,C6 = 100nF
Resistors:
R1,R12 = 100 Semiconductors:
R2 = 15k D1 = red LED, flat
R3 = 82 T1,T2,T3 = SSM2220 or
R4,R5 = 1k50 MAT03 (Analog Devices)
R6 = 150 T4 = BC560C
R7,R8 = 39 IC1 = OP27GP (Analog
R9 = 562 Devices)
R10 = 825
R11 = 511 Miscellaneous:
R13 = 100k K1,K2 = phono (line) socket,
P1 = 50 preset H PCB mount, gold-plated, e.g.
T-709G from
Capacitors: Monacor/Monarch (available
C1 = 10nF from C-I Electronics or Stip-
C2 = 10F MKT (Siemens) pler Electronics)
raster 22.5mm or 27.5mm

then function as the inputs of a Preset P1 and resistors R7/R8


super-opamp with a very low enable you to iron out any toler-
input noise level. An advantage ances on R4 and R5 in the dif-
of the p-n-p transistors used ference amplifier output. Tran-
here over their n-p-n counter- sistor T4 and LED D1 ensure a
This preamplifier was designed transistors type SSM2220 or parts is their much lower low- stable current setting for the dif-
for low-impedance signal MAT03 transistors are con- frequency noise level. On the ference amplifier. D1 should be
sources like MC (moving-coil) nected in parallel to form a dis- down side, a fairly large bias a flat, red, LED which is fitted
pick-up cartridges used in high- crete difference amplifier. By current of about 5.5 A is cre- face-to-face against T4 for ther-
end record players (yes, they connecting this amplifier ahead ated at the input. This is the mal coupling. Because the input
still exist). The actual input of an opamp (OP27), the input result of the 2-mA setting for noise level amounts to
impedance of the preamplifier is noise of the opamp becomes each transistor in combination 0.4 nV/Hz (theoretical value
100 . To keep the input noise immaterial. The base connec- with the relatively low gain of for a 10- resistor), it is essen-
as low as possible, three dual tions of the discrete amplifier the p-n-p devices. tial that the feedback adds as
little as possible to the overall
noise figure. Consequently, the
impedance of the feedback cir-
15V
D1
R3 cuit must be much lower than
C3 C4 C5
10 . Furthermore, the OP27
82

220 100n 220 demands a certain minimum


25V T4 25V
load impedance, so that the
feedback impedance may not be
less than 600 . To ensure that
R2
BC560C
15k

a low value can be used for R9,


a compromise had to be found
T1, T2, T3 = SSM2220
between maximum gain (here,
approx. 24 dB or 15.7 times) on
the one hand, and the value of
T3b 6 T2a 3 T1b 6 3 T1a 6 T2b 3 T3a R9. By fitting an additional
K1 R10 R12 C2 K2 resistor, R11, ahead of the
7 2 7 2 7 2
825 100 actual feedback, the opamp is
10 not excessively loaded, while R9
R1 8 1 8 1 8 1 R9 R11 R13 adds only 0.3 nV/Hz to the
input noise level, which, based
100

562

511

100k

C1
R6 on measurement data, amounts
150
10n
to 0.52 nV/Hz. If more gain is
3
1
7 needed, a noise figure of about
8
6
0.4 nV/Hz may be achieved at
IC1
2 a lower value of R9. The obvi-
R4 R5 4 ous disadvantage of adding R11
is a higher internal gain, caus-
1k50

1k50

OP27
P1 ing a smaller bandwidth and a
lower drive margin. Fortunately,
R7 R8
50 C6 C7 these factors are of little conse-
39

39

quence in the case of moving-


100n 220
25V
coil elements.
15V There are two ways to adjust P1.
984086 - 11
The first is to adjust the output

60 Elektor Electronics 12/98


Visit our Web site at http://www.elektor-electronics.co.uk

R2 ligible, then the output voltage large offset voltage being


+ 0 - should be 15.68 x 0.55 mV for applied to the input of an MD

H1
H2

T4 D1 R9
C3
perfect symmetry, in other amplifier.

R11
R12
R10
R3

C4
words, junction R10-R11-R12 The preamplifier is powered by

IC1
T3 C5 C7 should be at 8.62 mV with a symmetrical, regulated 15-V
K1 K2 respect to ground. supply, and draws about 16 mA
C6 Those of you who like to exper- on each rail. Finally, here are a
T2

ROTKELE )C(
R5
R4
R6

1-680489
C2

OUT
R1
Configuration: 3 x SSM2220/MAT03

R13
T1
984086-1 C1 P1 signal: 0.5 mV/25 input short-circuited
R8 S/N (BW = 22 kHz) 71.2 dB 74 dB

H4
H3

R7
74 dBA 76.2 dBA

Configuration: 1 x MAT03 (R3 = 249 )


S/N (BW = 22 kHz) 69.5 dB 71 dB
72.3 dBA 73.7 dBA
984086-1

(C) ELEKTOR
iment may want to try the effects few key figures measured on our
of reducing the number of input prototypes:
transistors from three to just one. The preamplifier is best built on
You may want to do this, for the printed circuit board whose
example, to reduce the input artwork is shown here. Con-
bias current. Resistor R3 then struction is uncritical, but do not
has to be changed into 249 . forget the wire links under tran-
Do remember, however, that the sistor T3 and next to capacitor
input noise level then rises by C2. The PCB is unfortunately
2.5 dB! not available ready-made from
The output has a large, solid the Publishers.
voltage to nil (measure at IC1 example, 0.55 mV across 10 F MKT (metal theraphte- (984086-1, Gb)
pin 6). The second option is to 100 . Assuming that the offset late, ask your local Siemens dis-
measure the input offset, for caused by T1, T2 and T3 is neg- tributor) capacitor to prevent a
010

Philbrick oscillator
5V
U in

C C C
T1
R1 R2 R3
U out
R R R 1M 1M 1M
C C C
BC517
U out
P1
C1
*
1 - 2VPP
100k R4
984121 - 11
1k

see text
*
984121 - 13

UB

Design: G. Kleine response of the RC network is


The Philbrick oscillator is a little greater than 1000, it may be
IC1
U out known design, patented by the used to build an oscillator by
American scientist George A feeding back the output signal to
R1 R2 R3
1M 1M 1M
Philbrick in 1956. It generates the input via a high-resistance
C C C
signals at low amplitude and voltage follower. The resulting
LMC uses fairly standard compo- oscillator can generate even very
7101
nents. The circuit, consisting of low audio frequencies.
three resistors and three capac- The diagrams in Figures 2
itors (see Figure 1), was origi- and 3 show two versions of the
UB 984121 - 12
nally used for d.c. decoupling at oscillator. The one with the
the input of oscilloscopes. op amp has the disadvantage
Since the step (transient) that it needs a symmetrical

Elektor Electronics 12/98 61


power supply of 1.57.5 V. lations and maximum output have to be polarized, depending itor values.
If that is a problem, the circuit voltage are guaranteed. on whether there is any direct
based on a transistor can be When the output of the tran- voltage at the input of the fol- C (nF) f (Hz)
used. This operates from a sistor version contains very low lowing stage. 100 5
power supply of +5 V. near-sinusoidal frequencies, it In the transistor oscillator 10 50
The operating point of the should be applied to the follow- with resistor values as specified, 1 500
emitter follower circuit in Fig- ing stage via an electrolytic the following frequencies were [984121]
ure 3 is set with P1 so that oscil- capacitor. This capacitor may measured with the stated capac-
011

presence filter
From an idea by R. Sontheimer 1
To make a certain musical 2
instrument in a group stand out, 1
R3
5
C1 R2 IC1a 2k2 R7 C4
a so-called presence filter is 3 7
470 IC1b 470
normally used. Unfortunately, 330n
6
1
the types usually found in D1 P1
amplifiers and mixers can only R1 12V
1k
lin. R4
100k

raise the level of the instrument 2k2


D2
output, but not attenuate it. 12V
The filter in the diagram pro-
vides amplification (15 dB) as
well as attenuation (15 dB) over
the presence range (see Fig- C2

ure 1). When potentiometer P1 15V 47n 9


is at its centre position, the signal IC1c
8

is unaltered. C5 10
C3
R5
The input signal (see Fig- 4 100n
390

ure 2) is applied to impedance IC1 12


47n

converter A1. Capacitor C1 11 C6 14 R6


blocks any d.c. on the signal. IC1d
13 2k2
IC1 = TL074
Resistor R1 sets the input resis- 100n

tance of the circuit. Diodes D1


and D2 protect the input against 15V
984106 - 11
high voltages. Resistor R2 limits
the current to the input of the
impedance converter. divider with R3 or part of the 2 + 18

The actual filter process is feedback loop with R4. When P1 + 12


carried out by op amps A2 and is at its centre position, the fil-
A3 and associated components. ter attenuates the signal to the +6
The filter behaves as a fre- same degree as it is amplified dB
0
quency-dependent resistance by A2.
whose value is a minimum at [984106] -6
about 3.5 kHz. At very high and - 12
very low frequencies, the resis-
tance of the filter is high. - 18
Depending on the setting of P1,
15 32 64 125 250 500 1k 2k 4k 8k 16k 30k
the filter forms a potential
f (Hz) 984106 - 12
012

polarity reverser
Design K. Lorenz the correct polarity. It is, of always possible. This may be the peak current exceeds the
There are systems in which it is course, possible to use a bridge because large voltage drops current rating of a diode. Fortu-
imperative that the supply volt- rectifier for this, but if large cur- across diodes result in appre- nately, a good, inexpensive
age of, say, a motor, always has rents are involved, this is not ciable heat dissipation, or that mechanical rectifier may be

62 Elektor Electronics 12/98


Visit our Web site at http://www.elektor-electronics.co.uk

constructed with the aid of a to ensure that the previous


relay. polarity of the supply to the load
In the diagram, the supply F1 is retained.
voltage is applied to K1, while Diode D1 is a freewheeling
the motor that needs a supply diode for the relay coil.
with correct polarity is linked to The type of relay to be used
D1 RE1
K2. Provided fuse F1 is intact, a depends on the requisite operat-
positive potential at terminal a ing voltage and the current
K1 K2
of K1 will be applied to the pos- through its contacts. Other parts
( ) a
itive terminal of K2. Diode D2 2x
1N4001
D2 of the circuit are not critical.
prevents the relay being ener- It stands to reason that the
gized. When the polarity at K1 ( ) circuit is not suitable for use
is reversed, the relay will be with a small battery, since the
energized via D2. The relay con- 984100 - 11
relay coil draws a fairly large
tacts then interchange the con- current.
nections to the terminals of K2 [984100]
013

mains phase indicator


1 L1 L2 L3
Design M. Hahn U zener diode D5 is reached,
The three voltages of a three- whereupon thyristor Th1 comes
phase supply, L1, L2 and L3 (or on and D7 (green) lights. The
R, G and B) are 120 out of t potential at A then drops to a
0
phase with one anothersee level equal to the sum of the
Figure 1a. When, for instance, breakdown voltage of Th1 and
the positive half-wave of L1 the drop across D7.
(pin 1) begins, the instantaneous When a positive half-wave
value of L2 (pin 2) is still nega- appears at pin 2, the potential at
tive. The positive half-wave of t1 t2 t3
984064 - 13
B can be higher only by the
(0) (120) (240)
L2 starts 120 later and cuts the diode voltage of D4 than that at
waveform of L1 at a level of A and this cannot be as high as
about half the peak voltage at 2 K1 the zener voltage of D6. Instead,
150. At 180 L1 becomes neg- L1 (1)
diode D7 draws current from ter-
ative; at 270, L2. minal 2 in the time interval
When two connections are L2 (2) between 150 and 270. Thyris-
F1 F2
interchanged as in Figure 1b, tor Th1 is cut off at 270 when
the positive half-wave of L1 N L2 drops below zero and the
100mA T 100mA T
appears first at pin 2 and then hold current of the thyristor
that of L2 at pin 1. This always R1 R2 ceases.
happens when connections are When, however, both termi-
15k

15k

interchanged. It is, therefore, 5W 5W


nals are interchanged, Th2 is
necessary only to establish in D1 D2 triggered first and draws current
what order the half-waves arrive B from terminal 1 at 150, so that
4x
at two given terminals to deter- 1N4007 only the red LED (D8) can light.
D3 D4
mine the phase. The third con- The 20 ms interval between
nection is not needed. D5 A D6
270 and 360 cannot be dis-
This requirement is met by A TH1
cerned by the human eye.
TH2 A
the circuit in Figure 2. It uses 39V 500mW 39V 500mW Since the circuit operates
2x
a pair of thyristors, which are G K BRX49 K G with and from the mains supply,
arranged so that the first one to appropriate safety measures
be triggered cuts off the other. It green D7 D8 red
must be observed during the
should be noted that the circuit is construction. It is imperative
completely symmetrical. Diodes 984064 - 11 that the enclosure is strapped to
D1 and D2 ensure that only pos- the mains earth. Plugs and sock-
itive half-waves are taken into ets used must, of course, be of
account. The current is limited Y B the appropriate standard, and
by R1 and R2. The two phases cable inlets must be provided
are combined by D3 and D4. with a strain relief. Do not use
The higher of the two positive inferior materials!
voltages is always at A, and its R B R Y [984064]
phase is between 0 and 270.
The potential at A rises until the
breakdown voltage (39 V) of 984064 - 12

Elektor Electronics 12/98 63


014
mains splitter
for AF power amps
K2
F1

K1

K3
F2

984026 - 11

In many home-brew AF power culprit (although that may be


amplifiers, including quite a few easy to find out by sniffing 1-620489 984026-1

built according to the noble art around or looking for smoke sig- H2
OUT1 H3

of high-end audio amplifier con- nals).


K2
F1
struction, the primaries of the The small circuit board shown K1
mains transformers are simply here allows the mains input volt-
connected in parallel and pro- age to be distributed in a safe
tected by a single, large, fuse. manner to two loads, each with 984026-1

There may be one, hefty, trans- its own (properly rated) fuse.
former inside the case, or two, Because the circuit does not
each powering a monoblock, or include an earth line, it may not
K3

F2
even three, where a smaller one be used as an external unit, that
H4

H1 OUT2

is used to power an ancillary cir- is, outside an earthed enclosure.


cuit like a protection circuit. For essential notes on electrical
Using a single fuse to protect the safety with mains-operated cir-
lot is undesirable because this cuits like this one, please review
fuse has to be rated for the rush- the Safety Guidelines page COMPONENTS LIST mount, with cap
in current of the large transform- which appears occasionally in Two fuses, ratings as required
ers. Moreover, when the fuse Elektor Electronics. A copy of K1,K2,K3 = 2-way PCB termi- by application
burns out you never know which this page may be obtained from nal block, pin distance PCB (not available ready-
7.5mm made)
monoblock, or indeed which the Publishers.
F1,F2 = fuseholder, PCB
other part of the amplifier, is the (984026-1, Gb)
015

modified humidity control


Design: H. Bonekamp a b c switches on the mains when the
The Type NH-3 humidity sensor IC1 LDR is in darkness. When the
3
used in the automatic air two components are inter-
100k

100k

humidifier (July/August 1998) Rh


changed, the circuit switches
may be replaced by a light- 2
the mains on when the LDR is
dependent resistor, LDR, or a Rt
LDR NTC
exposed to light.
resistor with negative tempera- - 100k In network (c), the fixed
1 NH-3 B57164k104k
ture coefficient, NTCsee dia- 100k
Siemens resistor should also have the
gram. There are other devices as same value as that with an NTC
well: the main requirement is (at 20 C). This network is suit-
that they can be driven by an 984095 - 11 able for use as thermostat in a
alternating voltage, that is, that greenhouse. When the tempera-
they are non-polarized. resistor whose resistance should In the diagram (b), the network ture in there drops below a value
An LDR is usually con- be equal to that of the LDR is connected as a twilight set with P1, the network
nected in series with a fixed when it is not exposed to light. switch, that is, the circuit switches on a heater. [984095]

64 Elektor Electronics 12/98


017 car immobilizer
Design M. Lawton
A starter motor immobilizer is
an effective (but not certain)
means of protecting your car
against theft. It has the draw-
back that a would-be thief will
try to render it inoperative and
in the process damages your car.
The present circuit is a simple
version of car immobilizer and
tends to confuse the thief. This
is because the car appears to
function normally, but it does
not start. Has it broken down or
is there some sort of protection
circuit active?
The circuit does not need
additional controls, indicators,
switches or keypads to be fitted
in the car. The setup is invisi-
ble. The only external sensor is

Parts list
Resistors: 12V
R1 = 10 k 12V
R2 = 1 k +12V D8 9 / 35mA

R3 = 470 k IC1 = 4093 R7

R4 = 330 k 1N4001

470
D9 14
C4 C5
C3
R5 = 33 k IC1
R4

R6, R8, R9 = 4.7 k 330k


100 7 R5 D6
100n 15V
R7 = 470 25V 10
33k

63V

Capacitors:
IC1d IC1c T1
C1, C2, C4 = 0.1 F I D1 IC1a 12 8 R6
1 11 10
C3 = 10 F, 63 V, radial 3 13 & 9 & 4k7
2 &
C5 = 100 F, 25 V 1N4001
R1 D2
C6 = 22 F, 16 V, radial C1
BC547B
12V
10k

Semiconductors: CS
100n 15V
D1, D3, D7, D8 = 1N4001
6 5 RE1
D2, D4, D9 = zener diode, D7
15 V, 400 mW IC1b
D5 = 1N4148 &
D6 = LED 4
1N4001 C
T1, T2 = BC547B D3 R3 D5 R9
T2
B
470k 4k7
Integrated circuits:
IC1 = 4093 1N4001 1N4148
R2 D4 R8
C6
BC547B
C2
1k

4k7

Miscellaneous:
PC1PC6 = PCB terminal 22
100n 15V 16V 984003 - 11
(pin)
Re1 = 12 V car-type relay,
1 change-over contact

D3 C3
D6
H1

T2 T1
R2
H2

C2 R7
R3
R4
R5

B
R6 D7
D4 C6
I D2
984003-1 C
R1 IC1
1-300489 984003-1
D1 ROTKELE )C( (C) ELEKTOR
0
C5
C1 D5
+12V D9 R9
R8

D8
H3

C5
H4

C4 RE1

66 Elektor Electronics 12/98


Visit our Web site at http://www.elektor-electronics.co.uk

the brake pedal. After the igni- When the ignition is When this time has elapsed, the D6 to flash when the starter is
tion has been switched on, the switched on, the circuit is pow- output of IC1a goes low, where- immobilized. This has the dis-
brake pedal has to be pressed ered by the voltage at terminal upon voltage is applied to the advantage, of course, that it dis-
for at least five seconds before PC2. Until the brake pedal is base of T2 via IC1b. When T2 is closes the protection circuit.
voltage is applied to the coil. pressed, the potential at termi- on, the relay is energized , Finding the right points to
Since the thief does not know nal PC1 remains low, so that the whereupon its contact changes which to connect the circuit
this, he/she will try everything to relay remains unenergized. over and voltage is applied to should not be a problem in most
get the car started. Since it is When the brake pedal is the coil. After the pressure on cars. The ignition voltage is nor-
only the coil to which voltage is pressed, capacitor C6 is charged the brake pedal is released, mally available at the radio/cas-
not applied, all other electrical via resistor R3. The time, t, it diode D5 ensures that the volt- sette terminals, while the poten-
functions will work normally, but takes for the capacitor to age remains applied. tial coupled to the brake pedal
it is just impossible to get the become fully charged is deter- Gates IC1c and IC1d form is usually available at the brake
car started. mined by network R8C6. an oscillator, which causes diode lights. [984003]
018

sine wave to TTL converter


+3V8
Design: G. Kleine R3 5V frequencies that could be
As the title implies, the present 470 processed by the prototype were
circuit is intended to convert R4 R1
10mA around 100 kHz at an input
sinusoidal input signals to TTL C3 C2 C1 level of 100 mV, and about
1k

330

output signals. It can handle 100n 10 100n


10 kHz when the input signals
inputs of more than 100 mV and were TTL level.
is suitable for use at frequencies Resistor R6 holds the input
resistance at about 50 , which
+2V3
up to about 80 MHz. TTL

Transistor T1, configured in 100kHz...80MHz is the normal value in measure-


T1
a common-emitter circuit, is 100mV...2V
C4 ment techniques. It ensures that
biased by voltage divider R3R5 the effects of long coaxial cables
such that the potential across 50
10n
BFR93A on the signal are negligible.
output resistor R1 is about half +0V5 If the converter is used in a
the supply voltage. When the circuit with ample limits, R6
R6 R5 R2
circuit is driven by a signal C5 may be omitted, whereupon the
56

470

56

whose amplitude is between input resistance rises to 300 .


10n
100 mV and TTL level (about [984120]
2 V r.m.s.), the circuit generates
984120 - 11
rectangular signals. The lowest
019

input impedance C3 C4
5V

booster 10
10V
100n

IC1
Design: H. Bonekamp op amp IC1. If no other actions 2
1
7
The input impedance of were taken, the input impedance 5
6
C1
a.c.-coupled op amp circuits would be about 20 M. How- 3
depends almost entirely on the ever, part of the input signal is 100p 4
8
resistance that sets the d.c. fed back in phase, so that the
10M

R1

operating point. If CMOS alternating current through R1 is TLC271


C2
op amps are used, the input is smaller. The input impedance, R3
100k
high, in current op amps up to Zin, is then: 1
10 M.
10M

R2

If a higher value is needed, a Zin=(R2+R3)/R3)(R1+R2).


bootstrap may be used, which
enables the input impedance to With component values as spec- C5 C6
be boosted artificially to a very ified, Zin has a value of about
10 100n
high value. 1 G. 10V
In the diagram, resistors R1 The circuit draws a current 5V
984097 - 11
plus R2 form the resistance that of about 3 mA.
sets the d.c. operating point for [984097]

Elektor Electronics 12/98 67


020 1-watt BTL audio amplifier
Source: Philips Semiconductors 5V
Preliminary Specification
The TDA8581(T) from Philips C3 C4 VP
UP
Semiconductors is a 1-watt 100n 220
VOLUME
Bridge Tied Load (BTL) audio CONTROL
25V

power amplifier capable of deliv- UP/DOWN VP


ering 1 watt output power into an DOWN
1 6
8- load at THD (total harmonic
C1 VP
distortion) of 10% and using a 5- IN
4 VOLUME
V power supply. The schematic 330n CONTROL 8
OUT+

shown here combines the func- VP

tional diagram of the TDA8551


with its typical application cir- TDA 20k

cuit. The gain of the amplifier 8551 LS1

can be set by the digital volume

15k

5k
control input. At the highest vol-
SVR
ume setting, the gain is 20 dB. 3 R
8
Using the MODE pin the device

15k
C2
can be switched to one of three R

modes: standby (MODE level 100


between Vp and Vp0.5 V), STANDBY/
5
muted (MODE level between 5V MUTE/ OUT
OPERATING/
1 V and Vp1.4 V) or normal
(MODE level less than 0.5 V). STAND-BY 2 7
The TDA8551 is protected by an MODE GND
internal thermal shutdown pro- MUTE
tection mechanism.
OPERATING
The total voltage loss for both
MOS transistors in the comple-
mentary output stage is less than 984092 - 11
1 V. Using a 5-V supply and an
8- loudspeaker, an output
power of 1 watt can be deliv- to 40 dB (low volume), so the
ered. gain of the total amplifier is then
The volume control has an 20 dB. Some positive pulses
attenuation range of between have to be applied to the
0 dB and 80 dB in 64 steps set UP/DOWN pin to achieve lis-
by the 3-state level at the tening volume. The graph shows
UP/DOWN pin: floating: vol- the THD as a function of output
ume remains unchanged; nega- power. The maximum quiescent
tive pulses: decrease volume; current consumption of the
positive pulses: increase volume amplifier is specified at 10 mA,
Each pulse at he Up/DOWN pin to which should be added the
causes a change in gain of 80/64 current resulting from the output
= 1.25 dB (typical value). offset voltage divided by the
When the supply voltage is first load impedance.
connected, the attenuator is set (984092-1, Gb)
021

simple electrification unit


From an idea by P. Lay quency) is determined by the tangular signal into narrow The output of IC1b is linked
The circuit is intended for car- time constant of network R1-C3 pulses. Differentiating network directly to the gate of thyristor
rying out harmless experiments in the feedback loop of op amp R2-C4, in conjunction with the THR1, so that this device is trig-
with high-voltage pulses and IC1a: with values as specified, it switching threshold of the gered by the pulses.
functions in a similar way as an is about 0.5 Hz. Schmitt trigger inputs of IC1b, The requisite high voltage is
electrified fence generator. The The stage following the determines the pulse period, generated with the aid of a small
p.r.f. (pulse repetition fre- op amp, IC1b, converts the rec- which here is about 1.5 ms. mains transformer, whose sec-

68 Elektor Electronics 12/98


Visit our Web site at http://www.elektor-electronics.co.uk

ondary winding is here used as 12V R3


TR1 reverse-biased, so that the cur-
the primary. This winding, in 12k rent loop to the transformer is
conjunction with C2, forms a broken, whereupon the capacitor
14
resonant circuit. IC1
is charged to 12 V again via R3.
Capacitor C3 is charged to 7
9V At the next pulse from IC1b,
1VA5
the supply voltage (12 V) via R2 this process repeats itself.
R3.When a pulse output by IC1b C2 Since the transformer after

22k
triggers the thyristor, the capac- 22
each discharge of the capacitor
itor is discharged via the sec- R1 25V at its primary induces not only a
ondary winding. The energy 10M primary, but also a secondary
THR1 D1
stored in the capacitor is, how- A
voltage, each triggering of the
IC1a IC1b
ever, not lost, but is stored in the C1 1 C4 5 thyristor causes two closely
3 4 G
magnetic field produced by the 2 & 6 & K 1N4148 spaced voltage pulses of oppo-
100 BRX46
transformer when current flows 25V
100n site polarity. These induced volt-
through it. 10 IC1c 11 IC1d ages at the secondary, that is,
When the capacitor is dis- C3
& & the 230 V, winding, of the trans-
charged, the current ceases, 470n former are, owing to the higher
whereupon the magnetic field 8 9 12 13 turns ratio, much higher than
collapses. This induces a those at the primary side and
IC1 = 4093 984099 - 11
counter e.m.f. in the transformer may reach several hundred
winding which opposes the volt- volts. However, since the energy
age earlier applied to the trans- stored in capacitor C2 is rela-
former. This means that the tively small (the current drain is
direction of the current remains the transformer has returned the ing of the transformer. As soon as only about 2 mA), the output
the same. However, capacitor C2 stored energy to the capacitor, the capacitor begins to be dis- voltage cannot harm man or ani-
is now charged in the opposite the direction of the current charged, there is no current mal. It is sufficient, however, to
sense, so that the potential reverses, and the negatively through the thyristor, which cause a clearly discernible mus-
across it is negative. charged capacitor is discharged therefore switches off. When C2 cle convulsion.
When the magnetic field of via D1 and the secondary wind- is discharged further, diode D1 is [984099]
022

balanced amplifier for


photo-diode
Design: H. Bonekamp
R1
A photo-diode is a p-n diode 1M
whose reverse current depends R4
on the amount of light falling on 6 100k
its junction. The reverse current 7
R3
IC1b 100k
is greatly dependent on the tem- 5
13
perature since heat can liberate D1
14
more covalent bonds. As light IC1d
12
10
can also do this, the diode can R5
8
be housed in a transparent case. BPW34 IC1c 100k
9 R6
When a photo-diode is
82k

located at some distance from R2


the associated electronic cir- 1M
15V
cuits, noise may be picked up in P1
C1 C2 47k
the connecting cable, even when
this is screened. Such noise can, 10 100n
11 25V
fortunately, be suppressed eas-
IC1 2
ily, provided it is common mode,
4 1
that is, when the diode is not C3 C4
3
IC1a
connected to earth (floats).
10 100n
A differential amplifier 25V IC1 = TL084
15V
enables a feedback signal to be 984096 - 11

amplified, but does not respond


to common-mode signals. In the
diagram, the differential ampli- The output voltage, Uo, of Uo=(R1+R2) ID, nullified with P1 so as to achieve
fier consists of two op amps, the differential amplifier is optimum CMR. A Common
IC1b and IC1c, which convert where ID is the diode current. Mode Rejection Ratio, CMRR, of
the diode current into a voltage. Uo=(Uin1Uin2) R4/R3. The Common Mode Rejec- >60 dB is obtained when the
The current-to-voltage conver- tion, CMR, depends on the specified op amps are linked to
sion depends on R1 and R2, so When R3=R5=R4=R6+P1, equality of the resistors as stipu- the photo-diode by a twisted pair.
that gain setting in amplifier the amplification is unity. In that lated earlier. Their tolerances, The circuit draws a current
IC1d is not necessary. case, and those of R1 and R2, can be of about 10 mA. [984096]

Elektor Electronics 12/98 69


023
A-D converter for
MatchBox BASIC computer
Design: K. Walraven R1
CH0
1k
In their book MatchBox BASIC K1 R2
C7
Computer [1] the authors

10k
describe a way of connecting a
100n 5V
12-bit analogue-to-digital con-
verter (ADC) Type MAX187 to R3
CH1
the small computer board origi- 1k
R4 L1
nally described in Elektor Elec- C8

10k
tronics magazine. 100H
For the present article the 100n

MAX186 is employed, which is a


R5
similar converter with eight ana- 1k
CH2
C2 D1
K2 C1 C3
logue inputs instead of just one. C9
R6

The connection with the com-

10k
100n 10 100n
63V 1N4148
puter board is made via a length 100n 5V
of 10-way flatcable. Although 20
K6
K4 would appear to be the right R7
CH3
10 9

connector for this link, K1 was 1k


R8
CH0 1
CH0 DIN
17 DIN 8 7

eventually chosen because bit C10 CH1 2


CH1 DOUT
15 DOUT 6 5
10k

CH2 3 16 SSTRB 4 3
operations are not possible on CH2 IC1 SSTRB
100n CH3 4 2 1
port P2. A disadvantage of using CH4 5
CH3
MAX186
K1 is, however, that the 1-way R9 CH5 6
CH4
18 CSAD
CH5 CS
cable has to be connected to a K3 1k
CH4
CH6 7 19 SCLK
R10 CH6 SCLK
20-way pinheader. Note that the C11 CH7 8
CH7
10k

11
converter may, in principle, be VREF

connected to any port as long as 100n 10


SHDN REFADJ
12

the supply voltage is at the right DGND VSS AGND


R11
pins. CH5 14 9 13 C4 C5 C6
1k
The inputs of the present cir- R12
C12 10n 47 100n
cuit are fitted with overvoltage
10k

63V
protection resistors (R1, R3, 100n
etc.) as well as pull-up resistors
(R2, R4 etc.). Consequently, R13 5V
CH6
inputs which are left 'open' are K4 1k
R14 R17
still held at a defined level, C13
10k

100
K5
while additional ESD (electro-
static discharge) protection is 100n
C15 C16

R15 100n 10
CH7 63V
1k
COMPONENTS LIST C14
R16
10k

Resistors:
100n
R1, R3, R5, R7, R9, R11, R13, 984093 - 11
R15 = 1k
R2, R4, R6, R8, R10, R12, R14,
R16 = 10k
R17 = 100 R17
H1

H2

K5 C15 K6
Capacitors:
C1, C3, C6C15 = 0.1 F C7
C2, C16 = 10 F, 63 V, radial R2 C16
L1

C4 = 0.01 F R1
R3
C5 = 4 F, 63 V, radial R4
C8 C3
K1
Inductor: C9
L1 = 100 H R6
R5
C1
R7
Semiconductors: R8
D1 = 1N4148 K2 C10 C2
K3 C11
R10
D1

Integrated circuits: R9
IC1 = MAX186DCPP or R11 C4
MAX186BEPP R12
C12
C13 IC1 C6
Miscellaneous: R14
R13 984093-1
K1K5 = 2-way PCB terminal 1-390489
C5
984093-1
K4 R15
block R16 ROTKELE )C( (C) ELEKTOR
K6 = 10-way box header
H3

H4

C14

70 Elektor Electronics 12/98


Visit our Web site at http://www.elektor-electronics.co.uk

READ_AD: provided. Note that the resistors


cause a certain amount of atten-
; This subroutine reads the MAX186 12-bit A-D converter. uation if an input voltage is
; Before calling this routine the code for the desired
applied. The resistor values
have been selected such that an
; channel has to loaded into integer variabele TEMP, external temperature sensor with
; as follows: an output of 1 A C1 (for
; TEMP:=1XYZ1110B where XYZ indicates the desired channel. instance, AD590 or LM334)
; The conversion result is then returned in TEMP. provides the desired voltage gra-
; dient of 10 mV C1.
; MAX187 connections: An example of a control pro-
; Data to 187 P1.0 gram for the converter is listed
; Serial clock P1.1 here. The converter receives
; Data from 187 P1.2 eight databits; bit 7 is the start-
; Chip select P1.3
bit, while bits 4, 5 and 6 indi-
cate which input is being
; Strobe P1.4 selected. Bit 3 is used to signal
; that the measurement is to take
place between ground and VREF,
INIT_AD: while bit 2 tells the converter to
P1.0:=0 ;data in perform a single-ended (i.e.,
P1.1:=0 ;clock non-differential) measurement.
P1.3:=0 ;CS active Bits 1 and 0, finally, initiate an
A-D conversion based on the
WRITE_AD: internal clock. Next, the 12-bit
CNTR:=8 result can be read back.
A final remark: the channel
WHILE CNTR>0 DO ;send 8 bits of A-D command
selection bits are mixed up: bit
P1.0:=TEMP.7 ;msb bit to A-D 6 is the LSB, bit 5, the MSB,
TEMP:=TEMP SHL(1) ;hold next bit ready and bit 4, the middle bit.
P1.1:=1 ;clock-in data on pos. edge The circuit draws a current
P1.1:=0 not greater than 2 mA. The
CNTR:=CNTR-1 printed circuit board shown here
WHEND is not available ready-made. For
more information on the
READ_AD: MAX186, visit Maxim's Internet
TEMP:=0 ;store result in this variable site at www.maxim-ic.com.
CNTR:=12
P1.0:=0 ;read zeroes (else conversion starts) Reference:
WHILE CNTR>0 DO ;fetch 12 bit data [1]. MatchBox BASIC Computer,
P1.1:=1 ;supply clock pulse by K.H. Dietsche and M. Ohs-
P1.1:=0 ;data valid after neg. edge mann, Elektor Electronics (Pub-
TEMP:=(TEMP SHL 1)+P1.2 ;read data lishing), ISBN 0-905705-53-X.
CNTR:=CNTR-1
WHEND
P1.3:=1 ;CS, turn off A-D
RETURN [984093]
024

ten-band equalizer
Design: P. Staugaard the equalizer are set with S1 and for the lowest frequency band is The Q(uality) factor of the
The equalizer presented in this S3. The audio frequency spec- an active one to avoid a very filters can, in principle, be
article is suitable for use with trum of 31 Hz to 16 kHz is large value of inductance. It is raised slightly by increasing the
hi-fi installations, public- divided into ten bands. based in a traditional manner on value of R19 and R23, as well as
address systems. mixers and Ten bands require ten filters, op amp A1. that of P1P10, but that would
electronic musical instruments. of which nine are passive and The inductors used in the be at the expense of the noise
The relay contacts at the one active. The passive filters passive filters are readily avail- level of op amp IC1.
inputs and outputs, in conjunc- are identical in design and dif- able small chokes. The filter With component values as
tion with S2, enable the desired fer only in the value of the rele- based on L1 and L2 operates at specified, the control range is
channel to be selected. The vant inductors and capacitors. about the lowest frequency about 11 dB, which in most
input may be linked directly to The requisite characteristics of (62 Hz) that can be achieved case will be fine. A much larger
the output, if wanted. The input the filters are achieved by series with standard, passive compo- range is not attainable without
impedance and amplification of and parallel networks. The filter nents. major redesign.

Elektor Electronics 12/98 71


S2 15V
L1 L5 L9 L13 L17

1H5 680mH 100mH 47mH 10mH

L2 L6 L10 L14 L18 C35 C36

1H 0 68mH 0 0 100n 10
25V
K2
K1
IC2 = OP275 C3 C4 C7 C8 C11 C12 C15 C16 C37 C38 S
S
22 470n 470n 120n 150n 33n 680p 10n
R11
* * C2
2k43 R2 R4 R6 R8 R21
C28 C33
22
6
*
IC1 R17 1
R23 8 1k21
7 3 7
IC2b 2k43
5 R18
5 6
31Hz 125Hz 500Hz 2kHz 8kHz OP27 1k21
2
C29 P2 P4 P6 P8 P10 C39
22 4k7 4k7 4k7 4k7 4k7 4 22
R14 R10 P1 P3 P5 P7 P9
4k7 lin 4k7 lin 4k7 lin 4k7 lin 4k7 lin
lin lin lin lin lin
P11 62Hz 250Hz 1kHz 4kHz 16kHz
R25 R13 R19 R1
C31
2k74
R3 R5 R7 R9
S1
10k
S3 C19 C20 C21 C22 *
22 22 470n
* C1 C34
C5 C6 C9 C10 C13 C14 C17 C18
15V +15V C23 C24 R20
100n 10
C26 C25
1 220n 150n 150n 47n 33n 18n
* 25V * not used
820n 47n
100n 10 L4 L8 L12 L16 * niet gebruikt
8 25V 3

IC2
R22
IC2a
1
330mH 0 0 0 15V * nicht gebraucht
4
2
* inutilis
C27 C30 L3 L9 L11 L15

100n 10 1H 330mH 82mH 22mH


25V
15V 984118 - 11
15V

The input level can be in the output amplifiers. OP27 or NE5534; and for IC 2, ered by a regulated, symmetri-
adjusted with P1, which may be Several types of op amp can AD712, LM833 and NE5532. If cal 15 V supply. It draws a cur-
necessary for adjusting the bal- be used:in the prototype, IC1 is an NE5534 is used for IC1, C2 is rent of not more than about
ance between the channels or an LT1007, and IC2, an OP275. needed; in all other cases, not. 1 0m A .
when a loudness control is used Other suitable types for IC1 are The circuit needs to be pow- [984118]

lead-acid-battery regulator
for solar panel systems
The design of solar panel sys-
tems with a (lead-acid) buffer
battery is normally such that the
battery is charged even when
there is not much sunshine. This
means, however, that when there
is plenty of sunshine, a regulator
is needed to prevent the battery
from being overcharged. Such
controls usually arrange for the
superfluous energy to be dissi-
pated in a shunt resistance or
simply for the solar panels to be
short-circuited. It is, of course,
an unsatisfactory situation when
the energy derived from a very
expensive system can, after all ,
not be used to the full.
The circuit presented diverts
the energy from the solar panel
when the battery is fully charged
to another user, for instance, a
12 V ice box with Peltier ele-
ments, a pump for drawing water
from a rain butt, or a 12 V ven-
tilator. It is, of course, also pos-
sible to arrange for a second bat-
tery to be charged by the super-
fluous energy. In this case,
however, care must be taken to power field effect transistor might reach 25 W, which would the output of the comparator is
ensure that when the second (FET), T1. The disconnect point make a heat sink unavoidable. high, so that the load across T1
battery is also fully charged, is not affected by large temper- Setting up of the circuit is is briefly switched in.
there is also a control to divert ature fluctuations because of a fairly simple. Start by turning P1 In case T1 has to switch in
the superfluous energy. reference voltage provided by so that its wiper is connected to low-resistance loads, the BUZ11
The shunt resistance needed IC1. The necessary comparator R5. When the battery reaches may be replaced by an IRF44,
to dissipate the superfluous is IC2, which owing to R9 has a the voltage at which it will be which can handle twice as much
energy must be capable of small hysteresis voltage of 0.5 V. switched off, that is, power (150 W) and has an on-
absorbing the total power of the Capacitor C5 ensures a rela- 13.814.4 V, adjust P1 slowly resistance of only 24 m.
panel, that is, in case of a tively slow switching process, until the output of comparator Because of the very high
100 W panel, its rating must be although the FET is already IC2 changes from low to high, currents if the battery were
also 100 W. This means a cur- reacting slowly owing to C4. The which causes the load across T1 short-circuited, it is advisable to
rent of some 68 A when the gradual switching prevents spu- to be switched in. insert a suitable fuse in the line
operating voltage is 12 V. When rious radiation caused by steep Potentiometer P1 is best a to the regulator.
the voltage drops below the edges of the switched voltage 10-turn model. When the con- The circuit draws a current
maximum charging voltage of and also limits the starting cur- trol is switched on for the first of only 2 mA in the quiescent
14.4 V owing to reduced sun- rent of a motor (of a possible time, it takes about 2 seconds state and not more than 10 mA
shine, the shunt resistance is ventilator). Finally, it prevents for the electrolytic capacitors to when T1 is on.
disconnected by an n-channel switching losses in the FET that be charged. During this time, [Zeiller 984072]

mains pulser

Design: G. Kleine rectifier, and regulator IC1 pro- est. In the latter case, the 10 F The timer IC switches a
The pulser is intended to switch vide a stable 12 V supply rail for capacitor at pins 2 and 6 of the relay whose double-pole con-
the mains voltage on and off at IC2 and the relay. The timer is timer IC determines the time tacts switch the mains voltage.
intervals between just under a arranged so that the period- with the relevant resistors. The The LEDs indicate whether
second and up to 10 minutes. determining capacitor can be value of this capacitor may be the mains voltage is switched
This is useful, for instance, charged and discharged inde- chosen slightly lower. through (red) or not (green).
when a mains-operated equip- pendently. Four time ranges can The two preset potentiome- The 100 mA slow fuse pro-
ment is to be tested for long be selected by selecting capac- ters enable the on and off peri- tects the mains transformer and
periods, or for periodic switch- itors with the aid of jumpers. ods to be set. The 1 k resistor low-voltage circuit. The 4 A
ing of machinery. Short-circuiting positions 1 and in series with one of the presets medium slow fuse protects the
Transformer Tr1, the bridge 2 gives the longest time, and determines the minimum dis- relay against overload.
short-circuiting none the short- charge time. [984122]
027 XS symmetrical supply
This extra-small (XS) symmetri- the regulator input-voltage to a
cal supply is useful in those safe level.
cases where a symmetrical Although the Hahn transformers
power supply is required with an suggested in the parts list have
output capacity of just a few mil- the same footprint as the Mona-
liamps. The example circuit cor/Monarch types, the 3.2-VA
shows a 15-V supply capable type is taller. If this particular
of delivering a continuous out- transformer is used, the contin-
put current of about 25 mA, or uous output current capacity of
100 mA peak. By using other the supply rises to about 55 mA,
transformers and/or voltage reg- provided C1 and C2 are
ulators, the supply can be increased to, say, 100 F/25V.
dimensioned for output voltages Note, however, that you may
of 5 V, 9 V, 12 V, 15 V, have to reduce the no-load sec-
18V and 24 V. For the latter ondary voltage as described
two voltages, however, the nega- above. The printed-circuit board
tive-voltage regulator may be shown here is, unfortunately, not
hard to obtain. Thanks to its Tr1 available ready-made from the
modest size, the XS symmetrical K1
Publishers.
supply is easily incorporated IC1 (984081-1, Gb)
into existing equipment. 78L15 15V
A disadvantage of small (low- B1
VA) mains transformers as used
for this supply is that they often C1 C3
supply relatively high no-load
47 40V 47 63V COMPONENTS LIST
secondary voltages. Under no- 2x 15V
1VA5 B80C1500
load conditions, the indicated
Monacor/Monarch transformer, Capacitors:
C2 C4
for example, supplies no less C1,C2 = 47F 40V radial
47 40V 47 63V C3,C4 = 4F7 63V radial
than 32 V to the regulator inputs
(measured at a mains voltage of Semiconductors:
230 V). In some cases, the no- IC1 = 78L15 (see text)
load secondary voltage may 79L15 15V IC2 = 79L15 (see text)
exceed the maximum permissi- IC2 984081 - 11 B1 = B80C1500, straight case
ble input voltage of the low- (80V piv, 1.5A cont.)
power voltage regulator. Typi-
cally this will be 30 V for 5-V - 0 + Miscellaneous:
C2 C4

C1 C3

IC2 IC1
regulators, 35 V for 12-V and K1 = 2-way PCB terminal
15-V types, and 40 V for 18-V block, raster 7.5mm
B1

and 24-V types. When the no- Tr1 = mains transformer, see
load voltage can be expected to text.
approach the absolute maximum H9
Examples :
2x15V 1.5VA: type VTR1215
level specified for the voltage 1-180489 984081-1
984081-1

ROTKELE )C( (Monacor/Monarch) or type


regulator, you should connect
TR1

(C) ELEKTOR
BV EI 302 2028 (Hahn)
shunt resistors (bleeders) across 2x15V 3.2VA: type BV EI 306
the transformer secondaries. 2078 (Hahn)
Keep the value of these resistors Note: Monacor/Monarch and
as high as possible to avoid Hahn transformers are sup-
unnecessary dissipation. In most ~ ~ plied by C-I Electronics and
K1

H5

H6

cases, a bleeder current of a few Stippler Electronics


mA is already sufficient to drop
028

speech eroder
Design: T. Giesberts erally very good, irrespective of amateur stage production, or yesteryear.
Nowadays, the speech quality distance. However, there are just for fun, when it is desired to The eroder circuit accepts an
on our telephone systems is gen- occasions, for instance, in an reproduce the speech quality of acoustic (via an electret micro-

74 Elektor Electronics 12/98


Visit our Web site at http://www.elektor-electronics.co.uk

R5 9V and P4.
4k7
Although, strictly speaking,
R3
P3 serves merely to adjust the
C9 volume of the signal, its setting

220k
P3
C2 47k
R7
100
does affect the filter character-

18k
lin.
10V istic. Note, by the way, that the
R6
10n filter is a rarely encountered

4k7
R10
P2
2k2
current-driven one in which C3
2 220k
T2
P5
and C4 are the frequency-deter-
R2
100k mining elements. It has a certain
22k

C3
IC1 K1 similarity with a Wien bridge.
T1
68n 3 7 Transistors T3 and T4, and
R1 6
C6 C7 C8 resistors R8 and P4 form a vari-
T3 741 able current sink.
470

2
470n 150n 47n
4 The position of P4 deter-
T4 mines the slope of the filter
P1 characteristic and the degree of
5k
R4 R8 R9 R11 R12 R13 overshoot at the cut-off fre-
C1
quency.
47k

1k

2k2

1k

3k3

15k
220n
The low-pass filter is fol-
C4 C5
lowed by an integrated amplifier,
1 P4 IC1, whose amplification is
10k
22n
lin.
220n matched to the input of the elec-
tronic circuits connected to the
T1 ... T4 = BC550C 984105 - 11
eroder with P5.
The final passive, third-order
high-pass filter is designed to
remove frequencies above about
phone) or electrical signal. The The signals are brought to level of the combined signals is 300 Hz.
signals are applied to the circuit (about) the same level by vari- raised by this preamplifier. The resulting output is of a
inputs via C1 and C2, which able potential dividers P1-R1-R4 The preamplifier is followed typical nasal character, just as in
block any direct voltage. The and P2-R2-R3, and then applied by an active low-pass filter con- telephones of the past.
input cables should be screened. to the base of transistor T1. The sisting of T2T4, C3, C4, R6R8, [984105]
029

thrifty light-controlled switch


ment. The SFH309-4 is a pho-
totransistor from Siemens, its
pin connection is included in
the circuit diagram. In this
application, the SFH309 draws
only a few tens of A. At a cer-
tain ambient light intensity
level, the voltage at the input of
gate IC1f drops below the
switching threshold of the
Schmitt trigger, and the output
consequently toggles to logic
high. This level is again inverted
by the five remaining gates in
the 106 which are connected in
parallel to boost their output
drive capacity. The effect of
stray light picked up from
remote controls and other infra-
red transmitters is suppressed to
some extent by R1-C1. If inter-
This circuit shows that only a COMPONENTS LIST Semiconductors: ference is still a problem, then
handful of parts is needed to T1 = SFH309-4 (Siemens, C1 may be increased a little.
make a light-controlled switch Resistor: ElectroValue) The ambient light intensity at
with a digital power buffer out- R1 = 10M IC1 = 40106 which the output changes state
P1 = 1M preset H
put capable of switching up to is adjusted to individual
Miscellaneous:
25 milliamps. The circuit is Capacitors: PCB, not available ready-
requirements with preset P1.
intended mainly for use in low- C1,C2 = 100nF made The supply voltage should be
power battery-powered equip- reasonably clean and not exceed

Elektor Electronics 12/98 75


16V max IC1a R11P1
-030489 984030-1
1 2

H1
1
T1 C1

14
IC1b + +
C2
3 4
IC1 1 984030-1
IC1
SFH309-4 100n 7
T1 IC1c
- C2 -
5 6
1

IC1f IC1d
SFH309-4 R1 16 volts d.c. The circuit is best and about 20A when light is
13 12 9 8
10M 1 1
built on the miniature printed detected (at a 9-V supply and
C
E
P1 IC1e
circuit board shown here. When with P1 set to mid-travel).
C1
11 10
fitting the phototransistor, make Finally, the switching function of
1 sure it is connected the right the circuit may be reversed by
100n
1M way around the shorter pin is exchanging P1 and T1, and con-
the collector. necting R1 to the collector.
984030 - 11
Current consumption of the (984030-1, Gb)
IC1 = 40106
circuit is 1 to 2A in the dark,
030

light from flat batteries


Button or coin cells that appear 0V6...3V The present circuit uses a
to be flat in their normal func- L1
multivibrator of discrete design
R1 R2 R3 18mA @ 1V
tion may yet be discharged fur- D1 that oscillates at about 14 kHz.
330
10k

10k

ther. This is because in many The collector resistor of one of


cases, for instance, a quartz 0mH47
the transistors has been
watch stops to function correctly replaced by a fixed inductor,
when the battery voltage drops C1 C2 C4
1V5 which is shunted by the LED.
to 1.2 V, although it can be dis- Because of the self-inductance,
C3
charged to 0.8 V. 22n 22n 220n
the voltage across the LED is
Normally, however, not much T1
22n
T2 raised, so that the diode lights
can be done with a single cell. dimly at voltages as low as 0.6 V
In the present circuit, a super- and becomes bright at voltages
2x BC337
bright LED is made to work from about 0.8 V up.
from voltages between 1 V and The circuit requires a supply
984077 - 11
1.2 V. This may be used for voltage of 0.63 V and draws a
map-reading lights, a keyhole current of about 18 mA at 1 V.
light, or warning light when jog- an emergency reading light or to Normally, LEDs light at volt- [Zeiller 984077]
ging in the dark. When a yellow, read a front door nameplate in ages under 1.5 V (red) or
superbright LED is used with a the dark or to find an non-illu- 1.62.2 V (other colours) only
fresh battery, it may be used as minated doorbell. dimly or not at all.
031

infra-red burglar alarm


Design G. Pradeep Type 555 timer circuit, which The receiver is rather more tor R1.
The alarm circuit uses infra-red generates 10 s wide pulses at a complex. The receive diode is The a.c.-coupled amplifier
light beams to bridge distances rate of 20 kHz. During the normally cut off, but comes on based on transistors T1T4 pro-
between 3 m and 5 m (10 ft to pulse, a current of about when it is exposed to infra-red vides an amplification of 200
16 ft), but if the transmit diode 100 mA flows through the trans- light. The more intense the at a frequency of 20 kHz.
is given a reflector, larger dis- mit diode. The average current infra-red light, the larger the The bandwidth of the
tances are possible. When the drawn by the transmitter is photo current. This means that receiver is purposely limited to
beam is interrupted, a buzzer about 12 mA, which will nor- the received pulses cause an enhance the stability of the cir-
sounds. mally preclude a battery-oper- alternating voltage across resis- cuit.
The transmitter is based on a ated supply. The pulses arriving from the

76 Elektor Electronics 12/98


9V
transmitter are intercepted by bistable to be reset, whereupon
R1
tone decoder IC1. Provided the the buzzer is switched off.
C1
pulse rate is correct, the output The receiver draws a current
of the decoder is logic low. This 470 of about 30 mA in the quiescent
16V
holds bistable IC3 in the reset R2 8 4 state, which rises to about
state, so that the buzzer remains 7 R 50 mA when the buzzer sounds.
DIS
unenergized. IC1 R3
T1 The relatively large currents
When the infra-red signal OUT
3

270 BD make battery operation uneco-
P1
fails (because the beam is bro- 6
THR
555 136 nomical; it is far better (and
2 TR R4
ken), the bistable is set, where- 50s
safer) to use an appropriate
CV
upon the buzzer is actuated. The 9V 5W mains adaptor.
1k 5 1
sounding of the buzzer cannot 0V
D1
[984084]
be interrupted with switch S1. C2
10s
2x
When, however, the beam is LD271
restored, pressing S1 causes the 2n7
D2

984084 - 11

G
R14 12V

470
R13
R5 R6 R10 S1 BZ1
D1 14
C10
IC2
BP104 T4 7 220
D2
16V
C D
C2 5V1
BC IC2 = 4001
500mW 4
4p7 T1 T3 557
C1
C6
3 IC2a
IN 1
1n IC1 3
A
T2 100n 8 2 1
BC OUT IC2b T5
B 547 2 5 R12
C2 4
R2 2x
1
567
5 6 1 2k7
BC549B E C3 R
R3 R9
RC
A 150k F BC547
7 6
C3 D 10V3

A 1V1 E 1V5
R1 33p
R4 R7 R8 R11
C11 C4 C5 C7 C8 C9 B 0V7 F 1V4

C 2V1 G 11V
10n 22n 100 1 1 4n7
16V

984084 - 12

latch uses 555


in memory mode
By G. Kleine on/off switch. The combination
The familiar Type 555 can be S1 (closed), R2 and R1 provides
used to switch currents up to half the supply voltage to the
200 mA. Less well-known is its input (pins 2, 6) of IC1. When
use as a latch with control input. S2 is closed, the output, pin 3,
When the input pins 2 (trigger) goes high so that D2 (on) lights.
and 6 (threshold) are linked and When S1 is opened, the input at
connected to half the supply pins 2, 6 of IC1 rises to above
voltage, the output can be 2/3 of the supply voltage, where-
switched as follows. When the upon IC1 is disabled and the
potential at pins 2 and 6 is output goes low. Diode D1 (off)
raised to full supply voltage then lights.
level, the output is switched to Network R3-C1 at the reset
ground. When pins 2 and 6 are input, pin 4, forces the latch to
linked to ground potential, the come up in the off state when
output assumes supply voltage power is first applied.
level. (Source: Electronic Design,
The circuit in the diagram November 6, 1995)
uses this mode of operation of [984126]
the 555 to realize a two-wire
033 low-cost function generator
Design: G.Baars results in an oscillator whose
Heres a function generator that output frequency is controlled
wont break the bank yet offers by potentiometer P1. The buffer
perfectly acceptable output supplies a rectangular output
waveforms for many applica- signal, the integrator, a triangular
tions in your workshop. The one. The rectangular signal is
generator supplies sinewave, further shaped and buffered by
rectangle and triangle wave- two more gates, IC1c and IC1d,
forms within the frequency before it is applied, via R8, to
range 1 kHz to about 15 kHz. one of the contacts of the wave-
The output level is adjustable form selection switch, S1. The
between 0 and about 10 Vpp. triangular signal is also applied
Though frugal, these specifica- to the switch, by way of R7. The
tions make the generator a useful triangular signal supplied by
piece of test equipment for IC1f is fed to a sinewave shaper
audio design, experimentation
and repair purposes. Since only
common-or-garden components IC1c IC1d U
R8
are used, the generator can be 5
1
9
1 22k
6 8
built at a modest outlay. R9 C7
Heres how it works. Inverter

100k
100n
gates IC1a and IC1b are con- S1 R12
C2
nected to resistors R2 and R3 to R7 47k
6k8
form a buffer with some hystere- R1 C8 1
7
22 3
sis. Another gate from the C4
15k

16V
6
4069U integrated circuit, IC1f, D1 D3 1
2
IC2
16V 5
acts as an integrator together 4
220
P1 D2 D4 16V
with R1, P1 and C1. The poten- 4x R10 R11
8
220k
tiometer, P1, defines the inte- 1N4148

100k

8k2
C1 TLC271
P2
R6
grators time-constant. A buffer 12k
acting as a comparator with hys- 2n2 C3
IC1f IC1e
teresis, together with the inte- R4 4k7 22 16V
13 11 10
grating effect provided by IC1f 1 22k 1
12

R3 R5 U
D5 12V
COMPONENTS LIST
22k

560k

IC1b IC1a IC1 = 4069U 1N4001


14
Resistors: 3 1
C6 C5

R1 = 15k 1 1 IC1
4 2
100n 7 220
R2,R12 = 47k R2 16V
R3,R4,R8 = 22k 47k
R5 = 560k 984004 - 11
R6 = 12k
R7 = 6k8
R9,R10 = 100k
R11 = 8k2 1-400489 P1
P1 = 220k linear poten- tnemgeS )C(
D1 D3 P2
H1

H2

S1 C8
tiometer
R10

0 D2 D4 C2
R9

P2 = 4k7 linear potentiome-


R7

C1 R6
OUT

C4
ter C7
R4
+ C5 C6
Capacitors:
R5

C1 = 2nF2 MKT (Siemens) IC1 IC2 T


R3
R8

C2,C3 = 22F 16V radial D5 C3


C4,C5 = 220F 16 V radial
H3

H4

984004-1 R1 R2
C6,C7 = 100nF Sibatit (minia- R11 R12
ture ceramic, Siemens)
C8 = 1F 16 V radial

Semiconductors:
D1-D4 = 1N4148
D5 = 1N4001
IC1 = 4069U (U = unbuffered
version!)
IC2 = TLC271CP

Miscellaneous:
S1 = 3-way rotary switch, 4 (C) Segment
984004-1
poles, PCB mount

78 Elektor Electronics 12/98


Visit our Web site at http://www.elektor-electronics.co.uk

consisting of IC1e, R4, R6, R5 aid of the aforementioned resis- The generator is powered no tedious wiring is required.
and diodes D1 through D4. The tors R7 and R8 for the triangle from a regulated 12-volt source, The project is conveniently
output signal is applied directly and rectangle wave respectively, and its current consumption will boxed by drilling holes for the
to the waveform selection in combination with the output be of the order of 20 mA, pot and switch shafts in the front
switch. level control pot, P2. The depending, of course, on the panel, and then mounting the
Because the three waveforms TLC271 opamp is wired for a load connected to the output. completed circuit board against
have different individual levels, gain of 6.7 times in order to The printed circuit board the inside of the front panel.
the sinewave being the smallest, achieve a maximum (no-load) designed for the generator also Unfortunately, the PCB for this
they have to be made roughly output level of about 10 Vpp. contains all the controls, i.e., the project is not available ready-
equal before they can be applied The minimum load impedance frequency control pot, the wave- made through the Publishers.
to the output amplifier, IC2. This to be observed is about form selection switch and the (984004)
levelling is achieved with the 600 ohms. output level control pot, so that
034

1.5 A step-down
switching regulator
By G. Kleine
Step-down regulators are more
and more often used to derive
low supply voltage from a higher
voltage without incurring losses.
Owing to the steadily increasing
switching rates, the suppression
of interference and noise that
are unavoidable by-products of
the switching has become much
simpler.
The L4971 from SGS-Thom-
son is a step-down monolithic
power switching regulator deliv-
ering 1.5 A at a voltage between
+3.3 V and +40 V (selected by
a simple external divider). Real-
ized in BCD mixed technology,
the regulator is housed in a 8
DIL8 or SO16-SMD enclosure. +3V3
FB
The input voltage ranges 5
from 8 V to +55 V, while the R1
IC1
efficiency is 85%, rising to 95% L1
22k

4
OUT
when the input voltage is only a L4971 270H
(DIL8) R3
few volts higher than the output 3
OSC
voltage. INH COMP BOOT *
The external divider to set 8...55V 2 7 1 6
D1
the output voltage is formed by C1 C7 C2 C6 C8

R3-R4. For an output of 3.3 V,


10k

R2 R4
220 100n 2n7 100n 470
Vout may be linked directly to 63V SB360
FB (pin 8). Resistor values for C5 C4
63V
*
some usual output voltages are 100n 22n
given in the table.
The normal switching fre-
quency of the L4971 is
100 kHz, but this may be 984124 - 12
increased to 500 kHz by making INHIBIT
* * zie tekst

10k * see text


voir texte
* siehe Text
Vout R3 R4 *
(V) (k) (k)
3.3 0
5.1 2.7 4.4 R1=12 k and C2=0.001 F. Type T-94-26 from Amidon. The mode for short-circuit protec-
9.0 8.2 4.7 The soft start/inhibit input specified inductance is obtained tion, voltage feed forward regu-
12 12 4.7 (SS_INH pin 2) may be used with 65 turns close-wound lation, protection against feed-
15 16 4.7 with an open-collector output to 0.5 mm dia. enamelled copper back loop disconnection, inhibit
18 20 4.7 inhibit the controller or capacitor wire. for zero current drain and ther-
24 30 4.7 C5 for the soft start function. Other features include pulse mal shutdown.
A suitable core for L1 is the by pulse current limit, hiccup [984124]

Elektor Electronics 12/98 79


035 I2C temperature sensor
984021-1 4 2 1
R3 R5
D2 C1 R4 K2

R1
R2
R6
IC1

D1 K1

1-120489
ROTKELE )C(

(C) ELEKTOR
984021-1

Design K. Walraven technology (SMT) for operation 0.5 C). output may also be used as an
The LM75 from National Semi- from 5 V or 3.3 V. The tempera- The LM75 can operate as a interrupt for a computer or
conductor is a temperature sen- ture may be read in half degrees stand-alone temperature switch, microcontroller. At power-up,
sor, Delta-Sigma analogue-to- in the range 55 C to +125 V. for which purpose an upper and the switching levels are fixed at
digital converter (ADC), and It provides a 9-bit output in twos a lower switching level may be 80 C and 75 C
digital over-temperature detec- complement (that is, 0FAH is programmed in. The output of The circuit shown is based
tor with I2C interface. It is +125 C; 192H is 55 C; the device goes low when the set on an LM75 and may be con-
manufactured in surface-mount 001H is +0.5 C; 1FFH is temperature is exceeded. This nected to the Centronics port of

Parts list
K1
Resistors: 1

R1 = 3.9 k 14

R2 = 2.2 k 2
15 R6
R3R5 = 100 k
4k7

3
R6 = 4.7 k R2 R3 R4 R5
16
C1
2k2

100k

100k

100k

4
D2
Capacitors: 17
C1 = 0.1 F 5
100n
high eff.
18 SCL
Semiconductors: 6 SDA
K2
D1 = BAT85 19
8
7 1 2
D2 = LED, high efficiency
20 1 3 4
SDA
8 SCL 2 3 OS 5 6
Integrated circuits: SCL IC1 OS
21 7 8
IC1 = LM75CIM-5 D1 LM75CIM-5
9 7 9 10
A0
22 6
BAT85 A1
Miscellaneous: 10 5
A2
K1 = DB25 connector, male, 23
right-angled, for board 11 OS 4
A1
mounting 24
A0
12
K2 = 10-way box header for A2
25
board mounting R1 JP1 JP2 JP3
13 SDA
JP1JP3 = 2-way pin strip
3k9

header with jumper link


PCB Order No. 984021 (see
Readers Services towards 1 2 4
the end of this issue) 984021 - 11

80 Elektor Electronics 12/98


Visit our Web site at http://www.elektor-electronics.co.uk

a computer via a 25-way 1:1 simple: at the top left is a button the list) must be selected with- worry about the additional load
cable. The port then functions as which when set to off renders out the use of jumpers. Set the placed on their PC, may note
an I2C interface. The necessary the Centronics port voltage- button to on and temperature that the LM75 draws a current
software, datasheet and applica- less.Connect the board and monitoring starts. not exceeding 250 A.
tion note may be downloaded select the relevant Centronics Since the circuit draws cur- [984021]
from www.national.com/pf/LM/ address and an I2C address. rent from the Centronics port, a
LM75.html. This means that the highest dedicated power supply is not
Operation of the software is address on the board (lowest in required. However, readers who
036

fast voltage-driven
current source
Design: H. Bonekamp C1 C2
15V R1 to give the usual 50
The current source in the dia- impedance required by measur-
gram, which react very fast to 10
25V
100n ing instruments. At the same
changes in the input signal, may time, this resistor sets the d.c.
be used, for instance, in certain operating point. If the link to the
measurements. 8 driving signal source is short
Differential amplifier IC1 1
X1 and d.c. coupled, R1 may be
2
ensures that the potential across X2 IC1 R2 omitted.
7
R2 is equal to the input voltage: 3
OUT 100 The peak voltage between
R1
4
Y1 AD830 pins 1 and 2 of the IC is limited
Y2
Iout=Uin/R2. to 2.1 V to prevent too large a
499

5 current at the output. Therefore,


The bandwidth, B, is given by the peak output current is
2.1/100=21 mA.
B=R2 f /RL, [984091]

where f=80 MHz, and the load C3 C4


impedance RL R2 (both in
10 100n
ohms). 25V
The input is terminated into 15V
984091 - 11
037

simple moisture detector


Design: Pradeep G. 9V

The function of this circuit is to


sound a buzzer, or, optionally, R1 R2
actuate a relay, when a certain C2 14 C4
10k

1M

IC1
moisture level is detected
between a pair of probes.
10
16V
7 10
16V D1 *
RE1
BZ1

The circuit has a memory in


the form of a flip-flop, IC1a- IC1a 6V
1
IC1b, which enables or disables 2 &
3
1N4148
a tone oscillator, IC1c. The flip-
R3
flop is reset either by C1 and C2 10k
when the supply voltage
IC1c IC1d T1
appears, or by push-button S1. 6
4 8 12 R4
& 10 11
This may not reset the alarm, 5
9 & 13 & 4k7
however, which will sound again IC1b BC547
until the probes are dry. S1
C1
S2
C3
The (passive) buzzer may be IC1 = 4093
replaced by a relay actuating an 100n 100n
externally connected sounder,
lamp or other high-power sig- * zie tekst * see text * voir texte * siehe Text 984111 - 11

nalling device. Because the duty

Elektor Electronics 12/98 81


factor of the coil voltage is about powered from a 9-volt supply. is actuated. The supply voltage ply voltage lower than about 8 V
0.5, the relay should be a type The circuit has a modest stand- is uncritical and may be any- is employed. If the circuit is
with a coil voltage which is lower by current consumption of thing between 3 V and 15 V. found to be too sensitive, the
than the supply voltage. A 6-volt between 4 and 5 mA. This rises Note, however, that it may not be value of resistor R2 may be
type is suggested if the circuit is to about 40 mA when the relay possible to use a relay if a sup- decreased. (984111-1, W)
038

ambient-noise monitor
Design: T. Giesberts 6...15V
Excessive noise is bad for your R1 R4
health and bad for your sur- C4
10k

2k2
roundings. It cannot be said too P1
10 25V
often: too many young people go
prematurely deaf because of 250k

prolonged exposure to loud IC1


C1
3 7 IC2
sounds. There cannot be any D1
7
6 3 T1
pleasure in excessively loud 100n
2
TL071
6
music: it hurts and, like skin 4
1N4148
2
TL071 BC547B
cancer, the terrible effects do not 4
immediately become noticeable. R2 R3 R5
The monitor in the diagram *
RE1
47k

1k

470
gives a visible warning when the D2
ambient noise is at a dangerous C2 S1 C3 D3

level or it actuates a relay. 10 10


The noise sensor is a two- 25V 25V 3V3
400mW
terminal electret microphone
that is powered via R1. The
audio signal is applied to * siehe Text
* zie tekst C5

op amp IC1, whose input resis- * voir texte * see text 10 25V

tance is fixed at 47 k by R2.


The signal amplification can be 984102 - 11 6...15V
set from unity to 250 with P1.
Operational amplifier IC2
functions as a comparator which whereupon T1 is switched on. prevents the circuit returning to the output of IC1, but only, and
likens the amplified signal with When this happens, the relay is its original state (which would very slowly, via the high-resis-
a reference voltage of 3.3 V. If energized or the LED lights. The cause the noise source to come tance input of IC2.
the signal at the non-inverting relay contacts may be used to on again). The capacitor is The monitor is reset with S1.
input of the op amp exceeds the operate a warning light or charged to the peak value of the [984102]
reference voltage, the output of buzzer, or to switch the noise signal. Owing to the presence of
IC2 changes state (goes high), source off. In the latter case, C2 D1, it cannot be discharged via
039

up/down drive
for tone control
Design: T. Giesberts down key. A third key enables decoder IC3 is permanently low. C3 ensures that when the supply
The up/down drive is intended the user to switch over rapidly to Only the eight lowest outputs of voltage is switched on, the pre-
primarily for use with the tone a preprogrammed position of the the decoder are used and these set data are automatically
controls described elsewhere in relevant tone control. are linked via K1 to the control adopted by the counter.
this issue. The electronic switches are inputs of IC1 and IC2 in the tone Each of switches S1 and S2
The tone controls use elec- driven by a BCD-to-decimal controls. drives an S/R bistable (US: flip-
tronic switches that are operated decoder Type 4028 (IC3), which The circuit is operated with flop), which determines the level
by a multi-position selector. The in turn is controlled by a 4-bit S1 and S2. Switch S3 is the ear- at the U/D input of counter IC2.
present circuit is intended as a preset up/down counter (IC2). lier mentioned preset key. The Networks R3-C1 and R4-C2,
replacement for this selector and The counter uses the three low- data for the preset inputs are set in conjunction with Schmitt trig-
has facilities for operating the est bits only. The MSB of with DIP switch S4. Capacitor ger IC1b provide a thorough
tone controls via an up and a debouncing and at the same

82 Elektor Electronics 12/98


Visit our Web site at http://www.elektor-electronics.co.uk

delay the clock pulse slightly. R7 12V


This delay guarantees that the R1 R2
100

clock pulse (output of IC1b)

100k

100k
arrives after the state of the IC1d
14 C4 16 C5 16 C6 C7
counter has been defined. 13
11
IC1 IC2 IC3
& 100n 100n 100n 100
To prevent the counter jump- 12 7 8 8
25V
ing from minimum to maximum
or vice versa, the clock pulse is 9
disabled in the outermost posi- 8 &
10
R6
tions. In the minimum state, this
IC1c

47k
is achieved simply by use of the 10
M2
CTR4

carry-out terminal (pin 7) of the S4 15


1,2+/1,2- D4
S3
counter. In the maximum state, C3 9
R IC2 K1
5
an auxiliary network, consisting G1
4516 D3 DX
0
3
1
1
of R6, D3, D4, D5/IC1a, and D1, 100n
C3
1
14
2
was found necessary. IC3 2
4 6 10 2 3
3D 0 15
Diode D2 ensures that pin 5 12 11 13 0
G
3 4
1
of IC1 remains low when the 13 14 12
2
7 4
6
5
minim state is reached until S1 3 2 D5
4028
5
7
6
6 7
is pressed. The same is R5 2 3 4 5 6 IC1b 1,2CT=15 4
4 7 3x 11 7 8
achieved by diode D1 in regards 1,2CT=0
1N4148
/Z8
1 0
9
&
of pin 6 of the IC when the max- 8
1
5

imum state is reached. Resistor R4


5x 1M
6 5 D2
1
R6 serves to reset the clock dis- 1M
abling during down counting; R3 D1
3
1

when the down key is pressed, 1M & 2


IC1 = 4093
the output of IC1a goes high S1 S2
C1 C2
2x 1N4148 IC1a
again.
10n 10n
If an indication is desired of UP DOWN
the actual state of the up/down
984116 - 11
drive, eight high-efficiency
LEDs may be added at the out-
put of IC3 (anodes to the output, amplification or attenuation During quiescent operation, pressed. Network R7-C7 pro-
cathodes via a common 10 k occurs may be given by an addi- the circuit draws a current of vides effective decoupling of the
resistor to ground). tional LED at the output of IC1c 20 A, which rises to about digital circuit from the analogue
An indication whether or IC1d. 140 A when S1 or S2 is supply. [984116]
040

mains filter revisited


F1
Design: I. Fietz
The mains filter described in C1 2A T C2 C6

PC Topics (April 1998) could X2 X2 X2


100n 33n 100n
do with two useful additions: a
R1 R3 R4 R6
fuse monitor and a voltage indi- K1 K2
220k

1k

3k3

1k

cator. The filter proper consists P P


of capacitors C3C7 and inductor 1W 1W C3 L1 C4 1W
L1. Its operation is described N R5 N
R2
fully in the April 1998 article. T1 470n 470n 275V
220k

X2 X2
The present article deals only
D1 D3 D5
with the additional features. D2 D4

The fuse monitor indicates by


the lighting of an LED that the 2V7 3V9 2V7

fuse has blown. For this purpose, 500mW BC547B 500mW SIOV-S20K275 500mW
Siemens
two capacitive potential dividers L1 = B82723-A2202-N1
C5 C7
2x 5mH6 / 2A
have been added: C1-R3-D1 and C1 ... C7 = 250V Siemens Y2 Y2
C2-R4-D3. When the fuse is D2, D4 = high efficiency LED 4n7 4n7
intact, the potential at the base of
984114 - 11
T1 is 3.9 V higher than that of the
(N)eutral line. The transistor is
on and short-circuits D2. When the (L)ive line is positive w.r.t. by the human eye). (D4) lights when the mains volt-
the fuse blows, T1 is off. Its col- the neutral line; this means that A second potential divider, age is present at the output.
lector potential, owing to D1, is the LED flashes in rhythm with C6-R4-D4-D5, at the output of [984114]
2.7 V, so that D2 lights. Note that the mains frequency (since this the filter ensures that the LED
this action is only possible when is 50 Hz, it cannot be discerned

Elektor Electronics 12/98 83


041 LED barometer
Being an all-solid-state design P [ hPa ]
you dont have to tap on this +U
D21
barometer to get the latest air
+U +U D20
pressure reading! C7 1045
1N4001
The main components in the cir- C4 C5 8
D19
9...12V IC2 100n
cuit are air pressure transducer 100 100n
1040
4 3
IC1, an MPXS4100A from 25V D18
9 10 1035
Motorola, and two LM3914 LED MODE L10
11
bargraph drivers, IC3 and IC4. 5V
2V5
5
SIG
L9
12
D17
1030
Both LED drivers generate a ref- 5V 3 6
IC4 L8
13
RHI L7 D16
erence voltage of 1.25 V. The R10
1 7 14 1025
100 IC2a REFOUT L6
reference supply of IC3 is cre- 2
L5
15
D15
C3
ated with respect to ground. By L4
16 1020
connecting the RLO and R8 100n
LM3914 17
L3 D14
REFADJ inputs of IC4 to the 10k 8 18 1015
R9 R7 REFADJ L2
C2 4 1
reference voltage created by 10k
RLO L1 D13

8k2
1010
IC3, the REFOUT pin of IC4 10
2
then supplies 2.5 V with respect 10V D12
1005
to ground. In this way, the LED
D11
drivers are cascaded to give a 1000
scale of 20 LEDs each repre- +U D10
senting an air pressure increase IC2 = TLC272 C6 995
of 5 hPa. D9
100n 990
Because the output voltage of IC1 2
3
the pressure sensor follows any D8
985
9 10
change in the supply voltage, a 4 5
R4
MODE L10
11
very stable 5-volt supply is MPX
S4100A IC2b
7
8k2
5
SIG
L9
12
D7
980
IC3 L8
required. This is provided by 6
6 13
RHI L7 D6
opamp IC2a which doubles the 3 R1 7
L6
14 975
C1 R3 R5 REFOUT
2.5-V REFOUT potential from
56k

15
L5 D5
12k

8k2
IC4. The sensor output voltage 47p
R2
L4
16 970
LM3914
is expressed by the equation
1k

17
L3 D4
965
Uo = (0.001059*P 0.1518)*5 P2 R6
8
REFADJ L2
18
4 1
[V] (P [hPa]) 1k RLO L1 D3
3k9

P1 960
Because we want an indication 2
range of 945 hPa (all LEDs off) 47k D2
955
to 1045 hPa (all 20 LEDs on),
D1
5V 950
984061 - 11
1000

1005

1010

1015

1020

1025

1030

1035

1040

1045
984061-1

950

955

960

965

970

975

980

985

990

995
P1

D15

D16

D17
R3
R2

D1

D2

D3

D4

D6

D7

D8

D9

D10

D11

D12

D13

D14 C7

D18

D19

D20
D5
C1

R1
C5

IC3

IC4
R4
R5

D21
H2

H1
IC2

- +
C6

C4

R6 R7
P2

9..12V
IC1

C3
1-160489
ROTKELE )C(

R10
R8
R9

C2
(C) ELEKTOR
984061-1

84 Elektor Electronics 12/98


Visit our Web site at http://www.elektor-electronics.co.uk

COMPONENTS LIST the gain of IC2b, there is no way


Capacitors: high efficiency of avoiding multiple two-point
Resistors: C1 = 47pF ceramic D14-D20 = LED, green, 3mm, calibration. In practice, you use
R1 = 56k C2 = 10F 10V radial high efficiency an existing barometer or air-
R2 = 1k C3 = 100nF MKT (Siemens) D21 = 1N4001
pressure information from your
R3,R4,R7 = 8k2 C5,C6,C7 = 100nF ceramic IC1 = MPXS4100A (Motorola,
R5 = 12k C4 = 100F 25V radial Conrad)
national or regional Met Office,
R6 = 3k9 IC2 = TLC272CP and adjust the circuit several
R8,R9 = 10k Semiconductors: IC3,IC4 = LM3914N times at different air pressures.
R10 = 100 D1-D7 = LED, red, 3mm, high Alternatively, if you have access
P1 = 1k preset H efficiency Miscellaneous: to a pressure vessel in which the
P2 = 47k preset H D8-D13 = LED, yellow, 3mm, PCB, order code 984061-1 pressure can be accurately con-
trolled to 945 hPa, P2 is initially
set to mid-travel, and P1 is
the following minimum and In addition to this gain we also and at the same time provide a adjusted until the output of IC2b
maxim sensor output voltages need a negative offset of gain of 6.65 times. This gain supplies 0 V. Next, increase the
can be calculated: 4.245 V, so that the output volt- may be reduced to the above pressure in the vessel to
945 hPa 4.245 V = Ulow age is 0 V at an air pressure of mentioned value by adjusting 1045 hPa, and adjust P2 until
1045 hPa 4.774 V = Uhigh 945 hPa. Components IC2b, P1, P2. LED D20 just lights.
The required gain, A, between P2, R2, R3, R4 and R5 provide The simplicity of the circuit is The printed circuit board of
the sensor output and the input the gain and offset compensa- achieved at the cost of a fairly which the templates are shown
of the readout is then tion. The 5-V reference voltage, complex calibration procedure. here is available ready-made
A = Uref/(Uhigh Ulow) = IC2b, P1, R2 and R3 are the Because preset P1 not only from the Publishers.
2.5/(4.774 4.245) = 4.726 ingredients to cancel the offset determines the offset but also (984061-1, Bo)
042

12/24/48 V d.c. tester R1

2k7
grn
D1 groen
green
Design: W. Mannertz 48 V, 4.7 k. If the supply is not con- vert
The present tester is intended The tester should be con- nected to earth, the tester may D3

primarily for testing the 24 V nected to the +ve and ve volt- be used as ground-leak tester. In
D2
electrical circuits found on most age rails with test clips or croc- this situation, one of the LEDs 1N4001 rot

pleasure craft. However, if the odile clips, whereupon the test lights when the test probe rood
red
resistors are given different val- probe is placed on the point to touches a point at earth poten- R2 rouge
ues, the circuit may, of course, be tested. When the potential at tial and there is a leakage. 2k7
be used for other voltage ranges. the point is positive, the red [984104]
For 12 V, the value of the resis- LED lights; if it is negative, the 984104 - 11
tors should be 1.2 k, and for green one does.
043

0.56 GHz low-noise amplifier


By G. Kleine ing as a high performance 2 dB
The MGA-86563 from Hewlett- NF (noise figure) amplifier.
Packard is a three-stage, GaAs, Alternatively, with the addition
MMIC (monolithic microwave of a simple shunt-series induc-
integrated circuit) that offers low tor at the input, the noise figure
noise figure and excellent gain can be reduced to 1.6 dB at
for applications from 0.5 GHz to 2.4 GHz. For 1.5 GHz applica-
6 GHz. The device uses internal tions and above, the output is
feedback to provide wideband well matched to 50 . Below
gain and impedance matching. 1.5 GHz, gain can be increased
It is housed in an ultra-minia- by using conjugate matching.
ture SOT-363 package, which The input of the circuit in
requires half the board space of Figure 1 is fixed tuned for a
the SOT-143. conjugate power match (maxi-
The MGA-86563 may be mum power transfer or mini-
used without impedance match- mum VSWR voltage standing

Elektor Electronics 12/98 85


1 5V...7V
2 5V...7V

14mA
14mA

C3

50
C3 L2

100p
1n 28nH
IC1
IC1 R1
MGA-86563
MGA-86563 10...100
K1 C1 L1 C2 K2
1 4 K1 C1 L1 C2 K2
1 4
3nH3 6 50 50 50 50
5 6
3 5
2 3
2

984125 - 12
984125 - 13

wave ratio) at 2 GHz. frequencies, its value may have noise figure and gain to 50 . realized simultaneously with a
The 3.3 nH inductor, L1, in to be increased accordingly. The use of a simple input low input VSWR.
series with the input of the A circuit for operation up to matching circuit, such as a DC power is applied to the
amplifier matches the input to 6 GHz is shown in Figure 2. A series inductor, will minimize MMIC through the same pin tat
50 at 2 GHz. 50 microstripline with a the amplifier noise figure.Since is shared with the r.f. output. A
Inductor L2 prevents any series d.c. blocking capacitor, the impedance match for NF0 50 microstripline is used to
tendency to resonance over the C1, is used to feed r.f. to the (minimum noise figure) is very connect the circuit to the follow-
operating range (2 GHz). When MMIC. The input of the device close to a conjugate power ing stage.
operation takes place at lower is already partially matched for match, a low noise figure can be [984125]
044

LED lighting
for consumer unit cupboard
D3
Design H. Bonekamp 1N4148 R4 that the transistor is cut off.
The consumer unit (or electric- 680
When the mains voltage
ity meter) cupboard in some fails, C1 is discharged via R1;
older houses is a badly lit place. R3 when the potential across it has
If the bell transformer is also dropped to a given value, the
22k

located in this cupboard, it may battery voltage switches on T1


be used to provide emergency 1N4148 via R3 and R1, provided switch
lighting by two high-current D2 T1 S1 is closed. When T1 is on, a
LEDs. These diodes are pow- D1
current of some 20 mA flows
R2 R5
ered via a small circuit that 9 - 12V through diodes D4 and D5. The
B1 1k5 47
switches over to four NiCd bat- light from these LEDs is suffi-
1N4148 BC557B
teries when the mains fails. cient to enable the defect fuse or
S1
The output voltage of the bell the tripped circuit breaker to be
transformer is rectified by BT1 located.
bridge B1 and buffered by B80C1500
D4 [984110]
capacitor C1. The batteries are R1 4x 1V2 NiCd
C1
charged continuously with a cur-
15k

750mAh
D5
rent of about 7.5 mA via diode 100
D1 and resistor R2. The base of 25V
transistor T1 is high via R3, so
984110 - 11
045

ATU for 27-MHz CB radios


Design: G. Baars matched to the 50- antenna antenna is less obtrusive than a active CB users on camping
This antenna tuning unit (ATU) input of 27-MHz Citizens Band roof-mounted vertical or sites and the like because it
enables half-wavelength (12 ) or (CB) rigs. The ATU is useful in ground-plane. It is also great for allows a length of wire to be
longer wire antennas to be those cases where a wire improvised antennas used by used as a fairly effective antenna

86 Elektor Electronics 12/98


Visit our Web site at http://www.elektor-electronics.co.uk

hung between, say, a tree branch on loan. Select channel 20 on only 3 metres, then the remain-
at one side and a tent post, at zie tekst the CB rig and set C1 and C3 to ing 2.5 metres has to be wound
* see text /2
1
the other. Obviously, the wire mid-travel. Press the PTT button on a length of PVC tubing. This
ends then have to be isolated * siehe Text and adjust C2 for the best (that creates a so-called BLC (base-
using, for example, short lengths
* voir texte C3
is, lowest) SWR reading. Next, loaded coil) electrically short-
*
of nylon wire. It is even possible 40p alternately adjust C3 and C2 ened antenna. In practice, the
to use the ATU to tune a length until you get as close as possible added coil can be made some-
of barbed wire to 27 MHz. *
L to a 1:1 SWR reading. C1 may what shorter than the theoretical
The coil in the circuit con- K1
50
C1 C2 then be tweaked for an even bet- value, so the actual length is
sists of 11 turns of silver-plated ter value. No need to re-adjust best determined by trial and
copper wire with a diameter of 22p 40p the ATU until another antenna is error. Finally, the ATU has to be
about 1 mm (SWG20). The used. In case the length of the built in an all-metal case to pre-
internal diameter of the coil is 984079 - 11
wire antenna is exactly 12 vent unwanted radiation. The
15 mm, and it is stretched to a (5.5 metres), then C3 is set to trimmers are than accessed
length of about 4 cm. The tap for maximum capacitance. through small holes. The con-
the antenna cable to the CB larger one, C2, for coarse tuning. Although the ATU is nection to the CB radio is best
radio is made at about 2 turns The trimmers are adjusted designed for half-wavelength or made using an SO239 (UHF)
from the cold (ground) side. Two with the aid of an in-line SWR longer antennas, it may also be or BNC style socket on the ATU
trimmer capacitors are available (standing-wave ratio) meter used for physically shorter box and a short 50- coax cable
for tuning the ATU. The smaller which most CB enthusiasts will antennas. For example, if with matching plugs.
one, C1, for fine tuning, and the have, or should be able to obtain antenna has a physical length of (984079-1; LL)
046

single-supply operation
of the AD736
An Analog Devices Application C4 C8
9V
In dual-supply operation, the
output (pin 6) of the AD736 is at 100n 100n

0 V, that is, halfway between the 7 3 CF R6


supply lines. But in single-sup- +V CF 1M
ply operation, the output is at 10
10V IC2
1/2 VCC. By adding a single-sup- C1 IC1 R2 1
2 6 3 7
ply op amp as a differential V IN VOUT 1M
6
amplifier, however, a true O V VIN
10n
5
AD736
1 2
5
out for o V single-supply circuit CAV CC
4 VRMS
V COM
with a ground-referenced output R1 CAV C3 R3 R5
8
4 8
as shown in the diagram. For TLC271
22M

1M

820k

this circuit, VRMS = 0 V when 47


10V
10
10V
VIN = 0 V, and VRMS = 200 mV
d.c. when VIN = 200 mV r.m.s. OFFSET
R4
In the circuit, a single 9 V ADJUSTMENT
9V
positive supply powers the 470k
AD736. Resistors R7=R8=
100 k form a potential divider R7
BT1
across the 9 V battery that C5
100k

establishes a local ground rail 100n C7


at 1/2 VCC, or 4.5 V. The 9V
AD736s common pin, its R8
C6
47
10V
100k

22 M input bias resistor, and


the inverting input of U2 (via R4 100n

and R5) are all connected to this


rail. The quiescent output volt- 984090 - 11

age of the AD736, which is ref-


erenced to its common pin, is r.m.s. input to the AD736 current (typically 1 pA) to flow. and C is in farads.
4.5 V. increases from 0 mV to The offset voltage caused by Optional capacitor CF, in
A single-supply op amp, 200 mV, the AD736s output the bias current flowing parallel with an 8 k feed-
IC2, is arranged as a unity-gain increases from 4.5 V to 4.7 V. through R1 is negligible. back resistor, fixed internally
differential amplifier. Large The output of op amp IC2 is Capacitor C3 between pins by IC1, forms a single-pole
value feedback resistors, the difference between the 1 and 8 of IC1 provides a low low-pass filter with a 2 Hz cut-
R2R5, are used to minimize AD736s output and 4.5 V, or frequency cutoff of 2 Hz. Other off frequency. The value of CF
loading of the 4.5 V rail. The 0 mV to 200 mV d.c. cutoff frequencies, f, can be in farads is given by
op amp amplifies the differ- The remainder of the cir- calculated from
ence between local ground at cuit works as follows. The CF=1/2 Rf
4.5 V and the output of the AD736s output is a.c. cou- f=1/2 RC
AD736, which is also at 4.5 V pled; R1 provides a path for where f is in Hz and R=8 k.
for 0 V r.m.s. input. As the the BiFET op amps input bias where f is in Hz, R is in ohms, [984090]

Elektor Electronics 12/98 87


047
digital output with
sink/source driver
responds to a current-loop sig- tor-emitter path. As a matter of
nal with strength of between course, the Darlington transis-
10 mA and 20 mA. tors have to be cooled depend-
An LED, D1, is inserted in ing on the currents they sink or
the collector line of amplifier source.
stage T2 to provide a visible Jumpers JP3 and JP4 have
channel active indication. The to be fitted if the controlled
symmetrical sink/source power load(s) are not already con-
driver consists of a pair of com- nected to a supply line. If the
plementary BD901/902 Dar- jumpers are fitted, then the load
lington transistors with associ- current will be drawn from the
ated current limiting resistor, driver board.
R8-R9. Resistor R8 determines This driver is pretty fast: it
the maximum source current, can handle switching frequen-
and R9, the maximum sink cur- cies up to about 3 kHz without
rent. Both currents are calcu- problems if the TIL111 opto-
lated from I = 0.65 V/R. The coupler is used (as suggested in
driver board itself, by the way, the circuit diagram). Higher fre-
has a current consumption of quencies may undoubtedly be
just a few milli-amps. achieved if a faster optocoupler
Diodes D2 and D3 are only is employed. If you need to con-
Design: R. Veltkamp JP3
V2 +
When it comes to using a PC or R6 R4 R8
a microprocessor system to con- JP2
1M

2k2

10
trol real-world loads like T3
lamps, relays, and motors, there
are basically two camps: pro- IC1 BC V+
grammers and hardware spe- 1 6 5 557B T5
(5V)
D2
cialists. The combined species
seems to be rare! Anyway, this D1
*
1N4001
article is aimed at the latter BD902
group. The circuit diagram 2 4
shows a one-channel power dri- TIL111
BD901
ver with an (optional) electri- R1 R3 R5 R2 1N4001
cally isolated input and a power
330

*
2k2
47k

47k

output capable of sinking as T6


D3 GND
GND1 T2 T1 R7 T4
1M

R9
COMPONENTS LIST
10

BC BC BC
547B 547B 547B
Resistors: JP1 JP4
GND2
R1 = 330
R2,R3 = 47k
R4,R5 = 2k2 * see text * siehe Text * zie tekst * voir texte 984011 - 11

R6,R7 = 1M

Capacitor: well as sourcing current. required if inductive loads like trol more channels than just one
C1 = 100nF If galvanic isolation is not relay coils are controlled, and (say, four), you just build as
required at the input, omit the different Darlington pairs like many driver boards as you need.
Semiconductors: optocoupler and fit the two the BD911/912 are employed. Unfortunately, the printed cir-
D1 = LED jumpers. In that case, the cir- As opposed to the BD901/902, cuit board whose artwork is
D2,D3 = 1N4001 (optional, cuit is driven by a TTL-compat- the BD911/912 complementary shown here is not available
see text) ible logic signal. In case the pair does not have internal anti- ready-made from the Publishers.
T1,T2,T4 = BC547B optocoupler is used, the driver surge diodes across the collec- (984011-1)
T3 = BC557B
T5 = BD902 or BD912 (see
text) 1-110489 V+ V2+ 984011-1
T6 = BD901 or BD911 (see D1
H1

H3

text) C1
JP3
R8

IC1 = TIL111 or 4N35 or


IC1

D2
R5

R4
R6

CNY17-2 T3
JP2 T5
IN1

Miscellaneous: T2
T6
R1
GND1

JP1-JP4 = 2-pin SIL header JP1 T4


R7

D3

with jumper
R9

R3 T1 JP4
Heatsinks for T5/T6, as R2
H4

H2

required 984011-1
R OTKELE )C( (C) ELEKTOR
GND GND2

88 Elektor Electronics 12/98


Elektor Electronics

OHN3040U, OHS3040U XC9536

Sensors Integrated Circuits


Hall-Effect Programmable Logic DATASHEET 12/98
DATASHEET 12/98

OHN3040U XC9536 capability


OHS3040U 1
In-System Programmable CPLD Extended pattern security features for design
HallogicTM Hall Effect Sensors VCC protection
REG. Manufacturer High-drive 24 mA outputs
Manufacturer OUTPUT
3
Xilinx Inc., 2100 Logic Drive, San Jose, CA 3.3 V or 5 V I/O capability
TRW Communications, 1900 Richmond Road, 95124-3400, USA. Tel. (408) 559-7778, fax: PCI compliant (-5, -6, -7, -10 speed grades)
12/98

Cleveland, Ohio 44124, USA. 408-559-7114. Internet: www.xilinx.com. Advanced CMOS 5V FastFLASH technology
Supports parallel programming of more than
one XC9500 concurrently
GROUND
2 Available in 44-pin PLCC, 44-pin VQFP, and
OHN3040U 48-pin CSP packages
OHS3040U
983010 - 13 Description
UK: Xilinx Ltd., Benchmark House, 203 Brook- The XC9536 is a high-performance CPLD pro-
lands Rd., Weybridge, Surrey KT13 ORH. Tel. viding advanced in-system programming and
983010 - 15
(01932) 349401. test capabilities for general-purpose logic inte-
1 2 3
Application Example gration. It is comprised of two 36V18 Function
Anemometer, Elektor Electronics December Functional block diagram Features Blocks, providing 800 usable gates with propa-
1998. 5 ns pin-to-pin logic delays on all pins gation delays of 5 ns.
fCNT to 100 MHz
Features 36 macrocells with 800 usable gates Application example
Operates over a broad range of supply volt- Up to 34 user I/O pins Compact Multiburst Generator, Elektor Electron-
ages 5 V in-system programmable (ISP) ics January 1999.
Excellent temperature stability to operate in Endurance of 10,000
harsh environments program/erase cycles
Drive capability up to 5 TTL loads Program/erase over full commercial
Hall element, linear amplifier, and Schmitt voltage and temperature range
trigger on a single HallogicTM silicon chip Enhanced pin-locking architecture
Flexible 36V18 Function Block
89

Absolute maximum ratings


(TA = 25C unless otherwise noted) 90 product terms drive any or all of
OHN3040U Supply voltage VCC 25 V 18 macrocells within Function
OHS3040U
Storage temperature range, TS 65 C to +150 C Block
Operating temperature range, TA Global and product term clocks,
- OHN3040U 20 C to +85 C output enables, set and reset sig-
- OHS3040U 55 C to +125 C nals
Lead soldering temperature Extensive IEEE Std 1149.1 bound-
VCC OUT (3.2 mm from case for 5 sec. with soldering iron)(1) 260 C ary-scan (JTAG) support
Output ON current, ISINK 25 mA Programmable power reduction
983010 - 14
Output OFF voltage, VOUT V mode in each macrocell
Magnetic flux density, B unlimited Slew rate control on individual out-
OHN/S3040U pinout (1) heat sink leads during hand soldering puts
User programmable ground pin
#
XC9536 OHN3040U, OHS3040U

12/98
Integrated Circuits Sensors
Programmable Logic Beaufort Scale
DATASHEET 11/98 DATASHEET 11/98
XC9536 I/O pins (PC44 case only) Power Management
Power dissipation can be reduced in the XC9536 Beaufort scale and correlated wind speeds
by configuring macrocells to standard or low-
Pin (PC44
Macrocell
Function

power modes of operation. Unused macrocells


Bscan
Wind speed

Notes
Order
case)
Block

Elektor Electronics
are turned off to minimize power dissipation. Description
Operating current for each design can be m/s mph knots
1 1 2 105
1 2 3 102 approximated for specific operating conditions calm 0 0.2 0-1 01
1 3 5 99 [1] using the following equation:
light air 0.3 1.5 1-3 13
1 4 4 96
1 5 6 93 [1] ICC (mA) = MCHP (1.7) + MCLP (0.9) + MC light breeze 1.6 3.3 47 46
1 6 8 90 (0.006 mA/MHz) f
gentle breeze 3.4 5.4 8 12 7 10
1 7 7 87 [1]
1 8 9 84
Where: moderate breeze 5.5 7.9 13 18 11 16
1 9 11 81
MCHP = Macrocells in high-performance mode
MCLP = Macrocells in low-power mode fresh breeze 8.0 10.7 19 24 17 21
1 10 12 78
1 11 13 75
MC = Total number of macrocells used strong breeze 10.8 10.7 25 31 22 27
1 12 14 72
f= Clock frequency (MHz)
moderate gale 13.9 17.1 32 38 28 33
1 13 18 69
1 14 19 66 fresh gale 17.2 20.7 39 46 34 40
XC9536 Global, JTAG and Power Pins
1 15 20 63
(PC44 case only) strong gale 20.8 24.4 47 54 41 47
1 16 22 60
1 17 24 57 Pin type Pin (PC44 case only) whole gale 24.5 28.4 55 63 48 55
1 18 54
I/O/GCK1 5 storm 28.5 32.6 64 75 56 65
2 1 1 51
2 2 44 48 I/O/GCK2 6 hurricane > 32.6 > 75 >65
2 3 42 45 [1] I/O/GCK3 7
2 4 43 42
I/O/GTS1 42
2 5 40 39 [1]
2 6 39 36 [1] I/O/GTS2 40
2 7 38 33 I/O/GSR 39
2 8 37 30
TCK 17
2 9 36 27

90
2 10 35 24 TDI 15
2 11 34 21 TDO 30
2 12 33 18
TMS 16
2 13 29 15
2 14 28 12 VCCINT 5 V 21, 41
2 15 27 9 VCCIO 3.3 V/5 V 32
2 16 26 6
GND 23, 10, 31
2 17 25 3
2 18 0 No Connects

Note: [1] Global control pin


#

You might also like