1994 - ELEKTOR DVD 1990-1999cdn.eleinfo.ir/el1990-1999/pdf/1994/e94c038.pdf · about 0.15 V....

5
PROXIMITY DETECTOR One ti ny integrated circuit and a handful of standard components allow you to build a multi-purpose proximity switch. The circuit can be used as a hidden latch as part of a burglar alarm, or, in a more playful way, as an electronic cat door. Design by J. Bosman T HE heart of the circuit is formed by a TCAlO5 integrated whjch con- tarne. among others, a threshold swttch. The IC is housed tn a 6-pin DIP enclosure. It is specifically destgned fOT use in proxtmity switches. light barriers and other contact1ess swttch- ing deviees. Advan tages of the TCAI05 include a wide vollage range (4.5 V to 30 V). a Iarrly large output current ca- pactty (50 rrtA}, and TTL compatibtltty. The internal structure of the TCA105 ts gtven in Fig. 1. At the left we find the input stage. whtch ts inter- esting because inputs 1 and 2 are formed by the base and emitter of the first transistor. Next comes a kind of double differential amplifier which, to- gether with tts surroundtng compo- nents, Iorrns the actual threshold comparator. Then follow a double- crntttcr transistor and an output cir- cuit which consists of two complernentary transistors. The fact that the lC can be tnggered by direct voltages creates many appli- cations. A voltage monitor, for In- stance, is easily produced by connecting the voltage to be measured to pins 2 and 3, via a voltage divtder. and connecüng two LEDs directly to the outputs, ptns 4 and 5. The LEDs then indicate whether the voltage ts over or under the set threshold. Anothcr example is a light-controlled switch: stmply connect the input pins to a phototransistor. Undoubtedly the TeAl05 can be used for many more swttch-hlce functions based on direct voltages. However, a special feature of the JC is tts ability to process alternat- ing input voltages also. The Input stage of the IC may be turned tnto an oscillator, and that ts the dcstgn prtn- ctple used for the present application. an tnducttve swttch. Inductive coupling As shown by the circuit diagram in Fig. 2, an LC tuned clrcu it is con- nected to the input pins, rather than a direct voltage source. The circuit con- sists of L la and C 2 , and is tuned to about 1 MHz. An oscillator is created by extending L 1a wtth a coupling in- ductor, Llb. Referring back to Ftg. I, the oscillation condition is saüsfted by coupling the emttter of the input tran- sistor back to the base via a tap on the inductor. As long as the input stage oscillates, ICj is in a kind of 'flxed' state. Output I (ptn 4) is then low, and out- put 2 (prn 5) Is high. That ehanges if the oscillator voltage disappears, or IS stgnifrcantly reduced. That can be brought about, of course, by inserting a switch in sertes with Cl, but that de- feats the purpose of the ctrcurt (after aII, we want the swttch to operate quasi-automatically). The atm is, evt dently, to control the oscillation volt- age without breaking any links in the circuit. The solution 15 given by mutual in- ductance. By holding a piece of metal near the oscillator inductor, the ehangtng magnelie field causes eddy currents in the metal. The energy needed for thts to happen is drawn from the tuned circuit, causing the 05- cillator voltage to be damped consider- ably. When the damping exeeeds a certatn level, the outputs of IC I toggle. Consequently, pin 4 goes high, and pin 5, low. The threshold at whtch this happens lies at about 0.35 V. The out- puts do not toggle agatn unW a level of 0.5 V ts reached, i.e., the hysteresis is ELEKTOR ELECTRONICS DECEMBER 1994

Transcript of 1994 - ELEKTOR DVD 1990-1999cdn.eleinfo.ir/el1990-1999/pdf/1994/e94c038.pdf · about 0.15 V....

Page 1: 1994 - ELEKTOR DVD 1990-1999cdn.eleinfo.ir/el1990-1999/pdf/1994/e94c038.pdf · about 0.15 V. Retuming to Ftg. 1, that hysterests Is created by a feedback line between the threshold

