87
EPE Online, Febuary 1999 - www.epemag.com - XXX

EPE_08-1999

Embed Size (px)

DESCRIPTION

practical electronics magazine

Citation preview

Page 1: EPE_08-1999

EPE Online, Febuary 1999 - www.epemag.com - XXX

9ROXPH,VVXH

$XJXVW

Page 2: EPE_08-1999

EPE Online, July 1999 - www.epemag.com - 774EPE Online, August 1999 - www.epemag.com - 661

PROJECTS AND CIRCUITS

PRACTICAL OSCILLATOR DESIGNS - Part 2Colpitts and its variants by Raymond Haigh

Worked examples and circuit info for hands-on constructors.825

CIRCUIT SURGERY by Alan Winstanley and Ian BellElectric Enlightenment; Mysterious Multivibrator; Transistors in a PICkle 840

POWER GENERATION FROM PIPELINES TO PYLONS - Part 1by Alan Winstanley

An on-site guided tour of how electrical power is generated and delivered

811

REGULARS AND SERVICES

NEWS - Barry Fox Highlights technology’s leading edge,plus everyday news from the world of electronics

847

READOUT - John Becker addresses general points arising. 855

SHOPTALK with David BarringtonThe essential guide to component buying for EPE Online projects

853

EDITORIAL 775

SERIES AND FEATURES

MAGNETIC FIELD DETECTIVE by Andy FlindA neat and sensitive instrument for detecting low-level magnetic fields 783

NEW TECHNOLOGY UPDATE by Ian PooleField emission display are challenging CRTs

809

8-CHANNEL ANALOG DATA LOGGER - Part 1 by John BeckerThe new PIC16F877 microcontroller offers versatile logging oppertunities

793

ULTRASONIC PUNCTURE FINDER by Bill MooneyFind that elusive puncture speedily and without water!

777

FREEZER ALARM by Robert PenfoldAnother low-cost Starter Project - How to avoid an expensive thaw!

788

INGENUITY UNLIMITED hosted by Alan WinstanleyLoop Aerial MW Radio; Mayday Module; NiCad Discharge Unit

800

INTERFACE by Robert PenfoldVisual programming for PC add-ons 821

SOUND ACTIVATED SWITCH by Bart TrepakJust one logic gate allows a simple mic to control - well, almost anything

803

NET WORK - THE INTERNET PAGE surfed by Alan WinstanleyExplorer 5 Comes of Age; Hidden Worms; Trojan Trounced

845

Page 3: EPE_08-1999

EPE Online, Febuary 1999 - www.epemag.com - 775

BEWARE GEEKS BEARING GIFTS!In his Net Work article this month, Alan Winstanley continues his discussion on computer

viruses, Worms, and Trojan Horses by introducing the latest Worm to escape:Worm.ExploreZip , also known as W32.ExploreZip.

In his article, Alan stresses how dangerous it can be to open and run an attached file froman untrusted source. However, in the case of this latest worm, it propagates itself by using theInbox of the Microsoft Outlook (including Express) or Exchange mail systems to send amessage in reply to any unread mails. This means that as far as the recipients of these emailsare concerned, the messages appear to come from a trusted source.

SHARES AND MOUNTING NETWORK DRIVESAs soon as this latest worm started to ravage the internet, the virus detection companies

rushed to provide an antidote, and your trusty editors immediately upgraded our virus protectionprograms with the latest fixes.

When scans of our systems showed no trace of this latest pest, we breathed a collectivesigh of relief and continued on our merry way. What we didn’t realize is that this blight can alsoattack from a remote system that has access to your system via directories that you haveshared (given access) to others, or by remote drives to which you’ve connected. Being in ahighly networked environment, it’s surprising how many of these little rascals you can leaveactive without thinking about it.

INTELECTUAL THEFT! The reason we now know so much about this is that our systems were attacked and

ravaged via a number of these shares. Even taking our regular backups into account, thisended up costing us huge amounts of time (which is why this month’s issue of EPE Online is aweek later than we would have hoped for). In fact some files that had not yet been backed upwere effectively lost forever, because one can never duplicate original creative works exactly.

The end result is that we feel extremely angry. When some swine hand-crafts a programwhose sole purpose is to destroy the contents of Word and Powerpoint files (plus causingfurther disruption by deleting key DLLs and other system files), then we have nothing butcontempt for him or her (or them).

All of us here at EPE Online work extremely hard at what we do, and we feel extremelyaggrieved when some mindless drongo tries to show how clever they are by stealing our timeand effort. The loss of innocent people’s time and data around the world caused by this latestattack is incalculable. So if (hopefully “when”) this pathetic excuse for humanity is caught, wewould be more than happy to see a punitive jail sentence. In fact the way we feel at the moment(after yet another 18-hour day trying to regroup after this attack), twenty years in jail would notbe excessive!

EPE Online, August 1999 - www.epemag.com - 775

Page 4: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 776

LOOP AERIAL SW RECEIVERThere have been electronic projects for just about everything imaginable published in recent years, but a

simple shortwave receiver is still one of the most interesting electronic devices that you can build. Commercialshortwave sets are now highly sophisticated pieces of electronics, and it is probably not feasible for the homeconstructor to compete with these. However, at the other end of the scale it is possible to produce simple andinexpensive receivers that are fun to build and will pick up numerous stations from around the world.

The design featured here is intended for broadcast band reception at frequencies from about 4¬¬5 to 14megahertz. This provides coverage of the popular 49, 41, 31, 25 and 22 meter bands. It does not require anelaborate aerial or an earth connection, and the aerial is a form of loop antenna.

The term “loop” is perhaps not entirely appropriate in this case, because the aerial is actually a length of300-ohm impedance ribbon feeder. This form of loop antenna has the advantage of being easy to accommo-date, and it seems to provide quite strong output signals. The loop is, in fact, about two or three meters on onedimension and only about 10 millimeters on the other, rather than a circle of around two meters in diameter.

This is a very simple design using just three transistors. There are no unusual coils to wind or buy, be-cause the loop aerial also acts as the tuning coil, so it is very easy to build.

CHILD GUARDChild Guard is a design intended to help prevent young children from burning themselves. It does so by

means of an audible warning if the child approaches a hot fire. The circuit may be used with any equipmentdesigned to produce heat, e.g. electric, gas or coal fires, ovens, etc. It is, of course, suitable for helping to pro-tect anyone of any age.

The design produces a coded infrared beam which detects the proximity of a person by bouncing infra-redoff them as they approach, yet without being confused by other infra-red sources. A separate sensor detectsthe random infra-red radiation being emitted from a heat source. If anyone approaches the fire, a warningbuzzer sounds.

PLUS: ANALOG DATA LOGGER PART 2

FROM PIPELINES TO PYLONS PART 2

PRACTICAL OSCILLATOR DESIGNS PART 3

NO ONE DOES IT BETTER!

Page 5: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 777

Every cyclist will sooner orlater need to deal with a flat tire.After figuring out the intricacies ofgetting to the inner-tube, thepuncture must then be located.

Punctures come in all shapesand sizes, from irreparableblowouts to slow punctures wherethe deflation can take weeks. Butthe most common type of punc-ture is from a thorn or a smallnail. Such punctures can be quitedifficult to find and a basin of wa-ter is often used to find the hole(air-bubbles rising to the surface)and to make certain that it is theonly one.

FIND-THE-LEAKThe Ultrasonic Puncture

Finder fits in here as a much lessmessy way of finding normalpunctures. It will replace the wa-ter bowl and, with a little skill,may even help to locate someslower punctures. In a “find-the-leak speed test”, the ultrasonicfinder took only a few secondswhereas the water bowl took sev-eral minutes including the time toset it up and clean up.

Other techniques such aslightly running the hand aroundthe tube or passing the tube closethe face to feel for the cooling airstream have their merits. Butagain the ultrasonic devicetended to be faster and it is cer-tainly cleaner.

also be of interest to those in-vestigating the properties of ul-trasound.

TURBULENT TIMESA jet of air ejected under

pressure from an inflated tubewill, in most cases, flow into theatmosphere in a highly turbulentmanner. Because of the scaleinvolved in the case of an inner-tube puncture, a portion of thisturbulent energy results in dis-turbances in the ultrasound re-gion.

The commonly availableultrasound microphones of thetype used in this project operateat 40kHz. The speed and thefrequency of ultrasound or in-deed any waveform are inti-mately related. In all cases thewavelength can be found by di-viding the speed by the fre-quency.

The speed of sound in air isknown to be about 344 metersper second. So the ultrasounddetector will respond to wave-lengths of about 8mm.

Prediction of the onset ofturbulence involves very com-plex fluid mechanics, but an-other science called commonsense would suggest that suchshort wavelength might be as-sociated with a tiny jet of turbu-lent air from a leaky inner tube.We also get a clue from the factthat several successful compa-nies market ultrasonic leak de-tectors world wide for diverseuse such as in the aircraft and

A new “first-aid” tool for your puncture repair kit, thatuses SMD and ultrasonics to detect escaping air.

8/75$621,&381&785(

),1'(5 E\%,//0221(<

The ultrasonic detector will notsolve all puncture problems andcan be defeated just like everyother method, particularly whendealing with very slow leaks.However, it is another usefulweapon in the cyclist’s armoryand it is easy to use.

Apart from finding punc-tures, this low cost device will

FFF

F

D9=5

1

2

3

Fig.1`. Recovery of audio fre-quencies from an amplitudemodulated signal. (a) 40kHzsignal with low frequencyamplitude variation (noise),(b) after diode detection be-fore smoothing, and (c) re-covered audio (noise).

Page 6: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 778

the chemical industries.

Turbulence in the jet of airfrom a puncture will result in acomplex mix of signals varyingrandomly in frequency and am-plitude. The voltage output fromthe ultrasonic microphone willtherefore appear as randomnoise. Most ultrasound detec-tors convert the 40kHz signalsto the audio frequency range bymixing it with a steady local os-cillator.

Some experimentation con-firmed that the amplitude of the40kHz noise from a puncture airstream varied at audio fre-

plifier.

STRAIGHT RECEIVERIn a straight radio receiver,

the signal is first separated fromthe myriad of signals in the ra-dio frequency spectrum by atuned circuit. This very weaksignal of maybe a few micro-volts is then amplified to a level(>100mV) suitable to operate adiode detector circuit. Beforedetection, the signal is balancedand there is no audible compo-nent.

The diode acts as a rectifier

&RQVWUXFWLRQDO3URMHFW

R

S

U

R

S

UW

T

c

2!

)F

4!

21C#"3!

!^%

BH!

6?1=BE225B

=5381>931<

69<D5B

DB!2CB%(

B"

$['

B!

!=

3$

!

3#

""P

3"

! %

B#

$['

DB"23H' 8

B$

! [

B%$['

B'

![

B(

$['

DB#23H' 8

B)

! [B&$['

3%

" "

3(

$'P

3&

""FB!

! [

F?<E=5

3)

! ^

B!

! :

3!

$'^

93!<=#(&

<C!

(:

3'

! P

3!"

! P3!!

$' ^

C!

?>?66

#

"

$

'

!

(

%

&

Q[

Fig.2. Full circuit diagram for the Ultrasonic Puncture Detector.

quency. This electrical signalfrom the detector can, there-fore, be regarded as an ampli-tude modulated (AM) radio sig-nal.

The random ultrasonicnoise signals will also mix in thedetector to give sum and differ-ence signals, and the latter willalso appear in the audio range.To put this another way, noiseplus and minus noise equalsnoise. The design concept forthe Ultrasonic Puncture Finderis therefore along the lines of a“straight” radio receiver with asimple detector and audio am-

allowing only positive going sig-nals to pass. This results in aseries of positive going pulsesat 40kHz, the carrier frequency.A capacitor smoothes thesepulses to give an average whichvaries over time, correspondingto the low frequency audio com-ponent of the ultrasonic signal.Final amplification is at audiofrequency after the detectionprocess.

In such a line up there is nomixer as such and no intermedi-ate frequency amplification.This is illustrated by the recov-ery graphs shown in Fig.1.

CIRCUITDESCRIPTION

The puncture finder relieslargely on an ultrasonic trans-ducer to select the input fre-quency. This is an electrome-chanical device, which convertsthe ultrasound to what is in ef-fect a VLF (very low frequency)radio signal. From there on theprocessing is the same as atuned-in radio signal. The com-plete circuit diagram for the Ul-trasonic Puncture Finder isshown in Fig.2.

The ultrasonic transducer,

Page 7: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 779

RX1,is a highimpedance de-vice, and its output isbuffered by the low-noisefield-effect transistor (FET)TR1, which acts as a voltagefollower. A simple high-pass fil-ter consisting of capacitor C1,resistor R3, and capacitor C2removes any audio frequencycomponents from the signal.This is a major requirement toprevent audio feedback fromthe loudspeaker and conse-quent instability.

Transistors TR2 and TR3provide a gain block to lift thesignal to sufficient amplitude todrive the diode detector D1. Thefeedback capacitor C4 providestop cut and improves the RFstability of the circuit.

A strong noise input signalwill produce a few millivolts(mV) at most from the trans-ducer. With a gain of some 600times before the detector, thestronger ultrasound sourcestherefore produce full audio out-put.

Unfortunately, siliconediodes stop conducting muchbelow about 600mV and sensi-tivity is lost. The diode detectoris therefore slightly forward bi-ased to increases the sensitiv-ity. This is achieved by resistorR9, which injects about 80mAinto the diode. With this setup,the increase in sensitivity isquite dramatic and very weak

sources of ultrasonic noise can betraced.

The audio level to the outputamplifier IC1 is controlled bypotentiometer VR1. AlthoughVR1 is a linear device, the

overall loudness controlseems even over the

track because of thenon-linearity of thedetection system.Audio amp IC1 is set

to a voltage gain of200 by capacitor C7 and

it has sufficient power todrive the small loud-

speaker LS1.

With this high gain circuit it isessential to remove any ripple onthe supply line to prevent instabil-ity. The simplest way to achievethis is with a large electrolytic ca-pacitor, C12 in this circuit. Capac-itor C11 is a ceramic device,which de-couples high frequencycomponents more effectivelythan C12.

MECHANICAL FILTERAn essential component in

the circuit is the home-made me-chanical filter, which de-couplesthe ultrasonic transducer RX1from the instrument case. This is,in fact, a small circle of rubberabout 6mm thick, which is aboutone wavelength. At full volume,any distortion in the audio ampli-fier or the loudspeaker results inhigh frequency harmonics, which,if they reach the transducer, pro-duce a bad case of “howl-round”.

The quiescent current drawnby the complete circuit is lessthan 9mA and this peaks to about65mA at full volume. The proto-type worked with no performancechange down to 7¬¬¬5V, and wenton working down to 6V with lossof volume. An alkaline PP3 bat-tery is therefore well suited to

power the puncture finder forintermittent use.

SURFACEMOUNTING

This is a surface mount pro-ject and construction will in-volve working with some prettysmall devices. The “chip” com-ponents specified are the mostsuitable for hand soldering, butthey are not the smallest SMDsavailable. The only require-

&RQVWUXFWLRQDO3URMHFW

COMPONENTSResistors

R1, R2 100k (2 off)R3 47k bead N.T.C. thermistorR4 680kR5 2k2R6 1k5

See also theSHOP TALK Page!

All 0.25W 1% metal fi lm (except R3, see text)

CapacitorsC1 100u radial electrolytic, 10VC2, C3 2u2 radial elect. 50V (2 off)

SemiconductorsD1 1N4148 signal diodeTR1 BC549 npn silicon transistorIC1 LF441CN low power opamp

Miscel laneousB1 6V battery pack (4xAA cells in holder)S1 s.p.s.t. miniature toggle switchWD1 6V miniature DC buzzer

Printed circuit board availablefrom the EPE Online Store, code7000932 (www.epemag.com );medium size plastic case; PP3battery connector; control knob;approx 36s.w.g. (0.19mm) enameledcopper wire; multistrand connectingwire, solder pins; solder, etc.

$19Approx. CostGuidance Only(Excluding Batteries)

Potent iometerVR1 100k carbon rotary, linear

Page 8: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 780

&RQVWUXFWLRQDO3URMHFW

ments for population are a finesoldering iron of the type usedfor normal leaded componentsand a pair of tweezers.

Although an SM circuit canbe constructed by the simplemethod described below, sev-eral specialized techniqueshave been developed for handworking. It is important to im-prove SM skills, especially formore complex circuits wherereliability can be improved bymore appropriate solderingmethods.

Non-magnetic or demagne-tized tweezers are required forhandling SM chip componentsas their contacts contain nickeland they are magnetic. Becausethey are so small and light, theywill stick to magnetized tweez-ers making accurate placementvery tedious.

CONSTRUCTIONThe component layout

(twice-size) on the small surfacemount printed circuit board(PCB), together with the(approximately) full-size copperfoil master, is shown in Fig.3.Here the components aremounted directly on the copperpads; no holes are drilled in thePCB. This board is availablefrom the EPE Online Store(code 7000236) atwww.epemag.com

The simplest method ofsoldering an SM device is tohold it on the circuit boardpads with the tweezers andsolder one end with a little sol-der carried on the iron. Havingfixed one end, the second end(or the remaining contacts inthe case of active devices)can be soldered by the morereliable method of applyingthe iron and solder to the jointat the same time. The anchor-

Completed surface mount PCB. Note that components aremounted directly on the copper pads.

B! B"

B#

3!

3"

DB"

DB#

DB!B%B& B)

3$

3%

B'

B( 3&

93!

B!

3! 3)

3!!

3'

3(B$

4!

WT

c

U

U

R

R

S

S

Q

[

1

2

3

DB!D?@

F95G

DB"1>4DB#

D?@F95G

U

RS

c

TW

Q[

4!

3#

"#&

Fig.3. Layout of components on a twice-size surface moundPCB and (approximately) full-size copper foil master pattern.The transistor and diode printouts are also included.

<C!

2!

3!"

BH!

FB!

C!

?>?66

F?<E=5

6?1=

BE225B

6?1=

BE225B

11

1

22

2

3

3

3

FB!

45D19<

Fig.4. Positioning of components inside the small handheldcase. Keep the ultrasonic transducer and loudspeaker as far

apart as possible.

Page 9: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 781

ing end can subsequently bere-soldered if required.

A suggested method of con-struction is to place all the resis-tors and then the capacitors,finishing off with the transistorsand finally IC1. Ceramic chipcapacitors are delicate and re-quire the smallest amount ofsolder and the shortest heat du-ration.

In severe cases the con-tacts can become detached, butthis is an indication of excessivestress and only occurs withheavy reworking during faultfinding. More problematic per-haps is part detachment of thenickel contact or cracking of theceramic where the fault may notbe seen. It is essential that thetantalum capacitors and thediode are wired the right wayaround. (For more informationon SM construction see the au-thor’s web site atwww.billsSMD.mcmail.com )

IN THE BOXAll the elements fit easily into

a standard 111mm 57mm x22mm plastic project box. Thelayout is not critical except for twopoints.

The loudspeaker and ultra-sonic transducer must be as farapart as possible and orientatedat right angles to each other. Thesuggested layout should be fol-lowed in this respect.

Secondly, the ultrasonictransducer RX1 must be me-chanically isolated from thecase and hence the loud-speaker. This is simplyachieved by using a small discof non-conductive foam rubberto mount the transducer asshown. A thin layer of adhesivesuch as Evostick holds thesandwich together.

The foam disc should be as

soft as possible, a rubber gasketmaterial about 6mm thick wasused for the prototype. Anothersource of this type of soft foamis the backing from computermouse mats.

A small piece of the samefoam should be placed over theon/off switch contacts to isolateit from the metal base of thebattery. Make certain that thefoam is not conductive. The po-sition of the various compo-nents in the case is shown inFig.4.

The small loudspeaker isheld in place by a thin layer ofglue on the magnet. Thespeaker type suggested is anexact fit in the prototype case,see photographs. A speakergrille will need to be fashionedfrom a series of holes in the boxlid. The prototype sound outletconsisted of eight equallyspaced 6mm holes and a cen-tral 8mm hole.

A “knobpot” is suggested forthe volume control VR1. Theseare expensive but made to avery high standard and take upvery little space inside the box.

The populated circuit boardis also glued in place and doesnot therefore require any holesto be drilled. The decouplingcapacitor C12 is adequatelysupported by its own leads.

WIRING-UPThe connecting wires to the

Volume control, loudspeaker,and transducer is a fine, 0diameter and multistrand (7/0

¬¬¬8mm¬¬¬1)

flexible wire rescued from asection of 25-way computer ca-ble. This type of wire is ideal forsurface mount projects where aflexible connection is required.The interwiring details areshown in Fig.4.

The ultrasonic transducer

specified comes with a metalcut-out grille or a wire meshguarding the sensing element,the wire mesh type is marginallymore suitable for this applica-tion. Finally, it is worth decorat-ing the finished device withsome labels at least markingthe on/off switch positions. Suit-able labels can be designedeasily with a computer drawingpackage.

TESTINGIf all is well, the Ultrasonic

Puncture Finder should workright from switch on as there areno adjustments to be made tothe circuit. But it is best to carryout a few spot checks beforeapplying power and putting thelid on the box.

The most obvious items tocheck are the polarity of theelectrolytic capacitors and thediodes. Surface mount transis-tors can come with a lead-out“joggle” especially the FET but the drawing shown is by farthe most popular. If the devicecannot be coaxed to work, itmay be worth just checking thetransistor pins in the usual way,but this really is a last resort.

Reduce the volume to mini-mum and measure the quies-cent current. If this is about9mA it is very likely that the cir-cuit is working correctly.

Finally, increase the volumeand see if you can track downsome ultrasound. A low hiss fromthe loudspeaker is a good indica-tion.

SOUND SOURCEThere are many sources

that can be used as a test sig-nal. A portable and very usefulultrasonic noise generator isyour thumb and forefinger, just

&RQVWUXFWLRQDO3URMHFW

Page 10: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 782

rub them together in front of thetransducer. This source shouldbe detectable at well over a me-ter distance from the trans-ducer, depending on the dry-ness of the skin. Other sourcesinclude expanded polystyreneand running computers.

If the foam filter is doing itsjob there should be no feedbackinstability at full volume. It ispossible to induce feedback asa test of sensitivity by reflectionof the speaker output back tothe input using your hands or aflat surface as a sound reflector.Other fun ideas will no doubtarise.

Finally, it is simple todemonstrate that this circuit isworking as a straight receiver byconnecting a few feet of wire tothe “hot” side of the transducer.Random radio noises and theodd AM radio station shouldemerge from the speaker.

OPERATIONIn order to find a puncture,

the offending inner-tube mustbe fully inflated so as to maxi-mize the air flow and increasethe chances of turbulence. It isalso useful to examine the tirebefore the tube is removed as

this way the nail or thorn canoften be found and the approxi-mate location of the hole deter-mined.

The puncture finder can bea help with this also. Slowly ro-tate the wheel keeping the de-tector a couple of centimetersfrom the tire until the air exit isdetected as a noise from thespeaker. In most cases therewill be some slight movementbetween the tube and tire sothat the air escapes randomlyfrom around the rim.

TEST TUBESometimes the leak can be

detected in this way but it maynot be a good guide to the ac-tual puncture location. The tubemust be removed eventually sothere is little point in spendingtoo much time looking for theleak beforehand.

Having removed the tubeand made sure that it is as fullyinflated as possible run the de-tector around the outer edgefirst. This is where the hole ismost likely to be located. Keepthe transducer as close as pos-sible to the rubber surface. Ifthis is not successful then run acheck around each side in turn.

The three tests on the tube willtake only about a minute tocomplete.

If there is still no successthen the action needs to be re-peated but at a much slowerand more methodical pace, tak-ing care to cover the completetube surface. Stretching thetube slightly can often open asmall hole releasing sufficientair to be detected.

Keeping the transducerclose to the tube is also helpfulas a small air-flow hitting thegrille can induce detectable tur-bulence, particularly with thewire mesh covered variety oftransducer. Keeping the tubewell inflated will also improvethe chances of turbulent flowfrom the leak.

If there is still no leak at thisstage you may have to resort tothe dreaded water test or carrya pump, because it is obviouslya very slow puncture.

&RQVWUXFWLRQDO3URMHFW

Page 11: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 783

Following last month’s EPEMood PICker project, it was feltthat constructors wishing to ex-periment further with this type ofdevice might welcome a simplemethod of indicating the relativestrength of magnetic fields pro-duced.

Magnetic field sensors arenot new to the pages of EPE, butmost of those published recentlywere intended to indicate thepresence of alternating fields em-anating from 50Hz AC mains op-erated appliances which have rel-atively high levels and frequen-cies.

The tiny, low frequency fieldsproduced by the EPE MoodPICker and its predecessor theEPE Mood Changer (June ’98)are harder to detect, and in fact itis necessary to place the MoodPICker practically in physical con-tact with the author’s MagneticField Detector (Jan ’95) to obtainan indication. This makes it im-practical to gain any idea of rela-tive field strength from variousdesigns in terms of range for agiven level of indication.

WHAT SENSOR?When designing an instru-

ment capable of detecting theoutput of devices like the MoodPICker, the first consideration iswhich type of sensor should beused to actually detect the field.The obvious type is an inductivedevice such as a coil. The disad-

and, when tried, proved to bestill insufficiently sensitive forthis project. When sufficient cir-cuit gain was used to obtain therequired sensitivity, the signalall but disappeared into back-ground noise from the device.

FLUXGATEA third type of sensor which

can be used is the FluxgateMagnetometer. These alsomeasure absolute field strength,and are renowned for their very

Can even detect moving magnets at five metersthrough brick walls!

0$*1(7,& ),(/' '(7(&7,9(

E\ $1'< )/,1'

vantage of coils is that they re-spond not to the absolutestrength of the surroundingmagnetic field, but to its rate ofchange, making them relativelyinsensitive to very low fre-quency fields.

An additional difficulty en-countered with the Mood PICkerand Mood Changer is that theiroutputs are synthesized andtherefore change in a series ofsmall discretesteps. This re-sults in the corre-sponding outputfrom an inductivesensor appearingas a series ofspikes, and it isthis that the origi-nal detector de-sign is indicatingrather than theactual strength ofthe field pro-duced.

A Hall Effect sensor mightbe more suitable, as these pro-duce outputs proportional to ab-solute field strength, but mostare relatively insensitive. One ofthe most sensitive types that iswidely available is the LOHET,which is relatively expensive

C5>C?B

67=#

3BICD1<B565B5>35

?C39<<1D?B

=9H5B

41D1

3<?3;

1=@<9695B

C@51;5B

<54

9>4931D?B

&$'#&[8j ###"""#&&&((([[[888jjj

'

$ 8j

DE>9>>>7

=17 5D

Fig.1. Block diagram of the Magnetic Field Detective.

high sensitivity. Their construc-tion used to be complex and dif-ficult, but a ready-built sensor ofthis type is now available at rea-sonable cost, which allows ex-perimenters to venture into thearea of weak magnetic field de-tection far more easily.

Two basic versions of this

Page 12: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 784

device are currently available,the FGM-1 and the slightlylarger and more sensitive FGM-3 (the latter device was used onPIC-Agoras Bike Computer Apr/May ’97. Ed). Both operatewith a modest current of around12mA from a single +5V supply,so they may be used in batterypowered designs having simpleregulation.

The output from either is arail-to-rail rectangular waveformwith a period proportional to thepolarity and strength of the field,such that the center frequency,found at lowest magnetic fieldintensity, is about 60kHz. Thiscan be processed directly by amicrocontroller such as a PIC,or it may be converted into avoltage for use in analog circuitdesigns. More about these tech-niques, perhaps, in future pro-jects.

For the present application,what is required is a simple andinexpensive circuit offering veryhigh sensitivity. The more sensi-tive FGM-3 sensor is used inthis design and, since its outputis a high frequency, the simplestway to indicate small changes inthis, with excellent sensitivity, isto mix it with the output of a ref-

erence oscillator of similar fre-quency, in the manner of thefamiliar BFO (Beat FrequencyOscillator) metal detector.

The resulting output doesn’tsound very pleasant (nor did theold BFO metal detectors!), butwe’re not seeking musical ex-cellence here, just simplicityand sensitivity and this tech-nique certainly delivers both.

BLOCK DIAGRAMA block diagram of the pro-

ject is shown in Fig.1, whichdemonstrates the principle withsome typical frequency values.The output frequency of theFGM-3 varies considerably asits position changes in relationto the earth’s magnetic field.

Although it has a “feedback”coil which can be used fornulling purposes, this requirescurrent and the provision of adual-rail supply so that it can bedriven in either polarity. A muchsimpler way to achieve thesame effect is to place a smallmagnet nearby and rotate it un-til it counteracts the earth’s fieldto achieve the required outputfrequency. This in no way de-grades the FGM-3’s sensitivity,

&RQVWUXFWLRQDO3URMHFW

2!

)F

H!

#" '&([8j

3"

! ^

>3

F

62 3?9<

C5D"

BCD"

3<;"

F44

'

$

&

"

%

C5D!

BCD!

3<;!

4!

A!

$ !#2

3#

! ^

3$&(`

B"! [

!!

!"

