1998 international pc-software contest the winnerstemperature logger based on the ds1620 transducer....

87
1998 International PC-SOFTWARE CONTEST The Winners 11 Elektor Electronics 12/98 Squarely aimed at anyone with an active interest in the subjects Measurement, Development and Communication, an International Software Design Competition was launched in our July/August 1998 magazine. Apparently, these subjects were much harder to master than last year, because ‘only’ 80 Competition entries landed on the desks of the Jury members. Despite the smaller number of entries, however, the Competition did produce some very nice projects. International First Prize Last year, as the Competition drew to a close and the points were totted up, the winning design quickly emerged because of the very high grades the Jury members gave to his project. This year, the Jury witnessed a photo finish, with fierce competition till the last moment between four extremely well-designed projects. In the end, the International First Prize, an ST1000 EMC master Spectrum Analyzer/Tracking Generator with a value of more than £3,000 (sponsored by EMC Master International), was awarded to the brothers Jack and Mark Nowinski from Ontario, Canada, for their superbly designed, novel and extremely useful Electrocardiograph project. The Jury is not only extremely pleased and honoured to be able to award the prize to these Canadian readers of Elektor Electronics, but also deeply impressed by the great soft- ware and hardware as well as the excellent multimedia presentation supplied by Messrs Nowinski. National Prize Winners Winners of the national prizes — mostly sponsored by advertisers in the UK version of Elektor — are listed in the table below. Congratulations! All prizewinners have been individually advised of their good fortune by our Editorial Secretariat. Unfortunately, because quite a few Competition entries we received did not meet the Competition Rules, a number of prizes could not be award- ed. These prizes, it has been agreed with the relevant spon- sors, will remain in store for next year’s Competition. 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 Competition entries we received from many countries in which Elektor Electronics (or its sister magazines) is read, in other words, from all over the world! As a matter of course, the project that won the International First prize will also be included (in condensed form). A number of prize-winning Competition entries will be copied integrally onto a CD-ROM which we hope to publish by early February 1999. Furthermore, a number of projects will be discussed in greater detail in forthcoming (1999) issues of Elektor Electronics. (990010-1) 1998 International PC-SOFTWARE CONTEST The Winners Prize no. Description Sponsor Awarded to Project 1 Ultiboard Challenger Unlimited; value £1833 Ultimate Technology J. T. Kokkoris Temperature Recorder; a wonderfully simple temperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535 Simulator; use this intuitive program to simulate this CPU and others in the 80x51 family. 3 ANSI C Compiler for the 8051 + Source Level Simulator; value £1040 Crossware Products D. D. Aggelos UPIO; use the PC to control up to 8 relays. 4 EMC Master Info CD, Extended Version; value £775 EMC Master International O. Kvindesland Log2ps; a QSL card machine for the active radio amateur. 5 ADC-200 Multifunction Test Instrument; value £499 Pico Technology S. Jonsson Hell/CW Tx/Rx program; your PC turned into a HellSchreiber (for radio amateurs). 6 (1) EMC Master Info CD; value £285 EMC Master International M. A. Wisintainer et al. Remote Experiments with PIC17C43; a remote, didactic laboratory wholly controlled by students via an Internet link. 6 EMC Master Info CD; value £285 EMC Master International M. Hewitt Frequency Counter on Printer port; for TTL pulses, max. frequency about 100 kHz on a P133 PC. (2)

Upload: others

Post on 24-Jan-2021

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

1998 InternationalPC-SOFTWARE CONTEST

The Winners

11Elektor Electronics 12/98

Squarely aimed at anyone with anactive interest in the subjectsMeasurement, Development andCommunication, an InternationalSoftware Design Competition waslaunched in our July/August 1998magazine. Apparently, these subjectswere much harder to master than lastyear, because ‘only’ 80 Competitionentries landed on the desks of the Jurymembers. Despite the smaller numberof entries, however, the Competitiondid produce some very nice projects.

International First Pr izeLast year, as the Competition drew to a close and the pointswere totted up, the winning design quickly emergedbecause of the very high grades the Jury members gave tohis project. This year, the Jury witnessed a photo finish, withfierce competition till the last moment between fourextremely well-designed projects. In the end, theInternational First Prize, an ST1000 EMC master SpectrumAnalyzer/Tracking Generator with a value of more than£3,000 (sponsored by EMC Master International), wasawarded to the brothers Jack and Mark Nowinski from

Ontario, Canada, for their superbly designed, novel andextremely useful Electrocardiograph project. The Jury isnot only extremely pleased and honoured to be able toaward the prize to these Canadian readers of ElektorElectronics, but also deeply impressed by the great soft-ware and hardware as well as the excellent multimediapresentation supplied by Messrs Nowinski.

National Pr ize WinnersWinners of the national prizes — mostly sponsored byadvertisers in the UK version of Elektor — are listed in thetable below. Congratulations! All prizewinners have beenindividually advised of their good fortune by our EditorialSecretariat. Unfortunately, because quite a fewCompetition entries we received did not meet theCompetition Rules, a number of prizes could not be award-ed. These prizes, it has been agreed with the relevant spon-sors, will remain in store for next year’s Competition.

Presentation of the designsIn the PC Topics Supplement of the January 1999 magazinewe will endeavour to publish a selection of prize-winningprojects. This will be an international choice, presentingCompetition entries we received from many countries inwhich Elektor Electronics (or its sister magazines) is read, inother words, from all over the world! As a matter of course,the project that won the International First prize will also beincluded (in condensed form).A number of prize-winning Competition entries will becopied integrally onto a CD-ROM which we hope to publishby early February 1999. Furthermore, a number of projectswill be discussed in greater detail in forthcoming (1999)issues of Elektor Electronics.

(990010-1)

1998 InternationalPC-SOFTWARE CONTEST

The Winners

Prize no. Description Sponsor Awarded to Project

1 Ultiboard Challenger Unlimited;value £1833

Ultimate Technology J. T. KokkorisTemperature Recorder; a wonderfully simpletemperature logger based on the DS1620transducer.

2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute535 Simulator; use this intuitive program tosimulate this CPU and others in the 80x51family.

3ANSI C Compiler for the 8051 +Source Level Simulator;value £1040

Crossware Products D. D. Aggelos UPIO; use the PC to control up to 8 relays.

4EMC Master Info CD, ExtendedVersion; value £775

EMC Master International O. KvindeslandLog2ps; a QSL card machine for the activeradio amateur.

5ADC-200 Multifunction TestInstrument; value £499

Pico Technology S. JonssonHell/CW Tx/Rx program; your PC turned intoa HellSchreiber (for radio amateurs).

6 (1) EMC Master Info CD; value £285 EMC Master International M. A. Wisintainer et al.Remote Experiments with PIC17C43; aremote, didactic laboratory wholly controlledby students via an Internet link.

6 EMC Master Info CD; value £285 EMC Master International M. HewittFrequency Counter on Printer port; for TTLpulses, max. frequency about 100 kHz on aP133 PC.

(2)

Page 2: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

electronics on-line

oscilloscope softwaresoundcard becomes A -D converter

The oscilloscope isgenerally recog-

nized as an indis-pensable test

instrument when itcomes to measur-

ing electrical quan-tities. However, as

an 'occasional'user, you may

object to forkingout £300 or more

for a 'scope. If yourestrict yourself torelatively low fre-quencies only, the PC

oscilloscope is a muchcheaper alternative.

7,511 d®.13? Edit 1DP60.3 Eel!)

111.4=;= Ifl:LIsIN1111

Y

Y2

YI '1.2 Pas

tD

mx

Trg LcM

:21MT

deb.!) T ig

IINE T-9d9rn.2 h i 11Ia IY 3 7 .W.AVE Idia.36ms dY1 71.7 V55.2

There are several ways of implement-ing an oscilloscope function on a PC.To mimic a 'real' oscilloscope, you usea special type of insertion card or anexternal box containing the requisiteamplifier stages and fast A -D convert-ers. For many applications, however, itis sufficient to be able to just view theoccasional low -frequency signal. Inthat case, consider exploiting thesoundcard installed in your computer.After all, it will typically have an inputamplifier and a stereo A -D converterwith a maximum sampling rate of44.1 kHz or even 48 kHz, and these arejust what you need to realize an oscil-loscope on your PC. Other ingredientsinclude an oscilloscope program forproper processing and displaying ofthe data supplied by the soundcard.Besides, this software should providethe user controls normally found on

an oscilloscope. With this in mind weset out to find PC -oscilloscope free -ware, shareware and affordable soft-ware on the Internet.If you want to keep things as simpleas possible, and you are satisfied withviewing just one signal, you will findthat Yukinon Yamasaki's sharewareprogram Graphic Level Meter goes along way. Besides a (pretty Spartan)two -channel oscilloscope, this Win-dows program offers three types ofVU meter. Registration is just $10, andthe download addresses may befound at:http://www.hitsquacLcom/smm/programs/Graphic Level_Meter/downloacl.shtmlA more sophisticated 'scope functionis offered by WinSpec32. This pro-gram offers more than just an oscillo-scope on your PC screen: being aspectrum analyser it also sports anFFT function. The front panel controlsthat appear on the screen allow you toset the sampling rate and trigger level,to mention but a few. The spectrumanalyser is even capable of producing3D plots. Registration costs $20 and

the download site is at:http://www.c3sys.detnon.co.uk/winspec.htmThe website run by PAS has a numberof measurement programs in store,including a spectrum analyser, a fre-quency generator and a signal analy-sis centre. Most programs also offer anoscilloscope function to view signalshapes. Although the programs are notas cheap as the two mentioned above,they do offer a lot, and the graphicpresentation is impressive. 14 -day trialversions of all programs may be down-loaded from:http://www.audio-software.comOscilloscope for Windows is aremarkable program by almost anystandard: firstly, it is free of charge;secondly, its size is less than 100 kB. Itoffers all normal 'scope functions: twochannels, an XY function, a spectrumanalyser, trigger controls, delay, mem-ory function, and lots more. The pro-gram was written by Konstantin Zel-dovich and may be downloaded fromthe Moscow server of the RussianState University:http://polly.phys.msu.su/- zeld/oscill.html

(985089-1)

12 Elektor Electronics 12/98

There are several ways of implement-ing an oscilloscope function on a PC.To mimic a ‘real’ oscilloscope, you usea special type of insertion card or anexternal box containing the requisiteamplifier stages and fast A-D convert-ers. For many applications, however, itis sufficient to be able to just view theoccasional low-frequency signal. Inthat case, consider exploiting thesoundcard installed in your computer.After all, it will typically have an inputamplifier and a stereo A-D converterwith a maximum sampling rate of44.1 kHz or even 48 kHz, and these arejust what you need to realize an oscil-loscope on your PC. Other ingredientsinclude an oscilloscope program forproper processing and displaying ofthe data supplied by the soundcard.Besides, this software should providethe user controls normally found on

an oscilloscope. With this in mind weset out to find PC-oscilloscope free-ware, shareware and affordable soft-ware on the Internet.If you want to keep things as simpleas possible, and you are satisfied withviewing just one signal, you will findthat Yukinon Yamasaki’s sharewareprogram Graphic Level Meter goes along way. Besides a (pretty Spartan)two-channel oscilloscope, this Win-dows program offers three types ofVU meter. Registration is just $10, andthe download addresses may befound at:http://www.hitsquad.com/smm/programs/Graphic_Level_Meter/download.shtmlA more sophisticated ‘scope functionis offered by WinSpec32. This pro-gram offers more than just an oscillo-scope on your PC screen: being aspectrum analyser it also sports anFFT function. The front panel controlsthat appear on the screen allow you toset the sampling rate and trigger level,to mention but a few. The spectrumanalyser is even capable of producing3D plots. Registration costs $20 and

the download site is at:http://www.c3sys.demon.co.uk/winspec.htmThe website run by PAS has a numberof measurement programs in store,including a spectrum analyser, a fre-quency generator and a signal analy-sis centre. Most programs also offer anoscilloscope function to view signalshapes. Although the programs are notas cheap as the two mentioned above,they do offer a lot, and the graphicpresentation is impressive. 14-day trialversions of all programs may be down-loaded from:http://www.audio-software.comOscilloscope for Windows is aremarkable program by almost anystandard: firstly, it is free of charge;secondly, its size is less than 100 kB. Itoffers all normal ‘scope functions: twochannels, an XY function, a spectrumanalyser, trigger controls, delay, mem-ory function, and lots more. The pro-gram was written by Konstantin Zel-dovich and may be downloaded fromthe Moscow server of the RussianState University:http://polly.phys.msu.su/~zeld/oscill.html

(985089-1)

12 Elektor Electronics 12/98

oscilloscope software

electronics on-lineelectronics on-line

soundcard becomes A-D converterThe oscilloscope is

generally recog-nized as an indis-

pensable testinstrument when itcomes to measur-

ing electrical quan-tities. However, as

an ‘occasional’user, you may

object to forkingout £300 or more

for a ‘scope. If yourestrict yourself torelatively low fre-quencies only, the PC

oscilloscope is a muchcheaper alternative.

Page 3: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

GENE INTEREST

anemometerbased on Hall -effect sensor

An anemometer is not aninstrument one finds inmany homes. It is onlythose whose hobby is

sailing, surfing or meteo-rology who find an

anemometer a desirableinstrument. Since a good

anemometer is fairlyexpensive, it is well worthwhile to consider buildingone yourself. The designpresented here has been

tested in all kinds ofweather during which it

stood up well and provedits worth.

INTRODUCTIONAn anemometer is, in general, aninstrument for measuring the rate offlow of a gas. More particularly, inmeteorology, it is an instrument formeasuring the speed of the wind. Acommon type consists of four hemi-spherical cups carried at the ends offour radial arms pivoted so as to becapable of rotation in a horizontalplane, the speed of rotation being indi-cated on a dial calibrated to read windspeed directly. An anemograph recordsthe speed and sometimes the directionof the wind.

A different type is the hot-wireanemometer which is based on an elec-trically heated wire that is cooled bythe fluid or gas passing around it. The

Design by R. Veltkamp

faster the flow, the lower the tempera-ture of the wire and the lower its resis-tance. So, the rate of flow can be calcu-lated by measuring the resistance ofthe wire.

In yet another, simple, version, theforce of the wind is used to depress aplate suspended from a spring. Anychange in the length of the springforms a directly readable measure ofthe wind speed. Such an instrument is,however, not terribly accurate.

Most practical meteorologicalanemometers consist of two distinctparts: a sensor and an indicator or dial.The sensor normally consists of anassembly of three or four hemispheri-cal cups mentioned earlier.

The rotary movement of the sensorcan be translated into an electrical signalin various ways. For instance, a lightbarrier or reflection sensor may beused to scan the light/dark pattern pro-duced by a crenellated disk on a spin-

dle. Another method is the use of asmall magnet mounted on a spindle togenerate pulses in a pickup coil or reedrelay as seen in certain speedometersfor bicycles. Yet another, and a very reli-able, method is used in the presentdesign. In this, a rotating small magnetis combined with a Hall -effect sensor.

FREQUENCY COUNTERThe basic setup of the anemometer isshown in the block diagram in Fig-ure 1. This shows that the electronicpart is very simple and, indeed, in thistype of design the mechanical work isinvariably the most tedious. In essence,the electronic part is nothing more thana frequency counter. The pulses gener-ated by the rotating magnet in the Hall -effect sensor are counted in relation totime, then decoded, and finally appliedto a light -emitting diode (LED) display.The display is calibrated in m s-1.

The simplicity of the electronic cir-

14 Elektor Electronics 12/98Elektor Electronics 12/98

faster the flow, the lower the tempera-ture of the wire and the lower its resis-tance. So, the rate of flow can be calcu-lated by measuring the resistance ofthe wire.

In yet another, simple, version, theforce of the wind is used to depress aplate suspended from a spring. Anychange in the length of the springforms a directly readable measure ofthe wind speed. Such an instrument is,however, not terribly accurate.

Most practical meteorologicalanemometers consist of two distinctparts: a sensor and an indicator or dial.The sensor normally consists of anassembly of three or four hemispheri-cal cups mentioned earlier.

The rotary movement of the sensorcan be translated into an electrical signalin various ways. For instance, a lightbarrier or reflection sensor may beused to scan the light/dark pattern pro-duced by a crenellated disk on a spin-

dle. Another method is the use of asmall magnet mounted on a spindle togenerate pulses in a pickup coil or reedrelay as seen in certain speedometersfor bicycles. Yet another, and a very reli-able, method is used in the presentdesign. In this, a rotating small magnetis combined with a Hall-effect sensor.

F R E Q U E N C Y C O U N T E RThe basic setup of the anemometer isshown in the block diagram in Fig-ure 1. This shows that the electronicpart is very simple and, indeed, in thistype of design the mechanical work isinvariably the most tedious. In essence,the electronic part is nothing more thana frequency counter. The pulses gener-ated by the rotating magnet in the Hall-effect sensor are counted in relation totime, then decoded, and finally appliedto a light-emitting diode (LED) display.The display is calibrated in m s–1.

The simplicity of the electronic cir-

An anemometer is not aninstrument one finds inmany homes. It is onlythose whose hobby is

sailing, surfing or meteo-rology who find an

anemometer a desirableinstrument. Since a good

anemometer is fairlyexpensive, it is well worthwhile to consider buildingone yourself. The designpresented here has been

tested in all kinds ofweather during which it

stood up well and provedits worth.

14

Design by R. Veltkamp

anemometer based on Hall-effect sensor

GENERAL INTEREST

I N T R O D U C T I O NAn anemometer is, in general, aninstrument for measuring the rate offlow of a gas. More particularly, inmeteorology, it is an instrument formeasuring the speed of the wind. Acommon type consists of four hemi-spherical cups carried at the ends offour radial arms pivoted so as to becapable of rotation in a horizontalplane, the speed of rotation being indi-cated on a dial calibrated to read windspeed directly. An anemograph recordsthe speed and sometimes the directionof the wind.

A different type is the hot-wireanemometer which is based on an elec-trically heated wire that is cooled bythe fluid or gas passing around it. The

Page 4: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

cuits indicated in the block diagram isreflected in the circuit diagram in Fig-ure 2.

The circuit is based on a TypeMC14553B counter, IC2, to which thepulses from the Hall-effect sensor areapplied via pin header K1 and Schmitttrigger IC1a. Circuit IC2 consists ofthree binary-coded decimal (BCD)counters that are triggered by the trail-ing edges of the incoming pulses. Thecounters are cascaded in synchrony. A

four-fold latch at the output of eachcounter enables any selected countingresult to be stored. This information isthen multiplexed into a single BCDcoded output.

The counter state is stored in thelatches when the input to the relevantlatch is high. The data stored in thelatches are read after the counters havebeen reset, provided that the latchenable input (pin 10) remains highduring the whole reset cycle.

15Elektor Electronics 12/98

decoder

980079 - 11

counter

oscillator

Hall-effectsensor

1

Figure 1. A simple frequencycounter is used to determine thenumber of pulses induced by arotating magnet in a Hall-effectsensor. The magnet is rotated bythe wind via a hemispherical cupassembly.

LD1

10 a9

b7

c5

d4

e2

f1

g

8 3

6

CA CA

dp

HD1105

LD2

10 a9

b7

c5

d4

e2

f1

g

8 3

6

CA CA

dp

HD11050

LD3

10 a9

b7

c5

d4

e2

f1

g

8 3

6

CA CA

dp

HD1105074HCT4543

BCD/7SEG

[ T ]

IC3

9D,1

9D,2

9D,4

9D,8

N10

a10

b10

c10

d10

e10

f10

g1014

15

13

12

11

10C9

EN

1

5

4

6

7

9

3

2

R11100Ω

R12100Ω

R13100Ω

R10100Ω

R14100Ω

R15100Ω

R16100Ω

C9

1n

R9

33

T1

BC557

T2

BC557

T3

BC557

R8

22k

R7

22k

R6

22k

CTR14

IC5

4060

CT=0

RCX10

11

12

15

13

14

11

13

12

CTCX

RX

!G

1

6

4

5

7

9

3

4

5

6

7

8

9

3

2

+R4

4k7

R5

1M

500k

P1

C1

10n

JP2

JP3

JP1

3 41

IC1b

13 121

IC1f

11 101

IC1e

5

6

1

IC1c9

8

1

IC1d

IC2

4553

RST

DIS

C1B

CLK

C1A

DS1 DS3DS21413

12 11

10

Q0

Q1

Q2

OF

Q3

LE

15

5

6

7

94

3

2 1

121

IC1a

C3

4n7

R3

4k

7 R2

4k

7

C2

1n

K1

K2D1

1N4001C4

22µ63V

C7

10µ63V

C5

100n

C6

100n

7805

IC4

R1

10

k

IC1

14

7

IC2

16

8

IC3

16

8

IC5

16

8

C10

100n

C11

100n

C8

100n

IC1 = 40106

5V

5V

5V5V

5V

5V

980079 - 12

2

Figure 2. The circuit of the elec-tronic part of the anemometer isbased on counter IC2.

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

Page 5: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

3

Figure 3. Populating the printed -circuitboard for the electronic part of theanemometer is absolutely straightfor-ward. The board is, however, not availableready-made. A

It will be clear that the measure-ment interval is equal to the time lapsebetween resetting and latching. Thistime lapse is determined by oscillatorIC5, which gives the requisite switch-ing pulses to IC2 inputs LE and RST.Since IC5 also contains a 14 -bit binarycounter, it is possible to use a muchhigher oscillator frequency thanneeded for the requisite measurementtime, which improves the overall sta-bility. The pin jumpers, JP1-JP3, at therelevant outputs of IC5 enable settingan oscillator frequency that is x 28, x 29,or x210 higher than needed for themeasurement time.

The required positions of the pinjumpers and the frequency set with P1depend entirely on the construction ofthe hemispherical cup assembly.Assuming a maximum readout of99.9 m s-1, and two sensor pulses perrevolution, the basic requisite fre-quency in the prototype worked out at82.6 Hz, which is multiplied by x210(JP3 closed - other two jumpers open).

In some cases it may be necessary toalter the value of one or more compo-nents in the oscillator circuit. The oscil-lator frequency, fo, is given by:

fo = 1/2.3C1(R4+Pj) [Hz).

Parts list

Resistors:Ri = 10 k52R2 -R4 = 4.7 k52R5 = 1 Mf2R6 -R8 = 22 k52R9 = 330 52

R10 -R16 = 100 f2P1 = 500 (470) k52 preset poten-tiometer

Capacitors:C1 = 0.01 µF, ceramicC2, C9 = 0.001 µF, pitch 5 mmC3 = 0.0047 µF, pitch 5 mmC4 = 22 µF, 40 V, radialC5, C6, C8, C10, C11 = 0.1 µF,

ceramicC7 = 10 µF, 63 V, radial

Semiconductors:D1 = 1N4001T1 -T3 = BC557B

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

Miscellaneous:Hall -effect sensor = OHN3040U

(TRW)LD1-LD3 = HD11050, Class >LK1 = 3 -way pin headerK2 = 2 -way terminal block for PCBmounting

Mains adaptor: >9 V, 300 mAJP1-JP3 = 2.54 mm pin strip with pin

jumperRoller bearingMagnets 7 mm long, 15 mm dia.Set ringBrass spindle, 4 mm dia.

Note that, strictly speaking, the valueof R5 needs to be 2-10 times that ofR4+Pi. In practice, this is not very crit-ical, however.

The BCD -to -7 -segment conversionis carried out by IC3, while the displayis formed by LD1-LD3.

Resistors R10-R16 prevent the cur-rent through each of the display diodesexceeding 10 mA.

POWER SUPPLYPower for the anemometer is providedby a mains adaptor with an output ofnot less than 9 V This voltage is regu-lated by IC4 at 5 V

CIRCUIT BOARDThe electronic circuits are best assem-bled on the printed -circuit board inFigure 3. As this board is not availableready-made, it needs to be producedprivately.

Note that the board just visible inthe introductory photograph is that ofthe first prototype and deviates insome important points from thatshown in Figure 3.

1 6 Elektor Electronics 12/98

Note that, strictly speaking, the valueof R5 needs to be 2–10 times that ofR4+P1. In practice, this is not very crit-ical, however.

The BCD-to-7-segment conversionis carried out by IC3, while the displayis formed by LD1–LD3.

Resistors R10–R16 prevent the cur-rent through each of the display diodesexceeding 10 mA.

P O W E R S U P P L YPower for the anemometer is providedby a mains adaptor with an output ofnot less than 9 V. This voltage is regu-lated by IC4 at 5 V.

C I R C U I T B O A R DThe electronic circuits are best assem-bled on the printed-circuit board inFigure 3. As this board is not availableready-made, it needs to be producedprivately.

Note that the board just visible inthe introductory photograph is that ofthe first prototype and deviates insome important points from thatshown in Figure 3.

16 Elektor Electronics 12/98

(C) ELEKTOR

980079-1

C1

C2

C3

C4

C5

C6

C7

C8

C9

C10

C11

D1

H1

H2H3

H4

IC1 IC

2

IC3

IC4

IC5

JP1

JP2

JP3

K1

LD1

LD2

LD3

P1

R1

R2

R3

R4

R5R6R7

R8

R9R10R11R12R13R14R15R16

T1

T2

T3

0 +

980079-1

(C) ELEKTOR

980079-1

3

Figure 3. Populating the printed-circuitboard for the electronic part of theanemometer is absolutely straightfor-ward. The board is, however, not availableready-made.

Parts list

Resistors:R1 = 10 kΩR2–R4 = 4.7 kΩR5 = 1 MΩR6–R8 = 22 kΩR9 = 330 ΩR10–R16 = 100 ΩP1 = 500 (470) kΩ preset poten-

tiometer

Capacitors:C1 = 0.01 µF, ceramicC2, C9 = 0.001 µF, pitch 5 mmC3 = 0.0047 µF, pitch 5 mmC4 = 22 µF, 40 V, radialC5, C6, C8, C10, C11 = 0.1 µF,

ceramicC7 = 10 µF, 63 V, radial

Semiconductors:D1 = 1N4001T1–T3 = BC557B

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

Miscellaneous:Hall-effect sensor = OHN3040U

(TRW)LD1–LD3 = HD11050, Class >LK1 = 3-way pin headerK2 = 2-way terminal block for PCB

mountingMains adaptor: >9 V, 300 mAJP1–JP3 = 2.54 mm pin strip with pin

jumperRoller bearingMagnets 7 mm long, 15 mm dia.Set ringBrass spindle, 4 mm dia.

It will be clear that the measure-ment interval is equal to the time lapsebetween resetting and latching. Thistime lapse is determined by oscillatorIC5, which gives the requisite switch-ing pulses to IC2 inputs LE and RST.Since IC5 also contains a 14-bit binarycounter, it is possible to use a muchhigher oscillator frequency thanneeded for the requisite measurementtime, which improves the overall sta-bility. The pin jumpers, JP1–JP3, at therelevant outputs of IC5 enable settingan oscillator frequency that is ×28, ×29,or ×210 higher than needed for themeasurement time.

The required positions of the pinjumpers and the frequency set with P1depend entirely on the construction ofthe hemispherical cup assembly.Assuming a maximum readout of99.9 m s–1, and two sensor pulses perrevolution, the basic requisite fre-quency in the prototype worked out at82.6 Hz, which is multiplied by ×210

(JP3 closed – other two jumpers open).In some cases it may be necessary to

alter the value of one or more compo-nents in the oscillator circuit. The oscil-lator frequency, fo, is given by:

fo = 1/2.3C1(R4+P1) [Hz).

Page 6: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

M E C H A N I C A LC O N S T R U C T I O NIn its simplest form, the hemisphericalcup assembly may be made from arotor with three equidistant (120°) armsto each of which half a table tennis ballis glued (see Figures 1 and 4). A smallmagnet should be glued to the centralaxis, whereupon the Hall-effect sensoris mounted so that the distancebetween it and the small magnet is anabsolute minimum.

For good and accurate perfor-mance, it is, of course, essential that thespindle moves as frictionless as possi-ble. In the prototype, use is made of aroller (ball) bearing, combined with amagnetic trunnion to remove any axialpressure. If the magnets are not strongenough to bear the weight of the cupassembly, two or three on top of eachother may be used.

In the prototype, hemisphericalcups with a diameter of 47 mm areused. These are simply bolted to a spe-cial flange that serves as cover. Theassembly is shown in diagrammaticform in Figure 4. The most importantaspects are that the bearing is of goodquality and that the Hall-effect sensoris positioned correctly.

C A L I B R A T I O N A N DI N S T A L L A T I O NThe instrument can be set up correctlyonly with reference to a calibratedanemometer. Start by placing pinjumper JP2 (leaving the other twoopen) and check that the correct valuecan be obtained by adjusting P1. If themeasurement is too large, remove JP2and place JP1 or JP3. Again adjust P1until the correct value is obtained. Inthe rare instance that the instrumentcan not be calibrated in this manner, itmay be necessary to change the valuesof R4 and C1 to some extent.

Positioning the instrument correctlyis, of course, of paramount importance.High buildings in the immediate vicin-ity lead undoubtedly to poor andunpredictable results. It is advisable toplace the hemispherical cup assemblyas high as possible on a sturdy mast.Strictly speaking, an anemometershould be placed at a height of 10metres (33 ft) in an open area.

[980079]

17Elektor Electronics 12/98

Figure 4. A roller bearing isused in the prototype toensure frictionless transferof the windpower into rota-tional speed of the magnet.

Hall-effect sensorWhen a current-carrying conductor or semiconductor is placed in a magneticfield, a potential difference is generated between the two opposed edges of theconductor or semiconductor in a direction mutually perpendicular to both thefield and the conductor or semiconductor. This effect is called the Hall effect,and the generated voltage, the Hall voltage. The voltage level depends on thekind and thickness of the conductor or semiconductor material, the magnitudeof the current, and the strength of the magnetic field.

A Hall element is very suitable for use as a contact-less switch and as testprobe for measuring direct currents. Since, in contrast to inductors, the voltagegenerated by the magnetic influence does not depend on the speed with whichthe field changes, a Hall-effect sensor is eminently suitable for measuring relativelyslowly changing or even stable magnetic fields.

The Hall-effect sensor used in the anemometer is a Type OHN3040U fromTRW, 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 overa 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 familyusing power supplies ranging from 4.5 V to 24 V. The output amplitude is con-stant at switching frequencies from d.c. to over 200 kHz.

OHN3040UOHS3040U

1 2 3

980079 - 14

OUTPUT

GROUND

REG.

CC1

3

2

V

55.5 mm

magnet

magnet

Hall-effect sensor

stripboard

spindle, 4 mm

ball bearing

set ring

980079 - 13

47

4

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

Page 7: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

Elektor Electronics 12/98

The RF signal generator is a quite com-plex instrument, and we should reallyadvise beginners not to attempt tobuild this project without the help orguidance of someone with consider-able experience in building RF andmicrocontroller circuits.

There are no fewer than four boardsto build up, and each of these boardscontains a fair number of components.Add to that the mounting of the fourboards in a case and the inter-board

Although the main subject of this month’ssecond and final instalment is ‘all matters

constructional’, there’s also information onadjusting the instrument and, of course, on

how to use it!

20

Design by G. Brunner

RF signal generatorpart 2 (final): construction,operation and adjustment

RADIO, TELEVISION & VIDEO

Figure 6. Copper tracklayout and componentoverlay of the powersupply board.

(C) ELEKTOR980053-4

C1

C2

C3

C4

C5

C6 C7

C8C9

C10 C11

C12

C13

D1

D2

D3

D4

D5

D6

D7

D8

IC1

IC2

K1

R1

R2

R3

R4

R5

T1

TR1

0 +30V +5V+12V

980053-4

~

~

(C) ELEKTOR980053-4

Page 8: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

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

COMPONENTS LIST

POWER SUPPLY BOARD

Resistors:R1 =22Q 5WR2 =270QR3 =820QR4 =1kQR5 =10kQ

Capacitors:C1 -C4 =47nFC5 =1000µF 35V radial

C6,C8 =220nF MKTC7,C9 =?uF2 16V radialC10 = 470,uF 63V radialC11 = 220,uF 63V radialC12 = 1,uF 63V radialC13 = 10,uF 63V radial

Semiconductors:D1 -D6 = 1N4001D7 = 33V 400mW zener diodeD8 = LED, red, high efficiencyT1 = BC141IC1 = 7812

IC2 = LM317T

Miscellaneous:TR1 = mains transformer, 15V 8VA,

Monacor/Monarch type VTR8115K1 = PCB terminal block, 2 -way, raster

7.5mmK2 = mains socket, integral switch and

fuseholder, with fuse 63mATHeatsink type SK59 37.5mm (Fischer,

Dau Components)PCB, order code 980053-4 (see Read-

ers Services page)

7

Figure 7. Finished PSUboard (prototype).

wiring, and you are looking at a projectwhich should take even advanced hob-byists several hours, winter evenings orrainy Sunday afternoons to complete.

The four boards are built up one byone in the order indicated by the textto follow As usual, great care should betaken to fit each and every part in theright position on the board. The com-ponent overlays and associated partslist should guide you through theprocess of assembling the boards. Par-ticularly with the 1% resistors in theattenuator section, you should (1)ascertain the value and (2) look up theposition on the board, before (3) fittingany resistor.

POWER SUPPLY BOARDThis board is the simplest to build. Pop-

RES

0 IL: rcr.r.434

3(L111

' 1PP11.1.1.1.1.)

ulating it should be straightforward,using the relevant Components Listand the component overlay shown inFigure 6. Resistor R1 may run fairly hotand should not touch the circuit board.The LM317T voltage regulator may bemounted directly on to the heatsink -an insulating washer is not required.The 'power on' LED is not fitteddirectly on the board - instead, it isconnected up via a pair of thin wireswith an length of about 20 cm.

This board is simple to test by pro-visionally connecting it to the mainsand using a voltmeter to check theindicated output voltages: +5 V, +30 Vand +12V The finished PSU board isshown in Figure 7. Check your workagainst this photograph!

CONTROLLER BOARDThe controller boardshown in Figure 8 is far I Figure 8. Co

board artwork.

C4

0 0 0e Le, N. CDCC" CC" CC" CC"

Vi

0 0 0 0 0 0bp

CL

n A

11

R9

R7

R13R15R17R19R21

00000000000000

R10R8

R6

R12R14R16

: rG.

Man L;h5/K1

7114 zliT

ai._' P1k

C6

7

01 out

0in -7RS232

S1

more densely populated than the PSUboard. Hence, great care and precisionis required when it comes to solderingthe parts in place.

Start with the two wire links on theboard - you'll find them near presetP1. Next, fit the components, the bestorder is probably from low -profileparts (resistors, IC sockets) to uprightmounted parts (crystal, transistors,radial electrolytic capacitors).

The three push -buttons, 51, S2 andS3, are not mounted directly on to theboard. Their pins are inserted in socketstrips or stacked IC sockets so that theirheight can be adjusted a little. Alterna-tively, their pins are 'lengthened' usingpieces of stiff wire. This is necessary toenable the cap tops to protrude a littlethrough the front panel. The samemounting method is used for LCD. As

with the push -buttons,the height of the LCD

c-czooseF101313J3 (3)

S2 l S3

S4

0 O 00

980053-3

0 S S

Elektor Electronics 12/98 21

wiring, and you are looking at a projectwhich should take even advanced hob-byists several hours, winter evenings orrainy Sunday afternoons to complete.

The four boards are built up one byone in the order indicated by the textto follow. As usual, great care should betaken to fit each and every part in theright position on the board. The com-ponent overlays and associated partslist should guide you through theprocess of assembling the boards. Par-ticularly with the 1% resistors in theattenuator section, you should (1)ascertain the value and (2) look up theposition on the board, before (3) fittingany resistor.

P O W E R S U P P L Y B O A R DThis board is the simplest to build. Pop-

ulating it should be straightforward,using the relevant Components Listand the component overlay shown inFigure 6. Resistor R1 may run fairly hotand should not touch the circuit board.The LM317T voltage regulator may bemounted directly on to the heatsink —an insulating washer is not required.The ‘power on’ LED is not fitteddirectly on the board — instead, it isconnected up via a pair of thin wireswith an length of about 20 cm.

This board is simple to test by pro-visionally connecting it to the mainsand using a voltmeter to check theindicated output voltages: +5 V, +30 Vand +12V. The finished PSU board isshown in Figure 7. Check your workagainst this photograph!

C O N T R O L L E R B O A R DThe controller boardshown in Figure 8 is far

more densely populated than the PSUboard. Hence, great care and precisionis required when it comes to solderingthe parts in place.

Start with the two wire links on theboard — you’ll find them near presetP1. Next, fit the components, the bestorder is probably from low-profileparts (resistors, IC sockets) to uprightmounted parts (crystal, transistors,radial electrolytic capacitors).

The three push-buttons, S1, S2 andS3, are not mounted directly on to theboard. Their pins are inserted in socketstrips or stacked IC sockets so that theirheight can be adjusted a little. Alterna-tively, their pins are ‘lengthened’ usingpieces of stiff wire. This is necessary toenable the cap tops to protrude a littlethrough the front panel. The samemounting method is used for LCD. As

with the push-buttons,the height of the LCD

21Elektor Electronics 12/98

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

980053-3(C) ELEKTOR

C1

C2

C3

C4C5

C6

C7

C8

C9

C10

C11

C12

H1

H3

H4

H5

H6

H7

H8

IC1 IC2

K1

P1

R1

R2

R3R4

R5

R6R7R8R9

R10R11

R12R13R14R15R16R17R18R19R20R21

R22

R23

R24

R25

R26

R27

R28

R29

S1 S2 S3

S4

T1

T2

T3

T4

T5

T6

T7

T8

T9 T10 T11 T12

X1

0

+5V

RES

C BA

T0

P2.4

ALE

PSenLock

T

out in

980053-3

A8A7A6A5A4A3A2A1

B2 B3 B4 B5

RS232

Figure 7. Finished PSUboard (prototype).

Figure 8. Controllerboard artwork.

7

COMPONENTS LIST

POWER SUPPLY BOARD

Resistors:R1 =22Ω 5WR2 =270ΩR3 =820ΩR4 =1kΩR5 =10kΩ

Capacitors:C1-C4 =47nFC5 =1000µF 35V radial

C6,C8 =220nF MKTC7,C9 =2µF2 16V radialC10 = 470µF 63V radialC11 = 220µF 63V radialC12 = 1µF 63V radialC13 = 10µF 63V radial

Semiconductors:D1-D6 = 1N4001D7 = 33V 400mW zener diodeD8 = LED, red, high efficiencyT1 = BC141IC1 = 7812

IC2 = LM317T

Miscellaneous:TR1 = mains transformer, 15V 8VA,

Monacor/Monarch type VTR8115K1 = PCB terminal block, 2-way, raster

7.5mmK2 = mains socket, integral switch and

fuseholder, with fuse 63mATHeatsink type SK59 37.5mm (Fischer,

Dau Components)PCB, order code 980053-4 (see Read-

ers Services page)

Page 9: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

9 00

801N212 (a)

E-ES0086

0

0

0

COMPONENTS LIST

CONTROLLER BOARD

Resistors:R1 = 22k52R2,R3,R4 = 4k527R5 = 10k52 8 -way SIL arrayR6,R8,R10,R12,R14,R16,R18,R20,R22,R24,R26,R28 = 1k52

R7,R9,R11,R13,R15,R17,R19,R21,R23,R25,R27,R29 = 3k523

P1 =10k52 preset, H

Capacitors:C1 =1,uF 16V radialC2,C3 =33pFC4,C5,C12 =100nF ceramicC6 -C10 =10,uF 63V radialC11 = 220µF 16V

Semiconductors:T1 -T12 = BC557BIC1 =AT89C51-20PC orSC87C51CCN40 (order code 986515-1)

IC2 = MAX232

Miscellaneous:X1 = 11.059MHz crystalS1,S2,S3 = pushbutton, 1 make con-

tact, ITT type D6 -R -RD; cap type D6Q-RD-CAP (Eurodis)

K1 =14 way SIL pinheaderK2 =9 -way sub -D socket (female)S4 = rotary encoder, Bourns type

ECW1J-B24-AC0024 (Eurodis)LCD, 2x16 characters, Sharp type LM

16A211 (Eurodis)PCB, order code 980053-3 (see Read-ers Services page)

above the controller board may needto be adjusted later, so do not mount itsecurely as yet. The rotary switchencoder, S4, is mounted directly on tothe board, but its spindle is not yet cutoff. Later, rectangular clearances are cutin the front panel to allow the LCD tobe viewed, and the push -buttons to bepressed.

It is recommended to use socketsfor IC1 and IC2. All holes in the PCBwith a label printed near it (like Al, TO,Psen, Lock, etc.) are for inter -boardwires. Solder pins are not strictly nec-essary - direct wire connections to theboard are also fine. As with the PSUboard, check your work against ourfully working prototype. This time,refer to the photograph in Figure 9.The board is fitted vertically behind themetal front plate (which has to be pur-chased separately). It is held in positionby a pair of slots moulded on the bot-

tom plate of the case. Several slots areavailable, and the pair you actuallychoose to use should ensure that themetal frame around the face of theLCD is pressed firmly against theinside of the front panel. The threetype 'D6' push -buttons should thenprotrude a little from the front panel.

The holes marked 'In', 'Out' and'ground' to the right of preset P1 arefor an optional 3 -wire RS232 link to aPC. If you do not require PC control,the MAX232 may be omitted. The prac-tical use of the RS232 interface will bereverted to further on.

VFO/PLL BOARDAs you can see from the PCB artworkin Figure 10, this is the board with thehighest component density of all four.Care and precision are essential if youwant to avoid a tedious faultfindingsession. Identify and check each part

before fitting it, and double-check itsvalue and position using the Compo-nents List and the component overlay.

As usual, start with the wire links(there are three), so they are not for-gotten or overlooked. Then follow thelow -profile parts and, finally, the verti-cally mounted parts. IC sockets shouldnot be used for the NE592 and theSAA1057 on this board.

The value of the inductors is usuallyprinted on these parts in the form ofcolour bands (like resistors) or dots.

The PLL/VFO board is fitted in atinplate enclosure from Teko. After thesolder work, inspect the board, andcompare yours with our prototypeshown in Figure 11.

Figure 9. Finished con-troller board (proto-type).

22 Elektor Electronics 12/98

above the controller board may needto be adjusted later, so do not mount itsecurely as yet. The rotary switchencoder, S4, is mounted directly on tothe board, but its spindle is not yet cutoff. Later, rectangular clearances are cutin the front panel to allow the LCD tobe viewed, and the push-buttons to bepressed.

It is recommended to use socketsfor IC1 and IC2. All holes in the PCBwith a label printed near it (like A1, T0,Psen, Lock, etc.) are for inter-boardwires. Solder pins are not strictly nec-essary — direct wire connections to theboard are also fine. As with the PSUboard, check your work against ourfully working prototype. This time,refer to the photograph in Figure 9.The board is fitted vertically behind themetal front plate (which has to be pur-chased separately). It is held in positionby a pair of slots moulded on the bot-

tom plate of the case. Several slots areavailable, and the pair you actuallychoose to use should ensure that themetal frame around the face of theLCD is pressed firmly against theinside of the front panel. The threetype ‘D6’ push-buttons should thenprotrude a little from the front panel.

The holes marked ‘In’, ‘Out’ and‘ground’ to the right of preset P1 arefor an optional 3-wire RS232 link to aPC. If you do not require PC control,the MAX232 may be omitted. The prac-tical use of the RS232 interface will bereverted to further on.

V F O / P L L B O A R DAs you can see from the PCB artworkin Figure 10, this is the board with thehighest component density of all four.Care and precision are essential if youwant to avoid a tedious faultfindingsession. Identify and check each part

before fitting it, and double-check itsvalue and position using the Compo-nents List and the component overlay.

As usual, start with the wire links(there are three), so they are not for-gotten or overlooked. Then follow thelow-profile parts and, finally, the verti-cally mounted parts. IC sockets shouldnot be used for the NE592 and theSAA1057 on this board.

The value of the inductors is usuallyprinted on these parts in the form ofcolour bands (like resistors) or dots.

The PLL/VFO board is fitted in atinplate enclosure from Teko. After thesolder work, inspect the board, andcompare yours with our prototypeshown in Figure 11.

22 Elektor Electronics 12/98

COMPONENTS LIST

CONTROLLER BOARD

Resistors:R1 = 22kΩR2,R3,R4 = 4kΩ7R5 = 10kΩ 8-way SIL arrayR6,R8,R10,R12,R14,R16,R18,R20,R22,R

24,R26,R28 = 1kΩR7,R9,R11,R13,R15,R17,R19,R21,R23,R

25,R27,R29 = 3kΩ3P1 =10kΩ preset, H

Capacitors:C1 =1µF 16V radialC2,C3 =33pFC4,C5,C12 =100nF ceramicC6-C10 =10µF 63V radialC11 = 220µF 16V

Semiconductors:T1-T12 = BC557BIC1 =AT89C51-20PC or

SC87C51CCN40 (order code 986515-1)

IC2 = MAX232

Miscellaneous:X1 = 11.059MHz crystalS1,S2,S3 = pushbutton, 1 make con-

tact, ITT type D6-R-RD; cap type D6Q-RD-CAP (Eurodis)

K1 =14 way SIL pinheaderK2 =9-way sub-D socket (female)S4 = rotary encoder, Bourns type

ECW1J-B24-AC0024 (Eurodis)LCD, 2x16 characters, Sharp type LM

16A211 (Eurodis)PCB, order code 980053-3 (see Read-

ers Services page)

Figure 9. Finished con-troller board (proto-type).

980053-3(C) ELEKTOR

9

Page 10: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

and the trimmer to the centre of theirtravel. It is assumed that the powersupply board has been tested already(with good results, of course).

After applying power, the first thingto do is set the LCD contrast with pre-set P1. Next, use an oscilloscope tocheck that the VFO/PLL board sup-plies an RF signal to the attenuatorboard.

The output frequency supplied bythe generator may be checked with acalibrated frequency meter, a fre-quency standard (off-air Rugby MSF orsimilar) or a calibrated SW receiver(zero-beat). The relevant adjustment istrimmer capacitor C33.

23Elektor Electronics 12/98

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

980053-1

(C) ELEKTOR

C1

C2

C3

C4

C5

C6

C7

C8

C9

C10C11

C12

C13

C14

C15 C16

C17

C18

C19

C20

C21 C22

C23C24

C25

C26

C27

C28

C29

C30C31

C32

C33

C34

C35

C36

C37

C38

C39

C40

D1

D2

D3

D4

D5

D6

D7

D8

D9

D10

D11 D

12

H1 H2

H3H4

IC1 IC2

IC3

L1

L2

L3

L4

L5

L6L7

L8

P1

R1

R2

R3

R4

R5

R6

R7

R8

R9

R10R11

R12

R13

R14

R15

R16

R17

R18

R19R20

R21

R22

R23

R24R25

R26

R27 R

28R

29R

30

R31

R32

R33

R34

R35

R36R37

R38

R39

R40

R41

R42T1T2

T3

T4T5

X1

0

0

T T T

OUTAMFM

+12V

+5V

B5

B4

B3

B2

980053-1

LOCK

AB C

+30V

980053-1

(C) ELEKTOR

10

Figure 10. VFO/PLLPCB design.

A T T E N U A T O R B O A R DThe main point to mind about assem-bling the attenuator board (Figure 12)is that each close-tolerance (1%) resis-tor goes to the right position on theboard. One error in this respect maycause wrong attenuation levels later,with possibly difficult to explain behav-iour of some of the radio equipmentyou may be aligning! Our advice is,therefore: read the Components Listcarefully, check the colour code, use aDMM to measure the value of each

resistor, and then check its position onthe board.

The attenuator board has relativelylarge copper areas to assist in screeningand preventing unwanted signals frombeing generated and picked up by thecircuit. The attenuator board is shownin Figure 11, together with theVFO/PLL board. For RF screening pur-poses, both boards are fitted in Tekotinplate cases.

A D J U S T M E N TThe boards may be wired up experi-mentally for an initial test and a fewadjustments.

To begin with, set the two presets

COMPONENTS LIST

VFO/PLL BOARD

Resistors:R1,R3,R5,R7,R12,R22,R23,R31,R34,R36

,R37 = 10kΩR2,R4,R6,R8 = 390ΩR9,R14,R15,R21,R27,R33,R40 = 1kΩR10,R41 = 330kΩR11,R13,R16,R18 = 100kΩR17,R26 = 100ΩR19 = 2MΩ2R20 = 1MΩR24,R25,R35 = 22kΩR28,R29 = 3kΩ3R30 = 560ΩR32 = 47ΩR38 = 180ΩR39 = 18kΩR42 = 10ΩP1 = 2kΩ multiturn preset, H

Capacitors:C1-C5,C10,C22 = 33nF ceramic

C6,C25,C30 = 2nF2 ceramicC7 = 220nF MKTC8,C9,C16,C23,C24 = 330pF ceramicC11 = 68pF ceramicC12,C18,C38 = 10µF 63V radialC13 =100nF ceramic 5mmC19,C27,C35,C39,C40 =100nF ceramicC14 = 180 p ceramic C15 = 27 p ceramic C17 = 33n ceramic 5mmC20,C32 = 47µF 16V radialC21 = 4n7 ceramic C26,C28 = 2µF2 16V radialC29,C31 = 10nF ceramic C33 = 40pF trimmerC34 = 100µF 10V radialC36 = 1µF MKTC37 = 330nF MKT

Inductors:L1 = 330µHL2 = 100µHL3 = 22µHL4 = 3µH9L5 = 0µH56

L6,L7 = 39µHL8 = 3µH3

Semiconductors:D1,D3,D5,D7 = 1N4148D2,D4,D6,D8 = BA243D9,D10 = BB130D11,D12 = AA113T1,T2,T3 = BF494T4 = BF256BT5 = 2N5179IC1 =NE592N (N14)IC2 = SAA1057 (Philips)IC3 = LM358P

Miscellaneous:X1 = 4MHzTinplate case, Teko, size 160x25x49mmCase, Bopla type Ultramas UM52011

(size 224x72x199mm)Front panel type FP50011 or FPK50011PCB, order code 980053-1 (see Read-

ers Services page)

Page 11: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

Adjustment of the RF signal level isonly possible if you have an accurateand calibrated RF voltmeter. With theattenuation set to 0 dB, preset P1 maybe adjusted for an output level of630 mV into 50 Q at the generatoroutput. Failing the necessary testequipment, you may leave the multi -turn preset at mid -travel.

Figure 12. AttenuatorPCB artwork.

CM I

Figure 11. Finished PLL/VFO board (below) and attenuator(above), both fitted in `Teko' ready-made tinplate cases

WIRING ANDMECHANICAL WORKAlthough there are quite a few wireconnections between the boards, thereare no special precautions in thisrespect. The RF signal connectionbetween the PLL/VFO board and theattenuator board must, of course, bemade in coax cable. The same goes forthe connections between the AM and

Cli1 I

FM inputs on the PLL/VFO board andthe associated BNC sockets on thefront panel. If you can get hold of it,use the 3 -mm dia. type RG174/U, else,the much thicker RG50/U or /CU is agood alternative.

All other inter -board connectionsare made in light -duty flexible wire orflatcable, although slightly thicker wireshould be used for the 0-V, 5-V and 12-

rict 430 \1ci \1\1\ 100\co cmc)17=1 17=1 17710(71 C) C) C) C)

(1 an MIMI LI.X. .X. *x (*) (*) 0 (*)

24 Elektor Electronics 12/98

980053-2

(C) ELEKTOR

D1 D2 D3 D4 D5 D6 D7 D8

H1

H2

H3

H4

OU

T

R1

R2

R3R4

R5

R6

R7

R8

R9R10

R11

R12

R13

R14

R15R16

R17

R18

R19

R20

R21R22

R23

R24

R25

R26

R27R28

R29

R30

R31

R32

R33R34

R35

R36

R37

R38

R39R40

R41

R42

R43

R44

R45R46

R47

R48

RE1 RE2 RE3 RE4 RE5 RE6 RE7 RE8

A8A7A6A5A4A3A2

A1

980053-2

0

T T

C1

C2 C3 C4 C5 C6 C7 C8

980053-2

(C) E

LEK

TOR

12

Figure 12. AttenuatorPCB artwork.

Adjustment of the RF signal level isonly possible if you have an accurateand calibrated RF voltmeter. With theattenuation set to 0 dB, preset P1 maybe adjusted for an output level of630 mVpp into 50 Ω at the generatoroutput. Failing the necessary testequipment, you may leave the multi-turn preset at mid-travel.

W I R I N G A N DM E C H A N I C A L W O R KAlthough there are quite a few wireconnections between the boards, thereare no special precautions in thisrespect. The RF signal connectionbetween the PLL/VFO board and theattenuator board must, of course, bemade in coax cable. The same goes forthe connections between the AM and

FM inputs on the PLL/VFO board andthe associated BNC sockets on thefront panel. If you can get hold of it,use the 3-mm dia. type RG174/U, else,the much thicker RG50/U or /CU is agood alternative.

All other inter-board connectionsare made in light-duty flexible wire orflatcable, although slightly thicker wireshould be used for the 0-V, 5-V and 12-

24 Elektor Electronics 12/98

11

Figure 11. Finished PLL/VFO board (below) and attenuatorboard (above), both fitted in ‘Teko’ ready-made tinplate cases.

Page 12: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

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

COMPONENTS LIST

ATTENUATOR BOARD

Resistors (all 1%):R1,R5,R21 = 9095R2,R6 = 20kQR3 = 6Q81R4 =39Q2R7,R11 = 4755R8,R12 = 6kQ19R9 = 368QR10 = 12Q1

R13,R17 = 243QR14,R18 = 2kQ74R15,R20,R24 = 3kQ65R16 = 24Q3R19,R23 = 121QR22 = 56Q2R25,R29,R31,R35,R37,R41,R43,R47

75QR26,R30,R32,R36,R38,R42,R44,R48

825QR27,R33,R39,R45 = 3kQ92R28,R34,R40,R46 = 1625 A

Capacitors:C1 -C8 = 100nF SMD

Semiconductors:D1 -D8 = 1N4148

Miscellaneous:RE1-RE8 = relay, 2 x change -over, type

V23042 -A1001-6101 or V23042 -A2001 -6101 Siemens (Eurodis, Elec-troValue)

PCB, order code 980053-2 (see Read -

V supply wiring. Do not make any ofthe wires longer than necessary to pre-vent digital noise being picked up fromthe controller board.

The wires and the coax cables toand from the PLL/VFO board and theattenuator board should pass throughholes drilled in the short side panels ofthe Teko tinplate cases. Once theseboards are fully operational, the topcovers are fitted for optimum RFscreening.

Guidance for mounting the fourboards into the Bopla enclosure maybe obtained from the photographs inthis article, and in particular, Figure 13.Note that the solder side of the powersupply board is protected by a perspexcover plate cut to roughly the samesize as the board. The VFO/PLL andattenuator boards are screened by tin-plate boxes, and mounted horizontally

13

on to the bottom plate of the enclosure.As already mentioned, the PSU boardis fitted vertically, using a pair of themoulded PCB slots towards the backpanel. The three holes at the 'empty'right-hand side of the controller boardare drilled to a diameter of about 8 mmto allow the coax cables to the threefront -panel mounted BNC sockets topass.

The mains voltage is switched onand off by a double -pole switch inte-grated into a mains socket fitted ontothe plastic rear panel of the enclosure.The wires between the mainssocket/switchcombination andthe PCB terminalblock on the PSUboard should bemains -rated andproperly iso-

lated. At the PCB side in particular, the'live' and 'neutral' wires should not bestripped longer than strictly necessary,and they should be inserted into theclamps right up to the insulation.Finally, once the wires are connected,the terminals on the mainssocket/switch combination must beinsulated using heat -shrink sleeving.

The metal front panel is cut, drilledand lettered using the template shownin Figure 13. This front panel foil is notavailable ready-made.

In the (ABS plastic) back panel, youhave to cut rectangular clearances for

the mainssocket/switchcombinationand, optionally,for the RS232connector (a 9 -pin sub -D type).

igure 13. A look inside our prootype of the RF Signal Generator.he covers of the tinplate casesf the VFO/PLL board and thetenuator board were removedr this photograph.

r

Elektor Electronics 12/98 25 L

V supply wiring. Do not make any ofthe wires longer than necessary to pre-vent digital noise being picked up fromthe controller board.

The wires and the coax cables toand from the PLL/VFO board and theattenuator board should pass throughholes drilled in the short side panels ofthe Teko tinplate cases. Once theseboards are fully operational, the topcovers are fitted for optimum RFscreening.

Guidance for mounting the fourboards into the Bopla enclosure maybe obtained from the photographs inthis article, and in particular, Figure 13.Note that the solder side of the powersupply board is protected by a perspexcover plate cut to roughly the samesize as the board. The VFO/PLL andattenuator boards are screened by tin-plate boxes, and mounted horizontally

on to the bottom plate of the enclosure.As already mentioned, the PSU boardis fitted vertically, using a pair of themoulded PCB slots towards the backpanel. The three holes at the ‘empty’right-hand side of the controller boardare drilled to a diameter of about 8 mmto allow the coax cables to the threefront-panel mounted BNC sockets topass.

The mains voltage is switched onand off by a double-pole switch inte-grated into a mains socket fitted ontothe plastic rear panel of the enclosure.The wires between the mainssocket / swi tchcombination andthe PCB terminalblock on the PSUboard should bemains-rated andproperly iso-

lated. At the PCB side in particular, the‘live’ and ‘neutral’ wires should not bestripped longer than strictly necessary,and they should be inserted into theclamps right up to the insulation.Finally, once the wires are connected,the terminals on the mainssocket/switch combination must beinsulated using heat-shrink sleeving.

The metal front panel is cut, drilledand lettered using the template shownin Figure 13. This front panel foil is notavailable ready-made.

In the (ABS plastic) back panel, youhave to cut rectangular clearances for

the mainssocket /switchc o m b i n a t i o nand, optionally,for the RS232connector (a 9-pin sub-D type).

25Elektor Electronics 12/98

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

13

Figure 13. A look inside our pro-totype of the RF Signal Generator.The covers of the tinplate casesof the VFO/PLL board and theattenuator board were removedfor this photograph.

COMPONENTS LIST

ATTENUATOR BOARD

Resistors (all 1%):R1,R5,R21 = 909ΩR2,R6 = 20kΩR3 = 6Ω81R4 =39Ω2R7,R11 = 475ΩR8,R12 = 6kΩ19R9 = 368ΩR10 = 12Ω1

R13,R17 = 243ΩR14,R18 = 2kΩ74R15,R20,R24 = 3kΩ65R16 = 24Ω3R19,R23 = 121ΩR22 = 56Ω2R25,R29,R31,R35,R37,R41,R43,R47 =

75ΩR26,R30,R32,R36,R38,R42,R44,R48 =

825ΩR27,R33,R39,R45 = 3kΩ92R28,R34,R40,R46 = 162Ω

Capacitors:C1-C8 = 100nF SMD

Semiconductors:D1-D8 = 1N4148

Miscellaneous:RE1-RE8 = relay, 2 x change-over, type

V23042-A1001-B101 or V23042-A2001-B101 Siemens (Eurodis, Elec-troValue)

PCB, order code 980053-2 (see Read-

Page 13: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

Figure 14. Suggested front -panel layout. Use it as a tem-plate to drill the metal frontpanel of the instrument, and

lipply the lettering/symbols.

OPERATIONThe instrument is controlled by meansof three pushbuttons and a rotaryencoder, all accessible on the frontpanel. The instrument communicates

with you via an LCDwith two lines of 16characters.

The functions ofthe left' and 'right'pushbuttons are self-evident, we reckon,because they movethe cursor on the LCdisplay in the direc-tion indicated by thearrows on the frontpanel

From the startingposition (cursor on`MHz'), the cursormay be moved to theleft on to any of thepost -decimal posi-tions of the fre-quency. The numberat which the cursorarrives may then bechanged by turningthe rotary encoder.The frequency set inthis way is howevernot actually gener-ated until you pressthe 'Enter' pushbut-ton (asynchronousoperation, this isindicated in theupper right-handcorner of the dis-play). After any fre-quency change, thePLL status is indi-cated by 'lock' in theleft-hand bottomcorner of the read-out.From the initial

position to the right,the cursor jumps to`MO' (memory 0).This indicates twomemories, MO andMl, in which fre-quency and attenua-tor settings may bestored. You press theEnter key to changebetween these mem-ories. In this way,you can quicklychange between twopreviously storedsettings, which maybe useful, for exam-

ple, for aligning a filter. Alternatively,you may use the same frequencytwice, but with two different attenua-tor settings. This facility is useful foradjusting, say, a receiver AGC (auto-matic gain control).

Moving further to the right, the cur-sor jumps on `asy'. Here you canswitch to asynchronous operation bypressing 'Enter'. In synchronousmode, any frequency changerequested by way of the rotary

encoder is immediately passed on tothe VFO/PLLunit. In this mode, the RFoutput frequency is continuouslyadju stable, but only within the selectedrange (one of five). If you turn theencoder to a frequency outside a cer-tain range, the PLL will drop out oflock, and the lock' indication will dis-appear from the LCD. By pressing anykey, the PLL is returned to asynchro-nous mode, and the last selected fre-quency is automatically restored. If youthen move the cursor to a decimal digitof the frequency readout, and press theEnter key, the generator changes to therelevant frequency range, allowing youto change to synchronous mode againand continue n in g ' again using con -tinu ou s frequency variation.

One more position to the right, thecursor reaches the 'dB' position, indi-cating the currently valid attenuation.The desired attenuation may be setwith the aid of the rotary encoder. Aswith the frequency setting, thedesired attenuation becomes effectiveonly when you press the Enter key.This is done to reduce wear and tearon the relays.

OPTIONALRS232 INTERFACEThe RS232 interface on the controllerboard is an optional extension whosefunction has not been fully developedout by the author/designer. Basically, itwas designed into the circuit to enablethe generator frequency and outputsignal attenuation to be controlled by aPC.

The communication parameters areas follows: 9600 bits/s, 8 data bits, 1

stop bit. The communication workswith character strings, and is easilytested with the aid of a terminal pro-gram. To set the frequency you have tosend an (for frequency'), then fivenumbers for the frequency in kilo-hertz, and, finally, a carriage -return(CHR$(13)). An additional Line -Feed(CHR$(10)) will be ignored. If every-thing is correct (first character is f', atotal of 6 characters and the frequencyin the right range), the controllerreturns a `D' (for 'done), followed bya CR-LF sequence, otherwise, an 'E'(for `error') and a CR-LF.

The attenuation is set by sending anA', two numbers and CR. Again thecontroller answers as described. Themain purpose of the serial interfacewas to create a basis for using the gen-erator in an environment like Lab -View TM.

ELEKTOR

240V 50Hz

No. 980053

F = 63mA T

(980053-2)

O P E R A T I O N

The instrument is controlled by meansof three pushbuttons and a rotarye n c o d e r, all accessible on the frontpanel. The instrument communicates

with you via an LCDwith two lines of 16c h a r a c t e r s .

The functions ofthe ‘left’ and ‘r i g h t ’pushbuttons are self-evident, we recko n ,because they movethe cursor on the LCdisplay in the direc-tion indicated by thea rrows on the frontp a n e l

From the startingposition (cursor on‘MHz’), the cursormay be moved to theleft on to any of thepost-decimal posi-tions of the fre-q u e n c y. The numberat which the cursora rrives may then bechanged by turn i n gthe rotary encoder.The frequency set inthis way is howevernot actually gener-ated until you pressthe ‘Enter’ pushbut-ton (asynchronousoperation, this isindicated in theupper right-handc o rner of the dis-play). After any fre-quency change, thePLL status is indi-cated by ‘lock’ in theleft-hand bottomc o rner of the read-o u t .From the initial

position to the right,the cursor jumps to‘M0’ (memory 0 ) .This indicates twomemories, M0 andM1, in which fre-quency and attenua-tor settings may bestored. You press theEnter key to changebetween these mem-ories. In this way,you can quicklychange between twopreviously storedsettings, which maybe useful, for ex a m-

ple, for aligning a filter. Altern a t i v e l y,you may use the same frequencytwice, but with two different attenua-tor settings. This facility is useful foradjusting, say, a receiver AGC (auto-matic gain control).

Moving further to the right, the cur-sor jumps on ‘asy’. Here you canswitch to asynchronous operation bypressing ‘Enter’. In synchronousmode, any frequency changerequested by way of the rotary

encoder is immediately passed on tothe VFO/PLL unit. In this mode, the RFoutput frequency is continuouslyadjustable, but only within the selectedrange (one of five). If you turn theencoder to a frequency outside a cer-tain range, the PLL will drop out oflock, and the ‘lock’ indication will dis-appear from the LCD. By pressing anyke y, the PLL is returned to asynchro-nous mode, and the last selected fre-quency is automatically restored. If youthen move the cursor to a decimal digitof the frequency readout, and press theEnter ke y, the generator changes to therelevant frequency range, allowing youto change to synchronous mode againand continue ‘tuning’ again using con-tinuous frequency variation.

One more position to the right, thecursor reaches the ‘dB’ position, indi-cating the currently valid attenuation.The desired attenuation may be setwith the aid of the rotary encoder. Aswith the frequency setting, thedesired attenuation becomes effectiveonly when you press the Enter ke y.This is done to reduce wear and tearon the relays.

O P T I O N A LR S 2 3 2 I N T E R FA C EThe RS232 interface on the controllerboard is an optional extension whosefunction has not been fully developedout by the author/designer. Basically, itwas designed into the circuit to enablethe generator frequency and outputsignal attenuation to be controlled by aP C .

The communication parameters areas follows: 9600 bits/s, 8 data bits, 1stop bit. The communication workswith character strings, and is easilytested with the aid of a terminal pro-gram. To set the frequency you have tosend an ‘F’ (for ‘f r e q u e n c y’), then fivenumbers for the frequency in kilo-hertz, and, finally, a carr i a g e - r e t u rn(CHR$(13)). An additional Line-Fe e d(CHR$(10)) will be ignored. If every-thing is correct (first character is ‘F’, atotal of 6 characters and the frequencyin the right range), the controllerr e t u rns a ‘D’ (for ‘done’), followed bya CR-LF sequence, otherwise, an ‘E’(for ‘err o r’) and a CR- L F.

The attenuation is set by sending an‘A’, two numbers and CR. Again thecontroller answers as described. Themain purpose of the serial interf a c ewas to create a basis for using the gen-erator in an environment like Lab-Vi e wT M.

( 9 8 0 0 5 3 - 2 )

1 4

Figure 14. Suggested front-panel layout. Use it as a tem-plate to drill the metal frontpanel of the instrument, andapply the lettering/symbols.

50Hz

No. 980053

240V

F = 63mA T

ELEKTOR

~

Page 14: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

RS

32 -channelPC -controlled light dimmer

de luxe controller forohmic and inductive loads

Over the years thismagazine has pub-

lished a variety of lightdimmers. Invariably,these were designs

based on discretecomponents. This

time, the design is amore advanced one

that may be controledwith the aid of a com-puter. Each channel iscapable of controlling

ohmic as well asinductive loads rated

at up to 300 watts.

Hardware design by H. BonekampSoftware design by G. Janssen

INTRODUCTIONTo most people a light dimmer is a gad-get with a rotary control that takes theplace of the usual light switch. Thedimmer described in this article israther different. The usual standard

components are replaced by a micro -controller driven by a computer pro-gram. The design may consist of 8-32channels, each of which can be indi-vidually controlled with Windows soft-ware.

430 Elektor Electronics 12/98Elektor Electronics 12/98

I N T R O D U C T I O NTo most people a light dimmer is a gad-get with a rotary control that takes theplace of the usual light switch. Thedimmer described in this article israther different. The usual standard

components are replaced by a micro-controller driven by a computer pro-gram. The design may consist of 8–32channels, each of which can be indi-vidually controlled with Windows soft-ware.

Over the years thismagazine has pub-

lished a variety of lightdimmers. Invariably,these were designs

based on discretecomponents. This

time, the design is amore advanced one

that may be controledwith the aid of a com-

puter. Each channel iscapable of controlling

ohmic as well asinductive loads rated

at up to 300 watts.

30

Hardware design by H. BonekampSoftware design by G. Janssen

32-channelPC-controlled light dimmer

de luxe controller forohmic and inductive loads

COMPUTERS

Page 15: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

The dimmermay be used forstage lighting in a small or home the-atre, for controlling domestic lights, orfor illuminating an aviary or aquarium.Another use is the controlled but ran-dom switching on and off of domesticlighting during the residents’s absence

as a burglar deter-rent.

Since the design can handle induc-tive loads, the dimmer may also beused for controlling motors, halogenlamps and transformers.

The unit can control up to 32 indi-vidual loads for which it contains four

modules, each with eight controllers. Itmay, of course, be used with just one,two or three modules.

D E S I G NS P E C I F I C A T I O NThe original requirements laid downthat the design must be of the opentype, that is, it must be possible forindividual users to develop a programor alter an existing one for controllingthe dimmer. There is a standard elec-tronic mixer for 32 (light) channelsavailable that works under Windows95.

Communication between the com-puter and dimmer takes place via theusual RS232 link on the basis of a com-pact and clear protocol. This will bereverted to later.

The instructions sent by the com-puter to the dimmer include the finalvalue of the setting and fade time perstep. Dimming occurs of course in syn-chrony with the mains voltage. Thecontroller stores, of each and every

31Elektor Electronics 12/98

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

S202S11

IC4

CNY65

IC32 3

41

1A25 T

F1

K3 K4

(MISO)PB6

(MOSI)PB5

(AIN1)PB1

(AIN0)PB0

PD2(INT0)

PD3(INT1)

(SCK)PB7

(OCI)PB3

PD0(RxD)

PD1(TxD)

PD6(ICP)

PD4(T0)

PD5(T1)

XTAL1 XTAL2

RESET

S2313AT90

IC1

PB4

PB2

20

10

19

18

17

16

15

14

13

1211

5 4

1

2

3

6

7

8

9

R8390Ω

R9390Ω

R10390Ω

R7390Ω

R11390Ω

R12390Ω

R13390Ω

R14390Ω

K2 ISP

S1

X1

8MHzC1

22p

C2

22p

S202S11

IC51A25 T

F2

K5

S202S11

IC61A25 T

F3

K6

S202S11

IC71A25 T

F4

K7

S202S11

IC81A25 T

F5

K8

S202S11

IC91A25 T

F6

K9

S202S11

IC101A25 T

F7

K10

S202S11

IC111A25 T

F8

K11

C6

100n

C3

100n

C4

10µ 10V

C5

10n

R6

10

k

R5

1k

R4

10

k

R1

10

k

R17

56

k

1W

R16

1M

R15

10

k

R3

100k

R2

100k

T1

BC547B

T2

BC547B

D1

D2

1N4001

L1

10A

C7

470n

X2

9V

TR1

1VA5

B1

B80C1500

C8

470µ25V

C9

100n

C10

100n

7805

IC2

TxD

RS232

CH8

CH7

CH6

CH5

CH4

CH3

CH2

CH1

980076 - 11

5V

5V

5V

5V

5V

5V

5V

O N D I P

1 2 3 4

S1

K1

1

2

3

4

5

6

7

8

9

1

Figure 1. The 32-channel dim-mer is constructed of fouridentical sections, each ofwhich supports eight channels.One section is shown here.

Features:æ controls eight loads per moduleæ up to four modules per serial gateæ suitable for ohmic and inductive loadsæ switches in synchrony with mainsæ operates with simple protocolæ four integral control curvesæ simple to programæ batch operation possibleæ up to 300 watt loading per channelæ uses Windows 95 softwareæ all source codes available

Page 16: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

channel, the set maximum value, thefade time and the actual value. Everytime there is an alteration, the com-puter sends a new set of parameters.This arrangement ensures that there isrelatively little need for the exchangeof information between the computerand the controller.

C I R C U I T D E S C R I P T I O NIt is clear from the circuit diagram ofone of the four modules in Figure 1that the key component of the designis a Type AT90S2313 microcontroller(from Atmel). The controller, which is

linked to the computer via aTxD line, drives optotriacsIC4–IC11 via pins PB0–PB7. Oneset of terminals of the optotriacsis connected to the mains volt-age, whereas the set of terminalsat the other side is switched to earthvia the I/O lines of the controller and a390 Ω resistor.

The optotriacs are protected at themains voltage terminals by a fuse ratedat 1.25 A. At a mains voltage of 240 V,this means that loads of up to about300 watts can be controlled.

Since the optotriacs incorporate a

snubber network, the dimmer can beused for controlling inductive loads.

Optoisolator IC3 serves to detectthe mains zero crossing. The zerocrossing is used for synchronizingthe controller. The optoisolator islinked directly to the mains supplysince the transformer causes a smallphase shift that may cause errors in

32 Elektor Electronics 12/98

(C) ELEKTOR980076-1

B1

C1

C2

C3

C4C5C6

C7

C8

C9

C10D1

D2

F1 F2 F3 F4 F5 F6 F7 F8

H1 H2

H3H4

IC1

IC2

IC3

IC4 IC5 IC6 IC7 IC8 IC9 IC10 IC11

K2

K3

K4 K5 K6 K7 K8 K9 K10 K11

L1

R1

R2R3R4

R5

R6

R7

R8

R9

R10

R11

R12

R13

R14

R15

R16

R17

S1

T1

T2

TR1

X1

1.25AT1.25AT1.25AT1.25AT1.25AT1.25AT1.25AT1.25AT

~

CH2CH3CH4CH5CH6CH7CH8 CH1

~

T

TXD

980076-1

(C) ELEKTOR980076-1

1

Figure 2. The printed-circuit boardfor a single section of the 32-channel dimmer. To be able to useall 32 channels, four of theseboards are needed.

Page 17: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

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

Parts list

Resistors:R1, R4, R6, R15 = 10 kf2R2, R3 = 100 kf2R5 = 1 kf2R7-R14 = 390 f2

R16 = 1 MSR17 = 56 kf2, 1 W, 400 V

Capacitors:C1, C22 = 22 pF, ceramicC3, C6, C9, C10 = 0.1 µF, ceramicC4 = 10 µF. 10 V, radialC5 = 0.01 µF, ceramicC7 = 0.47 µF, 250 V a.c., Class X2C8 = 470 µF, 25 V, radial

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

Semiconductors:B1 = rectangular rectifier bridgeType B80C1500

D1 = LED, red, high efficiencyD2 = 1 N4001T1, T2 = BC547B

Integrated circuits:IC1 = AT90S2313 (Order

no. 986524-1 - see Readers Ser-vices towards the end of this issue)

IC2 = 7805IC3 = CNY651C4 -1C11 = S202S11 (Sharp)

Miscellaneous:X1 = crystal, 8 MHzSi = 4 -section DIP switchK1 = 9 -pole female sub -D connectorK2 = 6 -pole SIL headerK3-K11 = two-way terminal block,

pitch 7.5 mmTr1 = mains transformer, secondary

9 V/1.5 AF1-F8 = fuse holder with 1.25 slowfuse

Enclosure Bopla EG2050L (availablefrom Phoenix Tel. 01296 398 355)

PCB 980076-1*Windows 95 software, incl. source

code, EPS 986025*Source code for programming Atmel

controller: EPS 986033-1*Programmed controller EPS

986524-1*

* (see Readers Services towards theend of this issue)

the measurements.The synchronizing pulse is buf-

fered by transistor T2 and applied toinput PD3 (INT1).

To ensure correct operation, thedimmer should be connected to a fre-quency -stable mains supply only.

DIY PROGRAMMINGAs the controller is in principle InCir-cuit Programmable, the printed -circuitboard incorporates a special ICP inter-face. This interface is linked to pinsRESET, SCK, GND, MISO, MOS1, and

V, and to six -pole header K2. Theinterface enables the user to programthe controller.

Some pins of the controller arelinked to DIP switches, which enablethe user to select a number of options.This will be reverted to later.

The serial interface has been keptsimple. The controller uses only theTxD signal of the computer. The RS232voltage level is converted to TTL levelwith the aid of a transistor and someresistors and then inverted. No otherRS232 lines need to be linked in theconnector, provided only the pro-gramme supplied is used. If a self -writ-ten program is used, some other linesmay well need to be linked.

The clock generator, C1 -C2 -X1 pro-vides a clock of 8 MHz.

The circuit contains all the electron-ics for controlling up to eight loads.The available Windows 95 software isarranged so that four of these circuitscan be driven simultaneously.

CONSTRUCTIONThe circuit is best built on the printed -circuit board shown in Figure 2. It willbe seen that in spite of the versatility ofthe unit, the board has been kept com-pact.

Most of the work is straightforwardas long as the specified componentsare used. This is particularly true of thesuppressor circuit, L1 -C7. The capacitormust be a Class X2 component.The inductor consists of two parallelwound windings that are twisted atthe ends. Untwist them about 1 cm,remove the enamel from the ends,push them through the relevant holesin the board and bend them. It isimportant that they are soldered over

Figure 3. The completed proto-type of a single section.

a larger length than usual to ensuregood electrical contact. Note that atmaximum load, a current of up to 10 Aflows through the coil: a good reasonfor ensuring good contacts.

The finished prototype board isshown in Figure 3.

Readers who have obtained theready programmed controller via theReaders Services (towards the end ofthis issue) can start work immediately.

Insert the controller into its socketand assemble the board in the specifiedplastic case.

Since several tracks carry the fullmains voltage, extreme care is requiredin the assembly. Always unplug theunit from the mains before doing anywork or checking something afterassembly.

Finally, make the serial link with thecomputer. After the Windows software(only 95 or 98) has been installed, thedimmer is ready for use. The intuitiveuser interface (see the screendump inFigure 4) readily points the user intothe right direction.

Readers who wish to extend theprogram can do so right away becausethe program is supplied with thesource code (in Delphi format).

HANDYMANPROGRAMMERAs mentioned earlier, it is possible toprogramme the controller to one's ownwishes and requirements. This is pos-sible because the diskette containingthe Windows software also containsthe source code and the ROM file of

Elektor Electronics 12/98 33

the measurements.The synchronizing pulse is buf-

fered by transistor T2 and applied toinput PD3 (INT1).

To ensure correct operation, thedimmer should be connected to a fre-quency-stable mains supply only.

D I Y P R O G R A M M I N GAs the controller is in principle InCir-cuit Programmable, the printed-circuitboard incorporates a special ICP inter-face. This interface is linked to pinsRESET, SCK, GND, MIS0, MOS1, and

Vcc, and to six-pole header K2. Theinterface enables the user to programthe controller.

Some pins of the controller arelinked to DIP switches, which enablethe user to select a number of options.This will be reverted to later.

The serial interface has been keptsimple. The controller uses only theTxD signal of the computer. The RS232voltage level is converted to TTL levelwith the aid of a transistor and someresistors and then inverted. No otherRS232 lines need to be linked in theconnector, provided only the pro-gramme supplied is used. If a self-writ-ten program is used, some other linesmay well need to be linked.

The clock generator, C1-C2-X1 pro-vides a clock of 8 MHz.

The circuit contains all the electron-ics for controlling up to eight loads.The available Windows 95 software isarranged so that four of these circuitscan be driven simultaneously.

C O N S T R U C T I O NThe circuit is best built on the printed-circuit board shown in Figure 2. It willbe seen that in spite of the versatility ofthe unit, the board has been kept com-pact.

Most of the work is straightforwardas long as the specified componentsare used. This is particularly true of thesuppressor circuit, L1-C7. The capacitormust be a Class X2 component. The inductor consists of two parallelwound windings that are twisted atthe ends. Untwist them about 1 cm,remove the enamel from the ends,push them through the relevant holesin the board and bend them. It isimportant that they are soldered over

a larger length than usual to ensuregood electrical contact. Note that atmaximum load, a current of up to 10 Aflows through the coil: a good reasonfor ensuring good contacts.

The finished prototype board isshown in Figure 3.

Readers who have obtained theready programmed controller via theReaders Services (towards the end ofthis issue) can start work immediately.

Insert the controller into its socketand assemble the board in the specifiedplastic case.

Since several tracks carry the fullmains voltage, extreme care is requiredin the assembly. Always unplug theunit from the mains before doing anywork or checking something afterassembly.

Finally, make the serial link with thecomputer. After the Windows software(only 95 or 98) has been installed, thedimmer is ready for use. The intuitiveuser interface (see the screendump inFigure 4) readily points the user intothe right direction.

Readers who wish to extend theprogram can do so right away becausethe program is supplied with thesource code (in Delphi format).

H A N D Y M A NP R O G R A M M E RAs mentioned earlier, it is possible toprogramme the controller to one’s ownwishes and requirements. This is pos-sible because the diskette containingthe Windows software also containsthe source code and the ROM file of

33Elektor Electronics 12/98

Parts list

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

Capacitors:C1, C22 = 22 pF, ceramicC3, C6, C9, C10 = 0.1 µF, ceramicC4 = 10 µF. 10 V, radialC5 = 0.01 µF, ceramicC7 = 0.47 µF, 250 V a.c., Class X2C8 = 470 µF, 25 V, radial

Inductors:L1 = suppressor coil, 10 A,

Type T60405M6108X2 (Siemens)

Semiconductors:B1 = rectangular rectifier bridge

Type B80C1500D1 = LED, red, high efficiencyD2 = 1N4001T1, T2 = BC547B

Integrated circuits:IC1 = AT90S2313 (Order

no. 986524-1 – see Readers Ser-vices towards the end of this issue)

IC2 = 7805IC3 = CNY65IC4–IC11 = S202S11 (Sharp)

Miscellaneous:X1 = crystal, 8 MHzS1 = 4-section DIP switchK1 = 9-pole female sub-D connectorK2 = 6-pole SIL headerK3–K11 = two-way terminal block,

pitch 7.5 mmTr1 = mains transformer, secondary

9 V/1.5 AF1–F8 = fuse holder with 1.25 slow

fuseEnclosure Bopla EG2050L (available

from Phoenix Tel. 01296 398 355)PCB 980076–1*Windows 95 software, incl. source

code, EPS 986025* Source code for programming Atmel

controller: EPS 986033–1* Programmed controller EPS

986524–1*

* (see Readers Services towards theend of this issue)

Figure 3. The completed proto-type of a single section.

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

Page 18: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

L ikm35' Salm Emmm.

4

ilp!rvril 12 ti.rt.4r chrrEl 131ro-nr.111 lo I nr.113:01 now ar iyerwol 44IP5100Fmi elwrEl 131mo ILENmali 1.1:441-19d lhe ropwri 4

Fri .

" rdawl I r " I Pmww" I UP I "m

135ale Ptuar

j

Figure 4. The software available through the ReadersServices enables the easy control of up to 32 chan-nels via Windows 95 or Windows 98.

the controller program. Moreover, theboard has a special ICP connection.

The Handyman Programmer fea-tured in the December 1997 issue ofthis magazine may be used for thispurpose once an adaptor lead is madeto link the 10 -way box header to thesingle -row header on the board.

When the associated program isstarted, add the switch /8515 to theinstruction line, which then looks asfollows:

C:/...handyman.exe../AT90S8515.

This option appreciably enlarges thereserved memory range of the con-troller. The capacity of the 2313 used isabout twice that of the 1200. The 8515processor is the largest in the Atmelcatalogue so that the memory rangecan now be set to maximum.

the software revisitedIn essence, the program consists of two interrupt routines.The 'sync' routine synchronizes the phase modulator withthe zero crossing of the mains supply voltage. The phasemodulator counter runs from 0 to 240; there is also a half -period counter which is 0 or Oxff. The first counter scansthe half -period, while the second indicates which part ofthe period.

At each call, the timer interrupt routine increments thecounter of the phase modulator. Each time the count cycleis finished, the half -period counter is inverted.

The synchronization interrupt routine checks whetherthe phase modulator counter is in synchrony and in phasewith the mains voltage. If they are not in phase, the routineincrements or reduces the counter content by one unit,depending on the nature and extent of the detected error.In this way, the phase difference will be eradicated withina very short time.

Space is reserved in the RAM for each and every chan-nel for storing all relevant data:

fade time:fade counter:end value:step size:phase modulator:

3 bytes3 bytes1 byte1 byte1 byte

[980076]

ELEKTOR

240V-- 50Hz

No. 980076

F= 8x 1.25A T

Five bytes are also reserved to enable an RS232 frame tobe stored in its entirety.

Fade time is expressed in units of 10 milliseconds (ms).The end value is 0-127, which is multiplied x2 by the soft-ware.

There are four tables, each with 256 reference values, inthe program memory. The reference values are 0-249 andare composed so that they represent a specific controloperation (i.e., characteristic curve).

New data are stored at the appropriate memoryaddresses via the RS232 port.

The instantaneous content of the phase modulator isincremented or reduced until the final value is reached.The speed at which this happens depends on the set fadetime. The fade time is entered into the fade counter, where-upon the content of this counter is reduced every 10 msuntil it is 1. Subsequently, the setting of the phase modu-lator is modified by 1, whereupon the fade value is againentered into the fade counter. This process is repeateduntil the end value has been reached. When the fade valueis 0, the setting of the phase modulator is made equal tothe end value. All these routines are initiated via a timerinterrupt.

434 Elektor Electronics 12/98

the controller program. Moreover, theboard has a special ICP connection.

The Handyman Programmer fea-tured in the December 1997 issue ofthis magazine may be used for thispurpose once an adaptor lead is madeto link the 10-way box header to thesingle-row header on the board.

When the associated program isstarted, add the switch /8515 to theinstruction line, which then looks asfollows:

C:/...handyman.exe../AT90S8515.

This option appreciably enlarges thereserved memory range of the con-troller. The capacity of the 2313 used isabout twice that of the 1200. The 8515processor is the largest in the Atmelcatalogue so that the memory rangecan now be set to maximum.

[980076]

34 Elektor Electronics 12/98

In essence, the program consists of two interrupt routines.The ‘sync’ routine synchronizes the phase modulator withthe zero crossing of the mains supply voltage. The phasemodulator counter runs from 0 to 240; there is also a half-period counter which is 0 or 0xff. The first counter scansthe half-period, while the second indicates which part ofthe period.

At each call, the timer interrupt routine increments thecounter of the phase modulator. Each time the count cycleis finished, the half-period counter is inverted.

The synchronization interrupt routine checks whetherthe phase modulator counter is in synchrony and in phasewith the mains voltage. If they are not in phase, the routineincrements or reduces the counter content by one unit,depending on the nature and extent of the detected error.In this way, the phase difference will be eradicated withina very short time.

Space is reserved in the RAM for each and every chan-nel for storing all relevant data:

fade time: 3 bytesfade counter: 3 bytesend value: 1 bytestep size: 1 bytephase modulator: 1 byte

Five bytes are also reserved to enable an RS232 frame tobe stored in its entirety.

Fade time is expressed in units of 10 milliseconds (ms).The end value is 0–127, which is multiplied ×2 by the soft-ware.

There are four tables, each with 256 reference values, inthe program memory. The reference values are 0–249 andare composed so that they represent a specific controloperation (i.e., characteristic curve).

New data are stored at the appropriate memoryaddresses via the RS232 port.

The instantaneous content of the phase modulator isincremented or reduced until the final value is reached.The speed at which this happens depends on the set fadetime. The fade time is entered into the fade counter, where-upon the content of this counter is reduced every 10 msuntil it is 1. Subsequently, the setting of the phase modu-lator is modified by 1, whereupon the fade value is againentered into the fade counter. This process is repeateduntil the end value has been reached. When the fade valueis 0, the setting of the phase modulator is made equal tothe end value. All these routines are initiated via a timerinterrupt.

the software revisited

Figure 4. The software available through the ReadersServices enables the easy control of up to 32 chan-nels via Windows 95 or Windows 98.

4

50Hz

No. 980076

240V

F = 8x 1.25A T

ELEKTOR

~

Page 19: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

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

dip switch positionsSections 1 and 2 of DIP switch Si enable setting a curvealong which the controller sets the ignition angle of theoptotriacs. Four curves are provided which enable themost propitious angle for a number of applications to be

0.9

0.8

Uavg, 0.7

I PO, 0.6

0.5

--P251 04-

0.3

0.2

0.1

.0

trigger curves

18 36 54 72 90 108 126

angle, i(degrees)

selected (see illustration below).

Sr(1) Sr(2) Curveon on 1

on off 2

off on 3

off off 4

144 162 180

980076 - 13

Curve 1 represents control based on the average voltage.Curve 2 represents control based on power consumptionwith ,8 = 0.Curve 3 represents semi -logarithmic control based onpower consumption with ,8 = 5.Curve 4 represents logarithmic control based on powerconsumption with ,8 = 25.

pratcoccol

Sections 3 and 4 are for setting the address of the con-troller board.

Si (3) Sr (4)

on on channels 1-8off on channels 9-16on off channels 17-24off off channels 25-32

For those readers who may not be very interested in thesecurves, 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 ,8 = 0 andaverage voltage) are identical and form a straight line. Theother two (exponential)curves are those pertaining to the sit-uation where ,8 = 5 and ,8 = 25.

0.9

0.8

LIN0.7

0.6EXPO

EXP25,ne

03

0.2

0.1

00

drive curves

10 20 30 40 50 60

drive, j(%)

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

9600 baud byte 51 start bit 0 D6 D5 D4 D3 D2 D1 DO1 stop bitno parity bit where

A = address of channel1st byte: b7 = 1 (marking the start of a frame). With all S = size of stepother bytes, b7 = 0. T = duration of step

D = end value

70 80 90 100

980076 - 14

Frame constructionA frame consists of five words and is composed as fol- lf, on reception, there is an error within a frame, the entirelows: frame will be ignored and the system will wait for the start

of a new frame (b7 = 1).byte 11 A4 A3 A2 A1 AO S1 SO

byte 20 T20 T19 T18 T17 T16 T15 T14

byte 30 T13 T12 T11 T10 T9 T8 T7

When the step resolution is 1, a control time of255 x 10 ms is needed. When a short fade time has beenset, an error of not more than 1.27 s may ensue. For thisreason, the software will alter the size of step to 2, 3 or 4when the fade time is shorter than 2.55 seconds. Thisensures that the fade time is altered to ensure that the errornever exceeds 15 per cent.

Elektor Electronics 12/98 35

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

35Elektor Electronics 12/98

Sections 1 and 2 of DIP switch S1 enable setting a curvealong which the controller sets the ignition angle of theoptotriacs. Four curves are provided which enable themost propitious angle for a number of applications to be

selected (see illustration below).

S1(1) S1(2) Curveon on 1on off 2off on 3off off 4

Curve 1 represents control based on the average voltage.Curve 2 represents control based on power consumptionwith β = 0.Curve 3 represents semi-logarithmic control based onpower consumption with β = 5.Curve 4 represents logarithmic control based on powerconsumption with β = 25.

Sections 3 and 4 are for setting the address of the con-troller board.

S1(3) S1(4)on on channels 1–8off on channels 9–16on off channels 17–24off off channels 25–32

For those readers who may not be very interested in thesecurves, 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 andaverage voltage) are identical and form a straight line. Theother two (exponential)curves are those pertaining to the sit-uation where β = 5 and β = 25.

The protocol used in the dimmer makes control straight-forward. The serial format is:

9600 baud1 start bit1 stop bitno parity bit

1st byte: b7 = 1 (marking the start of a frame). With allother bytes, b7 = 0.

Frame constructionA frame consists of five words and is composed as fol-lows:

byte 11 A4 A3 A2 A1 A0 S1 S0

byte 20 T20 T19 T18 T17 T16 T15 T14

byte 30 T13 T12 T11 T10 T9 T8 T7

byte 40 T6 T5 T4 T3 T2 T1 T0

byte 50 D6 D5 D4 D3 D2 D1 D0

whereA = address of channelS = size of stepT = duration of stepD = end value

If, on reception, there is an error within a frame, the entireframe will be ignored and the system will wait for the startof a new frame (b7 = 1).

When the step resolution is 1, a control time of255 × 10 ms is needed. When a short fade time has beenset, an error of not more than 1.27 s may ensue. For thisreason, the software will alter the size of step to 2, 3 or 4when the fade time is shorter than 2.55 seconds. Thisensures that the fade time is altered to ensure that the errornever exceeds 15 per cent.

protocol

dip switch positions

Page 20: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

TEST & EASUREMENT

barometer/altimeterPart 2

programming, calibration,software and operation

When construction ofthe barometer/altime-

ter, which is basedon a precision air -

pressure sensor withintegral signal

processor fromMotorola, is com-

pleted, the unit hasto be programmed

and calibrated inaccordance with the

correct reference.Evaluation, storing,

display and inter-change of data are

effected by a micro -

controller system.

Design by H. Bonekamp

438

CHOICE OF PROGRAMSince the 12 kbyte flash -ROM in theAtmel microcontroller is relativelysmall for the present application, twoversions of the program are available:

normal.hexwhich arranges for the reference pres-sure to be derived from the indicatedheight;

vsl.hex (virtual sea level)which allows the pressure at sea levelas given by the nearest airport orweather station to be input.

PROGRAMMINGProgramming of the microcontrollercan be effected only with softwarediskette Type 986031-1 availablethrough our Readers' Services (seetowards the end of this issue). Thediskette should be copied to a hard diskor other write medium that is notwrite -protected.

1. Start program SISP (Serial in SystemProgrammable) in the real DOSmode (not in the DOS window ofWindows).

Elektor Electronics 12/98Elektor Electronics 12/98

C H O I C E O F P R O G R A MSince the 12 kbyte flash-ROM in theAtmel microcontroller is relativelysmall for the present application, twoversions of the program are available:

normal.hex which arranges for the reference pres-sure to be derived from the indicatedheight;

vsl.hex (virtual sea level)which allows the pressure at sea levelas given by the nearest airport orweather station to be input.

P R O G R A M M I N GProgramming of the microcontrollercan be effected only with softwarediskette Type 986031-1 availablethrough our Readers’ Services (seetowards the end of this issue). Thediskette should be copied to a hard diskor other write medium that is notwrite-protected.

1. Start program SISP (Serial in SystemProgrammable) in the real DOSmode (not in the DOS window ofWindows).

When construction ofthe barometer/altime-

ter, which is basedon a precision air-

pressure sensor withintegral signal

processor fromMotorola, is com-

pleted, the unit hasto be programmed

and calibrated inaccordance with the

correct reference.Evaluation, storing,

display and inter-change of data are

effected by a micro-controller system.

38

Design by H. Bonekamp

barometer/altimeterPart 2

programming, calibration,software and operation

TEST & MEASUREMENT

Page 21: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

39Elektor Electronics 12/98

Barometerxxxx.x hPa

FUNCTION

Altimeterxxxx meter

FUNCTION

FUNCTION

DataloggerEnter for menu

FUNCTION

ENTERESC

Dataloggermenu

ENTERESC

Enter Sample time

ENTERESC

Set altimode

ENTERESC

Enter newvalue

PreferencesEnter for menu

ENTERESC

Preferencesmenu

MAIN MENU

Sample timeEnter to set

FUNCTION

Clear dataloggerEnter to clear

FUNCTION

FUNCTION

Pres. logger on/offEnter to switch

FUNCTION

Pressure loggerEnter to send

FUNCTION

Pressure loggerEnter to view

ENTERESC

View logger

DATALOGGER MENU

ENTER: clear datalogger ENTER: swich datalogger on/off+: select pressure/altitude-: select pressure/altitude

ENTER: transmit datalogger info to PC+: select pressure/altitude-: select pressure/altitude

+: select pressure/altitude-: select pressure/altitude

Intervalh:mm:ss

FUNCTION

Intervalh:mm:ss

FUNCTION

FUNCTION

Intervalh:mm:ss

FUNCTION

Intervalh:mm: ss

FUNCTION

Intervalh:mm:ss

ENTER SAMPLE TIME

day: dxxxx.x

hh:mm:sshPa.mbar

VIEW LOGGER

ENTER: set new intervalESCAPE: keep old interval

+: current digit + 1-: current digit - 1

ENTER: set new value

ENTER: set sea-level pressure to 1013.25 hPa

ENTER: switch send direct on/off

ENTER: set default calibration

ESCAPE: keep old value+: current digit + 1-: current digit - 1

+: next time-: previous time

SET ALTIMODE

: select absolute/relative altitude

: select absolute/relative altitude

Pressurexxxx.x hPa

FUNCTION

Pressurexxxx.x hPa

FUNCTION

FUNCTION

Pressurexxxx.x hPa

FUNCTION

Pressurexxxx.x hPa

FUNCTION

Pressurexxxx.x hPa

ENTER NEW VALUE

Altitude modeEnter to set

FUNCTION

Ref. altitudeEnter to set

FUNCTION

FUNCTION

Rest. sea-lvl PEnter to restore

FUNCTION

Send direct: on/offEnter to switch

PREFERENCES MENU

ENTERESC

Enter newvalue

P at sea levelEnter to set

ENTERESC

Enter newvalue

ENTERESC

Enter newvalue

Calibration 1Enter to CAL

Altitude modeabs./rel. alt.

FUNCTION

FUNCTION FUNCTION

Calibration 2Enter to CAL

FUNCTION

FUNCTION

Default CALEnter to restore

Ref. altitudexxxxx meter

FUNCTION

Ref. altitudexxxxx meter

FUNCTION

FUNCTION

Ref. altitudexxxxx meter

FUNCTION

Ref. altitudexxxxx meter

FUNCTION

Ref. altitudexxxxx meter

980097 - 2 - 11

Figure 1. The main menucontains four sub-menus,two of which, data loggerand preferences, arethemselves divided intosub-sub-menus.

1

Page 22: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

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

41Elektor Electronics 12/98

2. Select input file normal.hex orvsl.hex at option 5.

3. Enter the wanted serial interface(com-port) at option 5.

4. Link the barometer to the computervia an RS232 cable (1:1). Do not yetswitch on the unit.

5. Set pin jumper JP2 to position I(ISP).

6. Switch on the barometer unit.

7. Insert the pin jumper into JP1.

8. Select option 1 of SISP (write codememory) and wait until the pro-gramming has been completed

9. In case of an error message, removethe pin jumper from JP1, switch offthe barometer, and repeat the fore-going procedure from point 6.

10. Insert the pin jumper of JP2 intoposition R (RS232) and remove thepin jumper from JP1.

C A L I B R A T I O NWithout correct calibration, the barom-eter/altimeter would not have the req-uisite accuracy. Only correct calibrationensures that the program uses the stan-dard transconductance and offset val-ues (0.01509 and 0.1518 respectively) ofthe sensor specified by the manufac-turers to compute the air pressure.Apart from this, there is no other com-pensation of the tolerances of the volt-age divider. There are twomethods of calibrating the unit: the sin-gle-point and the two-point. In single-point calibration only the offset is cor-rected, which shifts the pressure vsoutput voltage characteristic upwards.

Single-point calibration requires areliable, actual value of the atmos-pheric pressure, which can normally

be obtained from the nearest airport orweather station. This value must beinput into calibration 1 in the prefer-ences menu. This value is then com-pared with the actually measuredvalue and a new offset value com-puted. The new offset value is storedin the eeprom.

In the two-point method, not onlythe offset of the sensor is compen-sated, but also its transconductance.The procedure is as with method 1,but in this case a second value isentered in calibration 2 in the menu.This value must differ by at least 5 hPa(5 millibar) from the first one. Thismargin is needed by the software toreduce the effects of rounding-offerrors and any interference. Thegreater the difference between the twovalues, the more accurate thetransconductance is computed.

The second value is obtained afterthe atmospheric pressure has risen orfallen sufficiently with respect to thefirst value. Check this second valuewith the nearest weather station andinput it at CALIBRATION 2.

O P E R A T I O NBefore commencing any measure-ments, leave the barometer/alitmeterfor about two minutes to enable it to‘warm up’. The unit is operated by fivetouch keys on the front panel:

MODE (S2), which enables any of thefunctions on each of the menus tobe accessed and utilized.

↑ (UP) (S3) with which the value ofthe selected digits is increased.

↓ (DOWN) (S4) with which the valueof the selected digits is decreased.

ENTER (S5) with which a selection isconfirmed or altered (stored in theeeprom).

ESCAPE (S6) to return to the next

higher menu without this beingstored in the eeprom.

These keys take the operator throughall the menus as shown in Figure 1.

The Main Menu consists of foursub-menus: barometer, altimeter, datalogger, and preferences.

The data logger sub-menu itselfconsists of a number of sub-sub-menusas shown.

When Input Sample Time has beenselected, the sample interval may beset between 10 seconds and 8 hourswith a resolution of one second.

The measurement results stored inthe data logger can be viewed byselecting View Logger.

The elaborate Preferences menucontains the functions ‘Ref. Altitude’(normal.hex) and ‘P at Sea Level’(vsl.hex). In both, as during calibration,enter the value for altitude or atmos-pheric pressure into ‘Input New Value’digit by digit.

‘Set Altimode’ determines whetherthe relative or absolute altitude is dis-played. The absolute altitude is theheight above sea level, and the relativealtitude is the height above a set refer-ence. In both cases, the actual atmos-pheric pressure at sea level must beentered. The reference atmosphericpressure at sea level, that is,1013.25 millibar (1013.25 hPa), is resetwith ‘Rest. sea-|v|P’. ‘Default cal’ pro-vides a similar function: it erases anycalibration entries and replaces themwith standard values.

Not much more can be said aboutthe display than that the atmosphericpressure is shown in hPa (hecto-Pascal,which is identical to millibars) and thealtitude in meters. Two arrows indicatewhether the measurement is movingup or down. When the data logger isactive, the display shows an asterisk.

D A T A T O C O M P U T E RCommunication between the barome-ter/altimeter and the computer is in8-bit format, 9600 baud, no parity bit,and no handshake. Basically, any PCusing DOS or Windows is suitable. There are two ways of transferringdata to the computer: individual, bywhich a measurement value is trans-ferred to the computer as soon as it isavailable, or stream, by which the con-tent of the data logger is transferred inone operation.

[980097]

home-made softwareSince the diskette contains the source code of the software, competent read-ers are able to incorporate their own requirements and other special functions,provided they have a Tasking C development tool available. A demonstrationof the C compiler is available as freeware on the Internet: www.tasking.com

Communication with the display is made possible by _IOWRITE in the basicfunction. This enables the standard print commands in C to be used. Thismeans that conversions must not be written. Printer formats are supported byFPRINTF().

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 mustbe entered.

Page 23: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

GENE INTEREST

digital terrestrialtelevision (DTT)

An inevitable development

The future of television is largely in digital ter-restrial broadcasting. Britain is forging the wayin this new field, but other countries in Europe

and North America, as well as Japan, arebound to follow soon. Most of the Europeandevelopment was carried out under the DVB

(Digital Video Broadcasting) Project launchedin 1993 and approved by almost 200 signato-ries from 25 countries in 1995. The launching

group consisted of representatives from indus-try, public and private broadcasters,tele-com-municationss companies, research institutesand the European Commission. Because of

this wide-ranging participation, the DVB Projecthas taken over the leading role in the introduc-

tion of digital television in Europe.

Based on a report by Bill Higgins

INTRODUCTIONDigital terrestrial television providessubstantial benefits to viewers: morequality channels, better sound, betterpictures, and new services. In the nearfuture, many of these services will beinteractive, enabling the viewer toshop, bank, send e-mail messages, andothers. Many countries in Europe willundoubtedly discontinue the analoguetransmissions and switch to digitalbroadcasts over the next 10-15 years'time (in Britain, suggestions havealready been made for this to happenas early as 2008).

Viewers will need a new digital tele-vision receiver or a digital terrestrialset -top box to receive the new broad-casts. Viewers who wish to make use ofthe interactive services need a tele-phone socket near their TV set. Therewill be no 'ghosting' or 'snow' withdigital terrestrial TV. Viewers with

44 Elektor Electronics 12/98Elektor Electronics 12/98

I N T R O D U C T I O NDigital terrestrial television providessubstantial benefits to viewers: morequality channels, better sound, betterpictures, and new services. In the nearfuture, many of these services will beinteractive, enabling the viewer toshop, bank, send e-mail messages, andothers. Many countries in Europe willundoubtedly discontinue the analoguetransmissions and switch to digitalbroadcasts over the next 10–15 years’time (in Britain, suggestions havealready been made for this to happenas early as 2008).

Viewers will need a new digital tele-vision receiver or a digital terrestrialset-top box to receive the new broad-casts. Viewers who wish to make use ofthe interactive services need a tele-phone socket near their TV set. Therewill be no ‘ghosting’ or ‘snow’ withdigital terrestrial TV. Viewers with

The future of television is largely in digital ter-restrial broadcasting. Britain is forging the wayin this new field, but other countries in Europe

and North America, as well as Japan, arebound to follow soon. Most of the Europeandevelopment was carried out under the DVB

(Digital Video Broadcasting) Project launchedin 1993 and approved by almost 200 signato-ries from 25 countries in 1995. The launching

group consisted of representatives from indus-try, public and private broadcasters,tele-com-municationss companies, research institutesand the European Commission. Because of

this wide-ranging participation, the DVB Projecthas taken over the leading role in the introduc-

tion of digital television in Europe.

44

Based on a report by Bill Higgins

digital terrestrialtelevision (DTT)

An inevitable development

GENERAL INTEREST

Page 24: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

widescreen television receivers will beable to take advantage of the higherproportion of widescreen materialincluded in digital broadcasts.

H O W D O E S D I G I T A LT E L E V I S I O N W O R K ?An analogue signal can be sampledand digitized as shown in Figure 1,and then represented by a stream oflogic 1s and 0s . The planning of digitalterrestrial television started in the USAin the late 1980s and soon thereafter, inthe early 1990s, separate projects andpilot developments came about inEurope also.

Essential to the concept of digitalvideo coding is data compression tech-nology which makes possible muchnarrower bandwidths than with ana-logue TV signals. The compression isapplied to quantized images providedby the television camera. The picturearea is sampled pixel by pixel and avalue is allocated in each case to theluminance value Y and the chromi-nance values R-Y and B-Y of each pixel.This pulse-code modulation is carriedout initially with binary numbers. Theresultant bit stream has a data rate of166 Mbit/s.

In the case of High Definition Tele-Vision (HDTV), a new aspect ratio of16:9 is used (current standard is 4:3).The scanning rate of the HDTV lumi-nance signal is increased to 72 MHz(currently, 13.5 MHz). This results in atotal data rate of 1.52 Gbit/s for theY-U-V video source signal.

A giant step forward in coding tech-nology was achieved by motion-com-pensating coding. In this, to start thedata compression, only the pixels of a

new frame that havemoved owing to themovement of theobject are transmitted. The unchangedpixels are redundant and are repro-duced from the frame buffer in thereceiver. A further reduction in thenumber of pixels to be transmitted isobtained by specifying the frame-to-frame displacement of a moving objectby a displacement vector. This vector isused in the receiver to take the pixel forthe moving object from the buffer. Thebackground data must, of course, alsobe transmitted in this method, which iscalled interframeDPCM (DifferentialPulse Code Modula-

tion) with motion com-pensation.

In the decomposi-tion, use is made of the Discrete CosineTransform (DCT), which is a variant ofthe Discrete Fourier Transform (DFT).There are two kinds of DCT: the hybridand the intraframe, both of which haveadvantages and disadvantages. There-fore, full frames are normallyintraframe coded at fixed intervals inthe hybrid method. This is the basis ofthe ISO MPEG standard.

The ISO (International Standard-ization Organization), which is a con-

sultant to the UnitedNations, was deci-sively involved in the

45Elektor Electronics 12/98

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

t t

T

980102 - 12

tTA

===

Duration of samplingPeriod of analogue signalAmplitude of analogue signal

t

A

t t t

1

MPEGvideo coder

VPacketizer

PES

PES

PES

Program

MUX

Transport

MUX

MPEGaudio coder

APacketizer

supplementarydata

Programstream

video

audio

dataTransportstream

Packetizer

MPEG systems

980102 - 19

Figure 2. The programand transport stream inthe MPEG-2 standard.

Figure 1. Principle ofsampling and quantiz-ing an analogue signal.

2

Page 25: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

advances made in video coding. Sincethe early 1990s, the ISO and IEC (Inter-national Electrotechnical Commission)have been coordinated by the JCT1(Joint Technical Committee 1) in thetelecommunications field.

A subgroup (called the Motion Pic-tures Expert Group – MPEG) of theJCT1 was set up to define a standardfor full-video communication. Thestandard specifies storage, for instance,in multi-media workstations, and canalso be applied to transmissions on theestablished media.

The MPEG-1 standard is suitablefor the coding of small-format imageswith low data rates (up to 1.5 Mbit/s).The second project phase, MPEG-2, isa specification for amethod that is compat-ible with MPEG-1, butwhich allows the cod-

ing of enhanced PAL(Phase Alternate Line)quality. It also includesHDTV. The standardspecifies sampling ratesof 2–15 Mbit/s. The cor-relation between the sampling rate, theduration of the sample, and the num-ber of samples per television line isshown in Table 1.

MPEG-2 has become a world stan-dard for video, applying both to thetransmitting side and to the receiver atthe output of the demodulator: OFDM(Orthogonal Frequency Division andMultiplexing) for terrestrial reception,QSPK (Quadrature Phase Shift Keying)for satellite reception, and 64QAM

(Quadrature Ampli-tude Modulation) forreception via a cablenetwork.

The MPEG-2 VideoCoding Standard wasconceived as a generic,that is, application-independent solution.In other words, the

syntax of its algorithm makes it suitablefor many different applications andtheir relevant data rates. In addition tothis flexibility in source formats,MPEG-2 allows different ‘profiles’. Aprofile offers a collection of compres-sion tools that together make up thecoding system.

The specification for DVB-T (DigitalVideo Broadcasting Terrestrial) wasfinalized in late 1995. It lays down thatthe DVB-T transmission system con-tains the following fundamentally newelements: baseband coding for videoand audio, MPEG-2 transport stream(see Figure 2), terrestrial channel cod-ing, OFDM modulation, and coverageusing single-frequency network tech-nology. The OFDM modulationmethod (see Figure 3) and the single-frequency network technology lead toa number of system engineering con-sequences.

One of the consequences of apply-ing data compression at the signalsource is that conventional sinewavetest methods with swept-frequencysignals in the frequency domain andwith reference to test line signals in thetime domain are not usable for the dig-ital transmission channel.

The consequence of transportingsignals in time division multiplex is

46 Elektor Electronics 12/98

pre-

proc

.(L

CA

)

IFFT

synthesizer

D

A

90°

D

A

12 ...16 bit

Al - Tp(1/2B)

fZF

fRF - fIF

DSB AM

DVB-T

I(Re)

Re

Frequencydomain

Timedomain

lm

Q(lm)

clockGross data

rate

RF

REF.

If

1 N 980102 - 20

3

Figure 3. Typical OFDM(Orthogonal FrequencyDivision and Multiplex-ing) modulator used inDTT (Digitial TerrestrialTelevision).

Ref 3 6 9P-Frame P-Frame

980102 - 13

P-Frame

4

Figure 4. P(redicted)-frames at 3, 6, and 9frames from the refer-ence frame.

Sampling rate

(Mbit/s)

Duration of sample

(µs)Number of samples

per TV line

2 0.5 128

6.75 0.148 432

13.5 0.074 865

15 0.066 969

Table 1. Correlation ofMPEG-2 sampling rates,duration of sample, andnumber of samples pertelevision line.

Page 26: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

47Elektor Electronics 12/98

B-FramesRef

P P PP

1 2

B-Frames

4 5

B-Frames

7 8

B-Frames

10 11

980102 - 14

5

Figure 5.Location of B(i-directional) frames.

Figure 6. Location ofI(ntraframe) signals.

Ref

1 2 3 4 5 6 7 8 9 10 11

I-Frame

New ref

1 2 3 4 5 6 7 8 9 10 11

I-Frame

Newer ref

1 2 3

I-Frame980102 - 15

6

Modulation

RF/TransmissionSystem

Service Multiplex and TransportVideo Subsystem

Video

ChannelCoding

ServiceMultiplex

Transport

VideoSource coding

and Compressing

Receiver Characteristics

Audio Subsystem

Audio

Ancillary Data

Control Data

980102 - 16

AudioSource coding

and Compressing

7

Figure 7. Block diagramof the proposed Ameri-can digital terrestrialtelevision structure.(Courtesy ITU)

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

Page 27: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

that digital terrestrialbroadcasting servicetechnology need notremain confined to thetransmission of televi-sion signals and associated data, butthat video, audio and data signals canbe freely assembled and transmittedtransparently for multi-layer services.

Programme distribution can beeffected via standard copper lines, opti-cal fibre cables or microwave links.

Digital terrestrial transmitter engi-neering requires novel transmittermeasuring techniques. This involvesparameters such as BER (Bit ErrorRate), pattern analysis, spectrumanalysis, OFDM power measurementand the measurement of the operatingcharacteristics of multi-carrier poweramplifiers.

Operating DVB-T transmitters insingle-frequency mode presupposesfrequency- and bit-synchronous oper-ation by the transmitters. This requiresnew approaches to frequency and timesynchronization providing operationalreliability on a regional and nationallevel.

Terrestrial transmission over radiopaths with single transmitters and sin-gle-frequency transmitters requiresnovel coverage measuring techniquesin which, in addition to the traditionalfield-strength measurement, parame-ters such as channel impulse response,raw bit error rate, intersymbol interfer-ence, and selective C/I (Carrier overInterferer) are important factors.

M U L T I P L E X I N GMultiplexing is the process of trans-mitting two or more signals over the

same path withoutinteraction. This can beachieved by separatingthe signals in time orfrequency.

Frequency division multiplexing(FDM) is an analogue technique whichis still used on satellite and microwavelinks, although many of these now usedigital techniques.

Time division multiplexing (TDM)is a method of interleaving digital sig-nals from a number of channels on toone circuit. For instance, six 600 bit/schannels may be multiplexed on to one3600 bit/s circuit. Both ends of the cir-cuit must be synchronized to ensurethat the data on one channel inputreaches the correct channel output atthe far end.

D A T A C O M P R E S S I O NIn general, data compression is amethod to reduce the amount of trans-mitted data by applying an algorithmto the basic data at the point of trans-mission. A decompression algorithmexpands the data back at the receiverinto its original format. There are twomajor methods in use: Interframe andintraframe.

InterframeThe interframe method is based on adifference signal generated by the theframes before and after the presentframe. These difference signals aretermed P(redicted) frames and B(i-directional) frames. P-frames are pre-dicted from the preceding referenceframe and are normally 3, 6 or 9 framesfrom the reference as shown in Fig-ure 4.

B-frames are generated by interpo-lation from P-frames and the referenceframe and are therefore called bi-direc-tional. As shown in Figure 5, they slotin between the reference and theP-frames, at 1, 2, 4, 5, 7, 8, 10, and 11,frames from the reference.

Intraframe In the interframe system, the referenceframe occurs every 12 frames. This iseffectively the intraframe signal orI-frame. A new I-frame occurs afterevery eleven interframe difference sig-nals throughout the transmission (seeFigure 6).

A M E R I C A N S T A N D A R DIn the USA, the Advisory Committeeon Advanced Television Service(ACATS), which was set up by the FCC(Federal Communications Commis-sion), and the Advanced Television TestCenter (ATTC), a collaborationbetween broadcast service operatorsand the television receiver industry,have devised a different standard fordigital television.

The specification is basically theDigital Spectrum Compatible HDTV(DSC-HDTV) proposal by Zenith andAT&T. Basically, it splits the digital TVsystem into:• source coding and compression• service multiplex and transport• RF transmission.A block diagram of the system for dig-ital terrestrial television is shown inFigure 7. The coding is based on theMPEG-2 standard, but uses 27 MHzsampling and special digital extensionsto allow for any new formats in thefuture, picture extensions, and indica-

48 Elektor Electronics 12/98

Program ClockReference

AdaptationHeader

Encoder

TransportEncoder

FrequencyDividerNetwork

VideoEncoder

Video In

33 9

980102 - 17

Audio In

FECand SyncInsertion

VSBModulator

AudioEncoder

A/D

A/D

f 27 MHz

f v f a

f TP f sym RF Out

program clock reference baseprogram clock reference extension

8

Figure 8. High-levelencoding equipment forthe proposed Americanstandard of DTT. (Cour-tesy ITU)

Page 28: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

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

Although digital satellite signals can be received all overthe UK, digital terrestrial signals will, at least for the timebeing, not cover the whole county. Where possible, thenew digital transmission will be on frequencies close tothose used for the current analogue TV broadcasts, whichmeans that viewers can continue to use their existingantennas.

The BBC has already started transmitting DTT signals:from 23 September last, viewers with suitable equipmenthave been able to watch the first regular digital terrestrialchannel in the world, together with wide-screen versionsof BBC1 and BBC2. The inset table correlates some UHFchannels with analogue and digital TV programmes (basedon Crystal Palace transmitter).

Channel number (UHF) DTT programme Analogue programme

22 DMx2

23 ITV (London)

25 DMx1

26 BBC1 (London)

28 DMx4

29 DMx6

30 Channel 4 (London)

32 DMx3

33 BBC2 (London)

34 DMx5

37 Channel 5 (London)

DMx = Digital Multiplex

The existing terrestrial channels will be free -to -air ondigital terrestrial 7V, as will the new digital channels: BBCNews 24, BBC Choice, and existing free channels on ana-logue TV: Sky News, CNN, and Eurosport.

Open standard integrated digital television sets are nowavailable in the shops, enabling viewers to receive all thedigital 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 willbe producing set -top boxesneeded to receive DTT on ana-logue TV sets: Grundig, Nokia,Pace, Philips, Sony and Toshiba.

Video cassette recorders(VCRs) can be used with digitalterrestrial set -top boxes. Unfortunately, there is the sameserious and annoying flaw as with satellite receivers: onlythe digital programme being watched can be recorded.This is an area where analogue TV will retain its currentpopularity for some time to come.

ONdigital, formerly called British Digital Broadcasting(BDB), has been granted 24 -year licenses by the Inde-pendent Television Commission to be the terrestrial pay -TVplatform in the United Kingdom. ONdigital is a partnershipbetween Carlton Communications and the Granada Group.

A smart card, which looks like an ordinary credit orbanker's card, but which has an integrated microproces-sor and memory instead of a magnetic recording strip, willbe used by ONdigital for subscription services and pay -per -view events.

Smart cards are already used for mobile telephones,loyalty cards and by BSkyB to control subscription viewingto its satellite service. Owing to the extended reach ofAstra 2, Sky smart cards will be needed for the free -to -airchannels to prevent viewers in other European countriestuning in to programmes that have been copyright -clearedfor the UK only.

Electronic Programme Guide (EPG) is a technique used

in digital TV that allows for the transmission of data aboutprogrammes that are being broadcast. One of the featuresof this programme is that it allows viewers to order TVchannels for special events or films on the appropriatepay -TV channel. EPG also has the possibility of providinginteractivity with the home customer in offering a wholerange of consumer services, from home banking to homeshopping.

Useful telephone numbers:

BBC: 0990 118 833 for a digital information pack; 0870010 0123 for other queries; web site:www.bbc.co.uk/digital/

ONdigital: 0171 819 8000; web site www.ondigital.co.uk

BSkyB: 0870 242 4200

The photograph (A) shows the Mediamaster 9850T fromNokia which was introduced at the Cable & Satellite Showin London earlier this year. It is fully compliant with theONdigital standard, ready for pay -per -view and other inter-active services, and has an integrated modem. It comeswith a remote controller for ease of operation.

MOTOROLA TO REVOLUTIONIZEMULTIMEDIA IN THE HOME

In a move to set the standard in the home entertain-ment market, Motorola has launched the first system tobring together digital TV, audio, Internet, 3D computergames and other multimedia applications in one box.

At a time when digital TV -based services establishthemselves in Europe, as defined by the DVB-T project,the open system will liberate viewers by allowing themto receive the services of all competing digital services,whether terrestrial, cable or satellite.

The system, named Blackbird, has been offered tomanufacturers of set -top boxes and other manufacturers.

Consumers can expect to see set -top box products,based on Blackbird, within the next six months.Motorola 0049 172 678 9545 (David Jones), or 0044 802365 956 (Una Kent)

Elektor Electronics 12/98 4949Elektor Electronics 12/98

Although digital satellite signals can be received all overthe UK, digital terrestrial signals will, at least for the timebeing, not cover the whole country. Where possible, thenew digital transmission will be on frequencies close tothose used for the current analogue TV broadcasts, whichmeans that viewers can continue to use their existingantennas.

The BBC has already started transmitting DTT signals:from 23 September last, viewers with suitable equipmenthave been able to watch the first regular digital terrestrialchannel in the world, together with wide-screen versionsof BBC1 and BBC2. The inset table correlates some UHFchannels with analogue and digital TV programmes (basedon Crystal Palace transmitter).

The existing terrestrial channels will be free-to-air ondigital terrestrial TV, as will the new digital channels: BBCNews 24, BBC Choice, and existing free channels on ana-logue TV: Sky News, CNN, and Eurosport.

Open standard integrated digital television sets are nowavailable in the shops, enabling viewers to receive all thedigital 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 willbe producing set-top boxesneeded to receive DTT on ana-logue TV sets: Grundig, Nokia,Pace, Philips, Sony and Toshiba.

Video cassette recorders(VCRs) can be used with digitalterrestrial set-top boxes. Unfortunately, there is the sameserious and annoying flaw as with satellite receivers: onlythe digital programme being watched can be recorded.This is an area where analogue TV will retain its currentpopularity for some time to come.

ONdigital, formerly called British Digital Broadcasting(BDB), has been granted 24-year licenses by the Inde-pendent Television Commission to be the terrestrial pay-TVplatform in the United Kingdom. ONdigital is a partnershipbetween Carlton Communications and the Granada Group.

A smart card, which looks like an ordinary credit orbanker’s card, but which has an integrated microproces-sor and memory instead of a magnetic recording strip, willbe used by ONdigital for subscription services and pay-per-view events.

Smart cards are already used for mobile telephones,loyalty cards and by BSkyB to control subscription viewingto its satellite service. Owing to the extended reach ofAstra 2, Sky smart cards will be needed for the free-to-airchannels to prevent viewers in other European countriestuning in to programmes that have been copyright-clearedfor the UK only.

Electronic Programme Guide (EPG) is a technique used

in digital TV that allows for the transmission of data aboutprogrammes that are being broadcast. One of the featuresof this programme is that it allows viewers to order TVchannels for special events or films on the appropriatepay-TV channel. EPG also has the possibility of providinginteractivity with the home customer in offering a wholerange of consumer services, from home banking to homeshopping.

Useful telephone numbers:

BBC: 0990 118 833 for a digital information pack; 0870010 0123 for other queries; web site:www.bbc.co.uk/digital/

ONdigital: 0171 819 8000; web site www.ondigital.co.uk

BSkyB: 0870 242 4200

The photograph (A) shows the Mediamaster 9850T fromNokia which was introduced at the Cable & Satellite Showin London earlier this year. It is fully compliant with theONdigital standard, ready for pay-per-view and other inter-active services, and has an integrated modem. It comeswith a remote controller for ease of operation.

M O T O R O L A T O R E V O L U T I O N I Z E

M U L T I M E D I A I N T H E H O M E

In a move to set the standard in the home entertain-ment market, Motorola has launched the first system tobring together digital TV, audio, Internet, 3D computergames and other multimedia applications in one box.

At a time when digital TV-based services establishthemselves in Europe, as defined by the DVB-T project,the open system will liberate viewers by allowing themto receive the services of all competing digital services,whether terrestrial, cable or satellite.

The system, named Blackbird, has been offered tomanufacturers of set-top boxes and other manufacturers.

Consumers can expect to see set-top box products,based on Blackbird, within the next six months. Motorola 0049 172 678 9545 (David Jones), or 0044 802365 956 (Una Kent)

Channel number (UHF) DTT programme Analogue programme

22 DMx2

23 ITV (London)

25 DMx1

26 BBC1 (London)

28 DMx4

29 DMx6

30 Channel 4 (London)

32 DMx3

33 BBC2 (London)

34 DMx5

37 Channel 5 (London)

DMx = Digital Multiplex

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

Page 29: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

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

tions of use of the system in the appro-priate signal.

A high-level view of the encodingequipment is shown in Figure 8. In thisdrawing, fTP is is the transmission fre-quency of the transport stream, whilefsym is the frequency of the vestigialsideband (VSB). These frequencies,which must be locked, are related by:

fTP = (188/208)(312/313)fsym.

As stated earlier, the MPEG-2 VideoCoding Standard is used by all pro-posed DTT systems to achieve an ade-quate throughput of the vast amountsof data required by the AmericanHDTV and DVB's multi -channel Stan-dard Definition TeleVision (SDTV).Although current DTT plans in Europeare geared towards SDTV, it should benoted that the choice of HDTV orSDTV has nothing to do with thetransmission of the MPEG-2 bit stream.In other words, there are no obstaclesto broadcasters using DVB-T to carryHDTV: all of the MPEG-2 compliantformats in the American HDTV stan-dard can be delivered by DVB-T

The difference between the Ameri-can and DVB-T standards exists largely

Test Card MThe Test Card for use in digital videobroadcasts (DVB), called Test Card Mas illustrated, is based on existing testcards, showing (in the UK) the famil-iar girl, blackboard and balloon,together with graticules, circles, andso on. Additional test areas for digitalbroadcasts are shown in the diagramfor location.1) Frame identifier, which shows

which frame is present, I, B orand gives it a number, for instance,2nd B or 3rd P This is consideredthe most useful parameter for faultdiagnosis.

2) Rolling colour cube. Since differ-ence signals are generated by thedigital equipment, it is useful tohave some movement in the testcard and this is provided by the cube moving acrossthe screen from left to right, weaving in front andbehind the letters BBC, M test, VID001g, and so on,always on the same line of the card.

3) Moving clock hand, which moves on every second;useful for time/movement measurement analysis.

4) Colour phase rotation area. This is to show colour dif-ference signal since the colour spectrum is changingcontinuously.

5) Moving colour zone plate to determine any imageimpairment on colour caused by cascading of multi-plex stages.

6) Moving black&white zone plate to determine anyimpairment on B&W pixels owing to cascading multi-plex stages.

in their RF modulation technique. TheAmerican system uses the single -car-rier, 8-VSB (Vestigial Side Band) modu-lation scheme, whereas DVB-T usesmultiple -carrier COFDM (CodedOFDM). Even in the USA, there is con-siderable interest in CODFM becauseit provides the most rugged and flexi-ble delivery mechanism for informa-tion available today.

[980102]

Sources:Digital Terrestrial Television Broadcastingby Paul Dambacher, Springer Verlag,1998. (Reviewed in the September 1998issue of this magazine)

BBC, London, Englandwww.bbc.co.uk

BSkyB, Isleworth, Englandwww.sky.co.uk

DigiTag: www.digitag.org

Digital TV Group, Hants, Englanddtg.org.uk

Echostar, the Netherlands

(4) Colour PhaseRotation Area

(5) Moving ColourZone Plate

(1) FrameIdentifier

FCC: www.fcc.gov

General Instruments: www.gi.com

Grundig: www.grundig.com

ITC: www.itc.org.uk

ITU, Geneva, Switzerlandwww.itu.int/newsroom

MPEG: www.mpeg.org

NEC Benelux, the Netherlands

Newman Carter Hill, London, Eng-land

Nokia Multimedia, London, Englandwww.nokia.com

Pace Micro Technology, Shipley, Eng-land; www.pacemicro.com

Panasonic: www.panasonic.co.ukSnell & Wilcox, Peterfield, England

TV/COM International, Weybridge,England; www.tvcom.com

(2) RollingColour Cube

(3) Moving (6) MovingClock Hand Black & White

Zone Plate

Test card M has been sponsored by the Department ofTrade and Industry (DTI) under the Test Bed Pro-gramme'. Leaders of the project are Snell & Wilcox, whileother members include the BBC, ITV Channel 4, andITC. It is financed by and geared to the European market

The structure of the test card enables rapid diagnosis offaults, system stress, and so on, without the need of spe-cialized (expensive) equipment. A quick look at the testcard should in many cases be sufficient to ascertain thenature of a fault.

The test card does not provide test sequences for theAmerican system. It is expected that the American orga-nizations will produce their own in due course.

Elektor Electronics 12/98 51

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

51Elektor Electronics 12/98

tions of use of the system in the appro-priate signal.

A high-level view of the encodingequipment is shown in Figure 8. In thisdrawing, fTP is is the transmission fre-quency of the transport stream, whilefsym is the frequency of the vestigialsideband (VSB). These frequencies,which must be locked, are related by:

fTP = (188/208)(312/313)fsym.

As stated earlier, the MPEG-2 VideoCoding Standard is used by all pro-posed DTT systems to achieve an ade-quate throughput of the vast amountsof data required by the AmericanHDTV and DVB’s multi-channel Stan-dard Definition TeleVision (SDTV).Although current DTT plans in Europeare geared towards SDTV, it should benoted that the choice of HDTV orSDTV has nothing to do with thetransmission of the MPEG-2 bit stream.In other words, there are no obstaclesto broadcasters using DVB-T to carryHDTV: all of the MPEG-2 compliantformats in the American HDTV stan-dard can be delivered by DVB-T.

The difference between the Ameri-can and DVB-T standards exists largely

in their RF modulation technique. TheAmerican system uses the single-car-rier, 8-VSB (Vestigial Side Band) modu-lation scheme, whereas DVB-T usesmultiple-carrier COFDM (CodedOFDM). Even in the USA, there is con-siderable interest in CODFM becauseit provides the most rugged and flexi-ble delivery mechanism for informa-tion available today.

[980102]

Sources:Digital Terrestrial Television Broadcastingby Paul Dambacher, Springer Verlag,1998. (Reviewed in the September 1998issue of this magazine)

BBC, London, Englandwww.bbc.co.uk

BSkyB, Isleworth, Englandwww.sky.co.uk

DigiTag: www.digitag.org

Digital TV Group, Hants, Englanddtg.org.uk

Echostar, the Netherlands

FCC: www.fcc.gov

General Instruments: www.gi.com

Grundig: www.grundig.com

ITC: www.itc.org.uk

ITU, Geneva, Switzerlandwww.itu.int/newsroom

MPEG: www.mpeg.org

NEC Benelux, the Netherlands

Newman Carter Hill, London, Eng-land

Nokia Multimedia, London, Englandwww.nokia.com

Pace Micro Technology, Shipley, Eng-land; www.pacemicro.com

Panasonic: www.panasonic.co.ukSnell & Wilcox, Peterfield, England

TV/COM International, Weybridge,England; www.tvcom.com

Test Card MThe Test Card for use in digital videobroadcasts (DVB), called Test Card Mas illustrated, is based on existing testcards, showing (in the UK) the famil-iar girl, blackboard and balloon,together with graticules, circles, andso on. Additional test areas for digitalbroadcasts are shown in the diagramfor 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 consideredthe most useful parameter for faultdiagnosis.

2) Rolling colour cube. Since differ-ence signals are generated by thedigital equipment, it is useful tohave some movement in the testcard and this is provided by the cube moving acrossthe screen from left to right, weaving in front andbehind the letters BBC, M test, VID001g, and so on,always on the same line of the card.

3) Moving clock hand, which moves on every second;useful for time/movement measurement analysis.

4) Colour phase rotation area. This is to show colour dif-ference signal since the colour spectrum is changingcontinuously.

5) Moving colour zone plate to determine any imageimpairment on colour caused by cascading of multi-plex stages.

6) Moving black&white zone plate to determine anyimpairment on B&W pixels owing to cascading multi-plex stages.

Test card M has been sponsored by the Department ofTrade and Industry (DTI) under the ‘Test Bed Pro-gramme’. Leaders of the project are Snell & Wilcox, whileother members include the BBC, ITV, Channel 4, andITC. It is financed by and geared to the European market

The structure of the test card enables rapid diagnosis offaults, system stress, and so on, without the need of spe-cialized (expensive) equipment. A quick look at the testcard should in many cases be sufficient to ascertain thenature of a fault.

The test card does not provide test sequences for theAmerican system. It is expected that the American orga-nizations will produce their own in due course.

Page 30: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

0 treble tone control0

C1 R1

15n

0-1 12V

83 (i)

8076

S1 a

0' 2

R12

10 k0

R13

IC1b

R3 R4 R5 R6 R7 IR8 R9

IMO ECM EDE -. MEI Elital 11E21 HIE

8 IC C 13 !Cid 15 IC1a 3 IC2b 8 IC2c 13 IC2d 18 IC2a 3

5 16 6 16

10 11 2 10 11 2

R10

51n

11R1 111/4

LI

SI TREBLE

A Increase

Decrease

S30B

Level

1.25

2.5

3 3.75

4 5

6.25

7.5

8.75

10

Design: T. GiesbertsThe treble control works in asimilar manner as the bass con-trol elsewhere in this issue, butcontains several modifications,of course. One of these is theseries network C1-C2-R1-R11.

The d.c. operating point ofIC3 is set with resistors R12 andR13. To ensure that these resis-tors do not (adversely) affect thecontrol characteristics, they arecoupled to the junction of R9and R10. In this way they onlyaffect the low -frequency noiseand the load of the op amp.Their value of 10 l(S2 is a rea-sonable compromise.

The functions of switchesS1-S3 are identical to those of

1 2

00.0000

12V®

IC1, IC2 = SSM2404P

IC2

004E4)00C4

TOOn

their counterparts in the bass tonecontrol; their influence is seenclearly in the characteristics.Good symmetry between the left-hand and right-hand channels isobtained by the use of 1% ver-sions of R1-R13 and C1, C2.

The value of resistorsR2-R10 is purposely differentfrom that of their counterparts inthe bass tone control. In the pre-sent circuit, the control rangestarts above 20 kHz. To makesure that a control range of10 dB is available at 20 kHz,the nominal amplification isX3.5 (11 dB).

The control circuit draws acurrent of about ± 10 mA.

[984115]

a

Eloktor

C5

TOOn TOOn25V

1080

R11 C2

15n

12V

:00n

R14

1M

IC33

+

fOPA627AP

:8TOOn

L0+124 124

0-12V

7 ONE

0 52 R15

EMI DEFEAT

984115 - 11

04/08/0800:3535

AP

131

Design: T. GiesbertsThe treble control works in asimilar manner as the bass con-trol elsewhere in this issue, butcontains several modifications,of course. One of these is theseries network C1-C2– R1– R1 1.

The d.c. operating point ofI C3 is set with resistors R1 2 a n dR1 3. To ensure that these resis-tors do not (adversely) affect thecontrol characteristics, they arecoupled to the junction of R9and R1 0. In this way they onlyaffect the low-frequency noiseand the load of the op a m p .Their value of 10 kΩ is a rea-sonable compromise.

The functions of switchesS1– S3 are identical to those of

their counterparts in the bass tonecontrol; their influence is seenclearly in the characteristics. Good symmetry between the left-hand and right-hand channels isobtained by the use of 1% ver-sions of R1– R1 3 and C1, C2.

The value of resistorsR2– R1 0 is purposely differentfrom that of their counterparts inthe bass tone control. In the pre-sent circuit, the control rangestarts above 20 kHz. To makesure that a control range of1 0 dB is available at 20 k H z ,the nominal amplification is

3.5 (11 d B ) .The control circuit draws a

current of about ±10 m A .[ 9 8 4 1 1 5 ]

treble tone control

Page 31: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

O torchlight dimmerO

CTR14

11RCX-10RX

9CX

12CT=0

IC3

5

7CTc

4060

9

12

4 7

3 2

5 15

2

4

6

5

11

9

COMP

yP

3

P >Q

P -Q

P <Q

I

4585

IC4

P>Q

P=Q

P<Q

ENIC2a

>4

B

01

9 IC2b 1e_> c15 2

12

LI 3

14

Design: F. Rimatzki

This circuit was originallydesigned to control the bright-ness of an electric torchlight, butmay find many other applica-tions because of its high effi-ciency, ease of operation andability to control (lamp) loadsdrawing several amps. The dim-mer offers brightness controlfrom nil to maximum in 16 stepsby means of a small push-but-ton. When the push-button isreleased, the selected brightnessis retained. One of the mostremarkable things about this cir-cuit is that it hardly adds to thebattery load, its own currentconsumption amounting to nomore than about 4 mA (at a bat-tery voltage of 3.5 V).The 16 discrete brightness val-ues are obtained by comparingtwo counter states. One of theseactually determines the lampbrightness, while the other per-forms a cyclic count from 0 to15. The lamp current is thenonly switched on if the secondvalue is smaller than or equal tothe first. To make sure theswitching losses remain as small

BUZ10

R2

D27

2x1N4148

270p

IC1c IC1a

IC1b

S1

12 11

U B

0

11

IC1 = 4049IC2 = 4520

2

as possible, a power MOSFETwith a very low on -resistance isused. The BUZ10 used heredoes, however, call for a drivevoltage of at least 6 V, so that anadditional voltage step-up con-verter is required.Counter IC2b only acts as abistable to allow the circuit to beswitched on by means of thelamp brightness push-button,Si. The circuit is switched off(current consumption: less than5 ptA) if output QO of IC2b(pin 11) supplies a logic highlevel. The 27 -kHz (approx.)oscillator built from gates ICla,IC lb and IC1c is then disabled,so that the outputs of ICla andIC1b are logic high. The ICs inthe circuit are then powered viachoke Ll and the output tran-sistors of ICla and IC1b. This isunusual but possible becausethese transistors can also pass avoltage level at the IC outputs tothe supply connection, insteadof the other way around (whichis far more usual). Because ofthe logic -high level at the resetinputs of counters IC3 and IC2a,comparator IC4 receives input

V V10mH

Tmn

nT00n

Lai

0

+0BT1

3...6V

984075 - 11

54 Elektor Electronics 12/9854 Elektor Electronics 12/98

Design: F. Rimatzki

This circuit was originallydesigned to control the bright-ness of an electric torchlight, butmay find many other applica-tions because of its high effi-ciency, ease of operation andability to control (lamp) loadsdrawing several amps. The dim-mer offers brightness controlfrom nil to maximum in 16 stepsby means of a small push-but-ton. When the push-button isreleased, the selected brightnessis retained. One of the mostremarkable things about this cir-cuit is that it hardly adds to thebattery load, its own currentconsumption amounting to nomore than about 4 mA (at a bat-tery voltage of 3.5 V).The 16 discrete brightness val-ues are obtained by comparingtwo counter states. One of theseactually determines the lampbrightness, while the other per-forms a cyclic count from 0 to15. The lamp current is thenonly switched on if the secondvalue is smaller than or equal tothe first. To make sure theswitching losses remain as small

as possible, a power MOSFETwith a very low on-resistance isused. The BUZ10 used heredoes, however, call for a drivevoltage of at least 6 V, so that anadditional voltage step-up con-verter is required.Counter IC2b only acts as abistable to allow the circuit to beswitched on by means of thelamp brightness push-button,S1. The circuit is switched off(current consumption: less than5 µA) if output Q0 of IC2b(pin 11) supplies a logic highlevel. The 27-kHz (approx.)oscillator built from gates IC1a,IC1b and IC1c is then disabled,so that the outputs of IC1a andIC1b are logic high. The ICs inthe circuit are then powered viachoke L1 and the output tran-sistors of IC1a and IC1b. This isunusual but possible becausethese transistors can also pass avoltage level at the IC outputs tothe supply connection, insteadof the other way around (whichis far more usual). Because ofthe logic-high level at the resetinputs of counters IC3 and IC2a,comparator IC4 receives input

torchlight dimmer0

02

IC2aEN

30

41

52

63

2

1C

7R

IC2bEN

110

121

132

143

10

9C

15R

CTR14

IC3

4060

CT=0

CX

10

9

12

15

13

14

11

13

12

CT

RCX

RX

!G

1

6

4

5

7

11

3

4

5

6

7

8

9

3

2

+

R1

39k

R3

10Ω

R2

120k

R4

120k

R5

47

k

C4

4n7

C5

100n

C6

100n

C7

100n

C8

100n

C3

270p

C2

2µ263V

C1

2µ263V

La1

BT1

3...6V

L1

10mH

14 151

IC1f

7 61

IC1c

3 21

IC1a

5 41

IC1b

D2

1N4148D1

S

D

G

T1

BUZ10

9 101

IC1d

11121

IC1eS1

BUZ10

GD

S

D

IC1

1

8

IC2

16

8

IC3

16

8

IC4

16

8

UB

UB UB

UB

2x

984075 - 11

IC1 = 4049IC2 = 4520

4585

IC4

COMP

P=Q

P<Q

P=Q

P>Q

P<Q

P>Q

11

14

10

15

12

13

9

1

7

2

5

6

4

3

0

0

3

3

P

Q

Page 32: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

55Elektor Electronics 12/98

data which causes it to pull itsP<Q output (pin 12) logic high.The result is that inverter IC1fpinches off the BUZ10 MOS-FET, and the lamp remains off.When the push-button is actu-ated for the first time, thebistable in IC2b receives aclock pulse from switchdebouncing circuit IC1c-IC1d.Next, the counters and the oscil-lator are enabled. The duty fac-tor of the oscillator signal isdetermined by resistors R1 and

R2. The oscillator output signalis filtered by R3 and C1.Although the step-up converteris only capable of supplying afew mA, that is sufficient for theCMOS ICs and the BUZ10MOSFET. For battery voltagesbetween 3 and 6 V, the indicatedvalues of R1 and R2 enable avoltage of 8.5 V to about 16 V tobe created for powering the ICsand driving the BUZ10.As long as the push-button isheld depressed, the level at the

cascading input of IC4, pin 4,causes the P>Q output, pin 13,to be enabled, so that IC3 isclocked. The counter slowlyincreases the value at the ‘P’inputs of the comparator,thereby controlling the duty fac-tor (mark/space ratio) of the sig-nal at the comparator’s P<Qoutput, pin 12. As soon as IC3reaches its maximum counterstate, the signal at pin 13 of IC4no longer changes, so that thecounter is not started at 0 again.The P<Q output then alsoremains at 0, so that T1 is dri-ven hard and the lamp lights atmaximum brightness. If thepush-button is released beforethe maximum brightness isreached, counter IC3 no longerreceives clock pulses and‘freezes’ at the current state,

causing the lamp to light at theselected brightness. The nextaction on S1 resets the entirecircuit and switches the lamp offIf so desired, the brightness con-trol rate may be reduced by dou-bling or trebling the value of C3.To compensate the resultantdrop in the IC supply voltage,the value of choke L1 then hasto be increased proportionally.The IC supply voltage shouldalways be between 8 V and 16 V(maximum value of 4000 seriesCMOS ICs).The circuit is best built on aprinted circuit board of whichthe templates are shown here.Unfortunately this board is notavailable ready-made throughthe Publishers.

(984075-1, Gb)

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

984075-1(C) ELEKTORC1

C2

C3

C4

C5

C6

C7C8

D1D2

H1H2

H3H4

IC1

IC2

IC3

IC4

L1

R1 R2

R3

R4

R5T1

La1

S1

+B

at-

984075-1

984075-1(C) ELEKTOR

COMPONENTS LIST

Resistors:R1 = 39kΩR2,R4 = 120kΩR3 = 10ΩR5 = 47kΩ

Capacitors:C1,C2 = 2µF2 63V radialC3 = 270pF ceramicC4 = 4nF7C5-C8 = 100nF

Inductor:

L1 = 10mH choke

Semiconductors:D1,D2 = 1N4148T1 = BUZ10 (Siemens)IC1 = 4049IC2 = 4520IC3 = 4060IC4 = 4585

Miscellaneous:S1 = push-button, 1 make

contactBt1 = torchlight battery, 3-6VLa1 = torchlight lamp

Design: J. GonzalezAlthough you may well be theproud owner of the very latestNiCd battery charger, you maystill come across the odd 'incom-patible' battery, for example, onehaving a rare voltage or requir-ing a much higher charging cur-rent than can be supplied byyour off-the-shelf charger. Inthese cases, many of you willresort to an adjustable mainsadaptor (say, a 500-mA type)because that is probably thecheapest way of providing thedirect voltage required to chargethe battery. Not fast and not veryefficient, this 'rustic' chargingsystem works, although subjectto the following restrictions:1. You should have some idea

of the charging current. Incase you use an adaptor

which is adjustable but ofthe unregulated, low outputcurrent type, you can adjustthe current by adjusting theoutput voltage.

2. You have to know if the cur-rent actually flows throughthe battery. A current-detect-ing indicator is therefore

much to be preferred over avoltage indicator.

3. To prevent you from forget-ting all about the chargingcycle, the indicator shouldbe visible from wherever youpass by frequently.

Using the circuit shown here,

the LED lights when the base-emitter potential of the transis-tor exceeds about 0.2 V. Using aresistor of 1 Ω as suggested thishappens at a current of about200 mA, or about 40 mA if R1 ischanged to 4.7 Ω.

The voltage drop caused bythis indicator can never exceedthe base-emitter voltage (UBE) ofthe transistor, or about 0.7 V.Even if the current through R1continues to increase beyondthe level at which UBE = 0.7 V,the base of the transistor will'absorb' the excess current. TheTO-220 style BU406 transistorsuggested here is capable ofaccepting base currents up to 4A.

Using this charging indicatoryou have overcome the restric-tions 2 and 3 mentioned above.

battery-charging indicatorfor mains adaptor0

03

D1

R2

47

T1

BU406 R1

1 Ω984083 - 11

Page 33: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

56 Elektor Electronics 12/98

What remains is the problem ofknowing the required current.As long as UBE remains below0.6 V or so, the voltage acrossR1 is a faithful indication of thecharging current. Alternatively,you may insert an ammeter tofind out about the charging cur-rents produced at different out-

put voltage settings on the adap-tor. Next, you choose betweenreasonably fast charging, say, inabout 5 hours using C(Ah)/5, orslower, say, 10 hours atC(Ah)/10. C(Ah) is the batterycapacity in (milli-) ampere-hours, which is usually printedon the battery. In general, the

lower the charging current, thesmaller the risk of damage to thebattery if you forget to switch offthe charger.

In some cases it will be pos-sible to incorporate the circuitinto the mains adaptor. That maybe dangerous, however, becauseof the presence of the mains volt-

age in the adaptor housing. Asafer alternative is to install thecircuit in a remote control box.

The circuit is not protectedagainst reversal of the batterypolarity. If such protection isrequired, a fuse or circuitbreaker should be added.

[984083]

Design: T. GiesbertsFor some time now, there havebeen a number of tape cassettedecks available at low pricesfrom mail order businesses andelectronics retailers. Such decksdo not contain any electronics,of course. It is not easy to build arecording amplifier and thefairly complex magnetic biasingcircuits, but a playback ampli-fier is not too difficult as the pre-sent one shows.

The stereo circuits in thediagram, in conjunction with asuitable deck, form a good-qual-ity cassette player. The distor-tion and frequency range (up to23 kHz) are up to good stan-dards. Moreover, the circuit canbe built on a small board forincorporation with the deck in asuitable enclosure.

Both terminals of couplingcapacitor C1 are at groundpotential when the amplifier isswitched on. Because of thesymmetrical ±12 V supplylines, the capacitor will not becharged. If a single supply isused, the initial surge when thecapacitor is being chargedcauses a loud click in the loud-speaker and, worse, magnetizesthe tape.

The playback head providesan audio signal at a level of200–500 mV. The two amplifiersraise this to line level, not lin-early, but in accordance with theRIAA equalization characteris-tic for tape recorders. Broadlyspeaking, this characteristicdivides the frequency range intothree bands:• Up to 50 Hz, corresponding

to a time constant of3.18 ms, the signal is highlyand linearly amplified.

• Between 50 Hz and1.326 kHz, corresponding toa time constant of 120 µs, fornormal tape, or 2.274 kHz,

corresponding to a time con-stant of 70 µs, for chromiumdioxide tape, the signal isamplified at a steadilydecreasing rate.

• Above 1.326 kHz or2.274 kHz, as the case maybe, the signal is slightly andlinearly amplified.

This characteristic is deter-mined entirely by A1 (A1’). Tomake the amplifier suitable foruse with chromium dioxide tape,add a double-pole switch (forstereo) to connect a 2.2 kΩresistor in parallel with R3 (R3’).

The output of A1 (A1’) isapplied to a passive high-pass

rumble filter, C3-R5 (C3’-R5’)with a very low cut-off frequencyof 7 Hz. The components of thisfilter have exactly the samevalue as the input filter, C1-R1(C1’-R1’).

The second stage, A2 (A2’)amplifies the signal ×100, thatis, to line level (1 V r.m.s.).

playback amplifierfor cassette deck0

04

6

5

7IC1b

2

3

1IC1a

R2

1k

2

R1

10

0k

R6

1k

R51

00

kR8

10

0k

R4

56k

R3

1k5

C2

56n

C3

220n

C5

1µMKT

R7

100k

C4

68p

C1

220nL

*

*

6

5

7IC1b'

2

3

1IC1a'

R2'

1k

2

R1'

10

0k

R6'

1k

R5'

10

0k

R8'

10

0k

R4'

56k

R3'

1k5

C2'

56n

C3'

220n

C5'

1µMKT

R7'

100k

C4'

68p

C1'

220n R

*

*

L

R

IC1

8

4

IC1'

8

4

C6

47n

C7

47n

D1

1N4148

D2

1N4148

* Metallfilm Widerstand

IC1, IC1' = NE5532

12V

12V 984113 - 11

* metaalfilm weerstand

metal film resistor*

Page 34: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

57Elektor Electronics 12/98

Capacitor C4 limits the upperfrequency range to avoid r.f.interference and any tendency of

the amplifier to oscillate.The amplifier needs a sym-

metrical ±12 V power supply

that can provide a current of upto 0.5 A. The greater part of thiscurrent is drawn by the motor of

the deck; the electronic circuitsdraw only 15 mA.

[984113]

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

Design: L. LemmensWhen the contents of two exist-ing memory address have to beinterchanged for one reason oran other, there is usually a needfor an additional address or vari-able:

MOV dummy,var1MOV var1,var2MOV var2,dummy

This dummy variable is notalways necessary:

XOR var1,.var2XOR var2,var1XOR var1,var2

This tip may well be of usewhen the memory space is lim-ited. It may also be used with

higher programming languagesto save having to declare anadditional variable.

[984080]

memory change-over tip

00

5

Design: G. KleineMembers of the 8051 family ofmicrocontrollers (MCS51) arewell-known and widely used.The controllers have a power-down mode in which the pro-gram processing is suspendedby the clock oscillator andended with a power-downinstruction. To reduce the cur-rent drain, the supply voltage isreduced to a minimum of 2 Vafter the powered-down modehas been selected. This modecan only be disabled by a reset,for which the supply voltageneeds to be returned to 5 V.

In simple applications of the8051, the EPROM containingthe program to be executed isenabled by making PSEN (pro-gram storage enable) active viaits OE (output enable) terminal.There are also circuits wherePSEN acts on the CS (chipselect) terminal of the EPROM.

Use of the power-down modehas a drawback: line ALE(address latch enable), likePSEN, remains low during thepower-down mode and so holdsthe EPROM active. It occupiesthe address/data bus with theaccidentally same addressedbyte.

This drawback can beremoved by the circuit in thediagram. A retriggerable mono-stable evaluates the low and

high edges of the ALE signal,which after a power-down andbefore a reset has a clock pulse.The output of the monostablesets a high on the CS input of

the EPROM when the power-down mode is selected (andwhen, consequently, the dis-abled quartz oscillator can nolonger generate an ALE

pulse).This arrangement ensuresthat the EPROM can also beswitched to the power-downmode.

Moreover, the monostable

improved power-downfor the 80510

06

P1.1/T2X

P1.0/T2

EA/VP

ALE/P

RESET

80C31

P0.0

P0.1

P0.2

P0.3

P0.4

P0.5

P0.6

P0.7

P1.2

P1.3

P1.4

P1.5

P1.6

P1.7

P2.0

P2.1

P2.2

P2.3

P2.4

P2.5

P2.6

P2.7

PSEN

INT0

INT1

µC

X 1 X 2

TXD

RXD

39

38

37

36

35

34

33

32

21

22

23

24

25

26

27

28

31

19 1820

40

17 RD

16 WR

29

30

11

10

12

13

14 T015 T1

1

2

3

4

5

6

7

8

9

MCS-51

AD0

AD1

AD2

AD3

AD4

AD5

AD6

AD7

AD0

AD1

AD2

AD3

AD4

AD5

AD6

AD7

10A0

9A1

8A2

7A3

6A4

5A5

4A6

3A7

25A8

24A9

21A10

23A11

2A12

1422

OE

20

CS

281

VPP

11D0

12D1

13D2

15D3

16D4

17D5

18D6

19D7

EPROM

26A13

27A14

27C256

74HCT123

RX/CX

14

CX

15

13

4

&

1

2

3

74HCT573

12

13

14

15

16

17

18

19

EN

11C1

1D2

3

4

7

8

9

5

6

1

1n

10k

AD0

AD1

AD2

AD3

AD4

AD5

AD6

AD7

A0

A1

A2

A3

A4

A5

A6

A7

A8

A9

A10

A11

A12

A13

A14

A15

A0

A1

A2

A3

A4

A5

A6

A7

A8

A9

A10

A11

A12

A13

A14

984127 - 11

5V

address/data bus

address bus

Page 35: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

58 Elektor Electronics 12/98

output may also be set on theaddress decoder of the system,or the combined CS lines ofother peripheral equipment, sothat these are also in the power-down mode.

Note that with componentvalues as specified, the mono-stable has a time constant ofabout 4.5 µs.

[984127]

Further reading:

Elektor Electronics, March 1998,‘80C32-BASIC control com-puter’.

Elektor Electronics, September1997, ‘Data acquisition system’

Elektor Electronics, June 1997,80C537 microcontroller board’

Design: K. Syttkus

The alarm may be used for avariety of applications, such asfrost monitor, room temperaturemonitor, and so on.

In the quiescent state, thecircuit draws a current of only afew microamperes, so that, intheory at least, a 9 V dry battery(PP3, 6AM6, MN1604, 6LR61)should last for up to ten years.Such a tiny current is not possi-ble when ICs are used, and thecircuit is therefore a discretedesign.

Every four seconds a mea-suring bridge, which actuates aSchmitt trigger, is switched onfor 150 ms by a clock generator.In that period of 150 ms, theresistance of an NTC thermistor,R11, is compared with that of afixed resistor. If the former isless than the latter, the alarm isset off.

When the circuit is switchedon, capacitor C1 is not chargedand transistors T1–T3 are off.After switch-on, C1 is chargedgradually via R1, R7, and R8,until the base voltage of T1exceeds the threshold bias.

Transistor T1 then comes on andcauses T2 and T3 to conductalso. Thereupon, C1 is chargedvia current source T1-T2-D1,until the current from the sourcebecomes smaller than that flow-ing through R3 and T3 (about3 µA). This results in T1 switch-ing off, so that, owing to the cou-pling with C1, the entire circuitis disabled.

Capacitor C1 is (almost) fullycharged, so that the anodepotential of D1 drops well below0 V. Only when C1 is chargedagain can a new cycle begin.

It is obvious that the largerpart of the current is used forcharging C1.

Gate IC1a functions asimpedance inverter and feed-back stage, and regularlyswitches on measurementbridge R9–R12-C2-P1 briefly.The bridge is terminated in adifferential amplifier, which, inspite of the tiny current (andthe consequent smalltransconductance of the tran-sistors) provides a large ampli-fication and, therefore, a highsensitivity.

Resistors R13 and R15 pro-vide through a kind of hystere-sis a Schmitt trigger input forthe differential amplifier, whichresults in unambiguous and fastmeasurement results.

Capacitor C2 compensatesfor the capacitive effect of longcables between sensor and cir-cuit and so prevents falsealarms.

If the sensor (R11) is built inthe same enclosure as theremainder of the circuit (as, forinstance, in a room temperaturemonitor), C2 and R13 may beomitted. In that case,C3 willabsorb any interference signalsand so prevent false alarms.

To prevent any residualcharge in C3 causing a falsealarm when the bridge is inequilibrium, the capacitor is dis-charged rapidly via D2 whenthis happens.

Gates IC1c and IC1d form anoscillator to drive the buzzer (ana.c. type).

Owing to the very highimpedance of the clock, anepoxy resin (not pertinax) boardmust be used for building the

alarm. For the same reason, C1should be a type with very lowleakage current.

If operation of the alarm isrequired when the resistance ofR11 is higher than that of thefixed resistor, reverse the connec-tions of the elements of the bridgeand thus effectively the invertingand non-inverting inputs of thedifferential amplifier.

An NTC thermistor such asR11 has a resistance at –18 °Cthat is about ten times as high asthat at room temperature. It is,therefore, advisable, if not amust, when precise operation isrequired, to consult the datasheet of the device or take anumber of test readings.

For the present circuit, theresistance at –18 °C must be300–400 kΩ. The value of R12should be the same. Preset P1provides fine adjustment of theresponse threshold.

Note that although the proto-type uses an NTC thermistor, adifferent kind of sensor may alsobe used, provided its electricalspecification is known and suitsthe present circuit. [984078]

general-purpose alarm

00

7

R1

30M

R2

4M7

R3

22

0k

R4

1M

R5

3M9

R6

56

k

R7

3M9

R8

3M9

R9

33

0k

R10

27

0k

R12

R14

1M

R16

1M

R18

3M9

R19

2M7

R11

NTC

- Θ

R13

100k

R15

10M

R17

1M

D1

1N

T3

BC547

T1

BC

T4 T5

BC547

T7T6

BC557

100k

P1C2

1n

1

23

IC1a

&

T2

13

1211

IC1d

&

C3

4n7

D2

1N4148

9

810

IC1c

&

C4

68p

BZ1C1

220n

4148

IC1

14

7

547

2x

2x

IC1 = 4093

5 6

4IC1b

&

*

*

984078 - 11zie tekst* see text* siehe Text* voir texte*

9V

Page 36: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

accurate bass tone controlO

R1

12V

53 T

/7 .07 0.

2

A

IC b

R3 R4 R5

g IC c 13 IC d 18 IC a 3 IC2b

C1

II1 a

R6 R7 R8 R9

Eli EMI EDE IMO

IC2c 13 IC2d 18 IC2a 3

6 16 5 15 16

0 11 20 1 10 11 20

R10

1600

511,A 12V

0

:100n

R11

11M I-

Bl

R13 11 Ela 10k

SI BASS

A Increase

B Decrease

Design: T. GiesbertsA difficult problem in the designof conventional stereo tone con-trols is obtaining synchronoustravel of the potentiometers.Even a slight error in synchronycan cause phase and amplitudedifferences between the twochannels. Moreover, linearpotentiometers are often used insuch controls, and these giverise to unequal performance byhuman hearing. Special poten-tiometers that counter these dif-ficulties are normally hard toobtain in retail shops.

A good alternative is a con-trol based on a rotary switchand a discrete potential divider.The problem with this that forgood tone control more than sixsteps are needed, and switchesfor this are also not readilyavailable. Fortunately, elec-tronic circuits can remove these

5308

Level

1.25

2 2.5

3 3.75

4 5

6.25

7.5

7 6.75

10

ENVOI'

12V®

17

IC1

00000014

IC1, IC2 = SSM2404P

12 (DIC2

000000C3

TIOOn14

i4 =C8

100n 10k,25V

C5

TOOn

2

IC33

4

OPA627AP

C7

7100n

0+12V 12V

@

700µ25V e 12V

09107/618 13:0420

QP

difficulties.The analogue selectors used

may be driven by mechanicalswitches, standard logic circuitor a microcontroller. The selec-tors used in the present circuitare Type SSM2404 versions

from Analogue Devices, whichswitch noiselessly. Each IC con-tains four selectors, so that atotal of eight are used. The stepsize is 1.25 dB at 20 Hz with amaximum of 10 dB.

The circuit can be mirrored

TONE

0 S2 R12

1=1

DEFEAT

984117 - 11

with Si, which means that aselection may be made of ampli-fication or attenuation of bassfrequencies. The user canchoose between attenuation onlyand extending the range bydividing R9. The control can bebridged by switch S2.

To prevent the output imped-ance of the circuit having toomuch effect on the operation ofthe circuit, the output imped-ance must be 10 S2. ResistorR12 protects the circuit againsttoo small a load.

At maximum bass amplifica-tion at Uhl = 1 V r.m.s., theTHD+N <0.001% for a fre-quency range of 20 Hz to20 kHz and and a bandwidth of80 kHz.

The circuit draws a currentof about 10 mA.

[984117]

Design: T. GiesbertsA difficult problem in the designof conventional stereo tone con-trols is obtaining synchronoustravel of the potentiometers.Even a slight error in synchronycan cause phase and amplitudedifferences between the twochannels. Moreover, linearpotentiometers are often used insuch controls, and these giverise to unequal performance byhuman hearing. Special poten-tiometers that counter these dif-ficulties are normally hard toobtain in retail shops.

A good alternative is a con-trol based on a rotary switchand a discrete potential divider.The problem with this that forgood tone control more than sixsteps are needed, and switchesfor this are also not readilyavailable. Fo r t u n a t e l y, elec-tronic circuits can remove these

d i f f i c u l t i e s .The analogue selectors used

may be driven by mechanicalswitches, standard logic circuitor a microcontroller. The selec-tors used in the present circuitare Type SSM2404 versions

from Analogue Devices, whichswitch noiselessly. Each IC con-tains four selectors, so that atotal of eight are used. The stepsize is 1.25 dB at 20 Hz with amaximum of 10 d B .

The circuit can be mirrored

with S1, which means that aselection may be made of ampli-fication or attenuation of bassfrequencies. The user canchoose between attenuation onlyand extending the range bydividing R9. The control can bebridged by switch S2.

To prevent the output imped-ance of the circuit having toomuch effect on the operation ofthe circuit, the output imped-ance must be ≤ 10 Ω. Re s i s t o rR1 2 protects the circuit againsttoo small a load.

At maximum bass amplifica-tion at Ui n = 1 V r.m.s., theTHD+N <0.001% for a fre-quency range of 20 Hz to2 0 kHz and and a bandwidth of8 0 k H z .

The circuit draws a currentof about 10 m A .

[ 9 8 4 1 1 7 ]

accurate bass tone control

Page 37: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

CO ultra low -noiseMC preamplifier

This preamplifier was designedfor low -impedance signalsources like MC (moving -coil)pick-up cartridges used in high -end record players (yes, theystill exist). The actual inputimpedance of the preamplifier is100 Q. To keep the input noiseas low as possible, three dual

K1

transistors type SSM2220 orMATO3 transistors are con-nected in parallel to form a dis-crete difference amplifier. Byconnecting this amplifier aheadof an opamp (0P27), the inputnoise of the opamp becomesimmaterial. The base connec-tions of the discrete amplifier

COMPONENTS LIST

Resistors:R1,R12 = 1005R2 = 15kQR3 = 82QR4,R5 = 1kQ50R6 = 1505R7,R8 = 39QR9 = 5Q62R10 = 82Q5R11 = 5115R13 = 100kQP1 = 50Q preset H

Capacitors:Cl = 10nFC2 = 10,uF MKT (Siemens)

raster 22.5mm or 27.5mm

then function as the inputs of asuper-opamp with a very lowinput noise level. An advantageof the p -n -p transistors usedhere over their n -p -n counter-parts is their much lower low -frequency noise level. On thedown side, a fairly large biascurrent of about 5.5 ittA is cre-ated at the input. This is theresult of the 2-mA setting foreach transistor in combinationwith the relatively low gain ofthe p -n -p devices.

rIS,5

100n 220µ25V

-0

984086 - 11

C3,C5,C7 = 220,uF 25V radialC4,C6 = 100nF

Semiconductors:D1 = red LED, flatT1,T2,T3 = SSM2220 or

MATO3 (Analog Devices)T4 = BC560CIC1 = OP27GP (Analog

Devices)

Miscellaneous:K1,K2 = phono (line) socket,

PCB mount, gold-plated, e.g.T -709G fromMonacor/Monarch (availablefrom C -I Electronics or Stip-pler Electronics)

Preset P1 and resistors R7/R8enable you to iron out any toler-ances on R4 and R5 in the dif-ference amplifier output. Tran-sistor T4 and LED D1 ensure astable current setting for the dif-ference amplifier. D1 should bea flat, red, LED which is fittedface-to-face against T4 for ther-mal coupling. Because the inputnoise level amounts to0.4 nV/Ai Hz (theoretical valuefor a 10-Q resistor), it is essen-tial that the feedback adds aslittle as possible to the overallnoise figure. Consequently, theimpedance of the feedback cir-cuit must be much lower than10 Q. Furthermore, the OP27demands a certain minimumload impedance, so that thefeedback impedance may not beless than 600 Q. To ensure thata low value can be used for R9,a compromise had to be foundbetween maximum gain (here,approx. 24 dB or 15.7 times) onthe one hand, and the value ofR9. By fitting an additionalresistor, R11, ahead of theactual feedback, the opamp isnot excessively loaded, while R9adds 'only' 0.3 nV/Ai Hz to theinput noise level, which, basedon measurement data, amountsto 0.52 nV/Ai Hz. If more gain isneeded, a noise figure of about0.4 nV/Ai Hz may be achieved ata lower value of R9. The obvi-ous disadvantage of adding R11is a higher internal gain, caus-ing a smaller bandwidth and alower drive margin. Fortunately,these factors are of little conse-quence in the case of moving -coil elements.There are two ways to adjust P1.The first is to adjust the output

60 Elektor Electronics 12/9860 Elektor Electronics 12/98

This preamplifier was designedfor low-impedance signalsources like MC (moving-coil)pick-up cartridges used in high-end record players (yes, theystill exist). The actual inputimpedance of the preamplifier is100 Ω. To keep the input noiseas low as possible, three dual

transistors type SSM2220 orMAT03 transistors are con-nected in parallel to form a dis-crete difference amplifier. Byconnecting this amplifier aheadof an opamp (OP27), the inputnoise of the opamp becomesimmaterial. The base connec-tions of the discrete amplifier

then function as the inputs of asuper-opamp with a very lowinput noise level. An advantageof the p-n-p transistors usedhere over their n-p-n counter-parts is their much lower low-frequency noise level. On thedown side, a fairly large biascurrent of about 5.5 µA is cre-ated at the input. This is theresult of the 2-mA setting foreach transistor in combinationwith the relatively low gain ofthe p-n-p devices.

Preset P1 and resistors R7/R8enable you to iron out any toler-ances on R4 and R5 in the dif-ference amplifier output. Tran-sistor T4 and LED D1 ensure astable current setting for the dif-ference amplifier. D1 should bea flat, red, LED which is fittedface-to-face against T4 for ther-mal coupling. Because the inputnoise level amounts to0.4 nV/√Hz (theoretical valuefor a 10-Ω resistor), it is essen-tial that the feedback adds aslittle as possible to the overallnoise figure. Consequently, theimpedance of the feedback cir-cuit must be much lower than10 Ω. Furthermore, the OP27demands a certain minimumload impedance, so that thefeedback impedance may not beless than 600 Ω. To ensure thata low value can be used for R9,a compromise had to be foundbetween maximum gain (here,approx. 24 dB or 15.7 times) onthe one hand, and the value ofR9. By fitting an additionalresistor, R11, ahead of theactual feedback, the opamp isnot excessively loaded, while R9adds ‘only’ 0.3 nV/√Hz to theinput noise level, which, basedon measurement data, amountsto 0.52 nV/√Hz. If more gain isneeded, a noise figure of about0.4 nV/√Hz may be achieved ata lower value of R9. The obvi-ous disadvantage of adding R11is a higher internal gain, caus-ing a smaller bandwidth and alower drive margin. Fortunately,these factors are of little conse-quence in the case of moving-coil elements.There are two ways to adjust P1.The first is to adjust the output

ultra low-noiseMC preamplifier0

09

K2K1

R1

10

R13

10

0k

R3

82

Ω

R2

15

k

R4

1k

50

R7

39

Ω

R5

1k

50

R8

39

Ω

R9

62

R11

51

R6

150Ω

R10

82Ω5

R12

100Ω

C1

10n

C2

10µ

50Ω

P1

C3

220µ25V

C5

220µ25V

C7

220µ25V

C4

100n

C6

100n

IC1

OP27

2

3

6

7

4

1

8

T4

BC560C

D1

T3b

8

7

6 T2a

1

2

3 T1b

8

7

6 T1a

1

2

3 T2b

8

7

6 T3a

1

2

3

T1, T2, T3 = SSM2220

15V

15V984086 - 11

COMPONENTS LIST

Resistors:R1,R12 = 100ΩR2 = 15kΩR3 = 82ΩR4,R5 = 1kΩ50R6 = 150ΩR7,R8 = 39ΩR9 = 5Ω62R10 = 82Ω5R11 = 511ΩR13 = 100kΩP1 = 50Ω preset H

Capacitors:C1 = 10nFC2 = 10µF MKT (Siemens)

raster 22.5mm or 27.5mm

C3,C5,C7 = 220µF 25V radialC4,C6 = 100nF

Semiconductors:D1 = red LED, flatT1,T2,T3 = SSM2220 or

MAT03 (Analog Devices)T4 = BC560CIC1 = OP27GP (Analog

Devices)

Miscellaneous:K1,K2 = phono (line) socket,

PCB mount, gold-plated, e.g.T-709G fromMonacor/Monarch (availablefrom C-I Electronics or Stip-pler Electronics)

Page 38: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

61Elektor Electronics 12/98

voltage to nil (measure at IC1pin 6). The second option is tomeasure the input offset, for

example, 0.55 mV across100 Ω. Assuming that the offsetcaused by T1, T2 and T3 is neg-

ligible, then the output voltageshould be 15.68 x 0.55 mV forperfect symmetry, in otherwords, junction R10-R11-R12should be at 8.62 mV withrespect to ground.Those of you who like to exper-

iment may want to try the effectsof reducing the number of inputtransistors from three to just one.You may want to do this, forexample, to reduce the inputbias current. Resistor R3 thenhas to be changed into 249 Ω.Do remember, however, that theinput noise level then rises by2.5 dB!The output has a large, solid10 µF MKT (metal theraphte-late, ask your local Siemens dis-tributor) capacitor to prevent a

large offset voltage beingapplied to the input of an MDamplifier.The preamplifier is powered bya symmetrical, regulated 15-Vsupply, and draws about 16 mAon each rail. Finally, here are a

few key figures measured on ourprototypes:The preamplifier is best built onthe printed circuit board whoseartwork is shown here. Con-struction is uncritical, but do notforget the wire links under tran-sistor T3 and next to capacitorC2. The PCB is unfortunatelynot available ready-made fromthe Publishers.

(984086-1, Gb)

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

984086-1

(C) ELEKTOR

C1

C2

C3

C4

C5

C6

C7

D1

H1 H2

H3 H4

IC1

K1 K2

OU

T

P1

R1

R2

R3

R4

R5

R6

R7R8

R9R10

R11

R12

R13T1

T2

T3

T40 -+

984086-1

984086-1

(C) E

LEK

TOR

Configuration: 3 x SSM2220/MAT03signal: 0.5 mV/25 Ω input short-circuited

S/N (BW = 22 kHz) 71.2 dB 74 dB74 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

Design: G. KleineThe Philbrick oscillator is a littleknown design, patented by theAmerican scientist George APhilbrick in 1956. It generatessignals at low amplitude anduses fairly standard compo-nents. The circuit, consisting ofthree resistors and three capac-itors (see Figure 1), was origi-nally used for d.c. decoupling atthe input of oscilloscopes.

Since the step (transient)

response of the RC network isgreater than 1000, it may beused to build an oscillator byfeeding back the output signal tothe input via a high-resistancevoltage follower. The resultingoscillator can generate even verylow audio frequencies.

The diagrams in Figures 2and 3 show two versions of theoscillator. The one with theop amp has the disadvantagethat it needs a symmetrical

Philbrick oscillator

01

0

C C C

R RR

U in

Uout

984121 - 11

C C

R2

1M

R3

1M

R1

1M

IC1

LMC

Uout

UB

UB

7101

984121 - 12

C

C C

R2

1M

R3

1M

R1

1M

T1

BC517

R4

1k

C

C1Uout

100k

P1

984121 - 13

5V

*

see text*PP1 - 2V

Page 39: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

62 Elektor Electronics 12/98

power supply of ±1.5–±7.5 V.If that is a problem, the circuitbased on a transistor can beused. This operates from apower supply of +5 V.

The operating point of theemitter follower circuit in Fig-ure 3 is set with P1 so that oscil-

lations and maximum outputvoltage are guaranteed.

When the output of the tran-sistor version contains very lownear-sinusoidal frequencies, itshould be applied to the follow-ing stage via an electrolyticcapacitor. This capacitor may

have to be polarized, dependingon whether there is any directvoltage at the input of the fol-lowing stage.

In the transistor oscillatorwith resistor values as specified,the following frequencies weremeasured with the stated capac-

itor values.

C (nF) f (Hz)100 510 501 500

[984121]

From an idea by R. SontheimerTo make a certain musicalinstrument in a group stand out,a so-called presence filter isnormally used. Unfortunately,the types usually found inamplifiers and mixers can onlyraise the level of the instrumentoutput, but not attenuate it.

The filter in the diagram pro-vides amplification (15 dB) aswell as attenuation (15 dB) overthe presence range (see Fig-ure 1). When potentiometer P1is at its centre position, the signalis unaltered.

The input signal (see Fig-ure 2) is applied to impedanceconverter A1. Capacitor C1blocks any d.c. on the signal.Resistor R1 sets the input resis-tance of the circuit. Diodes D1and D2 protect the input againsthigh voltages. Resistor R2 limitsthe current to the input of theimpedance converter.

The actual filter process iscarried out by op amps A2 andA3 and associated components.The filter behaves as a fre-quency-dependent resistancewhose value is a minimum atabout 3.5 kHz. At very high andvery low frequencies, the resis-tance of the filter is high.Depending on the setting of P1,the filter forms a potential

divider with R3 or part of thefeedback loop with R4. When P1is at its centre position, the fil-ter attenuates the signal to thesame degree as it is amplifiedby A2.

[984106]

presence filter

01

1

C1

330n

R1

10

0k

R5

39

R6

2k

2

R2

470Ω

R3

2k2

R4

2k2

C2

47n

C3

47n

6

5

7IC1b

2

3

1IC1a

9

10

8IC1c

13

12

14IC1d

P11klin.

R7

470Ω

C4

D212V

D112V

IC1

4

11

15V

15V

IC1 = TL074

984106 - 11

C5

100n

C6

100n

15

0

- 6

+ 6

+ 12

+ 18

- 12

- 18

32 64 125 250 500 1k 2k 4k 8k 16k 30k

dB

f (Hz) 984106 - 12

1

2

Design K. LorenzThere are systems in which it isimperative that the supply volt-age of, say, a motor, always has

the correct polarity. It is, ofcourse, possible to use a bridgerectifier for this, but if large cur-rents are involved, this is not

always possible. This may bebecause large voltage dropsacross diodes result in appre-ciable heat dissipation, or that

the peak current exceeds thecurrent rating of a diode. Fortu-nately, a good, inexpensivemechanical rectifier may be

polarity reverser

01

2

Page 40: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

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

63Elektor Electronics 12/98

constructed with the aid of arelay.

In the diagram, the supplyvoltage is applied to K1, whilethe motor that needs a supplywith correct polarity is linked toK2. Provided fuse F1 is intact, apositive potential at terminal aof K1 will be applied to the pos-itive terminal of K2. Diode D2prevents the relay being ener-gized. When the polarity at K1is reversed, the relay will beenergized via D2. The relay con-tacts then interchange the con-nections to the terminals of K2

to ensure that the previouspolarity of the supply to the loadis retained.

Diode D1 is a freewheelingdiode for the relay coil.

The type of relay to be useddepends on the requisite operat-ing voltage and the currentthrough its contacts. Other partsof the circuit are not critical.

It stands to reason that thecircuit is not suitable for usewith a small battery, since therelay coil draws a fairly largecurrent.

[984100]

D1

1N4001D2

K2K1

F1

2x

RE1

( )

( )

984100 - 11

a

Design M. HahnThe three voltages of a three-phase supply, L1, L2 and L3 (orR, G and B) are 120° out ofphase with one another—seeFigure 1a. When, for instance,the positive half-wave of L1(pin 1) begins, the instantaneousvalue of L2 (pin 2) is still nega-tive. The positive half-wave ofL2 starts 120° later and cuts thewaveform of L1 at a level ofabout half the peak voltage at150°. At 180° L1 becomes neg-ative; at 270°, L2.

When two connections areinterchanged as in Figure 1b,the positive half-wave of L1appears first at pin 2 and thenthat of L2 at pin 1. This alwayshappens when connections areinterchanged. It is, therefore,necessary only to establish inwhat order the half-waves arriveat two given terminals to deter-mine the phase. The third con-nection is not needed.

This requirement is met bythe circuit in Figure 2. It usesa pair of thyristors, which arearranged so that the first one tobe triggered cuts off the other. Itshould be noted that the circuit iscompletely symmetrical. DiodesD1 and D2 ensure that only pos-itive half-waves are taken intoaccount. The current is limitedby R1 and R2. The two phasesare combined by D3 and D4.The higher of the two positivevoltages is always at A, and itsphase is between 0° and 270°.The potential at A rises until thebreakdown voltage (39 V) of

zener diode D5 is reached,whereupon thyristor Th1 comeson and D7 (green) lights. Thepotential at A then drops to alevel equal to the sum of thebreakdown voltage of Th1 andthe drop across D7.

When a positive half-waveappears at pin 2, the potential atB can be higher only by thediode voltage of D4 than that atA and this cannot be as high asthe zener voltage of D6. Instead,diode D7 draws current from ter-minal 2 in the time intervalbetween 150° and 270°. Thyris-tor Th1 is cut off at 270° whenL2 drops below zero and thehold current of the thyristorceases.

When, however, both termi-nals are interchanged, Th2 istriggered first and draws currentfrom terminal 1 at 150°, so thatonly the red LED (D8) can light.The 20 ms interval between270° and 360° cannot be dis-cerned by the human eye.

Since the circuit operateswith and from the mains supply,appropriate safety measuresmust be observed during theconstruction. It is imperativethat the enclosure is strapped tothe mains earth. Plugs and sock-ets used must, of course, be ofthe appropriate standard, andcable inlets must be providedwith a strain relief. Do not useinferior materials!

[984064]

mains phase indicator

01

3

100mA T

F1

R1

15

k

5W

D1

1N4007D3

TH1

BRX49K

A

G

D7

D5

39V 500mW

100mA T

F2

R2

15

k

5W

D2

D4

TH2

K

A

G

D8

D6

39V 500mW

4x

2x

K1

984064 - 11

N

L2 (2)

L1 (1)

green red

A

B

R R

Y

YB

B

984064 - 12

2

0

UL1 L2 L3

t

984064 - 13t1

(0°)t2

(120°)t3

(240°)

1

Page 41: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

mains splittero for AF power amps

In many home-brew AF poweramplifiers, including quite a fewbuilt according to the noble artof 'high -end audio amplifier con-struction', the primaries of themains transformers are simplyconnected in parallel and pro-tected by a single, large, fuse.There may be one, hefty, trans-former inside the case, or two,each powering a monoblock, oreven three, where a smaller oneis used to power an ancillary cir-cuit like a protection circuit.Using a single fuse to protect thelot is undesirable because thisfuse has to be rated for the rush -in current of the large transform-ers. Moreover, when the fuseburns out you never know whichmonoblock, or indeed whichother part of the amplifier, is the

culprit (although that may beeasy to find out by sniffingaround or looking for smoke sig-nals...).The small circuit board shownhere allows the mains input volt-age to be distributed in a safemanner to two loads, each withits own (properly rated) fuse.Because the 'circuit' does notinclude an earth line, it may notbe used as an external unit, thatis, outside an earthed enclosure.For essential notes on electricalsafety with mains -operated cir-cuits like this one, please reviewthe Safety Guidelines pagewhich appears occasionally inElektor Electronics. A copy ofthis page may be obtained fromthe Publishers.

(984026-1, Gb)

fr

COMPONENTS LIST

K2

984026 - 11

mount, with capTwo fuses, ratings as required

K1,K2,K3 = 2 -way PCB termi- by applicationnal block, pin distance PCB (not available ready-7.5mm made)

F1 ,F2 = fuseholder, PCB

1-1 modified humidity controlO

Design: H. BonekampThe Type NH -3 humidity sensorused in the 'automatic airhumidifier' (July/August 1998)may be replaced by a light -dependent resistor, LDR, or aresistor with negative tempera-ture coefficient, NTC-see dia-gram. There are other devices aswell: the main requirement isthat they can be driven by analternating voltage, that is, thatthey are non -polarized.

An LDR is usually con-nected in series with a fixed

resistor whose resistance shouldbe equal to that of the LDRwhen it is not exposed to light.

100k

Nit100kB57164k104kSiemens

984095 - 11

In the diagram (b), the networkis connected as a twilightswitch, that is, the circuit

switches on the mains when theLDR is in darkness. When thetwo components are inter-changed, the circuit switchesthe mains on when the LDR isexposed to light.

In network (c), the fixedresistor should also have thesame value as that with an NTC(at 20° C). This network is suit-able for use as thermostat in agreenhouse. When the tempera-ture in there drops below a valueset with P1, the networkswitches on a heater. [984095]

A64Elektor Electronics 12/9864 Elektor Electronics 12/98

In many home-brew AF poweramplifiers, including quite a fewbuilt according to the noble artof ‘high-end audio amplifier con-struction’, the primaries of themains transformers are simplyconnected in parallel and pro-tected by a single, large, fuse.There may be one, hefty, trans-former inside the case, or two,each powering a monoblock, oreven three, where a smaller oneis used to power an ancillary cir-cuit like a protection circuit.Using a single fuse to protect thelot is undesirable because thisfuse has to be rated for the rush-in current of the large transform-ers. Moreover, when the fuseburns out you never know whichmonoblock, or indeed whichother part of the amplifier, is the

culprit (although that may beeasy to find out by sniffingaround or looking for smoke sig-nals…).The small circuit board shownhere allows the mains input volt-age to be distributed in a safemanner to two loads, each withits own (properly rated) fuse.Because the ‘circuit’ does notinclude an earth line, it may notbe used as an external unit, thatis, outside an earthed enclosure.For essential notes on electricalsafety with mains-operated cir-cuits like this one, please reviewthe Safety Guidelines pagewhich appears occasionally inElektor Electronics. A copy ofthis page may be obtained fromthe Publishers.

(984026-1, Gb)

mains splitterfor AF power amps0

14

K1

K2

K3

F1

F2

984026 - 11

984026-1

F1

F2

H1

H2 H3

H4

K1K

2K

3

OUT1

OUT2

984026-1

984026-1

COMPONENTS LIST

K1,K2,K3 = 2-way PCB termi-nal block, pin distance7.5mm

F1,F2 = fuseholder, PCB

mount, with capTwo fuses, ratings as required

by applicationPCB (not available ready-

made)

Design: H. BonekampThe Type NH-3 humidity sensorused in the ‘automatic airhumidifier’ (July/August 1998)may be replaced by a light-dependent resistor, LDR, or aresistor with negative tempera-ture coefficient, NTC—see dia-gram. There are other devices aswell: the main requirement isthat they can be driven by analternating voltage, that is, thatthey are non-polarized.

An LDR is usually con-nected in series with a fixed

switches on the mains when theLDR is in darkness. When thetwo components are inter-changed, the circuit switchesthe mains on when the LDR isexposed to light.

In network (c), the fixedresistor should also have thesame value as that with an NTC(at 20° C). This network is suit-able for use as thermostat in agreenhouse. When the tempera-ture in there drops below a valueset with P1, the networkswitches on a heater. [984095]

modified humidity control

015

NH-3

IC13

1

2

Rh

Rt

10

0k

LDR

100k

10

0k

NTC100k- ΘB57164k104kSiemens

984095 - 11

a b c

resistor whose resistance shouldbe equal to that of the LDRwhen it is not exposed to light.

In the diagram (b), the networkis connected as a twilightswitch, that is, the circuit

Page 42: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

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

65Elektor Electronics 12/98

Designs: G. KleineThe NE612 is an active mixer/oscillator that is used in numer-ous r.f. circuits. Three unusualapplications of this versatilebuilding block are described inthis article.

The IC can be arranged as afrequency doubler (Figure 1).In this application, pin 6, whichis normally linked to the tunedoscillator circuit, is connected tothe input. The internal oscillatortransistor (base at pin 6; emitterat pin 7) then functions as a lin-ear amplifier. The frequency ofthe output signal is twice that ofthe input signal.

The fundamental frequency,f, and harmonics 3f, 4f, and so

on, are only 10 dB away fromthe output frequency, 2f if theoutput is taken from C7. It is,therefore, advisable to use a band-pass filter at the output if the cir-cuit works permanently with afixed input frequency.

The optional bandpass filterconsists of two inductively cou-pled tuned circuits, L1-C5 andL2-C6. If losses at higher harmon-

ics are acceptable, these circuitsmay be tuned for use with suchharmonics.

The NE612 can be configuredas an overtone oscillator (Fig-ure 2). The internal oscillator isnormally not accessible and mixesor multiplies the input signal withthe oscillator signal, so yieldingan output fin+flo. If, however, ther.f. input of the multiplier, pin 1, is

linked to pin 8 via resistor R1, themixer produces a high-level out-put at the oscillator frequency.

The maximum output level isa function of the value of R1 andthe supply voltage. It has beenfound by trial and error that aresistor value of 560 Ω is optimal.The desired output level is opti-mal at a supply voltage of +5 V.

Although the first harmonic

(72 MHz) is only 10 dB away fromthe fundamental (36 MHz), thehigher harmonics are more than25 dB lower. Greater distancesmay be obtained by the use of abandpass filter at the output.

If a fundamental-frequencycrystal is used, circuit L1-C3,which is tuned to the first har-monics, as well as couplingcapacitor C4, may be omitted.

The two applications just dis-cussed may be combined into athird: an overtone oscillator withfrequency doubler. In this, themixer input (pin 1) is linked to theemitter of the oscillator transistor(pin 7) via resistor R1. In thisapplication, a value of 10 kΩ forthis resistor proved optimal.

It should be noted that the out-put voltage possible with an optimaloutput range is lower than in theprevious application: about 50 mVpeak-to-peak. On the other hand,the harmonics in the output rangeare 20 dB away from the output fre-quency of 72 MHz. This means thatin most cases a bandpass filter atthe output will not be required.

[984119]

circuit ideas for the NE6120

16

NE612IC1

1

6 4

5

8

3 27

C3

100n

C4

10n

C5

*

C6

*

C7

*C2

10n

C1

10nR1

56

Ω

L1

*L2

*

5V

f

2f

450mV

zie tekst*see text*siehe Text*voir texte*

(4V5...8V)

984119 - 11

NE612IC1

1

6 4

5

8

3 27

C5

100n

C6

10n

C8

R1

56

L1

*

5V

zie tekst*see text*siehe Text*voir texte*

C2

4p7

C1

22p

C4

10n

C3

22p 1µH

X1

36MHz

C7

10n

*

**

36MHz

(4V5...8V)

984119 - 12

800mVtt

rd(3 overtone)

NE612IC1

1

6 4

5

8

3 27

C5

100n

C6

10n

C8

R11

0k

L1

*

5V

zie tekst*see text*siehe Text*voir texte*

C2

4p7

C1

22p

C4

10n

C3

22p 1µH

X1

36MHz

C7

10n

*

**

72MHz

50mV

(4V5...8V)

984119 - 13

tt

rd(3 overtone)

Page 43: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

car immobilizerO

Parts list

Resistors:Ri = 10 k52R2 = 1 kf2 +12V+

12V

0D8

R3 = 470 k52 0 R4 = 330 k52 1N4001

R5 = 33 kf2C4

R6, R8, R9 = 4.7 k52R7 = 470 f2 100n

0Capacitors:C1, C2, C4 = 0.1 µFC3 = 10 µF, 63 V, radialC5 = 100 µF, 25 VC6 = 22 µF, 16 V, radial

Semiconductors:D1, D3, D7, D8 = 1N4001D2, D4, D9 = zener diode,

15 V, 400 mWD5 = 1N4148D6 = LEDT1, T2 = BC547B

Integrated circuits:IC1 = 4093

Miscellaneous:PC1-PC6 = PCB terminal

(pin)Ref = 12 V car -type relay,

1 change -over contact

D1

H1N40011

C1

TOOn

R

9 / 35mA

D9C5

15V100µ25V

IC1

co

D2

15V

D3 R3

1 N4001

C2R

IC1 a

2 I ffs

R4

330k

Design M. Lawton

A starter motor immobilizer isan effective (but not certain)means of protecting your caragainst theft. It has the draw-back that a would-be thief willtry to render it inoperative andin the process damages your car.The present circuit is a simpleversion of car immobilizer andtends to confuse the thief. Thisis because the car appears tofunction normally, but it doesnot start. Has it broken down oris there some sort of protectioncircuit active?

The circuit does not needadditional controls, indicators,switches or keypads to be fittedin the car. The setup is 'invisi-ble'. The only external sensor is

12V

0IC1 = 4093 R7

C3

R5 LJ

10µ63V

IC1d12 8

13

6 5

ff &

IC1b

IC1c

d&

12V

ORE1

WA

1N4001D5 R9

EMS CA,v

4

7700n 15V

1 N4148

C6

72µ16V

R8 BC547B

R6o

BC547B

tics

oc

984003 - 11

D6

A66 Elektor Electronics 12/9866 Elektor Electronics 12/98

Design M. Lawton

A starter motor immobilizer isan effective (but not certain)means of protecting your caragainst theft. It has the draw-back that a would-be thief willtry to render it inoperative andin the process damages your car.The present circuit is a simpleversion of car immobilizer andtends to confuse the thief. Thisis because the car appears tofunction normally, but it doesnot start. Has it broken down oris there some sort of protectioncircuit active?

The circuit does not needadditional controls, indicators,switches or keypads to be fittedin the car. The setup is ‘invisi-ble’. The only external sensor is

car immobilizer0

17

1

23

IC1a

&

12

1311

IC1d

&8

910

IC1c

&

56

4

IC1b&

R1

10

k

R2

1k

R5

33

k

R8

4k

7

R3

470k

R9

4k7

R4

330k

R6

4k7

T1

BC547B

R7

47

T2

BC547B

C1

100n

C2

100n

C4

100n

C6

22µ16V

C5

100µ25V

C3

10µ63V

D1

1N4001

D3

1N4001

D5

1N4148

D8

1N4001

D2

15V

D4

15V

D9

15V

IC1

14

7 D6

D7

1N4001

RE1

I

B

+12V

12V

12V

12V

CS

C

984003 - 11

9 / 35mA

IC1 = 4093

984003-1(C) ELEKTOR

C1

C2

C3

C4

C5

C6

D1

D2

D3

D4

D5

D6

D7

D8

D9

H1

H2

H3

H4

IC1R1

R2

R3

R4

R5

R6

R7

R8R9

RE1

T1T2

C5

C

+12V

0

I

B

984003-1

984003-1(C) ELEKTOR

Parts list

Resistors:R1 = 10 kΩR2 = 1 kΩR3 = 470 kΩR4 = 330 kΩR5 = 33 kΩR6, R8, R9 = 4.7 kΩR7 = 470 Ω

Capacitors:C1, C2, C4 = 0.1 µFC3 = 10 µF, 63 V, radialC5 = 100 µF, 25 VC6 = 22 µF, 16 V, radial

Semiconductors:D1, D3, D7, D8 = 1N4001D2, D4, D9 = zener diode,

15 V, 400 mWD5 = 1N4148D6 = LEDT1, T2 = BC547B

Integrated circuits:IC1 = 4093

Miscellaneous:PC1–PC6 = PCB terminal

(pin)Re1 = 12 V car-type relay,

1 change-over contact

Page 44: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

67Elektor Electronics 12/98

the brake pedal. After the igni-tion has been switched on, thebrake pedal has to be pressedfor at least five seconds beforevoltage is applied to the coil.Since the thief does not knowthis, he/she will try everything toget the car started. Since it isonly the coil to which voltage isnot applied, all other electricalfunctions will work normally, butit is just impossible to get thecar started.

When the ignition isswitched on, the circuit is pow-ered by the voltage at terminalPC2. Until the brake pedal ispressed, the potential at termi-nal PC1 remains low, so that therelay remains unenergized.When the brake pedal ispressed, capacitor C6 is chargedvia resistor R3. The time, t, ittakes for the capacitor tobecome fully charged is deter-mined by network R8–C6.

When this time has elapsed, theoutput of IC1a goes low, where-upon voltage is applied to thebase of T2 via IC1b. When T2 ison, the relay is energized ,whereupon its contact changesover and voltage is applied tothe coil. After the pressure onthe brake pedal is released,diode D5 ensures that the volt-age remains applied.

Gates IC1c and IC1d forman oscillator, which causes diode

D6 to flash when the starter isimmobilized. This has the dis-advantage, of course, that it dis-closes the protection circuit.

Finding the right points towhich to connect the circuitshould not be a problem in mostcars. The ignition voltage is nor-mally available at the radio/cas-sette terminals, while the poten-tial coupled to the brake pedalis usually available at the brakelights. [984003]

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

Design: G. KleineAs the title implies, the presentcircuit is intended to convertsinusoidal input signals to TTLoutput signals. It can handleinputs of more than 100 mV andis suitable for use at frequenciesup to about 80 MHz.

Transistor T1, configured ina common-emitter circuit, isbiased by voltage divider R3–R5such that the potential acrossoutput resistor R1 is about halfthe supply voltage. When thecircuit is driven by a signalwhose amplitude is between100 mV and TTL level (about2 V r.m.s.), the circuit generatesrectangular signals. The lowest

frequencies that could beprocessed by the prototype werearound 100 kHz at an inputlevel of 100 mV, and about10 kHz when the input signalswere TTL level.

Resistor R6 holds the inputresistance at about 50 Ω, whichis the normal value in measure-ment techniques. It ensures thatthe effects of long coaxial cableson the signal are negligible.

If the converter is used in acircuit with ample limits, R6may be omitted, whereupon theinput resistance rises to 300 Ω.

[984120]

sine wave to TTL converter

01

8

T1

BFR93A

R2

56

Ω

R1

33

R4

1k

R5

47

R6

56

Ω

R3

470Ω

C5

10n

C1

100n

C3

100n

C2

10µ

C4

10n

100kHz...80MHz100mV...2V

50Ω

5V

10mA

984120 - 11

+2V3

+3V8

+0V5

TTL

Design: H. BonekampThe input impedance ofa.c.-coupled op amp circuitsdepends almost entirely on theresistance that sets the d.c.operating point. If CMOSop amps are used, the input ishigh, in current op amps up to10 MΩ.

If a higher value is needed, abootstrap may be used, whichenables the input impedance tobe boosted artificially to a veryhigh value.

In the diagram, resistors R1plus R2 form the resistance thatsets the d.c. operating point for

op amp IC1. If no other actionswere taken, the input impedancewould be about 20 MΩ. How-ever, part of the input signal isfed back in phase, so that thealternating current through R1 issmaller. The input impedance,Zin, is then:

Zin=(R2+R3)/R3)(R1+R2).

With component values as spec-ified, Zin has a value of about1 GΩ.

The circuit draws a currentof about 3 mA.

[984097]

01

9

C1

100p

C2

R1

10M

R2

10M

C4

100n

C3

10µ10V

C6

100n

C5

10µ10V

R3

100k

984097 - 11

5V

5V

TLC271

IC1

2

3

6

7

4

5

1

8

input impedancebooster

Page 45: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

cu 1 -watt BTL audio amplifierO

Source: Philips SemiconductorsPreliminary Specification

The TDA8581(T) from PhilipsSemiconductors is a 1 -wattBridge Tied Load (BTL) audiopower amplifier capable of deliv-ering 1 watt output power into an8-Q load at THD (total harmonicdistortion) of 10% and using a 5-V power supply. The schematicshown here combines the func-tional diagram of the TDA8551with its typical application cir-cuit. The gain of the amplifiercan be set by the digital volumecontrol input. At the highest vol-ume setting, the gain is 20 dB.Using the MODE pin the devicecan be switched to one of threemodes: standby (MODE levelbetween Vp and Vp-0.5 V),muted (MODE level between1 V and Vp-1.4 V) or normal(MODE level less than 0.5 V).The TDA8551 is protected by aninternal thermal shutdown pro-tection mechanism.The total voltage loss for bothMOS transistors in the comple-mentary output stage is less than1 V. Using a 5-V supply and an8-Q loudspeaker, an outputpower of 1 watt can be deliv-ered.The volume control has anattenuation range of between0 dB and 80 dB in 64 steps setby the 3 -state level at theUP/DOWN pin: floating: vol-ume remains unchanged; nega-tive pulses: decrease volume;positive pulses: increase volumeEach pulse at he Up/DOWN pincauses a change in gain of 80/64= 1.25 dB (typical value).When the supply voltage is firstconnected, the attenuator is set

UP

VOLUMECONTROL

DOWN

C1

I330n

0

O

IN

SVR

C2

100µ

5V

0STAND-BY

0MUTE COD

0OPERATING

UP/DOWN

VOLUMECONTROL

TDA8551

13 rii4100n

VP

STANDBY/MUTE/

OPERATING/

GND

5V

VP

LS1

BnK

to 40 dB (low volume), so thegain of the total amplifier is then-20 dB. Some positive pulseshave to be applied to theUP/DOWN pin to achieve lis-tening volume. The graph showsthe THD as a function of outputpower. The maximum quiescentcurrent consumption of theamplifier is specified at 10 mA,to which should be added thecurrent resulting from the outputoffset voltage divided by theload impedance.

(984092-1, Gb)

wr

46-0

<I, 4-21:180

984092 - 11

7

104 0..04 l°WM

cu simple electrification unitO

From an idea by P LayThe circuit is intended for car-rying out harmless experimentswith high -voltage pulses andfunctions in a similar way as anelectrified fence generator. Thep.r.f. (pulse repetition fre-

quency) is determined by thetime constant of network Ri-C3in the feedback loop of op ampICia: with values as specified, itis about 0.5 Hz.

The stage following theop amp, ICib, converts the rec-

tangular signal into narrowpulses. Differentiating networkR2 -C4, in conjunction with theswitching threshold of theSchmitt trigger inputs of ICib,determines the pulse period,which here is about 1.5 ms.

The output of ICib is linkeddirectly to the gate of thyristorTHR1, so that this device is trig-gered by the pulses.

The requisite high voltage isgenerated with the aid of a smallmains transformer, whose sec -

68 Elektor Electronics 12/9868 Elektor Electronics 12/98

Source: Philips SemiconductorsPreliminary Specification

The TDA8581(T) from PhilipsSemiconductors is a 1-wattBridge Tied Load (BTL) audiopower amplifier capable of deliv-ering 1 watt output power into an8-Ω load at THD (total harmonicdistortion) of 10% and using a 5-V power supply. The schematicshown here combines the func-tional diagram of the TDA8551with its typical application cir-cuit. The gain of the amplifiercan be set by the digital volumecontrol input. At the highest vol-ume setting, the gain is 20 dB.Using the MODE pin the devicecan be switched to one of threemodes: standby (MODE levelbetween Vp and Vp–0.5 V),muted (MODE level between1 V and Vp–1.4 V) or normal(MODE level less than 0.5 V).The TDA8551 is protected by aninternal thermal shutdown pro-tection mechanism.The total voltage loss for bothMOS transistors in the comple-mentary output stage is less than1 V. Using a 5-V supply and an8-Ω loudspeaker, an outputpower of 1 watt can be deliv-ered.The volume control has anattenuation range of between0 dB and 80 dB in 64 steps setby the 3-state level at theUP/DOWN pin: floating: vol-ume remains unchanged; nega-tive pulses: decrease volume;positive pulses: increase volumeEach pulse at he Up/DOWN pincauses a change in gain of 80/64= 1.25 dB (typical value).When the supply voltage is firstconnected, the attenuator is set

to 40 dB (low volume), so thegain of the total amplifier is then–20 dB. Some positive pulseshave to be applied to theUP/DOWN pin to achieve lis-tening volume. The graph showsthe THD as a function of outputpower. The maximum quiescentcurrent consumption of theamplifier is specified at 10 mA,to which should be added thecurrent resulting from the outputoffset voltage divided by theload impedance.

(984092-1, Gb)

1-watt BTL audio amplifier0

20

OPERATING/

STANDBY/

CONTROL

UP/DOWN

VOLUME

MUTE/

8551

OUT+

OUT–

MODE

20k

15

k1

5k

TDA

GND

SVR

5k

IN

R

R

4

1 6

8

5

72

3

VP

VP

VP

8 Ω

LS1

C4

220µ25V

C2

100µ

C3

100n

C1

330n

984092 - 11

UP

DOWN

VOLUMECONTROL

STAND-BY

OPERATING

MUTE

5V

VP

5V

From an idea by P. LayThe circuit is intended for car-rying out harmless experimentswith high-voltage pulses andfunctions in a similar way as anelectrified fence generator. Thep.r.f. (pulse repetition fre-

quency) is determined by thetime constant of network R1-C3in the feedback loop of op ampIC1a: with values as specified, itis about 0.5 Hz.

The stage following theop amp, IC1b, converts the rec-

tangular signal into narrowpulses. Differentiating networkR2-C4, in conjunction with theswitching threshold of theSchmitt trigger inputs of IC1b,determines the pulse period,which here is about 1.5 ms.

The output of IC1b is linkeddirectly to the gate of thyristorTHR1, so that this device is trig-gered by the pulses.

The requisite high voltage isgenerated with the aid of a smallmains transformer, whose sec-

simple electrification unit

02

1

Page 46: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

69Elektor Electronics 12/98

ondary winding is here used asthe primary. This winding, inconjunction with C2, forms aresonant circuit.

Capacitor C3 is charged tothe supply voltage (12 V) viaR3.When a pulse output by IC1btriggers the thyristor, the capac-itor is discharged via the sec-ondary winding. The energystored in the capacitor is, how-ever, not lost, but is stored in themagnetic field produced by thetransformer when current flowsthrough it.

When the capacitor is dis-charged, the current ceases,whereupon the magnetic fieldcollapses. This induces acounter e.m.f. in the transformerwinding which opposes the volt-age earlier applied to the trans-former. This means that thedirection of the current remainsthe same. However, capacitor C2is now charged in the oppositesense, so that the potentialacross it is negative.

When the magnetic field of

the transformer has returned thestored energy to the capacitor,the direction of the currentreverses, and the negativelycharged capacitor is dischargedvia D1 and the secondary wind-

ing of the transformer. As soon asthe capacitor begins to be dis-charged, there is no currentthrough the thyristor, whichtherefore switches off. When C2is discharged further, diode D1 is

reverse-biased, so that the cur-rent loop to the transformer isbroken, whereupon the capacitoris charged to 12 V again via R3.

At the next pulse from IC1b,this process repeats itself.

Since the transformer aftereach discharge of the capacitorat its primary induces not only aprimary, but also a secondaryvoltage, each triggering of thethyristor causes two closelyspaced voltage pulses of oppo-site polarity. These induced volt-ages at the secondary, that is,the 230 V, winding, of the trans-former are, owing to the higherturns ratio, much higher thanthose at the primary side andmay reach several hundredvolts. However, since the energystored in capacitor C2 is rela-tively small (the current drain isonly about 2 mA), the outputvoltage cannot harm man or ani-mal. It is sufficient, however, tocause a clearly discernible mus-cle convulsion.

[984099]

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

C1

100µ25V

C2

22µ25V

C3

470n

C4

100n

R2

22

k

R1

10M

R3

12k

1

23

IC1a

&5

64

IC1b

&

8 9

10 IC1c

&

12 13

11 IC1d

&

THR1

BRX46K

A

G

D1

1N4148

9V

TR1

1VA5

IC1

14

7

984099 - 11

12V

IC1 = 4093

Design: H. BonekampA photo-diode is a p-n diodewhose reverse current dependson the amount of light falling onits junction. The reverse currentis greatly dependent on the tem-perature since heat can liberatemore covalent bonds. As lightcan also do this, the diode canbe housed in a transparent case.

When a photo-diode islocated at some distance fromthe associated electronic cir-cuits, noise may be picked up inthe connecting cable, even whenthis is screened. Such noise can,fortunately, be suppressed eas-ily, provided it is common mode,that is, when the diode is notconnected to earth (‘floats’).

A differential amplifierenables a feedback signal to beamplified, but does not respondto common-mode signals. In thediagram, the differential ampli-fier consists of two op amps,IC1b and IC1c, which convertthe diode current into a voltage.The current-to-voltage conver-sion depends on R1 and R2, sothat gain setting in amplifierIC1d is not necessary.

The output voltage, Uo, ofthe differential amplifier is

Uo=(Uin1–Uin2) · R4/R3.

When R3=R5=R4=R6+P1,the amplification is unity. In thatcase,

Uo=(R1+R2) · ID,

where ID is the diode current.The Common Mode Rejec-

tion, CMR, depends on theequality of the resistors as stipu-lated earlier. Their tolerances,and those of R1 and R2, can be

nullified with P1 so as to achieveoptimum CMR. A CommonMode Rejection Ratio, CMRR, of>60 dB is obtained when thespecified op amps are linked tothe photo-diode by a twisted pair.

The circuit draws a currentof about 10 mA. [984096]

balanced amplifier forphoto-diode0

22

D1

BPW34

13

12

14IC1d

R1

1M

R2

1M

R3

100k

R5

100k9

10

8IC1c

6

5

7IC1b

R4

100k

R6

82

k

47kP1

IC1

11

4

C1

10µ25V

C2

100n

C3

10µ25V

C4

100n

2

3

1IC1a

IC1 = TL084984096 - 11

15V

15V

Page 47: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

70 Elektor Electronics 12/98

Design: K. WalravenIn their book MatchBox BASICComputer [1] the authorsdescribe a way of connecting a12-bit analogue-to-digital con-verter (ADC) Type MAX187 tothe small computer board origi-nally described in Elektor Elec-tronics magazine.

For the present article theMAX186 is employed, which is asimilar converter with eight ana-logue inputs instead of just one.The connection with the com-puter board is made via a lengthof 10-way flatcable. AlthoughK4 would appear to be the rightconnector for this link, K1 waseventually chosen because bitoperations are not possible onport P2. A disadvantage of usingK1 is, however, that the 1-waycable has to be connected to a20-way pinheader. Note that theconverter may, in principle, beconnected to any port as long asthe supply voltage is at the rightpins.

The inputs of the present cir-cuit are fitted with overvoltageprotection resistors (R1, R3,etc.) as well as pull-up resistors(R2, R4 etc.). Consequently,inputs which are left 'open' arestill held at a defined level,while additional ESD (electro-static discharge) protection is

A-D converter forMatchBox BASIC computer0

23

K1

R1

1k

C7

100n

R2

10

k

R3

1k

C8

100n

R4

10

k

K2

R5

1k

C9

100n

R6

10

kR7

1k

C10

100n

R8

10

k

K3

R9

1k

C11

100n

R10

10

k

R11

1k

C12

100n

R12

10

k

K4

R13

1k

C13

100n

R14

10

k

R15

1k

C14

100n

R16

10

k

C4

10n

C6

100n

C3

100n

C1

100n

C15

100n

C2

10µ63V

C5

4µ763V

C16

10µ63V

K5

12

34

56

78

910

K6

D1

1N4148

L1

100µH

MAX186

REFADJ

SSTRBIC1

DGND AGND

DOUT

SCLK

SHDN

VREF

VSS

CH0

CH1

CH2

CH3

CH4

CH5

CH6

CH7

DIN

20

1314

17

15

19

16

18CS

10

11

12

9

1

2

3

4

5

6

7

8

SSTRB

DOUT

DIN

CSAD

CH0

CH1

CH2

CH3

CH4

CH5

CH6

CH7

R17

100Ω

984093 - 11

5V

5V

5V

CH0

CH1

CH2

CH3

CH4

CH5

CH6

CH7

SCLK

COMPONENTS LIST

Resistors:R1, R3, R5, R7, R9, R11, R13,

R15 = 1kΩR2, R4, R6, R8, R10, R12, R14,

R16 = 10kΩR17 = 100 Ω

Capacitors:C1, C3, C6–C15 = 0.1 µFC2, C16 = 10 µF, 63 V, radialC4 = 0.01 µFC5 = 4 µF, 63 V, radial

Inductor:L1 = 100 µH

Semiconductors:D1 = 1N4148

Integrated circuits:IC1 = MAX186DCPP or

MAX186BEPP

Miscellaneous:K1–K5 = 2-way PCB terminal

blockK6 = 10-way box header

(C) ELEKTOR984093-1

C1

C2

C3

C4

C5

C6

C7

C8C9

C10C11

C12C13

C14

C15

C16

D1

H1 H2

H3H4

IC1

K1

K2K3

K4

K5 K6

L1

R1R2

R3R4

R5R6

R7R8

R9R10

R11R12

R13R14

R15R16

R17

984093-1

(C) ELEKTOR984093-1

Page 48: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

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

71Elektor Electronics 12/98

provided. Note that the resistorscause a certain amount of atten-uation if an input voltage isapplied. The resistor valueshave been selected such that anexternal temperature sensor withan output of 1 µA °C–1 (forinstance, AD590 or LM334)provides the desired voltage gra-dient of 10 mV °C–1.

An example of a control pro-gram for the converter is listedhere. The converter receiveseight databits; bit 7 is the start-bit, while bits 4, 5 and 6 indi-cate which input is beingselected. Bit 3 is used to signalthat the measurement is to takeplace between ground and VREF,while bit 2 tells the converter toperform a single-ended (i.e.,non-differential) measurement.Bits 1 and 0, finally, initiate anA-D conversion based on theinternal clock. Next, the 12-bitresult can be read back.

A final remark: the channelselection bits are mixed up: bit6 is the LSB, bit 5, the MSB,and bit 4, the middle bit.

The circuit draws a currentnot greater than 2 mA. Theprinted circuit board shown hereis not available ready-made. Formore information on theMAX186, visit Maxim's Internetsite at www.maxim-ic.com.

Reference:[1]. MatchBox BASIC Computer,by K.H. Dietsche and M. Ohs-mann, Elektor Electronics (Pub-lishing), ISBN 0-905705-53-X.

[984093]

READ_AD:

; This subroutine reads the MAX186 12-bit A-D converter.; Before calling this routine the code for the desired; channel has to loaded into integer variabele TEMP,; as follows:; TEMP:=1XYZ1110B where XYZ indicates the desired channel.; The conversion result is then returned in TEMP.;; MAX187 connections:; Data to 187 P1.0; Serial clock P1.1; Data from 187 P1.2; Chip select P1.3; Strobe P1.4;

INIT_AD:P1.0:=0 ;data inP1.1:=0 ;clockP1.3:=0 ;CS active

WRITE_AD:CNTR:=8WHILE CNTR>0 DO ;send 8 bits of A-D commandP1.0:=TEMP.7 ;msb bit to A-DTEMP:=TEMP SHL(1) ;hold next bit readyP1.1:=1 ;clock-in data on pos. edgeP1.1:=0CNTR:=CNTR-1

WHEND

READ_AD:TEMP:=0 ;store result in this variableCNTR:=12P1.0:=0 ;read zeroes (else conversion starts)WHILE CNTR>0 DO ;fetch 12 bit dataP1.1:=1 ;supply clock pulseP1.1:=0 ;data valid after neg. edgeTEMP:=(TEMP SHL 1)+P1.2 ;read dataCNTR:=CNTR-1

WHENDP1.3:=1 ;CS, turn off A-D

RETURN

Design: P. StaugaardThe equalizer presented in thisarticle is suitable for use withhi-fi installations, public-address systems. mixers andelectronic musical instruments.

The relay contacts at theinputs and outputs, in conjunc-tion with S2, enable the desiredchannel to be selected. Theinput may be linked directly tothe output, if wanted. The inputimpedance and amplification of

the equalizer are set with S1 andS3. The audio frequency spec-trum of 31 Hz to 16 kHz isdivided into ten bands.

Ten bands require ten filters,of which nine are passive andone active. The passive filtersare identical in design and dif-fer only in the value of the rele-vant inductors and capacitors.The requisite characteristics ofthe filters are achieved by seriesand parallel networks. The filter

for the lowest frequency band isan active one to avoid a verylarge value of inductance. It isbased in a traditional manner onop amp A1.

The inductors used in thepassive filters are readily avail-able small chokes. The filterbased on L1 and L2 operates atabout the lowest frequency(62 Hz) that can be achievedwith standard, passive compo-nents.

The Q(uality) factor of thefilters can, in principle, beraised slightly by increasing thevalue of R19 and R23, as well asthat of P1–P10, but that wouldbe at the expense of the noiselevel of op amp IC1.

With component values asspecified, the control range isabout ±11 dB, which in mostcase will be fine. A much largerrange is not attainable withoutmajor redesign.

ten-band equalizer

02

4

Page 49: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

The input level can beadjusted with P1, which may benecessary for adjusting the bal-ance between the channels orwhen a loudness control is used

in the output amplifiers.Several types of op amp can

be used:in the prototype, IC1 i san LT1007, and IC2, an OP275.Other suitable types for IC1 a r e

OP27 or NE5534; and for IC2,AD712, LM833 and NE5532. Ifan NE5534 is used for IC1, C2 i sneeded; in all other cases, not.

The circuit needs to be pow-

ered by a regulated, symmetri-cal 15 V supply. It draws a cur-rent of not more than about1 0m A .

[ 9 8 4 1 1 8 ]

4k7P1

lin

4k7P2

lin

L2

1H

L1

1H5

C21

470n

C20

2µ2

C19

2µ2

C22

*R20

2

31

IC2aR22

C24

47n

C23

820n

R2

C3

2µ2

C4

470n

R3

C5

C6

220n

L4

330mH

L3

1H

4k7P3

lin

4k7P4

lin

L6

L5

680mH

R4

C7

470n

C8

120n

R5

C9

150n

C10

150n

L8

L9

330mH

4k7P5

lin

4k7P6

lin

L10

68mH

L9

100mH

R6

C11

150n

C12

*

R7

C13

47n

C14

33n

L12

L11

82mH

4k7P7

lin

4k7P8

lin

L14

L13

47mH

R8

C15

33n

C16

680p

R9

C17

18n

C18

*L16

L15

22mH

4k7P9

lin

4k7P10

lin

L18

L17

10mH

R21

C37

10n

C38

*

R23

2k43

R19

2k74

R11

2k43

6

5

7IC2b

IC1

OP272

3

6

7

4

8

5

C2

*

31Hz

62Hz

125Hz

250Hz

500Hz

1kHz

2kHz

4kHz

8kHz

R17

1k21

R18

1k21

C3922µ

C331µ

C31

*

R1R13

R10

R25

R14

P11

10k

C282µ2

C292µ2

S

S2

SK1

K2

S3S1

C36

10µ25V

C35

100n

C34

10µ25V

C1

100n

C25

10µ25V

C26

100n

C30

10µ25V

C27

100n

IC2

8

4

+15V

–15V

15V

15V 984118 - 11

15V

15V

IC2 = OP275

*** not used

*

niet gebruikt

nicht gebraucht

inutilisé

16kHz

The design of solar panel sys-tems with a (lead-acid) bufferbattery is normally such that thebattery is charged even whenthere is not much sunshine. Thismeans, however, that when thereis plenty of sunshine, a regulatoris needed to prevent the batteryfrom being overcharged. Suchcontrols usually arrange for thesuperfluous energy to be dissi-pated in a shunt resistance orsimply for the solar panels to bes h o r t -circuited. It is, of course,an unsatisfactory situation whenthe energy derived from a veryexpensive system can, after all ,not be used to the full.

The circuit presented divertsthe energy from the solar panelwhen the battery is fully charg e dto another user, for instance, a1 2 V ice box with Peltier ele-ments, a pump for drawing waterfrom a rain butt, or a 12 V ven-t i l a t o r. It is, of course, also pos-sible to arrange for a second bat-tery to be charged by the super-fluous energ y. In this case,

lead-acid-battery regulatorfor solar panel systems

Page 50: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

h o w e v e r, care must be taken toensure that when the secondbattery is also fully charg e d ,there is also a control to divertthe superfluous energ y.

The shunt resistance neededto dissipate the superfluouse n e rgy must be capable ofabsorbing the total power of thepanel, that is, in case of a1 0 0 W panel, its rating must bealso 100 W. This means a cur-rent of some 6–8 A when theoperating voltage is 12 V. Whenthe voltage drops below themaximum charging voltage of1 4 . 4 V owing to reduced sun-shine, the shunt resistance isdisconnected by an n-c h a n n e l

power field effect transistor(FET), T1. The disconnect pointis not affected by large temper-ature fluctuations because of areference voltage provided byI C1. The necessary comparatoris IC2, which owing to R9 has asmall hysteresis voltage of 0.5 V.Capacitor C5 ensures a rela-tively slow switching process,although the FET is alreadyreacting slowly owing to C4. Thegradual switching prevents spu-rious radiation caused by steepedges of the switched voltageand also limits the starting cur-rent of a motor (of a possibleventilator). Fi n a l l y, it preventsswitching losses in the FET that

might reach 25 W, which wouldm a ke a heat sink unavoidable.

Setting up of the circuit isfairly simple. Start by turning P1so that its wiper is connected toR5. When the battery reachesthe voltage at which it will beswitched off, that is,1 3 . 8 – 1 4 . 4 V, adjust P1 s l o w l yuntil the output of comparatorI C2 changes from low to high,which causes the load across T1to be switched in.

Potentiometer P1 is best a10-turn model. When the con-trol is switched on for the firsttime, it takes about 2 secondsfor the electrolytic capacitors tobe charged. During this time,

the output of the comparator ishigh, so that the load across T1is briefly switched in.

In case T1 has to switch inlow-resistance loads, the BUZ11may be replaced by an IRF44,which can handle twice as muchpower (150 W) and has an on-resistance of only 24 m Ω .

Because of the very highcurrents if the battery weres h o r t -circuited, it is advisable toinsert a suitable fuse in the lineto the regulator.

The circuit draws a currentof only 2 mA in the quiescentstate and not more than 10 m Awhen T1 is on.

[Zeiller – 984072]

Design: G. KleineThe pulser is intended to switchthe mains voltage on and off atintervals between just under asecond and up to 10 minutes.This is useful, for instance,when a mains-operated equip-ment is to be tested for longperiods, or for periodic switch-ing of machinery.

Transformer Tr1, the bridge

r e c t i f i e r, and regulator IC1 p r o-vide a stable 12 V supply rail forI C2 and the relay. The timer isarranged so that the period-determining capacitor can bec h a rged and discharged inde-p e n d e n t l y. Four time ranges canbe selected by selecting capac-itors with the aid of jumpers.S h o r t -circuiting positions 1 and2 gives the longest time, ands h o r t -circuiting none the short-

est. In the latter case, the 10 µ Fcapacitor at pins 2 and 6 of thetimer IC determines the timewith the relevant resistors. Thevalue of this capacitor may bechosen slightly lower.

The two preset potentiome-ters enable the on and off peri-ods to be set. The 1 kΩ resistorin series with one of the presetsdetermines the minimum dis-c h a rge time.

The timer IC switches arelay whose double-pole con-tacts switch the mains voltage.

The LEDs indicate whetherthe mains voltage is switchedthrough (red) or not (green).

The 100 mA slow fuse pro-tects the mains transformer andlow-voltage circuit. The 4 Amedium slow fuse protects therelay against overload.

[ 9 8 4 1 2 2 ]

mains pulser

Page 51: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

AI XS symmetrical supplyO

This extra -small (XS) symmetri-cal supply is useful in thosecases where a symmetricalpower supply is required with anoutput capacity of just a few mil-liamps. The example circuitshows a ±15-V supply capableof delivering a continuous out-put current of about 25 mA, or100 mA peak. By using othertransformers and/or voltage reg-ulators, the supply can bedimensioned for output voltagesof ±5 V, ±9 V, ± 1 2 V, ± 1 5 V,±18V and ±24 V For the lattertwo voltages, however, the nega-tive -voltage regulator may behard to obtain. Thanks to itsmodest size, the XS symmetricalsupply is easily incorporatedinto existing equipment.A disadvantage of small (low -VA) mains transformers as usedfor this supply is that they oftensupply relatively high no-loadsecondary voltages. Under no-load conditions, the indicatedMonacor/Monarch transformer,for example, supplies no lessthan 32 V to the regulator inputs(measured at a mains voltage of230 V). In some cases, the no-load secondary voltage mayexceed the maximum permissi-ble input voltage of the low -power voltage regulator. Typi-cally this will be 30 V for 5-Vregulators, 35 V for 12-V and15-V types, and 40 V for 18-Vand 24-V types. When the no-load voltage can be expected toapproach the absolute maximumlevel specified for the voltageregulator, you should connectshunt resistors (bleeders) acrossthe transformer secondaries.Keep the value of these resistorsas high as possible to avoidunnecessary dissipation. In mostcases, a bleeder current of a fewmA is already sufficient to drop

Tr1

COcu speech eroderO

Design: T GiesbertsNowadays, the speech qualityon our telephone systems is gen-

erally very good, irrespective ofdistance. However, there areoccasions, for instance, in an

IC1

IC2

15V

984081 - 11

0 984081-1(C) ELEKTOR

amateur stage production, orjust for fun, when it is desired toreproduce the speech quality of

the regulator input -voltage to asafe level.Although the Hahn transformerssuggested in the parts list havethe same footprint as the Mona-cor/Monarch types, the 3.2 -VAtype is taller. If this particulartransformer is used, the contin-uous output current capacity ofthe supply rises to about 55 mA,provided Cl and C2 areincreased to, say, 100 µF/25V.Note, however, that you mayhave to reduce the no-load sec-ondary voltage as describedabove. The printed -circuit boardshown here is, unfortunately, notavailable ready-made from thePublishers.

(984081-1, Gb)

COMPONENTS LIST

Capacitors:C1,C2 = 47,tiF 40V radialC3,C4 = 4,tiF7 63V radial

Semiconductors:IC1 = 78L15 (see text)IC2 = 79L15 (see text)B1 = B80C1500, straight case

(80V piv, 1.5A cont.)

Miscellaneous:K1 = 2 -way PCB terminalblock, raster 7.5mm

Tr1 = mains transformer, seetext.

Examples :2x15V 1.5VA: type VTR1215

(Monacor/Monarch) or typeBV El 302 2028 (Hahn)

2x15V 3.2VA: type BV El 3062078 (Hahn)

Note: Monacor/Monarch andHahn transformers are sup-plied by C -I Electronics andStippler Electronics

yesteryear.The eroder circuit accepts an

acoustic (via an electret micro -

A74 Elektor Electronics 12/9874 Elektor Electronics 12/98

This extra-small (XS) symmetri-cal supply is useful in thosecases where a symmetricalpower supply is required with anoutput capacity of just a few mil-liamps. The example circuitshows a ±15-V supply capableof delivering a continuous out-put current of about 25 mA, or100 mA peak. By using othertransformers and/or voltage reg-ulators, the supply can bedimensioned for output voltagesof ±5 V, ±9 V, ±12 V, ±15 V,±18V and ±24 V. For the lattertwo voltages, however, the nega-tive-voltage regulator may behard to obtain. Thanks to itsmodest size, the XS symmetricalsupply is easily incorporatedinto existing equipment.A disadvantage of small (low-VA) mains transformers as usedfor this supply is that they oftensupply relatively high no-loadsecondary voltages. Under no-load conditions, the indicatedMonacor/Monarch transformer,for example, supplies no lessthan 32 V to the regulator inputs(measured at a mains voltage of230 V). In some cases, the no-load secondary voltage mayexceed the maximum permissi-ble input voltage of the low-power voltage regulator. Typi-cally this will be 30 V for 5-Vregulators, 35 V for 12-V and15-V types, and 40 V for 18-Vand 24-V types. When the no-load voltage can be expected toapproach the absolute maximumlevel specified for the voltageregulator, you should connectshunt resistors (bleeders) acrossthe transformer secondaries.Keep the value of these resistorsas high as possible to avoidunnecessary dissipation. In mostcases, a bleeder current of a fewmA is already sufficient to drop

the regulator input-voltage to asafe level.Although the Hahn transformerssuggested in the parts list havethe same footprint as the Mona-cor/Monarch types, the 3.2-VAtype is taller. If this particulartransformer is used, the contin-uous output current capacity ofthe supply rises to about 55 mA,provided C1 and C2 areincreased to, say, 100 µF/25V.Note, however, that you mayhave to reduce the no-load sec-ondary voltage as describedabove. The printed-circuit boardshown here is, unfortunately, notavailable ready-made from thePublishers.

(984081-1, Gb)

XS symmetrical supply0

27

COMPONENTS LIST

Capacitors:C1,C2 = 47µF 40V radialC3,C4 = 4µF7 63V radial

Semiconductors:IC1 = 78L15 (see text)IC2 = 79L15 (see text)B1 = B80C1500, straight case

(80V piv, 1.5A cont.)

Miscellaneous:K1 = 2-way PCB terminal

block, raster 7.5mmTr1 = mains transformer, see

text.Examples :2x15V 1.5VA: type VTR1215

(Monacor/Monarch) or typeBV EI 302 2028 (Hahn)

2x15V 3.2VA: type BV EI 3062078 (Hahn)

Note: Monacor/Monarch andHahn transformers are sup-plied by C-I Electronics andStippler Electronics

78L15

IC1

IC2

79L15

B1

B80C1500

C1

47µ 40V

C3

4µ7 63V

C2

47µ 40V

C4

4µ7 63V

2x 15V

Tr1

1VA5

K1

15V

15V

984081 - 11

984081-1(C) ELEKTOR

B1

C1

C2

C3

C4

H5H6

H9

IC1IC2

K1

TR1

0- +

~~

984081-1 984081-1

(C) ELEKTOR

Design: T. GiesbertsNowadays, the speech qualityon our telephone systems is gen-

erally very good, irrespective ofdistance. However, there areoccasions, for instance, in an

amateur stage production, orjust for fun, when it is desired toreproduce the speech quality of

yesteryear.The eroder circuit accepts an

acoustic (via an electret micro-

speech eroder

02

8

Page 52: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

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

R3

.0

R5

T1 ... T4 = BC550C

phone) or electrical signal. Thesignals are applied to the circuitinputs via C1 and C2, whichblock any direct voltage. Theinput cables should be screened.

R7

co

T4

R10

3

R9

T20n

2k2

IC1

741

The signals are brought to(about) the same level by vari-able potential dividers P1 -R1 -R4and P2 -R2 -R3, and then appliedto the base of transistor Ti. The

C9

I30µ10V

P5

100k

1;C6 C7 C8

1-61 I 0

9V

0

470n 150n 47n

R11 R12

LIR13

®984105 - 11

level of the combined signals israised by this preamplifier.

The preamplifier is followedby an active low-pass filter con-sisting of T2 T4, C3, C4, R6-R8,

and P4.Although, strictly speaking,

P3 serves merely to adjust thevolume of the signal, its settingdoes affect the filter character-istic. Note, by the way, that thefilter is a rarely encounteredcurrent -driven one in which C3and C4 are the frequency -deter-mining elements. It has a certainsimilarity with a Wien bridge.

Transistors T3 and T4, andresistors R8 and P4 form a vari-able current sink.

The position of P4 deter-mines the slope of the filtercharacteristic and the degree ofovershoot at the cut-off fre-quency.

The low-pass filter is fol-lowed by an integrated amplifier,IC1, whose amplification ismatched to the input of the elec-tronic circuits connected to theeroder with P5.

The final passive, third -orderhigh-pass filter is designed toremove frequencies above about300 Hz.

The resulting output is of atypical nasal character, just as intelephones of the past.

[984105]

N thrifty light -controlled switchO

This circuit shows that only ahandful of parts is needed tomake a light -controlled switchwith a digital power buffer out-put capable of switching up to25 milliamps. The circuit isintended mainly for use in low -power battery -powered equip -

COMPONENTS LIST

Resistor:R1 = 10MQP1 = 1MQ preset H

Capacitors:C1,C2 = 100nF

Semiconductors:T1 = SFH309-4 (Siemens,

ElectroValue)IC1 = 40106

Miscellaneous:PCB, not available ready-

made

ment. The SFH309-4 is a pho-totransistor from Siemens, itspin connection is included inthe circuit diagram. In thisapplication, the SFH309 drawsonly a few tens of ittA. At a cer-tain ambient light intensitylevel, the voltage at the input ofgate IClf drops below theswitching threshold of theSchmitt trigger, and the outputconsequently toggles to logichigh. This level is again invertedby the five remaining gates inthe '106 which are connected inparallel to boost their outputdrive capacity. The effect ofstray light picked up fromremote controls and other infra-red transmitters is suppressed tosome extent by R1-Cl. If inter-ference is still a problem, thenC1 may be increased a little.

The ambient light intensity atwhich the output changes stateis adjusted to individualrequirements with preset P1.The supply voltage should bereasonably clean and not exceed

Elektor Electronics 12/98 7575Elektor Electronics 12/98

phone) or electrical signal. Thesignals are applied to the circuitinputs via C1 and C2, whichblock any direct voltage. Theinput cables should be screened.

The signals are brought to(about) the same level by vari-able potential dividers P1-R1-R4and P2-R2-R3, and then appliedto the base of transistor T1. The

level of the combined signals israised by this preamplifier.

The preamplifier is followedby an active low-pass filter con-sisting of T2–T4, C3, C4, R6–R8,

and P4.Although, strictly speaking,

P3 serves merely to adjust thevolume of the signal, its settingdoes affect the filter character-istic. Note, by the way, that thefilter is a rarely encounteredcurrent-driven one in which C3and C4 are the frequency-deter-mining elements. It has a certainsimilarity with a Wien bridge.

Transistors T3 and T4, andresistors R8 and P4 form a vari-able current sink.

The position of P4 deter-mines the slope of the filtercharacteristic and the degree ofovershoot at the cut-off fre-quency.

The low-pass filter is fol-lowed by an integrated amplifier,IC1, whose amplification ismatched to the input of the elec-tronic circuits connected to theeroder with P5.

The final passive, third-orderhigh-pass filter is designed toremove frequencies above about300 Hz.

The resulting output is of atypical nasal character, just as intelephones of the past.

[984105]

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

IC1

2

3

6

7

4

741

100kP5

5kP1

220kP2

P347klin.

P410klin.

R6

4k

7

R2

22

k

R1

47

R3

22

0k

R4

47

k

R8

1k

R9

2k

2

R7

18

kR11

1k

R12

3k

3

R13

15

k

R10

2k2

R5

4k7

T1

T2

T4

T3

C3

68n

C4

22n

C5

220n

C6

470n

C7

150n

C8

47n

C1

220n

C2

10n

K1

C9

100µ10V

1

2

9V

984105 - 11T1 ... T4 = BC550C

This circuit shows that only ahandful of parts is needed tomake a light-controlled switchwith a digital power buffer out-put capable of switching up to25 milliamps. The circuit isintended mainly for use in low-power battery-powered equip-

ment. The SFH309-4 is a pho-totransistor from Siemens, itspin connection is included inthe circuit diagram. In thisapplication, the SFH309 drawsonly a few tens of µA. At a cer-tain ambient light intensitylevel, the voltage at the input ofgate IC1f drops below theswitching threshold of theSchmitt trigger, and the outputconsequently toggles to logichigh. This level is again invertedby the five remaining gates inthe ‘106 which are connected inparallel to boost their outputdrive capacity. The effect ofstray light picked up fromremote controls and other infra-red transmitters is suppressed tosome extent by R1-C1. If inter-ference is still a problem, thenC1 may be increased a little.

The ambient light intensity atwhich the output changes stateis adjusted to individualrequirements with preset P1.The supply voltage should bereasonably clean and not exceed

thrifty light-controlled switch

02

9

COMPONENTS LIST

Resistor:R1 = 10MΩP1 = 1MΩ preset H

Capacitors:C1,C2 = 100nF

Semiconductors:T1 = SFH309-4 (Siemens,

ElectroValue)IC1 = 40106

Miscellaneous:PCB, not available ready-

made

Page 53: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

76 Elektor Electronics 12/98

16 volts d.c. The circuit is bestbuilt on the miniature printedcircuit board shown here. Whenfitting the phototransistor, makesure it is connected the rightway around — the shorter pin isthe collector.

Current consumption of thecircuit is 1 to 2µA in the dark,

and about 20µA when light isdetected (at a 9-V supply andwith P1 set to mid-travel).Finally, the switching function ofthe circuit may be reversed byexchanging P1 and T1, and con-necting R1 to the collector.

(984030-1, Gb)

1M

P1

C1

100n

C2

100n

R1

10M

SFH309-4

T1

13 121

IC1f

5 61

IC1c

9 81

IC1d

11 101

IC1e

3 41

IC1b

1 21

IC1a

IC1

14

7SFH309-4

16V max

IC1 = 40106 984030 - 11

EC

984030-1

C1

C2

H1

IC1

P1R1

T1

984030-1

--

+ +

984030-1

Button or coin cells that appearto be flat in their normal func-tion may yet be discharged fur-ther. This is because in manycases, for instance, a quartzwatch stops to function correctlywhen the battery voltage dropsto 1.2 V, although it can be dis-charged to 0.8 V.

Normally, however, not muchcan be done with a single cell.In the present circuit, a super-bright LED is made to workfrom voltages between 1 V and1.2 V. This may be used formap-reading lights, a keyholelight, or warning light when jog-ging in the dark. When a yellow,superbright LED is used with afresh battery, it may be used as

an emergency reading light or toread a front door nameplate inthe dark or to find an non-illu-minated doorbell.

Normally, LEDs light at volt-ages under 1.5 V (red) or1.6–2.2 V (other colours) onlydimly or not at all.

The present circuit uses amultivibrator of discrete designthat oscillates at about 14 kHz.The collector resistor of one ofthe transistors has beenreplaced by a fixed inductor,which is shunted by the LED.Because of the self-inductance,the voltage across the LED israised, so that the diode lightsdimly at voltages as low as 0.6 Vand becomes bright at voltagesfrom about 0.8 V up.

The circuit requires a supplyvoltage of 0.6–3 V and draws acurrent of about 18 mA at 1 V.

[Zeiller – 984077]

light from flat batteries

03

0

R1

10

k

R2

10

k

R3

33

D1L1

0mH47

T2

2x BC337

T1

C1

22n

C2

22n C3

22n

C4

220n

1V5

984077 - 11

0V6...3V

18mA @ 1V

Design G. PradeepThe alarm circuit uses infra-redlight beams to bridge distancesbetween 3 m and 5 m (10 ft to16 ft), but if the transmit diodeis given a reflector, larger dis-tances are possible. When thebeam is interrupted, a buzzersounds.

The transmitter is based on a

Type 555 timer circuit, whichgenerates 10 µs wide pulses at arate of 20 kHz. During thepulse, a current of about100 mA flows through the trans-mit diode. The average currentdrawn by the transmitter isabout 12 mA, which will nor-mally preclude a battery-oper-ated supply.

The receiver is rather morecomplex. The receive diode isnormally cut off, but comes onwhen it is exposed to infra-redlight. The more intense theinfra-red light, the larger thephoto current. This means thatthe received pulses cause analternating voltage across resis-

tor R1.The a.c.-coupled amplifier

based on transistors T1–T4 pro-vides an amplification of ×200at a frequency of 20 kHz.

The bandwidth of thereceiver is purposely limited toenhance the stability of the cir-cuit.

The pulses arriving from the

infra-red burglar alarm

03

1

Page 54: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

transmitter are intercepted bytone decoder IC1. Provided thepulse rate is correct, the outputof the decoder is logic low. Thisholds bistable IC3 in the resetstate, so that the buzzer remainsu n e n e rg i z e d .

When the infra-red signalfails (because the beam is bro-ken), the bistable is set, where-upon the buzzer is actuated. Thesounding of the buzzer cannotbe interrupted with switch S1.When, however, the beam isrestored, pressing S1 causes the

bistable to be reset, whereuponthe buzzer is switched off.

The receiver draws a currentof about 30 mA in the quiescentstate, which rises to about5 0 mA when the buzzer sounds.

The relatively large currentsm a ke battery operation uneco-nomical; it is far better (andsafer) to use an appropriatemains adaptor.

[ 9 8 4 0 8 4 ]

R9

R10

R1

R2

R4

R5 R6

R7 R8 R11

R13

R12

2k7

R3

150k

C11

10n

C4

22n

C8

C7

C9

4n7

C2

4p7C1

1n

C6

100n

R14

470Ω

C5

100µ16V

C10

220µ16V

C3

33p

T1

BC549B

T2

T3

BC

T4

BC

T5

BC547

BZ1S1D1

BP104D2

5V1

500mW

1

23

IC2a

≥15

64

IC2b

≥1547

557

IC1

567

OUT

IN

C2

C3

RC

1

8

4

7

3

2

R5

6

IC214

7

2x

A

A

B

C D

E

F

G

IC2 = 4001

B

A

C

D

E

F

G

12V

1V1

0V7

2V1

10V3

1V5

1V4

11V

984084 - 12

IC1DIS

THR

OUT555

TRCV

2

7

6

4

R

3

5

8

1

R1

R2

R4

R3

270Ω

5W

C2

2n7

1k

P1

C1

470µ16V

T1

BD

D1

D2

LD2712x

136

9V

50µs

10µs

9V

0V

984084 - 11

By G. KleineThe familiar Type 555 can beused to switch currents up to2 0 0 mA. Less well-known is itsuse as a latch with control input.When the input pins 2 (trigger)and 6 (threshold) are linked andconnected to half the supplyvoltage, the output can beswitched as follows. When thepotential at pins 2 and 6 israised to full supply voltagelevel, the output is switched toground. When pins 2 and 6 arel i n ked to ground potential, theoutput assumes supply voltagel e v e l .

The circuit in the diagramuses this mode of operation ofthe 555 to realize a two- w i r e

on/off switch. The combinationS1 (closed), R2 and R1 p r o v i d e shalf the supply voltage to theinput (pins 2, 6) of IC1. WhenS2 is closed, the output, pin 3,goes high so that D2 (on) lights.When S1 is opened, the input atpins 2, 6 of IC1 rises to above2/3 of the supply voltage, where-upon IC1 is disabled and theoutput goes low. Diode D1 ( o f f )then lights.

Network R3-C1 at the resetinput, pin 4, forces the latch tocome up in the off state whenpower is first applied.(Source: Electronic Design,November 6, 1995)

[ 9 8 4 1 2 6 ]

latch uses 555in memory mode

Page 55: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

co) low-cost function generatorO

Design: G.Baars

Here's a function generator thatwon't break the bank yet offersperfectly acceptable outputwaveforms for many applica-tions in your workshop. Thegenerator supplies sinewave,rectangle and triangle wave-forms within the frequencyrange 1 kHz to about 15 kHz.The output level is adjustablebetween 0 and about 10 V

PP'Though frugal, these specifica-tions make the generator a usefulpiece of test equipment foraudio design, experimentationand repair purposes. Since onlycommon -or -garden componentsare used, the generator can bebuilt at a modest outlay.

Here's how it works. Invertergates IC la and IC1b are con-nected to resistors R2 and R3 toform a buffer with some hystere-sis. Another gate from the'4069U integrated circuit, IC1f,acts as an integrator togetherwith R1, P1 and Cl. The poten-tiometer, P1, defines the inte-grator's time -constant. A bufferacting as a comparator with hys-teresis, together with the inte-grating effect provided by IC lf

COMPONENTS LIST

Resistors:R1 = 15k52R2,R12 = 47k52R3,R4,R8 = 22k52R5 = 560k52R6 = 12k52R7 = 6k528R9,R10 = 100k52R11 = 8k522P1 = 220k52 linear poten-tiometer

P2 = 4k527 linear potentiome-ter

Capacitors:Cl = 2nF2 MKT (Siemens)C2,C3 = 22,uF 16V radialC4,C5 = 220,uF 16 V radialC6,C7 = 100nF Sibatit (minia-ture ceramic, Siemens)

C8 = 1,uF 16 V radial

Semiconductors:D1 -D4 = 1N4148D5 = 1N4001IC1 = 4069U (U = unbufferedversion!)

IC2 = TLC271CP

Miscellaneous:51 = 3 -way rotary switch, 4

poles, PCB mount

results in an oscillator whoseoutput frequency is controlledby potentiometer P1. The buffersupplies a rectangular outputsignal, the integrator, a triangularone. The rectangular signal isfurther shaped and buffered bytwo more gates, IC1c and IC1d,before it is applied, via R8, toone of the contacts of the wave-form selection switch, S1. Thetriangular signal is also appliedto the switch, by way of R7. Thetriangular signal supplied byIC lf is fed to a sinewave shaper

IC1 c ICidR8

19

18

22k

220kC1

-I I -2n2

R2

47k

R7

6k8

D1 D3

S1

22µ16V

P2

16V

4k7

R9

0

100n

2276V

R12

C

:100n

C4 +Ffi

220µ16V

0

220µ16V 2r_(:)

984004 - 11

78 Elektor Electronics 12/9878 Elektor Electronics 12/98

Design: G.Baars

Here’s a function generator thatwon’t break the bank yet offersperfectly acceptable outputwaveforms for many applica-tions in your workshop. Thegenerator supplies sinewave,rectangle and triangle wave-forms within the frequencyrange 1 kHz to about 15 kHz.The output level is adjustablebetween 0 and about 10 Vpp.Though frugal, these specifica-tions make the generator a usefulpiece of test equipment foraudio design, experimentationand repair purposes. Since onlycommon-or-garden componentsare used, the generator can bebuilt at a modest outlay.

Here’s how it works. Invertergates IC1a and IC1b are con-nected to resistors R2 and R3 toform a buffer with some hystere-sis. Another gate from the‘4069U integrated circuit, IC1f,acts as an integrator togetherwith R1, P1 and C1. The poten-tiometer, P1, defines the inte-grator’s time-constant. A bufferacting as a comparator with hys-teresis, together with the inte-grating effect provided by IC1f

results in an oscillator whoseoutput frequency is controlledby potentiometer P1. The buffersupplies a rectangular outputsignal, the integrator, a triangularone. The rectangular signal isfurther shaped and buffered bytwo more gates, IC1c and IC1d,before it is applied, via R8, toone of the contacts of the wave-form selection switch, S1. Thetriangular signal is also appliedto the switch, by way of R7. Thetriangular signal supplied byIC1f is fed to a sinewave shaper

low-cost function generator0

33

R12

47k

R11

8k

2

R10

10

0k

R9

10

0k

R5

56

0k

11 101

IC1e

13

121

IC1f

5

61

IC1c

9

81

IC1d

12

1

IC1a

3

41

IC1b

S1

R7

6k8

R6

12k

D1 D3

D2 D4

R4

22k

C1

2n2

R2

47k

R1

15

k

P1

220k

C2

22µ16V

TLC271

IC22

3

6

7

48

1

5

C4

220µ16V

C8

1µ16V

P2

4k7

C3

22µ 16V

C7

100n

C6

100nIC1

14

7

C5

220µ16V

D5

1N4001

4x1N4148

IC1 = 4069U

984004 - 11

12V

R8

22k

R3

22

k

U

U

(C) Segment984004-1

C1

C2

C3

C4

C5 C6C7

C8D1

D2

D3

D4

D5

H1 H2

H3H4

IC1 IC2

OU

T

P1P2

R1 R2

R3

R4

R5

R6 R7

R8

R9

R10

R11 R12

S1

T

0

+

984004-1

(C) Segment984004-1

COMPONENTS LIST

Resistors:R1 = 15kΩR2,R12 = 47kΩR3,R4,R8 = 22kΩR5 = 560kΩR6 = 12kΩR7 = 6kΩ8R9,R10 = 100kΩR11 = 8kΩ2P1 = 220kΩ linear poten-

tiometerP2 = 4kΩ7 linear potentiome-

ter

Capacitors:C1 = 2nF2 MKT (Siemens)C2,C3 = 22µF 16V radialC4,C5 = 220µF 16 V radialC6,C7 = 100nF Sibatit (minia-

ture ceramic, Siemens)C8 = 1µF 16 V radial

Semiconductors:D1-D4 = 1N4148D5 = 1N4001IC1 = 4069U (U = unbuffered

version!)IC2 = TLC271CP

Miscellaneous:S1 = 3-way rotary switch, 4

poles, PCB mount

Page 56: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

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

consisting of IC le, R4, R6, R5and diodes Dl through D4. Theoutput signal is applied directlyto the waveform selectionswitch.

Because the three waveformshave different individual levels,the sinewave being the smallest,they have to be made roughlyequal before they can be appliedto the output amplifier, IC2. Thislevelling is achieved with the

OUT4---f-Y"Y"v"t

27OµH

aid of the aforementioned resis-tors R7 and R8 for the triangleand rectangle wave respectively,in combination with the outputlevel control pot, P2. TheTLC271 opamp is wired for again of 6.7 times in order toachieve a maximum (no-load)output level of about 10 Aipp The minimum load impedanceto be observed is about600 ohms.

The generator is poweredfrom a regulated 12 -volt source,and its current consumption willbe of the order of 20 mA,depending, of course, on theload connected to the output.

The printed circuit boarddesigned for the generator alsocontains all the controls, i.e., thefrequency control pot, the wave-form selection switch and theoutput level control pot, so that

M 1.5 A step-downo switching regulator

By G. KleineStep-down regulators are moreand more often used to derivelow supply voltage from a highervoltage without incurring losses.Owing to the steadily increasingswitching rates, the suppressionof interference and noise thatare unavoidable by-products ofthe switching has become muchsimpler.

The L4971 from SGS-Thom-son is a step-down monolithicpower switching regulator deliv-ering 1.5 A at a voltage between+3.3 V and +40 V (selected bya simple external divider). Real-ized in BCD mixed technology,the regulator is housed in aDIL8 or 5016-SMD enclosure.

The input voltage rangesfrom 8 V to +55 V, while theefficiency is 85%, rising to 95%when the input voltage is only afew volts higher than the outputvoltage.

The external divider to setthe output voltage is formed byR3 -R4. For an output of 3.3 V,Vout may be linked directly toFB (pin 8). Resistor values forsome usual output voltages aregiven in the table.

The normal switching fre-quency of the L4971 is100 kHz, but this may beincreased to 500 kHz by making

Vout R3 R4(V) (k52) (k52)

3.3 0 00

5.1 2.7 4.49.0 8.2 4.712 12 4.715 16 4.718 20 4.724 30 4.7

no tedious wiring is required.The project is convenientlyboxed by drilling holes for thepot and switch shafts in the frontpanel, and then mounting thecompleted circuit board againstthe inside of the front panel.Unfortunately, the PCB for thisproject is not available ready-made through the Publishers.

(984004)

VCC

THERMALSHUTDOWN

SS_INHH INHIBIT

7COMP 0

FB8 E/A

VOLTAGESMONITOR

SOFTSTART 0-3.3V

3.3V

OSCILLATOR

INTERNALREFERENCE

8...55V

0 C

5

1

0GND

INTERNALSUPPLY 5.1V

CBOOTCHARGE

oIow

DRIVE

CBOOTCHARGEAT LIGHTLOADS

4

OUT

8

R1

C1 C7 IC2

220µ 100n 2n763V

FB

IC1

L4971(DIL8)

CISC

INH COMP mL BOOT

R1=12 kS2 and C2=0.001 kLEThe soft start/inhibit input

(SS_INH pin 2) may be usedwith an open -collector output toinhibit the controller or capacitorC5 for the soft start function.

A suitable core for L1 is the

2 17

R

C5 1C4

100n 22n

1 16C6

L1

D1

100n

*zie tekst

* siehe Text

Type T-94-26 from Amidon. Thespecified inductance is obtainedwith 65 turns close -wound0.5 mm dia. enamelled copperwire.

Other features include pulseby pulse current limit, hiccup

60 BOOT

984124 - 11

4i-(.3V3)

984124 - 12

mode for short-circuit protec-tion, voltage feed forward regu-lation, protection against feed-back loop disconnection, inhibitfor zero current drain and ther-mal shutdown.

[984124]

Elektor Electronics 12/98 7979Elektor Electronics 12/98

consisting of IC1e, R4, R6, R5and diodes D1 through D4. Theoutput signal is applied directlyto the waveform selectionswitch.

Because the three waveformshave different individual levels,the sinewave being the smallest,they have to be made roughlyequal before they can be appliedto the output amplifier, IC2. Thislevelling is achieved with the

aid of the aforementioned resis-tors R7 and R8 for the triangleand rectangle wave respectively,in combination with the outputlevel control pot, P2. TheTLC271 opamp is wired for again of 6.7 times in order toachieve a maximum (no-load)output level of about 10 Vpp.The minimum load impedanceto be observed is about600 ohms.

The generator is poweredfrom a regulated 12-volt source,and its current consumption willbe of the order of 20 mA,depending, of course, on theload connected to the output.

The printed circuit boarddesigned for the generator alsocontains all the controls, i.e., thefrequency control pot, the wave-form selection switch and theoutput level control pot, so that

no tedious wiring is required.The project is convenientlyboxed by drilling holes for thepot and switch shafts in the frontpanel, and then mounting thecompleted circuit board againstthe inside of the front panel.Unfortunately, the PCB for thisproject is not available ready-made through the Publishers.

(984004)

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

By G. KleineStep-down regulators are moreand more often used to derivelow supply voltage from a highervoltage without incurring losses.Owing to the steadily increasingswitching rates, the suppressionof interference and noise thatare unavoidable by-products ofthe switching has become muchsimpler.

The L4971 from SGS-Thom-son is a step-down monolithicpower switching regulator deliv-ering 1.5 A at a voltage between+3.3 V and +40 V (selected bya simple external divider). Real-ized in BCD mixed technology,the regulator is housed in aDIL8 or SO16-SMD enclosure.

The input voltage rangesfrom 8 V to +55 V, while theefficiency is 85%, rising to 95%when the input voltage is only afew volts higher than the outputvoltage.

The external divider to setthe output voltage is formed byR3-R4. For an output of 3.3 V,Vout may be linked directly toFB (pin 8). Resistor values forsome usual output voltages aregiven in the table.

The normal switching fre-quency of the L4971 is100 kHz, but this may beincreased to 500 kHz by making

R1=12 kΩ and C2=0.001 µF.The soft start/inhibit input

(SS_INH pin 2) may be usedwith an open-collector output toinhibit the controller or capacitorC5 for the soft start function.

A suitable core for L1 is the

Type T-94-26 from Amidon. Thespecified inductance is obtainedwith 65 turns close-wound0.5 mm dia. enamelled copperwire.

Other features include pulseby pulse current limit, hiccup

1.5 A step-downswitching regulator0

34

(DIL8)L4971

IC1

COMP BOOT

OSC

INH

OUT

FB

1

5

3

2 7 6

4

8

R1

22

k

R2

10

k

R3

*

R4

*

C2

2n7

C5

100n

C7

100n

C4

22n

C6

100n

C1

220µ63V

C8

470µ63V

D1

SB360

L1

270µH

10k

INHIBIT* zie tekst*

see text*voir texte*siehe Text*

8...55V

984124 - 12

+3V3

Vout R3 R4(V) (kΩ) (kΩ)

3.3 0 ∞5.1 2.7 4.49.0 8.2 4.712 12 4.715 16 4.718 20 4.724 30 4.7

mode for short-circuit protec-tion, voltage feed forward regu-lation, protection against feed-back loop disconnection, inhibitfor zero current drain and ther-mal shutdown.

[984124]

Page 57: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

nCIO 12C temperature sensorO

Design K. Walraven

The LM75 from National Semi-conductor is a temperature sen-sor, Delta -Sigma analogue -to -digital converter (ADC), anddigital over -temperature detec-tor with I2C " interface. It ismanufactured in surface -mount

Parts list

Resistors:Ri = 3.9 kflR2 = 2.2 kflR3-R5 = 100 kflR6 = 4.7 kfl

Capacitors:C1 = 0.1 NF

Semiconductors:D1 = BAT85D2 = LED, high efficiency

Integrated circuits:IC1 = LM75CIM-5

Miscellaneous:K1 = DB25 connector, male,right-angled, for boardmounting

K2 = 10 -way box header forboard mounting

JP1-JP3 = 2 -way pin stripheader with jumper link

PCB Order No. 984021 (seeReaders Services towardsthe end of this issue)

technology (SMT) for operationfrom 5 V or 3.3 V The tempera-ture may be read in half degreesin the range -55 °C to +125 °V.It provides a 9 -bit output in twoscomplement (that is, OFAH is+125 °C; 192H is -55 °C;001H is +0.5 °C; 1FFH is

0 14

0O

O

050-

O19

0-2200 8 SCL

2

pI.

8018212 (3)- I.Z0b86

O BIBB

-0.5 °C).The LM75 can operate as a

stand-alone temperature switch,for which purpose an upper anda lower switching level may beprogrammed in. The output ofthe device goes low when the settemperature is exceeded. This

output may also be used as aninterrupt for a computer ormicrocontroller. At power -up,the switching levels are fixed at80 °C and 75 °C

The circuit shown is basedon an LM75 and may be con-nected to the Centronics port of

5

3

6

017

0 D1

O 149

220 BAT85o

O23

11 OS0o 012O

25

13 SDA

R3

0

R4 R5

Es

Cl

100n

SC

R6

D2

4'4°

high eff.

SDA

R1

2

7

6

0SDA

SCL IC1 OS

LM75CIM-5AO

2

OS

K2 (-.)

3 0 0 45 0 0 6

9_0 X10

Al

AO

JP1 JP2

0

A2

J P3

O

984021 - 11

A80 Elektor Electronics 12/9880 Elektor Electronics 12/98

Design K. Walraven

The LM75 from National Semi-conductor is a temperature sen-sor, Delta-Sigma analogue-to-digital converter (ADC), anddigital over-temperature detec-tor with I2C™ interface. It ismanufactured in surface-mount

technology (SMT) for operationfrom 5 V or 3.3 V. The tempera-ture may be read in half degreesin the range –55 °C to +125 °V.It provides a 9-bit output in twoscomplement (that is, 0FAH is+125 °C; 192H is –55 °C;001H is +0.5 °C; 1FFH is

–0.5 °C).The LM75 can operate as a

stand-alone temperature switch,for which purpose an upper anda lower switching level may beprogrammed in. The output ofthe device goes low when the settemperature is exceeded. This

output may also be used as aninterrupt for a computer ormicrocontroller. At power-up,the switching levels are fixed at80 °C and 75 °C

The circuit shown is basedon an LM75 and may be con-nected to the Centronics port of

I2C temperature sensor0

35

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

K1

1 2

3 4

5 6

7 8

9 10

K2

R2

2k

2

R1

3k

9

R3

10

0k

R4

10

0k

R5

10

0k

R6

4k

7

JP1 JP2 JP3

D1

BAT85

C1

100n

LM75CIM-5

IC1SCL

SDA

OS

A0

A1

A2

3

8

4

1

2

7

6

5

D2

SCL

OS

A0

A1

A2

SDA

1 2 4

SCL

SDA

OS

984021 - 11

high eff.

984021-1(C) ELEKTOR

C1

D1

D2

K1

K2

R1

R2

R3R4R5

R6

4 2 1984021-1

IC1

984021-1(C) ELEKTOR

Parts list

Resistors:R1 = 3.9 kΩR2 = 2.2 kΩR3–R5 = 100 kΩR6 = 4.7 kΩ

Capacitors:C1 = 0.1 µF

Semiconductors:D1 = BAT85D2 = LED, high efficiency

Integrated circuits:IC1 = LM75CIM-5

Miscellaneous:K1 = DB25 connector, male,

right-angled, for boardmounting

K2 = 10-way box header forboard mounting

JP1–JP3 = 2-way pin stripheader with jumper link

PCB Order No. 984021 (seeReaders Services towardsthe end of this issue)

Page 58: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

81Elektor Electronics 12/98

a computer via a 25-way 1:1cable. The port then functions asan I2C interface. The necessarysoftware, datasheet and applica-tion note may be downloadedfrom www.national.com/pf/LM/LM75.html.

Operation of the software is

simple: at the top left is a buttonwhich when set to ‘off ’ rendersthe Centronics port voltage-less.Connect the board andselect the relevant Centronicsaddress and an I2C address.This means that the highestaddress on the board (lowest in

the list) must be selected with-out the use of jumpers. Set thebutton to ‘on’ and temperaturemonitoring starts.

Since the circuit draws cur-rent from the Centronics port, adedicated power supply is notrequired. However, readers who

worry about the additional loadplaced on their PC, may notethat the LM75 draws a currentnot exceeding 250 µA.

[984021]

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

Design: H. BonekampThe current source in the dia-gram, which react very fast tochanges in the input signal, maybe used, for instance, in certainmeasurements.

Differential amplifier IC1ensures that the potential acrossR2 is equal to the input voltage:

Iout=Uin/R2.

The bandwidth, B, is given by

B=R2 f /RL,

where f=80 MHz, and the loadimpedance RL≥ R2 (both inohms).

The input is terminated into

R1 to give the usual 50 Ωimpedance required by measur-ing instruments. At the sametime, this resistor sets the d.c.operating point. If the link to thedriving signal source is shortand d.c. coupled, R1 may beomitted.

The peak voltage betweenpins 1 and 2 of the IC is limitedto 2.1 V to prevent too large acurrent at the output. Therefore,the peak output current is2.1/100=21 mA.

[984091]

fast voltage-drivencurrent source0

36

AD830

IC1OUT

X1

X2

Y1

Y2

8

5

1

2

3

7

4R1

49

Ω9

R2

100Ω

C1

10µ25V

C3

10µ25V

C2

100n

C4

100n

15V

15V

984091 - 11

Design: Pradeep G.

The function of this circuit is tosound a buzzer, or, optionally,actuate a relay, when a certainmoisture level is detectedbetween a pair of probes.The circuit has a ‘memory’ inthe form of a flip-flop, IC1a-IC1b, which enables or disablesa tone oscillator, IC1c. The flip-flop is reset either by C1 and C2when the supply voltageappears, or by push-button S1.This may not reset the alarm,however, which will sound againuntil the probes are ‘dry’.The (passive) buzzer may bereplaced by a relay actuating anexternally connected sounder,lamp or other high-power sig-nalling device. Because the duty

simple moisture detector

03

7

T1

BC547

R4

4k7

12

1311

IC1d

&8

910

IC1c

&

1

23

IC1a

&

6

54

IC1b

&

R3

10k

C3

100n

R2

1M

R1

10

k

C1

100n

C2

10µ16V

C4

10µ16V

IC1

14

7

S2

BZ1

S1

RE1

6V

D1

1N4148

*

zie tekst* see text* voir texte* siehe Text*

IC1 = 4093

9V

984111 - 11

Page 59: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

82 Elektor Electronics 12/98

factor of the coil voltage is about0.5, the relay should be a typewith a coil voltage which is lowerthan the supply voltage. A 6-volttype is suggested if the circuit is

powered from a 9-volt supply.The circuit has a modest stand-by current consumption ofbetween 4 and 5 mA. This risesto about 40 mA when the relay

is actuated. The supply voltageis uncritical and may be any-thing between 3 V and 15 V.Note, however, that it may not bepossible to use a relay if a sup-

ply voltage lower than about 8 Vis employed. If the circuit isfound to be too sensitive, thevalue of resistor R2 may bedecreased. (984111-1, W)

Design: T. GiesbertsExcessive noise is bad for yourhealth and bad for your sur-roundings. It cannot be said toooften: too many young people goprematurely deaf because ofprolonged exposure to loudsounds. There cannot be anypleasure in excessively loudmusic: it hurts and, like skincancer, the terrible effects do notimmediately become noticeable.

The monitor in the diagramgives a visible warning when theambient noise is at a dangerouslevel or it actuates a relay.

The noise sensor is a two-terminal electret microphonethat is powered via R1. Theaudio signal is applied toop amp IC1, whose input resis-tance is fixed at 47 kΩ by R2.The signal amplification can beset from unity to ×250 with P1.

Operational amplifier IC2functions as a comparator whichlikens the amplified signal witha reference voltage of 3.3 V. Ifthe signal at the non-invertinginput of the op amp exceeds thereference voltage, the output ofIC2 changes state (goes high),

whereupon T1 is switched on.When this happens, the relay isenergized or the LED lights. Therelay contacts may be used tooperate a warning light orbuzzer, or to switch the noisesource off. In the latter case, C2

prevents the circuit returning toits original state (which wouldcause the noise source to comeon again). The capacitor ischarged to the peak value of thesignal. Owing to the presence ofD1, it cannot be discharged via

the output of IC1, but only, andvery slowly, via the high-resis-tance input of IC2.

The monitor is reset with S1.[984102]

ambient-noise monitor

03

8

IC1

2

3

6

7

4

TL071

IC2

2

3

6

7

4

TL071

R1

10

k

R4

2k

2

R3

1k

R2

47

k

R5

47

C1

100n

C2

10µ25V

C3

10µ25V

250k

P1

D1

1N4148

D2

3V3400mW

T1

BC547B

D3

RE1

C4

10µ 25V

C5

10µ 25V

6...15V

6...15V

S1

*

zie tekst*see text*

siehe Text*voir texte*

984102 - 11

Design: T. GiesbertsThe up/down drive is intendedprimarily for use with the tonecontrols described elsewhere inthis issue.

The tone controls use elec-tronic switches that are operatedby a multi-position selector. Thepresent circuit is intended as areplacement for this selector andhas facilities for operating thetone controls via an up and a

down key. A third key enablesthe user to switch over rapidly toa preprogrammed position of therelevant tone control.

The electronic switches aredriven by a BCD-to-decimaldecoder Type 4028 (IC3), whichin turn is controlled by a 4-bitpreset up/down counter (IC2).The counter uses the three low-est bits only. The MSB of

decoder IC3 is permanently low.Only the eight lowest outputs ofthe decoder are used and theseare linked via K1 to the controlinputs of IC1 and IC2 in the tonecontrols.

The circuit is operated withS1 and S2. Switch S3 is the ear-lier mentioned preset key. Thedata for the preset inputs are setwith DIP switch S4. Capacitor

C3 ensures that when the supplyvoltage is switched on, the pre-set data are automaticallyadopted by the counter.

Each of switches S1 and S2drives an S/R bistable (US: flip-flop), which determines the levelat the U/D input of counter IC2.

Networks R3-C1 and R4-C2,in conjunction with Schmitt trig-ger IC1b provide a thoroughdebouncing and at the same

up/down drivefor tone control0

39

Page 60: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

83Elektor Electronics 12/98

delay the clock pulse slightly.This delay guarantees that theclock pulse (output of IC1b)arrives after the state of thecounter has been defined.

To prevent the counter jump-ing from minimum to maximumor vice versa, the clock pulse isdisabled in the outermost posi-tions. In the minimum state, thisis achieved simply by use of thecarry-out terminal (pin 7) of thecounter. In the maximum state,an auxiliary network, consistingof R6, D3, D4, D5/IC1a, and D1,was found necessary.

Diode D2 ensures that pin 5of IC1 remains low when theminim state is reached until S1is pressed. The same isachieved by diode D1 in regardsof pin 6 of the IC when the max-imum state is reached. ResistorR6 serves to reset the clock dis-abling during down counting;when the down key is pressed,the output of IC1a goes highagain.

If an indication is desired ofthe actual state of the up/downdrive, eight high-efficiencyLEDs may be added at the out-put of IC3 (anodes to the output,cathodes via a common 10 kΩresistor to ground).

An indication whether

amplification or attenuationoccurs may be given by an addi-tional LED at the output of IC1cor IC1d.

During quiescent operation,the circuit draws a current of20 µA, which rises to about140 µA when S1 or S2 is

pressed. Network R7-C7 pro-vides effective decoupling of thedigital circuit from the analoguesupply. [984116]

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

4028

IC3

/Z8

14

11

12

13

1015

DX 3

2

6

7

4

5

9

1

0

1

2

3

4

5

6

7

0

18

1

0

2

G07

K1

S4

R5

5x 1M

1

2 3 4 5 6

D5

D3

D41,2+/1,2-

1,2CT=151,2CT=0

IC2

4516

CTR4

12

13

15

10

14

113D

C3

G1

M2

R

4

5

1

7

2

6

3

9C3

100n

S3

R2

10

0k

R1

10

0k

S2S1

13

1211

IC1d

&

9

810

IC1c

&R6

47

k

R3

1M

R4

1M

1

23

IC1a

&

C1

10n

C2

10n

D2

D1

6 5

4IC1b

&

R7

100Ω

C4

100n

C5

100n

C6

100n

C7

100µ25V

IC1

14

7

IC2

16

8

IC3

16

8

1

2

3

4

5

6

7

8

2x 1N4148

1N4148

UP DOWN

IC1 = 4093

12V

984116 - 11

3x

Design: I. FietzThe mains filter described in‘PC Topics’ (April 1998) coulddo with two useful additions: afuse monitor and a voltage indi-cator. The filter proper consistsof capacitors C3–C7 and inductorL1. Its operation is describedfully in the April 1998 article.The present article deals onlywith the additional features.

The fuse monitor indicates bythe lighting of an LED that thefuse has blown. For this purpose,two capacitive potential dividershave been added: C1-R3-D1 andC2-R4-D3. When the fuse isintact, the potential at the base ofT1 is 3.9 V higher than that of the(N)eutral line. The transistor ison and short-circuits D2. Whenthe fuse blows, T1 is off. Its col-lector potential, owing to D1, is2.7 V, so that D2 lights. Note thatthis action is only possible when

the (L)ive line is positive w.r.t.the neutral line; this means thatthe LED flashes in rhythm withthe mains frequency (since thisis 50 Hz, it cannot be discerned

by the human eye).A second potential divider,

C6-R4-D4-D5, at the output ofthe filter ensures that the LED

(D4) lights when the mains volt-age is present at the output.

[984114]

mains filter revisited

04

0

K1 K2R1

22

0k

R2

22

0k

R3

1k

1W

R4

3k

3

1W

R6

1k

1W

C1

100n

X2

C2

33n

X2

C3

470nX2

C4

470nX2

C5

4n7

Y2

C7

4n7

Y2

C6

100n

X2

D2 D4D1

2V7

500mW

D5

2V7

500mW

D3

3V9

500mW

T1

BC547B

R5

275V

SIOV-S20K275

L1

2x 5mH6 / 2ASiemens

Siemens

P

N

P

N

984114 - 11

L1 = B82723-A2202-N1

2A T

F1

C1 ... C7 = 250V

D2, D4 = high efficiency LED

Page 61: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

84 Elektor Electronics 12/98

Being an all-solid-state designyou don’t have to tap on thisbarometer to get the latest airpressure reading!The main components in the cir-cuit are air pressure transducerIC1, an MPXS4100A fromMotorola, and two LM3914 LEDbargraph drivers, IC3 and IC4.Both LED drivers generate a ref-erence voltage of 1.25 V. Thereference supply of IC3 is cre-ated with respect to ground. Byconnecting the RLO andREFADJ inputs of IC4 to thereference voltage created byIC3, the REFOUT pin of IC4then supplies 2.5 V with respectto ground. In this way, the LEDdrivers are cascaded to give ascale of 20 LEDs each repre-senting an air pressure increaseof 5 hPa.Because the output voltage ofthe pressure sensor follows anychange in the supply voltage, avery stable 5-volt supply isrequired. This is provided byopamp IC2a which doubles the2.5-V REFOUT potential fromIC4. The sensor output voltageis expressed by the equationUo = (0.001059*P – 0.1518)*5[V] (P [hPa])Because we want an indicationrange of 945 hPa (all LEDs off)to 1045 hPa (all 20 LEDs on),

LED barometer0

41

REFOUT

REFADJ

LM3914

IC4

MODE

SIG

RHI

RLO

L10

17

16

15

14

13

12

11

10

L9

L8

L7

L6

L5

L4

L3

L1

18L2

9

5

8

4

6

7

3

2

1

D16

D15

D18

D17

D20

D19

D12

D11

D14

D13

C7

100n

REFOUT

REFADJ

LM3914

IC3

MODE

SIG

RHI

RLO

L10

17

16

15

14

13

12

11

10

L9

L8

L7

L6

L5

L4

L3

L1

18L2

9

5

8

4

6

7

3

2

1

D6

D5

D8

D7

D10

D9

D2

D1

D4

D3

C6

100n

6

5

7IC2b

2

3

1IC2a

R6

3k

9

R5

12

k

R7

8k

2

R9

10

k

R1

56

k

R2

1k

47k

P2

1k

P1

R10

100Ω

R4

8k2

R8

10k

R3

8k2

C1

47p

C3

100n

C2

10µ10V

S4100A

IC1

MPX4

3

2

D21

1N4001C4

100µ25V

C5

100nIC2

8

4

9...12V

+U +U

+UIC2 = TLC272

5V

5V

5V

2V5

984061 - 11

950

+U

955

960

965

970

975

980

985

990

995

1000

1005

1010

1015

1020

1025

1030

1035

1040

1045

P [ hPa ]

(C) ELEKTOR

984061-1

C1

C2

C3

C4

C5

C6

C7

D1

D2

D3

D4 D5

D6

D7

D8

D9

D10

D11

D12

D13

D14

D15

D16

D17 D

18

D19

D20

D21 H1

H2

IC2

IC3

IC4

P1

P2

R1

R2

R3

R4

R5

R6 R7

R8

R9

R10

1045

1040

1035

1030

1025

1020

1015

1010

1005

1000

995

990

985

980

975

970

965

960

955

950

+-

9..12V

984061-1

IC1

(C) E

LEK

TOR

984061-1

Page 62: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

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

COMPONENTS LIST

Resistors:R1 = 56kQR2 = 1kQR3,R4,R7 = 8kQ2R5 = 12kQR6 = 3kQ9R8,R9 = 10kQR10 = 100QP1 = 1kQ preset HP2 = 47kQ preset H

the following minimum andmaxim sensor output voltagescan be calculated:945 hPa a' 4.245 V = U10,1045 hPa a' 4.774 V = UhighThe required gain, A, betweenthe sensor output and the inputof the readout is thenA = Uref/(Uhi h - Ulow) =2.5/(4.774 -4.45) = 4.726

Capacitors:Cl = 47pF ceramicC2 = 10,uF 10V radialC3 = 100nF MKT (Siemens)C5,C6,C7 = 100nF ceramicC4 = 100,uF 25V radial

Semiconductors:D1 -D7 = LED, red, 3mm, highefficiency

D8 -D13 = LED, yellow, 3mm,

In addition to this gain we alsoneed a negative offset of4.245 V, so that the output volt-age is 0 V at an air pressure of945 hPa. Components IC2b, P1,P2, R2, R3, R4 and R5 providethe gain and offset compensa-tion. The 5-V reference voltage,IC2b, P1, R2 and R3 are the`ingredients' to cancel the offset

high efficiencyD14 -D20 = LED, green, 3mm,high efficiency

D21 = 1N4001IC1 = MPXS4100A (Motorola,Conrad)

1C2 = TLC272CPIC3,1C4 = LM3914N

Miscellaneous:PCB, order code 984061-1

and at the same time provide again of 6.65 times. This gainmay be reduced to the abovementioned value by adjustingP2.The simplicity of the circuit isachieved at the cost of a fairlycomplex calibration procedure.Because preset P1 not onlydetermines the offset but also

12/24/48 V d.c. testerO

Design: W. MannertzThe present tester is intendedprimarily for testing the 24 Velectrical circuits found on mostpleasure craft. However, if theresistors are given different val-ues, the circuit may, of course,be used for other voltage ranges.For 12 V, the value of the resis-tors should be 1.2 kn, and for

48 V, 4.7 kn.The tester should be con-

nected to the +ve and -ve volt-age rails with test clips or croc-odile clips, whereupon the testprobe is placed on the point tobe tested. When the potential atthe point is positive, the redLED lights; if it is negative, thegreen one does.

If the supply is not con-nected to earth, the tester maybe used as ground -leak tester. Inthis situation, one of the LEDslights when the test probetouches a point at earth poten-tial and there is a leakage.

[984104]

the gain of IC2b, there is no wayof avoiding multiple two -pointcalibration. In practice, you usean existing barometer or air -pressure information from yournational or regional Met Office,and adjust the circuit severaltimes at different air pressures.Alternatively, if you have accessto a pressure vessel in which thepressure can be accurately con-trolled to 945 hPa, P2 is initiallyset to mid -travel, and P1 isadjusted until the output of IC2bsupplies 0 V. Next, increase thepressure in the vessel to1045 hPa, and adjust P2 untilLED D20 just lights.The printed circuit board ofwhich the templates are shownhere is available ready-madefrom the Publishers.

(984061-1, Bo)

co)Tr 0.5-6 GHz low -noise amplifierO

By G. KleineThe MGA-86563 from Hewlett-Packard is a three -stage, GaAs,MMIC (monolithic microwaveintegrated circuit) that offers lownoise figure and excellent gainfor applications from 0.5 GHz to6 GHz. The device uses internalfeedback to provide widebandgain and impedance matching.It is housed in an ultra -minia-ture SOT -363 package, whichrequires half the board space ofthe SOT -143.

The MGA-86563 may beused without impedance match -

4

RF OUTPUTAND Vd

804123 - 11

ing as a high performance 2 dBNF (noise figure) amplifier.Alternatively, with the additionof a simple shunt -series induc-tor at the input, the noise figurecan be reduced to 1.6 dB at2.4 GHz. For 1.5 GHz applica-tions and above, the output iswell matched to 50 SI Below1.5 GHz, gain can be increasedby using conjugate matching.

The input of the circuit inFigure 1 is fixed tuned for aconjugate power match (maxi-mum power transfer or mini-mum VSWR - voltage standing

Elektor Electronics 12/98 8585Elektor Electronics 12/98

the following minimum andmaxim sensor output voltagescan be calculated:945 hPa ≅ 4.245 V = Ulow1045 hPa ≅ 4.774 V = UhighThe required gain, A, betweenthe sensor output and the inputof the readout is thenA = Uref/(Uhigh – Ulow) =2.5/(4.774 – 4.245) = 4.726

In addition to this gain we alsoneed a negative offset of4.245 V, so that the output volt-age is 0 V at an air pressure of945 hPa. Components IC2b, P1,P2, R2, R3, R4 and R5 providethe gain and offset compensa-tion. The 5-V reference voltage,IC2b, P1, R2 and R3 are the‘ingredients’ to cancel the offset

and at the same time provide again of 6.65 times. This gainmay be reduced to the abovementioned value by adjustingP2.The simplicity of the circuit isachieved at the cost of a fairlycomplex calibration procedure.Because preset P1 not onlydetermines the offset but also

the gain of IC2b, there is no wayof avoiding multiple two-pointcalibration. In practice, you usean existing barometer or air-pressure information from yournational or regional Met Office,and adjust the circuit severaltimes at different air pressures.Alternatively, if you have accessto a pressure vessel in which thepressure can be accurately con-trolled to 945 hPa, P2 is initiallyset to mid-travel, and P1 isadjusted until the output of IC2bsupplies 0 V. Next, increase thepressure in the vessel to1045 hPa, and adjust P2 untilLED D20 just lights.The printed circuit board ofwhich the templates are shownhere is available ready-madefrom the Publishers.

(984061-1, Bo)

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

COMPONENTS LIST

Resistors:R1 = 56kΩR2 = 1kΩR3,R4,R7 = 8kΩ2R5 = 12kΩR6 = 3kΩ9R8,R9 = 10kΩR10 = 100ΩP1 = 1kΩ preset HP2 = 47kΩ preset H

Capacitors:C1 = 47pF ceramicC2 = 10µF 10V radialC3 = 100nF MKT (Siemens)C5,C6,C7 = 100nF ceramicC4 = 100µF 25V radial

Semiconductors:D1-D7 = LED, red, 3mm, high

efficiencyD8-D13 = LED, yellow, 3mm,

high efficiencyD14-D20 = LED, green, 3mm,

high efficiencyD21 = 1N4001IC1 = MPXS4100A (Motorola,

Conrad)IC2 = TLC272CPIC3,IC4 = LM3914N

Miscellaneous:PCB, order code 984061-1

Design: W. MannertzThe present tester is intendedprimarily for testing the 24 Velectrical circuits found on mostpleasure craft. However, if theresistors are given different val-ues, the circuit may, of course,be used for other voltage ranges.For 12 V, the value of the resis-tors should be 1.2 kΩ, and for

48 V, 4.7 kΩ.The tester should be con-

nected to the +ve and –ve volt-age rails with test clips or croc-odile clips, whereupon the testprobe is placed on the point tobe tested. When the potential atthe point is positive, the redLED lights; if it is negative, thegreen one does.

If the supply is not con-nected to earth, the tester maybe used as ground-leak tester. Inthis situation, one of the LEDslights when the test probetouches a point at earth poten-tial and there is a leakage.

[984104]

04

2

R1

2k

7

R2

2k

7

D1

D2

D3

1N4001

984104 - 11

grün

groen

green

vert

rot

rood

red

rouge

12/24/48 V d.c. tester

By G. KleineThe MGA-86563 from Hewlett-Packard is a three-stage, GaAs,MMIC (monolithic microwaveintegrated circuit) that offers lownoise figure and excellent gainfor applications from 0.5 GHz to6 GHz. The device uses internalfeedback to provide widebandgain and impedance matching.It is housed in an ultra-minia-ture SOT-363 package, whichrequires half the board space ofthe SOT-143.

The MGA-86563 may beused without impedance match-

ing as a high performance 2 dBNF (noise figure) amplifier.Alternatively, with the additionof a simple shunt-series induc-tor at the input, the noise figurecan be reduced to 1.6 dB at2.4 GHz. For 1.5 GHz applica-tions and above, the output iswell matched to 50 Ω. Below1.5 GHz, gain can be increasedby using conjugate matching.

The input of the circuit inFigure 1 is fixed tuned for aconjugate power match (maxi-mum power transfer or mini-mum VSWR – voltage standing

0.5–6 GHz low-noise amplifier

04

3

Page 63: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

86 Elektor Electronics 12/98

wave ratio) at 2 GHz. The 3.3 nH inductor, L1, in

series with the input of theamplifier matches the input to50 Ω at 2 GHz.

Inductor L2 prevents anytendency to resonance over theoperating range (2 GHz). Whenoperation takes place at lower

frequencies, its value may haveto be increased accordingly.

A circuit for operation up to6 GHz is shown in Figure 2. A50 Ω microstripline with aseries d.c. blocking capacitor,C1, is used to feed r.f. to theMMIC. The input of the deviceis already partially matched for

noise figure and gain to 50 Ω.The use of a simple inputmatching circuit, such as aseries inductor, will minimizethe amplifier noise figure.Sincethe impedance match for NF0(minimum noise figure) is veryclose to a conjugate powermatch, a low noise figure can be

realized simultaneously with alow input VSWR.

DC power is applied to theMMIC through the same pin tatis shared with the r.f. output. A50 Ω microstripline is used toconnect the circuit to the follow-ing stage.

[984125]

MGA-86563IC1

1 4

23

56

L2

28nH

L1

3nH3

C1 C2

C3

1n

K1 K2

5V...7V

14mA

984125 - 12

MGA-86563IC1

1 4

23

56

L1C1 C2

C3

100p

K1 K2

5V...7V

14mA

984125 - 13

50

Ω

R110...100Ω

50Ω 50Ω50Ω50Ω

Design H. BonekampThe consumer unit (or ‘electric-ity meter’) cupboard in someolder houses is a badly lit place.If the bell transformer is alsolocated in this cupboard, it maybe used to provide emergencylighting by two high-currentLEDs. These diodes are pow-ered via a small circuit thatswitches over to four NiCd bat-teries when the mains fails.

The output voltage of the belltransformer is rectified bybridge B1 and buffered bycapacitor C1. The batteries arecharged continuously with a cur-rent of about 7.5 mA via diodeD1 and resistor R2. The base oftransistor T1 is high via R3, so

that the transistor is cut off.When the mains voltage

fails, C1 is discharged via R1;when the potential across it hasdropped to a given value, thebattery voltage switches on T1via R3 and R1, provided switchS1 is closed. When T1 is on, acurrent of some 20 mA flowsthrough diodes D4 and D5. Thelight from these LEDs is suffi-cient to enable the defect fuse orthe tripped circuit breaker to belocated.

[984110]

LED lightingfor consumer unit cupboard0

44

B1

B80C1500

C1

100µ25V

R1

15

k

R3

22

k

R2

1k5

R5

47Ω

R4

680Ω

D1

1N4148

D31N4148

T1

BC557B

D2

1N4148

BT1

4x 1V2 NiCd

750mAh

S1

D4

D5

9 - 12V

984110 - 11

Design: G. Baars

This antenna tuning unit (ATU)enables half-wavelength (1⁄2 λ) orlonger wire antennas to be

matched to the 50-Ω antennainput of 27-MHz Citizens’ Band(CB) rigs. The ATU is useful inthose cases where a wire

antenna is less obtrusive than aroof-mounted ‘vertical’ orground-plane. It is also great for‘improvised’ antennas used by

active CB users on campingsites and the like because itallows a length of wire to beused as a fairly effective antenna

ATU for 27-MHz CB radios

04

51 2

Page 64: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

87Elektor Electronics 12/98

hung between, say, a tree branchat one side and a tent post, atthe other. Obviously, the wireends then have to be isolatedusing, for example, short lengthsof nylon wire. It is even possibleto use the ATU to tune a lengthof barbed wire to 27 MHz.

The coil in the circuit con-sists of 11 turns of silver-platedcopper wire with a diameter ofabout 1 mm (SWG20). Theinternal diameter of the coil is15 mm, and it is stretched to alength of about 4 cm. The tap forthe antenna cable to the CBradio is made at about 2 turnsfrom the cold (ground) side. Twotrimmer capacitors are availablefor tuning the ATU. The smallerone, C1, for fine tuning, and the

larger one, C2, for coarse tuning.The trimmers are adjusted

with the aid of an in-line SWR(standing-wave ratio) meterwhich most CB enthusiasts willhave, or should be able to obtain

on loan. Select channel 20 onthe CB rig and set C1 and C3 tomid-travel. Press the PTT buttonand adjust C2 for the best (thatis, lowest) SWR reading. Next,alternately adjust C3 and C2until you get as close as possibleto a 1:1 SWR reading. C1 maythen be tweaked for an even bet-ter value. No need to re-adjustthe ATU until another antenna isused. In case the length of thewire antenna is exactly 1⁄2 λ(5.5 metres), then C3 is set tomaximum capacitance.

Although the ATU isdesigned for half-wavelength orlonger antennas, it may also beused for physically shorterantennas. For example, ifantenna has a physical length of

only 3 metres, then the remain-ing 2.5 metres has to be woundon a length of PVC tubing. Thiscreates a so-called BLC (base-loaded coil) electrically short-ened antenna. In practice, theadded coil can be made some-what shorter than the theoreticalvalue, so the actual length isbest determined by trial anderror. Finally, the ATU has to bebuilt in an all-metal case to pre-vent unwanted radiation. Thetrimmers are than accessedthrough small holes. The con-nection to the CB radio is bestmade using an SO239 (‘UHF’)or BNC style socket on the ATUbox and a short 50-Ω coax cablewith matching plugs.

(984079-1; LL)

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

K150Ω

L

C1

22p

C2

40p

C3

40p

≥ λ12/

*

zie tekst*see text*siehe Text*voir texte*

984079 - 11

An Analog Devices ApplicationIn dual-supply operation, theoutput (pin 6) of the AD736 is at0 V, that is, halfway between thesupply lines. But in single-sup-ply operation, the output is at1/2 VCC. By adding a single-sup-ply op amp as a differentialamplifier, however, a true ‘O Vout for o V’ single-supply circuitwith a ground-referenced outputas shown in the diagram. Forthis circuit, VRMS = 0 V whenVIN = 0 V, and VRMS = 200 mVd.c. when VIN = 200 mV r.m.s.

In the circuit, a single 9 Vpositive supply powers theAD736. Resistors R7=R8=100 kΩ form a potential divideracross the 9 V battery thatestablishes a local ‘ground’ railat 1/2 VCC, or 4.5 V. TheAD736’s ‘common’ pin, its22 MΩ input bias resistor, andthe inverting input of U2 (via R4and R5) are all connected to thisrail. The quiescent output volt-age of the AD736, which is ref-erenced to its ‘common’ pin, is4.5 V.

A single-supply op amp,IC2, is arranged as a unity-gaindifferential amplifier. Largevalue feedback resistors,R2–R5, are used to minimizeloading of the 4.5 V rail. Theop amp amplifies the differ-ence between local ground at4.5 V and the output of theAD736, which is also at 4.5 Vfor 0 V r.m.s. input. As the

r.m.s. input to the AD736increases from 0 mV to200 mV, the AD736’s outputincreases from 4.5 V to 4.7 V.The output of op amp IC2 isthe difference between theAD736’s output and 4.5 V, or0 mV to 200 mV d.c.

The remainder of the cir-cuit works as follows. TheAD736’s output is a.c. cou-pled; R1 provides a path forthe BiFET op amp’s input bias

current (typically 1 pA) to flow.The offset voltage caused bythe bias current flowingthrough R1 is negligible.

Capacitor C3 between pins1 and 8 of IC1 provides a lowfrequency cutoff of 2 Hz. Othercutoff frequencies, f, can becalculated from

f=1/2πRC

where f is in Hz, R is in ohms,

and C is in farads.Optional capacitor CF, in

parallel with an 8 kΩ feed-back resistor, fixed internallyby IC1, forms a single-polelow-pass filter with a 2 Hz cut-off frequency. The value of CFin farads is given by

CF=1/2πRf

where f is in Hz and R=8 kΩ.[984090]

single-supply operationof the AD7360

46

C

47µ10V

C

10µ

C3

10µ10V

C7

47µ

C4

100n

C5

100n

C6

100n

C8

100n

C1

10n

R1

22M

R3

1M

R7

10

0k

R8

10

0k

R2

1M

R6

1M

R5

82

0k

R4

470k

AD736

IC1

COM– V

+ V

OUTIN

AV

VV

C

C

C

2

3

6

5

4

7

8

1C

F

TLC271

IC2

2

3

6

7

48

1

5

BT1

9V

F

AV

9V

9V

984090 - 11

OFFSETADJUSTMENT

VIN

VRMS

10V

10V

Page 65: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

digital output witho sink/source driver

Design: R. Veltkamp

When it comes to using a PC ora microprocessor system to con-trol 'real -world' loads likelamps, relays, and motors, thereare basically two camps: pro-grammers and hardware spe-cialists. The combined speciesseems to be rare! Anyway, thisarticle is aimed at the lattergroup. The circuit diagramshows a one -channel power dri-ver with an (optional) electri-cally isolated input and a poweroutput capable of sinking as

COMPONENTS LIST

Resistors:R1 = 330QR2,R3 = 47kQR4,R5 = 2kQ2R6,R7 = 1MQ

Capacitor:Cl = 100nF

Semiconductors:D1 = LEDD2,D3 = 1 N4001 (optional,see text)

T1,T2,T4 = BC547BT3 = BC557BT5 = BD902 or BD912 (see

text)T6 = BD901 or BD911 (see

text)IC1 = TIL111 or 4N35 orCNY17-2

Miscellaneous:JP1-JP4 = 2 -pin SIL header

with jumperHeatsinks for T5/T6, asrequired

GND1

0

J P2

2

TIL111

R1

J P1

* see text

well as sourcing current.If galvanic isolation is not

required at the input, omit theoptocoupler and fit the twojumpers. In that case, the cir-cuit is driven by a TTL-compat-ible logic signal. In case theoptocoupler is used, the driver

responds to a current -loop sig-nal with strength of between10 mA and 20 mA.

An LED, D1, is inserted inthe collector line of amplifierstage T2 to provide a visible`channel active' indication. Thesymmetrical sink/source powerdriver consists of a pair of com-plementary BD901/902 Dar-lington transistors with associ-ated current limiting resistor,R8 -R9. Resistor R8 determinesthe maximum source current,and R9, the maximum sink cur-rent. Both currents are calcu-lated from I = 0.65 V/R. Thedriver board itself, by the way,has a current consumption ofjust a few milli -amps.

Diodes D2 and D3 are only

required if inductive loads likerelay coils are controlled, anddifferent Darlington pairs likethe BD911/912 are employed.As opposed to the BD901/902,the BD911/912 complementarypair does not have internal anti -surge diodes across the collec-

tor -emitter path. As a matter ofcourse, the Darlington transis-tors have to be cooled depend-ing on the currents they sink orsource.

Jumpers JP3 and JP4 haveto be fitted if the controlledload(s) are not already con-nected to a supply line. If thejumpers are fitted, then the loadcurrent will be drawn from thedriver board.

This driver is pretty fast: itcan handle switching frequen-cies up to about 3 kHz withoutproblems if the TIL111 opto-coupler is used (as suggested inthe circuit diagram). Higher fre-quencies may undoubtedly beachieved if a faster optocoupleris employed. If you need to con-

JP3V02+

V+0 (5V)

D2

X*1 N4001

41 N4001

D3 GND

0

J P4 GND2

0984011 - 11

trol more channels than just one(say, four), you just build asmany driver boards as you need.Unfortunately, the printed cir-cuit board whose artwork isshown here is not availableready-made from the Publishers.

(984011-1)

A88 Elektor Electronics 12/9888 Elektor Electronics 12/98

Design: R. Veltkamp

When it comes to using a PC ora microprocessor system to con-trol ‘real-world’ loads likelamps, relays, and motors, thereare basically two camps: pro-grammers and hardware spe-cialists. The combined speciesseems to be rare! Anyway, thisarticle is aimed at the lattergroup. The circuit diagramshows a one-channel power dri-ver with an (optional) electri-cally isolated input and a poweroutput capable of sinking as

well as sourcing current.If galvanic isolation is not

required at the input, omit theoptocoupler and fit the twojumpers. In that case, the cir-cuit is driven by a TTL-compat-ible logic signal. In case theoptocoupler is used, the driver

responds to a current-loop sig-nal with strength of between10 mA and 20 mA.

An LED, D1, is inserted inthe collector line of amplifierstage T2 to provide a visible‘channel active’ indication. Thesymmetrical sink/source powerdriver consists of a pair of com-plementary BD901/902 Dar-lington transistors with associ-ated current limiting resistor,R8-R9. Resistor R8 determinesthe maximum source current,and R9, the maximum sink cur-rent. Both currents are calcu-lated from I = 0.65 V/R. Thedriver board itself, by the way,has a current consumption ofjust a few milli-amps.

Diodes D2 and D3 are only

required if inductive loads likerelay coils are controlled, anddifferent Darlington pairs likethe BD911/912 are employed.As opposed to the BD901/902,the BD911/912 complementarypair does not have internal anti-surge diodes across the collec-

tor-emitter path. As a matter ofcourse, the Darlington transis-tors have to be cooled depend-ing on the currents they sink orsource.

Jumpers JP3 and JP4 haveto be fitted if the controlledload(s) are not already con-nected to a supply line. If thejumpers are fitted, then the loadcurrent will be drawn from thedriver board.

This driver is pretty fast: itcan handle switching frequen-cies up to about 3 kHz withoutproblems if the TIL111 opto-coupler is used (as suggested inthe circuit diagram). Higher fre-quencies may undoubtedly beachieved if a faster optocoupleris employed. If you need to con-

trol more channels than just one(say, four), you just build asmany driver boards as you need.Unfortunately, the printed cir-cuit board whose artwork isshown here is not availableready-made from the Publishers.

(984011-1)

digital output withsink/source driver0

47

5

4

1

2

IC16

TIL111

R1

33

R6

1M

R5

2k

2

R4

2k

2

R7

1M

R8

10

Ω

R9

10

Ω

T2

BC

T1

BC

T4

BC

T3

BC

T6

BD901

T5

BD902

D2

1N4001

D3

1N4001

D1

JP1

JP2

JP4

JP3

R2

47

k

R3

47

k

547B 547B 547B

557B

GND1

GND

GND2

V+

V +2

984011 - 11

*

*

see text* siehe Text* zie tekst* voir texte*

(5V)

(C) ELEKTOR

984011-1

C1D1

D2

D3

H1

H2

H3

H4

IC1

IN1

JP1

JP2

JP3

JP4

R1

R2

R3

R4

R5

R6

R7

R8

R9

T1

T2

T3

T4

T5

T6

V2+V+

GN

D1

GND2GND984011-1 (C) ELEKTOR

984011-1

COMPONENTS LIST

Resistors:R1 = 330ΩR2,R3 = 47kΩR4,R5 = 2kΩ2R6,R7 = 1MΩ

Capacitor:C1 = 100nF

Semiconductors:D1 = LEDD2,D3 = 1N4001 (optional,

see text)T1,T2,T4 = BC547BT3 = BC557BT5 = BD902 or BD912 (see

text)T6 = BD901 or BD911 (see

text)IC1 = TIL111 or 4N35 or

CNY17-2

Miscellaneous:JP1-JP4 = 2-pin SIL header

with jumperHeatsinks for T5/T6, as

required

Page 66: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

XILINX®

JTAG Po

I/O

/0K u0K 0

I/0K 0

/0

I/0 K

IAD

10/GCK K

1/01GSR K

1/0/GTS

Bloc

In -System Programming Controller

OK,

18 ne-81 Function

Block 1

BlacnIls

Function Block 2

Macrocells

1 to 18

IIIDOIO 12

#

DATASHEET 12/98

OHN3040U, OHS3040U

SensorsHall-Effect

XC9536

Integrated CircuitsProgrammable Logic DATASHEET 12/98

89E

lektor Electronics

12/98

XC9536In-System Programmable CPLD

ManufacturerXilinx Inc., 2100 Logic Drive, San Jose, CA95124-3400, USA. Tel. (408) 559-7778, fax:408-559-7114. Internet: www.xilinx.com.

UK: Xilinx Ltd., Benchmark House, 203 Brook-lands Rd., Weybridge, Surrey KT13 ORH. Tel.(01932) 349401.

Featureså 5 ns pin-to-pin logic delays on all pinså fCNT to 100 MHzå 36 macrocells with 800 usable gateså Up to 34 user I/O pinså 5 V in-system programmable (ISP)å Endurance of 10,000

program/erase cycleså Program/erase over full commercial

voltage and temperature rangeå Enhanced pin-locking architectureå Flexible 36V18 Function Blockå 90 product terms drive any or all of

18 macrocells within FunctionBlock

å Global and product term clocks,output enables, set and reset sig-nals

å Extensive IEEE Std 1149.1 bound-ary-scan (JTAG) support

å Programmable power reductionmode in each macrocell

å Slew rate control on individual out-puts

å User programmable ground pin

capabilityå Extended pattern security features for design

protectionå High-drive 24 mA outputså 3.3 V or 5 V I/O capabilityå PCI compliant (-5, -6, -7, -10 speed grades)å Advanced CMOS 5V FastFLASH technologyå Supports parallel programming of more than

one XC9500 concurrentlyå Available in 44-pin PLCC, 44-pin VQFP, and

48-pin CSP packages

DescriptionThe XC9536 is a high-performance CPLD pro-viding advanced in-system programming andtest capabilities for general-purpose logic inte-gration. It is comprised of two 36V18 FunctionBlocks, providing 800 usable gates with propa-gation delays of 5 ns.

Application exampleCompact Multiburst Generator, Elektor Electron-ics January 1999.

OHN3040UOHS3040UHallogicTM Hall Effect Sensors

ManufacturerTRW Communications, 1900 Richmond Road,Cleveland, Ohio 44124, USA.

Application ExampleAnemometer, Elektor Electronics December1998.

Featureså Operates over a broad range of supply volt-

ageså Excellent temperature stability to operate in

harsh environmentså Drive capability up to 5 TTL loadså Hall element, linear amplifier, and Schmitt

trigger on a single HallogicTM silicon chip

OHN/S3040U pinout

Functional block diagram

Absolute maximum ratings (TA = 25ºC unless otherwise noted)Supply voltage VCC 25 VStorage temperature range, TS –65 C to +150 ºCOperating temperature range, TA

- OHN3040U –20 ºC to +85 ºC- OHS3040U –55 ºC to +125 ºC

Lead soldering temperature(3.2 mm from case for 5 sec. with soldering iron)(1) 260 ºCOutput ON current, ISINK 25 mAOutput OFF voltage, VOUT VMagnetic flux density, B unlimited(1) heat sink leads during hand soldering

983010 - 13

OHN3040UOHS3040U

983010 - 14

OUTVCC

OHN3040UOHS3040U

1 2 3 983010 - 15

OUTPUT

GROUND

REG.

CC1

3

2

V

Page 67: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

10' Power ManagementPower dissipation can be reduced in the XC9536by configuring macrocells to standard or low-power modes of operation. Unused macrocellsare turned off to minimize power dissipation.Operating current for each design can beapproximated for specific operating conditionsusing the following equation:

ICC (mA) = MCHP (1.7) + MCLP (0.9) + MC(0.006 mA/MHz) f

Where:MCHP = Macrocells in high-performance modeMCLP = Macrocells in low-power modeMC = Total number of macrocells usedf = Clock frequency (MHz)

#

OHN3040U, OHS3040U

SensorsBeaufort Scale

XC9536

Integrated CircuitsProgrammable Logic DATASHEET 11/98DATASHEET 11/98

90E

lekt

or E

lect

roni

cs12

/98

Func

tion

Bloc

k

Mac

roce

ll

Pin

(PC4

4ca

se)

Bsca

nOr

der

Note

s

1 1 2 105

1 2 3 102

1 3 5 99 [1]

1 4 4 96

1 5 6 93 [1]

1 6 8 90

1 7 7 87 [1]

1 8 9 84

1 9 11 81

1 10 12 78

1 11 13 75

1 12 14 72

1 13 18 69

1 14 19 66

1 15 20 63

1 16 22 60

1 17 24 57

1 18 — 54

2 1 1 51

2 2 44 48

2 3 42 45 [1]

2 4 43 42

2 5 40 39 [1]

2 6 39 36 [1]

2 7 38 33

2 8 37 30

2 9 36 27

2 10 35 24

2 11 34 21

2 12 33 18

2 13 29 15

2 14 28 12

2 15 27 9

2 16 26 6

2 17 25 3

2 18 — 0

Pin type Pin (PC44 case only)

I/O/GCK1 5

I/O/GCK2 6

I/O/GCK3 7

I/O/GTS1 42

I/O/GTS2 40

I/O/GSR 39

TCK 17

TDI 15

TDO 30

TMS 16

VCCINT 5 V 21, 41

VCCIO 3.3 V/5 V 32

GND 23, 10, 31

No Connects

XC9536 I/O pins (PC44 case only)

XC9536 Global, JTAG and Power Pins (PC44 case only)

Note: [1] Global control pin

Beaufort scale and correlated wind speeds

DescriptionWind speed

m/s mph knots

calm 0 – 0.2 0 - 1 0 – 1

light air 0.3 – 1.5 1-3 1 – 3

light breeze 1.6 – 3.3 4 – 7 4 – 6

gentle breeze 3.4 – 5.4 8 – 12 7 – 10

moderate breeze 5.5 – 7.9 13 – 18 11 – 16

fresh breeze 8.0 – 10.7 19 – 24 17 – 21

strong breeze 10.8 – 10.7 25 – 31 22 – 27

moderate gale 13.9 – 17.1 32 – 38 28 – 33

fresh gale 17.2 – 20.7 39 – 46 34 – 40

strong gale 20.8 – 24.4 47 – 54 41 – 47

whole gale 24.5 – 28.4 55 – 63 48 – 55

storm 28.5 – 32.6 64 – 75 56 – 65

hurricane > 32.6 > 75 >65

Page 68: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

Let’s start by mentioning that the pre-sent circuit is not a state-of-the-artsuperfast parallel-to-serial converter.However, it may be just the right circuitor sub-circuit if you were looking for asimple and rather clever solution.This article describes how a couple ofcommon-or-garden TTL ICs areemployed to convert parallel datainto serial format, using a hardware-

defined baudrate (speed) of 9600 bitsper second. The transmission format isvery common: 8 databits, 1 stop bitand no parity bit — in practice this set-ting will be fine for all but the mostexotic cases.The circuit diagram of the bidirection-al converter may be found in Figure 1.The heart of the circuit is IC3, a type74LS150. This IC is responsible for the

actual parallel-to-serial conversion.Eight of the 16 inputs of this multiplexerare connected to K2, the parallelinput of the converter. Input E0 of theIC represents the start bit, and E1through E8, the databits. Input E9,finally, is used to generate the stop bit.The inputs of the 74LS150 arescanned by a 74LS160 BCD counter.Every time S1 is pressed, the 74LS160

2 - 12/98 Elektor Electronics EXTRA ——————————————— PC TOPICS

Converting parallel information into serial format is afunction often performed by complex logic or otherdedicated hardware. The approach shown in this arti-cle proves that there is a good alternative based ona handful of discrete parts. The reverse process, serialto parallel conversion, is of similar simplicity.

Design by G. Visschers

K2

K1

1

2

3

4

5

6

7

8

9

74LS150

IC3

MUX

10

14

13

11

15

15

22

2110

20 11

1615

1714

1813

1912

23

7

6

5

8

1

2

3

432

1

0

4

7

6

5

4

G0

0

9

8

9G

W

C5/2,3,4+

CTRDIV10

74HCT160

3CT=9

[ 1 ]

[ 2 ]

[ 8 ]

[ 4 ]

IC2

CT=0

1,5D

10

11

12

13

14

15

M1

M2

G3

G4

9

7

4

5

6

2

3

1

R44

k7

R7

1k

R8

10

k

R5

10

k

R6

10

k

R1

10

k

R2

10

k

CA3130

IC4

2

3

6

7

41

8

5

C7

100n

C8

100n

1

23

IC1a

&

5

64

IC1b

&

12

1311

IC1d

&8

910

IC1c

&

C2

100n

C3

100n

C1

22n

C4

100n

P1

4k7

T1

BC547B

S1

IC1

14

7

IC3

14

7

C6

100n

C5

100nIC2

16

8

IC1 = 4093

982081 - 11

5V

5V

5V

5V

5V

5V

5V

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

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

Page 69: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

counts up from 0 to 9 and so appliesthe associated BCD code to the A-Dinputs of IC3. Because of the actionof capacitor C2, this also happenswhen the supply voltage is firstswitched on. One byte is then con-verted and transmitted.If the circuit is used as a sub-assemblyin a larger unit, components R1, R2,C1 and S1 may be omitted. The inputof IC1a is then connected to the dri-ving circuit.

The operation of the rest of the cir-cuit is should be easy to understandbecause a really simple counter cir-cuit is used. The flip-flop built aroundIC1a and IC1b may be set with S1,and reset by the BCD counter at theend of the serial code transmission.Once the flip-flop is set, the BCDcounter is enabled, and each clockpulse then causes a new bit to beplaced on the serial output line. A sim-ple RC clock generator is built aroundbuffers IC1c and IC1d. It is dimen-sioned such that a bit rate of 9600 persecond is achieved. The exact bit rateis set with the aid of preset P1. Forlower bit rates, capacitor C3 has to be

increased accordingly. For a bit rateof 2400, for example, a 1-µF capacitoris a good choice. In this way, the cir-cuit can be ‘tweaked’ for nearly everybit rate you may want to use — all youhave to do is modify the oscillator asrequired.

RS232, step by step

The only missing element is the lineinterface. For this purpose we call inthe help of a symmetrically poweredCA3130 opamp. This opamp, config-ured as a comparator, converts the TTLsignal received from the multiplexerinto a serial signal which togglesbetween +5 V and –5 V. In this way, westrive to meet the electrical require-ments defined for the RS232 interface.Only one line of the serial interface isactually used: TxD (transmitted data).On the connector, the handshakinglines RTS (request to send) and CTS(clear to send) are interconnected, aswell as the triplet DSR (data set ready),DCD (data carrier detect) and DTR(data terminal ready). In this way, theRS232 port is ‘enabled’, and capable

of serial communication.A simple power supply with +5 V and–5 V outputs is sufficient for this project.The other way around

So far we’ve only discussed the con-version from parallel to serial format.The reverse process, serial to parallel,is also implemented in a very simplemanner.The relevant circuit is shown inFigure 2. Connector K1 is connectedto the serial port on the PC. The con-nector has a number of links to makesure hardware handshaking is dis-abled. By way of inverter IC1a, the ser-ial signal (TxD) arrives at the D (data)input of IC4, a binary counter.IC2a and IC2b together form a SR (set-reset) flip-flop. In conjunction with anoscillator built around IC1d and IC2c,and a counter type 74HCT160, theyact as the heart of the circuit, that is,as far as timing is concerned.When data is received at the serialinput, it is converted to TTL level (R1,IC1a), and then applied to the input ofthe SR bistable. This bistable starts theoscillator whereupon oscillator (clock)

PC TOPICS —————————————— Elektor Electronics EXTRA 3 - 12/98

K1

1

2

3

4

5

6

7

8

9

C5/2,3,4+

CTRDIV10

74HCT160

3CT=9

[ 1 ]

[ 2 ]

[ 8 ]

[ 4 ]

IC3

CT=0

1,5D

10

11

12

13

14

15

M1

M2

G3

G4

9

7

4

5

6

2

3

1

1

23

IC2a

&

5

64

IC2b

&

8

910

IC2c

&

C3

100n

P1

4k7

K2

9 81

IC1d1 21

IC1a

5 61

IC1c

11 101

IC1e

3

4

1

IC1b

C1

10n

C4

10n

R2

1k

R3

47k

C3

1nIC44094SRG8

EN3

C1/

15

11

12

13

14

C2

1D 2D

10

3

2

1

7

6

5

43

9

R4

4k7

R1

22k

C4

100nIC1

14

7

IC3

16

8

C6

100n

C5

100nIC2

14

7

5V

IC2 = 4093IC1 = 74HCT14

IC4

16

8

C6

100n

982081 - 12

12 13

11 IC2d

&

13

12

1

IC1f

5V

5V

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

Page 70: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

pulses are transmitted to the clockinput of the counter (IC3) and the shiftregister (IC4). Eventually, the shift regis-ter shifts out the bits one by one.One the oscillator has produced nineclock pulses, the SR flip-flop is resetagain via the signal at the RCO outputof IC3 (which is inverted by IC1c). TheRC network consisting of R2 and C1lengthens the last pulse. If that was notdone, there would be a fair chance ofthe shift register missing the last pulse,mainly because IC4 (a CMOS IC) isconsiderably slower than IC3 (a HCTIC). The RC network consisting of C3

and R4 supplies the strobe pulse whichenables data to be read into the out-put register of IC4. This signal is sup-plied by the RC0 output on IC3. Datawill remain present on the output untilthe next strobe pulse appears. Aperipheral device connected to theparallel port is furnished with a strobepulse via R3 and C4.When properly dimensioned the circuitis suitable for serial signals travelling ata rate of 9600 bits per second. Byincreasing C2 to 470 nF, the bit ratemay be dropped to 2400. Preset P1allows the bit rate to be accurately

adjusted. Unfortunately, adjusting theclock oscillator is not as easy as wewould like it to be. The problem is thatthe oscillator is only active when serialdata is being received. For the purposeof aligning the circuit, this ‘problem’may be solved by temporarily con-necting pin 8 of IC2c to the +5 V line(i.e., temporarily break the link betweenpin 3 of IC2a and pin 8 of IC2c). Next,the clock frequency may be measuredat pin 8 of IC1d (2400 Hz for 2400 bits/s,or 9600 Hz for 9600 bits/s).

(982081-1)

4 - 12/98 Elektor Electronics EXTRA ——————————————— PC TOPICS

Now hear this

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

mode com2:9600,n,8,1

Next, a simple program may be employed to read data. The fol-lowing QBASIC program shows the way

start:IF INP(&H2FD)>96 THEN PRINT INP(&H2F8)GOTO start:

In this example, 2F8H is the address of the COM port, and 2FDHthat of the status register which may be read to see if there is newdata. If another COM port is used, then these addresses have tobe changed accordingly.

The serial to parallel converter is also simple to test. The programprinted below continually sends the number sequence 00 through25r to the parallel port:

FOR X = 0 TO 255OUT &H2F8,XFOR Y = 1 TO 1000: NEXT YNEXT X

The line

FOR Y = 1 TO 1000: NEXT Y

has been added to slow down the resulting datastream if a fastcomputer is being used. Thanks to this setting, you can even seethat a new value is transmitted on every loop iteration.Both programs make use of communications port COM2. If youwant to use another COM port, then the port address has to bemodified accordingly.

Page 71: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

PC TOPICS —————————————— Elektor Electronics EXTRA 5 - 12/98

Even in this day and age of integratedmicroelectronics, a transistorised cir-cuit built from discrete part has a rightof existence. The preamplifierdescribed in this short article goes toshow that it will be some time beforediscrete transistors are part of the sili-con heritage. The preamplifier is suit-able for use with a soundcard or themicrophone input of a modem.As you will probably know, most sound-cards have input sockets for signals atline level (stereo), as well as one for a(mono) electret microphone. For theapplications we have in mind, connect-ing-up an inductive pick-up element ora dynamic microphone, both inputs arein principle suitable, provided thesource signal is amplified as required.The author eventually chose the micro-phone input on the soundcard. Firstly,because the line inputs are usuallyoccupied, and secondly, because the

bias voltage supplied by the micro-phone input eliminates a separatepower supply for the preamplifier.The microphone input of a soundcardwill typically consist of a 3.5-mm jacksocket in stereo version, although onlyone channel is available. The freecontact is used by the soundcard tosupply a bias voltage to the monoelectret microphone. This voltage isaccepted with thanks by the presentpreamplifier, and conveniently obvi-ates an external (mains adaptor)power supply.

A classic design

In true transistor-design fashion, thepreamplifier consists of three stages.Capacitor C1 decouples the signalreceived from the microphone or pick-up element, and feeds it to the input ofthe first stage, a transistor in emitter

configuration, biased to provide a cur-rent amplification of about 300 times.Together with the source impedanceof the microphone or pick-up element,capacitors C2 and C3 form a low-passfilter which lightly reduces the band-width. In addition, the output low-pass,R2-C3, reduces the dynamic collectorresistance at higher frequencies. In thisway, the filter reduces the gain in thehigher part of the frequency spectrumand so helps to eliminate any oscilla-tion tendencies.The first, high-gain, stage is terminat-ed by T2. Unlike T1, this transistor doesnot add to the overall gain, becausethe output signal is taken from theemitter (common-collector circuit). T2thus acts as an impedance converter,with C4 reducing any tendency tooscillation.The output stage around T3 is a com-mon-emitter circuit again. In it, presetP1 determines the voltage amplifica-tion. T3 is biased by means of a direct-current feedback circuit based oncomponents R7 and C5. To this isadded an ‘overruling’ dc feedbackpath back to the input transistor, viaR6. This measure guarantees good dcstability in the preamplifier.

The circuit is small enough to be builton a piece of veroboard or stripboard,and yet remain reasonably compact.To prevent interference from externalsources, the completed board shouldbe mounted in a properly screened(metal) enclosure, with the connec-tions to the input source and the soundcard made in screened cable.The preamplifier provides a frequency-linear response. In case the source sig-nal is marked by frequency correction(e.g., RIAA), then a matching lineariza-tion circuit should be used if the rele-vant signals are used by the computer.

(982092-1)

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

Design by M. Wenzel

K1

K2

T1

BC

T2

BC T3

BC

C1

1µ16V

R6

33k

R1

47

k

R3

22

Ω

R2

22

k

R4

47

R5

10

k

R7

2k

2

R8

10

k

10k

P1

C2

120p

C4

270p

C6

1n

C3

56p

C5

10µ16V

C7

10µ16V

549B

548B

548B

982092 - 11

preamplifier for soundcardfor inductive pick-up elements and dynamic microphones

Figure 1. Circuit diagram of the preamplifier for PC soundcards.

Page 72: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

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

By our ooitoricaI stcAff

intercastfree Internet pages via TV signals

HZDF il Intel Intercast Viewer liView Edit Browser IV Help

LOCATION

ANZEIGE

CIProgram Flles/IntereastIDATABASEldownload/ZDFINews/131090,±1

comslirect

ZDF. MSNBC - Prom-Splitter von &#0147:Leute heute&110149:

g ZDF MSNBC TVAkluellZDF. MSNBC Politik Titelseite

ZDF. MSNBC Wirtschalt

ZDF. MSNBC Sport Titelseite

g ZDF. MSNBC Computer Titelseite

g ZDF. MSNBC Magazin Titelseite

1=1IHR -BROKER -

Dberblick

Politik

Iffirtscitaft

Mapain

Computer

Sport

Wetter

Arckiv

Service.

Hilfe

Effenberg and Illgner in die USA?FuBball-Profishaben angeblich"Green Card"beantragt

Bodo IlIgner. StefanEffenberg

mlfFigure 1 . In the top left-hand corner, the Intercast Viewer shows the TV picture. This isflanked by an overview of received Intercast pages. The lower part of the Windowshows the selected page.

Functionally, the TV set and the PCseem to be in a merging process.Using special Internet set -top boxes it ispossible to surf the Net using a TV set,

while the computer is being trans-formed into a TV set by the addition ofa TV tuner insertion card.

Traditionally, information suppliers

('broadcasters') have been busydeveloping several methods toenable extra information to be con-veyed via existing communicationchannels. As far as our regular TVchannels are concerned, most of usare used to having Teletext, a facilitythat allows broadcasters to transmitlots of (text) information that reaches usby way of a couple of (normally invisi-ble) TV lines in the vertical blankinginterval.Recently, a number software andhardware manufacturers came upwith a method of information supplywhich is more up to date than theTeletext system. Using a number of TVlines in the vertical blanking interval,data is transmitted that allows HTMLpages to be built in a suitable receiv-er. In this way, an Internet -like display iscreated. The advantage of these sys-tems is that anyone with a TV antennaor a cable -TV connection is in a posi-tion to receive these signals, and thatthe service is normally free of charge.Note, however, that this is basically'one-way' traffic. For a 'real' Internetlink, 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 recentdevelopments. The inherent disadvan-tage is, therefore, that the transmittedinformation is always the same, i.e., it

can not be adapted to reflect therequirements of individual users.In spite of this handicap, there seemsto be a lot of interest in broadcastingInternet -like pages by way of regularTV channels. After all, you only have to

6 - 12/98 Elektor Electronics EXTRA TOP/CS

(‘broadcasters’) have been busydeveloping several methods toenable extra information to be con-veyed via existing communicationchannels. As far as our regular TVchannels are concerned, most of usare used to having Teletext, a facilitythat allows broadcasters to transmitlots of (text) information that reaches usby way of a couple of (normally invisi-ble) TV lines in the vertical blankinginterval.Recently, a number software andhardware manufacturers came upwith a method of information supplywhich is more up to date than theTeletext system. Using a number of TVlines in the vertical blanking interval,data is transmitted that allows HTMLpages to be built in a suitable receiv-er. In this way, an Internet-like display iscreated. The advantage of these sys-tems is that anyone with a TV antennaor a cable-TV connection is in a posi-tion to receive these signals, and thatthe service is normally free of charge.Note, however, that this is basically‘one-way’ traffic. For a ‘real’ Internetlink, 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 recentdevelopments. The inherent disadvan-tage is, therefore, that the transmittedinformation is always the same, i.e., itcan not be adapted to reflect therequirements of individual users.In spite of this handicap, there seemsto be a lot of interest in broadcastingInternet-like pages by way of regularTV channels. After all, you only have to

6 - 12/98 Elektor Electronics EXTRA ——————————————— PC TOPICS

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

By our editorial staff

Intercastfree Internet pages via TV signals

Figure 1. In the top left-hand corner, the Intercast Viewer shows the TV picture. This isflanked by an overview of received Intercast pages. The lower part of the Windowshows the selected page.

Functionally, the TV set and the PCseem to be in a merging process.Using special Internet set-top boxes it ispossible to surf the Net using a TV set,

while the computer is being trans-formed into a TV set by the addition ofa TV tuner insertion card.

Traditionally, information suppliers

Page 73: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

switch on your PC, start the right pro-gram, and the information is deliveredto your hard disk, automatically andfree of charge. After some time, youcan browse around for informationyou find useful. Meanwhile, two differ-ent systems have emerged that seemto have a fair chance of survival:Intercast (developed by Intel) andWaveTop (from US based WavePhore).The latter system seems to be used inthe USA only, and will not be discussedin detail here.Intercast technology goes back to1995, and NBC, CNN and MTV havebeen transmitting Intercast pages forquite some time. In Europe, theGerman broadcaster ZDF started toput Intercast transmissions on the air in1997. This initiative was followed by aanother German TV station, DSF, in

August 1998. If and when other broad-casters jump the bandwagon remainsto be seen.

How does Intercast work?

The name 'Intercast' is a contraction ofthe words 'Internet' and 'broadcast',and so indicates the 'merging' of TVpictures and Internet pages. At thetransmitter side, the HTML pages to bebroadcast are first built and thenadded to the TV signal. The HTML infor-mation is conveyed in a number offree lines in the vertical blanking,which in the PAL TV system lasts22.5 lines. Although up to 10 of theseTV lines may be reserved for Intercast,the actual number will depend on anyservices which already be available indifferent countries (Teletext, VIT lines,etc.) Each line in the vertical -blankingperiod allows up to 10 kbits of data tobe transmitted. A (maximum) capacityof 10 lines therefore allows a data rateof up to 100 kbits/s to be achieved.At the receiver side, we require a PCand TV tuner card which is compatiblewith the Intel Intercast program, forexample, a card from Hauppage orMiro (Pinnacle). After starting the pro-gram you are presented with a three-part window (Figure 1). In the top left-hand corner you see the TV picture,flanked to the right by an overview ofreceived pages. Below these two sub -windows is an area showing a pageselected from the overview, or the cur-rently received page.The user creates a cache of, say,25 Mbytes on the hard disk to enableall received data to be stored. As longas the computer is switched on withthe Intercast program running, a con-tinuous flow of data will be receivedand stored. Important pages, for

j I ntercast[tm) Viewer Diagnostics PICIEI

112,610fr;1**4...;Min.. , -

9 ._-2-f...-1;

1,...1:1

aw. -.- ....-,-r'h -. ...'-.0.-

---- -±.-4-7' .7 .- ee mo

-giF .m

-I M--....

or

r .1J+111.,almollni

Intercast Content 1IMP-M

Line8 11111111111Line9 11111111111

s,=...Pa,...

,-..-. ,....1 t` . iii .:_a0 _iiie-ill

10

Data 5ErrorRate

0

Line lb

iiiiiiiiiiiiiiki

0 1 2 3 4 5 6 7 8 9 1

Time

Figure 2. This utility program that comes with the Viewer may be used to gauge thereception quality of the Intercast service.

example, news headlines, are updat-ed at regular intervals, so that it is notnecessary to leave the PC switched onall day to 'catch' a certain page.Special overviews are transmittedshowing transmission schedules forspecific subjects.The received HTML pages allow hyper -links to be entered that point the wayto Internet sires. If the user clicks onone of these hyperlinks, the internetbrowser is automatically launched,and a connection to the Internet is

established. Currently, this works withMicrosoft Internet Explorer only.Windows 98 comes with a modulecalled WebTV, which has to beinstalled before you can receiveIntercast. But that's not all, becauseyou also have to install (manually!) theprogram iit22020.exe which may befound in the folder drivers/webtv/interest on the Windows 98 CD-ROM. It

should be noted, however, that thisversion is not suitable for PAL TV signals.When we write this, version 2.0 ofIntercast has just been released byIntel, and it is available for download-ing from www.intercast.de. This versionis suitable for Windows 95 as well asWindows 98 (older versions are onlycompatible with Windows 95).

WaveTop

In the US of A, WaveTop pages arebeing broadcast by a large number ofTV stations. WaveTop resemblesIntercast in that vertical blanking linesare employed to convey data. Theessential difference between the twosystems is that Intercast supplies infor-mation to go with the programs of aspecific transmitter. Consequently, thebroadcaster determines which sub-jects appear on the Intercast pages.

Intercast on the InternetIf you are interested in Intercast and would like to know more about this interesting tech-nology, there a number of excellent sources of information available on the Internet.Although there is an official organization involved in Intercast, co-ordinating the activitiesof all companies with an interest in the technology, the relevant web site, www.inter-cast.org, has little of interest to us.An extensive story on Intercast may be found at www.fhrcht-ryogt/intercst. Well worthhaving a look at!If you are after information about compatible TV cards, we suggest stopping by at Haup-page (www.hauppage.com, www.hauppage.co.uk and www.hauppage.de) and Miro(www.pinnaclesys. corn and www.pinnaclesys. de).For further information on Intercast broadcasts in Europe, consult the German ZDF webite at www.zdfde/programmfintercast/index.html.

PC Topics Elektor Electronics EXTRA 7 - 12/98

switch on your PC, start the right pro-gram, and the information is deliveredto your hard disk, automatically andfree of charge. After some time, youcan browse around for informationyou find useful. Meanwhile, two differ-ent systems have emerged that seemto have a fair chance of survival:Intercast (developed by Intel) andWaveTop (from US based WavePhore).The latter system seems to be used inthe USA only, and will not be discussedin detail here.Intercast technology goes back to1995, and NBC, CNN and MTV havebeen transmitting Intercast pages forquite some time. In Europe, theGerman broadcaster ZDF started toput Intercast transmissions on the air in1997. This initiative was followed by aanother German TV station, DSF, inAugust 1998. If and when other broad-casters jump the bandwagon remainsto be seen.

How does Intercast work?

The name ‘Intercast’ is a contraction ofthe words ‘Internet’ and ‘broadcast’,and so indicates the ‘merging’ of TVpictures and Internet pages. At thetransmitter side, the HTML pages to bebroadcast are first built and thenadded to the TV signal. The HTML infor-mation is conveyed in a number offree lines in the vertical blanking,which in the PAL TV system lasts22.5 lines. Although up to 10 of theseTV lines may be reserved for Intercast,the actual number will depend on anyservices which already be available indifferent countries (Teletext, VIT lines,etc.) Each line in the vertical-blankingperiod allows up to 10 kbits of data tobe transmitted. A (maximum) capacityof 10 lines therefore allows a data rateof up to 100 kbits/s to be achieved.At the receiver side, we require a PCand TV tuner card which is compatiblewith the Intel Intercast program, forexample, a card from Hauppage orMiro (Pinnacle). After starting the pro-gram you are presented with a three-part window (Figure 1). In the top left-hand corner you see the TV picture,flanked to the right by an overview ofreceived pages. Below these two sub-windows is an area showing a pageselected from the overview, or the cur-rently received page.The user creates a cache of, say,25 Mbytes on the hard disk to enableall received data to be stored. As longas the computer is switched on withthe Intercast program running, a con-tinuous flow of data will be receivedand stored. Important pages, for

example, news headlines, are updat-ed at regular intervals, so that it is notnecessary to leave the PC switched onall day to ‘catch’ a certain page.Special overviews are transmittedshowing transmission schedules forspecific subjects.The received HTML pages allow hyper-links to be entered that point the wayto Internet sires. If the user clicks onone of these hyperlinks, the internetbrowser is automatically launched,and a connection to the Internet isestablished. Currently, this works withMicrosoft Internet Explorer only.Windows 98 comes with a modulecalled WebTV, which has to beinstalled before you can receiveIntercast. But that’s not all, becauseyou also have to install (manually!) theprogram iit22020.exe which may befound in the folder drivers/webtv/intercst on the Windows 98 CD-ROM. It

should be noted, however, that thisversion is not suitable for PAL TV signals.When we write this, version 2.0 ofIntercast has just been released byIntel, and it is available for download-ing from www.intercast.de. This versionis suitable for Windows 95 as well asWindows 98 (older versions are onlycompatible with Windows 95).

WaveTop

In the US of A, WaveTop pages arebeing broadcast by a large number ofTV stations. WaveTop resemblesIntercast in that vertical blanking linesare employed to convey data. Theessential difference between the twosystems is that Intercast supplies infor-mation to go with the programs of aspecific transmitter. Consequently, thebroadcaster determines which sub-jects appear on the Intercast pages.

PC TOPICS —————————————— Elektor Electronics EXTRA 7 - 12/98

Figure 2. This utility program that comes with the Viewer may be used to gauge thereception quality of the Intercast service.

Intercast on the InternetIf you are interested in Intercast and would like to know more about this interesting tech-nology, there a number of excellent sources of information available on the Internet.Although there is an official organization involved in Intercast, co-ordinating the activitiesof all companies with an interest in the technology, the relevant web site, www.inter-cast.org, has little of interest to us.An extensive story on Intercast may be found at www.fhr.ch/~rvogt/intercst. Well worthhaving a look at!If you are after information about compatible TV cards, we suggest stopping by at Haup-page (www.hauppage.com, www.hauppage.co.uk and www.hauppage.de) and Miro(www.pinnaclesys.com and www.pinnaclesys.de).For further information on Intercast broadcasts in Europe, consult the German ZDF website at www.zdf.de/programm/intercast/index.html.

Page 74: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

By contrast, WaveTop supplies a spe-cific programme (divided in topicssuch as news and sports) which is setup centrally. In this system, every TVstation supplies the same pages.Windows 98 comes with a WaveTopviewer which may be installed as acomponent of WebTV. In spite of this,we doubt if this system will ever make itto general acceptance in Europe.

Other systems

Traditionally, Germany has been theleader in the development of othertechnologies that enable data to betransmitted along with TV signals. Wayback in 1986, the WDR Computer Clubcame up with their 'Videodat'decoder, and the system has been inuse ever since for the free software -over -air service linked with the relevantTV programme.Deutsche Telekom have also teamedup with Dresden's Technical Universityfor the development of BroadcastOnline TV. As opposed to WebTop andIntercast, this system employs the hori-zontal blanking interval (sync pulse,front and rear porch) to convey data.A major disadvantage, however, is that

Intel Intercast Viewer

I 25

88CD

AatellitCAPRDOWI9iNTERG-If0ataNaseidownloadikTVMTV/2/alams4h

On The IViepa irrke Firm

Rage Against the Machine Page e

Rage Against the Machine Page Two

Rage Aoa-wst the Machie Page TNeeMaritalAlanis3

Alards5

And suddenly,there were dreadlocks.

In the video for "You Learn,"Alanis wore the look

more commonly seen onreggae musicians, Rastafarians,

and singers in Soul Asylum.And then,

just as suddenly as the dreadshad come into our lives,

they vanished.

Download CorWele I Done

Figure 3. MTV also broadcasts Intercast data in the US; alas, not yet in Europe.

a special receiver card is needed.For the time being, we will have to makedo with what's available on a largerscale, and in Europe that means

Intercast. If you can pick up anIntercast-savvy TV station, and you havea TV card in your PC, do give it a try.

(982091-1)

8 - 12/98 Elektor Electronics EXTRA PC Topics

By contrast, WaveTop supplies a spe-cific programme (divided in topicssuch as news and sports) which is setup centrally. In this system, every TVstation supplies the same pages.Windows 98 comes with a WaveTopviewer which may be installed as acomponent of WebTV. In spite of this,we doubt if this system will ever make itto general acceptance in Europe.

Other systems

Traditionally, Germany has been theleader in the development of othertechnologies that enable data to betransmitted along with TV signals. Wayback in 1986, the WDR Computer Clubcame up with their ‘Videodat’decoder, and the system has been inuse ever since for the free software-over-air service linked with the relevantTV programme.Deutsche Telekom have also teamedup with Dresden’s Technical Universityfor the development of BroadcastOnline TV. As opposed to WebTop andIntercast, this system employs the hori-zontal blanking interval (sync pulse,front and rear porch) to convey data.A major disadvantage, however, is that

a special receiver card is needed.For the time being, we will have to makedo with what’s available on a largerscale, and in Europe that means

Intercast. If you can pick up anIntercast-savvy TV station, and you havea TV card in your PC, do give it a try.

(982091-1)

8 - 12/98 Elektor Electronics EXTRA ——————————————— PC TOPICS

Figure 3. MTV also broadcasts Intercast data in the US; alas, not yet in Europe.

Page 75: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

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

PC -on -a -chipZF Microsystems present an integrated solution

Anyone who has ever looked insidean PC must have come to the con-clusion that the machine consists of anumber of integrated circuits (or'chips'), insertion cards, a power sup-ply and cable bundles. The inherentdisadvantage of using so many sep-arate components is that they haveto be linked by connectors!In the common -or -garden variety PCinstalled in our homes and offices, thescrew links used to secure individualcomponents can be relied upon toprovide the necessary mechanicalstability for quite some time. This is instark contrast with a PC used at theheart of an embedded control system,mainly because of the much stricterrequirements in respect of mechanicalloading. If control systems are fittedinside machines, mechanical reliabili-ty becomes a major issue, requiring atotally different structure of the PC andthe interfaces connected to it.The OEMmodule486 (OEM = originalequipment manufacturer) from the UScompany ZF Microsystems has been

specially developed for ruggedembedded -control applications. Theheart of a PC has been integrated intoa single functional module (SCC,Single Component Computer) suitablefor surface -mount assembly. To beable to connect the SCC to standardPC extension cards, the system pro-vides support for the ISA bus, thussecuring a direct link to the reliableand widely used PC/104 interface. Thisinterface combines the versatility ofthe ISA bus with a compact and reli-able connection system which is alsosuitable for stacking interfaces.

A closer look at the SCC

The single -chip computer developedby ZF Microsystems is designed aroundan 80486SX CPU clocked at 100 MHzto which is added the full complementof I/O functions PC users would expectto get.Because the entire system is compati-ble with the PC/AT Industry StandardArchitecture (ISA), it integrates the fol-

lowing functions: a DRAM controller, anISA bus interface, a keyboard inter-face, two serial ports and one parallelport, a connection for a floppy diskdrive and an EIDE interface for twodevices, for example, a hard disk anda CD-ROM drive. Apart from thesefunctions, the CSS also contains an ATcompatible BIOS ROM, and a ROM inwhich Caldera's embedded DR -DOS isstored. The standard DRAM memoryhas a size of 2 Mbytes. The system maybe extended with external RAM up to asize of 64 Mbytes using standard 3.3-VEDO RAM (70 ns).With the chip powered up and a dis-play interface connected, your PCmonitor will show the DOS prompt. Inaddition to the standard system soft-ware, the flash memory has sufficientroom for the storage of system -specif-ic routines. Standard DOS softwaremay be used without problems in thisenvironment.Interestingly, purchasing anOEMModule486 means that you auto-matically get a free licence for the useof the DOS and the BIOS. Traditionally,these two components represent amajor investment when it comes todeveloping an embedded control sys-tem.The circuit is suitable for use with a sin-gle 5-V supply, and consumes about2.5 watts of power at a clock frequen-cy of 100 MHz. The complete circuitmeasures approximately 56 x 76 x 12mm, and has 240 connectionsarranged at a pitch of 0.04 inch.

(982094-1)

For further information, contact:

ZF Microsystems, 1052 Elwell Court,

Palo Alto, CA 94303 USA:

toll -free: 800-683-5943;tel.: 650-965-3800; fax: 650-965-4050; e-mail: [email protected];Internet: www.zfmicro.com.

PC Topics Elektor Electronics EXTRA 9 - 12/98PC TOPICS —————————————— Elektor Electronics EXTRA 9 - 12/98

Anyone who has ever looked insidean PC must have come to the con-clusion that the machine consists of anumber of integrated circuits (or‘chips’), insertion cards, a power sup-ply and cable bundles. The inherentdisadvantage of using so many sep-arate components is that they haveto be linked by connectors!In the common-or-garden variety PCinstalled in our homes and offices, thescrew links used to secure individualcomponents can be relied upon toprovide the necessary mechanicalstability for quite some time. This is instark contrast with a PC used at theheart of an embedded control system,mainly because of the much stricterrequirements in respect of mechanicalloading. If control systems are fittedinside machines, mechanical reliabili-ty becomes a major issue, requiring atotally different structure of the PC andthe interfaces connected to it.The OEMmodule486 (OEM = originalequipment manufacturer) from the UScompany ZF Microsystems has been

specially developed for ruggedembedded-control applications. Theheart of a PC has been integrated intoa single functional module (SCC,Single Component Computer) suitablefor surface-mount assembly. To beable to connect the SCC to standardPC extension cards, the system pro-vides support for the ISA bus, thussecuring a direct link to the reliableand widely used PC/104 interface. Thisinterface combines the versatility ofthe ISA bus with a compact and reli-able connection system which is alsosuitable for stacking interfaces.

A closer look at the SCC

The single-chip computer developedby ZF Microsystems is designed aroundan 80486SX CPU clocked at 100 MHzto which is added the full complementof I/O functions PC users would expectto get.Because the entire system is compati-ble with the PC/AT Industry StandardArchitecture (ISA), it integrates the fol-

lowing functions: a DRAM controller, anISA bus interface, a keyboard inter-face, two serial ports and one parallelport, a connection for a floppy diskdrive and an EIDE interface for twodevices, for example, a hard disk anda CD-ROM drive. Apart from thesefunctions, the CSS also contains an ATcompatible BIOS ROM, and a ROM inwhich Caldera’s embedded DR-DOS isstored. The standard DRAM memoryhas a size of 2 Mbytes. The system maybe extended with external RAM up to asize of 64 Mbytes using standard 3.3-VEDO RAM (70 ns).With the chip powered up and a dis-play interface connected, your PCmonitor will show the DOS prompt. Inaddition to the standard system soft-ware, the flash memory has sufficientroom for the storage of system-specif-ic routines. Standard DOS softwaremay be used without problems in thisenvironment.Interestingly, purchasing anOEMModule486 means that you auto-matically get a free licence for the useof the DOS and the BIOS. Traditionally,these two components represent amajor investment when it comes todeveloping an embedded control sys-tem.The circuit is suitable for use with a sin-gle 5-V supply, and consumes about2.5 watts of power at a clock frequen-cy of 100 MHz. The complete circuitmeasures approximately 56 x 76 x 12mm, and has 240 connectionsarranged at a pitch of 0.04 inch.

(982094-1)

For further information, contact:ZF Microsystems, 1052 Elwell Court,Palo Alto, CA 94303 USA:toll-free: 800-683-5943;tel.: 650-965-3800; fax: 650-965-4050; e-mail: [email protected];Internet: www.zfmicro.com.

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

PC-on-a-chipZF Microsystems present an integrated solution

Page 76: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

With the introduction and general proliferation of theSoundblaster card and its derivatives, almost any PC can bebeefed up with a number of new multimedia functions. Whilesome 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 peripheralequipment. 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 availablemay then be hooked up in a simple manner.

n ay L. T 1r T 1Ens

joystick and MIDI interfacefor Soundblaster cardsexpand those soundcard connections!

A few years ago, the PC achieved adecent sound option thanks to theSoundblaster expansion card. In addi-tion to the requisite analogue inputsand outputs, this card also came withconnections for a joystick and MIDIequipment. Once other manufacturersof soundcards started to use this con-figuration as an example, theSoundblaster soon became the defacto standard.Once a soundcard has been fittedinto a PC, a synthesizer function and asound -sampler become available.Furthermore, the card contains alllogic to connect two joysticks, while acomplete MIDI interface is also sup-plied as a standard.Users of a rather simple soundcard willusually not be satisfied with thecapacity of the built-in FM synthesizer.A real wavetable synthesizer as avail-able on up-market soundcards, pro-duces much more natural sounds. Anexternal 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 ashardware is concerned, most sound -cards meet this requirement - onlythe interface is not equipped with thestandardised MIDI connection and

10 - 12/98 Elektor Electronics EXTRA TOP/CS

A few years ago, the PC achieved adecent sound option thanks to theSoundblaster expansion card. In addi-tion to the requisite analogue inputsand outputs, this card also came withconnections for a joystick and MIDIequipment. Once other manufacturersof soundcards started to use this con-figuration as an example, theSoundblaster soon became the defacto standard.Once a soundcard has been fittedinto a PC, a synthesizer function and asound-sampler become available.Furthermore, the card contains alllogic to connect two joysticks, while acomplete MIDI interface is also sup-plied as a standard.Users of a rather simple soundcard willusually not be satisfied with thecapacity of the built-in FM synthesizer.A real wavetable synthesizer as avail-able on up-market soundcards, pro-duces much more natural sounds. Anexternal 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 ashardware is concerned, most sound-cards meet this requirement — onlythe interface is not equipped with thestandardised MIDI connection and

10 - 12/98 Elektor Electronics EXTRA —————————————— PC TOPICS

With the introduction and general proliferation of theSoundblaster card and its derivatives, almost any PC can bebeefed up with a number of new multimedia functions. Whilesome 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 peripheralequipment. 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 availablemay then be hooked up in a simple manner.

Design by L. Lemmens

joystick and MIDI interfacefor Soundblaster cardsexpand those soundcard connections!

Page 77: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

associated signal levels. That’s why it isnot possible to directly connect a key-board or other MIDI hardware. Ergo, aspecial converter cable has to bemade, complete with signal leveladaptors. This solution is not only awk-ward, it also creates new problemsbecause the MIDI signals are found onthe joystick connection, and the plugyou want to use will obviously precludethe connection of the joysticks!Fortunately, this little problem is easy toeliminate using some creativity and asmall circuit.

Transistors and gates

The circuit diagram of the joystick/MIDIinterface is shown in Figure 1. Asalready mentioned, the main functionof the interface is to convert alreadyavailable connections and signal lev-els into standard connections andmatching levels.This level conversion is relevant to the

MIDI signal. With a standard MIDI inter-face, use is made of current loops.Consequently, the transmitter side hasa current source, and the receiverside, an optocoupler. On the sound-card, however, the MIDI signals areonly available at TLL level.Looking at the connectors typicallyfound on MIDI equipment, a MIDI inputis usually complemented by two MIDIoutputs and a MIDI ‘thru’ connection.All four connections make use of 5-pinDIN plugs. The two MIDI outputs supplyidentical signals, while the MIDI-thruconnections supply a copy of the sig-nal applied to the MIDI-in socket.The soundcard only supplies electricalsignals for one MIDI output and oneMIDI input. The standard circuitdescribed here ensures that all fourpreviously mentioned connectionsbecome available, based on thesetwo signals only. The circuit diagramclearly shows that this is by no meansa formidable task. The entire circuit is

built around inverters from the74HCT14 integrated circuit. Theseinverters have a TTL compatible inputand a TTL output which is turned into acurrent source with the aid of a coupleof resistors.Using gate IC1d the MIDI output fromthe computer is converted and used,among others, to make LED D3 light.When this indicator lights, MIDI signalsare being transmitted.Although buffers IC1b and IC1c areconnected in parallel, each of themdrives its own output. The two 220-Ωresistors are found in any MIDI inter-face, and so turn the TTL output into acurrent source.The MIDI input is a traditional configu-ration based on an optocoupler.Resistor R10 and diode D1 protect theoptocoupler against reverse and/orexcessive input voltages. The resistorlimits the current through the optocou-pler. Received MIDI signals cause LEDD2 to light.

PC TOPICS —————————————— Elektor Electronics EXTRA 11 - 12/98

K7

10

11

12

13

14

15

1

2

3

4

5

6

7

8

9

K5

10

11

12

13

14

15

1

2

3

4

5

6

7

8

9

K6

10

11

12

13

14

15

1

2

3

4

5

6

7

8

9

C3

10µ 25V

C2

10µ 25V

2

3

1

5

4

K4R10

220Ω

R7

220Ω

R6

220Ω

2

3

1

5

4

K1

D1

1N4148

CNY17-2

IC25

4

1

2

6

R9

4k7

D2

R8

10

13 121

IC1f11

10

1

IC1e

1 21

IC1a

5V

R2

220Ω

R1

220Ω

2

3

1

5

4

K3

5V

R4

220Ω

R3

220Ω

2

3

1

5

4

K2

5V

5 61

IC1c

3 41

IC1b

D3

R5

10

9

8

1

IC1d

IC1

14

7

C1

100n

C4

10µ25V

IC1 = 74HCT14

982090-11

5V

5V

5V5V

MID

I OU

T

MIDI IN

OUT 1

OUT 2

IN

THRU

5V

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.

Page 78: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

0o °

P

EioDiala (a)L -060Z86

10::/0

croo-o o (k-o 0-"c? (Le creO Q oo Q oo p oo o o00 00 00 001

o o0 0 0 0 0 0

COMPONENTS LIST

Resistors:R1-R4,R6,R7,R10 = 220Q

R5,R8 = 2k527R9

= 4k527

Capacitors:Cl = 100nFC2,C3,C4 = 10µF 25V

Semiconductors:D1 = 1N4148D2,D3 = LEDIC1 = 74HCT14IC2 = CNY17-2

Miscellaneous:K1 -K4 = 5 -way DIN -socket, PCB -mountK5,K6 = 15 -way sub -D socket (female),angled, PCB -mountK7 = 15 -way sub -D plug (male), PCB -mountCase: 120x64x4Omm, e.g., Bopla typeE430.PCB, order code 982090-1, see ReadersServices page.

Figure 2. Copper track layout and com-ponent mounting plan of the PCBdesigned for the extension circuit (boardavailable ready-made).

Figure 3. One of our built-up prototypes.The board fits exactly in a Bopla plasticcase Type E430.

12 - 12/98 Elektor Electronics EXTRA PC Topics12 - 12/98 Elektor Electronics EXTRA —————————————— PC TOPICS

982090-1(C) ELEKTOR

C1

C2

C3

C4

D1

D2

D3

H7

H8

H1

0

IC1 IC2

J1J2K1 K2 K3

K4

K5 K6

K7

R1 R2R3

R4

R5

R6

R7

R8

R9

R10

THRU

982090-1

III

982090-1(C) ELEKTOR

Figure 2. Copper track layout and com-ponent mounting plan of the PCBdesigned for the extension circuit (boardavailable ready-made).

COMPONENTS LIST

Resistors:R1-R4,R6,R7,R10 = 220Ω

R5,R8 = 2kΩ7R9 = 4kΩ7

Capacitors:C1 = 100nF

C2,C3,C4 = 10µF 25V

Semiconductors:D1 = 1N4148D2,D3 = LEDIC1 = 74HCT14IC2 = CNY17-2

Miscellaneous:K1-K4 = 5-way DIN-socket, PCB-mountK5,K6 = 15-way sub-D socket (female),angled, PCB-mountK7 = 15-way sub-D plug (male), PCB-mountCase: 120x64x40mm, e.g., Bopla typeE430.PCB, order code 982090-1, see ReadersServices page.

Figure 3. One of our built-up prototypes.The board fits exactly in a Bopla plasticcase Type E430.

Page 79: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

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

Because the supply voltage is takenfrom the joystick connector, the circuitdoes not require a separate powersupply. So, it's all a matter of connect-ing it all up and start using it! In

Microsoft lingo: plug and play.

Two joysticks

Although the joystick interfaces of mostsoundcards are complete, it should benoted that all signals are combined ona single connection, where they sittogether with the MIDI signals! Our aimis therefore to 'untangle' the signals forthe two joystick ports, and direct eachset to its own connector.Now, on the connectors we find twopins for the Fire buttons (a and b) aswell as the connections for the poten-tiometers that control the movementsin the horizontal and vertical directions(x and y respectively). To these shouldbe added the positive power supplyvoltage and, of course, ground.The design of the printed circuit boarddeveloped for this project may befound in Figure 2. The PCB has a clearlayout with four sockets for the MIDIinterface arranged at one side, andthe two joystick connectors, at theother. Finally, there's a 15 -way connec-tor for the cable link with the PC.The single -sided PCB contains a cou-ple of wire links which have to be

installed first so that they are not over-looked later. Next, you fit the connec-tors and the remaining components.Build the circuit as neatly as you can,and connect it to the joystick port onthe PC via a 15 -way flatcable. That's it- you have an interface which allows

two joysticks and a number of MIDIdevices to be connected up to yourPC, which is, dare we say it, function-ally extended. (982090-1

MIDIMIDI hardware -a closer lookMIDI is an acronym for Musical Instrument Digital Interface. Essentially, it is an inter-

face that allows electronic musical instruments to communicate with each other.The standard was defined in the early 80's. Over the past decade or so, the com-

puter industry has gradually adopted the relevant interface, which is currentlyavailable on almost any PC equipped with a soundcard. Thanks to the MIDI inter-

face, software may be employed to control electronic musical instruments. Thereverse is also possible: using a keyboard and a sequencer, a piece of music may

be stored in a computer.

The MIDI interface hardware typically found on PC soundcards is derived fromthe RS232 interface. It comprises a kind of current loop which is used by the trans-

mitter to send information to the receiver. At the receiver side, an optocoupler is

used with a switching level of 5 mA. The switching times should be shorter than2 ps. The bit rate is defined as 31.25 kbits/s (±1%). The asynchronous communi-

cation is based on one start bit, eight databits and one stop bit. The physical con-

nection is made using 5 -way 180 -degree style DIN plugs and sockets, of which

only pins 4 and 5 are used. Pin 4 is connected to +5 V via a 22042 resistor, andpin 5 to the output of the driver, also via a 22042 resistor. Pin 2 may be used as a

ground terminal for the MIDI cable screening. Pins 1 and 3 are not used. MIDIcables are screened and have twisted wires. Their length should not exceed 15 m.

PC Topics Elektor Electronics EXTRA 13 - 12/98

Because the supply voltage is takenfrom the joystick connector, the circuitdoes not require a separate powersupply. So, it’s all a matter of connect-ing it all up and start using it! InMicrosoft lingo: plug and play.

Two joysticks

Although the joystick interfaces of mostsoundcards are complete, it should benoted that all signals are combined ona single connection, where they sittogether with the MIDI signals! Our aimis therefore to ‘untangle’ the signals forthe two joystick ports, and direct eachset to its own connector.Now, on the connectors we find twopins for the Fire buttons (a and b) aswell as the connections for the poten-tiometers that control the movementsin the horizontal and vertical directions(x and y respectively). To these shouldbe added the positive power supplyvoltage and, of course, ground.The design of the printed circuit boarddeveloped for this project may befound in Figure 2. The PCB has a clearlayout with four sockets for the MIDIinterface arranged at one side, andthe two joystick connectors, at theother. Finally, there’s a 15-way connec-tor for the cable link with the PC.The single-sided PCB contains a cou-ple of wire links which have to be

PC TOPICS —————————————— Elektor Electronics EXTRA 13 - 12/98

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

MIDI hardware — a closer lookMIDI is an acronym for Musical Instrument Digital Interface. Essentially, it is an inter-face that allows electronic musical instruments to communicate with each other.The standard was defined in the early 80’s. Over the past decade or so, the com-puter industry has gradually adopted the relevant interface, which is currentlyavailable on almost any PC equipped with a soundcard. Thanks to the MIDI inter-face, software may be employed to control electronic musical instruments. Thereverse is also possible: using a keyboard and a sequencer, a piece of music maybe stored in a computer.The MIDI interface hardware typically found on PC soundcards is derived fromthe RS232 interface. It comprises a kind of current loop which is used by the trans-mitter to send information to the receiver. At the receiver side, an optocoupler isused with a switching level of 5 mA. The switching times should be shorter than2 µs. The bit rate is defined as 31.25 kbits/s (±1%). The asynchronous communi-cation is based on one start bit, eight databits and one stop bit. The physical con-nection is made using 5-way 180-degree style DIN plugs and sockets, of whichonly pins 4 and 5 are used. Pin 4 is connected to +5 V via a 220-Ω resistor, andpin 5 to the output of the driver, also via a 220-Ω resistor. Pin 2 may be used as aground terminal for the MIDI cable screening. Pins 1 and 3 are not used. MIDIcables are screened and have twisted wires. Their length should not exceed 15 m.

installed first so that they are not over-looked later. Next, you fit the connec-tors and the remaining components.Build the circuit as neatly as you can,and connect it to the joystick port onthe PC via a 15-way flatcable. That’s it— you have an interface which allows

two joysticks and a number of MIDIdevices to be connected up to yourPC, which is, dare we say it, function-ally extended. (982090-1)

Page 80: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

14 - 12/98 Elektor Electronics EXTRA —————————————— PC TOPICS

If you have ever considered giving anold PC any sort of useful function anda second lease of life, this project is agreat opportunity because of its mod-est hardware requirements: a 386 PCwith a VGA display and a classic print-er port (EPP not required) is basically allyou need as far as the PC is con-cerned. However, if your PC does nothave a maths co-processor, the con-trol program we’re about to describemay have to be recompiled.

Principle of operation

As shown in the block diagram inFigure 1, we’re talking about a mea-surement circuit based on an inexpen-sive and widely available converter.The converter is connected to the bat-tery under examination by means of a

resistor. Using a certain measurementinterval, the PC, by way of its printerport, requests measurement data fromthe converter.By computing the V/R ratio, the controlprogram determines the current in thebattery-resistor circuit, as well as thebattery charge, and multiplies the latterquantity with a factor representing thedischarge time. The result of this opera-tion is added to the mAh (milli-ampèrehour) counter. In this way, the proposedsystem acts like an integrator.

Hardware

The circuit diagram of the converter isshown in Figure 2. At the input of thecircuit we find a voltage divider con-sisting of resistors R1 through R6, andan associated 6-way rotary switch. The

step size of the input voltage is 5 V, therange is 5-30 V, and the lower resis-tance in the ladder is connected tothe input of an analogue-to-digitalconverter (ADC) type ADC0804. This ICshould not be a problem to obtainlocally as it is produced by severalsemiconductor giants like Harris,National Semiconductor and PhilipsSemiconductors.The ADC0804 is flanked by a type74HC257 quadruple 2-to-1 line multi-plexer with 3-state outputs. The ADC0804 is a CMOS 8-bit A/D con-verter based on the ‘successiveapproximation’ principle. Its differen-tial analogue input is marked byexcellent common-mode rejectioncharacteristics, and allows the ‘zero’level of the analogue input to begiven an offset. If necessary the refer-ence voltage may be madeadjustable to suit any voltage rangesmaller than the one normally allowedby the available 8-bit resolution.The 6-way rotary switch at the input ofthe ADC acts as a voltage divider andallows one of the input voltage rangesbetween 5 and 30 V to be selected,the step size being 5 V. The 5.1-V zenerdiode in this part of the circuit has aprotective function.The multiplexer at the output of theADC0804 serves to split the 8-bit digitaldata at chip outputs DB0 through DB7into two 4-bit words which are sent tothe PC printer port by way of datalineD0 (pin 2) and control lines Error(pin 15), Select (pin 13), Paper End(pin 12) and Acknowledge (pin 10).

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 thecapacity of a rechargeable battery. The PC alsolends a helping hand by displaying graphs showingthe instantaneous battery capacity and terminalvoltage.

Design by F. Simonnot

capacity characteristic

PC

voltage characteristic

converter

battery

resistor

982093 - 11

battery capacitymeasurement by PCrun true-capacity tests on rechargeable batteries

Figure 1. This block diagram of the system shows the basic elements: battery, converter and PC.

Page 81: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

+ BATT Fl0 I=100mA

E)

" 0- BATT

5V

20

6

R7

9

5

19

4

C1

7150p5V1

7

--

VREF

INTR

WR

CLKR

C)DBO

DB1

IC1 DB2

DB3

DB4

DB5

ADC0804DB6

DB7CLK

VI- CS

AGND RD

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

The clock frequency in the circuit is

determined by RC network C1 -R7,according to the following equation:

FCLK 1 / 1 .1 RC

which gives approximately 606 kHzusing the respective 1 50-pF and 10-k52components.The conversion time of the ADC issmaller than 100 its.The input of the converter is protectedby a 100-mA fuse.The capacity measurement is per -

0

10

1C3

1C4

K1DB25 1-0

14

2

15

2 MUX

17 3 V16 5

15 6

14 11

13 10

12 1412

11 13

15 rsEN G

74HC257

formed by connecting a resistoracross the + and - terminals of thebattery. The value of this measurementresistor will depend on the batterytype, and the program can help youwhen it comes to determining the bat-tery characteristics.

Software

You have to inform the program aboutthe value of the battery load resistor,and the voltage range set on the ana-logue -to -digital converter. Based on

OO

O3-016 04_017 05_0

18

6_019

7_020_08-021_09-0

22

10O

23

11_024

25

13

982093 - 12

O

O

the measurement values obtainedfrom the ADC, the program first calcu-lates the battery tension. Next, theload current is computed using theresistor value and the battery voltage.The result, multiplied by the duration ofthe measurement, yields the instanta-neous battery capacity.Now, let's have a look at how this worksin practice. The control program is

called Accbench.exe, and may befound on the project diskette withorder number 986034-1, along withthe source code file written in Turbo

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

O

0

PC Topics Elektor Electronics EXTRA 15 - 12/98PC TOPICS —————————————— Elektor Electronics EXTRA 15 - 12/98

The clock frequency in the circuit isdetermined by RC network C1-R7,according to the following equation:

FCLK = 1 / 1.1RC

which gives approximately 606 kHzusing the respective 150-pF and 10-kΩcomponents.The conversion time of the ADC issmaller than 100 µs.The input of the converter is protectedby a 100-mA fuse.The capacity measurement is per-

formed by connecting a resistoracross the + and – terminals of thebattery. The value of this measurementresistor will depend on the batterytype, and the program can help youwhen it comes to determining the bat-tery characteristics.

Software

You have to inform the program aboutthe value of the battery load resistor,and the voltage range set on the ana-logue-to-digital converter. Based on

the measurement values obtainedfrom the ADC, the program first calcu-lates the battery tension. Next, theload current is computed using theresistor value and the battery voltage.The result, multiplied by the duration ofthe measurement, yields the instanta-neous battery capacity.Now, let’s have a look at how this worksin practice. The control program iscalled Accbench.exe, and may befound on the project diskette withorder number 986034-1, along withthe source code file written in Turbo

R6

1k

R5

1k

R4

1kR3

1k

R2

1k

R1

1k

ADC0804

IC1

CLKR

AGND

INTR

VREF

DB0

DB1

DB2

DB3

DB4

DB5

DB6

DB7CLK

VI+

VI–

20

10

18

17

16

15

14

13

12

11

19

CS

RD

WR

4

6

8

1

2

3

5

9

7

C1

150p

R7

10k

D1

5V1

S1

100mA

F1

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

K1

+ BATT

– BATT

7805

IC3

C3

100µ

C4

10µIC4

16

85V

5V9...12V DB25

982093 - 12

74HC257

IC4

MUX

12

EN G1

11

10

14

13

15 1

9

7

42

3

5

6

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

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

Page 82: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

act

Address 16 A:1

Forward Up

Help

Cut Copy Paste

Name Size Type M odified

Lod Accbench.cir

Accbench. exe

Accbench.lmc Accbench.pas Cuivben.lmc Cuivlpt

Egavga.bgi

S erigben. Imo

Seriglpt

8KB

31KB

8KB

11KB

3KB

160KB

6KB

7KB

159KB

CI R File

Applica...

LMC File

PAS File

LMC File

File

B G I File

LMC File

File

13/07/1998 2:45 PM

03/09/1996 2:54 PM

09/07/1998 1:17 PM

02/10/1998 2:16 AM

10/07/1998 8:54 AM

10/07/1998 8:54 AM

08/12/1992 7:00 AM

10/07/1998 8:40 AM

10/07/1998 8:49 AM

object(s) g My Computer

Figure 4. Screendump showing the files found on the project disk.

Pascal 7.0. Although parts of thesource code are written in French, therelevant file will still be of use, we reck-on, to those of you wishing to makemodifications to the program.Once launched, the Accbench pro-gram asks you if you want to do thecalculations to determine the variousparameters. At this point you mayenter the nominal battery voltage,nominal battery capacity and thevalue of the load resistor. Using theseinput parameters the program calcu-lates the discharging current, theamount of time it takes to fully dis-charge the battery, the power dissi-pated by the load resistor, and theestimated duration of the dischargingcycle, by means of sampling.It should be noted that the programuses a number of maximum values asfar as the battery voltage and the bat-tery capacity are concerned - therelevant values are 30 V and12,000 mAh. If you enter higher values,the program will notify you by produc-ing an error message.The more audacious among you maywant to have a go at modifying the'converter control' section of the con-trol program, starting with the proce-dure called 'convert', in order tomake the program work with MAXI 87used in the CPU Thermometer pub-lished in the October 1997 issue ofElektor Electronics.

Construction

Figures 3a and 3b show the coppertrack layout and component -mount-

ing plan of the printed circuit boarddesigned for this project by the author.Note that this PCB is not an ElektorElectronics design, and that it is notavailable ready-made through ourReaders Services.Fitting the components on the boardshould not present problems. Althoughit is necessary to refer to the circuit dia-gram to be able to locate the compo-nents on the PCB, that should notcause difficulties because there areonly a couple of parts to mount, andtheir values are printed on the board.If you want to avoid any risk of dam-aging the ADC0804 and 74HC257integrated circuits, we suggest usinggood quality IC sockets.The completed circuit board may befitted in a small plastic case. The caseis drilled to accept a 25 -pin sub -Dsocket, like the one normally used forthe PC printer port. This connector islinked to the PC's printer port via astandard cable. Two other wires leavethe case: these are for the connectionto the battery under test. The free endsof these flexible wires are fitted with'crocodile (croc)' clips for easy con-nection to the battery terminals. Therelevant connections on the converterboard are marked '+ battPins 2, 10, 12, 13, 15 and 25 of thesub -D socket are connected to the'257 outputs, G1 and ground, as indi-cated in the circuit diagram.The regulated supply voltage ofbetween 9 and 12 V is connected tothe solder pads labelled +12V and-12V; these are found near the 7805voltage regulator.

In conclusionIt goes without saying that the presentcircuit may be used to perform prettyexhaustive capacity tests on all sorts ofrechargeable batteries.The approach chosen, discharging bya fixed resistor (as opposed to con-stant -current discharging which is alsofrequently employed), allows a mea-surement process to be used thatclosely resembles 'real life' conditions.For instance, it allows you to get a fair-ly good idea of the life expectancy ofa rechargeable battery used in atorchlight, provided you know thecharacteristics of the lamp used.As shown by the screendump Figure 4,the disk supplied for this project con-tains the following files

accbench.cirSimulation file for Microcap V.

accbench.exeCompiled, executable file.

accbench.ImcCircuit diagram, Layol format.

accbench.pasSource code file in Turbo Pascal 7.0.

cuivben.ImcCopper track layout of PCB, Layol for-mat.

cuiviptPrint file for the PCB copper track lay-out, for LaserJet or DeskJet printers(300 dpi).

egavga.bgia DOS driver that allows any IBM-com-patible PC to display the batterygraphs.

seriben.ImcPrint file for the component overlay,Layol format.

SerglptPrint file for the PCB component over-lay, for LaserJet or DeskJet printers(300 dpi).

The disk also contains a number ofauthentication files.

(982093-1)

16 - 12/98 Elektor Electronics EXTRA PC Topics16 - 12/98 Elektor Electronics EXTRA —————————————— PC TOPICS

Pascal 7.0. Although parts of thesource code are written in French, therelevant file will still be of use, we reck-on, to those of you wishing to makemodifications to the program.Once launched, the Accbench pro-gram asks you if you want to do thecalculations to determine the variousparameters. At this point you mayenter the nominal battery voltage,nominal battery capacity and thevalue of the load resistor. Using theseinput parameters the program calcu-lates the discharging current, theamount of time it takes to fully dis-charge the battery, the power dissi-pated by the load resistor, and theestimated duration of the dischargingcycle, by means of sampling.It should be noted that the programuses a number of maximum values asfar as the battery voltage and the bat-tery capacity are concerned — therelevant values are 30 V and12,000 mAh. If you enter higher values,the program will notify you by produc-ing an error message.The more audacious among you maywant to have a go at modifying the‘converter control’ section of the con-trol program, starting with the proce-dure called ‘convert’, in order tomake the program work with MAX187used in the CPU Thermometer pub-lished in the October 1997 issue ofElektor Electronics.

Construction

Figures 3a and 3b show the coppertrack layout and component-mount-

ing plan of the printed circuit boarddesigned for this project by the author.Note that this PCB is not an ElektorElectronics design, and that it is notavailable ready-made through ourReaders Services.Fitting the components on the boardshould not present problems. Althoughit is necessary to refer to the circuit dia-gram to be able to locate the compo-nents on the PCB, that should notcause difficulties because there areonly a couple of parts to mount, andtheir values are printed on the board.If you want to avoid any risk of dam-aging the ADC0804 and 74HC257integrated circuits, we suggest usinggood quality IC sockets.The completed circuit board may befitted in a small plastic case. The caseis drilled to accept a 25-pin sub-Dsocket, like the one normally used forthe PC printer port. This connector islinked to the PC’s printer port via astandard cable. Two other wires leavethe case: these are for the connectionto the battery under test. The free endsof these flexible wires are fitted with‘crocodile (croc)’ clips for easy con-nection to the battery terminals. Therelevant connections on the converterboard are marked ‘+ batt -’.Pins 2, 10, 12, 13, 15 and 25 of thesub-D socket are connected to the‘257 outputs, G1 and ground, as indi-cated in the circuit diagram.The regulated supply voltage ofbetween 9 and 12 V is connected tothe solder pads labelled +12V and–12V; these are found near the 7805voltage regulator.

In conclusionIt goes without saying that the presentcircuit may be used to perform prettyexhaustive capacity tests on all sorts ofrechargeable batteries.The approach chosen, discharging bya fixed resistor (as opposed to con-stant-current discharging which is alsofrequently employed), allows a mea-surement process to be used thatclosely resembles ‘real life’ conditions.For instance, it allows you to get a fair-ly good idea of the life expectancy ofa rechargeable battery used in atorchlight, provided you know thecharacteristics of the lamp used.As shown by the screendump Figure 4,the disk supplied for this project con-tains the following files

accbench.cirSimulation file for Microcap V.

accbench.exeCompiled, executable file.

accbench.lmcCircuit diagram, Layo1 format.

accbench.pasSource code file in Turbo Pascal 7.0.

cuivben.lmcCopper track layout of PCB, Layo1 for-mat.

cuivlptPrint file for the PCB copper track lay-out, for LaserJet or DeskJet printers(300 dpi).

egavga.bgia DOS driver that allows any IBM-com-patible PC to display the batterygraphs.

seriben.lmcPrint file for the component overlay,Layo1 format.

SerglptPrint file for the PCB component over-lay, for LaserJet or DeskJet printers(300 dpi).

The disk also contains a number ofauthentication files.

(982093-1)

Figure 4. Screendump showing the files found on the project disk.

Page 83: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

EELKTOR ELECTRONICSCUMULATIVE INDEX 1998

Notation:Article title [ month — page number ]Example: 10 — 63 = October 1998, page 63S = in Supplement

Application NotesAM/FM antenna matching IC (Telefunken/Temic) 2 — 48AM/FM receiver IC (Telefunken/Temic) 6 — 50Compact 3.3V charge pump converter (Linear Technology) 10 — 52DS5000 soft microcontroller (Dallas Semiconductor) 1 — 46ESD protection for I/O ports (Maxim) 7/8 — 43Home automation modem (Philips Semiconductors) 5 — 60Programmable sensor interface MLX90308 (Melexis) 11 — 56mProcessor system hardware monitor (National Semiconductor) 4 — 52

Audio/Video, Music1 Watt BTL audio amplifier 12 — 68100-watt single-IC amplifier 7/8 — 17Accurate bass tone control 12 — 59AVC for PCs 2 — 24Balanced microphone amplifier 7/8 — 64Balanced/unbalanced converters for audio signals 3 — 22Clipping indicator for compact disc 10 — 46Crossover for subwoofer 7/8 — 47How does a digital loudspeaker system work? 9 — 30Microphone valve preamplifier 7/8 — 76Playback amplifier for cassette deck 12 — 56Presence filter 12 — 62Simple copybit killer 7/8 — 22Simple electronic metronome 2 — 36Sounds from the Old West 7/8 — 77Speech eroder 12 — 74Stereo microphone input for PC 1 — 42Ten-band equalizer 12 — 71The super audio CD 9 — 11Treble tone control 12 — 54Two-way AF amplifier LM4830 7/8 — 81Ultra-low-noise MC amplifier 12 — 60Up/down drive for tone control 12 — 82Video amplifier 7/8 — 100

Computers, Microprocessors, Software80C32 BASIC control computer (1) 2 — 3080C32 BASIC control computer (2) 3 — 40A compact display controller 11 — S12A noisy PC 5 — S12A simple A-D converter 6 — S2A simple PC network 2 — S2Accurate time measurement in Visual BASIC 9 — S12A-D converter for MatchBox BASIC computer 12 — 70AVC for PCs 2 — 24AVR-RISC evaluation system (1) 10 — S6AVR-RISC evaluation system (2) 11 — S2Cable tester 1 — S9CD-R formats 11 — S8Centronics in-system programmer 7/8 — 86Computer emulators 5 — S2Data acquisition by modem 3 — S6Display refresh meter 1 — S12Do more with the gameport 9 — S6Dust in the PC 3 — 12Electronic Engineering (EE) virtual libraries 1 — 38Electronic Handyman (2) 1 — 26Electronics Workbench layout 10 — 60E-meter (PC monitor radiation) 4 — 40Experimental power supply for PCs 9 — S2Extension board for MatchBox BASIC computer 7/8 — 94External port for tape streamer 10 — S16

Page 84: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

Faster access to the Internet 4 — S2Fibre-optic data communication 5 — 52Game control adaptor 7/8 — 84How do I set up a network? 3 — S2Improved power-down for the 8051 12 — 57Information on CD-R(W) 11 — 54Intercast — free Internet pages via TV signals 12 — S6IRQ and DMA usage 6 — S10Joystick and MIDI interface for Soundblaster cards 12 — S10Keyboard switch 11 — S6Light intensity measurement with a PC 2 — S14Linux — a Windows alternative? 10 — S2Low-cost development system for PICs 7/8 — 72Memory change-over tip 12 — 57Modem off indicator 7/8 — 63Modern modem technology 1 — 32Multiple test card (for microcontrollers) 9 — 50No more Peeping Toms on the Internet 2 — 39Oscilloscope software 12 — 12Parallel-to-serial converter 12 — S2PC control for MiniDisc player 11 — 30PC-on-a-chip 12 — S9PIC & AVR programmer 6 — 26PIC on the rocks 1 — S6PIC16C84 programmer for Centronics port 7/8 — 62PICs on the Internet 6 — 24PICXEX (operating system) 5 — 56PLD Gyroscope version 2 1 — S14Preamplifier for soundcards 12 — S5Projects for PC & infrared remote control 6 — S14R/C interface for PC Flight Simulator 10 — S12RS232 controlled 8-channel switch 6 — S6RS232 interface for 68HC11 2 — S6SCSI 5 — S6Small VGA-tester 9 — S14Stereo microphone input for PC 1 — 42The modern printer port 4 — S12USB and Firewire 2 — S10

General Interest32-channel PC-controlled light dimmer 12 — 304-bit analogue-to-digital converter 7/8 — 166-channel running light 7/8 — 92Ambient-noise monitor 12 — 82Anemometer 12 — 14Auto power off 7/8 — 74Automatic air humidifier 7/8 — 96Automatic light dimmer 7/8 — 75Balanced amplifier for photodiode 12 — 69Berlin clock 7/8 — 87

Bi-directional I2C level shifter 7/8 — 16Car immobilizer 12 — 66Car interior lights delay 7/8 — 73Chipcard as security key 7/8 — 31Circuit ideas for the NE612 12 — 65DCF-controlled LED clock 5 — 26Design hunting 5 — 46Digital cameras 10 — 22Digital output with sink/source driver 12 — 88Doorbell-controlled burglar deterrent light 7/8 — 46

Electrical isolation for I2C bus 7/8 — 48Electronic die 1 — 58Electronic spirit-level 7/8 — 36Exposure timer for UV light box 7/8 — 38Fast voltage-driven current source 12 — 81Faultfinding 10 — 40Field programmable analogue array (Motorola MPAA020) 6 — 56Flashing brooch 3 — 64Flat-panel displays 6 — 32Functional trinket 2 — 56

Page 85: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

General-purpose alarm 12 — 58General-purpose oscillator 7/8 — 79Infra-red burglar alarm 12 — 76Infra-red proximity detector 7/8 — 65Infra-red receiver 7/8 — 41Input impedance booster 12 — 67Input impedance booster 7/8 — 98Introduction to digital signal processing (1) 1 — 20Introduction to digital signal processing (2) 2 — 40Introduction to digital signal processing (3) 3 — 28Introduction to digital signal processing (4) 4 — 56Introduction to digital signal processing (5) 5 — 40Introduction to digital signal processing (6) 6 — 40Ionization circuit 3 — 46Laser-controlled burglar deterrent 9 — 16Latch uses 555 in memory mode 12 — 77LED bar off indicator 7/8 — 71LED lighting for consumer unit cupboard 12 — 86Light from flat batteries 12 — 76Low-impact muscle stimulator 7/8 — 103Mains phase indicator 12 — 63Master/slave switch ‘deluxe’ 11 — S14Microgate logic 7/8 — 28Modified humidity control 12 — 64Multi-colour LED 7/8 — 90Opamp with hysteresis 7/8 — 77Parking sonar 4 — 20PC control for MiniDisc player 11 — 30Philbrick oscillator 12 — 61PLD Gyroscope version 2 1 — S14Pulse/frequency modulator 7/8 — 97RC5 remote control extension 7/8 — 11Rear light afterglow 7/8 — 30Reflector for pedestrians 7/8 — 89Refrigerator economizer 10 — 54RFID systems 11 — 40Semiconductor overviews 3 — 62Simple infrared transmitter 7/8 — 101Simple moisture detector 12 — 81Sinewave-to-TTL converter 12 — 67Smartcard reader/writer (2) 1 — 68Smartcard-operated code lock 11 — 24Stage-lighting control (DMX512) 2 — 52Symmetrical full-wave rectifier 7/8 — 100Tachometer for mopeds and motor scooters 10 — 34Thrifty light-controlled switch 12 — 75Torchlight dimmer 12 — 54Versatile aid for experimenters 9 — 58Versatile control system PLC87(A) (1) 10 — 28Versatile control system PLC87(A) (2) 11 — 18

Power Supplies & Battery Chargers1.5 A step-down switching regulator 12 — 79Battery capacitance measurement by PC 12 — S14Battery tester 7/8 — 68Battery-charging indicator for mains adaptor 12 — 55Battery-resistance meter 5 — 48DC-DC converter 7/8 — 29Developments in battery chargers 7/8 — 32Discharge circuit 6 — 48Experimental power supply for PCs 9 — S2Lead-acid battery regulator for solar panel systems 12 — 72Low-drop 5 V regulator 7/8 — 37Low-power voltage reference 7/8 — 63Mains filter revisited 12 — 83Mains filter with overvoltage protection 4 — S8Mains master/slave control Mk2 7/8 — 70Mains splitter for AF power amplifiers 12 — 64Maintenance charger (for 6/12V lead acid batteries) 7/8 — 52NiCd battery charger 7/8 — 92Overload protection 7/8 — 30

Page 86: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

Polarity reverser 12 — 62Simple electrification unit 12 — 68Single-supply operation of the AD736 12 — 87Soft start for switching power supply 7/8 — 98Switch-mode power supply 7/8 — 97Thrifty voltage regulator 7/8 — 18Ultra-low power 5V regulator 7/8 — 49Uninterruptible power supply (UPS) for cordless telephones 1 — 54Universal lead-acid battery protector 7/8 — 28Variable power supply (0-24V, 1A/2A) 3 — 16XS symmetrical supply 12 — 74

Radio, TV and Communications0.5-6 GHz low-noise amplifier 12 — 8520-metre SSB/CW receiver 4 — 14418/433 MHz control system 9 — 40418/433 MHz fieldstrength meter 10 — 14418/433 MHz short-range communication 5 — 34Active magnetic antennas (Omega-2 and –3) 9 — 22Active short-wave antenna 7/8 — 89ATU for 27 MHz CB radios 12 — 86Broadband RF preamplifier 5 — 14Co-channel interference suppression using stacked antennas 6 — 14Digital Audio Broadcasting (DAB) (1) 3 — 34Digital Audio Broadcasting (DAB) (2) 4 — 34Digital terrestrial television 12 — 44Free radio! 4 — 66Frequency display and VFO stabilizer 2 — 18From Russia with vision 12 — 11Ultima loopstick VLF antenna 7/8 — 108

Test & Measurement12/24/48 V d.c. tester 12 — 85418/433 MHz fieldstrength meter 10 — 14A simple A-D converter 6 — S2Barometer/altimeter (1) 11 — 48Barometer/altimeter (2) 12 — 38Battery-resistance meter 5 — 48Cable analyser 7/8 — 78Cable tester 1 — S9Celsius thermometer 7/8 — 41Conductance tester 6 — 54Electronic accelerometer 6 — 20E-meter (PC monitor radiation) 4 — 40I2C temperature sensor 12 — 80IC tester (1) 3 — 50IC tester (2) 4 — 46IC tester 1 — S3Infra-red remote control tester 7/8 — 99JFET tester 2 — 12LCD tester 7/8 — 37LED barometer 12 — 84Light intensity measurement with a PC 2 — S14Liquid-level gauge 6 — 60Low-cost function generator 12 — 78Mains pulser 12 — 73Mini audio signal generator 7/8 — 48Monitor/TV refresh rate meter 5 — 20Multiple test card (for microcontrollers) 9 — 50Oscillation monitor 7/8 — 64PC-aided BJT tester revisited 4 — 26Portable sound-pressure meter 1 — 14Pulse rate monitor 7/8 — 78RF signal generator (1) 11 — 10RF signal generator (2) 12 — 20Simple function generator 7/8 — 39Three-state continuity tester 7/8 — 75Thyristor tester 7/8 — 95Two-wire temperature sensor 7/8 — 19

Datasheets

Page 87: 1998 International PC-SOFTWARE CONTEST The Winnerstemperature logger based on the DS1620 transducer. 2 Proteus IV package; value £1625 Labcenter Electronics H. Vasquez Matute 535

AD22100 (Analog Devices) 10 — 65AD557 (Analog Devices) 4 — 61AT90S1200 Instruction Set Summary (Atmel) 1 —39Beaufort scale 12 — 89CS8412 (Cirrus Logic) 10 — 65IC tester — test vectors, illustrated examples 4 — 61ICM7218A (Maxim) 5 — 67OHN3040U/OHS3040U 12 — 89PLC87(A) Instruction Set 11 — 65Quick Reference Card for 80C32 BASIC computer 2 — 69RC-5 Codes (Philips) 9 — 65SSM2141/SSM2142 (Analog Devices) 3 — 71T-Series iron powder cores (Amidon) 5 — 67UM8250A (United Microelectronics Corp.) 6 — 69V23057 card relay E (Siemens) 6 — 69XC9356 (Xilinx) 12 — 89

Corrections, Updates, Letters (P.O. Box 1414)4-way serial port switch 1 — 51ADC for Centronics port 1 — 51CPU overclocking 1 — 50Earthing in Variable Power Supply 5 — 70EPROM programmer 5 — 70EPROM programmer 7/8 — 66Function generator 1 — 51Hybrid power amplifier — copyright violation 1 — 51Intelligent IC tester 9 — 35Mini PIC programmer 1 — 50Motorola software utilities pack now by ftp 5 — 70PIC controlled home alarm system 1 — 51Simple electronic metronome 3 — 63Video copy processor ready-built? 1 — 51