PROXIMITY DETECTOROne ti ny integrated circuit and a handful of standard components allow you to

build a multi-purpose proximity switch. The circuit can be used as a hidden latchas part of a burglar alarm, or, in a more playful way, as an electronic cat door.

Design by J. Bosman

THE heart of the circuit is formed bya TCAlO5 integrated whjch con-

tarne. among others, a thresholdswttch. The IC is housed tn a 6-pin DIPenclosure. It is specifically destgnedfOT use in proxtmity switches. lightbarriers and other contact1ess swttch-ing deviees. Advan tages of the TCAI05include a wide vollage range (4.5 V to30 V). a Iarrly large output current ca-pactty (50 rrtA}, and TTL compatibtltty.

The internal structure of theTCA105 ts gtven in Fig. 1. At the leftwe find the input stage. whtch ts inter-esting because inputs 1 and 2 areformed by the base and emitter of the

first transistor. Next comes a kind ofdouble differential amplifier which, to-gether with tts surroundtng compo-nents, Iorrns the actual thresholdcomparator. Then follow a double-crntttcr transistor and an output cir-cuit which consists of twocomplernentary transistors.

The fact that the lC can be tnggeredby direct voltages creates many appli-cations. A voltage monitor, for In-stance, is easily produced byconnecting the voltage to be measuredto pins 2 and 3, via a voltage divtder.and connecüng two LEDs directly tothe outputs, ptns 4 and 5. The LEDs

then indicate whether the voltage tsover or under the set threshold.Anothcr example is a light-controlledswitch: stmply connect the input pinsto a phototransistor. Undoubtedly theTeAl05 can be used for many moreswttch-hlce functions based on directvoltages. However, a special feature ofthe JC is tts ability to process alternat-ing input voltages also. The Inputstage of the IC may be turned tnto anoscillator, and that ts the dcstgn prtn-ctple used for the present application.an tnducttve swttch.

Inductive couplingAs shown by the circuit diagram inFig. 2, an LC tuned clrcu it is con-nected to the input pins, rather than adirect voltage source. The circuit con-sists of Lla and C2, and is tuned toabout 1 MHz. An oscillator is createdby extending L1a wtth a coupling in-ductor, Llb. Referring back to Ftg. I,the oscillation condition is saüsfted bycoupling the emttter of the input tran-sistor back to the base via a tap on theinductor.

As long as the input stage oscillates,ICj is in a kind of 'flxed' state.Output I (ptn 4) is then low, and out-put 2 (prn 5) Is high. That ehanges ifthe oscillator voltage disappears, or ISstgnifrcantly reduced. That can bebrought about, of course, by insertinga switch in sertes with Cl, but that de-feats the purpose of the ctrcurt (afteraII, we want the swttch to operatequasi-automatically). The atm is, evtdently, to control the oscillation volt-age without breaking any links in thecircuit.

The solution 15 given by mutual in-ductance. By holding a piece of metalnear the oscillator inductor, theehangtng magnelie field causes eddycurrents in the metal. The energyneeded for thts to happen is drawnfrom the tuned circuit, causing the 05-

cillator voltage to be damped consider-ably. When the damping exeeeds acertatn level, the outputs of ICI toggle.Consequently, pin 4 goes high, andpin 5, low. The threshold at whtch thishappens lies at about 0.35 V. The out-puts do not toggle agatn unW a level of0.5 V ts reached, i.e., the hysteresis is

ELEKTOR ELECTRONICS DECEMBER 1994

Page 2: 1994 - ELEKTOR DVD 1990-1999cdn.eleinfo.ir/el1990-1999/pdf/1994/e94c038.pdf · about 0.15 V. Retuming to Ftg. 1, that hysterests Is created by a feedback line between the threshold

about 0.15 V. Retuming to Ftg. 1, thathysterests Is created by a feedback linebetween the threshold switch and theinput, where input 1 (pin 2) is pulleddown virtually to the ground level by atransistor. Consequently. the level atthis input is lower still than as a resultof the demptng. The upshot is that anextra high voltage is needed to get thesystem going agam.