(

!

A"

"

#

>3

3!

$' ^

93!67=#

%F

?ED

!

!$

FCC

A!

93"

#

B!! [)

!#A"

4"

'

B'

"' :

&

3%&(`

B#

! =

B$! [

3&

! ^

!

3)

! P

4"

!>$!$(

4!!>$!$(

$

3(

! P

3!$

$' P

3!#

! ^4#

B&

$':

<C!

(:

3!"! ^

%

B%

""[

3'

! ^

(3!

! P

3!!

! P

?ED9>

3?=

93$<@")%

C!

93#R14(%#"

14(%#"93#Q

Q

Q

Q

[

[

[

?>?66

Fig.2. Complete circuit diagram for the Magnetic Field Detective.

in fact it probably improves it byensuring that it is operatingclose to the center of its range.

The sensor output is firstdivided by two, which results ina perfect 50:50 duty cycle at alower frequency of about 32kHz.The design of a suitable refer-ence oscillator initially pre-sented a problem. Readers whohave built BFO metal detectorswill no doubt recall how the out-put of these used to drift anddistort as the two oscillatorstended to “pull” or lock ontoeach other through stray cou-pling.

INSPIRATIONVarious simple reference

oscillators tried with this circuitexhibited the same problems,but then came inspiration! Anoscillator using a watch crystaloperates at 32¬¬¬768kHz, which isideal for this project. If this ismixed with the output from thesensor the magnet can be usedto adjust the audio output fre-quency, resulting in simple tun-ing and rock solid stability.

The mixer function is car-ried out digitally by applying thesignal to the data input of a flip-

Page 13: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 785

flop whilst clocking it with thereference signal. The outputfrom the flip-flop when the cir-cuit is correctly tuned is asquarewave of audio frequency.This is buffered to provide suffi-cient power for a small loud-speaker.

If the circuit is not tunedcorrectly, the output from theflip-flop may be a harmonic ofthe wanted signal, which cansound rather similar to it. Be-cause of some simple low-passfiltering, this will have a loweramplitude, but this is still notreadily apparent to the ear so avisual tuning indicator is in-cluded in the form of a light-emitting diode (LED), whichonly lights when the correct tun-ing point is found.

The frequencies shown inFig.1 are fairly typical for nor-mal operation. If the sensor fre-quency changes by just 100Hz,or less than 0¬¬¬2 per cent, theoutput will change by 50Hz,which is easily heard by theuser. In practice, much smallerchanges than this are clearlyaudible.

FULL CIRCUITThe full circuit diagram for

the Magnetic Field Detective isshown in Fig.2. At the left is thesensor, IC1, provided with a lo-cal supply decoupling capacitor,C1, as recommended by themanufacturer since it is con-nected through a short length ofribbon cable.

The sensor output signal isapplied to the clock input(CLK1) of one of the two flip-flops in IC2, a 4013B dual flip-flop. The Q1 output of this isconnected to the data (D1) inputin the classic divide-by-two ar-rangement, and the Q1 output isconnected to the D2 input of thesecond flip-flop.

Opamp IC3a operates as anoscillator with crystal X1 settingthe frequency to 32¬¬768kHz. Thevalue of 68pF used for capacitorsC4 and C5 may seem a trifle highfor this type of crystal, but experi-ment proved it to be the best forreliable start-up and operation.

Resistor R3 provides theopamp with a small amount ofnegative feedback, and R4 re-duces drive power to the crystalto a safe value. The oscillatoroutput is applied to the clock in-put (CLK2) of the second flip-flopof IC2 and the audio frequency isoutput from Q2.

Low-pass filter R5 and C6 im-prove its quality a little before it isbuffered by IC3b to drive thespeaker LS1. It is possible toeliminate this stage and savesupply current by connecting apiezo transducer across the Q2and Q2 outputs of IC2, but read-ers may rest assured that thesound quality obtained in this wayis truly horrible, so the use of aloudspeaker is heartily recom-mended!

Resistor R6 sets the outputvolume and its value can be al-tered if required. Finally, a small“charge pump” using capacitorsC8 and C9 with diodes D1 and D2is used to light LED D3. It willonly do so when the amplitude ofthe output is high enough, andthe attenuation of higher frequen-cies by R5 and C6 ensures thatthis only happens over the correcttuning range.

The AD8532 dual opamp IC3is a recent arrival in the amateurconstructor’s market and hassome rather special qualities. Theinputs and outputs can operate atany potential up to and includingboth supply rails and the outputscan deliver up to 250mA of cur-rent, sufficient to drive a smallloudspeaker at modest volume.

The recommended supplyvoltage is 3V to 6V, but users

&RQVWUXFWLRQDO3URMHFW

COMPONENTSResistors

R1, R2, R4 100k (3 off)R3 10MR5 22kR6 47 ohmsR7 270 ohms

See also theSHOP TALK Page!

All 0.25W 5% carbon fi lm

CapacitorsC1 470n ceramicC2, C3, C7, C12, C13 100n ceramic (5 off)C4, C5 68p ceramic (2 off)C6 10n ceramicC8, C9 10u radial elect. 25V (2 off)C10, C11 100u radial electrolytic 10V (2 off)C14 470u radial electrolytic, 16V

SemiconductorsD1, D2 1N4148 signal diode (2 off)D3 3mm red LED, 2mA typeIC1 FGM-3 fluxgate magnetometer sensorIC2 4013B CMOS dual fl ip-flopIC3 AD8532 dual opampIC4 LP2950 5V micropower regulator

Miscel laneousLS1 8 ohm loudspeaker, 40mm dia.S1 miniature s.p.s.t. toggle switchX1 32.768kHz crystal

Printed circuit board availablefrom the EPE Online Store, code7000239 (www.epemag.com );8-pin DIL socket; 14-pin DIL socket;4-pin wire-wrap DIL socket; 9V PP3battery and clip; ribbon cable; plasticcase (see text); magnet (see text);heat-shrink sleeving (see text);wire, solder, etc.

$38Approx. CostGuidance Only

should be aware that the abso-lute maximum is stated to be7V. The versatility of the de-vice can be seen in this circuit,where one of the two ampli-fiers operates as a crystal os-cillator whilst the other drivesthe loudspeaker.

The supply for the circuitis regulated by IC4, an LP2950three-terminal +5V regulator.This has a superior perfor-

Page 14: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 786

mance to that of the 78L05 andcan operate from a much lowerinput voltage. The manufactur-ers of the FGM-3 state that out-put depends to some extent onsupply voltage, so the improvedregulation will help in minimiz-ing drift in this project. Capaci-tors C11 to C14 are included toprovide supply decoupling.

CONSTRUCTIONThe printed circuit board

component and track layoutsare shown in Fig.3. This boardis available from the EPE On-line Store (code 7000239) atwww.epemag.com

Construction should presentno special difficulties the pre-ferred procedure is to fit lowprofile components such as re-sistors and diodes first, followedby the smaller capacitors andthen the electrolytics. The useof dual-in-line (DIL) sockets isrecommended for IC2 and IC3.

The 32¬¬¬768kHz watch crys-tal X1 is readily available frommany component suppliers, butconstructors with good eyesightmight even use one salvagedfrom an old watch! Commer-cially supplied versions are usu-ally physically larger though,and have longer leads. Becausethey look fragile and the leadsare thin, it is advisable to secureX1 to the board with a drop ofglue before soldering.

The four connections to theFGM-3 are shown in Fig.4,along with their functions. Sinceit will undoubtedly be used infuture projects, and also to re-duce any possibility of damage,it was decided not to solder di-rectly to these pins. Their spac-ing is the same as that of a typi-cal DIL IC, so a suitable socketfor them was made by cutting asection from a “wire-wrap” DILsocket with a sharp knife.

&RQVWUXFWLRQDO3URMHFW

Thesesockets haverelatively longand robustconnectionsto which thecapacitor C1and about300mm ofribbon cable can be soldered asshown in Fig.5. Heat-shrinksleeving was fitted over theconnections to give them addedphysical strength. It should benoted that the FGM-3’s pins areflat in section and fairly wide, sothey will not fit into a turned-pinsocket.

Before fitting IC2 and IC3,the board should be powered sothat the presence of the regu-lated 5V supply can be checkedon their sockets at pin 14 (IC2)and pin 8 (IC3). After this, thesetwo ICs can be inserted and thespeaker and sensor connectedfor testing.

C!

D?21DD5BI

2!

<C!

3!"

3!#

3!$

3!!

4#

4!4"

3"93"

B$

3$

3#

3%

B#

B!

B"

93#

93$

3'

3!

3( 3)

B

%

3&

B&

Q

[

B'

H!

?>?66

F5

F F

%F

?ED@ED

62

67=#

3!

=?E>D54?>

C?3;5D

B922?>312<5

?ED

3?=

9>

Fig.3. Component layout, (approximately) full-size copper foilmaster pattern, and off-board interwiring details.

6554213;3?9< F 7B?E>4

%F?ED@ED

Fig.4. Connections for theFGM-3 sensor.

3!

%F

65555444213;;;3?9<

F 7B?E>4

?ED@ED

C?3;5D

3ED6B?=

G9B5GB1@49<C?3;5D

$G1IB922?>312<59CC?<45B D?D85C5@999>>>C1>4CDB5>7D85>54G9D8 851DC8B9> C<55F 7

Fig.5. Providing a socket forthe FGM-3, with capacitor

C1.

Page 15: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 787

SETTING UPThe current drawn by the cir-

cuit varies quite a lot with thefield being sensed, but as a roughguide, when tuned, the average isabout 25mA to 30mA. Placing asmall bar magnet, such as thosesold for reed relay operation,about 100mm to 150mm from thesensor (in any position, to eitherside or behind it) and rotating itslowly should produce variousstrange noises and, hopefully, atsome point the LED will light.

When this happens, the mag-net should be adjusted carefullyfor a steady audio tone of suitablepitch. Blobs of Blu-Tack will befound invaluable for holding thesensor and magnet in position asthis is done. Once the operatingpoint has been found, the effectof moving another magnet in thevicinity can be tried.

Most magnets will be easilydetectable at more than 300mmand strong ones will produce aresponse from several meters. Ifthe tone sounds seriously“mushy” and unclear during ad-justment attempts, the problem islikely to be 50Hz pickup frommains appliances and wiring inthe vicinity, especially transform-ers, in which case it may be nec-essary to relocate the unit some-where magnetically quieter.

ENCLOSURESelection of a housing for this

project is up to the individual con-structor. For efficiency, smallloudspeakers really need a caseof some kind to prevent soundwaves from the rear simply can-celing those from the front.

The prototype has the PCB,battery, loudspeaker, and on/offswitch S1 in a small plastic casewith the sensor attached via theribbon cable. This can be set upon a board with the magnet, using

Blu-Tack to keep everything inplace whilst allowing easy adjust-ment.

IN USEThe assembly has to be used

in a static position, as smallmovements relative to the earth’sfield can take it right off scale. Itis placed in the desired position,switched on and the tone set withthe permanent magnet, then it iskept in this position for the de-sired test.

The Mood PICker and MoodChanger projects are both de-tectable at several centimeters,producing clearly audible pitchchanges and a distinctive quaver-ing note at higher frequencies. Infact, the original Mood Changercan be detected at up to 500mm.

Other uses for this simpleproject are obviously limited onlyby the imagination of the con-structor. Examples would be de-tection of moving objects at a dis-tance by attaching magnets tothem, and detection of large fer-rous objects such as vehicles bythe distortion in the earth’s mag-netic field they cause in passing.

It would obviously be possible

to add a frequency-to-voltage cir-cuit if a voltage output is re-quired, though for accuracy a cir-cuit converting period to voltageis better.

PARTY PIECEFinally, even non-

electronically minded people can-not fail to be impressed by thisproject’s “party piece”. If a fairlypowerful magnet is suspended ona thread with north and southpoles facing horizontally out-wards, when set spinning it willgenerate a sinusoidally varyingmagnetic field. With the prototypethis was done using a ferrite ringmagnet of the kind used in loud-speakers, with a diameter ofabout 50mm.

The resulting alternating fieldcould be detected easily atranges of over five meters,through brick walls just as easilyas through air. This gives rise tothe idea of a Mood Changer pro-ject for a wide area coverage us-ing a spinning permanent mag-net, but this one is still on thedrawing board at present!

&RQVWUXFWLRQDO3URMHFW

Page 16: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 788

Like most modern gadgets,freezers offer excellent reliabilityand problems with them are ex-tremely rare. It is easy to be lulledinto a false sense of security bythis reliability, because like everyother gadget freezers can and dogo wrong occasionally.

If the problem is not spottedin time, the likely result is a greatdeal of wasted food. Unfortu-nately, unless smoke starts topour out the back of the freezer, itis unlikely that the problem will benoticed until the food has de-frosted and you are confrontedwith a soggy mess.

This very simple alarm pro-ject provides an early warning ofproblems by sounding an audiblealarm if the temperature insidethe freezer rises above a presetthreshold level. The user isalerted to the fault long before thefood has a chance to defrost, andhopefully in time to get the prob-lem fixed before the food is ru-ined.

The circuit is battery poweredand is therefore immune to failureof the mains supply. Although theunit must be left running continu-ously, the current consumptionhas been kept to a very low levelthat ensures each set of batterieshas virtually its “shelf” life.

CIRCUIT OPERATIONThe full circuit diagram for

the Freezer Alarm is shown inFig.1 and is an ideal “starter pro-

conditions the resistance of R3is very similar to that of R4(about 680 kilohms).

This gives approximatelyhalf the supply potential fromthis section of the bridge. If thethermistor is made colder itsresistance rises, and the outputvoltage from that side of thebridge reduces. Conversely, ifits temperature is increased, itsresistance falls, causing the out-put voltage to increase.

The output potential fromthe other section of the bridge isdependent on the setting of po-tentiometer VR1. The wiper(moving contact) voltage ofVR1 can be set to anything fromone third of the supply potentialto two thirds of the supply volt-age. In practice this is adjustedfor an output voltage that isfractionally higher than the out-put voltage from the other armof the bridge.

For a small outlay you could save yourself from anexpensive “thaw-out”!

)5((=(5 $/$50 E\ 52%(57 3(1)2/'

ject” for the newcomer to elec-tronics. The temperature sensoris a negative temperature coef-ficient thermistor (R3), which iseffectively a resistor whosevalue changes with variations intemperature. The higher thetemperature of the thermistor,the lower its resistance be-comes.

A form of bridge circuit isused, with thermistor R3 andresistor R4 forming one arm ofthe bridge. Resistors R1 and R2together with potentiometer VR1form the other section of thebridge circuit.

Each arm of the bridge gen-erates an output voltage that issome fraction of the supply volt-age. The output voltage fromthermistor R3 and R4 dependson the resistance of the thermis-tor, and the circuit is designedso that under normal operating

R

S

U

3!! P

B"

! [

FB!

! [

B!

! [

3#" "P" "P

3"

B$&( [

D5=@

B#

$'[

4!!>$!$(

B&![%

B%"["

?>?66

C!

G4!

&F

DB!23%$)

93!<6$$!3>

'

$

#

"

&

2!

&F

Q

$ H 11

[

d

Fig.1. Complete circuit diagram for the Freezer Alarm. Compo-nent designated R3 is the thermistor temperature sensor.

Page 17: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 789

VOLTAGE COM-PARATOR

In this circuit an operationalamplifier (opamp), IC1, is usedas a voltage comparator. Anoperational amplifier amplifiesthe voltage difference across itstwo inputs, and at DC it pro-vides an extremely high voltagegain. A theoretical operationalamplifier has infinite voltagegain, but a typical “real world”device exhibits a voltage gain ofabout 100,000.

Consequently, only aminute voltage is needed acrossthe inputs in order to send theoutput fully positive or negative.The output goes positive if thenon-inverting input (pin 3) is atthe higher potential, or negativeif this input is at the lower volt-age.

In this case VR1 is adjustedso that the inverting input (pin2) is at the higher voltage undernormal conditions, which sendsthe output of IC1 (pin 6) to avery low voltage. This results in

tor R3 risesslightly, its resis-tance falls andthe voltage sup-plied to IC1’s non-inverting input(pin 3) increases.This takes thenon-inverting in-put to a highervoltage than theinverting input,and the output of

IC1 then goes high. Thisswitches on transistor TR1,which in turn activates warningdevice WD1. The circuit there-fore provides the desired effect,with a warning being provided ifthermistor R3 is taken abovethe threshold temperature setusing control VR1.

It is possible that buzzer WD1will provide a highly inductiveload for transistor TR1, and pro-tection diode D1 has been in-cluded to protect TR1 from anyhigh reverse voltages that aregenerated. Capacitor C2 and C3help to prevent electrical noisefrom giving erratic operationwhen R3 is very close to thethreshold temperature.

PRACTICAL APPROACHA bridge circuit and a ther-

mistor may seem to be a slightlyold fashioned solution to temper-ature sensing, but this arrange-ment often represents the mostpractical approach in applicationsthat only require a certain temper-ature to be sensed rather thanprecise temperaturemeasurement.

&RQVWUXFWLRQDO3URMHFW

93!

DB!

?>?66

B#

4!

F5

U

R

S

B54

F5

2<13;

F5

D? 21DD5BI 2!

C!

D5=@

B

$3"B

"

B!

B%

3# 3!

B&

FB!

G4!

2<13; B54

Fig.2. Multi-project printed circuit board component layout, in-terwiring, and (approximately) full-size copper foil master.

Double-check the layout as not all holes are used.

switching transistor TR1 beingturned off, and no power is sup-plied to warning device (buzzer)WD1.

However, if the freezer failsand the temperature of thermis-

Front panel layout showingthe mounting of the warning

buzzer.

Page 18: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 790

A major advantage of thistype of circuit is that it is inher-ently stable. The temperature atwhich the bridge balances andthe output voltages are equal isnot affected by changes in thesupply potential. The inevitablechanges in the battery voltagedue to aging consequently haveno affect on the accuracy ofthe unit.

For battery operation to bea practical proposition it is es-sential for the circuit to have avery low current consumption.For this reason IC1 must be alow power opamp, and it mustalso be capable of working rea-

sonably well on a 6V supply. TheLF441CN works well in this circuitand the use of alternativeopamps is not recommended.

The use of a high value ther-mistor also helps to minimize thebattery drain. Although R3 has anominal resistance of 47 kilohms,this is its resistance at +25C. Inthis application it will operate at amuch lower temperature ofaround tance is over ten times higher.

20C where its resis-

The high resistance throughR1, VR1, and R2 also helps tominimize the current consump-tion. The total current consump-tion of the circuit is typically un-der 200mA, which should providemany months of continuous oper-ation from even the cheapest ofAA batteries.

CONSTRUCTIONThe Freezer Alarm project

utilizes the EPE multi-projectprinted circuit board (PCB). Thecomponent layout and wiring,together with the(approximately) actual size cop-per foil master pattern, areshown in Fig.2. This board isavailable from the EPE OnlineStore (code 7000932) atwww.epemag.com

The usual words of cautionabout using this particular boardhave to be given. The majorityof the holes in the board are leftunused, making it relativelyeasy to get a component in thewrong place. It is therefore es-sential to take a little more carethan usual when fitting the com-ponents onto the board.

&RQVWUXFWLRQDO3URMHFW

COMPONENTSResistors

R1, R2 100k (2 off)R3 47k bead N.T.C. thermistorR4 680kR5 2k2R6 1k5

See also theSHOP TALK Page!

All 0.25W 1% metal fi lm (except R3, see text)

CapacitorsC1 100u radial electrolytic, 10VC2, C3 2u2 radial elect. 50V (2 off)

SemiconductorsD1 1N4148 signal diodeTR1 BC549 npn silicon transistorIC1 LF441CN low power opamp

Miscel laneousB1 6V battery pack (4xAA cells in holder)S1 s.p.s.t. miniature toggle switchWD1 6V miniature DC buzzer

Printed circuit board availablefrom the EPE Online Store, code7000932 (www.epemag.com );medium size plastic case; PP3battery connector; control knob;approx 36s.w.g. (0.19mm) enameledcopper wire; multistrand connectingwire, solder pins; solder, etc.

$19Approx. CostGuidance Only(Excluding Batteries)

Potent iometerVR1 100k carbon rotary, linear

Positioning of components inside the two halves of the case.Note the space for the battery pack.

Page 19: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 791

In all other respects, con-struction of the board is mainlystraightforward. The LF441CNused for IC1 has a JFET inputstage that does not require anti-static handling precautions, butit is still advisable to use an ICholder for this component. Becareful to fit the three capacitorsand diode D1 the right wayround, and leave D1 until last.

Close tolerance metal filmresistors are specified in thecomponents list, and it is defi-nitely advisable to use highquality resistors if the unit willbe used in a garage or otheroutbuilding where the ambienttemperature is likely to varyover a wide range. Ordinary fivepercent tolerance carbon filmresistors should suffice if thealarm will only be used indoors.

Capacitor C3 must be agood quality electrolytic or tan-talum capacitor. Otherwise anyleakage through this componentcould impair the performance ofthe circuit.

A single link-wire is needed,and this can be made from apiece of wire trimmed from aresistor leadout. Fit single-sidedsolder pins at the points on theboard where lead-off connec-tions will eventually be made tothermistor R3, buzzer WD1, the

&RQVWUXFWLRQDO3URMHFW

battery connector, switch S1and temperature control VR1.The tops of these pins shouldbe generously “tinned” with sol-der.

FINAL ASSEMBLYA small to medium size

plastic case is adequate for thisproject. Very small boxes areunlikely to be suitable as theywill not accommodate the bat-tery pack which consists of fourAA-size cells in a plastic holder.The connections to the holderare made by way of an ordinaryPP3 battery connector.

From the mechanical pointof view construction offers littleout of the ordinary, but thebuzzer (WD1) has unusualmounting requirements. Theeasiest way to mount this de-vice is to fit it on the front sur-face of the front panel, see pho-tographs. It is then only neces-sary to make two small mount-ing holes for the M2¬¬¬5 or 8BAmounting bolts, plus a third topermit the two “flying” leads topass into the case.

Alternatively, it can bemounted on the rear surface ofthe panel if a rectangular cutoutfor the body of the component ismade in the panel. Note that

modern buzzers invariably re-quire the supply to have the cor-rect polarity, and that the redand black leads must be con-nected in the manner shown inFig.2.

THERMISTOR SITINGObviously, the thermistor

R3 must be mounted inside thefreezer and not in the alarmunit. It must be connected to thealarm circuit by way of very finewires that will enable the lid ordoor of the freezer to shut prop-erly. A thin gauge of enameledcopper wire is probably the bestchoice and something like34s.w.g. to 38s.w.g. (0¬¬¬236 to0¬¬¬15mm diameter) wire is agood choice. The connectingwires can be a few meters longif necessary.

Stripping the insulation fromthe ends of the wires can beawkward, because normal wirestrippers do not work well (if atall) with thin wire of this type. Itis a matter of carefully scrapingaway the insulation using amodeling knife or a small file.Then “tin” the ends of the wireswith solder.

The wires can be connectedto the circuit board via a plugand socket or a connectorblock, but direct connection tothe circuit board is cheaper andeasier. A small entrance holeabout one or two millimeters indiameter must be drilled in therear panel of the case.

IN USEIt is advisable to position

the temperature sensor (R3)well into the freezer where it willnot be subjected to large risesin temperature every time thefreezer is opened. Leave thesensor in place for a few min-

The completed PCB. Note the small link wireat the top left corner, next to the transistor.

Page 20: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 792

utes before switching on thealarm so that the sensor hastime to adjust to the tempera-ture inside the freezer. Afterswitch-on it takes several sec-onds for the voltages to settledown to their normal operatinglevels.

By adjusting Temperaturecontrol VR1 it should be possi-ble to switch the buzzer on oroff. Adjust it just far enough in aclockwise direction to activatethe buzzer, and then back it offvery slowly and carefully in acounter-clockwise direction toswitch the buzzer off again. Thealarm should now exhibit goodsensitivity, and removing thesensor from the freezer shouldresult in the alarm sounding al-most immediately.

If the unit seems to be mal-functioning in any way, switchoff immediately and recheck allthe wiring. If the alarm is foundto be too sensitive in use, withfrequent false alarms, back offcontrol VR1 fractionally in acounter-clockwise direction.

POWER CHECKEach set of batteries is

likely to last a year or more, butit is advisable to check the unitabout once a month to ensurethat they are still in good condi-

tion. To do this, simply adjustVR1 in a clockwise direction toactivate the alarm.

If the buzzer operates at fullvolume the batteries are in goodcondition. Control VR1 is thenset back to its normal operatingposition. If the volume is low, orstarts at the normal level butnoticeably falls away after a fewseconds, it is time to replace thebatteries.

OTHERAPPLICATIONS

It should be possible tomodify the unit for operation inother applications that require atotally different threshold tem-perature. It is just a matter ofaltering the value of resistor R4.

The value of resistor R4should be approximately equalto the resistance of the thermis-tor (R3) at the required thresh-old temperature (e.g. 47k at25C and 3k at 100C). It is pos-sible to obtain satisfactory re-sults with threshold tempera-tures from about 20C to+100C.

However, note that the cur-rent through the sensor circuitincreases significantly whenhigh threshold temperatures areused, giving reduced battery

life. Operation at temperaturesin the region of 20°C is possi-ble simply by adjusting controlVR1 for the correct thresholdtemperature.

&RQVWUXFWLRQDO3URMHFW

NEXT STARTERPROJECT - 4

LOW-BUDGETSHORTWAVE

RECEIVER

Page 21: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 793

There are three reasons whythe author designed this versatileyet compact Data Logger:

o) To get to know more aboutMicrochip’s new PIC16F87xfamily

o) To monitor the EPE MusicalSundial and record sunlightconditions

o) Several readers hadsuggested that one shouldbe published in EPE

During this article, referenceis made to the following EPE andEPE Online subject material:

o) PIC Tutorial (Mar-May ’98)o) PICtutor (CD-ROM version

of the PIC Tutorial)

reprogramming and on-goingdevelopment of program code.

However, as we have beenforetelling for some months, wenow have even greaterprogramming and controlopportunities available, throughthe new PIC16F87x family. ToEPE Online readers, these arelikely to find even greateracceptance.

First of all because theycan, at the simplest level, beused in place of the PIC16x84swhen greater programmingmemory (up to 8 kilobytes) isrequired. They can beprogrammed almost identicallyusing the same set of commandcodes.

Secondly, they are muchmore powerful than the ’84s, aswas outlined in the PIC16F87xReview. They have, forexample, up to eight channelsof analog to digital conversionavailable; they can be used forserial communications input/output at controllable baudrates; they can write to and readfrom addressable serial datamemories; apart from enlargedprogram memories, they alsohave increased on-chipEEPROM data memorycapacity; their special registerset is much larger; and they canoperate at up to 20MHz.

TUTORIALLYSPEAKING

It is some of these attributesthat are put to use now in this Data

The new PIC16F877 microcontroller offers versatileanalog data logging opportunities.

&+$11(/ $1$/2*8( '$7$ /2**(5

E\ -2+1 %(&.(5

o) PIC Toolkit Mk1 (Jul ’98)o) PIC Toolkit Mk2 (May-Jun

’99)o) Musical Sundial (Jun ’99)o) PIC16F87x Review (Apr

’99)o) Virtual Scope (Jan-Feb ’98)

PIC PROGRESSIONWhilst we should not forget

that Microchip manufacturemany different types of PICmicrocontroller, up to now it hasprincipally been the PIC16x84variants that have dominatedthe EPE Online readershipscene. This is entirely due to theEEPROM-based technology ofthese PICs, allowing easy in-situ

Page 22: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 794

Logger. In a follow-up article(PIC16F87x Mini Tutorial), a closerlook is taken at how the PIC16F87xfamily can be programmed toimplement them.

This double article,therefore, represents not only ahighly useful constructionalproject, but also a mini tutorial,with particular reference to thePIC16F877. The Tutorial is notfull in-depth coverage but, if youalready know about using otherPICs, it will certainly get youstarted with using the newdevices for yourself.

After reading both articles,you should have a pretty goodidea about the following aspectsof the PIC16F87x family:

o) Using PORTA and PORTEfor digital input/output or

analogue data inputo) Analogue-to-digital

conversion (ADC)o) Storing and retrieving data

bytes using the PIC’sinternal EEPROM memory

o) Storing and retrieving databytes using external serialmemory chips

o) Transmitting serial databytes to the outside worldat different baud rates (upto 9600 baud)

We additionally tell youabout:

o) Using PIC Toolkit Mk2 toprogram PIC16F87xdevices

o) Using a PC to input serialdata from PIC16F87xdevices via the COM ports

o) Inputting formatted serial

data from all PIC analoguechannels (up to eight) toMicrosoft Excel for displayand printout as text andgraphs

o) Formatting the serial datafor display via the VirtualScope

o) Monitoring the MusicalSundial

Details of the functions theData Logger can perform areshown in Table 1.

LOGGING CIRCUITDespite the obvious

complexity of what this DataLogger can do, the circuit isremarkably simple, as are somany PIC-based designs. Thecomplete circuit diagram is shownin Fig.1.

&RQVWUXFWLRQDO3URMHFW

Table 1. DATA LOGGER SPECIFICATIONS

o) Up to 8 channels of analog data input, 10-bit conversiono) Up to 8 channels of serial data storage and retrieval using on-board serial memory (up to 2 megabits)o) Analog sampling rates selectable from 0¬¬5 seconds to 62 seconds (one-second increments from first

second upwards)o) Sample rate adjustable up or down using two switcheso) External clock option selectable in place of internal sampling clock (allowing sample taking to be trig-

gered by external source)o) Maximum sampling count limit switch-selectable from 255 bytes to 16K bytes (subject to memory chips

actually used see later), stepped in powers of two. Continuous “no-limit” optiono) Automatic cessation of sampling when count limit reached (no over-writing through count roll-over to

zero unless required)o) Choice of non-volatile serial memory capacity (chip size), from 32K bits to 256K bits per channel (2

megabits maximum in total)o) 10-bit ADC sampling resolutiono) Sampled data value stored as two byteso) Automatic non-volatile storage of current sampling count value when current data logging session

endedo) Automatic non-volatile storage of Rate and Memory factorso) Recommencing data logging from same count at which previous session ended (with 5-byte gap im-

posed)o) Option to reset logging count and other parameters at switch-ono) Simultaneous alphanumeric LCD display of data value at time of sampling and as a recalled value fol-

lowing serial memory storageo) Switch-pressed selection of which channel’s data is shown on the LCD during samplingo) LCD display of elapsed time for current sampling session

Page 23: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 795

Of the five integratedcircuits shown, only two areactually essential to the circuit’soperation: the PICmicrocontroller IC1, and theserial EEPROM memory chipIC4. Apart from the liquid crystaldisplay, X2, all of the otheractive devices are justbeneficial voltage conditioners,whose roles will be discussed aswe progress.

What may not beimmediately obvious is that, infact, there are seven otherserial EEPROM memories inparallel with IC4, namely IC5 toIC11. Each of the eightmemories stores data for justone analog channel and theircircuit connections are identical

to that shown for IC4. Note,though, that pull-up resistor R22is common to all eight devices.

Analog data is input to theeight channels via sockets SK1 toSK8 and is fed to five inputs ofIC4’s PORTA (RA0 to RA3, plusRA5), and to the three inputs ofPORTE (RE0 to RE2). Theseeight port connections areconfigured in software for analogdata input.

Resistors R1 to R8 provide adegree of signal buffering toprevent data line conflict shouldthe PORTA/E pins ever be activeas outputs when coupled to adata source. Resistors R9 to R16hold the data lines at ground level(0V) in the absence of data inputsources.

Opamp IC12, which inseries with the data input linefor channel 1, is an example ofan active non-inverting buffer.Such a buffer allows signalsfrom a high impedance sourceto be fed into the Data Loggerwithout placing a significantload on that source.

Ideally, the opamp shouldbe one suited to DC signal inputand allowing a rail-to-railvoltage swing at its output.There are many instrumentationopamps available for this typeof function, such as the LT1218for example (RS/Electromail).However, if the signal levelswing required is typicallybetween about 1V and 4V DC,practically any normal opamp

&RQVWUXFWLRQDO3URMHFW

111&&&

95N

%9

6.726.6(( 7(;7

5$$1

5$$1

5$$195()²

5$$195()

5$72&.,

5$$166

5($15'

5($1:5

5($1&6

, 1

222666&&&&&&///...287

0&/5

3635'

3635'

3635'

3635'

3635'

3635'

3635'

3635'

72627&.,

7,26,&&3

&&3

6&./

6',666'$555&&&

6'2

7;&&&.

5;'7 ,17555%%%

3*0

3*&/.

3*'$

9( 9(

*1' *1'

6

5N

5N

5N

5N

5N

6

,&3,&)

;/&'02'8/(

,&D+&

,&E+&

,&F+&

'''

5556

(

:

'''

&2175$67&;

6

,&

$

$

$

:3

6&/

6'$

,&72,&

6&/

6'$

9

9

58167236(( 7(;7

6(( 7(;7

&2175$67

&Q

&Q

&Q

&Q

&Q

&Q

$$6(5,$/(3520

6.

(;7(51$/&/2&.

; 0 + ].

D

N

'1

&&&SSS

6.

6(5,$/ 23

'$7$287

572 5Ω

,&,1287

/

&20

,1

,1

,1

,1

,1

,1

,1

,1

5 72 550N

6

9 '$7$ &/.

352*5$00(5

9(

9(

*1'

*1'

$

$

$

,,,&&&

²

²

²

²

²

²

²

²

²

²

²

²

,&

9

*1'

9

,&6(( 7(;7

,&72 ,&6(( 7(;7

0&/5

6((7(;7

9

Fig.1. Complete circuit diagram for the 8-Channel Analog Data Logger.

Page 24: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 796

should suffice, even a“standard” opamp such as atype 741.

It has been assumed,however, that most datasources likely to be used withthe Data Logger will alreadyhave low-impedance signaloutputs that do not requireactive buffering. This beingthe case, their inputs are feddirectly into the PIC via therespective resistors R2 to R8.It is also permissible to omitIC12 (and resistor R17) andlink channel 1 input from R1 toIC4 RA0. It is not permissible,however, to input negativevoltages.

Should your data sourcesfor channels 2 to 8 not be lowimpedance types, repeats ofIC12’s configuration can beconstructed on a piece ofstripboard. Insert a 470:resistor in series with each non-inverting opamp input (pin 3),and take the signal output fromits pin 6 to the relevant socket,SK2 to SK8.

The PIC and its softwaretake the +5V and 0V rails asbeing the reference voltages forA-to-D conversion. (Asdiscussed in the forthcomingmini tutorial article, in otherapplications conversion canalso be referenced to thevoltage present on pins RA2and RA3.)

LCD MONITORThe liquid crystal display

(LCD) is a so-called “intelligent”alphanumeric device having twodisplay lines, each having 16characters. (A superb two-partarticle describing the use ofthese displays in exquisite detailis available for FREE downloadfrom the EPE Online Library atwww.epemag.com , Ed.)

The software routine used

&RQVWUXFWLRQDO3URMHFW

to drive the LCD is the author’s“standardized” routine used withmany EPE Online projects ithas become a “library” programthat is merely imported to anysoftware that requires an LCDdisplay. It will not be discussedhere, other than to point out thatthe LCD’s contrast iscontrollable by use of VR1.

SERIAL MEMORYCHAIN

The chain of serial datachips (IC4 to IC11) is jointlycontrolled by the PIC’s PORTC.Pin RC3 provides the clocksignal, and RC4 carries thedata. The data line is bi-directional, not only in terms ofsending data to the memories orreading it back, but also interms of exchanging hand-shake signals at strategic pointsin the automatic softwarecycles. A fair amount ofprogram code is involved in thisand it is considerably morecomplex than would be the caseif parallel-data memories werebeing used instead of serialaccess devices.

To the user, though, suchcomplexities are “transparent”,as they say. Whilst in someapplications the use of serialrather than parallel storagewould carry a timing penalty(serial is slower than parallel).This Data Logger does notrequire significantly high dataexchange rates, consequently,serial devices provide a betterdata storage solution becauseof their greatly reduced size,and because fewer data andcontrol lines are needed.

The serial EEPROMdevices used here aremanufactured by Microchip(who also manufacture the PIC)and require only two controllines (data and clock, plus

ground), irrespective of howmany there are in the chain (upto eight) or what capacity ofdata storage they provide.

The memory with which thedata is exchanged isdetermined by an address codesent out prior to each data bytebeing sent or read back. Eightdifferent address codes areavailable, allowing up to eightmemories to be on the samecontrol line pair. Each memoryhas three additional pins (A0 toA2) to which a 3-bit code ishard-wired as part of the PCBdesign (or can be set byswitches in other designsituations). Only the memorywhose hard-wired code matchesthe code transmitted by the PICwill respond, the othersremaining inoperative at thistime.

The configuration for theaddress pins of all eightpossible memories is shown inthe inset at the top right ofFig.1. Note that the addresspins only need to be connectedto the circuit if they are requiredto be set for logic 1 (connectedto the +5V rail). All address pinshave an internal pull-downresistor to 0V and can be leftunconnected if logic 0 isrequired on that pin. Hence IC4not having any apparentconnections to its A0-A2 pins.

The PCB has the requiredaddress links incorporated aspart of its tracking. You do nothave to concern yourself with it.However, if you decide to omitsome memories, you shouldomit from the highestdownwards.

Instructions on whether thememory is to receive or playback data is also transmitted aspart of the address code.

The memory’s data pin isan open-collector terminal and

Page 25: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 797

requires the use of a pull-upresistor (R22 in Fig.1), typicallyof 10k: (although the datasheet discusses other valuechoices). Only a single resistoris required, whether the memorycount is one or up to eight.

If all eight memories are notused, their locations are stilladdressed by the software. Thedata bits read back from non-existent memories will all be atlogic 1 because of pull-upresistor R22. In this case, thevalue read for each of thesebytes will be 255 (65,535 for adouble-byte word as used by theData Logger).

The prototype Data Loggerused six Microchip 24LC256(256 kilobits each) memories,leaving locations IC10 and IC11empty. The following Microchip3-line serial memory choicesare suitable:

Device Bit capacitySample limit

24LC256 256 kilobits 16kilobytes24LC128 128 kilobits 8kilobytes24LC64 64 kilobits 4kilobytes24LC32 32 kilobits 2kilobytes

SWITCHEDSELECTION

Setting of the mode choiceswithin the PIC’s software (aslisted in brief in Table 1 Specifications) is made viaswitches S1 to S3. Their use willbe discussed more fully later.

All three switches have pull-down resistors connectedacross them to prevent the PICpins to which they areconnected from going opencircuit. Capacitor C10 is

included across S1 to inhibitswitch-bounce, a matter morefully taken care of in software.

PC LINKSerial data is output to the

PC-compatible computer usingtwo wires the data line plus aground connection. Data isoutput from the PIC’s RC6 pin(the one dedicated within thistype of PIC for data outputunder RS232-type serialprotocols). An active data bufferis included on the output line,and is comprised of two74HC04 inverter gates, IC3band IC3c.

Connection to thecomputer’s COM port (eitherCOM1 or COM2) is via SK11.This socket is a female 9-pin D-connector into which a PC’sstandard COM port connectorcable can be plugged, eitherdirectly or via an adapter (25-pin down to 9-pin). By“standard” is meant the sametype of connector cable as isnormally used betweencomputers and modems.

Note that although the DataLogger only requires to beconnected to pins 2 and 5 ofSK11, the COM port leadrequires that other SK11 pinsshould be linked, as shown inFig.1 and the constructionaldiagram, Fig.2.

EXTERNAL CLOCKSixty-two sampling rates

can be selected from the DataLogger’s internal clock (asdiscussed later). An externalclocking rate can also beselected, whose voltage swingmust conform to the “normal”+5V/0V range. Inverter IC3abuffers the clock input, andsoftware inverts its output sothat an externally positive-going

&RQVWUXFWLRQDO3URMHFW

COMPONENTSResistors

R1 to R8, R17 470 ohms (9 off)R9 to R16 100k x 8 SIL commoned- resistor moduleR19 100kR18 1kR20 to R22 10k (3 off)

See also theSHOP TALK Page!

All 0.25W 5% carbon fi lm

CapacitorsC1 22u radial electrolytic, 16VC2, C5 to C9 100n miniature ceramic, 5mm spacing (6 off)C3, C4 10p polystyrene or miniature ceramic, 5mm (2 off)C10 1u radial electrolytic, 16V

SemiconductorsD1 1N4148 signal diodeIC1 PIC16F877 programmed microcontroller (see text)IC2 78L05 +5V 100mA voltage regulatorIC3 74HC04 hex inverterIC4 to IC11 24LC256 (see text) serial EEPROM memory (8 off)IC12 opamp (see text)

Miscel laneousS1, S4 miniature s.p.d.t. toggle switches (2 off)S2, S3 miniature push-to-make switches (2 off)SK1 to SK10 sockets to suit (10 off) (see text)SK11 9-pin D-type panel-mounting female connectorX1 3.2768MHz crystalX2 2-line, 16-character (per line) alphanumeric LCD module.

Printed circuit board availablefrom the EPE Online Store, code7000237 (www.epemag.com );8-pin DIL socket (9 off); 14-pin DILsocket; 40-pin DIL socket; plasticcase with transparent lid (see text);LCD mounting plate (see text); 9VPP3 battery and clip; PCB supportsto suit; connecting wire, solder, etc.

$70Approx. CostGuidance Only(Excluding Case and Sockets)

Potent iometerVR1 10k miniature preset, round

Page 26: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 798

signal is that responded to asthe sampling trigger.

Note that the elapsed-timeclock display is inactive duringexternal sampling (allowingfaster sampling in this mode).

MISCELLANY

¬

The PIC is operated at3¬2768MHz, as set by crystalX1. The clock rate is sub-divided in the software tocontrol the data sampling rateand the elapsed-time display.

Power is intended to besupplied by a 9V battery, withIC2 regulating the voltage downto +5V as required by the digitalcircuitry. None of the circuitbeyond IC2 should be subjectedto a voltage greater than +5V(+6V is definitely not allowed). Ifa greater voltage were to beapplied, not only could the DataLogger chips die, but also thecomputer’s COM port to which itmight be connected couldseriously suffer. Switch S4 isthe power on/off switch.

Also included is the optionto program the PIC16F877while in-situ on the PCB, usingPIC Toolkit Mk2 and itssoftware. Resistor R18 anddiode D1 allow the +12Vprogramming and 0V resetvoltages to be safely applied tothe circuit.

The PIC’s PORTD is notused by the Data Logger, butthere is plenty of programmemory space available shouldreaders want to add code tomake use of it (for digital datasampling, perhaps).

CONSTRUCTIONDetails of the printed circuit

board component layout andtracking are shown in Fig.2.This board (as always) isavailable from the EPE Online

&RQVWUXFWLRQDO3URMHFW

Store (code 7000237) atwww.epemag.com

Commence assembly byinserting the wire links and then

6.

'D N

&

&

5

5

555

5

5

5

5

5

5

&

&

&

&

&

95

;111&&&

111&&&

5

5

5

9

9

9

9

&;

9

9

9

666

666

(

56

'

'

'

'

6327

&

&&

50

6.

6.

6.

6.

6.

6.

6.

6.

6.

6.

(;7 &/.

(;7 &/.

*1'

&+$1

&+$1

&+$1

&+$1

&+$1

&+$1

&+$1

&+$1

6.72 6.6(( 7(;7

62/'(5 3,1 9,(: ,16(7

6

6

666

9%

9

287

&20

,1

9

&/.

'$7$

0&/5

3,&352*5$00(5

'7

9

6(( ,16(7

72;

237

Fig.2. Component layout and (approximately) full-size copperfoil master track pattern, plus off-board connection details.

progress as you prefer, nodoubt in size order. It isrecommended that even if youdon’t want to use eightchannels/memories, you still

Page 27: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 799

insert the sockets for them all you could well want to expandat a later date.

It is also suggested that youuse pin headers for all the off-board connections, particularlythose for the LCD. Pin numbersare marked on LCD modules.

Regarding sockets SK1 toSK10, the author used ten 2mmsingle-sockets because they arecompatible with practicallyevery other connection that heis ever likely to use in hisworkshop.

You are free to usewhatever type of connector youchoose, to suit your ownequipment, preferences orwhims. The choice might affectthe size of case required,though.

ENCLOSUREApart from choosing the

case size, you also need todecide if you want to use theData Logger outdoors. If you do,it will need a case that is waterresistant, if not fully waterproof!

Apart from excursions intothe garden to monitor theMusical Sundial (more in Part2), it’s in the workshop theauthor expects to find prime usefor the Data Logger.Consequently, a low-cost plasticcase with a detachable see-

If all is well, and with thepower off, the PIC can now beinserted. Unless you intend toprogram it yourself, it should, ofcourse have been pre-programmed, details of whichservice are quoted on theShoptalk page in this issue.

If you intend to program thePIC yourself then, unless youhave a programmer capable ofhandling the PIC16F87xdevices, you will also need PICToolkit Mk2 (which wasspecifically designed for themand the PIC16x84 devices PIC Toolkit Mk1 is not suitable).The PIC16F877 configurationrequired is stated at thebeginning of the source codetext file.

The software has beenwritten in the TASM dialect andcan be downloaded from theEPE Online Library asdescribed on the Shoptalkpage.

Follow the instructionssupplied with the software wheninstalling it on your computer there are several files involved,not only for the PIC program butalso for inputting the serial datato a PC.

It is intended for runningunder MS-DOS, not underWindows.

&RQVWUXFWLRQDO3URMHFW

through lid was chosen (savingthe task of cutting an LCDviewing hole in an ordinarybox).

The case seen in the photosmeasures 150mm 80mm 75mm (l, w, h) but was reallyjust a bit too small. It issuggested that the next size upshould be chosen.

The PCB was secured tothe base using “normal” PCBsupports. A rigid panel(unetched PCB off-cut) wasmounted above the PCB usingstacking PCB pillars (the panel’sholes were first drilled in linewith the PCB mounting holesbelow it). To this panel wasmounted the LCD, again using“normal PCB supports (seephotos).

FIRST CHECKSOnce you are content that a

close-up examination of theassembled PCB shows no signsof poor soldering or incorrectlyplaced components, apreliminary power-up testshould be made. For this test,regulator IC2 should be the onlyIC inserted. Also leave the LCDunconnected.

Connect a 9V battery orpower supply and switch on.With a meter, check that +5V ispresent at the output of IC2,within about five per cent or so.

NEXT MONTHIn the concluding part of this arti-

cle next month, we discuss program-ming the Data Logger, using it, andtransferring data to a PC. We alsogive data sheet numbers and detailsfor contacting Microchip.

Page 28: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 800

The radio receiver circuitshown in Fig.1a delivers apowerful 3W to 5W into a 4 to 8ohm loudspeaker. It has excellenttone, selectivity, high directivity,and good sensitivity.

Although the first stage is a“crystal set” with point contactdiode (D1), the radio is self-contained, requiring no earthwire. The design uses a loopaerial, such as were common inthe 1930’s.

Coil L1 is wound on a woodenH-frame 60cm square, the “H”being turned on its side by 90degrees (see Fig.1b). Four 11cmlong cross-pieces are mounted oneach corner of the “H” to carrycoils L1 and L2. Wind 12 fullturns of 30s.w.g. enameledcopper wire around the H-frame,spaced about 8mm apart. It helpsto prepare the cross-pieces bycutting notches for the wire.

The ends of this wire are

soldered to a 300pF to 500pFvariable capacitor VC1, whichserves as the tuner. Terminal“A” is soldered to the capacitorframe/spindle, and terminal “B”is soldered to its fixed fins.

Between turns 6 and 7 of Ll,wind one “link turn”, L2, ofquality braided microphonewire. This improves thedirectional effect of the antenna.The screening braid, soldered toits core (terminal “C”), issoldered to 0V. At the otherend, the core of the wire(terminal “D”) is soldered to thecenter tap of L3, which isapprox. 40 turns of 30s.w.g.wire, with a tap in the middle at20 turns. It is close-wound on a5cm (2in.) diameter piece ofPVC piping.

The value of tuningcapacitor VC1 is not critical however, the larger it is, thewider the tuning range will be.

Preset potentiometer VR1controls feedback inpreamplifier IC1a, and VR2 actsas a Volume control. The outputof IC1b is fed via LF filtercomponents C7/C8 to poweramplifier IC2, which is wired in

ROLL-UP, ROLL-UP!Ingenuity is our regular round-up of readers' own

circuits. We pay between $16 and $80 for all materialpublished, depending on length and technical merit.We're looking for novel applications and circuit tips, notsimply mechanical or electrical ideas. Ideas must be thereader's own work and must not have been submittedfor publication elsewhere. The circuits shown haveNOT been proven by us. Ingenuity Unlimited is open toALL abilities, but items for consideration in this columnshould preferably be typed or word-processed, with abrief circuit description (between 100 and 500 wordsmaximum) and full circuit diagram showing all relevantcomponent values. Please draw all circuit schematicsas clearly as possible.

Send your circuit ideas to: Alan Winstanley,Ingenuity Unlimited, Wimborne Publishing Ltd., AllenHouse, East Borough, Wimborne, Dorset BH21 1PF.They could earn you some real cash and a prize!

Win a Pico PC-Based Oscilloscope• 50MSPS Dual Channel Storage

Oscilloscope

• 25MHz Spectrum Analyzer

• Multimeter

• Frequency Meter

• Signal Generator

If you have a novel circuit idea whichwould be of use to other readers, then a PicoTechnology PC based oscilloscope could beyours.

Every six months, Pico Technology will beawarding an ADC200-50 digital storage oscil-loscope for the best IU submission. In addi-tion, two single channel ADC-40s will be pre-sented to the runners up.

Loop Aerial MW Radio Back To The Future

3?B5 D?

<# 35>DB5D1@ D? F

<"

F3!

G??45>

6B1=5

<!

!" DEB>C

# CG7

& S]

& S]

!!SSS]]]

1 2

3?BBB5551>4

C3 5>

:?9> 4 85B5

5>1=5<<54

3?@@555B

G9B

<# - $ DEB>C ?>

% @F3 @9@5

333?1H

=93

12<5

4

3

Fig.1b. Loop aerial construc-tional details. VC1 is sol-

dered in parallel with L1 andmounted on the frame.

Page 29: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 801

,QJHQXLW\8QOLPLWHG

Mayday Module Dis-tress Call

A mayday circuit for send-ing out an S.O.S. in Morse codeis shown in Fig.2a. The self-running binary counter IC1 gen-erates a low-frequency divide-by-32 across the five selectedoutputs Q5 to Q8. Encodinglogic then passes a series ofpulses from Q5 through to thetransistor TR1, suppressing ormerging them to form the well-known “S.O.S.” sequence inMorse. This is sounded on thepiezo buzzer WD1. Fig.2b illus-trates the counter states used togenerate the code.

The encoder divides the 32-count field into four. The firstand last quarters are distin-guished by Q8 and Q9 beingequal, a condition decoded atIC2d pin 3 of the exclusive-OR.This signal is the “letter-select

2!

!"F

B%

! [

<"

!D

<#

$ D

B!

! [

3!

% `

4!

?1)!3#

! ^

3"

$ '

B"

! [

3$

! P

B#

![

<!

!"D# CG7

F3!

# ` % `

FB!

! [

3%

$ 'P

3&

! P

B'

![

B!

##[

3(

!^

3'

!^B(

!=

B)

!=

B!!

"":

<C!

$ (: :%G

3)

3!

$' P

! P

FB"! [

B$

! [

B&![

Q [

93!Q

93!R

<='$'

<='$'

719>F?<E=5DE>9>7

!

"

!#

$

!"

'

&

!

)

93"<=#(

#$ %

& ' ! !!

"

!$

(

!"

C!

?>

?66

1

2

3

4

Fig.1a. Circuit diagram for the Loop Arial MW Radio. L1-L3 are air-coupled, air-spaced inductors.

a standard configuration. It isrecommended that longerconnections should use shieldedwire (the braid being soldered toground 0V).

Rev. Thomas ScarboroughFresnaye, Cape Town

Republic of South Africa

R

S

U

'$83(&

93"T

3<;

BCCCD

? 3 3 3 E D

?C 9>

!!

)

!"

3!

! ^

B"

"" [

C55

D5HD

!

B!

!([

FB!

! [

B1D5

'''$$$888333(((&&&

999333"""R

S

FCC

)

!!!

!"

#

AAA'

(

)!!!#

$

&

(

!$

(

!! "

!

'

'$83(&

93"Q

93!$ &

AAA%

F44

&

!&

%

$$

%

&

$

DB!26I%

)

(

! &

!$

'$83 "

93#Q

'$83 "

93#R

!!!!

!# #

"

"

'

'$83 "

'$83 "

93#S

93#T

!

%

B#

"" :

G4!

@95J?

2EJJ5B

F

)F

#

Fig.2a. (top) Mayday circuit.! " # $ % & ' ( ) ! !! !" !# !$ !% !& !' !( !) " "! "" "# "$ "% "& "' "( ") # #!

C ? C

Fig.2b. (above) Morse SOS sequence.

A%@9>>>%

D? 93!

AAA! @9> !%

&@9 $

B5C5D93! @9> !"

F

4#!>$!$(

B$&[(

4!!!!>>>$$$!!!$$$(((

4"

QQQ

Q

[[[

[

Fig.2c. (right) Word-gap exten-

flag” when high, a sequenceof Q5 pulses representing letter“S” is sent, and when low theletter “O” is formed by mergingpulses from Q5 and Q6.

A NOR gate IC3a detectsthe condition (Q6=Q7=Q9) atpin 10. This occurs at the begin-ning and end of the first and lastquarters, where it helps gener-ate the required inter-word andinter-character spacing, and en-suring that “S” consists of threepulses and not four.

Although the timing for thecharacters and inter-characterspacing is correct, the spacing

between Mayday signals is onlyfive units in this design insteadof the standard seven. Addingthe three-diode circuit of Fig.2c.extends the count by three if

Page 30: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 802

desired, taking advantage of thefact that states 0, 1 and 2 (=32,33 and 34) do not produce anoutput. This emphasizes theword-gap.

A start/stop module isshown in Fig.2d. After 16 criesfor help, Q14 (pin 3) of thecounter will re-set the flip-flopand disable the counter. Thiscircuit cannot be used with the“word-gap extender” circuitFig.2c.

Lastly, on the subject ofMorse S.O.S. signals, did any-one notice the “peeps” fromHMS Titanic’s radio room in thelatest movie? And this in 1912!At least the 1958 film was real-istic with crashing radio sparks.

Trevor SkeggsMilton Keynes

may set in, reducing the cell’s use-ful working life. This is a particularproblem in my pastime of caving,where a flat battery is a nuisance,and two flat batteries can be verydangerous.

Circuit diagram Fig.3 is de-signed to discharge a 5-cell “Fx5”battery unit, which outputs 5 l·2 =6V. It should work on four cells, butthe relay will not hold for 3¬¬¬6V (3cells).

The push-to-make switch S1allows the Darlington pair, made upof transistors TR1 and TR2, tolatch the relay RLA. Current passesthrough the “load” resistors R4 andR5, which were set to pass about1A. As each cell delivers 1¬¬¬2V, the

potentiometer was set to turn offthe Darlington pair at 5¬¬¬0V byusing a variable supply.

Current to a cheap quartzclock from the potential dividerresistors R1 and R2 enables oneto find out how long the unit hasbeen running. Now I can com-pletely discharge the “Fx5” unitwithout having to watch for thebulb dimming, and while savingthe bulb, an expensive halogentype, from unnecessary use.

Mark LavendarCatforth, Preston

,QJHQXLW\8QOLPLWHG

NiCad Discharge Unit

In The DarkIf NiCad cells are used in

series, the problem of reversecharging of the weaker cell canarise if the unit is allowed to to-tally discharge. However, if thecells are not allowed to rundown sufficiently, “memory”

R

S

U

R

S

U

B$

" ':$G

3!

"" P

D?

AE1BDJ

3<?3;

B%

" ':$G

B#

#( :

B"

# :

4!

B!

! : B<1!

>?

B<1

!

4"

!>$ !

DB!23%$)

B&

![

FB!

! [ DB"23%$)

C!

?>

Q

Q

[

[

2!

&F

>Y3QT

<54

Fig.3. Circuit diagram for a NiCad Discharge Unit.

Page 31: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 803

Sound activated switches areuseful in many circumstances,especially when “hands free” op-eration of a piece of equipment isrequired. They are often used, forexample, to automatically switchon a tape recorder (or a digitalsolid state equivalent) to record asound or conversation without“wasting” tape during quiet peri-ods.

Many inexpensive cassetterecorders have a remote switchinput to enable the recorder to beswitched on from the microphoneand a circuit of this type can eas-ily be connected to it to start therecording automatically.

As well as this, sound acti-vated switches can be useful inapplications such as intercoms,baby alarms, security alarms orphotographic work, and there areno doubt many others.

This circuit arose from a re-quirement for a basic microphoneinterface to logic circuits withouthaving to build one from scratcheach time. Since it was not builtfor any specific application, anumber of outputs were provided,including an amplified version ofthe sound waveform. With a fewadditional components, however,the circuit can easily be used as asound-operated switch with otherequipment.

It is suited to being suppliedby a 9V PP3 battery. The choiceof case has been left to users, to

interference, require a positiveand negative supply, which isnot often available in logic cir-cuits.

This circuit overcomes thedifficulties encountered in usingopamps and provides a varietyof outputs for virtually any appli-cation. The component count isvery low only 17 low costcomponents are required (andthat includes the microphone).

The circuit will operatedown to about 3V, drawing acurrent of less than 0¬¬¬5mA. At5V, the supply current is around1mA and even at 9V is onlyaround 5mA, which comparesquite favorably with an opampdesign. The circuit can be usedat up to 15V, although the cur-rent drain is then a bit exces-sive.

LOGICAL AMPLIFIERSince a logic level output is

required and we are not after hi-fi standards, a logic gate is used

Showing how a logic gate can be used as an audioamplifier and a voltage switch.

6281' $&7,9$7(' 6:,7&+

E\ %$57 75(3$.

meet their own requirements.

CONSIDERATIONSMost circuits of this type

published over the years use amicrophone signal, which is am-plified to a suitable level by anopamp. The signal is then recti-fied and fed to a comparator,which switches when the signalexceeds a certain level. This isthen used to switch a relay orother device, which in turn con-trols an appliance.

The problem with usingopamps with digital logic is thatthe output of most opamps doesnot switch fully between thesupply rails. Thus, with a 5Vsupply for instance, the outputwill typically switch between0¬¬¬5V and 3V. This is not toomuch of a problem if a relaydriver transistor is to be con-nected to the output, but it maynot work satisfactorily with alogic circuit unless extra inter-face components are used.

Many of the low-costopamps (e.g. 741) also requirea supply voltage greater thanthat at which most logic circuitsoperate. This means that a sep-arate supply would need to beused, together with level shiftingcomponents to bring the outputswing within logic levels.

As well as this, differentialinputs, although improving per-formance as regard to hum or

,1387 287387

Q

S

Fig.1. Basic CMOS4069 inverter.

Page 32: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 804

as the input amplifier. The cir-cuit uses two of the six invertersinside a 4069 CMOS chip toamplify the signal, which ispicked up by a small electretmicrophone. The 4069 is one ofthe cheapest devices in theCMOS range, and with the addi-tion of a single feedback resis-tor (which effectively biases theoutput to mid-supply voltage) itmakes a very useful amplifier.

The internal circuit of oneCMOS 4069 inverter (excludingthe input protection compo-nents) is shown in Fig.1 andconsists of two transistors: a p-channel and an n-channelMOSFET.

It must be noted, however,that most devices in the 4000CMOS series contain a bufferfollowing the logic function, uti-lizing two cascaded inverters ofthe type shown to achievesharper input-output voltagecharacteristics and reducedswitching times. They are la-beled “B’’ for buffered (e.g.4049B), whereas the unbufferedtypes are labeled “UB’’ (e.g.4069UB).

In normal operation, if theinput is held at 0V, the output ofa logic inverter will be at thepositive supply rail with the p-channel transistor conductingand the n-channel device cutoff, with the device drawing only

a minute leakagecurrent.

This will alsobe the case if theinput voltage isincreased slowlyuntil (typically)the mid-point isapproached,when the p-channel devicewill begin to turnoff and the n-channel deviceturn on. The sup-ply current will

also begin to rise because bothtransistors are now conducting.The device will now operate asa linear amplifier and as the in-put voltage is further increased,the output will continue to fall.

SLOPING OFFBecause a buffered device has

a fairly high gain (especially if twosuch devices are cascaded) a smallincrease in the input voltage willcause such a large output swingthat the output will switch com-pletely, with the n-channel devicehard on and the p-channel transis-tor hard off (see Fig.2a) and thecircuit drawing a microamp or less.

With the UB device, this ac-tion is more gentle (as shown inFig.2b) and a situation can easilybe arranged where both transis-tors are conducting and the de-vice functions as a stable linearamplifier, with the output at aboutthe mid-supply voltage. Sinceboth transistors will be conductingin this state, the current flow willbe in the low milliamps range andwill depend on the supply voltage.

The major limitation of thiscircuit as an amplifier is that itsgain also depends to a large ex-tent on the supply voltage, asdoes its relatively high outputimpedance, which, together withany load capacitance, determinesthe bandwidth.

At higher voltages, the outputimpedance is lower, giving an in-creased bandwidth. It is also notthe last word in hi-fi from thepoint of view of distortion or noisebut, despite this, the sensitivity ofthe unit is sufficient to enable it torespond to a sound at normalconversation level within one ortwo meters.

The electret microphone usedalso has a built-in amplifier to re-duce its output impedance andnoise pick-up, and this no doubthelps. A problem is that, becausethe gain tends to be somewhathigher at low voltages, the sensi-tivity of the unit is higher with a5V supply than at 9V. This canalso be seen from Fig.2b, whichshows the transfer characteristicfor the 4069UB at 5V and 10V.

CIRCUIT DIAGRAMThe circuit diagram of the

Sound Activated Switch is shownin Fig.3. The microphone is bi-ased by resistor R1 and the ACsignal coupled to the input of thefirst inverter, IC1a, which is bi-ased into its linear mode by resis-tor R2.

The output of this stage con-sists of an amplified version ofthe sound signal and this is fed toa similar stage built around an-other inverter (IC1b), which am-plifies it further. The output signalfrom IC1b can be tapped at testpoint TP1, from where it may beused to feed a suitable power am-plifier, depending on the applica-tion.

As mentioned earlier, this sig-nal is not by any means in the hi-fi category. It will be about 1Vpeak-to-peak for normal conver-sation levels. Louder sounds willobviously result in a larger output(with increasing distortion) limitedby the supply voltage.

Interestingly, while distortionobviously increases as the output

&RQVWUXFWLRQDO3URMHFW

D% &026 ,19(57(5 E8% &026 ,19(57(5

287387 287387

9 6833/< 9 6833/<

9 6833/<

9 6833/<

Fig.2. Comparison of switching slopes forbuffered (a) and unbuffered (b) CMOS

inverters.

Page 33: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 805

approaches the upper and lowersupply limits, this amplifier pro-gressively “rounds off” the sig-nal peaks in a manner morereminiscent of a valve amplifier,rather than clipping them, aswould occur in an opamp.

OUTPUTSCMOS inverters, even the

UB types, have a relativelysteep input logic transfer char-acteristic. With a 5V supply, aninput change of less than 1Vproduces an output swing ofnearly the full supply. With a10V supply, an input change ofaround 3V is required to do this.

Since the transition occursat around the mid-supply volt-age, connecting the output ofthe amplifier stage (which is bi-ased to the mid-supply rail volt-

age) to another inverter wouldresult in the output of this stageoscillating between the two supplyrails, due to stray noise (both au-dio and electrical) reaching theinput.

By placing a potential divider(R4/R5) at the output of amplifierIC1b, the input of the next stage,IC1c, will be held slightly belowits threshold voltage and the out-put of this stage will remain at thepositive supply (logic 1 level)when there is no sound reachingthe microphone.

When a sound is picked upby the microphone, the output ofthe amplifier stage will swing be-tween the logic levels in sympa-thy with the signal and, since thethreshold of the next inverter,IC1c, is at around half the supplyrail voltage, each time this volt-

age is exceeded, the output ofthis stage will switch to a lowlevel. This is illustrated in Fig.4,which shows the waveforms atdifferent points in the circuit.

Inverter IC1c, therefore, pro-vides faster switching, with itsoutput pulses coinciding with thepeaks of the sound picked up bythe microphone.

This may be useful in someapplications where, for example,the frequency of the sound needsto be measured, but could not beused to switch on a tape recorder,for which a steady “on” signal isrequired. This condition isachieved by using the negative-going output of IC1c to charge upcapacitor C4 via diode D1.

The diode prevents the capaci-tor from discharging when the out-put goes high again. When a soundis picked up by the microphone, thevoltage on this capacitor will there-fore fall to the negative supply,causing the output of inverter IC1dto go high.

When the sound ceases, ca-pacitor C4 discharges via resistorR6, until the voltage at the inputof IC1d eventually rises abovethe logic threshold, causing theoutput of IC1d to switch lowagain. By varying the value of R6and/or C4, the length of time forwhich the output of IC1d stayshigh after the sound has ceasedcan be varied to suit the applica-tion.

&RQVWUXFWLRQDO3URMHFW

73

73

73D

777333

Fig.4. Waveforms at the circuit test points.

,&D8%

,&H8%

,&E8%

,&I8%

,&F8%

,&G8%

&S

&S

&Q

&Q

5N

5N

5N

5N

5 N

50

5N

50

DN

0,&

73 73

73D 777333

6(( 7(;7

&Q

9

'1

9

Fig.3. Complete circuit diagram for the Sound Activated Switch.

Page 34: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 806

The relatively gentle natureof the input/output characteris-tics of the unbuffered 4069 in-verter, coupled with the slowdischarge of C4 via R6, meansthat the output of IC1d tends toswitch uncleanly. With the in-verter now spending more timein the linear region while C4 dis-charges, intermittent oscillationcan occur and its output is notsuitable for connecting to otherlogic circuits. The two final in-verters, IC1e and IC1f aretherefore combined with resis-tors R7 and R8 to form aSchmitt Trigger circuit, whichuses positive feedback tosharpen the response.

CONSTRUCTIONComponent and track layout

details of the printed circuitboard are shown in Fig.5. Thisboard is available from the EPEOnline Store (code 7000240) atwww.epemag.com

Assemble the componentsin order of size, and use asocket for IC1. Remember thatthe IC is a CMOS device andshould be handled accordingly,discharging static electricityfrom yourself before handling it.

Two short pieces of tinnedcopper wire, such as discardedresistor leads, need to be sol-dered carefully to the two padson the back of the microphonecapsule. Although it is not ap-parent from the circuit symbol,electret microphones have abuilt in amplifier and musttherefore be connected to thecircuit with the correct polarity.The 0V terminal is the one con-nected to the metal body of thecapsule.

Use terminal pins for off-board wiring connections toother circuitry, as required bythe application.

&RQVWUXFWLRQDO3URMHFW

APPLICATIONSDepending on the applica-

tion, the outputs of the unit canbe connected to a variety of de-vices.

Output TP1 provides theamplified, but otherwise unmod-ified, microphone signal fromIC1b.

Output TP2 provides aroughly rectangular waveformhaving the frequency of theoriginal signal. Since it switchesbetween 0V and the positivesupply rail, it may be used as anoutput to other logic circuits forfurther processing, such as fre-quency measurement.

Outputs TP3 and TP4 pro-vide logic low and logic highlevels for as long as the soundpersists. Output TP4 can beused directly for interfacing withother logic circuits or, for exam-ple, to the relay driver shown inFig.6.

The relay can be used toswitch on any appliance, e.g.tape recorder, lamp etc., de-pending on its ratings.

To prevent the relay fromswitching on and off duringshort periods of silence, thevalue of resistor R6 or capacitorC4 may need to be increased.This should be done by trial anderror: too small a value willcause the relay to keep switch-ing on and off very often, whiletoo high a value will result in therelay staying on for a long pe-riod after the sound has ceased.

For applications where alonger delay is required, andwhere the device may be trig-gered by a loud initial soundwhich then dies away, the valueof C4 may be increased to allowlower values of R6 to be used. Itis possible to use electrolyticcapacitors here and, in this

case, the positive terminalshould be connected to the pos-itive supply line.

PHONE TRIGGEREDA useful application for this

circuit would be to switch on alamp to signal that the telephoneis ringing. This would be helpful ina noisy office or workshop, or per-haps at home for someone who ishard of hearing.

For this sort of applicationto be successful, it is importantto ensure that there are no“false alarms”. Frequent trips tothe telephone, only to find thatthe lamp has been triggered bya passing car or some othernoise and not the phone, will notendear you to your granny!

Place the microphone closeto the telephone and reduce thecircuit’s sensitivity so that onlythe telephone can make a loudenough sound. This can bedone by decreasing the value ofR5, using trial and error or byfitting a preset. The maximumvalue should not exceed 470k(with R4 as specified) as valuesgreater than this may preventthe circuit from operating prop-erly.

Performance could be furtherimproved by choosing a value forR6 to keep output TP4 high onlyfor the duration of each ring(around 2·2M: with C4 at100nF). This will cause the lampto flash in the characteristic UKtelephone ringing pattern, makingit not only more noticeable, buteasier to recognize in the event oftriggering due to other noises,which would cause the lamp toflash in a different way.

BABY MINDERAnother application would

be as a baby alarm, as in Fig.7.

Page 35: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 807

Here, output TP4 would be usedto control the output of an audioamplifier switching it (or theloudspeaker) on when a soundis detected.

The actual sound (from out-put TP1) would be fed to theamplifier input allowing the babysitter to hear if the baby wascrying or simply stirring andthus determine whether or not itneeded attention.

PA CONTROLA similar application could

be devised where, for example,public announcements need tobe made during which the nor-mal background music has tobe interrupted. It should be ap-preciated, however, that al-though the circuit is fast, it stilltakes time to operate, especiallyif a relay is used for the switch-ing. It could be found that thebeginning of any announcementis not transmitted.

In such applications, theuse of a transmission gate suchas the 4066 quad analog multi-plexer is recommended toswitch the signal. A possiblescheme is shown in Fig.8. Herethe four gates within the 4066are used in pairs and controlledby outputs TP3 and TP4.

Since TP3 is normally high,the signal at the music input willbe transmitted to the volumecontrol, while its lower end willbe held at 0V by the other trans-mission gate connected to out-put TP3. Whenever an an-nouncement is made, these twogates will switch off and outputTP4 will go high switching onthe other two gates.

The audio signal from themicrophone will then be appliedto one end of the volume con-trol potentiometer, while itsother end will be grounded. Therelative volume of the music

and announcement signals cantherefore be set as required.

Note that neither of thesecircuits take into account anyDC offset voltages which mayexist in the signal path. These

would, of course, have to be de-coupled to ensure that therewere no sudden thumps whenthe speaker or the inputs wereswitched. The values of R6 and/or C4 may also need to be ad-justed for best results.

In this application, the per-son making the announcementwould, no doubt, be very closeto the microphone and so the

&RQVWUXFWLRQDO3URMHFW

COMPONENTSResistors

R1 10kR2, R4, R7 47k (3 off)R3 1MR5 330k (see text)R6 4M7 (see text)R8 470k

See also theSHOP TALK Page!

All 0.25W 5% carbon fi lm

CapacitorsC1, C3, C4 100n ceramic (3 off)C2, C5 100p ceramic (2 off)C6 10u radial electrolytic, 16V

SemiconductorsD1 1N4148 signal diodeIC1 4069UB hex inverter

Miscel laneousMIC1 electret microphone, 2-terminal

Printed circuit board availablefrom the EPE Online Store, code7000240 (www.epemag.com );terminal pins; 14-pin DIL socket;connecting wire, solder, etc.

$15Approx. CostGuidance Only

&&

&

&

&

N D'

5

5

5

5

5

5

5

5

&

73

73

7373

0,&

9

9

Fig.5. PCB component lay-out and (approximately) full-

size copper foil master track pattern.

5/$

E

F

H

N

1

9 7 268,7 5(/$<

%&

72 23

D

N

9

Fig.6. Interfacing to a relay.

5/$

),*

&,5&8,7

$$$8',2

03

5(/$<

'5,9(5

63($.(5

777333

Fig.7. Baby alarmapplication.

Page 36: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 808

sensitivity would need to besuitably reduced by using alower value for R5.

FLASH TRIGGERFinally, the circuit could

also be used as a sound-operated flash trigger to photo-graph such things as burstingballoons, breaking glass etc.Most flash guns operate byplacing a short circuit on an in-put and, as in this case thespeed of operation is important,a thyristor is a better device touse than a relay.

As shown in Fig.9, Thethyristor can be connected tooutput TP4, which will take thegate positive (via a resistor of,say, 1k:) when a sound is de-tected, triggering the thyristor

and operating the flash. The op-eration must, of course, be car-ried out in a darkened room withthe camera shutter open so thatthe film is only exposed whenthe flash operates.

However, since such useswere not the author’s primaryreason for building the circuit,the above applications are onlygiven as “design ideas” andhave not been built or tested.Other uses for the circuit will nodoubt occur to readers.

&RQVWUXFWLRQDO3URMHFW

),*

&,5&8,7

$8',2

$03

63($.(5

9

086,&

,1387

9

Fig.8. Suggestion forPA control.

J

N

N73

&'000777

72 &$0(5$)/$6+

9

Fig.9. Application as a cam-era flash trigger.

Page 37: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 809

The cathode ray tube (CRT)is the most widely used type ofdisplay today. However, as aresult of the enormous marketand potential, development isprogressing in alternative dis-play technologies.

A company named Print-able Field Emitters Ltd (PFE) isundertaking one interesting de-velopment in the UK. Using thefield emission display (FED)they have made some signifi-cant developments that will en-able this technology to bewidely used and possiblyreplace the CRT in thenear future.

FEDSIt is worth summarizing the

principle behind field emissiondisplays. They can be consid-ered as an integrated circuitequivalent of the CRT. Theyconsist of an array of field emis-sion electron sources with ascreen spaced a very short dis-tance away, and having a corre-sponding array of phosphordots.

The space between theelectron sources and the screenis evacuated. Voltages are ap-plied to the control electrodes toextract the electrons from thecathodes and inject them into aregion where they can be accel-erated by the voltage on the an-ode. The electrons attain suffi-cient velocity such that whenthey strike the phosphor dots onthe screen, they cause light tobe emitted.

One of the most importantareas where the FED requires

development is associated withthe cathode plane and its arrayof electron sources.

The traditional approach forthe emitters is to use arrays ofmicrotips fabricated using semi-conductor manufacturing tech-niques. Several companies of-fer displays manufactured usingthis approach. However, as thetechniques involved are close tothe limits of semiconductormanufacturing processes, thesedisplays are expensive, theirsize is limited, and yields arepoor. Although the ultimate aimis to make television sizedscreens, this is unlikely to beachieved using the technologyin its current form.

IDEA DEVELOPMENTOne idea that is still under

development is to use an ideabased on broad area field emit-ters. These materials allow elec-trons to be emitted at low poten-

tials. The first materials thatwere developed for this applica-tion used thin film diamond, ordiamond-like carbon.

Using this technology, thesharp points required for the ba-sic FED were no longer re-quired. As a result the lithogra-phy required is much easier, asfeature sizes range between 4and 10 microns instead of lessthan a micron for the basic FEDdesigns. Unfortunately, devel-opment of this has been prob-lematic, because the economicdeposition of the emitter filmsthat give the required propertieson glass has not yet been possi-ble.

NEW SOLUTIONPFE, based in the UK, has

demonstrated a generic class ofbroad area field emitting materi-als that are much cheaper todeposit than anything previouslyseen. They also have the ad-

DEVELOPMENT OF FIELD EMISSION DISPLAY TECHNIQUES MAY CHALLENGE THEROLE OF CRTS REPORTS IAN POOLE

Fig.1. Schematic representation of the construction of a FED.

Page 38: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 810

vantage that they can be usedon large-scale displays thatwould be suitable for televisionsor computer monitors. This re-sults from the fact that the pro-cess uses an ink-like material toform the emitters. These can bepatterned using printing tech-niques rather than semiconduc-tor fabrication methods that arefar more expensive to imple-ment.

The idea for the techniquearose from work undertaken atBirmingham University. Whilstsearching for a solution to theproblem of flashover in vacuumdevices, it was noticed thatelectrons were emitted ingreater quantities around areaswhere there were impurities inthe surface material. The teamat PFE investigated the effectwith a view to using it for fieldemission displays.

The company undertook aconsiderable amount of work toperfect the idea for use. Boththe materials and the dimen-sions had to be optimized togive the results required. Theparticles that are used are verysmall, measuring onlyAngstroms in diameter. Theyare also clustered together toprovide one broad area emitter

site.

The work at PFE is pro-gressing towards making thecathode material into a form ofink that can be printed onto ametal-coated substrate. It willthen be fired to make a stablecathode plane.

The principle has now beendemonstrated using three pix-els, red, blue and green, each2mm 2mm. The standard in-dustry phosphors of yttrium oxy-sulphide, zinc oxide, and zincsulphide were used to give thethree colors and anode voltagesof 7¬¬¬5kV were used. Subjec-tively, the results proved thatthe new FED would be as brightas an existing television screen.

IMPLEMENTATIONWhen these FEDs are man-

ufactured, they will need to usethree electron guns together toenable the colors for each pixelto be activated separately. Thiscan be likened to a miniatureelectron gun, each one compris-ing of a focus grid and gate. Inthis way they form an electronlens that keeps the beam paral-lel and in a form that can be ac-celerated towards the screen

and the phosphors.

It is anticipated that the dis-play should be considerably lessthan 1cm thick. This should en-able the depth of televisionsand computer monitors to bereduced by a considerable de-gree. The operating voltagesare expected to be around 5kVfor the anode and less than 40volts for the cathode.

This will simplify the powersupply requirements when com-pared to a CRT display, al-though they are higher thanthose required for other typessuch as an LCD. Even so, theperformance and cost of theFED meets the requirements fora high volume, high perfor-mance, and low cost displaymore closely than any othertechnology.

Once this latest develop-ment has been implemented ina form suitable for production,the new displays should quicklybe seen on the market. Furtherinformation is available via E-mail from: [email protected]

1HZWHFKQRORJ\8SGDWHV

Page 39: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 811

In the UK we are fortunateenough to enjoy virtually unin-terrupted electricity, provided byone of the world’s largest inter-connected electrical systemswhich links our power stationstogether to form the NationalGrid. The high quality ofBritain’s electricity supply istaken for granted by us all, al-though for both the micro-electronics enthusiast as well asthe general public there is muchmystique surrounding the way inwhich electrical power is cre-

ated and delivered safely to ourhomes.

National Power generouslygranted the writer unlimited ac-cess to all parts of a moderngas-fired power station Killingholme “A” near Grimsby and provided a much-neededinsight illustrating where our“juice” actually flows from. Ifever you have wondered what“neutral” really means, why theearth plays such a vital role insafety, or why an electricitypower station would ever needgas, or if you just want to brushup on some fundamental the-ory, this article provides back-ground which is essential read-ing for electronics users andconsumers everywhere.

LIGHTS FANTASTICThe sight of electricity py-

lons marching alien-like acrossthe countryside is an all too fa-miliar one, yet in spite of theiromnipresence it is easy to over-look the feats of heavy engi-neering and high technologysurrounding us which are re-sponsible for delivering electri-cal energy to illuminate and

warm our homes, cook our food,and entertain us, as well aspowering our industries.

It is something of a paradoxthat the microelectronics enthu-siast can utilize the very latestin silicon chips to create anothertechnological masterpiece, yet ifwe are honest, many of uswould admit to having only afleeting knowledge about theelectricity supply itself. Weleave that sort of thing to elec-tricians. We probably know (wethink) that earth is, as its namesuggests, connected to earthsomewhere along the line, andperhaps the neutral is, er, some-how neutral. We know that thesupply is “alternating”, but howmany have actually stopped toconsider what all this reallymeans?

After reading these two arti-cles you will know precisely howthe electricity supply is gener-ated, distributed and delivered.Although it is written with theUK 230V AC 50Hz. supply inmind, note that many similarprinciples are utilized abroad, soeven if you do not reside in theUK you will find a considerableamount in common between the

In this two-part feature, supported by the expertise of the international powergeneration company National Power plc, Alan describes some of the hightechnology involved in generating power from a gas pipeline to the turbines andgenerators and then to the electricity pylon and beyond! We also examine inclose-up some of the techniques related to the provision of a 230V AC supplydirectly to housing and industry in the UK.

32:(5 *(1(5$7,21 )520

3,3(/,1(6 72 3</2163$57

By ALAN WINSTANLEY

Page 40: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 812

systems outlined here and thoseemployed in your own country(some of which are undoubtedlyBritish-built).

IN THE BEGINNINGThe incandescent electric

lamp was first produced in 1879by Joseph Swan in England andThomas Edison in the USA, andtwo years later Britain saw theadvent of its first public electric-ity supply. Over the next fiftyyears, some 600 supply under-takings with nearly 500 localizedpower stations would be cre-ated, operating at a variety offrequencies and both alternatingcurrent (AC) and direct current(DC) voltages.

In 1927 the Central Electric-ity Board (CEB) was appointedby statute, with a view to stan-dardizing frequencies, and alsoto implement an interconnectionplan to improve efficiency andreduce waste. The plan in-volved hooking together a se-lect number of power stations,and was completed in 1938.Later the industry was national-ized in 1948.

Over the last twenty or thirtyyears the power generation pic-ture in the United Kingdom hasbeen transformed, so to speak,having moved away from theonce heavy reliance on Britain’srich supply of coal to a modernmulti-fuelled power industrywhich is clean, efficient and de-pendable.

Until the early 1990s, powergeneration was undertaken andcontrolled by the Central Elec-tricity Generating Board (theCEGB), which was primarily re-sponsible for producing andselling power for onwards trans-mission to the regional electric-ity boards by the National Grid,the organization which “ownsthe wires”. From there it would

be distributed to tens of millionsof residential and commercialproperties.

Privatization and the arrivalof market competition in 1990introduced radical changes inthe way the UK electrical supplymarket operated. The CEGBgave way to competing powercompanies including NationalPower, PowerGen, and the nu-clear arm of the industry, BritishEnergy. There are now some 30or more power producers, manyof which are independent or for-eign owned power stations,competing for the business ofnearly 23 million domestic cus-tomers.

These, and millions of com-mercial and industrial users areserved by fourteen RegionalElectricity Companies (RECs).The market for buying and sell-ing electrical power has openedup at all levels, so much so thatin the UK it is now possible tobuy gas from electricityproviders and vice versa.

ON DEMANDOver the many decades in

which we have enjoyed virtuallyuninterrupted electrical supplies,the power providers have ac-

crued much experience of thelikely demands that will beplaced upon them by their cus-tomers. This enables the powerdistribution companies to planahead and allocate, on a dailybasis, the various power gener-ation resources that are going tobe available to meet the fore-casted demands.

How, according to NationalPower, these various fuel typesare available in “layers” to meetthis demand, which in the UKtotals nearly 70,000 Megawatts(MW), is shown in Fig.1. Thegraph also shows how the re-sources are divided amongstvarious fuel types.

Underpinning the country’ssupply capability are both gasand nuclear fuel sources whichproduce a constant 30,000MWbetween them and form thebedrock of Britain’s availablecapacity. Also providing nearly5,000MW of capacity are whatare termed “interconnectors”,which relate to the connectionsmade by the National Grid toboth Scotland and France: yes,a certain proportion of ourpower is imported, though thesame wires could be used toexport surplus electricity aswell. Roughly 2,000MW of inter-connected power is availablevia the Cross-Channel Link, apair of undersea 45km long ca-bles completed in 1986.

6SHFLDO)HDWXUH

Fig.1. How the demand forelectricity in the UK is fulfilledby different types of fuel. Nu-

clear, gas, and“interconnectors” provide thebase, whilst coal, oil, and hy-

dro are only brought on-stream to top up the supply.

Fig.2. How a 24-hour de-mand, peaking at 17:30

hours, is met by the electric-ity industry.

Page 41: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 813

The rest of the UK’s electri-cal capacity is provided by coal,oil, and hydro-electric power,noting from Fig.1 that the ca-pacity of these sources dwindlesin terms of utilization: they formthe buffer which is primarilyused for the “top up” needed tomeet peak surges. For most ofthe time, we rely on nuclearpower, gas-fired power plants,and imported electricity, whichare 100 percent utilized.

The demands for electricalpower rise and fall during theday, and the weather and manyother events such as the ad-vertising breaks in favorite TVsoaps can trigger a hugesurge in demand when peoplehead for the electric kettle.These TV-related surges areknown as “TV pick-ups”. Theaverage person will also decideto turn on the electric lights inthe evening only when a com-mercial break occurs!

It is the function of the Na-tional Grid Control Center,based at Reading, to match thedemands placed by its cus-tomers with the available capac-ity and to cope with anticipatedTV pick-ups. According to Na-tional Grid figures, the largestrecorded TV pick-up of2,800MW occurred in the WorldCup Semi-Final in July 1990(England v. West Germany). Tomaintain stability, the controlprocess may also require elec-tricity production to be reducedwhen demand falls: the funeralof Princess Diana caused a ma-jor drop of 1,000MW in normalpower consumption when alldaily activity stopped in the UK.

PRICE MATCHINGThe task of matching supply

and demand is called“generation dispatch” and in-

volves not only the NationalGrid being kept posted by datalinks showing the availability ofpower from all its suppliers, butalso at what price: electricity isbargained in Pounds perMegaWatt Hour and power gen-eration companies have to com-mit to a price for filling half-hourslots for the 24 hours ahead.This bidding process occurs ev-ery morning when the powerplants notify the National Grid oftheir availability and pricing forthe day.

As you would expect in aprivatized market economy, the“bulk” price charged by genera-tors varies depending on de-mand. On a typical Novemberday (for example) it could risefrom around 33 UK Pounds(approximately $54 for Ameri-can readers) per MegaWattHour (MWH) to roughly 45 UKPounds ($74)/MWH at peaktimes of the day which, inci-dentally, is at “tea time”, whendemand peaks dramatically at17:30 hours. By way of compari-son, depending on one’s loca-tion, a domestic electrical “unit”costs 6¬¬¬45 UK pence (10¬¬¬6

cents), which equates to 64¬¬¬50UK Pounds or $106.42/MWH.

Trends from precedingweeks, months, and even yearsare taken into account as well,and forecasts are accurate towithin a couple of percentagepoints. Any event which is fore-cast to trigger a rise in powerdemand Cup

say a televised World is brought into the equa-

tion, as are other factors includ-ing weather forecasts, seasonaltrends and even the day of theweek.

In Fig.2, National Power il-lustrates how peak demandsover a typical 24 hour periodare gradually topped up asmore plant is brought on streamto cope, culminating with theshort-term use of pumped stor-age (water caverns) to generatehydroelectric power at peaktimes (around 6p.m.). Note thatnuclear and gas-fired powerprovides a constant output, andonly as demands soar will largercoal and oil-fired stations bebrought onto the system to meetpeak surges.

A “pumped storage” installa-tion in Dinorwig, Wales can also

6SHFLDO)HDWXUH

Fig.3. Daily demands are bought in half-hour blocks from elec-tricity producers by the National Grid. This graph, produced

daily, depicts several factors including the purchaseprice of electricity.

Page 42: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 814

be brought on stream within tenseconds, to cater for daily peaksin demand, and this cushion hashelped to reduce the need tohave spare generator plant con-stantly running to meet unantici-pated surges in demand, seeFig.3. All power plants are iden-tified in an “order of merit” table,which highlights the individualcost of power generated by thevarious power plants.

Hence, there are low merit(high cost) and high merit (lowcost) plants, which depend onthe type of fuel used. In addi-tion, the National Grid will takeinto account the dynamic pa-rameters of the plant, such asloading rates, and whether theturbines are hot or cold. It canbe cheaper to run a more ex-pensive “hot” machine than acheaper cold machine.

KILLINGHOLME “A”National Power’s

Killingholme “A” power station issituated near the ports of Im-mingham and Grimsby in NorthLincolnshire, on the banks ofthe River Humber. It was theirfirst gas turbine plant and wascommissioned in 1993.

This 650MW plant runs as a“base load” operation, whichmeans that it provides a con-stant output that forms some of

the everyday “bread and butter”of the United Kingdom’s electri-cal capacity. Its performancewon Killingholme “A” the Na-tional Power Availability Prize.

National Power has stronginternational links and is heavilyinvolved with the export of tech-nological know-how, includingthe construction and joint opera-tion of power plants in othercountries, notably the USA, Eu-rope, and China. The power sta-tion at Killingholme also has animpressive array of links withlocal educational and environ-mental projects, having fundeda wide variety of nature conser-vation drives in association withboth local and national authori-ties.

A new fully staffed visitor’scenter, an educational gardenand close associations whichhave been carefully nurturedwith neighboring schools andfurther education help ensurethat Killingholme “A” plays anenvironmentally aware and re-sponsible role in the community.

FROM PIPELINES TOPYLONS

Killingholme “A” is a gas-fired power station. Why gas?When the UK electricity market-place was forcibly opened up tocompetition in 1990, the switch

from coal to gas became all therage in what became known as“the dash for gas”. Whilst coal-fired power stations battled withthe logistics of being constantlyfed by trainloads of cheap coal,not to mention the enormouscost of upgrading plant to meetpollution targets, one thingwhich is still in plentiful supply isnatural gas, provided from rigsin the nearby North Sea.

Several new power stationswere therefore constructed inthis locality, some being inde-pendently owned and others be-ing built by both National Powerand PowerGen. A gas-firedpower station is far cheaper andmuch more compact to buildthan a comparable coal-firedstation, producing less carbondioxide and virtually non-existent levels of sulfur dioxide,the compound that gives rise toacid rain.

Since the region’s petro-chemical industries are hand-somely served by major under-ground gas pipelines, then ifthere is an immediate need toconstruct power plants quicklyand efficiently, gas is an obvi-ous choice for fuel. Further-more, by purchasing “off-the-shelf” power plant rather thanattempting to design everythingin-house, National Power en-joyed a greater choice of sup-plier and shorter lead times dur-ing the dash for gas.

Before we delve under thebonnet of Killingholme “A”, it isworth relating a few fairly funda-mental principles of electricity,which actually have a most pro-found impact on the way inwhich electricity must be dis-tributed. When scaled up to thelevel of national electricity distri-bution, it soon becomes appar-ent why milliohms suddenlymatter and kilovolts reallycount.

6SHFLDO)HDWXUH

General view of the Killingholme “A” Gas-fired Power Station.

Page 43: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 815

A set of rules different fromthose which the microelectron-ics enthusiast usually concen-trates on, exists in the field ofgenerating and transmittingpower and even the hardenedelectronics enthusiast cannothelp being filled with awe whenconfronted with a 400,000Vtransformer or a 10,000 ampcircuit breaker!

LONG DISTANCETRANSPORT

When electric current needsto be conducted over large dis-tances (e.g. dozens of miles),several issues arise. The pri-mary problem is that of un-wanted electrical resistance,which results in heating effectsthat are proportional to thesquare of the current (I2 R).

If a length of wire has aknown resistance, then doublingthe current will quadruple thepower dissipated in the form ofheat. Wasting power in this wayis inefficient and equates di-rectly to increased costs, so it ishighly desirable to reduce theseheating effects.

Since a conductor’s resis-tance is directly proportional toits cross-sectional area, then inorder to overcome the resis-tance inherent in long-distancepower lines, the cross-sectionalarea of a conductor could obvi-ously be increased (Fig.4). Thiswill reduce its resistance to cur-rent but will obviously increase

costs because of the greatervolume of conductor needed.

The solution is to step upthe voltages being transmittedto much greater levels tens orhundreds of thousands of volts.The higher the operating volt-age, the lower the current, thenthe smaller the cross sectionalarea of power lines can be, todeliver the same level of power.This saves material costs, butthen introduces yet another fac-tor: the cost of insulating theenvironment from these ex-tremely high voltages.

Transmitting electricalpower economically around thecountry, then, is a finely-calculated compromise betweenseveral factors if power is to betransmitted efficiently and alsoat the most economical price:too thin a wire and the I2 R heat-ing losses become unaccept-able; however too thick a wireresults in a formidably high ma-terial cost; lastly, too high avoltage implies a greater cost ininsulation and other technolo-gies.

The economics of this sim-ple relationship are shown ingraph form in Fig.5. Inciden-tally, in case you’ve alwayswondered, those power trans-mission lines found hangingfrom pylons are usually made ofaluminum alloy.

6SHFLDO)HDWXUH

Fig.4. The resistance of aconductor is related to thecross-sectional area (CSA).The smaller the diameter,the higher the resistance.

Fig.5. Illustrating the simplerelationship between thecost of providing a supply

versus the voltage and insulator costs.

Four 400kV transformersconnected to the outputs of

the four generators.

Fig.6. (a) Step-down transformer symbol. The “spot” indicatedthe direction of the windings. (b) Step-up transformer, and (c) auto-transformer.

Page 44: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 816

TRANSFORMATIONIn order to transmit electri-

cal power over considerable dis-tances, great reliance is madeon the transformer . Most of ourreaders will be familiar with atransformer, and exactly the

same principle of “stepping up”or “stepping down” an alternat-ing voltage is used throughoutthe power distribution network.

It would, of course, not beat all feasible to route high DCvoltages on overhead or under-ground cables due to the magni-

tudes of current involved. Imag-ine trying to transport 80 am-peres per house at 230V DCand you quickly realize that theconductors would have to beimpossibly thick several me-ters in diameter to transmitsuch power levels to an entire

6SHFLDO)HDWXUH

National Power Killinghome “A” near Immingham in North Lincolnshire, UK is a modern gas-fired CCGTpower station, which produces enough electricity to power a town the size of nearby Grimsby. It uses threegas turbines and one steam turbine, which operate non-stop for many months on end. 1: Natural gas iscarried by underground pipelines, from offshore rigs in the North Sea. 2: Air is sucked in through largegrilles on the front of the building, where it is filtered. 3: The gas/air mixture is swirled and burned in acombustion silo, which produces a force on the turbine blades below, making them rotate. 4: The genera-tor is directly coupled to the rotating turbine shaft. 5: The turbine exhaust is used to heat water in the HeatRecovery Steam Generator, to produce “bonus” steam. 6: Exhaust then passes through the stacks, oneper turbine. 7: A steam turbine produces further electricity from the steam created in the HRSG. 8: Eachgas turbine outputs 3-phase 15·75kV to a large 400kV step-up transformer, outside the building. 9: Thestep-up transformer for the steam turbine, located by the main office block. 10: The Banking Compoundcontains the main isolators for the 400kV supply. 11: The exhaust steam from the steam turbine passesthrough a condenser, and produces high quality water which is recycled in the HRSG. 12: The cooling tow-ers are used to reduce the temperature of the cooling water utilized in the condenser. 13: The under-ground 3-phase 40kV cable passes to a sub station, for onwards transmission by the National Grid.

Page 45: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 817

town. (The Cross-Channel Linkdoes however run at DC, as away of separating the Englishand French power transmissionsystems: converter stations atboth ends then produce alter-nating currents for onwardstransmission.)

The main function of atransformer is, of course, tostep an alternating voltage up ordown. Fig.6a shows the familiarcircuit symbol of a typical mainstransformer that would be foundin a constructional project orconsumer equipment. It consistsof two or more coils wound on alaminated steel core.

The primary winding can beconsidered as the input and theoutput is taken from the trans-former’s secondary winding. It isalso often important to know thedirection or phase of the wind-ings: in electronics a spot-markmay sometimes be used toidentify one end of each wind-ing, or they may be labeled as,say, 230V and 0V on the pri-mary, and 12V and 0V on thesecondary winding.

Whether the transformerwill increase (step up) the alter-nating voltage applied to theprimary, or reduce it (stepdown) depends on the ratio ofthe number of turns of bothwindings. Regardless of whichtype the transformer actually is,at a simple level it can be as-sumed that the power (VI)across the primary is roughlythe same as that across thesecondary.

A step-down transformer(used in ordinary mainsadapters for example) mighthave a 240V AC primary and,say, a 12V AC secondary. Theturns ratio is therefore approxi-mately 20:1. If the voltageacross the primary is Vp and

that across the secondary is Vs,then Vp/Vs = Np/Ns, where Npand Ns and are the numbers ofturns in the primary and sec-ondary windings. As shown inFig.6a, the primary power(240Vx0·5A watts) is the sameas the secondary (12V10A) ignoring losses.

Therefore, the primary of atypical step-down mains trans-former is at a higher voltagebut carries a lower current thanthe secondary. The power(voltage current) is the samein both windings. Importantly,this means that thin wire can beused for the high voltage side.However, the secondary circuitoperates at a lower voltage buta much higher current. A thickergauge wire is used on the sec-ondary, to cope with thesehigher currents.

The auto-transformer canbe considered as a single wind-ing with a tapping made some-where along its length. One ter-minal is therefore common toboth the primary and the sec-ondary (see Fig.6c). Scaled-down versions are used in work-shops or laboratories, and havea moving contact, which can berotated to produce a variableAC voltage.

A key advantage of theauto-transformer is that the sec-ondary winding does not “see”all of the secondary current,which means that less copperwire is needed when comparedwith the classic “double-wound”transformers of Fig.6a andFig.6b. The use of auto-transformers is quitewidespread in the power indus-try, and these are classed asvoltage transformers (VTs).One disadvantage to be re-membered at consumer level isthat they do not provide com-

plete safety isolation from themains.

A third type of transformer isalso utilized in the power genera-tion industry, in order that mea-surements of current may bemade. Since it would be impracti-cal to directly measure the manykilo-amperes that can flow in cer-tain parts of the electricity genera-tion system, a current trans -former (CT) is used to enablereadings or measurements to betaken. A “doughnut” or toroidal-shaped secondary coil can beplaced over a conductor whichpasses through the center; thecurrent-carrying conductor canthen be deemed to be the“primary” of a current transformerwhose secondary current canthen be directly measured, orused in conjunction with protec-tion equipment.

A series of CTs and VTs areused to constantly monitor thecircuits of the power station; anenormous voltage transformerwith a 15¬¬¬75kV primary is posi-tioned to directly measure theoutput of each of the genera-tors. Transformers are also in-strumental (literally) in alertingthe power generation and distri-bution companies to any losseswhich may occur further down-stream in the electrical grid.

In the power generation in-dustry, thin wires at high volt-ages are used to transportpower economically over greatdistances. Transformers willthen be utilized at sub-stationsin order to step down the volt-ages to something more appro-priate, using thicker, more ex-pensive wires to carry thesehigher “secondary” currents. Wewill look at the aspects of three-phase power transmission anddistribution later on.

6SHFLDO)HDWXUH

Page 46: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 818

TALKING TURBINESHaving introduced these

fundamental electrical aspects,let’s return to our power stationat Killingholme “A” and explorein more detail where electricalpower actually comes from. Ouradopted power station is fuelledby gas brought in from theNorth Sea and transported in anunderground pipeline. The ac-tual compound area where thenatural gas arrives contains justa little surface pipework and isremarkably “ordinary-looking”,all things considered!

The Killingholme station isknown as a Combined CycleGas Turbine (CCGT) plant,which utilizes gas turbines todrive electrical generators. In aCCGT plant, surplus heat cre-ated by the gas turbines is fur-ther utilized to produce steam.This drives a steam turbine togenerate yet more electricity.The steam turbine is driven by“waste” heat from the gas tur-bine which results in a vast im-provement in overall powerplant efficiency. A diagram ex-plaining the overall process isshown in Fig.7.

Large grilles on the front ofthe building are actually air in-lets for the gas turbines. Eachturbine requires about half atonne of air per second, so at-mospheric air is sucked in andcompressed by many stages ofspinning blades located at thefront of each turbine shaft. Theresultant high-pressure air is“swirled” along with natural gaswithin a combustion unit fittedon top of the turbine. Within this“silo combustor” are 54 separateburners, which act as gas jets.The burning mixture reachestemperatures of over 1,000 de-grees Celsius.

In the same way that in aninternal combustion engine the

petrol/air mixtureignites and ex-pands to forcedown a piston,the resulting con-tinuous expand-ing force fromthe burning gasmixture passesover and spinsthe gas turbineblades. Thesedrive a generatorthrough a shaft,which also drivesthe air compres-sor blades.

IN A SPINLooking at the generator in

more detail, it is much easier touse stationary coils rather thanattempt to rotate them, so theelectrical generator consists of acomparatively small rotatingelectromagnet (the rotor) sur-rounded by a series of largefixed coils (stators) in whichelectrical energy is induced.They output up to 145MW at15¬¬¬75kV. The Killingholmepower plant has three such gas-turbine driven generators plus asteam turbine as well. We willbe looking at what happens tothe generator’s output in greaterdetail later on.

To start the system, a”static starting device” (SSD) isutilized in which the generator isactually used in reverse, as astarter motor (consuming some4MW of power in the process),see Fig.8. Acting as an induc-tion motor, the stator is ener-gized by a variable voltage,variable frequency AC supply;the generator’s inner rotatingwindings are powered with a DCcurrent (called “exciting” the ro-tor) through brushes and mov-ing contacts called sliprings.Variations on this theme include

the use of rectified AC exciters,or brushless excitement sys-tems, which use AC generatorsand eliminate the need forsliprings altogether.

At a certain point, the rotor’smagnetic field “locks” together

6SHFLDO)HDWXUH

Aerial view showing gas turbine blades(largest, front) and air compressor (rear) on

the shaft, undergoing inspection.

Fig.8. A Static starting device(SSD) is utilized to convert agenerator into a “starter mo-tor” (consuming 4MW). This

causes the rotor to spin,which, in turn, turns over

with the field created in the sta-tor, and the generator (still be-having as a motor) achievessynchronous operation: the twomagnetic fields are synchro-nized with each other. Then thesupply to the stator is increasedin frequency, which causes therotor to be dragged along at ahigher rotational speed. Thus

Page 47: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 819

the shaft is forced to rotate.

At 2,500 revolutions perminute (RPM) the gas turbinemanages to sustain itself andthe SSD is disabled, the tur-bine’s compressor blades nowspinning fast enough to main-tain the combustion process.The rotor’s speed will then beautomatically governed up tothe critical speed of 3,000 RPMand electricity can then be gen-erated.

To give you an idea ofscale, the rotor shaft typicallyweighs 100 tonnes or so and ismachined from one solid cast-ing. It will become apparentlater why a speed of 3,000 RPMis significant to electricity users!

POWER BONUSThe power generation pro-

cess does not stop at the gasturbine. Having passed over the

spinning gas turbine blades, theexhaust gases still have a tem-perature of some 500C. Ratherthan letting this go to waste, in aCCGT system this is put to fur-ther use in a heat exchangeboiler or “heat recovery steamgenerator” (HRSG).

Each heat exchanger con-tains over 100 kilometers offinned tubing, which functionslike a heatsink in reverse: thehot exhaust gas is used to heatwater, which is pumped throughthe core of the heat exchanger.The water turns to steam. Thechimney-like structures orstacks, which can be seen fromthe author’s window severalmiles away, actually vent ex-haust from the gas turbines af-ter it has passed through theheat exchanger.

The “bonus” steam pro-duced by the heat recoverysteam generators is completelyfree of water vapor and is invisi-ble, and is piped to a steam tur-bine to drive a fourth 227MWgenerator. The steam ex-hausted from this turbine is con-densed by passing it over abank of titanium tubing throughwhich cooling water is pumped(originally extracted from thenearby River Humber). The re-sultant condensed water is ex-tremely pure and is recycled foruse back in the heat recoveryboilers, to be heated back intosteam again.

Lastly, the cooling waterthat has now been warmed bythe steam turbine’s condenserhas to be cooled down, and thisis achieved in a cooling towerby spraying it over a large sur-face area in the face of a risingcolumn of air. The cooled wateris then pumped back to thesteam turbine’s condenser forre-use.

Sometimes, water vapor is

6SHFLDO)HDWXUH

Fig.7. Schematic representation of the Killinghome “A” Com-bined Cycle Gas Turbine (CCGT) power plant.

The computer control room monitors and records the per-formance of the plant.

Page 48: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 820

produced during this cooling-down process which will beseen billowing from power sta-tion cooling towers. As readerswill know, coal-fired power sta-tions rely on steam turbines andrequire much larger coolingtowers for reducing the temper-ature of their condenser coolingwater.

In a CCGT plant, it can beseen that much use is made ofrecycling and utilizing the by-products of the combined cycleprocess. Exhaust heat from thegas turbine is used to createsteam, which generates “bonus”power with a steam turbine; thesteam is then condensed backinto water for further use in the

heat exchanger, where it is re-heated by the gas turbine’s ex-haust to make more steam. Theheat recovery cycle has a phe-nomenal effect on throughput: itincreases the overall efficiency ofthe plant from approximately 33percent to 50 percent or so.

Next Month: In the secondpart of this article, methods ofpower distribution and transmis-sion are described, along withthe means by which electricity isdelivered to a typical home.

6SHFLDO)HDWXUH

Page 49: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 821

ROBERT PENFOLDVISUAL PROGRAMMING FOR PC ADD-ONS

The subject of using visualprogramming languages withPC add-ons was considered inthe previous Interface article,and we continue in the samevein this month. As pointed outin the previous Interface article,Delphi 2, 3, and 4 lack the Portfunction, and do not supportdirect port accesses. This isperhaps being a little economicwith the truth though, becauseall versions of Delphi areequipped with a neat in-lineassembler.

It is therefore possible toboth read from and write toports simply by dropping a fewlines of assembly language intoObject Pascal routines. This isnot quite as convenient as usingthe Port function, but it is notthat difficult either.

Incidentally, Borland’s C++Builder would also seem to beequipped with an assembler,and could presumably be usedwith user add-ons. However,C++ seems to be rather moreinvolved than Delphi orVisualBASIC, and it is probablya language that is better suitedto programming experts thandabblers.

WELL STACKEDUsing the assembler is very

straightforward, and it is just amatter of heading your codewith “asm ” and finishing with“end ”. One slight problem isthat you must ensure that yourassembly language routines donot interfere with the normaloperation of the computer. This

means that any changes madeto the contents of certainregisters must be reversedbefore the routine is terminated.

The simple routine thatfollows is all that is needed towrite to a port. This isequivalent to the speed controlexample provided in theprevious Interface (May ’99)article.

beginOutVal := ScrollBar1.Position;asmpush dxmov dx, 888mov al, OutValout dx, alpop dxend;end;

OutVal is the byte-sizevariable used to store thereading from the scrollbar, and

this must be declared in theappropriate part of the program.The assembly language routineuses indirect addressing via thedx register to access the port,and the push instruction storesthe current contents of thisregister on the top of the Stack.

Next a move instruction isused to place the port addressin dx . In this example theaddress is 888, but this can beany valid address. A secondmove instruction transfers thevalue stored in OutVal to the alregister (the accumulator).

The out instruction thenoutputs the value in al to theaddress in dx . Finally, the popinstruction restores the contentsof the dx register from the topof the Stack. Note that two endinstructions are needed, one toterminate the assemblylanguage routine and one to endthe subroutine as a whole.

Fig.1. The VisualBASIC 6 environment is similar to thatof Delphi.

Page 50: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 822

For 16-bit transfers the axregister should be used insteadof the al register. There is adirect addressing mode wherethe port address is supplied inthe out instruction, but this onlysupports eight-bit addresses.User add-ons are normally ataddresses from 512 to 1023,making direct addressingunusable.

PORT READINGReading from a port

requires a slightly longerroutine, but is still quitestraightforward. The followingshort program reads from theprinter port at base address 888(&H378), which must obviouslybe a bi-directional type. Itshould be assigned to a timercomponent having an interval ofabout 25ms. Note that a labelcomponent must be included onthe form to provide the programwith somewhere to print thereadings.

beginasmpush dxmov dx, 890mov al, 32out dx, almov dx, 888in al, dxmov InVal, alpop dxend;Str (InVal, S);Label1.Caption := S;end;

As before, the contents ofthe dx register are pushed ontothe Stack, after which a value of32 is output to address 890.This sets the data lines of theport to the input mode. Next theaddress of the port to be read is

loaded into the dx register, andthe data from the port is readinto the al register. The value inal is then moved into variableInVal , the original contents ofthe dx register are restoredfrom the Stack, and theassembly language routine isterminated.

Finally, normal ObjectPascal instructions are used toplace the value in InVal intostring variable S, and thisvariable is then assigned to thelabel where it is displayed onthe screen. Of course, byte andstring variables InVal and Smust be declared in theappropriate section of theprogram.

These methods of readingand writing will work with Delphi1, but the Port function wouldseem to be the better optionwith this version of the program.With the later versions of Delphithe built-in assembler almostcertainly represents the easiestway of obtaining direct portaccess. It is possible to defineinput and output functions thatcan be called up when required,but in most cases it will beeasier to simply drop in theassembly language routines asand when they are needed.

Note that Delphi 2, 3, and 4produce 32-bit programs thatare only suitable for use withWindows 95 and 98. Delphi 1must be used if programs thatwill run under Windows 3.1 arerequired.

Note also that Windows NTdoes not permit direct portaccesses, and that it requiresthe ports to be handled via theapproved and indirect routes.These routines will not workunder Windows NT, and couldadversely affect the stability ofthe operating system.

BASIC Ins and OutsOver the past two or three

years, a steady trickle of lettersfrom readers having trouble usingVisualBASIC to control their PCprojects have been received. Theusual complaint is that the Inpand Out instructions do not workwith VisualBASIC. Although manyGW and QBASIC instructions areincluded in VisualBASIC, Inp andOut have both been omitted.

This is not to say that directport access is totally impossiblewith this flavor of BASIC, but itis only possible with someexternal help. This means usingan add-in such as a componentor DLL file.

There are numerous add-insof this type available via theInternet, but these mainly gobeyond simple Inp and Outcommands, and can be quiteexpensive. It is only recentlythat I have discovered simpleand cheap methods of providingbasic port accesses.

If you are interested inusing VisualBASIC with your PCprojects, or if you requireinformation about parallel andserial port interfacing, it is wellworthwhile paying a visit to theLakeview Research web site athttp://www.lvr.com . Apart fromthe information, etc. at this site,there are plenty of links to othersites where further software andinformation can be found.

Having tried variousVisualBASIC add-ons, I wouldsuggest you use LakeviewResearch’s own freeware DLL ifyou only require simple Inp andOut instructions. The correctdownload is “inpout32 ’’ for the32-bit versions of VisualBASIC,or “inpout16 ’’ for the 16-bitWindows versions.

The author has only triedthe 32-bit version with

,QWHU)$&(

Page 51: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 823

,QWHU)$&(

VisualBASIC 6, and found it tobe very quick and effective. TheDLL file is placed in theWindows/System directory ofyour PC, and the suppliedinpout32.BAS file is loadedinto VisualBASIC before youstart programming.

This is done via the “AddFile” option, which is under the“Project” menu when usingversion 6.0 of VisualBASIC.You can then use Inp and Out ,which work in exactly the sameway as their GW BASIC andQBASIC counterparts. Whenthe finished program iscompiled it will incorporate theDLL file.

One definite drawback ofVisualBASIC is that, unlikeDelphi, it is not a true compiler.Delphi will compile a programinto a stand-alone .EXE file, butVisualBASIC produces a groupof files that can be used toinstall and uninstall the programin Windows 95 or 98. A simpleDelphi program consists of onefile about 200K or so in size, butwith VisualBASIC the total sizeof all the files seems to benearly ten times greater thanthis. VisualBASIC programs areprobably somewhat slower thanDelphi equivalents as well.

On the plus side,VisualBASIC is somewhateasier to use than Delphi,especially if you have someexperience at programming insome other version of BASIC.With the Inp and Outinstructions added it is justabout perfect for producing thesoftware for PC projects.

VisualBASIC is somethingof an industry standard, with amuch larger user base than anyof its competitors. It is perhapsworth mentioning that somebooks on VisualBASICprogramming come complete

programming.

In standardvisualprogrammingfashion, you startby designing theform layout,adding anynecessary buttons,labels, etc. Anynecessary codefor eachcomponent is thenadded. To readprinter port one at&H378 and printthe results on thescreen you coulduse a timercomponent (set atabout 25ms) and a

label. This code would beassigned to the timer:

Out &H37A, 32InVal = Inp(&H378)Label1.Caption = InVal

The first line sets the port tothe input mode, and the nextreads the data lines and placesthe result in the variable calledInVal . With VisualBASIC youhave the option of declaringvariables or simply makingthem up as you go along. Thereis little point in declaring them inshort programs, but it isotherwise advisable to do so.The third line prints results on-screen via the label component.

In general it is better to printtext via a label rather thandirect onto the form, as thisavoids the need to blankprevious readings. If you writetext to a label this blanking isdone for you. By altering thecharacteristics of the label viathe properties window it is easyto set a large font, change thebackground color, etc.

GOOD GRAPHICS

with a CD-ROM that containsthe “working model” version ofVisualBASIC 6. From time totime this is also given away onthe cover-mount CDs ofcomputer magazines.

The working model lacksthe two CD-ROMs of help filesthat come with the full program,and the compiler function isdisabled. It will save and loadyour programs though, and theycan be compiled and run fromwithin the working model. Thisis rather like GW and QBASIC,where you have to runprograms from within theprogramming language itself.This is clearly a less convenientway of doing things, but theprograms are fully functionalwhen run in this way.

ON FORMUsing VisualBASIC is very

similar to using Delphi, with asimilar programmingenvironment (see Fig.1). LikeDelphi it is event driven and youhave to adopt a more “bits andpieces” approach toprogramming than you woulduse for conventional BASIC

Fig.2. This virtual panel meter and digitalreadout requires just six lines of conven-

tional BASIC code.

Page 52: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 824

VisualBASIC has goodgraphics capabilities, and it iseasy to produce pseudo panelmeters and the like. In factminimal programming is neededfor this type of thing, becauseVisualBASIC is the most visualof visual programminglanguages.

Practically everythingrequired can be placed onto theform using components ratherthan lines of code. The propertywindow can be used to “finetune” the positions ofcomponents. The meter anddigital readout program shownin operation in Fig.2 was in factproduced entirely by addingcomponents onto the screen.

Even the pointer is a linecomponent. An advantage ofthis is that the pointer can bemoved by simply altering oneco-ordinate. There is no need toerase the previous version ofthe pointer becauseVisualBASIC does it for you.

In order to make thisprogram work, it only requires

the following six lines of code tobe assigned to the timercomponent:

Out &H37A, 32X = Inp(&H378)Label1.Caption = XX = X * 20X = X + 500Line1.X1 = X

The first three lines arebasically the same as theprevious example. The next linescales the value in X to suit theVisualBASIC co-ordinatesystem. This does not operatein terms of pixels, and seems tobe arbitrary. An offset is thenapplied to allow for the fact thatthe meter is offset from the left-hand edge of the screen, andthis value is then used as theX1 co-ordinate for the pointer.

LIGHT WORKWith VisualBASIC it is easy

to produce on-screen indicator“lights”, and the shapecomponent is the obvious basis

for something like this. Variousshapes are available, but acircle with a solid fill style is theobvious one to use in this case.

This example routine couldbe applied to a timercomponent, and it sets the“light” to red if the value readfrom the port is over 99, or togreen if it is not:

Out &H37A, 32X = Inp(&H378)If X > 99 Then

Shape1.FillColor =&HFF& ElseShape1.FillColor =&HFF00&

It is very easy to producemulti-color bargraph displays,gauges, etc. Visualprogramming languages arewell suited to control programsfor PC add-ons, and somepractical examples will beprovided in future Interfacearticles.

,QWHU)$&(

Page 53: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 825

Last month’s article dealtwith the history and generalprinciples of oscillators, andcovered the Hartley circuit insome detail. This month, fre-quency stability is considered,and the Colpitts oscillator andits variants are explored.

FREQUENCY STABILITYAbove 5MHz or so, drift be-

comes an increasing problemwith LC oscillators, and above10MHz frequency stability is al-most impossible to achievewithout recourse to complex cir-cuitry.

The main causes of drift aremechanical instability, varia-tions in supply voltage, exces-sive loading on the oscillatortuned circuit, and changes intemperature. Temperaturechanges can be externally im-posed, or they can arise fromthe consumption of power bythe oscillator.

Sound construction, a regu-lated power supply, and the useof a buffer amplifier will do muchto overcome the first threecauses. The problem of tempera-ture fluctuations, which modify thecharacteristics of all of the oscilla-tor’s components, is more difficultto overcome.

REDUCING DRIFTWhether mounted on

printed circuit board (PCB),stripboard, or tagstrips, oscilla-tor components and wiring mustbe rigidly fixed in position. Com-pleted assemblies can be pro-tected against vibration, andmade more rigid, by a liberalapplication of beeswax or byattaching components to theboard and to one another by aviscous non-water-based adhe-sive.

Avoid double-sided printedcircuit boards for oscillators.The two layers of foil can formcapacitors, which vary with tem-perature and shift the frequencyof oscillation. If unscreenedcoils are mounted on the board,etch away the area of foil be-neath them to avoid any possi-

ble capacitance effects.

Oscillators should be iso-lated in a separate metal“screening” enclosure. Again, ifunscreened coils are used,make the case sufficiently largefor the sides and ends of thecoils to be spaced from it by atleast one coil diameter in orderto limit the reduction in the Qfactor caused by the metalscreening. Locate the box awayfrom draughts and sources ofheat.

INDUCTORSIn the quest for low drift, air-

cored coils are the first choice,followed, in order of preference,by coils with dust iron cores,then ferrite cores, ferrite cups,dust iron toroids, and, least pre-ferred, ferrite toroids. However,

This new series is prepared with the electronics enthusiast and experimenter verymuch in mind and is intensely practical. Tried and tested circuits are fleshed out

with component values, and their vices and virtues are exposed.

PART 2: THE COLPITTS OSCILLATOR AND ITS VARIANTS

35$&7,&$/ 26&,//$725 '(6,*16By RAYMOND HAIGH

Frequency StabilityDrift becomes an increasing problem in all LC oscillators as

the frequency of operation rises through the HF spectrum. Itsmain causes are:

(1)Mechanical instability.

(2)Power supply voltage variations.

(3)Excessive and variable oscillator loading.

(4)Temperature variations, externally imposed or internallygenerated.

However well constructed, simple LC oscillators cannot, by them-selves, be made sufficiently drift free for use in transmitters radi-ating much above 10MHz. They will, however, give a more thanadequate performance in receivers operating up to 30MHz.

Page 54: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 826

the ability to adjust inductanceoften overrides the desire tominimize drift, and slug and cuptuned coils are widely used.Similarly, the high Q factors andminimal external fields oftoroidal coils are advantages,which frequently dictate theiruse.

Coil formers must be rigidand have good dielectric proper-ties. The range of commerciallyproduced items available to thehome constructor is now very lim-ited, but plastic pipes used in theplumbing and electrical industriescan be pressed into service. PVCelectrical conduit is of particularinterest, as its thick walls impartrigidity.

Single layer coils should betightly wound. When adjoiningturns are touching, the entirewinding can be held in place bythe application of a thin coat ofclear cellulose without undulyaffecting the performance of thecoil.

Spaced windings of heavygauge wire can be secured byapplying cyanoacrylate adhe-sive (Superglue) along the turnsof the coil. Piled coils should beheld within bobbins and woundwith only a light tension on thewire. Unless they are to be ex-posed to wide humiditychanges, it is best not to im-pregnate them.

Beeswax can be used tolock cores in position, but theeffects of dimensional and per-meability changes caused byshifts in temperature have to beminimized by the compensatingaction of the capacitors in thetuned circuit.

CAPACITORSVariable tuning capacitors

should be air-spaced and ofgood quality. Silver plated brass

vanes are to be preferred to alu-minum (they are usually onlyavailable in values up to150pF), and double bearing ro-tors are more stable than thesingle bearing type.

In the early days of radio,silvered mica components werethe first choice when a fixed ca-pacitor had to be connected into

a tuned circuit. Their tempera-ture coefficient is, however,rather unpredictable, and mod-ern practice tends towards theuse of polystyrene dielectric ca-pacitors, which have a slightnegative temperature coeffi-cient. (This can compensate forthe positive coefficient of dustiron toroids).

6SHFLDO)HDWXUH

J

J

V

G[[[

7<3( 1R

E J GH V JF G V

JJJ

JJJ J

G

G G

V

V V

75%)

75%)

75-

5N

5N

5N

5N

95N

95N

5N

5N

E

F

75

H

%)

5N

5N

95N

5N

&Q

&Q

&Q

&Q

&Q

&Q

&6(( 7(;7

&6(( 7(;7

&6(( 7(;7

<

<

<

&Q

&Q

&Q

&Q

&Q

&Q

&Q

6

6

6,*1$/ 287

02'8/$7,21,1$ ) ,1. .

02'8/$7,21,1$ ) ,1. .

6,*1$/ ,15 ) ,1. .

6,*1$/ ,15 ) ,1. .

6,*1$/ ,1

9

9 9

9 729

/P+5)&

D:,7+ '8$/*$7(026)(7 ,1 &20021 '5$,16285&( )2 //2:(502'(

E'8$/*$7( 026)(7&200216285&( F)(76285&( )2 //2:(5

; ;

= =

75026)(7%) 75

%%%)))%)

75) ( 7 . . .

- 1

;

=

Fig.1. Circuit Diagram for a buffer amplifier with alternativefront ends.

Page 55: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 827

Ceramic capacitors, whichare manufactured in a range ofpositive and negative coeffi-cients, including zero changetypes, are available in close in-crements of value from 1pF to220pF. Avoid, in tuned circuits,ceramic capacitors intended forcoupling and decoupling. Thelower Q and uncertain tempera-ture coefficient of these compo-nents is likely to impair perfor-mance.

When all the rules of goodconstruction have been fol-lowed, the only simple means ofreducing residual drift is to sub-stitute different fixed capacitorsuntil the temperature coefficienthas been optimized. The Col-pitts oscillator, where severalcapacitors are wired, directly orindirectly, across the tuned cir-cuit, is ideal for this treatment.

RESISTORSAlthough quarter-watt resis-

tors are usually adequate formost low-powered oscillator cir-cuits, the greater bulk of higherrated types reduces the heatingeffect and the resistancechanges which this causes. In-creasing the power rating ofgate and base bias resistors toone or two watts can prove ben-eficial.

TRANSISTORSThe internal capacitances

and port impedances of transis-tors are affected by changes intemperature, supply voltage andsignal voltage. These effectscan be minimized by keepingthe supply voltage, and the am-plitude of oscillation, as low aspossible consistent with reliableoperation.

It is usually easier to obtaingood results with field-effect tran-sistors (FETs). Their high gate

impedance, and the simpler bias-ing arrangements that result, arelargely responsible for this. How-ever, FET gate impedance fallsas the frequency of operationrises through the high frequency(HF) and very high frequency(VHF) spectrum, and the advan-tage is a diminishing one.

With care, bipolar transis-tors can give very acceptableresults. Circuits based on theuse of semiconductors of thistype have, therefore, been in-cluded.

Whether using a FET or abipolar transistor, alwayschoose a type with the highesttransconductance (Yfs) or gain(hfe) for a given fT. Whilst tran-sistors will often oscillate up totheir rated upper frequency limitor fT (the frequency at whichgain falls to unity), it is goodpractice to select a device withan fT at least three times, andpreferably four or five times, ashigh as the maximum operatingfrequency. These measures willensure reliable starting and os-cillation, and permit supply volt-ages to be kept low to minimizedrift.

OSCILLATOR LOADINGSome energy has to be taken

from the oscillator, and the resul-tant loading affects the Q factorand operating frequency of itstuned circuit. The loading must,therefore, be constant and as lightas possible in order to maximizefrequency stability.

A buffer amplifier, placedbetween the oscillator and theload, is essential if high perfor-mance is to be achieved. Evenwhen the oscillator incorporatesisolating circuitry (e.g., the Dowvariant, as described in Part 1of this series, which appeared inthe July 1999 issue or EPE On-line) it is still desirable for addi-

tional buffering measures to beprovided.

BUFFER AMPLIFIERA buffer amplifier should

have a high input impedance tominimize damping on the oscilla-tor circuit. Its output impedanceshould be low to enable it tomaintain a reasonably constantsignal level over a range of loadimpedances. The signal voltageproduced by a few of the oscilla-tors is modest and some gain is,therefore, desirable.

Readers may wish to useone of the oscillator circuits toform a signal generator, andprovision for modulating the ra-dio frequency (RF) output willalso be useful. A buffer ampli-fier capable of meeting theserequirements, and of modifica-tion to suit the needs of individ-ual constructors, is detailed inFig.1.

A two-stage circuit, wheretransistor TR1 is a dual-gateMOSFET configured as asource follower, is shown inFig.1a. Arranged in this way, itpresents a very high impedanceto the oscillator, and an appro-

6SHFLDO)HDWXUH

Buffer AmplifiersA buffer amplifier is essen-

tial if drift is to be reduced to aminimum, and a circuit diagramwhich can be widely adapted tosuit individual needs is given inFig.1. All versions feature ahigh input and low outputimpedance.

The full circuit has a voltagegain of approximately 26dB, anoutput of 2V RMS, and a rea-sonably flat response from100kHz to 100MHz. Provision ismade for gain adjustment andthe application of audio modula-tion.

Page 56: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 828

priately low impedance feed forthe bipolar, common emitteramplifier TR2. Although thedual-gate MOSFET does notyield any voltage gain in thismode, it does provide a signifi-cant power gain.

INPUT CIRCUITOscillator input to the MOS-

FET TR1 is via DC blocking ca-pacitor C1. This componentshould have the lowest possiblevalue consistent with sufficientoutput being obtained from thebuffer amplifier. It is best se-lected by experiment, and forthis reason no provision is madefor it on the buffer amplifierPCB. Its value will range from1pF to 100pF. Gate resistor R2ensures correct biasing.

The gain of TR1 is con-trolled by preset potentiometerVR1, which sets the voltage ongate 2. The RF signal can bemodulated, on its way throughTR1, by varying the gate 2 volt-age at audio frequencies. A suit-able modulation oscillator is de-scribed later.

Switch S1 connects bypasscapacitor C2 into circuit whenmodulation is not being applied.This switch should be gangedwith the switch connecting thepower supply to the modulationoscillator. Resistor R3 and ca-pacitor C3 decouple the inputstage from the supply line, andthe signal output, developedacross source (s) resistor R4, iscoupled to the base of transistorTR2 by DC blocking capacitorC4.

OUTPUT CIRCUITBipolar transistor TR2 is ar-

ranged as a common emitterstage. Bias is applied to thebase (b) by a resistor chainformed by R5, R6, and preset

potentiometer VR2. The inclu-sion of VR2 enables the voltageto be optimized for a wide rangeof transistor types. Emitter (e)bias is provided by R9, and C7functions as a bypass capacitor.

The buffer circuit output isdeveloped across TR2 collector(c) load resistor R8. The valueof this component has beenchosen to ensure a reasonablyconstant gain over a 100kHz to100MHz frequency range, andan acceptably low outputimpedance. Its value can be re-duced in order to lower outputimpedance, but this will be atthe expense of signal voltage.Capacitor C8 acts as a DCblocker.

Resistor R7 and capacitorC6 decouple the stage, and theRF choke, L1, and capacitor C5,isolate the entire buffer ampli-fier from the power supply. Theinclusion of a RF choke is verymuch a good-practice measurein circuitry of this kind and, inalmost every case, a low valueresistor (10 to 100 ohms) couldbe substituted without any dete-rioration in performance.

With a 12V power supply,the output from this circuit(Fig.1a), just before the onset ofoverload, is 2V RMS (almost 6Vpeak-to-peak): more thanenough for most signal genera-tor or mixer purposes. The inputrequired to produce this output(with VR1 and VR2 set for maxi-mum gain), is approximately0¬¬¬1V RMS. Voltage gain of theamplifier is, therefore, some 20times, or 26dB. Setting the volt-age on gate 2 of TR1 to zeroreduces the gain of the unit toaround 6 times, or 15dB.

COMMON SOURCEIf desired, MOSFET TR1

can be made to provide voltagegain by configuring it in the

common source mode. The cir-cuit arrangement for this is de-picted in Fig.1b, where the out-put is now developed acrossdrain load resistor R3. Sourceresistor R4 has a lower value inthis circuit, and resistor R10 andcapacitor C3 decouple thestage.

This configuration shouldonly be adopted when a dual-gate MOSFET stage is used onits own, or when the gain (hfe) oftransistor TR2 is low (e.g., aBF199). Combining a commonsource input with a high gainoutput stage is likely to result ininstability.

The buffer amplifier alsoworks well with a junction field-effect transistor (JFET) ar-

6SHFLDO)HDWXUH

Colpitts OscillatorWith the Colpitts oscillator

circuit, feedback is applied via atapping in the tuning capacitor.Like the Hartley (where the in-ductor is tapped see Part 1 ofthis series), it can be configuredin either parallel or series fedmodes, and simplified circuitdiagrams depicting the two ar-rangements are given in Fig.3.

The shunting of the ports ofthe maintaining device withfairly large amounts of capaci-tance contributes to the circuit’sreputation for frequency stabil-ity, and it is widely used by ra-dio amateurs as a narrow bandoscillator. Output does, how-ever, tend to vary with the set-ting of the tuning capacitor to agreater extent than with otherLC circuits.

The basic Colpitts oscillatorhas, perhaps more than anyother, been modified and devel-oped by a succession of design-ers who have all attempted toreduce even further its alreadylow level of drift.

Page 57: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 829

track master is given in Fig.2. This board isavailable from the EPE Online Store (code7000238) www.epemag.com . Provisionhas been made for all of the alternativefront-end arrangements described earlier.

Construction should be fairly straightfor-ward and should start with the smallestcomponents working up to the largest. It isprobably best to leave the transistors untillast. Check the finished board against thecircuit diagram. Note that capacitor C1 isoff-board and do not forget the single linkwire.

Connect the buffer to its own regulatedoutput from the power supply, and house itin a separate metal enclosure, which shouldbe located as close as possible to the oscil-lator in order to minimize the length of con-necting leads.

COLPITTS OSCILLATORHaving covered the measures, which

have to be taken in order to combat drift,we can now consider the next oscillator cir-cuit in the series, the Colpitts and its vari-ants.

It will be recalled that feedback was ap-plied to a tapping on the tuning inductor inthe case of the Hartley circuit. With the Col-pitts, feedback is applied via a tapping inthe tuned circuit capacitance. Because ofthis, untapped, single winding coils can beused, and band switching is even simplerthan with the Hartley.

Moreover, the transistor ports con-nected to the tuned circuit are shunted byfairly large amounts of capacitance, andthis tends to swamp temperature relatedcapacitance changes within the device it-self. The Colpitts and its variants can,therefore, be made less prone to drift thanother circuits.

With most (but not all) Colpitts arrange-ments, the need to have fixed capacitorsacross the tuned circuit in order to maintainoscillation restricts the frequency coverageproduced by a variable capacitor. Whilstthis can be an advantage in circuits de-signed to cover a narrow band of frequen-cies, it is a drawback when wide coverage isrequired. Moreover, the signal output fromthe Colpitts oscillator is more dependant

6SHFLDO)HDWXUH

&

&

&

5

5

5

5

5

5

5

5

5

/ &

&

&

&

95

95

J

J

V

G75

75E

HF

&6(( 7(;7

72 26&,//$7255) ,1

9

5)287

72 02'8/$725

9 729$) ,16

238

Fig.2. PCB component layout and (approximately)full-size foil master for a dual-gate MOSFET bufferamplifier. The PCB also caters for different front ends(See the EPE Online Store).

ranged as a source follower input stage, and a suitablecircuit is given in Fig.1c. It will not, of course, be possibleto apply audio modulation to the buffer in the same way ifthis circuit is used, nor will it be possible to adjust the gainof the amplifier.

The dual gate MOSFET and the JFET input stagescan be used on their own as oscillator buffers. Isolationwill not be as great as that afforded by the two-stage am-plifier, and the output voltage available with the sourcefollower configuration will be less than that supplied bythe oscillator itself. In this connection, it is worth notingthat a J310 JFET will deliver a higher output voltage thana 2N3819. The output from these simple, single stageFET buffers can be varied by substituting a 1 kilohm po-tentiometer for the drain or source load resistor.

CONSTRUCTION BUFFER AMPThe two-stage buffer amplifier is best assembled on a

small PCB. A suitable component layout, based onFig.1a, together with an approximately full size copper

Page 58: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 830

upon the tuning capacitor set-ting than some circuits, and thisalso militates against wide cov-erage.

Despite these drawbacks,the opportunity to minimize drifthas made the Colpitts and itsvariants popular when narrowfrequency bands (e.g., the ama-teur bands) have to be covered.It is adopted almost universallywhen a simple variable fre-quency oscillator is required inreceivers operating at very highfrequency (VHF) and ultra highfrequency (UHF).

BASICSThe commonly encountered

versions of the basic Colpittscircuit are shown in Fig.3. In

Fig.3a, the tuned circuit formedby inductor L and capacitorsC1A and C1B is connected be-tween the gate (g) and drain (d)of TR1. The source (which isgrounded) is, in effect, con-nected to the tapping in thetuned circuit capacitance. Thisis a parallel or shunt fed ar-rangement.

In Fig.3b one end of the coilL is grounded and the feedbackis developed across an RFchoke. The drain (d) is con-nected into circuit via the powersupply, and this circuit is, there-fore, termed series fed. Theimpedance of the tapping pointcan be varied by changing therelative values of the two ca-pacitors. Reducing C1A and in-creasing C1B will lower theimpedance presented to thefeedback connection and thedamping on the tuned circuit.

The capacitors are often ofequal value, especially with theversion depicted in Fig.3a. How-ever, when the oscillator is usedfor more demanding applica-tions, better performance canusually be achieved by makingthe relative value of C1B aslarge as possible consistent withreliable operation.

SPOT-ON COLPITTSA Colpitts circuit suitable for

generating a 1kHz spot fre-

quency is given in Fig.4. Bipolartransistor TR1 is used as themaintaining device in this shuntfed arrangement, and the tunedcircuit formed by L1, C1, andC2 determines the frequency ofoscillation.

Bias is applied to the base(b) of TR1 by resistor R1, andthe signal is developed acrossR2, the collector (c) load resis-tor. C3, C4, and C6 are DCblocking capacitors, and poten-tiometer VR1 permits the ad-justment of the output voltage.Bypass capacitor C5 makes theunit immune to changes in sup-ply impedance (ageing batter-ies), and its value is related tothe low operating frequency ofthe circuit.

The unit is suitable for ap-plying modulation to an RF sig-nal generator, and it works wellwith the buffer circuit describedpreviously. When used in thisway, VR1 sets the modulationdepth.

Output voltage falls as theload impedance is reduced, butfrequency remains pretty con-stant. (The signal level is 0¬¬¬25VRMS. when the load is reducedto 1k). Because of this there issome interaction between theoutput control potentiometerand the buffer amplifier (Fig.1)gain control preset VR1.

The circuit oscillates vigor-ously, and can be used to gen-

6SHFLDO)HDWXUH

Colpitts OscillatorWith the Colpitts oscillator

circuit, feedback is applied via atapping in the tuning capacitor.Like the Hartley (where the in-ductor is tapped see Part 1 ofthis series), it can be configuredin either parallel or series fedmodes, and simplified circuitdiagrams depicting the two ar-rangements are given in Fig.3.

The shunting of the ports ofthe maintaining device withfairly large amounts of capaci-tance contributes to the circuit’sreputation for frequency stabil-ity, and it is widely used by ra-dio amateurs as a narrow bandoscillator. Output does, how-ever, tend to vary with the set-ting of the tuning capacitor to agreater extent than with otherLC circuits.

The basic Colpitts oscillatorhas, perhaps more than anyother, been modified and devel-oped by a succession of design-ers who have all attempted toreduce even further its alreadylow level of drift.

&J

J

G

G

V

V

6,*1$/287

5)&

/

/

&%

&$

&$

&%

9 9

75

75

5 )&+2.(

. .

6,*1$/287

D6+817 )(' E6(5,(6 )('

%

%

Fig.3. Simplified circuits for parallel (shunt) and series fed Col-pitts oscillators.

Page 59: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 831

erate spot frequencies with atolerably good waveform frombelow 100Hz up to 10MHz.Above 10MHz, operation be-comes erratic.

the spindle, form the tap, whichis conveniently connected toground. The fixed vanes areconnected to either end of theinductor.

The effective swing of a360pF unit is, of course, re-duced to 180pF, but continuouscoverage from 150kHz to15MHz can be obtained withfive switched inductors (sixToko coils will probably be re-quired if coverage between300kHz and 500kHz is in-cluded).

A high input impedance FET,TR1, has to be used in order toensure reliable starting and oscil-lation over the full swing of thetuning capacitor V1 on all ranges.C2 is a DC blocking capacitor,

6SHFLDO)HDWXUH

WIDE RANGE COLPITTSA Colpitts oscillator with

fixed feedback capacitors is notparticularly suitable when wideand continuous frequency cov-erage is required. A version ofthe shunt fed circuit, in whichfeedback is applied to a tappingin the variable tuning capacitor,is, however, sometimes used asa wide coverage oscillator, andthis arrangement is depicted inFig.5.

Because of the groundedfeedback connection, a twin-gang variable capacitor, VC1aand VC1b, can provide thefeedback tapping and also tunethe switched inductors. Themoving vanes, connected by

E

F

H

50

95N

5N

%%%&&&

H

H

E

E

F

F

&Q

&Q

6,*1$/ 287$3352;95 06 . . .

/P+72.23$5712/<

&&&QQQ

&Q

9

75%&

9

%$6( &211(&7,216 )25$/7(51$7,9( 75$16,67256

Fig.4. Circuit diagram for a Colpitts 1kHz AF oscillator for mod-ulating an RF signal generator.

D

D

N

N1

J

G

V

751

&Q

&Q

&Q

&S

6,*1$/ 2879 5550 6$33 2;

. . .

9

6

D

N

'1

50

1 -

G JJ VV G

%$6( &21111(&7,216)25 $/7(5 $7,9(75$16,67256

95N

/P+5)&

9&D $1' 9&E[S

27+(5&2,/6

'

9

/6((7(;7

Fig.5. Circuit diagram for an RF oscillator, covering 150kHz to15MHz, using a FET.

Parallel or Shunt FedColpitts OscillatorsTwo examples of the shunt

fed Colpitts oscillator arrange-ment are given. The first, de-picted in Fig.4, generates a1kHz audio tone and can beused for modulating an RF sig-nal generator or for providing atest signal.

A good output voltage isdeveloped with a waveform ofreasonable purity. The circuithas the virtue of great simplic-ity, and an untapped, singlewinding inductor is all that is re-quired.

It could, with advantage, besubstituted for the Hartley oscil-lator in the metal detector circuitgiven in Part 1 of this series.With appropriate tuned circuitcomponents, it will oscillatefrom below 100Hz to above10MHz. However, above10MHz its operation becomeserratic.

How the basic Colpitts oscil-lator can be configured to givecontinuous coverage from150kHz to 15MHz is shown inFig.5. Although this arrange-ment generates a near perfectwaveform, the Hartley (lastmonth), Butler and Franklin(next month) circuits are to bepreferred when a simple, widecoverage oscillator is required.Output from these circuits ismore constant over the tuningcapacitor swing, and they willoperate up to 30MHz and be-yond.

Page 60: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 832

resistor R1 ensures correct bias-ing, and diode D1 limits oscillationamplitude in order to prevent for-ward conduction of the FET’sgate. An output is developedacross L2, a radio frequencychoke, and resistor R2 functionsas a Q spoiler preventing erraticoperation being triggered by itsnatural resonances. C4 is a DCblocking capacitor.

Potentiometer VR1 acts asthe source bias resistor, and itsslider (moving contact) is con-nected to the RF bypass capaci-tor C3. Moving the slider to-wards earth (0V) leaves an in-creasing portion of the resistorunbypassed. The resulting neg-ative feedback reduces the gainof TR1 and improves the outputwaveform.

By this means the circuitcan be adjusted to produce anear perfect sinewave, but thisis at the expense of output volt-age. Signal output also varieswith the setting of the tuning ca-pacitor (it reduces by approxi-mately 60 per cent as the vanesare rotated from half mesh tofully open). The quoted outputvoltage is with the tuning capac-itor set at half mesh and VR1adjusted to give the best wave-form.

Above 15MHz, the circuitwill not oscillate over the fullswing of the tuning capacitor,and operation becomes increas-ingly erratic as frequency israised. More refined versions ofthe circuit could, no doubt, bepersuaded to give coverage upto, and beyond, 30MHz.

Wide coverage can be ob-tained with much less botherwith the Hartley, Butler, andFranklin oscillators, and newtwin-gang capacitors are expen-sive. The circuit has, however,been included for the sake ofcompleteness.

NARROW BAND COL-PITTSBipolar Version

In the bipolar transistor ver-sion of the narrow band Colpittsoscillator, shown in Fig.6, the tun-ing capacitance is made up of apair of series connected feedbackcapacitors, C3 and C4; and twocapacitors, C1 and C2, whichlimit the effect of variable tuningcapacitor VC1. By restricting cov-erage in this way, the full 180 de-gree swing of the variable capaci-tor is required in order to traversethe band, and this ensures thelowest possible tuning rate (avery desirable feature when at-tempting to resolve weak, ama-teur single-sideband transmis-sions).

Capacitor C5 acts as the DCblocking capacitor (because ofthe comparatively high value ofthis component, the circuit cannotbe regarded as the Seiler variant,which is covered later), and resis-tors R1 and R2 bias transistorTR1. Resistor R3 and capacitorC6 are decoupling components,and C6 also ensures that TR1collector (c) is connected directlyinto the feedback circuit ratherthan via the power supply. Outputand feedback voltages are devel-oped across emitter (e) load re-sistor R4 and the RF signal is ex-tracted via the low-value DCblocking capacitor C7.

Every port of the transistor isshunted by a capacitor, and thishelps to minimize the effect ofsmall changes in capacitancewithin the device itself. The val-ues of C3 and C4 should, there-fore, be as high as possible con-sistent with reliable starting andoscillation, but they may have tobe tailored to ensure that the de-sired frequency coverage can beobtained with a particular coil andvariable capacitor combination.

START-UPTuned circuit components

for this standard Colpitts ar-rangement are listed in Table 1.The values quoted for C3 andC4 will ensure reliable startingand operation with a wide rangeof transistor types. However, theuse of a BF494 RF transistorlimits the reduction in output,which occurs as the frequencyof operation increases.

Individual constructors mayfind it possible to improve theoutput waveform and/or furtherreduce drift by increasing thevalue of one or both of thesecapacitors. If this is done, thevalues of the other tuned circuitcapacitors (and possibly the in-ductor) may need changing inorder to restore the stated fre-quency coverage. Increasingthe values of C3 and C4 will re-duce the output voltage.

On ranges where swing re-ducing capacitor C1 is not fitted,the fixed vanes of VC1 must, ofcourse, be connected to the“hot” end of inductor L1.

NARROW BANDCOLPITTSFET Version

A Colpitts oscillator with aFET as the maintaining deviceis shown in Fig.7. The tuningand feedback capacitor ar-rangements are the same asthose listed in Table 1 for thebipolar version.

The gate (g) of the FET isgrounded (0V) through coil L1and the usual gate bias resistoris not required. Diode D1should, however, be wired intocircuit to limit oscillation ampli-tude and prevent forward con-duction of the gate.

A radio frequency choke,L2, has to be used as a source

6SHFLDO)HDWXUH

Page 61: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 833

(s) load in order to ensure reliable oscillation withthe FET version of the circuit. Resistor R2 spoilsthe Q of the choke and avoids any tendency for itsresonances to affect the operation of the circuit.

Resistor R1 and capacitor C5 decouple the cir-cuit from the power supply, and C5 also ensuresthat the drain (d) of the transistor is effectively con-nected into the feedback circuit. (This is a seriesfed oscillator, and feedback would otherwise de-pend entirely upon the drain being connectedthrough the power supply.)

Output is taken from the source of TR1 via DCblocking capacitor C6. In order to minimize loadingon the oscillator, this component should have thelowest possible value consistent with sufficientvoltage being supplied to the accepting circuit.

Signal output from this oscillator is significantlyhigher on the two lower frequency ranges(approximately 2¬¬¬5V RMS). Mak-ing the value of C6 small will,therefore, also have the desirableeffect of evening out the signallevel, as it will impede the lowerfrequencies more. (Output isgreater because the values offeedback capacitors, C3 and C4,have been reduced in order toensure coverage of the 1¬¬¬8 and3¬¬¬5MHz bands with a 50pF vari-able capacitor.)

SEILER COLPITTSVARIANTBipolar Version

A radio amateur, E. O. Seiler, published a vari-ant of the Colpitts oscillator in 1941. Developedduring the valve era, he originally described it as a“Low-C Electron-Coupled Oscillator”. Two up-datedsemiconductor versions are given in Fig.8 andFig.9.

Seiler’s modification provided for the “grid” of thevalve (now the base (b) of a bipolar transistor or thegate (g) of a FET) to be tapped down the tuned circuitby adding another capacitor, C3, to the feedbackchain connected across the coil L1. In the originalvalve version, this is a 100pF preset component,which can be reduced until oscillation is only justmaintained. By this means, the isolation of the valve,from the tuned circuit, is made as great as possible,thereby enhancing the frequency stability of the basicColpitts circuit.

This can be likened to the Lampkin variant of theHartley oscillator (see last month), where the base orgate of the maintaining device is tapped down thetuning inductor to achieve the same result.

Because of their low base impedance, bipolartransistors do not lend themselves as readily asFETs to this circuit, and reducing the value of C3below 500pF excessively attenuates the signalavailable at the base and inhibits oscillation. In theinterests of consistent performance with a rangeof transistor types, the value of the additional ca-pacitor has, therefore, been fixed at 560pF for thebipolar version of the circuit.

This is only a modest improvement over the1nF capacitor specified for the basic Colpittsoscillator. However, any reduction in tuned cir-cuit damping is worthwhile, and constructorsinterested in experimenting with the bipolar ver-sion can use this value as a starting point andreduce it until reliable oscillation is only just

6SHFLDO)HDWXUH

BandMHz

TokoCoil L1

BaseWir ing

C1pF

C2pF

C3pF

C4pF

1.83.57

10141821

24-28

154FN8A6438EK154FN8A6439EK

KXNK3767EKKXNK3767EKKXNK3767EK

8.5 turn type S188.5 turn type S185.5 turn type S18

ABBAA------

----2227221015--

----------18----

18018018018082825639

47047047047027027018082

Notes: (1) The type S18 coils have ferrite cores.(2) See Fig.17 for base wiring details. (3) When aswing reducing capacitor, C1, is not provided, thefixed vanes of tuning capacitor VC1 must be con-

nected directly to the “hot” end of the inductor.

Table 1: Narrow band Colpitts oscillatorsTuned circuit components for bipolar and FET

versions.

E

F

H

%)

E H F

6,*1$/ 287$3352;9 5 0 6 . . .

75%)

5N

5N

5 N

&Q

&

&&&&

9&S

&S

&Q

9

/

9

75$16,6725 /($'2876666((((((),*)25 $/7(51$7,9(6

7$%/()25 '(7$,/6 2) /&&&$1' &

Fig.6. Circuit diagram for a narrow band Colpitts oscillator.

Page 62: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 834

maintained. Table 2 gives thevalues for the remaining tun-ing capacitors when C3 is560pF. One or more of themwill, of course, need increas-ing if C3 is reduced in order torestore the stated coverage.

SEILER VARIANTFET Version

The valve-like characteris-tics of FETs makes them moresuitable for the Seiler variant. Acircuit diagram is given in Fig.9,and the functions of the variouscomponents have already beendescribed in connection withother FET maintained oscilla-tors. There is no DC path be-tween the gate of TR1 andground, and resistor R1 has tobe provided in order to ensurecorrect biasing.

The ubiquitous 2N3819 islikely to prove too docile for thiscircuit with the capacitor valuesspecified in Table 3, so a J310is strongly recommended. If dif-ficulty is encountered in obtain-ing this particular FET, a dual-gate MOSFET (e.g., a BF981)with its gates strapped together

6SHFLDO)HDWXUH

will probably per-form well.

Dow and Goralversions of Seiler’smodification arediscussed later.

These variants oscillate more vig-orously than the basic FET ar-rangement, and enable the valueof C3 to be kept low.

CLAPP’S COLPITTSVARIANT

Our next modification to theColpitts oscillator is the Clapps’variant. Depicted in Fig.10 andFig.11, this was also conceivedduring the valve era.

An American engineer, J. K.Clapp was the first to publish thecircuit. However, a British inven-tor, Geoffrey Gouriet, had alreadydeveloped it during the early1940’s, but wartime restrictionsprevented him making his find-ings known. Strictly speaking,therefore, it should be called theGouriet-Clapp variant.

This variant involves the sub-stitution of a series tuned for theparallel tuned circuit used in theoriginal design. Advocates of thearrangement claim that it displaysimproved frequency stability.

The formulae relating fre-quency, inductance and capaci-

tance are the same as thoseused for parallel tuned circuits.However, with series tuned cir-cuits, maximum Q is realizedwhen the ratio of inductance tocapacitance is as high as possi-ble (with parallel tuned circuits,capacitance should be kept highin order to maximize Q). Theseries tuned circuit presents alow impedance to the base orgate of the maintaining device,and this results in a bettermatch, especially when a bipo-lar transistor is used (paralleltuned circuits present a highimpedance at resonance).

CLAPP’S VARIANTBipolar Version

A bipolar version of theClapp circuit is given in Fig.10,where C3 and C4 are the feed-back capacitors, and the seriestuned circuit is formed by L1,C1, VC1, and C2.

Transistor TR1 is biased byresistors R1, R2, and preset po-tentiometer VR1. Preset VR1allows adjustment of the basevoltage to suit individual de-vices. Details of the tuned cir-cuit components are given inTable 4.

BandMHz

TokoCoil L1

BaseWir ing

C1pF

C2pF

C3pF

C4pF

1.83.57

10141821

24-28

154FN8A6438EK154AN7A6440EK154FN8A6439EK

KXNK3767EKKXNK3767EK

8.5 turn type S185.5 turn type S185.5 turn type S18

BDABA------

----27154747----

----------------

12082

1201201201208256

27027027027027027018056

Table 2: Narrow band Seiler oscillatorTuned circuit components for bipolar transistor

version.(See Fig.8 for circuit diagram.)

Notes: (1) The S18 coils for the 18MHz and21MHz bands have ferrite cores. The coil for the24MHz and 28MHz bands has an aluminum core.

(2) A parallel, fixed tuning capacitor, C2, is notrequired on any range with the bipolar version.

(3) See Fig.17 for base wiring details.

6(( 7$%/()25 '(7$,/6 2) /&&&$1' &

E

F

H

6,*1$/ 287$3352;9 5 0 6 . . .

75%&

5N

5N

5N

&Q

&

&&

&9&S

&S

9

/

9

&S

Fig.8. Circuit diagram for a narrow band Seilervariant of Colpitts oscillator.

Page 63: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 835

CLAPP’S VARIANTFET Version

The circuit diagram of aFET-maintained Clapp oscillatoris given in Fig.11. There is noDC path between the gate ofTR1 and ground, and resistorR1 must be provided to ensurethe correct biasing of the tran-sistor.

The functions of the otherpassive components have beendescribed in connection with ear-lier circuits. The inductors andcapacitors scheduled in Table 4also apply to the FET version.

6SHFLDO)HDWXUH

VACKAR COLPITTSVARIANTBipolar Version

First published in 1945, theVackar oscillator, like the Clapp,is a Colpitts variant involving amodification to the original tuningarrangements. With the Vackar, a3-section tuned circuit is used toachieve the necessary 180 de-gree phase reversal in the feed-back loop.

A circuit designed around abipolar transistor is given inFig.12, where the combinationof capacitors C1, C2, and vari-

6(( 7$%/()25 '(7$,/62) /&&&$1' &

D

D

N

N1

J

G

V

751

D

N

'1

1 -

G JJ VV G

$/7(51$7,9( )(7/($'2876

'

6,*1$/ 287$3352;9506 . . .

&Q

&

&

&&&9&S

&S

9

/

9

/P+5)&

Fig.7. Narrow band Colpitts oscillator using a FET

&

&&&&

9&S

/

&

D N1

J

G

V

75-

D

N

'1

-

J V G

6,*1$/287$3352;9 5 0 6 . . .

&Q &

S

9 –

9

/P+5)&

5N

5Ω6(( 7$%/()25 '(7$,/62) /&&&&$1' &

Fig.9. Narrow band Seiler variant of Colpitts oscillator using aFET.

Narrow BandOscillators

The Colpitts oscillator is widelyused for coverage of the HF ama-teur bands. Bipolar and FET ver-sions of a basic Colpitts circuit areillustrated in Fig.6 and Fig.7.

Seiler’s adaptation, which at-tempts to further improve fre-quency stability by tapping the grid,base, or gate of the maintainingdevice down the chain of feedbackcapacitors, is depicted in Fig.8 andFig.9.

Clapp tried to improve on thebasic circuit by adopting a seriestuned, as opposed to a paralleltuned, LC network. Bipolar andFET versions of Clapp’s modifica-tion (sometimes known as theGouriet-Clapp circuit) are given inFig.10 and Fig.11.

Another variant which at-tempts to improve on the basicColpitts oscillator by modifying thetuning arrangements is theVackar. Alternatives are given inFig.12 and Fig.13, where a 3 net-work has been substituted for theoriginal parallel tuned circuit.

The various Colpitts arrange-ments all have their advocates.Performance differences betweenthem are slight, but they haveprobably been listed above in as-cending order of improvement, withthe Vackar as the most drift free.They must, however, be buffered,well constructed, and the tuningand feedback capacitors selectedwith care, if the claimed low levelsof drift are to be achieved.Table 1 to Table 5 list the values oftuning components for all of thenarrow band Colpitts variants.These circuits will, however, coverwider bands if desired, oscillatingover the full swing of a 365pF vari-able capacitor, and down to100kHz and below, if appropriateinductors and feedback capacitorsare fitted.

Page 64: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 836

able capacitor VC1, together with L1 and C4, com-prise the 3-section tuned circuit. Trimmer capaci-tor VC2 and C3 form an attenuation network, limit-ing the amount of feedback applied to the base ofTR1. Keeping feedback as low as possible, consis-tent with reliable starting and oscillation, doesmuch to ensure a good, harmonic-free waveform,minimal loading on the tuned circuit, and reduceddrift.

Feedback coupling capacitor VC2 is tradition-ally a high quality, air-spaced trimmer. These com-ponents are expensive and no longer so readilyavailable, and constructors may wish to try substi-tuting a modern (and inexpensive) miniature presetcapacitor with a film-dielectric. A component of thiskind would not be suitable for permanent inclusionin the circuit, but it could be used to determine theminimum amount of capacitance needed to main-tain oscillation and then be replaced by a fixed ca-pacitor with an appropriate temperature coefficient.

In the original Vackar oscillator, the relativevalues of the two capacitors which form the “legs”of the 3-section tuned circuit are maintained, asclosely as possible, at a 6:1 ratio (the capacitor atthe collector (c) end of inductor L1 is the larger ofthe two). The two capacitors which act as the at-tenuation network are also kept at approximately

6SHFLDO)HDWXUH

this ratio (the capacitor between base or gate andground is the larger).

Ensuring reliable oscillation and securing thedesired frequency coverage with a particular coiland variable capacitor combination tends to shiftthe relationships away from this ideal. Neverthe-less, even compromised versions of the circuit arecapable of good frequency stability and of produc-ing a waveform of excellent purity.

The emitter and base biasing componentsshown in Fig.12 should ensure satisfactory opera-tion with a wide range of bipolar transistors. In thisdesign, the output signal is developed across L2,the radio frequency choke, which forms the collec-tor load for TR1.

Tuned circuit and feedback attenuation com-ponents are scheduled in Table 5.

BandMHz

TokoCoil L1

BaseWir ing

C1pF

C2pF

C3pF

C4pF

1.8 154FN8A6438EK B -- 82 47 1203.5 154FN8A6438EK A 56 -- 47 120

7 154FN8A6439EK B 10 27 47 120

C5pF270270

270

10 KXNK3767EK B15 15

(56)560(47)

82(120)

120(270)

14 KXNK3767EK A22

(27)18

(56)560(47)

82(120)

120(270)

18 8.5 turn type S18 --22 120

(47)560

(120)82

(120)120

(270)

21 5.5 turn type S18 --82

(47)82

(39)560

(120)82

(120)120

(180)

24-28 5.5 turn type S18 --82

(120)--

(56*)560(82)

39(82)

82(120)

Table 3: Narrow band Seiler oscillatorTuned circuit components for field-effect

transistor version.(See Fig.9 for circuit diagram.)

Notes: (1) The S18 type coils all have ferritecores. (2) The figures in brackets are the compo-nent values for the Dow and Goral versions. (3)On the 24-MHz to 28MHz bands, the *56pF ca-pacitor, C2, is required only for the Goral ver-

sion. (4) See Fig.17 for base wiring details.

E

F

H

5N

%&

H E F

6,*1$/ 287$3352;9 5 06 . . .

75%&

5N

95N

5N

&Q

&

&&

&9&S

&S

9

/

9

6(( 7$%/()25 '(7$,/6 2) /&&&$1' &

Fig.10. Circuit diagram for a narrow band Clappvariant of Colpitts oscillator.

BandMHz

TokoCoil L1

BaseWir ing

C1pF

C2pF

C3pF

C4pF

1.83.57

10141821

24-28

154FN8A6438EK154FN8A6438EK154FN8A6439EK154FN8A6439EK154FN8A6439EK

KXNK3767EKKXNK3767EKKXNK3767EK

BABAABBA

----272710101018

10056826822271515

680270270180120828247

150047047027018012010082

Table 4: Narrow band Clapp oscillatorsTuned circuit components for bipolar and FET

versions.(See Fig.10 and Fig.11 for circuit diagrams.)

Notes: (1) See Fig.17 for base wiring details.

Page 65: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 837

VACKAR VARIANTFET Version

A FET version of the Vackaroscillator circuit is given in Fig.13.The source bias resistor R2 andits bypass capacitor C5 must beprovided when a J310 FET isused or the circuit will not oscil-late. They can be dropped when a2N3819 is the active device.

The tuned circuit and atten-uation network componentslisted in Table 5 are also suit-able for this version.

EXTENDING FREQUENCYCOVERAGEUsing Colpitts at VHF

The Colpitts oscillator is of-ten encountered in equipmentworking at VHF and UHF. In-deed, it is almost a standardfeature in the front-ends ofVHF-FM receivers.

A basic Colpitts circuitwhere the component valueshave been chosen to ensurereliable oscillation between30MHz and 120MHz or more isshown in Fig.14. It is very simi-lar to the narrow band bipolar

6SHFLDO)HDWXUH

circuit given in Fig.6, but herethe value of the feedback ca-pacitors, C1 and C2, is lower,the variable tuning arrange-ments are simpler, and theemitter resistor has been re-placed by a radio frequencychoke in order to ensure suffi-cient feedback.

Many VHF versions of theColpitts circuit are often config-ured in the parallel, or shuntfed, mode depicted earlier inFig.4, and the internal capaci-tances of the transistor canfunction as the tapped feedbackcapacitor (the base/emitter andthe collector/emitter capaci-tances replace the C1/C2 com-bination of Fig.14). This canmake the circuit difficult to rec-ognize.

When the internal capaci-tances of the active devicefunction in this way, and particu-larly when the tuning coil is con-nected between base and col-lector (or gate and drain, or gridand anode), this Colpitts variantis often called an ultra-audionoscillator after one of Lee deForest’s earliest valve circuits.

Inductors for this circuit can

be hand-wound with 18 s.w.g. to22 s.w.g. enameled copper wire,and be self-supporting. Readerswho prefer to use commerciallyproduced coils could use induc-tors from the Toko range. Suit-able types, together with the ap-proximate coverage given by a50pF variable capacitor, arelisted in Table 6.

Stray inductance and ca-pacitance have an increasingeffect with rising frequency, andconnections must be as short aspossible or the upper limit willbe curtailed. Frequency stabilityleaves something to be desired(the simplest FM receivers in-corporate drift correction mea-sures), but the circuit can beused, in conjunction with thebuffer amplifier described ear-lier, as a simple signal genera-tor.

DOW VARIANTDow’s system of electron

coupling was described lastmonth in connection with theHartley oscillator. The techniquecan also be applied to the Col-pitts circuit and its Seiler andClapp variants.

In 1931, Dow published acircuit in which the cathode,control grid and screen grid of apentode or tetrode valve areconnected in an oscillatory cir-cuit, and the signal is extractedvia the anode. The only mediumlinking the actual oscillator withthe signal take-off point is,therefore, the electron flowthrough the valve, hence thecircuit’s name. Loading on theoscillator is greatly reduced, andfrequency stability thereby im-proved.

A dual-gate MOSFET canbe used to simulate Dow’s mod-ification, and a suitable circuitdiagram is given in Fig.15where the technique has been

D N1

J

G

V

751

D

N

'1

1

G J V

6,*1$/ 287$3352;9 5 0 6 . . .

&Q &

S

9–

9

/P+5)&

5N

6(( 7$%/()25 '(7$,/6 2) /&&&$1' &

&

&

&&&9&S

/

Fig.11. Circuit diagram for a narrow band Clapp oscillator us-ing a FET.

Page 66: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 838

applied to a Colpitts/Seiler oscil-lator. The tuned circuit arrange-ments are identical to those al-ready described and depicted inFig.9. Here, however, a double-gate MOSFET, TR1, has beensubstituted for the JFET, andthe output is developed acrossdrain load resistor R4. ResistorsR2 and R3 fix the potential ongate 2, which is grounded at RFby capacitor C6.

The dual-gate MOSFET os-cillates more readily than theJFET, and the values of C3, C4and C5 can be modified in orderto reduce damping on the tunedcircuit and improve impedancematching at the feedback injec-tion point. Alternative values arequoted in Table 3.

The isolation afforded bythe structure of a solid-state de-vice is not likely to equal thatachieved with an evacuatedvalve. Nevertheless, this circuitis superior to the basic bipolarand FET versions, and the re-

6SHFLDO)HDWXUH

duced tunedcircuit dampingimproves fre-quency stabilityand makes out-put level moreconstant.

Solid-state Dow circuits candisplay a tendency towards fre-quency doubling. This problemwas not encounteredwhen the modifica-tion shown in Fig.15was made to the ba-sic Colpitts circuit(Fig.7), or to theSeiler and Clappvariants (Fig.9 andFig.11).

If frequency problemsdo arise, try reducingthe supply voltage. Ifthis fails to effect acure, change the ra-dio frequency choketo one of differentinductance, and/or

increase the value of the Qspoiling resistor R5.

BandMHz

TokoCoil L1

BaseWir ing

C1pF

C2pF

C3pF

C4pF

1.83.57

10141821

24-28

154FN8A6438EK154FN8A6438EK154FN8A6439EK154FN8A6439EK

KXNK3767EKKXNK3767EKKXNK3767EKKXNK3767EK

BDADAAAA

------33474747--

8282

10010082825627

4747472710101010

800800800470470220220100

Table 5: Narrow band Vackar oscillatorsTuned circuit components for bipolar and FET

versions.(See Fig.12 and Fig.13 for circuit diagrams.)

Notes: (1) See Fig.17 for base wiring details.

Table 6: Colpitts oscillator for VHF operationTuned circuit components (See Fig.14 for circuit

diagram.)

FrequencyRange MHz

TokoCoil L1

CoreMater ial

30-5050-85

85-120

8.5 turn type S183.5 turn type S181.5 turn type S18

ferriteno coreno core

E

F

H

%&

H E F

6,*1$/287$3352;9 5 0 6 . . .

75%&

5N

5N

&

&Q

& &

&

&Q

9&S

&Q

9&S

9

/

6(( 7$%/( )25 '(7$,/6 2) /&&&$1' &

9

/P+5)&

Fig.12. Circuit diagram for a narrow bandVackar variant of Colpitts oscillator.

-

J V G

6,*1$/ 287$3352;95 0 6 . . .

5N

&

&Q

& &

&

&Q

9&S

&Q

9&S

9

/

6(( 7$%/( )25 '(7$,/6 2) /&&&$1' &

9

/P+5)&

J

G

V

75-

Fig.13. Narrow band Vackar oscillator using a FET.

E

F

H

5Ω%)

E H F

6,*1$/ 287$3352;9506. . .

75%)

5N

5 N

&&&Q

&SSS

&

&Q

9&S

S

&Q

9

/

9

/ +µ5)&

6(( 7$%/( )25 '(7$,/6 2) /

Fig.14. Circuit diagram for a VHF Colpittsoscillator.

Page 67: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 839

GORAL VARIANTThe Goral oscillator circuit devel-

opment involves the insertion of anemitter follower stage into the feed-back loop and is shown in Fig.16,where the modification has beenmade to the Clapp/Colpitts oscillator.It can also be applied, with equalsuccess, to the basic Colpitts circuitand to the Seiler variant.

The improved power gain of thetwo transistor combination makes thecircuit much more ready to oscillate,and the values of feedback capaci-tors, C3 and C4, can be optimizedfor minimum tuned circuit dampingand drift. This process is further as-sisted by the low impedance of thefeedback connection from the emit-ter (e) of TR2, via potentiometerVR1.

Signal output is developedacross collector (c) load resistor R5,and the isolation, although slight, ofthe take-off point, from the tuned cir-cuit, also helps to reduce dampingand drift.

Resistor R4 and capacitor C6decouple the additional stage, andC7 functions as a DC blocking ca-pacitor. Potentiometer VR1, whichforms the emitter load for TR2, en-ables the level of feedback to be setas low as possible. Minimizing feed-back improves the output waveform(it can be made near-perfect with thisarrangement), reduces its harmoniccontent, and improves the frequencystability.

Although a 2N3819 FET willfunction in this circuit, the J310 spec-ified enhances performance and isvery much to be preferred.

Next month: The construction ofa stabilized power supply, simpleprobes to enable RF voltages to bemeasured with ordinary test meters,and the Armstrong, Butler, Franklin,and Meissner oscillators will be de-scribed.

6SHFLDO)HDWXUH

J

J

V

G

%)

[[[

7<3( 1R

5N

5N

5N

%)

J

J G

V

75%)

&

&&

&&Q

9&S

/

&

D N1

D

N

'1

6,*1$/287$3352;9 5 0 6 . . .&

Q

&S

9–

/P+5)&

6(( 7$%/( )25 '(7$,/6 2) /&&&&$1' &

9

Fig.15. Circuit diagram for a narrow band Dow/Seiler vari-

E

F

H

555Ω

95Ω

Ω

75%)

D N1

J

G

V

75-

D

N

'1

- %)

J EV HG F

6,*1$/287$3352;9 5 0 6 . . .

&Q

&Q

&Q

9–

9

/P+5)&

5N

6(( 7$%/()25 '(7$,/62) /&&&$1' &

&

&&&&

9&S

/

Fig.16. Circuit diagram for a narrow band Goral/Clapp vari-

111&&&. .

. . 1 &. .

. .

111&&&. .

. .

. .

1 &. . = NO CO NNEC TIO N

D 67$1'$5' &211(&7,21 E 6(5,(6 &211(&7,211172 ,1&5($6( ,1'8&7$ &(

G &211(&7,21 725('8&( ,1'8&7$1&(

781('&,5&8,7

781('&,5&8,7

781('&,5&8,7

781('&,5&8,7

781('&,5&8,7

781(' &,5&8,7

Fig.17. Base connection details for Toko Coils.

Page 68: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 840

Let us sift through thismonth’s post bag and com-mence with a comment regard-ing the mains supply.

Electric EnlightenmentApropos your item “Live

Supplies’’ in the July 1999 Cir-cuit Surgery, in the mains-powerdesignation L,N,E the L standsfor “line” not “live”. It is an ab-breviation of “active line”, whichdescribes that conductor fromthe supplying transformer’s sec-ondary winding, which is at anelevated electrical potential andwhich provides active power;and distinguishing it from theneutral conductor providing thereturn path to the other end ofthe transformer’s secondarywinding, and which neutral con-ductor is held at or near zero orearth potential by being con-nected also to earth at the sup-plying transformer and usuallyat intermediate points.

The neutral (N) conductor isnot intended to provide a routefor active-to-earth faults. Theabsorption of earth faults is thesafety function of the appli-ance’s earth terminal, whichmay be connected usually to aseparate earthing conductor ordirectly to earth at the con-sumer’s supply terminal.

The electrical potential dif-ference between the active line

of the AC supply and the neu-tral conductor is maintained bycontrol at the generatingsource at a specified value(now 230V RMS single phasein Britain as subjugated by theEuropean Union).

“Live” means that which isliving as opposed to dead. Farfrom being a supplier of life,contact with the active line canhave just the contrary effect!

The explanation may beconsidered pedantic by someof your readers, but designa-tions have the meanings prop-erly ascribed to them, whichshould not be adulteratedeven though it is currently of-ten thought clever to do so(although, of course, excusemay be made for those whohave not been exposed to en-lightenment as per Epeeti!)

J.H. EastaughChesham, UK

The information providedlast month concerning earth-ing is correct, but hopefullythis month’s follow-up articleon power distribution will clar-ify the techniques of earthingand other aspects of themains power supply. Whilstyou are, of course, right to saythat “Line” is the correct tech-nical term applied to a phase,it can be a virtually meaning-less expression to the average

electronics hobbyist or non-electrician. Everyone knowswhat the “Live” is, hence I delib-erately used Live in Fig.3 lastmonth and not Line. Manufac-turers of British mains plugsmanage to skirt around thisproblem by simply designatingthe live terminal as “L”.

In actual fact, electrical en-gineers talk in terms of line-to-line voltages. Thus, a 415Vthree-phase transformer has415V between any two phases.An actual voltage of 240V (415 /«3) exists between the star pointand an individual line. Similarly,the 15¬¬¬75kV (line-to-line volt-age) power generator I talkabout in this month’s featureactually has 9¬¬¬1kV induced intothe individual star-wired wind-ings.

In HarmonyThe domestic supply is still

provided at 240V, but due to themurky workings of the EU, andbecause areas of Europe stilluse 220V, the European supplywas officially “harmonized” at230V. (Imagine if they appliedthe same methodology to Britishroads, we’d be told that offi-cially, we drive on the right.)

Your final sentence causeda wry smile. I do hope you willagree that far from“adulterating” any terminologyfor the sake of it, it is consid-ered part of the job to interpretand translate into Everyday lan-guage the often esoteric jargonand highly complex practicesused in the electricity industry.

I would perhaps add thatgenerally speaking, it is actuallymuch harder to write such mate-

Our team of in-house circuit surgeons take the lid offan apparently simple-looking multivibrator circuitwhose operation has often defied explanation untilnow. More on Live Supplies and transistor substitutesas well.

by ALAN WINSTANLEY and IAN BELL

Page 69: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 841

rial because no prior technicalknowledge on the part of thereader could be assumed.ARW.

Mysterious MultivibratorSome very simple-looking

circuits have an operation whichis more complex (or hard to ex-plain!) than their apparent sim-plicity would suggest. M.L. Un-sted, from East Sussex, UKwrites:

Although I find EPE an ex-cellent magazine for someonenew to the subject, with usuallygood explanations of circuit op-eration, sometimes though, arelatively simple circuit designcomes along which does notbehave as I would expect!

One such article is theLighting Up Reminder, in theMarch 1998 issue. I tried thecircuit on a prototype board,measuring voltages at differentpoints with a meter and an oscil-loscope.

Could you explain why tran-sistor TR1 turns off when itsbase is being pulled negative byTR2 collector, and the alreadypositive base-emitter voltage ofTR2 is further enhanced via ca-pacitor C1, by the rapidly risingvoltage across resistor R2 asTR1 turns on? I can see thatwhen TR1 does turn off, thebase of TR2 will be driven sev-eral volts negative, thus giving adelay between pulses. A ques-tion worthy of Circuit Surgery Ithink!

In view of our new series onPractical Oscillator Designs, wefelt this design was worth revis-iting. The Lighting-Up Remindercircuit is re-drawn in Fig. 1. TheEditor tells us that the circuit

terfacing PICs to the “realworld”).

Classic AstableFor the benefit of readers

unfamiliar with multivibrators, itis worth taking a look at a morepopular (and possibly easier tounderstand) circuit for a classictwo transistor astable multivi-brator. The circuit diagram isshown in Fig. 2: old hands willknow straight away that the“crossover” in the middle of thecircuit is a hallmark of such amultivibrator: the transistors arewired in a cross-coupled fashion i.e. the collector of one is con-nected the base of the other viaone of the capacitors.

description was deliberatelyomitted because there wasmore than one opinion concern-ing how the circuit operated inreality!

The Surgery writers wereinterested to discover anotherpublished use for this type ofcircuit that also lacked the ac-companying explanation. It is aVariable Speed Metronome byB.B.Babani in the First Book ofPractical Electronic Projects(published 20 years ago).

The LED D1 and resistor R2are replaced by a 16W loud-speaker, R1 is a 250kW pot plusa 22kW resistor, and capacitorC1 is 15mF. The transistors aredifferent too, of course. No textaccompanies the circuit, onlythe schematic is given in thebook!

RelaxThe circuit is actually an

astable multivibrator, because itcontinuously switches betweentwo states. However, it couldalso be described as a relax-ation oscillator as it spends al-most all of its time in one of thestates. The transistor multivibra-tor circuits we will describe hereare perhaps good examples ofsimple circuits that have a largenumber of possible applicationsfor the hobbyist (limited only byyour creativity!).

There has been some de-bate in the EPE Readout pageson the merits of such simple cir-cuits compared with more so-phisticated PIC based projects.Apart from being useful in them-selves and simple to construct,a big advantage of experiment-ing with small transistor circuitsis they can help understandingof fundamental concepts thatcan be put to good use in a widevariety of designs (including in-

&LUFXLW6XUJHU\

R

S

U

R

S

U

DB#2@! #2 4!

B54

FB!

! [

B!

!=3!

! P

DB"">") #

B"

! :

DB!23%%(

3"

! P

Q

[

F

F

Fig.1. Redrawn circuit dia-gram for the basic Lighting-UP Reminder, taken from theMarch ’98 issue of EPE.

R

S

U

R

S

U

F

F33

DB!

3!

B"B!

DB"

3"

B# B$

Fig.2. A well recognizedastable multivibrator circuit.

Page 70: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 842

If one transistor is switchedON (it does not matter whichone) its collector (c) will be at alow voltage, and hence it willtend to turn the other transistorOFF by sending its base (b) ter-minal low. It is, therefore, rea-sonable to assume that onetransistor is off and the other ison, and that the circuit oscillatesby periodically switching be-tween these two states. Thus wecan start by assuming that TR1has just switched off and TR2has just switched on.

When transistor TR2 wasOFF, its collector would havebeen almost at the supply volt-age +Vcc, whereas TR1 whichwas switched on, would onlyhave had a base voltage of,say, 0¬¬¬6V. Thus, the voltageacross capacitor C2 just beforeTR2 turned on would have beennearly equal to the supply volt-age +Vcc (ignoring the 0¬¬¬6Vbase-emitter voltage for simplic-ity).

At the instant that TR2 turnson, C2 still holds its charge andhas a voltage of +Vcc across itsplates. Note that the transistorsswitch much faster than the ca-pacitors can either charge ordischarge, so that the voltageacross C2 just before and justafter the transistors haveswitched, is the same.

Transistor TR2 is fully onand its collector voltage is verylow, in fact for simplicity we canassume TR2’s collector is at 0V.Remember that C2 still has Vccacross it, but now the more pos-itive plate is fixed at 0V, so theother plate must be at a voltageof (Vcc less than this), which isVcc.

FundamentalThis is a pretty fundamental

point. The negative voltage may

seem strange in a circuit whichonly has a single rail power sup-ply (+Vcc) but occurs becausecapacitors are able to storecharge, and hence have a cer-tain voltage “across” them whilewe switch the fixed voltage atone plate.

The voltage “across” it re-mains the same, so a new fixedvoltage for one plate mustmean a new voltage relative to0V for the other plate. Suchvoltage shifting is put to gooduse in some circuits, for exam-ple to generate different volt-ages from those available di-rectly from the power supply,however, in this case the nega-tive voltage is just a conse-quence of the circuit’s switchingaction.

Returning to our analysis ofFig.2. We recall that as transis-tor TR2 has just turned on, thebase of TR1 which is at Vccdue to the voltage across C2and note that this is also consis-tent with our assumption thatTR1 has just switched off.

The situation does not staylike this forever, because ca-pacitor C2 now starts chargingfrom Vcc towards +Vccthrough resistor R3 (rememberthe TR2 collector side of C2 isfixed at 0V at this point). How-ever, C2 never manages tocharge all the way to +Vcc, be-cause as soon as it reaches

about +0¬¬6V TR1 will turn oncausing the circuit to switchagain. The process just de-scribed is repeated, but thistime with C1 charging to turnTR2 back on.

The speed at which the cir-cuit oscillates can be deter-mined using the standard expo-nential charging equation for acapacitor. We can estimate thetime TR1 is off by using a timeconstant of C2 from a voltage of 2

R3, charging Vcc, until

it reaches Vcc, giving a time of0of the oscillation is (0

¬¬¬7 (C2 R3). The total period¬¬¬7 (C2

R3)) + (0¬¬¬7 (C1 R2)).

This is only approximate, aswe have ignored the 0¬¬¬6V basevoltage. This formula is onlyvalid if the transistor’s base-emitter junctions are not driveninto reverse breakdown by thenegative base voltage, whichwill happen if you use a suffi-ciently large Vcc.

All TogetherThe first point to make

about the “Lighting-Up” multivi-brator of Fig.1 is both transistorsare either on or off together.Note that the circuit uses com-plementary transistors (one npnand one pnp), unlike the classiccircuit in Fig. 2 which has twotransistors of the same type. Italso employs a single capacitorfor timing, rather than two.

For the purposes of under-standing the multivibrator actionwe can simply remove presetpot VR1 and transistor TR3 asthese serve only to hold bothmultivibrator transistors offwhen the light level is high. Wecan also remove the LED (D1)and the supply decoupling ca-pacitor C2, as these are not es-sential to description of the os-cillation process. This leads to

&LUFXLW6XUJHU\

R

S

U

R

S

U

DB"

B!

3!

B"

F

DB!

F33

Fig.3. Circuit diagram for themulti-vibrator part of theLighting-Up Reminder.

Page 71: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 843

&LUFXLW6XUJHU\

the simpler version of Fig.3,which can be analysed as fol-lows.

Start by assuming both tran-sistors are fully ON, so TR1’scollector is pulled up to +Vccand TR1 base is just 0¬¬¬6V belowthe supply rail (TR1 being a pnptype, remember). This is not astable situation, because capac-itor C1 will continue to charge base current flowing out of C1’snegative plate while an equalcurrent flows to the positiveplate via TR1’s collector.

While the transistors areswitched on, the collector ofTR1 will stay fairly constant atits VCEstat (collector-emittersaturation voltage, about 0¬¬¬2V)below Vcc, so as C1 charges,

the base-emitter voltage VBE ofTR2 will drop. At some point thiswill cause TR2 to start to turn off,which in turn will turn off TR1.

As TR1 turns off, its collectorvoltage will drop towards 0V, thevoltage across C1 will not be ableto change quickly enough to keepup with this, and so the voltage atthe base of TR2 will be pushedlower by C1. This regenerativeaction will turn TR2 off even moreand hence TR1 off more still, apositive feedback effect resultingin a very rapid switch-off of bothtransistors.

This happened so quickly thatthe voltage across C1 will still beabout (VCC VBE VCEstat)volts, but now TR1’s collector isat 0V so TR2’s base will be at ap-

proximately (VCC 0¬¬8) volts.At this point C1 will start tocharge towards + VCC via resis-tor R1, but as soon as it reachesabout +0¬¬

¬

6V TR2 will turn oncausing TR1 to turn on as welland pulling TR2’s base evenhigher via C1 (again this is posi-tive feedback effect giving fastswitching between states).

Capacitor C1 will rapidlycharge towards +0¬6V on itsnegative plate and (VCC VCE-stat) on its positive plate due tothe high base current in TR2and collector current of TR1.This brings us back to the pointwhere we started and thus thecircuit oscillates.

SimulationWhen any doubt exists over

the operation of a circuit, it iscommon to analyze it by using acomputer-based simulator pack-age. The circuit is “built” on-screen and can then be testedand sampled. We did this withthe oscillator and simulated cir-cuit waveforms are shown inFig. 4. The upper waveform is asimulation of TR2’s base; TR1’scollector is below. An arbitrarytimebase and 9V supply are as-sumed.

As long as C1 and R1 arereasonably large, the time dur-ing which TR1 and TR2 are onwill be very short compared tothe time which they are off. Thecurrent taken from the powersupply will be small during theoff period (if R1 is large) butmay be very high during the onperiod (if R2 is small). This isone reason why the circuit issuitable for the lighting-up re-minder it provides short highcurrent pulses to the LED butdoes not have a large continu-ous current drain.

The value of R2 must belarge enough to prevent exces-

Fig.4. Screen Waveform for a Lighting-Up style astable(9V supply, arbitrary timebase).

R

S

U

R

S

U

R

S

U

R

S

U

B$

DB!

3"

DB"

3!

B#

B! B"

3!

3?ED

B! DB!

DB"

B"

B#

F F

B$

F33F33

Fig.5. More complementary transistor multivibratorcircuits. Can you figure out how they work?

Page 72: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 844

&LUFXLW6XUJHU\

sive current flowing in TR2’scollector. The value of R1 mustbe large, not only to give thelong time period described, butalso to ensure oscillation oc-curs. If R1 is too small it willprovide enough current to turnTR2 fully on all the time, pre-venting oscillation. If you want alonger “on” period then a resis-tor can be placed in series withC1, however, if this value is toolarge the circuit may fail to os-cillate.

The multivibrator used inthe Lighting-Up circuit (and theMetronome) is just one of anumber of similar circuits whichemploy two complementarytransistors to a make a multivi-brator. In general these circuitsare used to provide short pulsewaveforms (which can provideflashes or clicks), they also pro-vide sawtooths if the capacitorvoltage is used.

A couple of other examplesare shown in Fig. 5, which youmight like to experiment with.Unlike the earlier circuits, boththese circuits have the transis-tors in series.

You can find yet more mul-tivibrator circuits of varioustypes on 4QD’s web pages of“interesting circuits” at:www.4qd.co.uk/ccts/mvibs.html IMB.

Transistors in a PICkleFrom a reader of our

Internet-only edition of the mag-azine EPE OnLine(www.epemag.com ) came thefollowing query:

I want to build your MindPICkler but could not find thetransistors over here in theUSA. Do you have differentproduct numbers in the UK? Ifyou do, this will make your pro-

jects harder for us to build Ihave been very happy with yourmagazine until I tried to build theMind PICkler project. (Via AOL.)

Yes, in Europe we do haveour own semiconductor rangesthat may seem pretty alien com-pared to the devices you’re ac-customed to in the USA. Europedoes have a very active semicon-ductor industry of its own youknow!

Most of our project contribu-tors use European devices plus asmall number of 2N types. Arange of 2N transistors is avail-able from larger UK vendors, butBC device types are as commonover here as your 2N types are inthe States. We also have a num-ber of readers in Japan, though Imust confess that we have never,as far as I can recall, usedJapanese “2S” transistors.

My main reference Towers’International Transistor Selector(ISBN 0-572-02121-6) de-scribes the European “Pro Elec-tron” type numbering system fortransistors as follows.

First letter material used: A

Gallium Arsenide; R Germanium; B Silicon; C

Specialcompound (example, CadmiumSulphide as used in light-dependent resistors).

Second letter low power audio; D

function: C

sistor audio; F power tran-

HF low power; L

switching; U HF power; S low power

power switching.

A suffix letter may be used (asin the BC184L and BC214L used inthe Mind PICkler) but this has nostandardized meaning.

American devices use the“JEDEC” (Joint Electronic DeviceEngineering Councils) code of 2Nprefixes for all transistors, thyris-tors, and triacs, and it is from this

family that you are seeking anequivalent. I’m afraid it’s part ofthe “deal” of hobby electronicsthat one may need to be re-sourceful at times and perhapsfind alternatives to devices usedin a prototype.

This applies not only tosemiconductors, but perhapssome hardware items (e.g. re-lays or transformers) as well.The designer will always make itclear if device types are critical,and the Shoptalk column mustalso be consulted as regardscomponent-buying matters.

Concerning the Mind PICk-ler, according to Towers’ equiv-alents are as follows: BC184L 2N5210; BC214L 2N5087.There seems to be nothing spe-cial about these small-signaltransistors. Other types shouldwork equally well. The collector-emitter voltage is 50V maxi-mum rating, collector currentrating 200mA and gain hFE 250.

However, it is obviously im-portant to observe the pinouts,and it will be seen from the PCBlayout that we made the transis-tor connections crystal-clear.The collector is the center pin inthe PCB design, and alternativedevices will probably need to beorientated to make their wiresfit. Both the 2N5210 and2N5087 are e-b-c (standardTO92 plastic packages) not e-c-b per the board, which meanstwisting the transistor body sothat its leads fit correctly.

It is true that occasionallythere are minor problems foroverseas readers when “special”transistors are called for. If thiscauses a problem we will try tosuggest an equivalent upon re-quest, but they may not havebeen tried and tested in the de-sign. ARW

Page 73: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 845

EXPLORER 5COMES OF AGE

The war of the browsersseems to have rather subsidedas the distinctions betweendifferent types are becomingincreasingly blurred. In manycases, mainstream consumerusers have adopted InternetExplorer by default because itarrived with their desk-topoperating system, and theyknow of no alternatives nor howto install them. The rise ofMicrosoft Internet Explorertogether with the adoption of“URLs with everything” areexamples of how Microsoftturned on a sixpence and re-invented itself to embrace theInternet. Hewlett Packard iscurrently doing the same asregards e-commerce.

About six years ago theNational Center forSupercomputing Applications atthe University of Illinois createdone of the first popular browsers(NCSA Mosaic) for Windowsand also for Unix users. Accessto the Internet from a WindowsPC needed some tinkeringunder the bonnet with Mosaic.ini files and separately installedWinsocks, but much of this wassimplified when Windows 95came along.

It is Netscape, originallyfounded on NCSA Mosaicknow-how, then rewritten, whichdid most of the running in theearly days of web browsing withits Navigator browser. Acompany called Sprypersevered with the Mosaicbrowser and this was to bemade available to CompuServe

users for a time. All in all,getting Internet access was atricky operation involving a lotof perseverance and somesoftware skills, with flakysoftware, slow connections anda tiny handful of ISPs.

The earliest screenshots ofbrowser windows taken in themid 90s had neither a MicrosoftWindows logo nor a Netscape“N’”, but the distinctive Mosaic“S” globe taken from the NCSAlogo (examples of which are athttp://www.ncsa.uiuc.edu ).Netscape then embarked uponthe progressive development ofits browser, which at the timebecame the best browser barnone. I have a copy ofNetscape 1.22 for Windows 3.1,which fitted onto a single floppydisk, and was in use beforeMicrosoft even appeared on theInternet browser scene, at atime of 9,600 or 14,400 accessspeeds!

Early versions of InternetExplorer were best held andused at arm’s length, andregular readers will know that Ideliberately hesitated beforeinstalling MSIE 4.0, especiallyas I had taken a strong dislikingto the loathsome “ActiveDesktop”. It was, therefore, withsome foreboding that I decidedto take the plunge and useExplorer 5. I have to say that Ihave been very pleasantlysurprised.

Installation was somewhatslow but flawless, and I have yetto see any error messages orproblems. Surfing seemsslightly more reliable, with fewerJavascript error messages.Much of what MSIE 5.0 is about

is hidden behind the familiar-looking Explorer interface, butone improvement which readerswill enjoy is the browser’streatment of FTP sites, whichnow appear as familiar-lookingWindows folders. The processof anonymous FTP is muchmore reliable and easier thanbefore. Off-line browsing alsoworks well, so that you can viewweb pages held in your cache,even when disconnected. Thebrowser seems at last to havecome of age.

HIDDEN WORMSIn previous Net Work

columns I explained thedifferences between computerviruses, Worms, and TrojanHorses. These are maliciouscodes, which are easilytransmitted via the Internet,both by E-mail and also by filetransfers. Remember the goldenrule that no file attachmentsshould ever be run unless youare quite certain that they arefrom a known, trusted source.Recall that you cannot suffer avirus attack merely by readingan E-mail, but you canintroduce a damaging virus byrunning an attachment. OpeningMicrosoft Word to read anattached .doc file constitutesrunning an attached file.

Hot on the heels ofcomputer viruses reported inearlier Net Work articles, thelatest Worm to escape isWorm.ExploreZip, also knownas W32.ExploreZip. This hassome Melissa-likecharacteristics in that itpropagates itself by using theInbox of Microsoft Outlook

By Alan Winstanley

SURFING THE INTERNET

Page 74: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 846

(including Express) orExchange mail systems to senda message in reply to anyunread mails. It also launchesWindows Explorer wheneverWindows is booted up, and itcontains a Trojan Horse, aninvitingly innocent-looking filewhich will cause damage whenexecuted.

The originating messagewill arrive in the form of themessage “Hi <username>. Ireceived your email and I shallsend you a reply ASAP. Tillthen, take a look at the attachedzipped docs. Bye”. Anexecutable file is attached tothe message.

Incredibly, people fall for it.It has already reportedlydamaged some majorinstitutions’ networks and E-mailsystems, which had to be shutdown until they could bedisinfected. The Worm will alsoseek out and infect any mappeddrives on a network, and thosemachines will in turn mail outthe Worm to its own unreadmails. Thus the Worm multipliesand infects other systems.

Once again it is stressedhow dangerous it can be toopen and run an attached filefrom an untrusted source. In thecase of Worm.ExploreZip, a

file called zipped_files.exe isattached to the innocent-lookingE-mail. If it were a Zip file thenit would have a .zip extension,and the .exe is an obvious cluethat the file is really anexecutable program.

When the attached .exe isrun, the Worm will not onlyreside on the infected systemand launch itself every time theWindows PC is booted up, but itwill also seek and destroy avariety of file types. EPE andEPE Online readers may bedismayed to note that onesusceptible file type has the.asm extension, the sourcecode files used in PICmicrocontroller programs. TheWorm will also hunt out anddelete any *.c, or *.h or *.docfiles (and more besides) both onthe host machine and anyothers attached via a local areanetwork, so if ever there was areason to createregular backups, this Wormillustrates it.

Escaped Worms now makebig news and this one wasreported on CNN a day or sobefore it made it to the qualitypress. You should make a pointof checking the anti-virus websites as described previously. Autility file called kill_ez is

provided by Symantec, whoalso describe a manual methodof deleting the Worm: an updatefor Norton Anti Virus quicklybecame available but for somethe news came too late.

TROJAN TROUNCEDAs a final warning half an

hour before writing this I fetchedthe latest virus update for myNorton software fromSymantec. I then ran a checkover my small network, and loand behold, Norton reported aTrojan Horse. It turns out that itis the Pentium P3 serial numberI.D. exploit about which Ireported last month. It is there,residing on a hard disk (of anold Pentium pre-MMX machine)and I didn’t even know about it.Hard disks are getting bigger,programs can containthousands of files and eatprodigious amounts of space: itis so easy to forget aboutindividual files which in amoment of forgetfulness (lastingseveral ohnoseconds) could belaunched and inflict damage.Here’s one Trojan Horse whichhas been firmly put down.

As always, please do get intouch if you know of any siteswhich may be of interest to ourreaders. My E-mail address [email protected]

1HW:RUN

Page 75: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 847

Gadget enthusiasts whowonder why they bought a wire-less Internet receiver, smallenough to fit in their pocket butwith a screen too tiny to read,can take heart. British companyArgo, backed by venture capitalfrom 3i, has developed a sys-tem that converts Internet datainto legible form. At the sametime, the system, called Acti-Gate, decimates the volume ofdata and so accelerates down-loading by sluggish cellphonedata links.

The new breed of “thinclient” personal digital assis-tants (PDA), from Psion, 3Comand Nokia, either connect to aGSM cellphone or have cell-phone circuitry built-in. So theycan send and receive E-mailand access the Internet. Butweb pages are written in Hyper-Text Markup Language, and de-signed for display on large colormonitors. They contain fine textand graphics detail, which is loston a small, black and white LCDscreen.

Even small graphic imagesneed at least one kilobyte, andsome pages embed severaldozen. A page that takes 30seconds to download into a PCwith a fast telephone modem,takes five minutes by digitalcellphone because GSM dataspeed is limited to 9¬¬¬6Kbps.

HDMLProtocolRival industry groups are

currently promoting two incom-

patible solutions. UnwiredPlanet of California, with Alca-tel, propose a new page formatcalled Handheld Device MarkupLanguage. The Wireless Appli-cation Protocol Forum, which

includes Nokia, Ericsson andMotorola, are backing the WAPformat. Both formats deliverWeb content in a form suitablefor display on a PDA, but all theworld’s web sites must re-design

THINNER WEB PAGESHelp is on hand for users of Wireless Internet Receivers.

Barry Fox Reports

A ROUNDUP OF THE LATEST EVERYDAY NEWSFROM THE WORLD OF ELECTRONICS

Featuring high on Arizona Microchip’s product line is theirKEELOQ family of code hopping encoders. Microchip, as you mustwell know, are the manufacturers of the PIC microcontroller family.

Whilst EPE Online has not yet published any designs based onKEELOQ devices, we know that Microchip are keen that readersshould get to know about them (perhaps an enterprising designermight care to offer us a project using them). The latest informationreceived concerns the addition to the family of the HCS412.

The encoder function of the HCS412 can remotely lock and un-lock a car door, garage or estate gate using radio frequency. The de-vice provides the necessary control signals to interface directly topopular FSK and ASK phase locked loops. It also incorporates a sen-sitive passive-entry function, which allows vehicle entry without acti-vating the remote control or inserting the key. This feature uses low-frequency bi-directional communication to the keyfob and radio fre-quency to the vehicle.

If you would like to know more about KEELOQ devices, contactArizona Microchip Technology Ltd., Microchip House, 505 EskdaleRoad, Winnersh Triangle, Wokingham, Berks RG41 5TU, UK.

Tel: +44 (0) 118-921-5858Fax: +44 (0) 118-921-5835

CODE HOPPER

Page 76: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 848

broken. In a demonstration, Intelused a Pentium III processor andspecial cooling techniques to“wind-up” the clock speed to justbeyond the 1GHz mark.

“This is a milestone event,”said Albert Yu, Senior VicePresident and General Managerof the Intel MicroprocessorProducts Group. “We will con-tinue to push the frontier oftechnologies that will deliverprocessors with superior levelsof performance.”

Intel expects to introducecommercial production of pro-cessors operating at 1GHz inthe year 2000.

Intel’s web site can befound at www.intel.com(access the Pressroom for the1GHz information).

UK SpaceProgram

A pioneering space programto study the Earth’s environ-ment has recently been an-nounced by Lord Sainsbury,Minister for Science and Chair-man of the European SpaceAgency’s (ESA) MinisterialCouncil. The 400 million UKPound research project, knownas the Living Planet, will be un-dertaken by ESA and will be themost comprehensive Earth ob-servation program ever under-taken.

It will consist of a series ofspace missions designed to in-vestigate the Earth’s environ-ment, using unique global mea-surements of physical, chemicaland biological processes atwork in the Earth’s atmosphere,oceans and land surfaces.

More details are on website: www.dti.gov.uk

ELECTRONICSCOURSE ON CDElectronics Technician CBT

has been introduced on CD-ROM as an interactivecomputer-based training pro-gram that makes it easy to gainan in-depth working knowledgeof the fundamentals of electron-ics. It incorporates 23 instruc-tional modules with more than15 hours of audio material, ani-mated circuits, and interactivevideo examples.

Over 1500 practice prob-lems, exercises, and examplesprovide students with opportuni-ties to explore circuit functionand behavior. Practical chal-lenging design exercises en-courage you to apply what youhave learned to new situations.

This new training program isproduced by the makers ofElectronics Workbench, whichmany of you will recall is theexcellent electronics trainingpackage EPE used to illustrateour Electronics from the GroundUp series of 1994/95. WithElectronics Workbench installedalongside this new course, stu-dents have access to over 450experiments that let them ma-nipulate and simulate circuits intheir own virtual electronics lab-oratory.

Electronics Technician CBTand Electronics Workbench aresupplied and supported in theUK by Adept Scientific plc, 6Business Centre West, AvenueOne, Letchworth, Herts SG62HB, UK.

Tel: +44 (0) 1462- 480055.Fax: +44 (0) 1462-480213.E-mail:[email protected]:www.adeptscience.co.uk

1(:6

their pages.

Argo’s ActiGate avoids theneed to re-write pages. It sits ona proxy server, automaticallyanalyzing each HTML web pagethat passes through and re-formatting it to remove clutter.

ActiGate removes Javascripts and graphics inserts, us-ing the raw text and link ad-dresses buried inside the graph-ics to generate short text mes-sages and simple icons pulledfrom a lookup library. Text fontsizes are increased for im-proved legibility. Color is re-placed by monochrome grayscale.

This reduces data content,and thus download time andmemory storage requirements,by a factor of ten. The displayedpage can be scrolled and easilyread. Even traffic road mapsbecome readable.

PDA users do not have todo anything, except access theInternet through the proxyserver. The server recognizeseach PDA by the responseswhich are automatically sent byall browser software, and thentailors its output format to suitthe PDA and whatever browserit is using.

Says Argo’s Chief TechnicalOfficer, Richard Jelbert “We canconvert 90 per cent of the con-tent of 90 per cent of the pageson the Internet, which is a lotmore realistic than trying to per-suade 100 million sites torewrite all their pages”.

GIGAHERTZBARRIERBROKEN

Browsing Intel’s web site re-vealed that the 1GHz (one billioncycles per second) microproces-sor clock speed barrier has been

Page 77: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 849

Taking the Move out ofMovies

An off-shoot of space research couldhelp improve

your shaky home videos. By Barry FoxScientists working for NASA’s Space Flight Cen-

ter have developed a system that improves poorlyshot video tapes. Video Image Stabilization and Reg-istration removes handshake and unwanted zoomand tilt motion, while making fuzzy pictures looksharp. VISAR works by dissecting each image in amotion sequence and rebuilding them in a constant

position and size.

David Hathaway and Paul Meyer were workingfor the FBI, trying to clean up a shaky 13-secondvideo tape of the bomb which exploded at night dur-ing the 1996 Olympic Games in Atlanta. They brokeeach of the 400 picture frames down into severalhundred thousand component picture points or pix-els, isolated rectangular patches which had constantpixel patterns, and summed the patterns from sev-eral different frames. This reinforced the wanted im-age, while reducing random noise. At the same timethe whole image was moved to keep the target pat-tern at a fixed position on screen, and so remove theeffect of handheld camera shake.

NASA has now refined the technique to keep thepatterns of constant size as well as position. This cor-rects for accidental zooming, where a photographerhas pressed the wrong button to move between wideangle and telephoto imaging, or tilted the camera bymistake.

NASA is offering VISAR to the police, who canuse it to recognize license plate numbers or faces ina crowd accidentally captured on home videofootage. VISAR can also sharpen medical ultrasoundscans or calculate tornado wind speeds by trackingobjects trapped in a twister.

The prototype system works on a Windows PC,taking around 15 seconds to analyze each frame.

“As computer speeds increase, the processingtime comes down”, says Meyer. “We are aiming forreal time processing so that VISAR can be built intohome videos”.

Although some modern camcorders have stabi-lization circuitry, it works while shooting by compar-ing successive image scans and compensating forexaggerated shake. There is no chance to correcterrors once the tape has been shot. Photographerscan use VISAR at leisure after shooting.

1(:6

Lascar electronics has added a new miniaturepower supply to its existing (and excellent) lowcost linear PSU range. The new PSU303 is a com-pact “open” mains power module featuring +5V(200mA) and W5V (50mA) fixed rails. It uses linearregulator ICs with over-current and over-temperature protection.

Like all products in the Lascar range, thePSU303 uses an encapsulated transformer andscrew terminal connections. With an overall size of42mm to compact applications.

78mm 29¬¬¬6mm, this PSU is well suited

For more information, contact Lascar Electron-ics Ltd., Dept EPE, Module House, Whiteparish,Salisbury, Wilts SP5 2SJ, UK.

Tel: +44 (0) 1794-884567Fax: +44 (0) 1794 884616E-Mail: [email protected]: www.lascarelectronics.com

MINIATURE PSUS

Byte-sizedComputer Guides

“Fed up with computer manuals which are al-most the size of your terminal?” asks the openingsentence of a press release from Collins. Well, forthose who are looking for a pocket book which willget down to the computing basics without leaving outessentials, Collins believe they have the answer, inthe form of four new color-illustrated guides. Theyare said to be small enough to fit in your pocket butpacked full of information in a readily accessibleform. “Ideal for even the most wary of techno-phobes!”

Page 78: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 850

In Japan, Sony is now sell-ing Super Audio CD, the firstsuper hi-fi system to use a vari-ant of DVD, the high densityvideo disc. Philips will helpSony launch SA-CD in the USand Europe before the end ofthe year. Matsushita, maker ofTechnics and Panasonic equip-ment, announced recently that itwill launch the rival and incom-patible DVD Audio system,worldwide, before Christmas.Neither company has been will-ing to back down, or agree on acombination system.

Matsushita has already firedtwo shots. Sony’s first SA-CDplayer costs $5000 and only de-livers stereo, but DVD-Audio willgive multichannel surround fromDay One. Matsushita also be-lieves there is a fatal flaw in thehybrid disc technology thatSony and Philips have dubbed a“defining attribute” of SA-CDbecause it promises backwardscompatibility with the 600 mil-lion “legacy” CD players alreadysold.

Layered MusicThe SA-CD hybrid disc will

have two recordings of thesame music, at different depthsin the surface. The lower layer,beneath 1¬2mm of clear plastic,carries a conventional CDrecording to the so-called RedBook Standard. Another layer,at 0¬6mm, conforms to the newScarlet Book standard and ismade of semi-reflective mate-rial like a two-way mirror. Thislayer carries the very rapid

stream of single bits that makesup the Direct Stream Digitalrecording used for SA-CD.

The laser optics in a stan-dard CD player or ROM driveroutinely focus at 1¬2mm, andshould ignore the semi-reflective layer of a hybrid disc.A DVD Video player can focusat either depth, but is notequipped to decode the SA-CDrecording so it should ignore thesemi-reflective layer, focusdown to 1¬2mm, and play thedisc as a conventional musicCD.

At a recent seminar in Aus-tria, Matsushita’s engineershardened concerns that earliersurfaced at the Audio Engineer-ing Society’s convention in Mu-nich. They warn that if the laserin a CD player detects the semi-reflective layer, either becausethe player is cheap or old, ornew and designed to readerasable CDs which have lowerreflectivity, the player will rejectthe disc as unplayable. DVDplayers may not switch to thelower CD layer when they fail todecode the DSD signal.

Hybrid ConcernsTed Abe, head of Mat-

sushita’s Audio TechnologyGroup, is not surprised thatSony is launching SA-CD inJapan without hybrid discs. Hisengineers have made hybriddiscs and tested them on a widerange of real world players. Theengineers found that many CDplayers, from the countlessfirms round the world now mak-

1(:6

Collins Gem Internet pro-vides an overview of the Internetand what it can do for you, with awealth of practical information,ideas and pointers to help youmake the most of E-mail and theWeb.

Collins Gem Your PC aimsto help you make the right deci-sions about what to buy andwhere to buy it, and to makesense of the technical jargon thatwill confront you, from CPUs andmodems to DAT drives and scan-ners.

Collins Gem Using YourSoftware demonstrates how toorganize your computer and itssoftware to keep the system run-ning efficiently and reliably.

Collins Gem Word Process-ing includes information on: sav-ing, closing, opening, and printingdocuments; setting up envelopesand labels; tables, sorting text andmail merges; fonts, styles,columns and sections; insertingpictures and creating artwork.

The books are 4.99 UKPounds each and availablethrough good booksellers (ISBNcodes have not been supplied tous). Further information can beobtained by:

E-mail: [email protected]: www.collins.gem.com

VIDEO WARS IITwo old enemies are at it again, in a re-run of the

VHS-v-Betamax,Matsushita-v-Sony, video wars. Barry Fox reports.

Page 79: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 851

tional best-sellers in the field ofelectronics. He has authoredmore than 80 books, which to-gether have sold well over twomillion copies in nine lan-guages.

This latest book is a step-by-step guide to designing filtersusing off-the-shelf ICs. It startswith the operating principles offilters and common applica-tions, then moves on to de-scribe how to design circuits us-ing modern chips. The empha-sis is on practical, simplified ap-proaches to solving designproblems.

The contents include: Intro-duction; typical switch-capacitorfilters; lowpass filters; bandpassfilters; active RC filters; simpli-fied design examples.

For more information, askyour local good bookseller, orcontact Butterworth-Heinemann,Linacre House, Jordan Hill, Ox-ford OX2 8DP, UK.

Tel: +44 (0) 1865-310366Fax: +44 (0)1865-310898E-mail: bhmarket [email protected]: www.bh.com

RAC TRACKSTARThe RAC and Trafficmaster

have added their weight to thebattle to reduce fatal accidentsinvolving high speed pursuits.They have launched Trackstar,which is a radically new and in-novative vehicle security devicethat uses satellite tracking toprovide the updated location ofa stolen vehicle anywhere in theUK. Around 400,000 vehicleswere stolen in the UK in 1998.

The device combines GPSsatellite tracking with GSM mo-bile phone network to provideinstant communications whenthe unit is activated. Once trig-gered, RAC Trackstar’s central

control is alerted to the vehicle’sexact position and direction oftravel. The vehicle is then con-stantly tracked and, after anumber of quick securitychecks, the appropriate policeforce is notified. Once appre-hended and cleared for release,the RAC returns the stolen vehi-cle to its owner.

RAC Trackstar also offersimmediate connection to emer-gency or breakdown servicesand provides call operators withdetails of the vehicle and its pin-point location. Meanwhile avoice channel is automaticallyopened for the call operator tospeak directly to the caller.

RAC Trackstar prices startfrom 295 UK Pounds plus VATfor the hardware, with a trackingsubscription of 8 UK Poundsplus VAT per month.

For further information con-tact your local RAC center, orthe RAC Supercenter, PO Box700, Bristol BS99 1RB.

Tel: +44 (0) 1454-208262.Fax: +44 (0) 1454-208267.(No E-mail or Web detailsquoted.)

FM 1·394GHZTRANSDUCERS

With the interest that cur-rently surrounds our projectsusing the 418MHz transmitterand receiver pairs, a lot of youwill no doubt be pleased to hearthat radio modules that operatein the 1¬¬¬394GHz range arenewly available from Wood andDouglas.

Their VT1400 and VR1400transducers provide a high-quality yet economical FM wire-less video link. Intended primar-ily for use with remote securityand surveillance cameras, thedevices are approved to the

1(:6

ing them, do not exactly meetthe Red Book standard.

“We have very serious con-cerns about backward compati-bility of hybrid discs,” says Abe.“Our tests suggest that 30 percent of legacy players will notbe able to play them. It’s impos-sible to predict which ones willreject hybrids and it’s impossibleto do anything about it whenthey do fail. We stopped re-search on hybrid discs and saidNo Way.”

David Walstra, GeneralManager of Sony Europe, ac-cepts that it is unfortunate thatSony’s own music division is notreleasing hybrids, but he be-lieves other companies soonwill. “We are 100 per cent cer-tain that hybrid discs will play onplayers if they conform to theRed Book CD standard. Wehave checked our own DVDplayers and they play hybriddiscs. We can’t speak for othermanufacturers”.

Payl Reynolds, Philips’ di-rector of new business develop-ment, says the company is nowstarting pilot production of hy-brid discs at Eindhoven in theNetherlands to “perfect the tech-nology”.

Filter CircuitsBook

Designing satisfactory filtercircuits is a bit of a “black-art”unless you are well familiar withthe options and their rules.Butterworth-Heinemann haveaddressed this problem by intro-ducing a very useful 240-pagepaperback, Simplified Design ofFilter Circuits, ISBN 0 75069655 9, priced at 22.50 UKPounds.

John D. Lenk is the author,an established writer of interna-

Page 80: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 852

and operates from a 12V DCsupply. Its signal can be re-ceived clearly at a range of upto five miles (8km) using theVR1400 receiver and suitableaerials.

For more information, con-tact Wood and Douglas Ltd.,Dept EPE, Lattice House,

Baughurst Road, Baughurst,Tadley, Hants RG26 5LP, UK.

Tel: +44 (0) 118-981-1444.Fax: +44 (0) 118-981-1567.Email:[email protected] .Web:www.woodanddouglas.co.uk

1(:6

MPT1349 standard, which al-lows license-free operation inthe UK. New techniques havebeen implemented to permittransmission of color pictures inthe limited bandwidth allowedby MPT1349.

The VT1400 transmitter hasan RF output power of 500mW

Page 81: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 853

Ultrasonic PunctureFinder

Some of the parts neededfor the Ultrasonic PunctureFinder may prove difficult tofind at your usual local source.Most larger component stockistsare now carrying extensiveranges of surface mountdevices, so these should be noproblem. Check out the author'sweb site at:www.billsSMD.mcmail.com

The small integrated “knob-pot” VR1 only appears to belisted by Farnell (code 350-655).The semiconductor devicesoriginally came from GothicCrellon. If you wish to use thecase pictured in the article, thiswas purchased from CPCPreston (quote code EN55035).

The ultrasonic transducer isusually stocked as a pair,

transmitter/receiver, and youmay have to shop around to finda stockist willing to part with justthe receiver. Having said that,Electromail, the mail order armof RS, list them separately; thereceiver is coded 307-367 andcosts just over 4 UK Poundsplus any shipping and handlingcharge. Some companies sellthe pair for around 6 UK Poundsplus shipping and handling.

Magnetic Field DetectiveThe main item of concern

regarding components for theMagnetic Field Detective will bethe fluxgate magnetometersensor. The FGM-3 fluxgatesensor is obtainable from:Speake & Co. Ltd., ElvictaEstate, Crickhowell, Powys,NP8 1DF, UK. We understandfrom Bill Speake that this will

cost readers 17 UK Pounds allinclusive, and includs the datasheet and application notes.

One source for the LP29505V micropower regulator is fromElectromail (code 648-567). TheAD8532 dual opamp came fromMaplin (code OA16S).

8-Channel Analog DataLogger

The PIC16F877microcontroller used in the 8-Channel Analogue Data Loggeris so new that supplies will onlybe appearing during the latterhalf of July ’99. We understandthat Farnell will be stockingunprogrammed ’F877s. Thesame source was identified forthe 24LCxx serial EEPROMmemory chips. To date, we areunable to quote order codes butwe will keep you “posted”.

For those readers who wanta “plug-in and go” ready-programmed PIC16F877 chip,one will be available fromMagenta Electronics for anexpected price of 10 UK Pounds(overseas readers add 1 UKPound for postage).

For those readers who wishto program their own PICs, the -software can be downloadedFree from the EPE OnlineLibrary at www.epemag.com

Freezer AlarmThe opamp for the Freezer

Alarm must be a low power typeand readers are advised to stickwith the LF441CN if possible.However, we have justdiscovered that this opamp isnow in very short supply andsome reports suggest it is

with DAVID BARRINGTON

Tel: +44 (0) 1743-788878

Maplin (UK)Web: www.maplin.co.uk

Magenta Electronics (UK)Tel: +44 (0) 1283-565435Web:www.magenta2000.co.uk

MicrochipWeb: www.microchip.com

Rapid Electronics (UK)Tel: +44 (0) 1206-751166

RF Solutions (UK)Tel: +44 (0) 1273-488880Web: www.rfsolution.co.uk

Speak & Co. Ltd.Tel: +44 (0) 1873-811281

Some Component Suppliers for EPE Online Con -structional Articles

AntexWeb: www.antex.co.uk

CPC Preston (UK)Tel: +44 (0) 1772-654455

EPE Online Store and LibraryWeb: www.epemag.com

Electromail (UK)Tel: +44 (0) 1536-204555

ESR (UK)Tel: +44 (0) 191-2514363Fax: +44 (0) 191-2522296Email: [email protected]: www.esr.co.uk

Farnell (UK)Tel: +44 (0) 113-263-6311Web: www.farnell.com

Gothic Crellon (UK)

Page 82: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 854

“discontinued”. In view of this,we contacted Farnell, and theyhave suggested the AD548JN(code 400-920). You could alsotry the CA3130E. These havenot been tested in the model.

The bead thermistor ratingof 47 kilohms at +25C is itsnominal figure and should bequoted when ordering, mostsuppliers should be able to offera suitable device. It is certainlycarried by Maplin (code FX42V).They also list a 6V buzzer (codeFL39N).

Sound Activated SwitchThe only component to

watch out for when selectingparts for the Sound ActivatedSwitch is the electret mic.insert, with a “built-I” FET.preamplifier. The model uses asubminiature type from RapidElectronics (code 35-0190).

All of this month’s printed circuitboards can be obtained fromthe EPE Online Store atwww.epemag.com

PLEASE TAKE NOTEMIDI Handbells (May ’99)

In Fig.3. The negative leadof electrolytic capacitor C2,connected to row K25, isincorrect. It should, of course,go to row J25, the 0V track.

6KRS7DON

Page 83: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 855

WIN A DIGITALMULTIMETER

The DMT-1010 is a 3 1/2 digitpocket-sized LCD multi-meterwhich measures a.c. and d.c.voltage, d.c. current, and re-sistance. It can also testdiodes and bipolar transistors.

Every month we will give aDMT-1010 Digital Multimeterto the author of the bestReadout letter.

John Becker addresses some of the general points readers have raised. Haveyou anything interesting to say? Email us at [email protected]!

* LETTER OF THEMONTH *

WASH AND BRUSH UPDear EPE,

A few years ago I wrote toyou about a project I wasmaking from EPE the WasherBottle Monitor (Sept ’92). Youwrote back a very kind andexplanatory letter which I stillhave, and the problem wassolved at once. The transistorhad the suffix “L”, which gave ita different pinout. The designwas installed in the car I had atthe time, and then transferred itto the next car, which I sold afew months ago, and themonitor, still working great, wentalong with it.

I have now retired and wemoved to a quiet country villageabout a year ago. I have built a

shack and now spend all mytime at DIY, the garden andelectronics, and have just builtmyself a UV light box from EPEand went on to develop my firstPCB using Terry de Vaux-Balbirnie’s Mole-ester (Aug ‘96)as a trial project. It is nowworking on the bench ready toput in a box 61/2 mins todevelop and 20-25 mins to etch.

I would like to thank you forthe help and for persuading meto keep at it when I was juststarted. It is a very satisfyinghobby at any age, of course. Ihave always liked to makethings. Most of my working lifewas spent as a fisherman andthe last ten years as skipper ofa North Sea trawler. I now lookforward to getting my teeth intomore projects and will keepreading your excellent articles.

Alexander LovieCornhill, Banffshire, Scotland

Most interesting to hearfrom you. We wonder if your UVunit was the one by AlanWinstanley, of July ‘92?

How many more readershave favorite EE/PE/EPE/ETI

V, A etc.) while the units namesthemselves (newton, pascal,volt, ampere, etc.) are not capi-talized.

Also I’m a bit doubtful aboutCelcius. I have seen it spelledthat way. But my Chambers Bi-ographical Dictionary tells me itis Celsius, after the Swedishastronomer Anders Celsius(1701-44), who devised thattemperature scale in 1742.

More seriously, you can’twrite virii (as appeared in Net-work June ’99)! The Latin virusoriginally meant a slimy liquid;the word was used (in French)in its modern sense of an infec-tious organism by Louis Pasteurin 1880, and reported (in En-glish) in Scientific American) in1881. The plural viruses hasbeen in use in English since atleast 1908, so there is no rea-son to use the Latin plural; but ifyou must use it, it is viri, notvirii.

Peter KellyWoombye, Queensland, Aus-

tralia

Thanks Peter we actuallycommented on the lower casefor kelvin in July ’99 Readout,but did not correct the pascalaspect and shall probably notdo so again in the future! Asyou will see from another letteron this page, the Editor in Chiefof Elektor-France is someoneelse who also chooses to usecapital P for Pascal. There aresome things which look better

QUIBBLESDear EPE,

A small quibble with the ref-erences to SI units in JohnPhillips’ letter (June ’99) andyour reply. The convention withSI units based on personalnames is that the unit symbolsare written with a capital (N, Pa,

Page 84: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 856

with caps in a publication suchas ours, even if it’s not strictlycorrect. Celcius was purely mytyping error, but by the rules youquote for non-caps should it notbe celsius?

Virus Fowler’s ModernEnglish Usage states that “Theplurals of nouns in -us are trou-blesome. Most are from Latinsecond-declension words,whose Latin plural is -i; butwhen that should be used, andwhen the English plural -uses isbetter, has to be decided foreach separately’’.

Personally, I would useviruses (I had Latin thrust downme at school but little was ab-sorbed and I wouldn’t presumeto comment on someone else’scorrect or incorrect use of it).My Hodder and StoughtonLatin-English dictionary gives“slime; poison; saltiness” as thetranslation for virus.

Don’t overlook the fact thatwe are principally here to pub-lish electronics articles and donot claim to be professors inEnglish (or Latin) although weacknowledge that correctspelling is desirable in any disci-pline!

FRENCH BARSDear EPE,

I have just read the HotBars letter of June ’99. Afterdecades and even centuries ofuse of the Imperial system, itseems that a lot of people overthere (the Channel, AtlanticOcean, Pacific Ocean) haveproblems with the Metric sys-tem.

The order is milli, centi,deci, one, deca, hecto, kilo.These translate as one thou-

sandth, one hundredth, onetenth, one, ten, hundred, thou-sand, and so on. Therefore, ahectoPascal is 100 Pascal andnot 0¬¬01 Pascal. It is true thatone hectoPascal is the same asone millibar, thus one bar is1000 hectoPascal.

For your information, the oldname of the bar was hectopieze(hpz = 100pz), 0¬¬98 atmosphere.The old name of the Pascal ismillipieze, one thousandth of aPieze.

Further, as far as I know,and I should, I’m a Frenchman,Celsius is written with an s not ac.

I read your magazine, withprofessional interest since atleast 18 years.

Guy RaedersdorfEditor in Chief, Elektor-

France

Thanks Guy, we appreciateyour professional input. We alsonote with interest that you alsouse capitals for some unit terms we’re being criticized for it(see the “Quibbles” letter on thispage)! Yes, I can’t type accu-rately, of course it’s Celsius (orshould it be celsius?) and forsome reason my word-processing program’sspellchecker failed to alert me.

NO TABBINGDear EPE,

Using Toolkit Mk2 with aTASM text file I have written fora project I’ve been working on, Icannot assemble the .ASM fileto binary .OBJ, receiving themessage “63 Errors”.

Dave Buckvia the Net

To cut short the story, I ex-amined Dave’s file and foundthat he had been using the Tabkey instead of spaces. The Tabis a command key and is notrecognized by the Toolkit soft-ware as legitimate ASCII textdata. The Tab does not actuallycreate spaces in the file beingwritten but puts in a single con-trol character of ASCII 9.

When Toolkit Mk2 assem-bles a text file it looks for thespace character (ASCII 32) asthe separators between fields(columns). If it finds ASCII 9 in-stead of a space, the correctfield separation is not made anddata is incorrectly interpreted, inDave’s case many of his PICcommands were being seen asLabels.

I have heard back fromDave who reports success afterremoving the Tab commands.

(PS Please do not send mecode files that you have writtenand can’t get to work I don’toffer a debugging service!Dave’s situation was differentand had me puzzled by what hesaid in his first E-mail.)

WINDOWS 98 PORTSPOOLINGDear EPE,

Regarding Thomas Walton’sTASM Send problem (ReadoutMay ’99), it may be that his Win-dows 98 is spooling data to theprinter port. I had a similar prob-lem when programming a paral-lel relay card in QuickBASIC.

Spooling means that datawill be significantly sloweddown. It is only really necessaryfor more advanced Windowsprograms (MS Word etc). To

5HDGRXW

Page 85: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 857

prevent spooling in MS-DOS programs, go to MyComputer and open the Printers folder. Now right-click the default printer and select Properties. In thewindow that appears click the Details tab and thenclick Port settings. Now uncheck the Spool MS-DOSprint jobs and click OK. I do not know why Windows95 wasn’t spooling Thomas’s Send yet Windows 98was. Maybe the printer driver’s defaults were re-stored during the upgrade.

Graeme Yeovia the Net

Thanks Graeme for this information. It couldwell prove useful to many readers who have up-graded to Windows 98.

PC PORT IDENTIFYINGDear EPE,

I have seen from Readout on several occasionsthat some readers have had difficulty in identifyingLPT ports for use with PIC Programmers, etc. Thefollowing program may be of help:

40 DEF SEG = 050 A = PEEK(1032) + 256 * PEEK(1033)60 B = PEEK(1034) + 256 * PEEK(1035)70 C = PEEK(1036) + 256 * PEEK(1037)80 PRINT “LPT1 AT ‘’; HEX$(A)90 PRINT “LPT2 AT ‘’; HEX$(B)100 PRINT “LPT3 AT ‘’ HEX$(C)110 DEF SEG

The remarks regarding LPT output lines notshifting between 0V and 5V may well be an issue. Ithink it is a good idea to buffer each line to and fromthe LPT port as a matter of principle.

David McCloyvia the Net

Thank you. The same information can also beobtained with many machines by typing MSD(standing for Microsoft Diagnostics) from MS-DOSmode. This causes a diagnostic screen to displayinformation about many aspects of your system.

Yes, it is agreed that buffering port I/O lines isbeneficial. This was done for the PIC Toolkit Mk2(May-June ‘98) and the 8-Channel Analog Data Log-ger (this issue).

DELPHI, CCTVDear EPE,

Many thanks for the kind words about mywebsite in the June ‘99 Interface, but more impor-tantly, thank you for promoting the excellent Delphisoftware. I have updated www.arunet.co.uk/tk-boyd/ele1pp.htm so that it now covers how toaccess a Windows 95 or 98 parallel port.

Also, I bought one of the little CCTV camerasbefore seeing your special offer for them. Can youpoint me to an old EPE project or some othersource for a still frame grabber? I want to work upa security application, which will record still imagesfrom the CCTV on a PC’s hard disk.

Tom Boydvia the Net

Regrettably, my CCD TV Camera’s software(Mar-Apr ’94) was specific to the CCD chip I usedin it. Whilst frame grabbing was one of the func-tions available, it would be too complex to re-writethe code to suit the little cameras to which you re-fer. Does any reader know of a circuit Tom mighttry?

Thanks for the previous informative E-mailabout more Delphi port procedures, but perhapsits best if people read such codes via your superbwebsite.

FLOPPY RADIODear EPE,

Regarding the Mechanical Radio of April ’99. Ihave found that the stepper motor off an old floppydrive works real dandy! No gear ratios are needed,just attach a simple handle to the shaft and aspeed of about 10 RPM is sufficient to generate3V. Dead right for my little radio. I charge two pen-light NiCad cells with it.

Martin Gouws,Randfontein, South Africa

Neat!

PhizzyWIZZDear EPE,

From the deepest corners of darkest Africa, Iwish to express my gratitude to all involved with

5HDGRXW

Page 86: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 858

the wonderful PhizzyB project(Nov ‘98 to June ’99). It has beengangs of fun.

Grahamvia the Net

Graham’s E-mail has wizzedaround the globe a bit before end-ing up on my PC. In the processhis surname has gone astray(hope it turns up before hemisses it!). Ports of call includeMax and Alvin in the USA, AlanW in Lincolnshire UK, Mike Khere at HQ. We think Grahamlives in Zanzibar.

We all express thanks to himfor taking the time to let us knowthat he appreciates the PhizzyB.It’s not often readers write to justsay how good things are, theyusually only write when they haveproblems (but we are pleased tohelp where possible). So, Gra-ham, from the rustic corners ofHistoric Wimborne Minster, salu-tations!

ARCTIC SUNDIALDear EPE,

I was horrified to read the fol-lowing comment in the MusicalSundial project of May ’99: “whoin their right mind is going to belooking at sundials at 4 a.m.?’’

But what about your faithfulreaders in Artic Climes, where thesun shines for 24 hours a day forsix months of the year. I feel thata Letter to the Times is in order.

(We know who he is and shallnot give him the pleasure of

naming him)!

Editor Mike’s response to thethreat is that the publicity woulddo us good! Yours truly, a Midlan-der born and (un?)bred, articu-

lates that he did not mean toexclude those who live North ofthe Watford Gap!

CENTURY BUGDear EPE,

Now that the general publichas adopted the phrase“Millennium Bug”’, maybe it’stoo late to tell everyone it shouldactually be called the “CenturyBug’’! If technological historyhad been shifted by a multiple of100 years in either direction,then we would still have thesame fears in changing the yearfrom 99 to 00. The problemwould still be apparent if wewere now in the 1890s of2090s.

Perhaps it was named bythe same person who labeledthe American Cold War deter-rent as “Star Wars” when therewere no stars involved at all!Just a blue-green planet!

Richard Wilkinsonvia the Net

The Millennium referenceinspires my imagination more,perhaps, than the Centurywould. Whilst, we are awarethat the whole concept of theMillennium change leaves somepeople utterly uninterested, itseems that society in generaljust loves celebrating anniver-saries, so why not this one? Ilook forward to visiting theDome, whatever the cost.

Incidentally, it’s amusing tosee how the word Millennium isspelt wrongly in so many places(we’ve done so as well). Aflower shop sign I saw recentlyin Jersey stating “Order yourMinnellium flowers now’’, wasespecially entertaining!

But, no stars? There werethousands of stars amongstthe Generals who were all offer-ing their 10 (billion) cents worthof input!

MILLENNIUM SOLUTIONDear EPE,

A friend sent this advice tome and I thought it worth pass-ing on: if your VCR doesn’t workin the year 2000, do not throw itaway, set it on year 1972 be-cause the days will be the sameas year 2000!

Lloyd Kirkvia the Net

We too pass it on (butuntested)!

RINGING PRAISEDear EPE,

The MIDI Handbells project(May ’99) is great! I have an in-terest in percussion and so Ihave changed the project a littleto make a MIDI drum kit. I havealtered the PIC program to useMIDI channel 10 (drum channel)and to use different notes (onefor cymbal, one for snare drum,etc). Also, instead of the“handbells” I am using metalpads connected to resistors R1to R11 and metal drum sticksconnected to +V. When a pad ishit, +V is connected via a resis-tor to the appropriate pin of thePIC.

Graeme Yeovia the Net

We like to hear that peopleare making use of design ideasin order to achieve their “ownthing”. This is yet another way inwhich readers benefit from our

5HDGRXW

Page 87: EPE_08-1999

EPE Online, August 1999 - www.epemag.com - 859

pages being shown alternativeways of doing things and thenadapting the ideas.

A TOWSON THANKS!Dear EPE,

I picked up my first copy ofEPE at my local store here inTowson, USA. I want to let youknow that I think your magazine isterrific! The articles are interest-ing, well written, page layout isclear, schematics detailed. I par-ticularly like the large space allo-

cated for the parts list, which isin stark contrast to the almostafter-thought like approach seenin some US periodicals.

Keep up the great job! Con-sider me another fan across thebig pond.

R. SafferyTowson, USA

Consider yourself well andtruly welcomed by the EPE andEPE Online teams!

5HDGRXW