At this point we seem to havereached our goal already. Evidently,something has to be done about theswitching output of ICj, but the switchcan be 'opera ted' , in principle, sunplyby holding a plece of metal close to thepick-up coi!. Although the coil will in-duce eddy currents into nearly everytype of meta!. there will be marked dif-ferences in the amount of energydrawn frcm the oscil1ator coil. Irongives the largest damping because ithas large hysteresis lasses in additionto eddy lasses. That is easily notedfrom the detection distance. While acopper bar must actually be pressedagainst the tnductor for the swttch towork, an iron bar of similar stze is de-tected at a distance of a few mHlime-tres.

Switching detectorTwo functrons are yet to be realized atthis stage. Ftrstly. same means has tobe provided to prevent the switchbetng actuated erroneously. Secondly.the actuated state of the swttch has tobe retained lang enough for, say, adoor to be opened to let somebady in.All this boils down to delaytng andlengthentng the swttch pulse suppliedby ICj.

Since one output is sufftctent for thepresent purpose, onIy pin 5 IS used:pin 4 of lCI is simply not connected. Apull-up resistor, RJ, is used to ensurethat the output is high as lang as nometal object is detected. Next, theswttchtng signal is fed through a low-pass filter, R2-C3, which Introduces adelay of about 0.1 second. Ttus delayIS effective against accidental swttch-ing acttons. and also reduced the riskof noise and spurious pulses trtggertngIC2·

IC2 has a far less original characterthan ICj• The TLC555 used here is anold faithful. It ts wired as a monostablemultivibrator and serves to lengthenthe switching pulses. Each switchingpulse applied to the trtgger inputcauses a fixed 'high' penod at the Qoutput of JC2. The length of thts pertodts determined by the Re time Intro-duced by network R,-R,-C5. The corn-ponent values shown result in anadjustable period between one and tenseconds. Langer times are posstble bytncreastng the value of C5.

The Q output of IC2 drives MOSFET

ELEKTOR ELECTRONICS DECEMBER 1994

PROXIMITY DETECTOR

.Ub,(6~::::::::::~:::;::::::~::;:::::::::~::::::::~----1TCA105

Fig.1. Internal diagram of the TCA105 integrated threshold switch.

+ 10V ++BUZI0

•Kl

1N4001

8

e i'i0'5

IC22

TA OUT 3TLe

6555

TMR...

G 50 6

C, .Ub

OUT1 5'N'

202 ICILlb TCAI05

3'N2 OUT2 4

L'. -Ub,

TCAI05 +12 ... 18V

4 OUT1 0

940108 - 12

Fig. 2. The complete circuit has only two integrated circuits. It is best powered by a cheapmains adapter hooked up to K2.

Page 3: 1994 - ELEKTOR DVD 1990-1999cdn.eleinfo.ir/el1990-1999/pdf/1994/e94c038.pdf · about 0.15 V. Retuming to Ftg. 1, that hysterests Is created by a feedback line between the threshold

GENERALINTEREST

Fig. 3. The miniature peB gives the proximity detector a 'matchbox' size (peB not availableready-made through the Readers Services).

Tl. which. depending on the appltca-tton. actuates a relay or a magnettebolt via PCB connector Kl_ Diode D]serves to suppress the back-e.ffi.f.generated by the relay cotl.

The circuit ts best powered by a

Fig. 4. Only half a pot core is used to makeinductor L 1. The -double-section bobbin iscut in two with a sharp hobby knife.

ready-made 12-V d.c. mains adaptor,which is connected to K2- The choice ofthe adaptor ts uncritical. although youmust keep in mtnd that it also powersthe relay or the magnette bolt. Same ofthese may draw a few hundred milli-amps! Since most mains adaptorshave a fairly wide spread on their out-put voltage, the lC supply voltage isltrruted to 10 V by means of a currentlimiting reststör. Ra, and a zener diode,D I. Capa citor Cs functtons as a reser-voir device, while C7 elirninates noiseand htgh-Irequency interference.

Etching and windingThe artwerk desrgned for the printedcircutt board ts given in Fig. 3.Unfortunately, this board is not avail-able ready-made through the ReadersServices. so you have to produce ityourself. or have tt produced. lf youthink that 1Stoo much work, considerbutldtng the ctrcutt on a piece of vero-board. Stnce there are a handful ofcomponents. that should not be toodifficult.

Inductor LI is a horne-made type.Fortunately. tt is fairly easy to make. Asmall pot core is used wtth a diameterof 14 mm [see par-ts list). Only half thedevice is used, because LI may not becompletely screened, and because the

COMPONENTS LIST

Resistors:R, = 10kQR,;R, = 100kQR, = 390QP, = 1MQ preset H

Capacitors:C, = 2nF2 MKT*C, = 820pF ceramicC, = l~F MKT*C, = 10nFC5 = 10~F 16V radialC, = 100~F 16V radialC, = 100nF Sibatit*

Semiconductors:D, = lN4001D, = 10V 400mW zener diodeT, = 8UZ10'IC, = TCA105*IC, = TLC555

Miscellaneous:K,;K, = 2-way PC8 terminal block.L, = pot core: 865541T400A48*;bob bin: 8655428T2*;mounting set: 865545810*;core material: 848. AL=400nH.outside diameter: 14.3mm;bobbin diameter: 6mm;height of half bobbin: 4.25mm.Enamelled copper wire O.3mm diaISWG30).

* Siemens Components. UK distribu-tar: ElectroValue LId. Tel. 101748)442253. fax: 101784) 460320.

metal object to be detected musl comeas elose as possible to the inductor.For this reason, the two-section bob-bin has to be cut in two [see Fig. 4).

The inductor is wound on the halfthat remains. 1t consists of 42 tUTI1SofO.3-mm [SWG30) enamelled cop perwire, with a tap at 40 turns. The in-ductor must be wound neatly. or thetotal amount of wire will not fit tnto theavailable room. and the Q [quality) fac-tor will be reduced. Next, the core isftxed on to the base plate wtth a dropof glue. and the inductor wires areconnected to the base ptns as shownin Fig. 5. The drawing mayaIso beused as a guide to mounting the potcore assembly on to the board.

The photograph in Fig. 7 shows theftntshed prototype of the proximity de-tector, complete wtth the pick-up coil.The board has two additional connect ~ing potnts for LI, so that the inductormay be mounted at the copper sidealso (note that it must be turned 1800

ELEKTOR ELECTRONICS DECEMBER 1994

Page 4: 1994 - ELEKTOR DVD 1990-1999cdn.eleinfo.ir/el1990-1999/pdf/1994/e94c038.pdf · about 0.15 V. Retuming to Ftg. 1, that hysterests Is created by a feedback line between the threshold

PROXIMlTY DETECTOR

---~-::~~~---

940108·13a

Fig.6. Suggested construction 01 an automatically controlled lid.

Fig.5. Showing how the inductor, consistingof 40 and 2 turns, is connected and mountedon 10 the printed circuit board.

since the connections remain thesame).

Practical useCreative constructors will have plentyof appltcations in mtnd Ior the proxim-ity switch. One of these could be a catdoor which opens automatically whenthe cat rubs tts (metallized) collaragatrist the pick-up cotl. We have rea-sons to dou bt whether that wouldwork, however, stnce It requires quitea bit of traintng of the cat. The mostobvious application of the circu it issome kind of door open er. with the ctr-cutt fitted in an tngeruously hidden ID-eation. In all cases, the oscillator coühas to be easily accessible from theoutside, since the detection dtstance Israther small. In most cases, LI is bestmoun ted at the copper side of theboard, so that tt rests flat agatnst thcinside of the enclosure. The enclosure.finally, must be made of plastic. The

material must not be too thick, elsethe maximum detection distance willgo down.

Fig.7. Completed prototype of the proximityswitch.

ELEKTOR ELECTRONICS DECEMBER 1994

(940108)

Page 5: 1994 - ELEKTOR DVD 1990-1999cdn.eleinfo.ir/el1990-1999/pdf/1994/e94c038.pdf · about 0.15 V. Retuming to Ftg. 1, that hysterests Is created by a feedback line between the threshold

GENERAL INTEREST

Fig. 3. The miniature PCB gives the proximity detector a 'match box' size (PCB not availableready-made through the Readers Services).

Tl, which, depending on the applica-tion, actuates a relay or a magnettebolt via PCB connector K]. Diode D]serves to suppress the back-e.m.f,genera ted by the relay coil.

The circuit is best powered by a

Fig. 4. Only half a pot core is used to makeinductor L1. The 'doubte-sectton bobbin iscut in two with a sharp hobby knife.

ready-rnade 12-V d.c. mains adaptor,which is connected to K2. The choice ofthe adaptor is uncritical, although youmust keep in mind that it also powersthe relay or the magnetic bolt. Some ofthese may draw a few hundred milli-amps! Since most mains adaptorshave a fairly wide spread on their out-put voltage, the IC supply voltage islimited to 10 V by means of a currentlimiting resistor, Ra, and a zener diode,D]. Capacitor C6 functions as a reser-voir device, while C7 eliminates notseand high-frequency interference.

Etching and windingThe artwork designed for the printedcircuit board is given in Fig. 3.Unfortunately, this board is not avail-able ready-rnade through the ReadersServices, so you have to produce ityourself, or have it produced. If youthink that is too much work, considerbuilding the circuit on a piece of vero-board. Since there are a handful ofcomponents, that should not be toodifficult.

Inductor LI is a home-rnade type.Fortunately, it is fairly easy to make. Asmall pot core is used with a diameterof 14 mm (see parts list). Only half thedevice is used, because LI may not becompletely screened, and because the

COMPONENTS LIST

Resistors:R, = 10kQR2;R3 = 100kQR4 = 390QP, = 1MQ preset H

Capacitors:C, = 2nF2 MKT*C2 = 820pF ceramicC3 = 1~F MKT*C4 = 10nFC5 = 1O~F 16V radialC6 = 100~F 16V radialC7 = 100nF Sibatit*

Semiconductors:0, = 1N4001O2 = 10V 400mW zener diodeT, = 8UZ10*IC, = TCA105*IC2 = TLC555

Miscellaneous:K,;K2 = 2-way PC8 terminal block.L, = pot core: 865541T 400A48*;bobbin: 8655428T2*;mounting set: 865545810*;core material: 848, AL=400nH.outside diameter: 14.3mm;bobbin diameter: 6mm;height of half bobbin: 4.25mm.Enamelled copper wire 0.3mm dia(SWG30).

* Siemens Components. UK distribu-tor: ElectroValue Ltd. Tel. (01748)442253, fax: (01784) 460320.

metal object to be detected must comeas close as possible to the inductor.For this reason, the two-section bob-bin has to be cut in two (see Fig. 4).

The inductor is wound on the halfthat remains. It consists of 42 turns of0.3-mm (SWG30) enamelled cop perwire, with a tap at 40 turns. The in-ductor must be wound neatly, or thetotal amount of wire will not fit into theavailable room, and the Q (quality) fac-tor will be reduced. Next, the core isfixed on to the base plate with a dropof glue, and the inductor wires areconnected to the base pins as shownin Fig. 5. The drawing mayaIso beused as a guide to mounting the potcore assembly on to the board.

The photograph in Fig. 7 shows thefinished prototype of the proximity de-tector, complete with the pick-up coil.The board has two additional connect-ing points for LI, so that the inductormay be mounted at the copper sidealso (note that it must be turned 1800

ELEKTOR ELECTRONICS DECEMBER 1994