Electronics Projjects1

65
CIRCUIT IDEAS ELECTRONICS FOR YOU APRIL 2003 S.C. DWIVEDI H ere’s the circuit of a multi-switch input musical doorbell (shown in Fig.1). The circuit is built around the popular and less expensive quad D-latch CD4042B (IC1). When switch S6 is pushed to ‘on’ condition, the circuit gets +9V and the four data inputs (D1 through D4) of ICI are in low state because these are tied to ground via resistors R1 through R4. Polarity input (POL) pin 6 of IC1 is MULTI-SWITCH DOORBELL WITH INDICATORS T.K. HAREENDRAN also pulled down by resistor R5. Clock in- put (pin 5) of the quad D-latch is wired in normally low mode and hence all the four outputs (Q0 through Q3) have the same states as their corresponding data inputs. As a result, LED1 through LED4 are in off condition. There are four switches fitted at four different doors/gates outside the home and a monitoring panel (as shown in Fig. 2) in the common room of the home. If any switch is pressed by a visitor (for example, Fig. 1: Multi-switch doorbell with indicators Fig. 2: Suggested panel layout of musical doorbell switch S1 at door 1), pins 2 and 4 of IC1 go high. Simultaneously, pin 3 to IC1 (Q0 out- put) goes low and LED1 starts glowing to indicate that switch S1 is pressed by someone. Next, output pin 13 of the dual 4-in- put NOR gate (IC2, here wired as a single 4-input OR gate) goes high to forward bias buzzer- driver transistor T1 via resistor R10. The final result is a soft and pleasing musical bell, which lasts until reset switch S5 is pressed by the owner. For this latching arrange- ment , output pin 13 of IC2 from the NOR gate is fed back to the clock input of IC1. The circuit costs around Rs 100.

description

good

Transcript of Electronics Projjects1

Page 1: Electronics Projjects1

C I R C U I T I D E A S

ELECTRONICS FOR YOU APRIL 2003

S.C. DWIVEDI

Here’s the circuit of a multi-switchinput musical doorbell (shown inFig.1). The circuit is built around

the popular and less expensive quadD-latch CD4042B (IC1). When switch S6is pushed to ‘on’ condition, the circuit gets+9V and the four data inputs (D1 throughD4) of ICI are in low state because theseare tied to ground via resistors R1 throughR4. Polarity input (POL) pin 6 of IC1 is

MULTI-SWITCH DOORBELLWITH INDICATORST.K. HAREENDRAN also pulled down by resistor R5. Clock in-

put (pin 5) of the quad D-latch is wired innormally low mode and hence all the fouroutputs (Q0 through Q3) have the samestates as their corresponding data inputs.As a result, LED1 through LED4 are in offcondition.

There are four switches fitted at fourdifferent doors/gates outside the home anda monitoring panel (as shown in Fig. 2) inthe common room of the home. If anyswitch is pressed by a visitor (for example,

Fig. 1: Multi-switch doorbell with indicators

Fig. 2: Suggested panel layout of musicaldoorbell

switch S1 at door 1), pins 2 and 4 of IC1go high.

Simultaneously, pin 3 to IC1 (Q0 out-put) goes low and LED1 starts glowing to

indicate that switchS1 is pressed bysomeone.

Next, output pin13 of the dual 4-in-put NOR gate (IC2,here wired as asingle 4-input ORgate) goes high toforward bias buzzer-driver transistor T1via resistor R10.

The final result isa soft and pleasingmusical bell, whichlasts until resetswitch S5 is pressedby the owner. Forthis latching arrange-ment , output pin 13of IC2 from the NORgate is fed back tothe clock input ofIC1.

The circuit costsaround Rs 100.

Page 2: Electronics Projjects1

C I R C U I T I D E A S

ELECTRONICS FOR YOUAPRIL 2003

SANI THEO

SONG NUMBERDISPLAYPRABHASH K.P.

Here’s a circuit to display the song number in an audiosystem for quick reference to songs. It also serves thepurpose of an extra visual indicator in modern audio

systems.When the power is switched on, the power-on-reset cir-

cuit comprising 3.3k resistor R20 and 1µF, 25V capacitor C6resets the counters, showing ‘00’ in the display. One can alsoreset the display to zero at any time by pressing reset switchS1.

When the first song starts playing, the output pins of IC1(KA2281) go low and capacitor C5 starts charging. This for-ward biases transistor T1 and hence the input to IC3 at pin 1goes to high state. As a result, the output of the counter goesto the next state, showing 01 on the display. The counterremains in this state until the song is completed.

During the time gap before the next song starts playing,capacitor C5 discharges. After discharging of capacitor C5,the input to IC3 becomes low again. When the song starts,the process described above is repeated and the display shows02. You can adjust VR3 to change the time gap setting. Thismust be set such that the circuit doesn’t respond to shortgaps, if any, within a song and responds only to long gapsbetween different songs.

Transistor T2 helps in gap-delay adjustment. The inten-sity of LED11 diminishes when a song is completed and thecounter is ready to accept the next pulse.

Connect the input to the preamp output or equaliser out-put of the audio system. Adjust VR1 and VR2 to get thecorrect audio-level indication. If you are already using KA2281for audio-level indication, just connect diodes D1 and D2 asshown in this circuit.

Note that the counter counts the songs by detecting thegaps. Therefore any long gap within a song may cause falsetriggering and the display will also be incremented. However,as this is very unlikely to happen, the circuit shows thecorrect song number almost all the time.

The circuit costs around Rs 100.

Page 3: Electronics Projjects1

C I R C U I T I D E A S

ELECTRONICS FOR YOUNOVEMBER 2002

ASHOK K. DOCTOR

A flashing beacon has many uses. Itcan be employed as a distress sig-nal on highways or as a direction

pointer for parking lots, hospitals, hotels,etc. Here we present a flashing beaconthat uses well-known regulator IC LM317T.As LM317T regulator can deliver more than1 amp. A small 12V, 10W bulb with ahigh-quality reflector can serve as a goodvisible blinker.

A 12-15V, 1A DC supply is connectedto the input pin of the IC. A 12V, 10Wbulb and a combination of resistors andcapacitors are connected between the out-put pin and ADJ pin of the IC as shown in

S.C. DWIVEDI

the figure. The IC is pro-vided with an aluminiumheat-sink to dissipate theheat generated while deliv-ering full current. Since theIC has an inbuilt switch-oncurrent limiter, it extendsthe bulb life.

For the shown valuesof resistors and capacitors,the bulb flashes at approxi-mately 4 cycles per second.The number of flashes de-pends on the charge-dis-charge time of the capaci-tors. Different values of resistors and ca-pacitors can be used to increase or de-

FLASHING BEACON

crease the number of flashes.This circuit costs around Rs 50.

Page 4: Electronics Projjects1

C I R C U I T I D E A S

ELECTRONICS FOR YOUDECEMBER 2002

INTRUDER RADIO ALERT SYSTEMSUNIL KUMAR

DAVID NASH PIOUS

Consider a situation where a burglarhas entered your house and snappedthe telephone wires, leaving you

with no means of communication with theoutside world. In such an emergency, youwill find this intruder alarm to be veryhandy. It transmits a prerecorded emer-gency message repeatedly for reception byan FM receiver.

The message containing address, geo-graphical location, name, etc is recordedonto a chip. The prerecorded message canthen be transmitted repeatedly with thehelp of an FM transmitter, in the hopethat some noble soul will hear it and in-form the police about the incident.

The circuit comprises a sound record-ing-and-playback chip (UM5506BH). Thischip consists of a 96kbit SRAM and canrecord up to six seconds of audio. (Fordetails, refer ‘Mini Voice Processor’ circuitpublished in April 2000 issue of EFY.) Af-ter the required message has been re-corded, it is passed to a low-power, VHFFM transmitter wired around BC547 and2N2369 transistors. The range of this trans-

mitter is 60 to 100metres using a 40-70cmlong wire as an antenna.

The major advantageof this circuit is its lowpower consumption. Theauthor operated it on 3Vbutton cells (Maxell CR2032, CR 2025, etc usedin digital diaries). Totransmit the prerecordedmessage, the play but-ton is pressed repeatedly.

The transmitted message can be heard overthe FM receiver.

A possible modification, though it haslegal complications, is to vary the coil in-ductance such that the transmission is onpolice band, thus alerting the police forquick help. Even the need of repeatedlypressing play button can be obviated byconfiguring an astable multiviberator (us-ing IC 555 timer) to trigger IC UM5506BHevery six seconds so that the message isplayed repeatedly.

This circuit costs around Rs 200.Fig. 1: Block diagram of the intruder radio alert system

Fig. 2: Circuit diagram of intruder radio alert system

Page 5: Electronics Projjects1

C I R C U I T I D E A S

ELECTRONICS FOR YOUNOVEMBER 2002

RUPANJANAAUTOMATED TRAFFIC SIGNALCONTROLLER

This automated traffic signal control-ler can be made by suitably pro-gramming a GAL device. (For GAL

programming you may refer to the con-

struction project published on page 52 inEFY’s September issue.) Its main featuresare:

1. The controller assumes equal trafficdensity on all the roads.

2. In most automated traffic signals thefree left-turn condition is provided through-out the entire signal period, which posesdifficulties to the pedestrians in crossingthe road, especially when the traffic den-

VIKRAM BANERJEEMRINAL KANTI MANDALDR ANIRUDHA GHOSAL

sity is high. This controller allows the pe-destrians to safely cross the road duringcertain periods.

3. The controller uses digital logic,which can be easily implemented by us-ing logic gates.

4. The controller is a generalised oneand can be used for different roads with

slight modification.5. The control can also be exercised

manually when desired.The time period for which green, yel-

low, and red traffic signals remain ‘on’(and then repeat) for the straight movingtraffic is divided into eight units of 8seconds (or multiples thereof) each. Fig.1 shows the flow of traffic in all permis-sible directions during the eight time units

of 8 seconds each. For the left- and right-turning traffic and pedestrians crossingfrom north to south, south to north, eastto west, and west to east, only green andred signals are used.

Table I shows the simultaneous statesof the signals for all the traffic. Each rowrepresents the status of a signal for 8

seconds. As can be observed from thetable, the ratio of green, yellow, and redsignals is 16:8:40 (=2:1:5) for the straightmoving traffic. For the turning traffic theratio of green and red signals is 8:56(=1:7), while for pedestrians crossing theroad the ratio of green and red signals is16:48 (=2:6).

In Table II (as well as Table I) X, Y,and Z are used as binary variables to

Fig. 1: Flow of traffic in all possible directions

TABLE ISimultaneous States of Signals for All the Traffic

X Y Z B-C/B-G B-E D-E/D-A D-G F-G/F-C F-A H-A/H-E HC WALK WALKLt/Rt St Lt/Rt St Lt/Rt St Lt/Rt St (N-S)/(S-N) (E-W)/(W-E)

0 0 0 R R R R G G R R R R0 0 1 R G R R R G R R G R0 1 0 R G R R R Y R R G R0 1 1 G Y R R R R R R R R1 0 0 R R R R R R G G R R1 0 1 R R R G R R R G R G1 1 0 R R R G R R R Y R G1 1 1 R R G Y R R R R R R

Page 6: Electronics Projjects1

C I R C U I T I D E A S

ELECTRONICS FOR YOU NOVEMBER 2002

depict the eight states of 8seconds each. Letters Athrough H indicate the leftand right halves of the roadsin four directions as shownin Fig. 1. Two letters with adash in between indicate thedirection of permissiblemovement from a road.Straight direction is indicatedby St, while left and rightturns are indicated by Lt andRt, respectively.

The Boolean functionsfor all the signal conditionsare shown in Table II.The left- and the right-turnsignals for the traffic havethe same state, i.e. both arered or green for the sameduration, so their Booleanfunctions are identical andthey should beconnected to the same con-

Fig. 2: The circuit diagram for traffic light signalling

TABLE IIBoolean Functions for All the Signal Conditions

Signal Reference Boolean functions

Green B-C(Lt)/B-G (Rt) X’YZGreen B-E (St) XYZ’+X’Y’ZRed B-E (St) X+Y’Y’Z’Yellow B-E (St) X’YZGreen D-E (Lt)/D-A (Rt) XYZGreen D-G (St) XYZ’+XY’ZRed D-G (St) X’+XY’Z’Yellow D-G (St) XYZGreen F-G(Lt)/F-C (Rt) X’Y’Z’Green F-A (St) X’Y’Red F-A (St) X+X’YZYellow F-A (St) X’YZ’Green H-A (Lt)/H-E (Rt) XY’Z’Green H-C (St) XY’Red H-C (St) X’+XYZYellow H-C (St) XYZ’Green Walk (N-S/S-N) X’YZ’+X’Y’ZGreen Walk (E-W/W-E) XYZ’+XY’ZNote. X’, Y’, and Z’ denote complements of variables X, Y,

and Z, respectively.

trol output.The circuit diagram for realising these

Boolean functions is shown in Fig. 2.Timer 555 (IC1) is wired as an astablemultivibrator to generate clock signal forthe 4-bit counter 74160 (IC2). The timeduration of IC1 can be adjusted by vary-ing the value of resistor R1, resistor R2,or capacitor C2 of the clock circuit. The‘on’ time duration T is given by the fol-lowing relationship:

T = 0.695C2(R1+R2)IC2 is wired as a 3-bit binary counter

by connecting its Q3 output to reset pin 1via inverter N1. Binary outputs Q2, Q1,and Q0 form variables X, Y, and Z, re-spectively. These outputs, along with theircomplimentary outputs X’, Y’, and Z’,respectively, are used as inputs to the restof the logic circuit to realise various out-puts satisfying Table I.

You can simulate various traffic lightsusing green, yellow, and red LEDs andfeed the outputs of the circuit to respec-

tive LEDs viacurrent-limit-ing resistors of470 ohms eachto check theworking of thecircuit. Here,for turning traf-fic and pedes-trians crossingthe road, onlygreen signal ismade avail-able. It meansthat for the re-maining periodthese signalshave to betreated as ‘red’.

In practice,the outputs ofFig. 2 shouldbe connectedto solidstate re-lays to operateh i g h - p o w e rbulbs. Further,if a particularsignal condi-tion (such asturning signal)is not appli-cable to agiven road, theoutput of thatsignal condi-tion should be

Page 7: Electronics Projjects1

C I R C U I T I D E A S

ELECTRONICS FOR YOUNOVEMBER 2002

#include<stdio.h>#include<conio.h>#define TRUE 1#define False 0

int not(int x);int or2(int x,int y);int or3(int x,int y,int z);int and2(int x,int y);int and3(int x,int y,int z);int main(void){int a,b,c;int seq,green_bl,green_bs,red_bs,yellow_bs;int green_dl,green_ds,red_ds,yellow_ds;int green_fl,green_fs,red_fs,yellow_fs;int green_hl,green_hs,red_hs,yellow_hs;int walk_ns,stop_ns;int walk_ew,stop_ew;

clrscr();printf(“ SIG-B SIG-D SIF-F SIG-HWALK(N-S) WALK(E-W)\n”);printf(“G G R Y G G R Y G G R Y G G R YG R G R\n”);

for(seq=0;seq<8;seq++){

c=(seq&1);b=(seq&2)>>1;a=(seq&4)>>2;green_bl=and3(not(a),b,c);green_bs=or2(and3(not(a),b,not(c)),and3(not(a),not(b),c));red_bs=or2(a,and3(not(a),not(b),not(c)));yellow_bs=and3(not(a),b,c);green_dl=and3(a,b,c);green_ds=or2(and3(a,b,not(c)),and3(a,not(b),c));red_ds=or2(not(a),and3(a,not(b),not(c)));yellow_ds=and3(a,b,c);green_fl=and3(not(a),not(b),not(c));green_fs=and2(not(a),not(b));red_fs=or2(a,and3(not(a),b,c));yellow_fs=and3(not(a),b,not(c));green_hl=and3(a,not(b),not(c));green_hs=and2(a,not(b));red_hs=or2(not(a),and3(a,b,c));yellow_hs=and3(a,b,not(c));walk_ns=green_bs;stop_ns=or3(and3(not(a),not(b),not(c)),and3(not(a),b,c),a);walk_ew=green_ds;stop_ew=or3(not(a),and3(a,b,c),and3(a,not(b),not(c)));printf(“%d %d %d %d %d %d %d %d%d %d %d %d %d %d %d %d %d %d%d %d\n”, green_bl,green_bs,red_bs,yellow_bs, green_dl,green_ds,red_ds,yellow_ds, green_fl,green_fs,red_fs,yellow_fs, green_hl,green_hs,red_hs,yellow_hs,

walk_ns,stop_ns, walk_ew,stop_ew); getch(); } return; } int and2(int x,int y) { return(x && y); } int and3(int x,int y,int z) { return(x && y && z); } int or2(int x,int y) { return(x || y); } int or3(int x,int y,int z) { return(x || y || z); } int not(int x) { return(!x); }

TRAFFIC.C

Table IIIExecution Results of Software Program

SIG-B SIG-D SIF-F SIG-H WALK(N-S) WALK(E-W)

G G R Y G G R Y G G R Y G G R Y G R G R0 0 1 0 0 1 0 0 1 1 0 0 0 0 1 0 0 1 0 10 1 0 0 0 1 0 0 0 1 0 0 0 0 1 0 1 0 0 10 1 0 0 0 1 0 0 0 0 0 1 0 0 1 0 1 0 0 11 0 0 1 0 1 0 0 0 0 1 0 0 0 1 0 0 1 0 10 0 1 0 0 1 0 0 0 0 1 0 1 1 0 0 0 1 0 10 0 1 0 1 0 0 0 0 0 1 0 0 1 0 0 0 1 1 00 0 1 0 1 0 0 0 0 0 1 0 0 0 0 1 0 1 1 00 0 1 0 0 0 1 1 0 0 1 0 0 0 1 0 0 1 0 1Note. The first column under G (green) in each group of four signals indicates the

turn signal, while the next three columns under GRY indicate signal for the straighttraffic.

connectedto greensignal ofthe nextstate (referTable I).

T h etraffic sig-nals canalso becontrolledmanually,if desired.Any signalstate can beestablished

by entering the binary value correspond-ing to that particular state into the parallelinput pins of the 3-bit counter. Similarly,the signal can be reset at any time byproviding logic 0 at the reset pin (pin 1)of the counter using an external switch.

A software program to verify thefunctioning of the circuit using a PCis given below. (Source code and execut-able file will be provided in the nextmonth’s EFY-CD.) When executing the pro-gram, keep pressing Enter key to get thenext row of results. The test results onexecution of the program is shown in TableIII.

This circuit costs around Rs 125.

Page 8: Electronics Projjects1

C I R C U I T I D E A S

ELECTRONICS FOR YOUJULY 2002

This add-on circuit enables remoteswitching on/off of battery-operatedtoy cars with the help of a TV/

video remote control handset operating at30–40 kHz.

When the circuit is energisedfrom a 6V battery, the decadecounter CD4017 (IC2), which isconfigured as a toggle flip-flop, isimmediately reset by the power-on-reset combination of capacitor C3and resistor R6. LED1 connectedto pin 3 (Q0) of IC2 via resistor R5glows to indicate the standby con-dition. In standby condition, dataoutput pin of the integrated infra-red receiver/demodulator(SFH505A or TSOP1738) is at ahigh level (about 5 volts) and tran-sistor T1 is ‘off’ (reverse biased).The monostable wired around IC1is inactive in this condition.

When any key on the remotecontrol handset is depressed, theoutput of the IR receiver momen-tarily transits through low state andtransistor T1 conducts. As a result,the monostable is triggered and ashort pulse is applied to the clockinput (pin 14) of IC2, which takes Q1 out-put (pin 2) of IC2 high to switch on motordriver transistor T2 via base bias resistorR7 and the motor starts rotatingcontinously (car starts running). ResistorR8 limits the starting current.

When any key on the handset is

INFRARED TOY CARMOTOR CONTROLLERT.K. HAREENDRAN

depressed again, the monostable isretriggered to reset decade counter IC2 andthe motor is switched off. Standby LED1glows again.

This circuit can be easily fabricated ona general-purpose printed board. After con-struction, enclose it inside the toy car andconnect the supply wires to the battery ofthe toy car with right polarity. Rewire theDC motor connections and fix the IR re-ceiver module in a suitable location, for

example, behind the front glass, and con-nect its wires to the circuit board using ashort 3-core ribbon cable/shielded wire.

Note. Since the circuit uses modu-

lated infrared beam for control function,ambient light reflections will not affect thecircuit operation. However, fluorescenttubelights with electronic ballasts and CFLlamps may cause malfunctioning of thecircuit.

SANI THEO

Page 9: Electronics Projjects1

ELECTRONICS FOR YOU� ❚❚❚❚❚ �JULY 2001

C I R C U I T I D E A S

S.C. DWIVEDI

T his small circuit, based on popu-lar CMOS NAND chip CD4093,can be effectively used for protect-

ing your expensive car audio systemagainst theft.

When 12V DC from the car battery is

applied to the gadget (as indicated byLED1) through switch S1, the circuit goesinto standby mode. LED insideoptocoupler IC1 is lit as its cathode ter-minal is grounded via the car audio (am-plifier) body. As a result, the output atpin 3 of gate N1 goes low and disablesthe rest of the circuit.

Whenever an attempt is made to re-move the car audio from its mounting bycutting its connecting wires, theoptocoupler immediately turns off, as itsLED cathode terminal is hanging. As aresult, the oscillator circuit built around

gates N2 and N3 is enabled and it con-trols the ‘on’/‘off’ timings of the relay viatransistor T2. (Relay contacts can be usedto energise an emergency beeper, indica-tor, car horns, etc, as desired.)

Different values of capacitor C2 givedifferent ‘on’/‘off’ timings for relay RL1 tobe ‘on’/‘off’. With 100µF we get approxi-

mately 5 seconds as ‘on’ and 5 seconds as‘off’ time.

Gate N4, with its associated compo-nents, forms a self-testing circuit. Nor-mally, both of its inputs are in ‘high’ state.However, when one switches off the igni-tion key, the supply to the car audio isalso disconnected. Thus the output of gateN4 jumps to a ‘high’ state and it providesa differentiated short pulse to forward biastransistor T1 for a short duration. (Thecombination of capacitor C1 and resistorR5 acts as the differentiating circuit.)

As a result, buzzer in the collectorterminal of T1 beeps for a short duration

to announce thatthe security cir-cuit is intact.This ‘on’ periodof buzzer can bevaried by chang-ing the values ofcapacitor C1and/or resistorR5.

After con-struction, fix theLED and buzzerin dashboard asper your re-quirement andhide switch S1

in a suitable location. Then connect leadA to the body of car stereo (not to thebody of vehicle) and lead B to its positivelead terminal. Take power supply for thecircuit from the car battery directly.

Caution. This design is meant for caraudios with negative ground only.

T.K. HAREENDRAN

���������� ��� ���

�� �� �����

Page 10: Electronics Projjects1

ELECTRONICS FOR YOU� ❚❚❚❚❚ �JULY 2001

C I R C U I T I D E A S

Here is a simple telephone ringtone generator circuit designedusing only a few components. It

produces simulated telephone ring toneand needs only DC voltage (4.5V DC to12V DC). One may use this circuit in or-dinary intercom or phone-type intercom.

The sound is quite loud when this circuitis operated on +12V DC power supply.However, the volume of ring sound is ad-justable.

The commonly available 14-stage bi-nary ripple counter with built-in oscilla-

tor (CMOS IC CD4060B) is used to gen-erate three types of pulses, which areavailable from pin 1 (O11), pin 3 (O13), andpin 14 (O7), respectively. Preset VR1 isadjusted to obtain 0.3125Hz pulses (1.6-second ‘low’ followed by 1.6-second ‘high’)at pin 3 of IC1. At the same time, pulsesavailable from pin 1 will be of 1.25 Hz

(0.4-second ‘low’, 0.4-second ‘high’) and 20Hz at pin 14. The three output pins ofIC1 are connected to base terminals oftransistors T1, T2, and T3 through resis-tors R1, R2, and R3, respectively.

Transistors T1 through T3 are cas-

caded in such a way that the positive volt-age available at the emitter of transistorT1 is extended to the collector of transis-tor T3 when the outputs of all the threestages are low. As a result, transistorsT1 through T3 are forward biased for 0.4,1.6, and 0.025 seconds, respectively andreverse biased for similar durations.

Using a built-in oscillator-type piezo-buzzer produces around 1kHz tone. In thiscircuit, the piezo-buzzer is turned ‘on’ and‘off’ at 20 Hz for ring tone sound by tran-sistor T3. 20Hz pulses are available atthe collector of transistor T3 for 0.4-sec-ond duration. After a time interval of 0.4

second, 20Hzpulses becomeagain avail-able for an-other 0.4-sec-ond duration.This is fol-lowed by twoseconds of no-sound inter-val. Thereaf-ter the pulsepattern re-

peats itself.Refer the figure that indicates wave-

forms available at various points includ-ing the collector of transistor T3. PresetVR2 can be used for adjusting the ampli-tude of the ring tone.

K. UDHAYA KUMARAN, VU3GTH

������� �������

��� ����� �������SUNIL KUMAR

Page 11: Electronics Projjects1

ELECTRONICS FOR YOU� ❚❚❚❚❚ �JUNE 2001

C I R C U I T I D E A S

ADTMF-based IR transmitter andreceiver pair can be used to realise a proximity detector. The circuit

presented here enables you to detect anyobject capable of reflecting the IR beamand moving in front of the IR LED photo-detector pair up to a distance of about 12cm from it.

The circuit uses the commonly avail-able telephony ICs such as dial-tone gen-erator 91214B/91215B (IC1) and DTMFdecoder CM8870 (IC2) in conjunction withinfrared LED (IR LED1), photodiode D1,and other components as shown in thefigure. A properly regulated 5V DC powersupply is required for operation of the cir-cuit.

The transmitter part is configuredaround dialer IC1. Its row 1 (pin 15) and

column 1 (pin 12) get connected togethervia transistor T2 after a power-on delay(determined by capacitor C1 and resis-tors R1 and R16 in the base circuit of thetransistor) to generate DTMF tone (com-bination of 697 Hz and 1209 Hz) corre-sponding to keypad digit “1” continuously.

LED 2 is used to indicate the tone

output from IC3. This tone output is am-plified by Darlington transistor pair of T3and T4 to drive IR LED1 via variable re-sistor VR1 in series with fixed 10-ohmresistor R14. Thus IR LED1 producestone-modulated IR light. Variable resis-tor VR1 controls the emission level to varythe transmission range. LED 3 indicatesthat transmission is taking place.

A part of modulated IR light signaltransmitted by IR LED1, after reflection

from an object, falls on photodetector di-ode D1. (The photodetector is to beshielded from direct IR light transmis-sion path of IR LED1 by using any opaquepartition so that it receives only the re-flected IR light.) On detection of the sig-nal by photodetector, it is coupled toDTMF decoder IC2 through emitter-fol-lower transistor T1.

When the valid tone pair is detectedby the decoder, its StD pin 15 (shorted toTOE pin 10) goes ‘high’. The detection of

the object in proximity of IR transmitter-receiver combination is indicated byLED1. The active-high logic output pulse(terminated at connector CON1, in thefigure) can be used to switch on/off anydevice (such as a siren via a latch andrelay driver) or it can be used to clock acounter, etc.

This DTMF proximity detector findsapplications in burglar alarms, objectcounter and tachometers, etc.

RUPANJANAK.S. SANKAR

���������������� ���

Page 12: Electronics Projjects1

ELECTRONICS FOR YOU� ❚❚❚❚❚ �MAY 2001

C I R C U I T I D E A S

�������������� �� ����

�������������������SUNIL KUMAR

Manual stabilisers are still popu-lar because of their simple con-struction, low cost, and high re-

liability due to the absence of any relayswhile covering a wide range of mains ACvoltages compared to that handled by au-tomatic voltage stabilisers. These are usedmostly in homes and in business centresfor loads such as lighting, TV, and fridge,and in certain areas where the mains ACvoltage fluctuates between very low (dur-ing peak hours) and abnormally high (dur-ing non-peak hours).

Some manual stabilisers available inthe market incorporate the high-voltage

auto-cut-off facility to turn off the loadwhen the output voltage of manualstabiliser exceeds a certain preset highvoltage limit. The output voltage may be-come high due to the rise in AC mainsvoltage or due to improper selection bythe rotary switch on manual stabiliser.

One of the major disadvantage of us-ing a manual stabiliser in areas with awide range of voltage fluctuations is thatone has to keep a watch on the manualstabiliser’s output voltage that is displayedon a voltmeter and keep changing thesame using its rotary switch. Or else, theoutput voltage may reach the preset auto-cut-off limit to switch off the load withoutthe user’s knowledge. To turn on the loadagain, one has to readjust the stabiliservoltage using its rotary switch. Such op-

eration is very irritating and inconvenientfor the user.

This under-/over-voltage audio alarmcircuit designed as an add-on circuit forthe existing manual stabilisers overcomesthe above problem. Whenever thestabiliser’s output voltage falls below apreset low-level voltage or rises above apreset high-level voltage, it produces dif-ferent beep sounds for ‘high’ and ‘low’ volt-age levels—short-duration beeps withshort intervals between successive beepsfor ‘high’ voltage level and slightly longer-duration beeps with longer interval be-tween successive beeps for ‘low’ voltage

level. By using these two different typesof beep sounds one can readily readjustthe stabiliser’s AC voltage output with thehelp of the rotary switch. There is no needof frequently checking voltmeter reading.

It is advisable to preset the high-levelvoltage 10V to 20V less than the requiredhigh-voltage limit for auto-cut-off opera-tion. Similarly, for low level one may pre-set low-level AC voltage 20V to 30V aboveminimum operating voltage for a givenload.

The primary winding terminals ofstep-down transformer X1 are connectedto the output terminals of the manualstabiliser. Thus, 9V DC available acrosscapacitor C1 will vary in accordance withthe voltage available at the output termi-nals of the manual stabiliser, which is

used to sense high or low voltage in thiscircuit.

Transistor T1 in conjunction with ze-ner diode ZD1 and preset VR1 is used tosense and adjust the high-voltage levelfor beep indication. Similarly, transistorT2 along with zener ZD2 and preset VR2is used to sense and adjust low voltagelevel for beep indication.

When the DC voltage across capaci-tor C1 rises above the preset high-levelvoltage or falls below the preset low-levelvoltage, the collector of transistor T2 be-comes high due to non-conduction of tran-sistor T2, in either case. However, if theDC voltage sampled across C1 is withinthe preset high- and low-level voltage,transistor T2 conducts and its collectorvoltage gets pulled to the ground level.These changes in the collector voltage oftransistor T2 are used to start or stoposcillations in the astable multivibratorcircuit that is built around transistors T3

and T4. The collectorof transistor T4 is con-nected to the base ofbuzzer driver transis-tor T5 through resis-tor R8. Thus when thecollector voltage oftransistor T4 goeshigh, the buzzersounds. Preset VR3 isused to control thevolume of buzzersound.

In normal condi-tion, the DC voltage sampled across ca-pacitor C1 is within the permissible win-dow voltage zone. The base of transistorT3 is pulled low due to conduction of di-ode D2 and transistor T2. As a result,capacitor C2 is discharged. The astablemultivibrator stops oscillating and tran-sistor T4 starts conducting because tran-sistor T3 is in cut-off state. No beep soundis heard in the buzzer due to conductionof transistor T4 and non-conduction oftransistor T5.

When the DC voltage across capaci-tor C1 goes above or below the windowvoltage level, transistor T2 is cut off. Itscollector voltage goes high and diode D2stops conducting. Thus there is no dis-charge path for capacitor C2 through di-ode D2. The astable multivibrator starts

K. UDHAYA KUMARAN

Page 13: Electronics Projjects1

ELECTRONICS FOR YOU� ❚❚❚❚❚ �MAY 2001

C I R C U I T I D E A S

oscillating. The time period for which thebeep is heard and the time interval be-tween two successive beeps are achievedwith the help of the DC supply voltage,which is low during low-level voltage sam-pling and high during high-level voltage

sampling. The time taken for chargingcapacitors C2 and C3 is less when the DCvoltage is high and slightly greater whenthe DC voltage is low for astablemultivibrator operation. Thus during low-level voltage sensing the buzzer beeps for

longer duration with longer interval be-tween successive beeps compared to thatduring high-voltage level sensing.

This circuit can be added to any ex-isting stabiliser (automatic or manual) orUPS to monitor its performance.

Page 14: Electronics Projjects1

ELECTRONICS FOR YOU� ❚❚❚❚❚ �MAY 2001

C I R C U I T I D E A S

RUPANJANA

Here is a simple circuit to obtainvariable DC voltage from 1.25Vto 15.19V in reasonably small

steps as shown in the table. The inputvoltage may lie anywhere between 20V

and 35V.The first section of the circuit com-

prises a digital up-down counter builtaround IC1— a quad 2-input NANDschmitt trigger (4093), followed byIC2— a binary up-down counter (4029).Two gates of IC 4093 are used to gen-erate up-down logic using push but-tons S1 and S2, respectively, while theother two gates form an oscillator toprovide clock pulses to IC2 (4029). Thefrequency of oscillations can be variedby changing the value of capacitor C1or preset VR1.

IC2 receives clock pulses from the os-cillator and produces a sequential binaryoutput. As long as its pin 5 is low, thecounter continues to count at the risingedge of each clock pulse, but stops count-ing as soon as its pin 5 is brought to logic1.

Logic 1 at pin 10 makes the counterto count upwards, while logic 0 makes itcount downwards. Therefore the countercounts up by closing switch S1 and counts

ing resistor across the relay contacts getsconnected to the circuit.

The table shows the theoretical out-put for various digital input combinations.The measured output is nearly equal tothe theoretically calculated output acrossregulator IC3 (LM317). The output volt-age is governed by the following relation-ship as long as the input-to-output differ-ential is greater than or equal to 2.5V:

Vout = 1.25(1+R2'/R1')Where, R1' = R15 = 270 ohms (fixed)

and R2' = R11 + R12 + R13 + R14= 220 + 470 + 820 +1500 ohms= 3,010 ohms (with all relays

energised)One can use either the binary

weighted LED display as indicated byLED1 through LED4 in the circuit or a74LS154 IC in conjunction with LED5through LED20 to indicate one of the 16selected voltage steps of Table I. The in-put for IC4 is to be tapped from points

down by closing switch S2.The output of counter IC2 is used to

realise a digitally variable resistor. Thissection consists of four N/O reed relaysthat need just about 5mA current for their

operation. (EFY lab note. The originalcircuit containing quad bilateral switchIC 4066 has been replaced by reed relaysoperated by transistorised switches be-cause of unreliable operation of theformer.) The switching action is performedusing BC548 transistors. External resis-tors are connected in parallel with thereed relay contacts. If particular relay con-tacts are opened by the control input atthe base of a transistor, the correspond-

NAVEEN THARIYAN

����������� ����������� �

Page 15: Electronics Projjects1

ELECTRONICS FOR YOU� ❚❚❚❚❚ �MAY 2001

C I R C U I T I D E A S

TABLEBinary Equivalent LED4 LED3 LED2 LED1output dec no. R14 (W) R13 (W) R12 (W) R11 (W) R2' (W) Vout (V)0000 0 Shorted Shorted Shorted Shorted 0 1.250001 1 Shorted Shorted Shorted 220 220 2.270010 2 Shorted Shorted 470 Shorted 470 3.430011 3 Shorted Shorted 470 220 690 4.440100 4 Shorted 820 Shorted Shorted 820 5.050101 5 Shorted 820 Shorted 220 1040 6.060110 6 Shorted 820 470 Shorted 1290 7.220111 7 Shorted 820 470 220 1510 8.241000 8 1500 Shorted Shorted Shorted 1500 8.191001 9 1500 Shorted Shorted 220 1720 9.211010 10 1500 Shorted 470 Shorted 1970 10.371011 11 1500 Shorted 470 220 2190 11.391100 12 1500 820 Shorted Shorted 2390 11.991101 13 1500 820 Shorted 220 2540 13.011110 14 1500 820 470 Shorted 2790 14.171111 15 1500 820 470 220 3010 15.19

marked ‘A’ through ‘D’ in the figure. Thisarrangement can be used to replace theLED arrangement at points A, B, C, andD. This 74LS154 IC is a decoder/demultiplexer that senses the output ofIC2 and accordingly activates only one ofits 16 outputs in accordance with the

sets itself, and hence the output at pins6, 11, 14, and 12 is equivalent to binaryzero, i.e. ‘0000’. The corresponding DCoutput of the circuit is minimum (1.25V).As count-up switch S1 is pressed, thebinary count of IC2 increases and theoutput starts increasing too. At the high-est count output of 1111, the output volt-age is 15.19V (assuming the in-circuit re-sistance of preset VR2 as zero). PresetVR2 can be used for trimming the outputvoltage as desired. To decrease the out-put voltage within the range of 1.25V to15.2V, count-down switch S2 is to be de-pressed.

Notes. 1. When relay contacts acrossa particular resistor are opened, the cor-responding LED glows.

2. The output voltages are shown as-suming the in-circuit resistance of presetVR2 as zero. Thus when the in-circuit re-sistance of preset VR2 is not zero, theoutput voltage will be higher than thatindicated here.

count value. LEDs at the output of thisIC can be arranged in a circular way alongside the corresponding voltages.

�������

When the power is switched on, IC2 re-

Page 16: Electronics Projjects1

ELECTRONICS FOR YOU� ❚❚❚❚❚ �FEBRUARY 2001

C I R C U I T I D E A S

RUPANJANA

This circuit using a dual-timerNE556 can produce 1Hz pulsesspaced 5 seconds apart, either

manually or automatically. IC NE556comprises two independent NE555 tim-ers in a single package. It is used toproduce two separate pulses of differ-ent pulse widths, where one pulseinitiates the activation of the secondpulse.

The first half of the NE556 is wiredfor 5-second pulse output. When slideswitch S2 is in position ‘a’, the first timeris set for manual operation, i.e. by press-

ing switch S1 momentarilyyou can generate a single pulse of 5-second duration. When switch S2 iskept in ‘b’ position, i.e. pins 6 and 2 areshorted, timer 1 in NE556 triggers byitself.

The output of the first timer is con-nected to trigger pin 8 of second timer,which, in turn, is connected to a poten-tial divider comprising resistors R4 andR5. Resistor R1, preset VR1, resistor R2,preset VR2, and capacitors C2 and C5are the components determining time pe-riod. Presets VR1 and VR2 permit trim-

PRAVEEN SHANKER

������������� ������ �

������� ��������

ming of the 5-second and 1-second pulsewidth of respective sections.

When switch S2 is in position ‘a’ andswitch S1 is pressed momentarily, the out-put at pin 5 goes high for about 5 sec-onds. The trailing (falling) edge of this 5-second pulse is used to trigger the secondtimer via 0.1µF capacitor C6. This actionresults in momentarily pulling down ofpin 8 towards the ground potential, i.e.‘low’. (Otherwise pin 8 is at 1/2 Vcc andtriggers at/below 1/3 Vcc level.) When thesecond timer is triggered at the trailingedge of 5-second pulse, it generates a 1-second wide pulse.

When switch S2 is on position ‘b’,switch S1 is disconnected, while pin 6 isconnected to pin 2. When capacitor C ischarged, it is discharged through pin 2until it reaches 1/3Vcc potential, at whichit is retriggered since trigger pin 6 isalso connected here. Thus timer 1 isretriggered after every 5-second period(corresponding to 0.2Hz frequency). The

second timer is triggered as before toproduce a 1-second pulse in synchro-nism with the trailing edge of 5-sec-ond pulse.

This circuit is important wherevera pulse is needed at regular intervals;for instance, in ‘Versatile Digital Fre-quency Counter Cum Clock’ construc-tion project published in EFY Oct. ’97,one may use this circuit in place ofCD4060-based circuit. For the digitalclock function, however, pin 8 and 12are to be shorted after removal of0.1µF capacitor and 10-kilo-ohm resis-tors R4 and R5.

Page 17: Electronics Projjects1

ELECTRONICS FOR YOU� ❚❚❚❚❚ �MARCH 2001

C I R C U I T I D E A S

S.C. DWIVEDI

sound from UM3561. Resistor R4 in se-ries with a 3V zener is used to providethe 3V supply to UM3561 when the re-

SUKANT KUMAR BEHARA

������������������� lay is in energised state. LED1, con-nected in series with 68-ohm resistorR1 across resistor R4, glows when thesiren is on.

To test the working of the cir-cuit, bring a burning matchstickclose to transistor T1 (BC109),which causes the resistance of itsemitter-collector junction to go lowdue to a rise in temperature and itstarts conducting. Simultaneously,

transistor T2also conducts be-cause its base isconnected to thecollector of tran-sistor T1. As aresult, relay RL1energises andswitches on thesiren circuit toproduce loudsound of a fire-brigade siren.

Lab note.We have added a

table to enable readers to obtain all pos-sible sound effects by returning pins 1and 2 as suggested in the table.

Pin Designation Sound EffectSEL1 SEL2No Connection No Connection Police Siren+3V No Connection Fire Engine SirenGround No Connection Ambulance SirenDo not care +3V Machine Gun

This circuit uses a complementarypair comprising npn metallictransistor T1 (BC109) and pnp

germanium transistor T2 (AC188) to de-tect heat (due to outbreak of fire, etc)in the vicinity and energise a siren. Thecollector of transistor T1 is connectedto the base of transistor T2, while thecollector of transistor T2 is connectedto relay RL1.

The second part of the circuit com-prises popular IC UM3561 (a siren andmachine-gun sound generator IC), whichcan produce the sound of a fire-brigadesiren. Pin numbers 5 and 6 of the ICare connected to the +3V supply whenthe relay is in energised state, whereaspin 2 is grounded. A resistor (R2) con-nected across pins 7 and 8 is used to fixthe frequency of the inbuilt oscillator.The output is available from pin 3.

Two transistors BC147 (T3) andBEL187 (T4) are connected inDarlington configuration to amplify the

Page 18: Electronics Projjects1

ELECTRONICS FOR YOU� ❚❚❚❚❚ �MARCH 2001

C I R C U I T I D E A S

S.C. DWIVEDI

Here is a musical call bell thatcan be operated by just bridg-ing the gap between the touch-

plates with one’s fingertips. Thus thereis no need for a mechanical ‘on’/‘off’switch because the touch-plates act asa switch. Other features include low costand low power consumption. The bellcan work on 1.5V or 3V, using one ortwo pencil cells, and can be used inhomes and offices.

Two transistors are used for sens-ing the finger touch and switchingon a melody IC. Transistor BC148 isnpn type while transistor BC558 is pnptype.

The emitter of transistor BC148 isshorted to the ground, while that oftransistor BC558 is connected to thepositive terminal. The collector of tran-sistor BC148 is connected to the base ofBC558. The base of BC148 is connectedto the washer (as shown in the figure).

The collector of BC558 is connected topin 2 of musical IC UM66, and pin 3 ofIC UM66 is shorted to the ground. Theoutput from pin 1 is connected to a tran-sistor amplifier comprising BEL187transistor for feeding the loudspeaker.One end of 2.2-mega-ohm resistor R1is connected to the positive rail and the

other to a screw (as shown in the fig-ure). The complete circuit is connectedto a single pencil cell of 1.5V.

When the touch-plate gap is bridgedwith a finger, the emitter-collector junc-tion of transistor BC148 starts conduct-

SUKANT KUMAR BEHARA

ing. Simultaneously, the emitter-baserjunction of transistor BC558 also startsconducting. As a result, the collector oftransistor BC558 is pulled towards thepositive rail, which thus activates melodygenerator IC1 (UM66). The output ofIC1 is amplified by transistor BEL187and fed to the speaker. So we hear amusical note just by touching the touchpoints.

The washer’s inner diameter shouldbe 1 to 2 mm greater than that of thescrewhead. The washer could be fixed in

the position by using an adhesive, whilethe screw can be easily driven in awooden piece used for mounting thetouch-plate. The use of brass washer andscrew is recommended for easy solder-ability.

������������ �����

Page 19: Electronics Projjects1

ELECTRONICS FOR YOU� ❚❚❚❚❚ � JANUARY 2001

C I R C U I T I D E A S

puts are not loaded on measurement.The user can terminate the inputs withresistance of his choice (such as 10 meg-ohm or 1 meg-ohm) to avoid floating ofthe inputs when no measurement is be-ing made.

IC5 is used as an inverting buffer torestore polarity of the input while IC4is used as buffer at the output ofCD4052, because loading it by resistanceof value less than 1 meg-ohm will causean error. An alternative is to makeR7=R8=1 meg-ohm and do away withIC4, though this may not be an idealmethod.

Gains greater than 100 may not bepractical because even at gain value of100 itself, a 100µV offset will work outto be around 10 mV at the output (100µVx 100). This can be trimmed using theoffset null option in the OP07, connect-ing a trimpot between pins 1 and 8, andconnecting wiper to +5V supply rails.For better performance, use ICL7650(not pin-compatible) in place of OP07and use ±7.5V instead of ±5V supply.

Eight steps for gain or attenuationcan be added by using two CD4051 andpin 6 inhibit on CD4051/52. More stepscan be added by cascading manyCD4051, or CD4052, or CD4053 ICs, aspin 6 works like a chip select.

Some extended applications of thiscircuit are given below.

1. Error correction in transduceramplifiers by correcting gain.

2. Autoranging in DMM.3. Sensor selection or input type se-

lection in process control.4. Digitally preset power supplies or

electronic loads.5. Programmable precision mV or

mA sources.6. PC or microcontroller or micro-

processor based instruments.7. Data loggers and scanners.

Truth Table (Control Input vs Gain)X,Y (On-switch (2) (1) GainPair) B A (Av.)X0,Y0 0 0 1/10X1,Y1 0 1 1X2,Y2 1 0 10X3,Y3 1 1 100

S.C. DWIVEDI

This circuit is similar to the pre-ceding circuit of the attenuator.Gain of up to 100 can be

achieved in this configuration, which isuseful for signal conditioning of low out-put of transducers in millivolt range.

The gain selection resistors R3 toR6 can be selected by the user andcan be anywhere from 1 kilo-ohm to 1meg-ohm. Trimpots can be used for ob-taining any value of gain required bythe user. The resistor values shown inthe circuit are for decade gains suitablefor an autoranging DPM.

Resistor R1 and capacitor C1 reduceripple in the input and also snub tran-sients. Zeners Z1 and Z2 limit the inputto ±4.7V, while the input current is lim-ited by resistor R1. Capacitors C2 andC3 are the power supply decoupling ca-pacitors.

Op-amp IC1 is used to increase theinput impedance so that very low in-

ANANTHA NARAYAN

������������� ���

�����������������

Page 20: Electronics Projjects1

C I R C U I T I D E A S

������������ ������

��� ��

C I R C U I T I D E A S

PRABHASH K.P.

RUPANJANA

The add-on circuit presented hereis useful for stereo systems. Thiscircuit has provision for connect-

ing stereo outputs from four differentsources/channels as inputs and only oneof them is selected/ connected to theoutput at any one time.

When power supply is turned ‘on’,channel A (A2 and A1) is selected. If noaudio is present in channel A, the cir-cuit waits for some time and then se-lects the next channel (channel B), Thissearch operation continues until it de-tects audio signal in one of the chan-nels. The inter-channel wait or delaytime can be adjusted with the help ofpreset VR1. If still longer time isneeded, one may replace capacitor C1with a capacitor of higher value.

Suppose channel A is connected toa tape recorder and channel B is con-nected to a radio receiver. If initially

channel A is selected, the audio fromthe tape recorder will be present at theoutput. After the tape is played com-pletely, or if there is sufficient pausebetween consecutive recordings, the cir-cuit automatically switches over to theoutput from the radio receiver. Tomanually skip over from one (selected)active channel, simply push the skipswitch (S1) momentarily once or more,until the desired channel inputs getsselected. The selected channel (A, B, C,or D) is indicated by the glowing of cor-responding LED (LED11, LED12,LED13, or LED14 respectively).

IC CD4066 contains four analogueswitches. These switches are connectedto four separate channels. For stereooperation, two similar CD4066 ICs areused as shown in the circuit. These ana-logue switches are controlled by ICCD4017 outputs. CD4017 is a 10-bit ring

counter IC. Since only one of its out-puts is high at any instant, only oneswitch will be closed at a time. ICCD4017 is configured as a 4-bit ringcounter by connecting the fifth outputQ4 (pin 10) to the reset pin. CapacitorC5 in conjunction with resistor R6 formsa power-on-reset circuit for IC2, so thaton initial switching ‘on’ of the powersupply, output Q0 (pin 3) is always‘high’. The clock signal to CD4017 is pro-vided by IC1 (NE555) which acts as anastable multivibrator when transistorT1 is in cut-off state.

IC5 (KA2281) is used here for notonly indicating the audio levels of theselected stereo channel, but also for for-ward biasing transistor T1. As soon asa specific threshold audio level is de-tected in a selected channel, pin 7 and/or pin 10 of IC5 goes ‘low’. This lowlevel is coupled to the base of transistorT1, through diode-resistor combinationof D2-R1/D3-R22. As a result, transis-tor T1 conducts and causes output ofIC1 to remain ‘low’ (disabled) as long asthe selected channel output exceeds thepreset audio threshold level.

Presets VR2 and VR3 have been in-cluded for adjustment of individual au-dio threshold levels of left stereo chan-nels, as desired. Once the multivibratoraction of IC1 is disabled, output of IC2does not change further. Hence, search-

jeetu
97
Page 21: Electronics Projjects1

C I R C U I T I D E A S

ing through the channels continues un-til it receives an audio signal exceedingthe preset threshold value. The skip

switch S1 is used to skip a channel evenif audio is present in the selected chan-nel. The number of channels can be eas-

ily extended up to ten, by using addi-tional 4066 ICs.

jeetu
98
Page 22: Electronics Projjects1

CIRCUIT IDEAS

ELECTRONICS FOR YOU���MAY '99

The given circuit, when connectedin parallel to a telephone, dis-plays the number dialled from

the telephone set using the DTMF mode.This circuit can also show the numberdialled from the phone of the calledparty. This is particularly helpful forreceiving any number over the phonelines.

The DTMF signal—generated by thephone on dialling a number—is decodedby DTMF decoder CM8870P1 (IC1),which converts the received DTMF sig-nal into its equivalent BCD number thatcorresponds to the dialled number. Thisbinary number is stored sequentially in10 latches each time a number is dialledfrom the phone. The first number isstored in IC5A (1/2 of CD4508) whilethe second number is stored in IC5Band so on. The binary output from IC1for digit ‘0’ as decoded by IC1 is 10102(=1010), and this cannot be displayed bythe seven-segment decoder, IC10. There-fore the binary output of IC1 is passedthrough a logic-circuit which convertsan input of ‘10102’ into ‘00002’ withoutaffecting the inputs ‘1’ through ‘9’. Thisis accomplished by gates N13 throughN15 (IC11) and N1 (IC12).

The storing of numbers in respec-tive latches is done by IC2 (4017). Thedata valid output from pin 15 of IC1 isused to clock IC2. The ten outputs ofIC2 are sequentially connected to thestore and clear inputs of all the latches,except the last one, where the clear in-put is tied to ground. When an outputpin of IC2 is high, the correspondinglatch is cleared of previous data andkept ready for storing new data. Then,on clocking IC2, the same pin becomeslow and the data present at the inputsof that latch at that instant gets storedand the next latch is cleared and keptready. The similar input and output pinsof all latches are connected together to

Telephone NumberDisplayBHASKAR BANERJEE

R. RAINA

Page 23: Electronics Projjects1

CIRCUIT IDEAS

ELECTRONICS FOR YOU���MAY '99

form two separate input and outputbuses.

There is only one 7-segment decoder/driver IC10 for all the ten displays. Thisnot only reduces size and cost but re-duces power requirement too. The out-put from a latch is available only whenits disable pins (3 and 15) are broughtlow. This is done by IC3, IC12 and IC13.IC3 is clocked by an astablemultivibrator IC4 (555). IC3 also drivesthe displays by switching correspond-ing transistors. When a latch is enabled,its corresponding display is turned onand the content of that latch, after de-

coding by IC10, gets displayed in thecorresponding display. For instance, con-tents of IC5A are displayed on display‘DIS1,’ that of IC5B on ‘DIS2’ and soon. The system should be connected tothe telephone lines via a DPDT switch(not shown) for manual switching, oth-erwise any circuit capable of sensinghandset’s off-hook condition and therebyswitching relays, etc. can be used forautomatic switching. The power-supplyswitch can also be replaced then. Suchcircuits, under different captions, canbe found in EFY’s back issues. Thoughthis circuit is capable of showing a maxi-

mum of ten digits, one can reduce thedisplay digits as required. For doingthis, connect the reset pin of IC2, say,for a 7-digit display, with S6 output atpin 5.

The present circuit can be built on averoboard and housed in a suitable box.The displays are common-cathode type.To make the system compact, small, 7-segment displays can be used but withsome extra cost. Also, different colourdisplays can be used for the first threeor four digits to separate the exchangecode/STD code, etc. The circuit can besuitably adopted for calling-line display.

Page 24: Electronics Projjects1

C I R C U I T I D E A S

S.C. DWIVEDI

While travelling by a train or bus,we generally lock our luggageusing a chain-and-lock arrange-

ment. But, still we are under tension, ap-prehending that somebody may cut thechain and steal our luggage. Here is asimple circuit to alarm you whensomebody tries to cut the chain.

Transistor T1 enables supply tothe sound generator chip when thebase current starts flowing throughit. When the wire (thin enameledcopper wire of 30 to 40 SWG, usedfor winding transformers) looparound the chain is broken by some-body, the base of transistor T1,which was earlier tied to positiverail, gets opened. As a result, tran-

sistor T1 gets forward biased to extendthe positive supply to the alarm circuit.In idle mode, the power consumption ofthe circuit is minimum and thus it can beused for hundreds of travel hours.

To enable generation of different

DHURJATI SINHA

�������� ��������� �����

Select 1 Select 2 Sound effect(Pin6) (Pin1)X X Police sirenVDD X Fire-engine sirenVSS X Ambulance siren“-” VDD Machine-gun soundNote: X = no connection; “-” = do not care

alarm sounds, connections to pin 1 and 6may be made as per the table.

jeetu
86
Page 25: Electronics Projjects1

ELECTRONICS FOR YOU� ❚❚❚❚❚ �FEBRUARY 2000

C I R C U I T I D E A S

�������� ���� ����������

��������YOGESH KATARIA

TABLE IPosition 1 of Function Switch

Edc input Meter Current5.00V 44 µA4.00V 34 µA3.00V 24 µA2.00V 14 µA1.00V 4 µA

The full-scale deflection of the uni-versal high-input-resistance volt-meter circuit shown in the figure

depends on the function switch positionas follows:

(a) 5V DC on position 1(b) 5V AC rms in position 2(c) 5V peak AC in position 3(d) 5V AC peak-to-peak in position 4The circuit is basically a voltage-to-

current converter. The design procedureis as follows:

Calculate RI according to the applica-tion from one of the following equations:

(a) DC voltmeter: RIA = full-scale EDC/IFS

(b) RMS AC voltmeter (sinewave only): RIB = 0.9 full-scaleERMS/ IFS

(c) Peak reading voltmeter(sine wave only): RIC = 0.636 full-scale EPK/IFS

(d) Peak-to-peak AC voltme-ter (sine wave only): RID = 0.318full-scale EPK-TO-PK / IFS

The term IFS in the aboveequations refers to meter’s full-scale deflection current rating inamperes.

It must be noted that neithermeter resistance nor diode volt-age drops affects meter current.

Note: The results obtainedduring practical testing of the cir-

cuit in EFY lab are tabulated in Tables Ithrough IV.

A high-input-resistance op-amp, abridge rectifier, a microammeter, and afew other discrete components are all thatare required to realise this versatile cir-cuit. This circuit can be used for mea-surement of DC, AC RMS, AC peak, orAC peak-to-peak voltage by simply chang-

S.C. DWIVEDI

TABLE IIPosition 2 of Function Switch

Erms input Meter Current5V 46 µA4V 36 µA3V 26 µA2V 18 µA1V 10 µA

TABLE IIIPosition 3 of Function Switch

EPk input Meter Current5V peak 46 µA4V peak 36 µA3V peak 26 µA2V peak 16 µA1V peak 6 µA

TABLE IVPosition 4 of Function Switch

EPk-To-Pk Meter Current5V peak to peak 46 µA4V peak to peak 36 µA3V peak to peak 26 µA2V peak to peak 16 µA1V peak to peak 7 µA

ing the value of the resistor connected be-tween the inverting input terminal of theop-amp and ground. The voltage to bemeasured is connected to non-inverting in-put of the op-amp.

Page 26: Electronics Projjects1

CIRCUIT IDEAS

ELECTRONICS FOR YOU���MARCH '99

Time Switch Y. KATARIA

This circuit is especially designedfor those who often need to wakeup early in the morning. Ordi-

nary alarms in electronic watches arenot loud enough andvery often they fail towake up. The switchcircuit described herewill come handy; it canbe used to switch on aTV, radio or tape re-corder etc, which willnot allow even the la-ziest amongst us to ig-

nore their sound for too long. Besides,this time switch can also be used to

switch on/off any other electric or elec-tronic gadget at any time. What youneed is a simple analogue electronicclock with alarm facility and a smallcircuit to implement the time switch.

This time switch has two modes.One is ‘time-on’ mode and the other is‘time-off ’ mode. In time-on mode, youset up the alarm in your clock as pernormal procedure and at the set timethis switch turns on the gadget con-nected at the output socket-1. In time-off mode, it turns your gadget off at theset time. The optional output socket-2is wired in such a way that when youuse this socket, the mode changes with-

out having to flip the mode switch (i.e.mode switch can be omitted).

Please refer to the back panel dia-gram of a typical analogue clock andthe audio jack, to see how the existing

buzzer ofthe clock isrequired tobe wired tothe audioo u t p u tfrom theclock. This

will ensure that when plug is insertedin the audio jack, the clock’s buzzer willremain off and not consume any power

unnecessarily.The audio alarm output from the

clock is coupled to the AF detector builtaround low-power switching transistorT1. During alarm, the collector of tran-sistor T1 will fluctuate around groundlevel and Vcc. During absence of audioalarm input, the collector of transistorT1 is held at Vcc potential.

The next stage consists of an S-Rlatch built around NAND gates N1 andN2. Capacitor C2 and resistor R4 areused for power-on-reset. On switchingthe power supply, gate N2 output willacquire logic 1 and that of gate N1 logic0. This is the initial state, irrespective of

the position of mode switch. At the timeof alarm, when point A connected to col-lector of transistor T1 passes throughlogic 0 state, the output logic state ofboth the gates will toggle.

Assuming that mode switch isflipped to ‘Mode Off’ position at power-on-reset (when point D is at logic 1),initially diode D1 would be in blockingstate and transistor T2 would be for-ward biased via resistor R5 anddiodes D2 and D3. As a result, therelay is in energised state, which makesoutput power available at output socket-1 and cuts it off from socket-2. At alarmtime, the audio signal toggles logicoutput states of both gates N1 and N2.As a result, point D goes to logic 0state. Diode D1 conducts, taking thevoltage at junction of diodes D1 andD2 to near about 1 volt. Diode D3ensures that its series combination with

diode D2 puts them in blocking mode.Capacitor C3 meanwhile dischargesvia resistor R6 and the voltage at baseof transistor T2 approaches towardsground level, cutting off transistorT2 and de-energising relay RL1. Nowthe power at output socket-1 would becut off while it becomes available insocket-2.

If the above operation is repeatedwith switch S1 in ‘Mode On,’ the powerwould initially not be available insocket-1 (but available in socket-2). Butafter the alarm, the power would be-come available in socket-1 and not insocket-2.

AVNISH PUNDIR

Page 27: Electronics Projjects1

CIRCUIT IDEAS

ELECTRONICS FOR YOU���AUGUST '99

Using this low-cost project onecan reproduce audio from TVwithout disturbing others. It

does not use any wire connection be-tween TV and headphones. In place ofa pair of wires, it uses invisible infra-red light to transmit audio signals from

TV to headphones. Without using anylens, a range of up to 6 metres is

possible. Range can be extended byusing lenses and reflectors with IR sen-sors comprising transmitters and re-ceivers.

IR transmitter uses two-stage tran-sistor amplifier to drive two series-con-nected IR LEDs. An

audio out-put trans-former isused (in re-verse) tocouple audiooutput fromTV to the IRtransmitter.TransistorsT1 and T2amplify theaudio sig-nals re-ceived from

TV through the audio transformer. Low-impedance output windings (lower

gauge or thicker wires) are used for con-nection to TV side while high-imped-ance windings are connected to IR trans-mitter. This IR transmitter can be pow-ered from a 9-volt mains adapter or bat-tery. Red LED1 in transmitter circuitfunctions as a zener diode (0.65V) aswell as supply-on indicator.

IR receiver uses 3-stage transistoramplifier. The first two transistors (T4and T5) form audio signal amplifierwhile the third transistor T6 is used todrive a headphone. Adjust potmeter VR2for max. clarity.

Direct photo-transistor towards IRLEDs of transmitter for max. range. A

9-volt battery can be used with receiverfor portable operation.

Infrared CordlessHeadphonePRADEEP G.

G.S. SAGOO

Page 28: Electronics Projjects1

CIRCUIT IDEAS

ELECTRONICS FOR YOU���AUGUST '99

Dual-Channel DigitalVolume ControlSHEENA K.

This circuit could be used for re-placing your manual volume con-trol in a stereo amplifier. In this

circuit, push-to-on switch S1 controls theforward (volume increase) operation ofboth channels while a similar switchS2 controls reverse (volume decrease)operation of both channels.

Here IC1 timer 555 is configured asan astable flip-flop to provide low-fre-

quency pulses to up/down clock inputpins of pre-setable up/down counter74LS193 (IC2) via push-to-on switchesS1 and S2. To vary the pulse width ofpulses from IC1, one may replace tim-ing resistor R1 with a variable resistor.

Operation of switch S1 (up) causesthe binary output to increment whileoperation of S2 (down) causes the bi-nary output to decrement. The maxi-

mum count being 15 (all outputs logic1) and minimum count being 0 (all out-puts logic 0), it results in maximum andminimum volume respectively.

The active high outputs A, B, C andD of the counter are used for control-ling two quad bi-polar analogue switchesin each of the two CD4066 ICs (IC3 andIC4). Each of the output bits, when high,short a part of the resistor network com-prising series resistors R6 through R9for one channel and R10 through R13for the other channel,and thereby control the output of theaudio signals being fed to the inputs ofstereo amplifier. Push-to-on switch S3is used for resetting the output ofcounter to 0000, and thereby turningthe volume of both channels to the mini-mum level.

A.P.S. DHILLON

Page 29: Electronics Projjects1

CIRCUIT IDEAS

ELECTRONICS FOR YOU���JULY '99

Many digital code lock circuitshave been published in thismagazine. In those circuits a

set of switches (conforming to code) arepressed one by one within the specifiedtime to open the lock. In some othercircuits, custom-built ICs are used andpositive and negative logic pulses are

keyed in sequence as per the code bytwo switches to open the lock.

A low-cost digital code lock circuitis presented in this article. Here thekeying-in code is rather unique. Sixswitches are to be pressed to open thelock, but only two switches at a time.Thus a total of three sets of switcheshave to be pressed in a particular se-quence. (Of these three sets, one set isrepeated.) The salient features of thiscircuit are:

1. Use of 16 switches, which sug-gests that there is a microprocessor in-side.

2. Elimination of power amplifiertransistor to energise the relay.

3. Low cost and small PCB size.

A. JEYABAL

Simple Low-CostDigital Code Lock

An essential property of this elec-tronic code lock is that it works inmonostable mode, i.e. once triggered,the output becomes high and remainsso for a period of time, governed by thetiming components, before returing tothe quiescent low state. In this circuit,timer IC 555 with 8 pins is used. The

IC is inexpensive and easily available.Its pin 2 is the triggering input pinwhich, when held below 1/3 of the sup-ply voltage, drives the output to highstate. The threshold pin 6, when heldhigher than 2/3 of the supply voltage,drives the output to low state. By ap-plying a low-going pulse to the resetpin 4, the output at pin 3 can bebrought to the quiescent low level. Thusthe reset pin 4 should be held high fornormal operation of the IC.

Three sets of switches SA-SC, S1-S8 and S3-S4 are pressed, in that or-der, to open the lock. On pressing theswitches SA and SC simultaneously, ca-pacitor C3 charges through the poten-tial divider comprising resistors R3 and

R4, and on releasing these two switches,capacitor C3 starts discharging throughresistor R4. Capacitor C3 and resistorR4 are so selected that it takes aboutfive seconds to fully discharge C3.

Depressing switches S1 and S8 inunison, within five seconds of releasingthe switches SA and SC, pulls pin 2 toground and IC 555 is triggered. The ca-pacitor C1 starts charging through re-sistor R1. As a result, the output (pin3) goes high for five seconds (i.e. thecharging time T of the capacitor C1 tothe threshold voltage, which is calcu-lated by the relation T=1.1 R1 x C1 sec-onds).

Within these five seconds, switchesSA and SC are to be pressed momen-tarily once again, followed by the de-pression of last code-switch pair S3-S4.

These switches connect the relay to out-put pin 3 and the relay is energised.The contacts of the relay close and thesolenoid pulls in the latch (forming partof a lock) and the lock opens. The re-maining switches are connected betweenreset pin 4 and ground. If any one ofthese switches is pressed, the IC is re-set and the output goes to its quiescentlow state. Possibilities of pressing thesereset switches are more when a codebreaker tries to open the lock.

LED D5 indicates the presence ofpower supply while resistor R5 is a cur-rent limiting resistor.

The given circuit can be recoded eas-ily by rearranging connections to theswitches as desired by the user.

RUPANJANA

Page 30: Electronics Projjects1

CIRCUIT IDEAS

ELECTRONICS FOR YOU���JUNE '99

A.P.S. DHILLON

This jam circuit can be used inquiz contests wherein any par-ticipant who presses his button

(switch) before the other contestants,gets the first chance to answer a ques-tion. The circuit given here permits upto eight contestants with each one al-lotted a distinct number (1 to 8). Thedisplay will show the number of the con-testant pressing his button before theothers. Simultaneously, a buzzer willalso sound. Both, the display as well asthe buzzer have to be reset manuallyusing a common reset switch.

Initially, when reset switch S9 is mo-mentarily pressed and released, all out-puts of 74LS373 (IC1) transparent latchgo ‘high’ since all the input data linesare returned to Vcc via resistors R1

through R8. All eight outputs of IC1are connected to inputs of priority en-coder 74LS147 (IC2) as well as 8-inputNAND gate 74LS30 (IC3). The outputof IC3 thus becomes logic 0 which, afterinversion by NAND gate N2, is appliedto latch-enable pin 11 of IC1. With allinput pins of IC2 being logic 1, its BCDoutput is 0000, which is applied to 7-segment decoder/driver 74LS47 (IC6) af-ter inversion by hex inverter gates in-side 74LS04 (IC5). Thus, on reset thedisplay shows 0.

When any one of the push-to-onswitches—S1 through S8—is pressed,the corresponding output line of IC1 islatched at logic 0 level and the displayindicates the number associated withthe specific switch. At the same time,

Electronic JamRAJESH K.P.

output pin 8 of IC3 becomes high, whichcauses outputs of both gates N1 andN2 to go to logic 0 state. Logic 0 outputof gate N2 inhibits IC1, and thus press-ing of any other switch S1 through S8has no effect. Thus, the contestant whopresses his switch first, jams the dis-play to show only his number. In theunlikely event of simultaneous press-ing (within few nano-seconds difference)of more than one switch, the higherpriority number (switch no.) will bedisplayed. Simultaneously, the logic 0output of gate N1 drives the buzzer viapnp transistor BC158 (T1). The buzzeras well the display can be reset (toshow 0) by momentary pressing of re-set switch S9 so that next round maystart.

Lab Note: The original circuit sentby the author has been modified as itdid not jam the display, and a highernumber switch (higher priority), evenwhen pressed later, was able to changethe displayed number.

Page 31: Electronics Projjects1

C I R C U I T I D E A S

ELECTRONICS FOR YOU MAY 2002

CRYSTAL-CONTROLLEDTIME-BASE GENERATOR S.C. DWIVEDI

PRATAP CHANDRA SAHU

Adigital frequency counter needs atime-base generator to count thefrequency with high resolution.

Normally, a crystal-based oscillator withdivider IC chain or a similar circuit in theform of an ASIC (application-specific IC)is used for time-base generation. Herewe’ve presented a simple circuit for accu-rate time-base generation using the readilyavailable 3.5795MHz crystal commonlyused in telecommunication equipment.

The 3.5795MHz crystal is used in con-junction with a CD4060-based crystal os-cillator-cum-divider (IC1). The crystal fre-quency is divided by 512 by IC1, which isfurther divided by 7 by CD4017 (IC2). IC2is reset as soon as its Q7 output goes high.

Thus the crystal frequency is dividedby 3584, giving the final output frequencyof around 998.8 Hz. This frequency canbe trimmed to exactly 1 kHz with the helpof trimmer capacitor VC1 as shown in the

figure. The 1kHz signal can be furtherdivided using decade counters to gener-ate the required time period.

EFY lab note. To generate requiredgate for use in a frequency counter circuit,the final oscillator output needs to be fol-lowed by a toggle flip-flop. For example, a1kHz clock, when applied to a toggle flip-

flop, will generate gates with 1-sec ‘on’period and 1-sec ‘off’ period.

This circuit is estimated to cost belowRs 50.

Page 32: Electronics Projjects1

C I R C U I T I D E A S

ELECTRONICS FOR YOUMAY 2002

Here is a low-cost circuit of Christ-mas star that can be easily con-structed even by a novice. The main

MAINS-OPERATEDCHRISTMAS STAR

SANI THEO

PRINCE PHILLIPS

advantage of this circuit is that it doesn’trequire any step-down transformer or ICs.

Components like resistors R1 and R2,

capacitors C1, C2, and C3, diodes D1 andD2, and zener ZD1 are used to develop afairly steady 5V DC supply voltage thatprovides the required current to operatethe multivibrator circuit and trigger triacBT136 via LED1.

The multivibrator circuit is constructedusing two BC548 transistors (T1 and T2)and some passive components. The fre-quency of the multivibrator circuit is con-trolled by capacitors C4 and C5 and resis-tors R3 through R7. The output of themultivibrator circuit is connected to tran-sistor T3, which, in turn, drives the triacvia LED1. During positive half cycles ofthe multivibrator’s output, transistor T3energises triac BT136 and the lamp glows.

This circuit is estimated to cost Rs 75.

Page 33: Electronics Projjects1

C I R C U I T I D E A S

ELECTRONICS FOR YOU JULY 2002

C I R C U I T I D E A S

MAINS MANAGERSHIBASHISH PATEL

Very often we forget to switch offthe peripherals like monitor, scan-ner, and printer while switching off

our PC. The problem is that there are sepa-rate power switches to turn the peripher-als off. Normally, the peripherals are con-nected to a single of those four-way trail-ing sockets that are plugged into a singlewall socket. If that socket is accessible, allthe devices could be switched off fromthere and none of the equipment used willrequire any modification.

Here is a mains managercircuit that allows you to turnall the equipment on or off byjust operating the switch onany one of the devices; forexample, when you switch offyour PC, the monitor as wellas other equipment will getpowered down automatically.You may choose the mainequipment to control othergadgets. The main equipmentis to be directly plugged intothe master socket, while allother equipment are to be con-nected via the slave socket.The mains supply from thewall socket is to be connectedto the input of the mains man-ager circuit.

The unit operates bysensing the current drawn bythe control equipment/loadfrom the master socket. Onsensing that the controlequipment is on, it powers up the other(slave) sockets. The load on the mastersocket can be anywhere between 20 VAand 500 VA, while the load on the slavesockets can be 60 VA to 1200 VA.

During the positive half cycle of themains AC supply, diodes D4, D5, and D6have a voltage drop of about 1.8 voltswhen current is drawn from the mastersocket. Diode D7 carries the current dur-ing negative half cycles. Capacitor C3, inseries with diode D3, is connected acrossthe diode combination of D4 through D6,in addition to diode D7 as well as resistorR10. Thus current pulses during positivehalf-cycles, charge up the capacitor to 1.8

volts via diode D3. This voltage is suffi-cient to hold transistor T2 in forward bi-ased condition for about 200 ms even af-ter the controlling load on the mastersocket is switched off.

When transistor T2 is ‘on’, transistorT1 gets forward biased and is switchedon. This, in turn, triggers Triac 1, whichthen powers the slave loads. Capacitor C4and resistor R9 form a snubber network toensure that the triac turns off cleanly withan inductive load.

LED1 indicates that the unit is operat-ing. Capacitor C1 and zener ZD1 are effec-tively in series across the mains. The result-ing 15V pulses across ZD1 are rectified bydiode D2 and smoothened by capacitor C2to provide the necessary DC supply for thecircuit around transistors T1 and T2. Resis-tor R3 is used to limit the switching-onsurge current, while resistor R1 serves as ableeder for rapidly discharging capacitor C1when the unit is unplugged. LED1 glowswhenever the unit is plugged into the mains.Diode D1, in anti-parallel to LED1, carriesthe current during the opposite half cycles.

Don’t plug anything into the master orslave sockets without testing the unit. If

possible, plug the unit into the mains viaan earth leakage circuit breaker. The mainsLED1 should glow and the slave LED2should remain off. Now connect a tablelamp to the master socket and switch it‘on’. The lamp should operate as usual.The slave LED should turn ‘on’ wheneverthe lamp plugged into slave socket isswitched on. Both lamps should be at fullbrightness without any flicker. If so, theunit is working correctly and can be putinto use.

Note. 1. The device connected to themaster socket must have its power switchon the primary side of the internal trans-former. Some electronic equipment havethe power switch on the secondary sideand hence these devices continue to drawa small current from the mains even whenswitched off. Thus such devices, if con-nected as the master, will not control theslave units correctly.

2. Though this unit removes the powerfrom the equipment being controlled, itdoesn’t provide isolation from the mains.So, before working inside any equipmentconnected to this unit, it must be un-plugged from the socket.

SUNIL KUMAR

Page 34: Electronics Projjects1

ELECTRONICS FOR YOU� ❚❚❚❚❚ �APRIL 2001

C I R C U I T I D E A S

����������������������

������������ �����

H ere are two simple, low-cost cir-cuits that can be used to shutoff the mains supply to any au-

dio or video equipment (such as tape re-corder, CD player, and amplifier). Thesecircuits are helpful to those in the habitof falling asleep with their music systemon.

The circuits will also protect the equip-ment from getting damaged due to high-voltage spikes whenever there is a re-sumption of power after a break. This ispossible because the equipment will getswitched off automatically under such con-ditions but will not get switched on auto-matically on resumption of mains supply.

The circuit in Fig. 1 can be used toshut off any cassette player that has areliable auto-stop mechanism. Wheneverswitch S1 is pressed momentarily, it ex-tends the supply to the step-down trans-former of the tape recorder and chargescapacitor C1 through diode D1. This, inturn, makes transistor T1 conduct andenergise relay RL1 to provide a parallelpath to switch S1, so that supply to thestep-down transformer continues evenwhen switch S1 is released.

When any button on the cassetteplayer is pressed, the capacitor chargesthrough diode D2. This ensures conduc-tion of transistor T1 and thus the conti-nuity of operation of cassette player. How-ever, whenever the auto-stop mechanismfunctions at the end of a tape, the leafswitch gets opened. This cuts the charg-ing path for the capacitor and it startsdischarging slowly. After about oneminute, the relay opens and interruptsmain power to the transformer. The timedelay can be increased by increasing thevalue of capacitor C1.

If the appliance used is a two-in-onetype (e.g. cassette player-cum-radio), justconnect another diode in parallel with di-odes D1 and D2 to provide an additionalpath for charging capacitor C1 via thetape-to-radio changeover switch, so thatwhen radio is played the relay does not

interrupt the power supply.The other circuit, shown in Fig. 2,

functions on the basis of the signal re-ceived from preamp of the appliance used.In this circuit, opamp µA741 is wired ininverting opamp configuration. It ampli-fies the signal received from the preamp.Timer NE555 is used to provide the nec-essary time delay of about one minute.

Preset VR1 is used to control the sen-sitivity of the circuit to differentiate be-

tween the noise and the signal. ResistorR4 offers feedback resistance to controlthe gain of the opamp. By increasing ordecreasing the value of resistor R4, thegain can be increased or decreased, re-spectively. The preset time delay of timerNE555 (which is about one minute) canbe increased by increasing the valueof C4.

Initial energisation of relay RL2 andcharging of capacitor C4 take place ondepression of switch S3 in the same man-ner as charging of capacitor C1 (refer Fig.1) on depression of switch S1. As a re-sult, pins 2 and 6 of NE555 go high andthe output of timer goes low to switch offmains supply from the relay to step-downtransformer X2 of the appliance. Bleederresistor R6 is used to discharge capacitorC4. Now if signals are received from the

SUNIL KUMAR

ARTHUR LOUIS

Page 35: Electronics Projjects1

ELECTRONICS FOR YOU� ❚❚❚❚❚ �APRIL 2001

C I R C U I T I D E A S

preamplifier, these are amplified by 741and fed to the base of transistor T2, whichkeeps capacitor C4 charged through re-sistor R5. When there is no signal, T2will not conduct and the capacitor slowlydischarges through R6. The output of 555goes high to switch off the relay and thus

the mains supply to transformer X2.Switch S2 can be depressed momentarilyif the device needs to be manuallyswitched off.

Note. The 12V supply should be pro-vided to the circuit from the equipment’spower supply. Opamp 741 should be

driven from the preamplifier of the gad-get used, and not from its power ampli-fier output. Switches S1 and S2 are 2-pole push-to-on switches. These can alsobe fabricated from 2-pole on-off switches,which are widely used in cassette play-ers, by removing the latch pin from them.

Page 36: Electronics Projjects1

ELECTRONICS FOR YOU� ❚❚❚❚❚ �DECEMBER 2001

C I R C U I T I D E A S

D. PRABAKARAN

���������� �

����� � ����SUNIL KUMAR

transmitters, and packet radio receivers.Transistors T1 and T2 form the mic

preamplifier. Resistor R1 provides the nec-essary bias for the condenser mic whilepreset VR1 functions as gain control for

The compact, low-cost condensermic audio amplifier described hereprovides good-quality audio of 0.5

watts at 4.5 volts. It can be used as partof intercoms, walkie-talkies, low-power

varying its gain. In order to increase theaudio power, the low-level audio outputfrom the preamplifier stage is coupled viacoupling capacitor C7 to the audio poweramplifier built around BEL1895 IC.

BEL1895 is a monolithic audio poweramplifier IC designed specifically for sen-sitive AM radio applications that delivers1 watt into 4 ohms at 6V power supplyvoltage. It exhibits low distortion andnoise and operates over 3V-9V supply volt-age, which makes it ideal for battery op-eration. A turn-on pop reduction circuit

prevents thud when the powersupply is switched on.

Coupling capacitor C7 deter-mines low-frequency response ofthe amplifier. Capacitor C9 actsas the ripple-rejection filter. Ca-pacitor C13 couples the outputavailable at pin 1 to the loud-speaker. R15-C13 combinationacts as the damping circuit foroutput oscillations. Capacitor C12provides the boot strapping func-tion.

This circuit is suitable for low-power HAM radio transmitters tosupply the necessary audio powerfor modulation. With simple modi-fications it can also be used inintercom circuits.

Page 37: Electronics Projjects1

C I R C U I T I D E A S

ELECTRONICS FOR YOUJUNE 2002

S.C. DWIVEDI

S everal circuits of a telephoneextension ringer have earlier beenpublished in EFY. The circuit pre-

sented here is distinct from these circuitsin that it has no electrical contact withthe telephone lines. It senses the inducedfluctuating electric field of telephone lineswhen the phone rings.

The input is sensed by a 5-8cm longplastic insulated flexible wire that is wound3-4 times on telephone cable. When thetelephone rings, about 20Hz AC voltage isavailable on the telephone line, whichcauses field fluctuation up to a few centimetresoutside the telephone cable also.

The 20Hz AC signal induced in thepick-up sensor is coupled to the clock pinof decade counter IC CD4017. The CD4017is wired as a divide-by-two counter byconnecting its pin 4 to reset pin 15.

As the input impedance of CMOS ICis extremely high, the induced electric fieldis sufficient to clock it. The output ob-tained at pin 3 of CD4017 is a 10Hz squarewave (half of input 20Hz signals). Thissquare wave signal is used to bias npn

CONTACTLESS RINGER FOR TELEPHONESPRADEEP G.

transistor BC547 in class-C mode of op-eration. The transistor conducts during thepositive half cycle of square wave. Thepositive voltage (high) available at theemitter of the transistor pulls reset pin 4of 555 timer IC high for the correspond-

ing duration. As a result, the alarm isactivated when the telephone rings.

When the handset is picked up or thetelephone stops ringing, the transistorstops conduction. Then reset pin of IC2goes low and the alarm is disabled.

Page 38: Electronics Projjects1

C I R C U I T I D E A S

ELECTRONICS FOR YOU JUNE 2002

Fig. 3: XOR gate as 9’s BCD subtractor

Fig. 2: XOR gate as controlled inverter Fig. 4: Up-/down-counter

TRUTH TABLE IIDown-Counter

DiCiBiAi DEC. EQ. D0C0B0A0 DEC. EQ.

0000 0 1001 90001 1 1000 80010 2 0111 70011 3 0110 60100 4 0101 50101 5 0100 40110 6 0011 30111 7 0010 21000 8 0001 11001 9 0000 0

together to serve asthe control signal,while theremaining inputsserve as input bits.

When controlsignal is zero, theoutput is same asthe input (buffermode). However,when control signalis held high, all bitsare inverted. Thusthe output iscomplement of theinput. Thisc o m p l e m e n t i n gfunction is useful in

subtraction circuits using 1’s and2’s complements.

In another configuration of XORgate shown in Fig. 3, the circuitworks as a 9’s BCD subtractor. Itsoutput=9 – input.

The circuit in Fig. 3 can be usedas a down-counter when employedwith 4-bit BCD counter IC 7490 asshown in Fig. 4. Truth table of thisconfiguration is given alongside. Asseen from the figure, this circuit canbe built using a single XOR-IC (TTL-

7486). The NOR gate used in the circuitis inevitable, but it can be replaced by aresistance-transistor logic (RTL) circuit orany other equivalent circuit.

XOR gate is a derived logic gate thatfinds many applications in digitalcircuits. Here we have described

use of XOR gate as controlled inverter,9’s BCD subtractor and up-/down-counter.

It can be seen from Fig. 1 and theaccompanying truth table that XOR gateworks as NOT (inverter) gate when itsone input is held high, and as a bufferwhen the same input is pulled low. Thecommon input (as shown in Fig. 2) can

EXCLUSIVE-OR GATE APPLICATIONSANAND TAMBOLI

S.C. DWIVEDI

Fig. 1: XOR gate as inverter and buffer

TRUTH TABLE IXOR Gate

A B Y

0 0 00 1 11 0 11 1 0

therefore be used ascontrol input for XORgates to behave asinverters or buffers. Hereone of the inputs of eachXOR gate are connected

Page 39: Electronics Projjects1

ELECTRONICS FOR YOU� ❚❚❚❚❚ �DECEMBER 2001

C I R C U I T I D E A S

S.C. DWIVEDI

Q uiz-type game shows are increas-ingly becoming popular on tele-vision these days. In such games,

fastest finger first indicators (FFFIs) areused to test the player’s reaction time.The player’s designated number is dis-played with an audio alarm when theplayer presses his entry button.

The circuit presented here determinesas to which of the four contestants firstpressed the button and locks out the re-maining three entries. Simultaneously, anaudio alarm and the correct decimal num-ber display of the corresponding contes-tant are activated.

When a contestant presses his switch,the corresponding output of latch IC2(7475) changes its logic state from 1 to 0.The combinational circuitry comprisingdual 4-input NAND gates of IC3 (7420)locks out subsequent entries by produc-ing the appropriate latch-disable signal.

Priority encoder IC4 (74147) encodes

the active-low input condition into the cor-responding binary coded decimal (BCD)number output. The outputs of IC4 afterinversion by inverter gates inside hex in-verter 74LS04 (IC5) are coupled to BCD-to-7-segment decoder/display driver IC6(7447). The output of IC6 drives common-

anode 7-segment LED display (DIS.1,FND507 or LT543).

The audio alarm generator comprisesclock oscillator IC7 (555), whose outputdrives a loudspeaker. The oscillator fre-quency can be varied with the help ofpreset VR1. Logic 0 state at one of theoutputs of IC2 produces logic 1 input con-dition at pin 4 of IC7, thereby enablingthe audio oscillator.

IC7 needs +12V DC supply for suffi-cient alarm level. The remaining circuitoperates on regulated +5V DC supply,which is obtained using IC1 (7805).

Once the organiser identifies the con-

testant who pressed the switch first, hedisables the audio alarm and at the sametime forces the digital display to ‘0’ bypressing reset pushbutton S5.

With a slight modification, this cir-cuit can accommodate more than four con-testants.

P. RAJESH BHAT

�������� ����

����� �������

Page 40: Electronics Projjects1

C I R C U I T I D E A S

ELECTRONICS FOR YOU FEBRUARY 2002

SUNIL KUMARFM BOOSTERPRADEEP G.

Here is a low-cost circuit of an FMbooster that can be used to listento programmes from distant FM

stations clearly. The circuit comprises acommon-emitter tuned RF preamplifierwired around VHF/UHF transistor

2SC2570. (Only C2570 is annotated on thetransistor body.)

Assemble the circuit on a good-qualityPCB (preferably, glass-epoxy). Adjust in-put/output trimmers (VC1/VC2) for maxi-mum gain.

Input coil L1 consists of four turns of20SWG enamelled copper wire (slightlyspace wound) over 5mm diameter former.It is tapped at the first turn from groundlead side. Coil L2 is similar to L1, but hasonly three turns. Pin configuration of tran-sistor 2SC2570 is shown in the figure.

Page 41: Electronics Projjects1

C I R C U I T I D E A S

ELECTRONICS FOR YOU APRIL 2002

MUSIC-ON-HOLD FORTELEPHONES S.C. DWIVEDI

SIBIN K. ZACHARIAH

C I R C U I T I D E A S

Here is a simple circuit for music-on-hold with automatic shut off fa-cility. During telephone conversa-

tion if you are reminded of some urgentwork, momentarily push switch S1 untilred LED1 glows, keep the telephone hand-set on the cradle, and attend to the workon hand. A soft music is generated andpassed into the telephone lines while theother-end subscriber holds. When you re-turn, you can simply pick up the handsetagain and continue with the conversation.

The glowing of LED1, while the musicis generated, indicates that the telephoneis in hold position. As soon as the handsetis picked up, LED1 is turned off and themusic stops.

Normally, the voltage across telephonelines is about 50 volts. When we pick upthe receiver (handset), it drops to about 9volts. The minimum voltage required toactivate this circuit is about 15 volts. If thevoltage is less than 15 volts, the circuitautomatically switches off. However, ini-tially both transistors T1 and T2 are cut off.The transistor pair of T1 and T2 performsswitching and latching action when switchS1 is momentarily pressed, provided the

line voltage is more than 15 volts, i.e.when the handset is placed on the cradle.

Once the transistor pair of TI and T2starts conducting, melody generator IC1

gets the supply and is activated. The mu-sic is coupled to the telephone lines viacapacitor C2, resistor R1, and the bridgerectifier.

With the handset off-hook after a ring,momentary depression of switch S1 causesforward biasing of transistor T2. Mean-while, if the handset is placed on thecradle, the current passing through R1(connected across the emitter and base ter-

minals of pnp transistor T1) developsenough voltage to forward bias transistorT1 and it starts conducting.

As a consequence, output voltage atthe collector of transistor T1 sustains for-ward biasing of transistor T2, even if switchS1 is released. This latching action keepsboth transistors T1 and T2 in conductionas long as the output of the bridge rectifieris greater than 15 volts.

If the handset is now lifted off-hook,the rectifier output drops to about 9 voltsand hence latching action ceases and the

circuit automatically switches off.(EFY lab note. The value of resistor

R2 determines the current through resistorR1 to develop adequate voltage (greaterthan 0.65 volts) for conduction of transis-tor T1. Hence it may be test selected be-tween 33 kilo-ohms and 100 kilo-ohms toobtain instant latching.)

The total cost of this circuit is aroundRs 50.

Page 42: Electronics Projjects1

ELECTRONICS FOR YOU� ❚❚❚❚❚ �AUGUST 2001

C I R C U I T I D E A S

S.C. DWIVEDI

P ortable loads such as video cam-eras, halogen flood lights, elec-trical irons, hand drillers, grind-

ers, and cutters are powered by connect-ing long 2- or 3-core cables to the mainsplug. Due to prolonged usage, the powercord wires are subjected to mechanicalstrain and stress, which can lead to in-ternal snapping of wires at any point. Insuch a case most people go for replacingthe core/cable, as finding the exact loca-

tion of a broken wire is difficult. In 3-corecables, it appears almost impossible to de-tect a broken wire and the point of breakwithout physically disturbing all the threewires that are concealed in a PVC jacket.

The circuit presented here can easilyand quickly detect a broken/faulty wireand its breakage point in 1-core, 2-core,and 3-core cables without physically dis-turbing wires. It is built using hex in-verter CMOS CD4069. Gates N3 and N4are used as a pulse generator that oscil-lates at around 1000 Hz in audio range.

The frequency is determined by timingcomponents comprising resistors R3 andR4, and capacitor C1. Gates N1 and N2are used to sense the presence of 230V ACfield around the live wire and buffer weakAC voltage picked from the test probe.The voltage at output pin 10 of gate N2can enable or inhibit the oscillator circuit.

When the test probe is away from anyhigh-voltage AC field, output pin 10 ofgate N2 remains low. As a result, diode

D3 conducts and inhibitsthe oscillator circuit fromoscillating. Simulta-neously, the output of gateN3 at pin 6 goes ‘low’ tocut off transistor T1. As aresult, LED1 goes off.When the test probe ismoved closer to 230V AC,50Hz mains live wire, dur-ing every positive half-cycle, output pin 10 of gateN2 goes high.

Thus during everypositive half-cycle of themains frequency, the os-cillator circuit is allowed

to oscillate at around 1 kHz, making redLED (LED1) to blink. (Due to the persis-tence of vision, the LED appears to beglowing continuously.) This type of blink-ing reduces consumption of the currentfrom button cells used for power supply.

A 3V DC supply is sufficient for pow-ering the whole circuit. AG13 or LR44type button cells, which are also used in-side laser pointers or in LED-based conti-nuity testers, can be used for the circuit.The circuit consumes 3 mA during thesensing of AC mains voltage.

For audio-visual indication, one mayuse a small buzzer (usually built insidequartz alarm time pieces) in parallel withone small (3mm) LCD in place of LED1and resistor R5. In such a case, the cur-rent consumption of the circuit will bearound 7 mA. Alternatively, one may usetwo 1.5V R6- or AA-type batteries. Usingthis gadget, one can also quickly detectfused small filament bulbs in serial loopspowered by 230V AC mains.

The whole circuit can be accommo-dated in a small PVC pipe and used as ahandy broken-wire detector. Before detect-ing broken faulty wires, take out any con-nected load and find out the faulty wirefirst by continuity method using any mul-timeter or continuity tester. Then connect230V AC mains live wire at one end ofthe faulty wire, leaving the other end free.Connect neutral terminal of the mainsAC to the remaining wires at one end.However, if any of the remaining wires isalso found to be faulty, then both ends ofthese wires are connected to neutral. Forsingle-wire testing, connecting neutralonly to the live wire at one end is suffi-cient to detect the breakage point.

In this circuit, a 5cm (2-inch) long,thick, single-strand wire is used as thetest probe. To detect the breakage point,turn on switch S1 and slowly move thetest probe closer to the faulty wire, begin-ning with the input point of the live wireand proceeding towards its other end.LED1 starts glowing during the presenceof AC voltage in faulty wire. When thebreakage point is reached, LED1 immedi-ately extinguishes due to the non-avail-ability of mains AC voltage. The pointwhere LED1 is turned off is the exactbroken-wire point.

While testing a broken 3-core roundedcable wire, bend the probe’s edge in theform of ‘J’ to increase its sensitivity andmove the bent edge of the test probe closerover the cable. During testing avoid anystrong electric field close to the circuit toavoid false detection.

K. UDHAYA KUMARAN, VU3GTH

���������� ����

���� �����

Page 43: Electronics Projjects1

C I R C U I T I D E A S

ELECTRONICS FOR YOUMARCH 2002

IR REMOTE SWITCHS.C. DWIVEDI

K.S. SANKAR

C I R C U I T I D E A S

Imagine the convenience of selectingTV channels using your remote andthen pointing the same remote to your

switchboard to switch on/off the fan orthe tubelight. Here is a simple circuit toremotely switch on/off any electrical de-vice through a relay using the normal TV/VCR/VCP/VCD remote control unit. It

works up to a distance of about 10 metres.The circuit is built around a 3-pin IR

IC receiver (Siemens SFH-506-38 or equiva-lent) that can detect 38kHz burst frequencygenerated by a TV remote. (This IR re-ceiver module has been covered earlier inmany projects published in EFY.)

The output pin of IR sensor goes low

when it detects IR light, triggering themonostable (1-second) built around timerNE555. The output of the mono togglesthe J-K flip flop, whose Q output drivesthe relay through SL100 npn transistor (T1).

LED2, LED3, and LED4 are used todisplay the status of each output stage dur-ing circuit operation. Back-EMF diode D5is used for protection. Transistor T1 is con-figured as an open-collector output deviceto drive the relay rated at 12V DC.

The circuit draws the power from volt-age regulator 7805. Capacitor C5 is sol-dered close to the IR sensor’s pins to avoid

noise and falsetriggering. Ca-pacitor C3 andresistor R3 alsoavoid false trig-gering ofm o n o s t a b l eNE555. Themonostable actsas a 1-secondhysterisis unit torestrict the flip-flop from gettingr e t r i g g e r e dwithin one sec-ond. To activateany other 12Vlogic device, usethe output acrossthe relay coil ter-minals.

Page 44: Electronics Projjects1

C I R C U I T I D E A S

ELECTRONICS FOR YOUJANUARY 2002

PRADEEP G.

Using this circuit you can communi-cate with your neighbourswirelessly. Instead of RF signals,

light from a laser torch is used as thecarrier in the circuit. The laser torch cantransmit light up to a distance of about 500metres. The phototransistor of the receivermust be accurately oriented towards thelaser beam from the torch. If there is anyobstruction in the path of the laser beam,no sound will be heard from the receiver.

The transmitter circuit (Fig. 1) com-prises condenser microphone transistoramplifier BC548 (T1) followed by an op-amp stage built around µA741 (IC1). Thegain of the op-amp can be controlled withthe help of 1-mega-ohm potmeter VR1.The AF output from IC1 is coupled to thebase of transistor BD139 (T2), which, inturn, modulates the laser beam.

The transmitter uses 9V power sup-ply. However, the 3-volt laser torch (afterremoval of its battery) can be directly con-nected to the circuit—with the body ofthe torch connected to the emitter ofBD139 and the spring-loaded lead protrud-ing from inside the torch to circuit ground.

The receiver circuit (Fig. 2) uses annpn phototransistor as the light sensor thatis followed by a two-stage transistorpreamplifier and LM386-based audiopower amplifier. The receiver does notneed any complicated alignment. Just keepthe phototransistor oriented towards theremote transmitter’s laser point and ad-just the volume control for a clear sound.

To avoid 50Hz hum noise in thespeaker, keep the phototransistor away

from AC light sources such as bulbs.The reflected sunlight, however, does not

cause any problem. But the sensor shouldnot directly face the sun.

LASER TORCH-BASED VOICETRANSMITTER AND RECEIVER SANI THEO

Page 45: Electronics Projjects1

C I R C U I T I D E A S

ELECTRONICS FOR YOU JANUARY 2002

MOBILE PHONEBATTERY CHARGERT.K. HAREENDRAN

Mobile phone chargers available inthe market are quite expensive.The circuit presented here comes

as a low-cost alternative to charge mobiletelephones/battery packs with a rating of

7.2 volts, such as Nokia 6110/6150.The 220-240V AC mains supply is

downconverted to 9V AC by transformerX1. The transformer output is rectified bydiodes D1 through D4 wired in bridge

SANI THEOconfiguration and the positive DC supplyis directly connected to the charger’s out-put contact, while the negative terminalis connected through current limiting re-sistor R2.

LED2 works as a power indicator withresistor R1 serving as the current limiterand LED3 indicates the charging status.During the charging period, about 3 voltsdrop occurs across resistor R2, which turnson LED3 through resistor R3.

An external DC supply source (for in-stance, from a vehicle battery) can also beused to energise the charger, where resis-tor R4, after polarity protection diode D5,limits the input current to a safe value.The 3-terminal positive voltage regulatorLM7806 (IC1) provides a constant voltageoutput of 7.8V DC since LED1 connectedbetween the common terminal (pin 2) andground rail of IC1 raises the output volt-age to 7.8V DC. LED1 also serves as apower indicator for the external DC sup-ply.

After constructing the circuit on averoboard, enclose it in a suitable cabinet.A small heat sink is recommended for IC1.

Page 46: Electronics Projjects1

C I R C U I T I D E A S

ELECTRONICS FOR YOU NOVEMBER 2002

This circuit (Fig. 1), used in conjunc-tion with a thin piezoelectric plate,senses the vibration generated on

knocking a surface (such as a door or atable) to activate the alarm. It uses readily-available, low-cost components and canalso be used to safeguard motor vehicles.The piezoelectric plate is used as the sen-sor. It is the same as used in ordinary

piezobuzzers and is easily available in themarket.

The piezoelectric plate can convert anymechanical vibration into electrical varia-tion. As it doesn’t sense sound from a dis-tance like a microphone, it avoids falsetriggering. The plate can be fixed on a door,cash box, cupboard, etc using adhesive. A 1-1.5m long, shielded wire is connected be-tween the sensor plate and the input of the

KNOCK ALARM

PRADEEP G.

SUNIL KUMAR

circuit. When someone knocks on thedoor, the piezoelectric sensor gener-ates an electrical signal, which is am-plified by transistors T1 through T3.

The amplified signal is rectifiedand filtered to produce a low-levelDC voltage, which is further ampli-fied by the remaining transistors. Thefinal output from the collector of pnptransistor T6 is applied to reset pin 4of 555 (IC1) that is wired as an

astable multivibrator. Whenever the col-lector of transistor T6 goes high, the astablemultivibrator activates to sound an alarmthrough the speaker. The value of resistorR12 is chosen between 220 and 680 ohmssuch that IC1 remains inactive in the ab-sence of any perceptible knock.

When the circuit receives an input sig-nal due to knocking, the alarm gets acti-vated for about 10 seconds. This is the

Fig. 1: The circuit of knock alarm

Fig. 2: Proposed installation of knock alarm

time that capacitor C5 connected betweenthe emitter of transistor T4 and groundtakes to discharge after a knock. The timedelay can be changed by changing thevalue of capacitor C5. After about 10 sec-onds, the alarm is automatically reset.

The circuit operates off a 9V or a 12Vbattery eliminator. The proposed installa-tion of the knock alarm is shown in Fig. 2.

This circuit costs around Rs 75.

Page 47: Electronics Projjects1

C I R C U I T I D E A S

ELECTRONICS FOR YOU MARCH 2002

SANI THEODING-DONG BELLPRAVEEN SHANKER

This simple and cost-effective doorbell circuit is based on IC 8021-2from Formox Semiconductors

(Website address: [email protected]). It is an 8-pin DIP IC whose onlyfour pins, as shown in the circuit, have

been used.The IC has an in-built

circuitry to produce ding-dong sound each time itspin 3 is pulled low. Thesound is stored in the ICas bits, as in a ROM. Thesound output from the ICcan’t however drive aspeaker directly, as thisputs strain on the device.Therefore a complemen-

tary-pair, two-transistor amplifier is usedto amplify the sound to a fair level ofaudiblity. You may either use a piezotweeter or an 8-ohm, 500mW speaker atthe output.

During the standby period, the IC con-sumes nominal current of a few microam-peres only. Therefore switch S1 may bekept closed. Each time switch S2 ispressed, ding dong sound is producedtwice. If you try to press switch S2 a sec-ond time when the first ding dong soundis still being produed, it has no effect what-ever and the two ding-dong bell soundswill be invariably produced.

The circuit costs no more than Rs 35and the IC 8021-2 used in the circuit isreadily available for around Rs 15 in themarket.

Page 48: Electronics Projjects1

C I R C U I T I D E A S

ELECTRONICS FOR YOU DECEMBER 2002

C I R C U I T I D E A S

M.M. VIJAI ANAND

This circuit conditions different sig-nals of frequency below 1 kHz anddisplays their waveforms on the PC’s

screen. The hardware is used to conditionthe input waveform and convert it to thedigital format for interfacing to the PC. Thesoftware for acquiring the data into the PCand displaying the same on its screen iswritten in Turbo C.

The input waveform (limited to 5Vpeak-to-peak) is first applied to a full-waverectifier comprising op-amps A1 and A2 ofquad op-amp LM324 (IC4) and a zero-crossing detector built around LM3914 dot/bar display driver (IC8) simultaneously.

The full-wave rectifier rectifies the in-

SANI THEO

put signal such that the negative half cycleof the input signal is available in the posi-tive side itself, so both the half cycles areread as positive when it is given as inputto the ADC. During positive half cycle,diode D3 is on and diode D4 is off, andop-amps A1 and A2 act as inverters. Thusthe output is a replica of the input. Duringthe negative half cycle, diode D3 is offand diode D4 is on. WithR2=R3=R4=R5=R6=R=330 ohms, thevoltage (V) at inverting pin 2 of op-ampA1 is related to the input voltage (Vi) asfollows:

Vi/R +V/(2R)+V/R=0V= -(2/3)Vi

PC-BASED OSCILLOSCOPE

The final output voltage (Vo) at pin 7of op-amp A2 is given by the followingrelationship:

Vo=(1+R/2R)(-2Vi/3)= -ViAs Vi is negative, the output voltage ispositive.

The zero-crossing detector detectswhether the cycle is positive or negative.It is the most critical part of the circuitand if it operates improperly, the symme-try of the analogue signal displayed in thePC monitor gets affected. At the zero-cross-ing instant when the input signal transitsto negative side, the zero-crossing detec-tor informs the PC by taking pin 15 of 25-pin ‘D’ connector of the parallel port high.

Page 49: Electronics Projjects1

C I R C U I T I D E A S

ELECTRONICS FOR YOUDECEMBER 2002

The input at pin 15 of ‘D’ connector goeslow when the input signal transits to posi-tive side. The zero-crossing detector com-municates with the PC through bit D3 ofthe status port 379Hex.

The zero-crossing detector has beenrealised using LM3914 IC. You may adjustVR1 such that the last LED (LED10) goesoff when the input signal transits negativeside of the input waveform. The LM3914itself rectifies the input signal and allowsonly positive half of the cycle.

The output from the full-wave rectifieris applied to the input of a sample-and-holdcircuit comprising op-amps A3 and A4 ofthe LM324 (IC5), capacitor C3, transistorT1 (SL100), and analogue switch IC6(CD4016). This circuit samples the inputsignal, i.e. it divides the waveform into anumber of voltages or points and inputseach voltage level (with a delay) to theADC for conversion into the digital format.Op-amps A3 and A4, along with a switchfrom IC CD4016 and a 1500pF capacitorwith sampling time of 20 µs, are used asvoltage followers/buffers.

When the base of transistor T1 is madelow via strobe pin 1 (bit Do of I/O port37A) of 25-pin D connector of the parallelport, the transistor stops conducting andthe voltage at its collector goes high. Thehigh voltage at the collector of transistorT1 closes the switch inside CD4016. As aconsequence, the analogue input signal isapplied to the capacitor, which charges to-wards the signal voltage.

When the switch is subsequentlyopened by applying a logic-high voltagefrom pin 1 of ‘D’ connector to the base oftransistor T1, the capacitor retains the volt-age with a loss of about 20 mV/sec andthis voltage is given to input pin 6 of theADC0804 (IC3) via buffer A4 for conver-sion to the digital format. When the num-ber of sampling points in the input signalwaveform is increased, the reconstructedwaveform becomes more accurate.

The ADC0804 is compatible with mi-croprocessors. It is a 20-pin IC that workswith 5V supply. It converts the analogueinput voltage to 8-bit digital output. Thedata bus is tristate buffered. With eightbits, the resolution is 5V/255 = 19.6 mV.

The inbuilt clock generator circuit pro-duces a frequency of about 640 kHz with

R1=10 kilo-ohms and C4=150 pF, whichare the externally connected timing com-ponents. The conversion time obtained isapproximately 100 µs. The functions ofother pins are given below:

Pin 1 (CS): This is active-low chip-select pin.

Pin 2 (RD): This active-lowpin enables the digital outputbuffers. When high, the 8-bit bus will bein Hi-Z state.

Pin 3 (WR): This active-low pin is usedto start the conversion.

Pin 9 (Vref/2): This is optional inputpin. It is used only when the input signalrange is small. When pin 9 is at 2V, therange is 0-4V, i.e. twice the voltage at pin 9.

Pin 6 (V+), Pin 7(V-): The actual in-put is the difference in voltages applied tothese pins. The analogue input can rangefrom 0 to 5V.

In this circuit, pins 1 and 2 are alwaysmade low, so the IC and the buses arealways enabled. Pin 9 is made open, aswe use analogue input with 0-5V range.Pin 7 is grounded.

Pin 5 (INTR): This active-low pin indi-cates the end of conversion. It is connectedto pin 17 (bit D3 of I/O port 37A) of ‘D’connector. (Note that this bit is inverted.)

The start-of-conversion command viapin 16 of ‘D’ connector is applied to pin 3of the ADC0804. Since we cannot read 8-bit digital data output from ADC throughthe 4-bit status port at a time, we divide itin two 4-bit parts and read. Hence theADC data output is multiplexed throughtwo 4-bit sections of octal buffers of IC1(74244) with the help of output-enable sig-nals from pins 2 and 9 of ‘D’ connector topins 1 and 19 (OE1 and OE2, respectively)of IC1. The digital data output from IC1 isinterfaced to the PC via pins 13 (D4), 12(D5), 10 (D6), and 11 (D7) of status inputport 379H of ‘D’ connector.

The circuit uses 9V and 5V regulatedDC supply voltages as shown in the cir-cuit diagram.

A PC printer port is an inexpensiveplatform for implementing low-frequencydata acquisition projects. Each printer portconsists of data, status, and control portaddresses. These addresses are in sequen-tial order; for example, if the data portaddress is 0x0378, the corresponding sta-

tus port address is 0x0379 and thecontrol port address is 0x037a. The portaddresses for parallel ports are summarisedbelow:

(EFY Lab note. For details of the par-allel port pins, refer ‘PC-based Dial Clockwith Timer’ project published in June 2002issue of EFY.)

The software, written in C program-ming language, is user-friendly and easy-to-understand. It gets data from the devel-oped hardware circuit and displays it inthe graphical screen with some changes.

The C program includes two user-de-fined functions with the main function:graphics( ) and settings( ). The settings( )function is used to adjust the voltage andtime scale. The graphics( ) function is usedto display the waveform on the screen. Thesample control signal is used to close theswitch in the sample-and-hold circuit, so thecapacitor charges towards the analogue in-put voltage. After the sampling is over, theswitch is opened using the same signal.Then the start-of-conversion control signalis given to start the conversion. The sam-pling time is approximately 20 µs and theconversion time is approximately 100 µs.

After the conversion is over, the 8-bitbinary data for the specific voltage sampleis available in the data bus of the ADC.Since the PC accepts only 4-bit data throughthe status port (379H), the 8-bit data mustbe split into two 4-bit data, which are ac-cepted one after another. This is done by IC74244, which is controlled by D0 and D7bits of the data port. Then the two 4-bitdata are packed to get the final 8-bit data.

The default BGI directory path is setas ‘c:\tc\bgi’. The sampling time is de-cided by the ‘for’ loop that uses the sampvalue. The maximum delay producedshould be greater than 20 µs, which is themaximum acquisition time of the capaci-tor. When the sample value is increased,the number of points on the input signaldecreases and therefore the accuracy de-creases. The time scale may be calibratedwith 50Hz sine wave as reference.

This circuit costs around Rs 400.

Printer Data port Status port Control port

LPT1 0x0378 0x0379 0x037aLPT2 0x0278 0x0279 0x027aLPT3 0x03bc 0x03bd 0x03be

/* PROGRAM FOR PC OSCILLOSCOPE *//*by M.M.VIJAI ANAND B.E (E.E.E) C.I.T */#include<dos.h>#include<time.h>

#include<stdio.h>#include <graphics.h>#include<string.h>#include<stdlib.h>

#define data 0x0378#define stat 0x0379#define cont 0x037a

PROGRAM IN ‘C’ FOR PC OSCILLOSCOPE

Page 50: Electronics Projjects1

C I R C U I T I D E A S

ELECTRONICS FOR YOU DECEMBER 2002

void graphics(int[],int[]); //FUNCTION TO DIS-PLAY GRAPH AND WAVEFORM

void settings(); //FUNCTION TO CHANGETHE SETTINGS(TIME AND VOLT-AGE)

long int samp=7000; //PLEASE CHECK THESE VAL-UES WHEN CONVERSION IS

// NOT PROPER(+-3000)

float scale=1;float times=1;char again=’a’;int number=800;

void main(){int i,j,k,a[1700],b[1700],c[1700],e[1700]; //This value

1700 is given when we want to compress the waveform

//done when we compress the time scalelong int b1;clrscr();settings();while(again==’a’){for(i=0;i<number;i++){outportb(cont,0x05^0x0b);outportb(cont,0x04^0x0b);e[i]=(inportb(stat)^0x80)&0x08;for(b1=0;b1<=samp;b1++) //sampling

time is approximately 50 µsec{}

outportb(cont,0x05^0x0b);outportb(cont,0x01^0x0b);outportb(cont,0x05^0x0b);while((inportb(cont)&0x08)==0x00) //converstion

time is approximately 100 µsec{}

outportb(data,0xf0);a[i]=(inportb(stat)^0x80)&0xf0;outportb(data,0x01);b[i]=(inportb(stat)^0x80)&0xf0;outportb(data,0xff);}for(i=0;i<number;i++){a[i]=a[i]>>4;c[i]=a[i]+b[i];c[i]=c[i]*0.0196*45/scale;}graphics(c,e);}

}

void graphics(int a1[],int e1[]){int gd=DETECT,gm,max,may,a,b,c,im,error,get=5;

char str[10],*st=”-”,d;

clrscr();initgraph(&gd,&gm,”c:\\tc\\bgi”); //use

default bgi patherror=graphresult();if(error != grOk){printf(“Graphics error %s /n”,grapherrormsg(error));

//reports error when

//graphics is not setprintf(“PRESS ANY KEY TO EXIT”);getch();exit(1);}setbkcolor(LIGHTCYAN);setcolor(MAGENTA);

settextstyle(0,0,2);max=getmaxx();may=getmaxy();may=may-20;outtextxy(0,may,”OSCILLOSCOPE”);settextstyle(0,0,1);setcolor(BLUE);outtextxy(max-200,may+2,”press ‘a’ for next

sample”);

setcolor(BROWN);outtextxy(max-200,may+10,”press any key to exit”);setcolor(GREEN);settextstyle(0,0,0);for(a=0;a<=may;a+=get){line(0,a,800,a);}for(a=0;a<=max;a+=get){line(a,0,a,may);}setcolor(BROWN);setlinestyle(0,3,0);line(max/2,0,max/2,may);line(0,may/2,max,may/2);setcolor(RED);for(a=0,c=0;a<=max;a+=50,c++){putpixel(a,may/2,BLUE);itoa((a-c*30)*times/2,str,10);outtextxy(a+3,may/2+3,str);}for(b=(may/2)-45,c=1;b>=0;b-=45,c++){itoa((c*scale),str,10);putpixel((max/2),b,BLUE);outtextxy((max/2)+3,b+3,str);}for(b=(may/2)+45,c=1;b<=800;b+=45,c++){itoa((c*scale),str,10);strcat(st,str);putpixel((max/2),b,BLUE);outtextxy((max/2)+2,b+2,st);strcpy(st,”-”);}setcolor(MAGENTA);

outtextxy(max-80,may/2+30,”time(msec)”);settextstyle(0,1,0);outtextxy((max/2)-10,0,”volt(s)”);

setlinestyle(0,0,0);setcolor(RED);moveto(0,may/2);for(b=0,c=0;b<=number;c+=1, b++){if(e1[b]!=0x08){lineto(c*times,((may/2)-a1[b]));}else{lineto(c*times,((may/2)+a1[b]));}}again = getch();closegraph();restorecrtmode();

}

void settings(){int gd=DETECT,gm,error,max,may,b;char c,d,e[2],m,*n;times=1;initgraph(&gd,&gm,”c:\\tc\\bgi”); //default bgi

directory patherror=graphresult();if(error != grOk){printf(“Graphics error %s /n”,grapherrormsg(error));printf(“PRESS ANY KEY TO EXIT”);getch();exit(1);}max=getmaxx();setbkcolor(LIGHTBLUE);settextstyle(1,0,0);setcolor(BROWN);outtextxy(max/2-60,20,”SETTINGS”);line(0,60,800,60);setcolor(MAGENTA);settextstyle(1,0,1);outtextxy((max/4)-70,80,”Voltage Scale”);settextstyle(0,0,0);setcolor(BROWN);outtextxy(10,120,”DEFAULT :”);outtextxy(10,120,” 1 unit = 1 volt”);setcolor(RED);outtextxy(10,170,”TYPE ‘C’ TO CHANGE AND ‘D’ TO

DEFAULT”);c=getch();if(c==’c’)

{outtextxy(10,200,”TYPE 1 for 1 unit = 2 volt”);outtextxy(10,240,”TYPE 2 for 1 unit = 4 volt”);outtextxy(10,300,”TYPE 3 for user defined”);switch(getch()){ case ‘1’ :

{ scale=2; break;}

case ‘2’ :{scale = 4;break;}

case ‘3’ : { outtextxy(10,340,”TYPE VALUES FROM 1 TO 9

(minimize) or m to (magnify)”); d=getch(); if(d==’m’) { outtextxy(10,360,”TYPE a (1 unit = 0.5 volt) or b

(1 unit = 0.25 volt)”); switch(getch())

{ case ‘a’: { scale=0.5; break; } case ‘b’: { scale=0.25; break; } }

} else { e[0]=’0'; e[1]= ‘0’; e[2]=d; scale=atoi(e); break; } } } }setcolor(BROWN);outtextxy(10,380,”TYPE C TO CHANGE TIME SET-

TINGS”);m=getch();if( m==’c’){cleardevice();outtextxy(10,20,”X AXIS 1 unit= 10msec CHANGE

TO x(10msec)”);outtextxy(10,40,”TYPE ‘a’ IF x IS (2 to 9) ,’b’ IF x IS

(10 to 99) AND ‘c’ IF x IS (.5 TO .9)”);switch(getch()) { case ‘a’: outtextxy(10,60,”x value is ....”); n[0]=getch(); times=atoi(n); itoa(times,n,10); outtextxy(10,70,n); break; case ‘b’: outtextxy(10,60,”x value is ....”); n[0]=getch(); n[1]=getch(); times=atoi(n); itoa(times,n,10); outtextxy(10,70,n); break;

case ‘c’:outtextxy(10,60,”x value is...”);getch();n[0]=getch();times=atoi(n)*0.1;outtextxy(10,70,”scale decremented”);break;

}number=800;if(times<1){number=number/times;}getch();}closegraph();restorecrtmode();}

Page 51: Electronics Projjects1

ELECTRONICS FOR YOU� ❚❚❚❚❚ �FEBRUARY 2001

C I R C U I T I D E A S

S.C. DWIVEDI

This circuit is able to handle nineindependent telephones (using asingle telephone line pair) lo-

cated at nine different locations, say,up to a distance of 100m from eachother, for receiving and making outgo-ing calls, while maintaining conversa-tion secrecy. This circuit is useful whena single telephone line is to be sharedby more members residing in differentrooms/apartments.

Normally, if one connects ninephones in parallel, ring signals are

���������������� ���

heard in all the nine telephones (it isalso possible that the phones will notwork due to higher load), and out ofnine persons eight will find that the callis not for them. Further, one can over-hear others’ conversation, which is notdesirable. To overcome these problems,the circuit given here proves beneficial,as the ring is heard only in the desiredextension, say, extension number ‘1’.

For making use of this facility, thecalling subscriber is required to initiallydial the normal phone number of the

called subscriber. When the call is estab-lished, no ring-back tone is heard by thecalling party. The calling subscriber hasthen to press the asterik (*) button onthe telephone to activate the tone mode(if the phone normally works in dial mode)and dial extension number, say, ‘1’, within10 seconds. (In case the calling subscriberfails to dial the required extension num-ber within 10 seconds, the line will bedisconnected automatically.) Also, if thedialed extension phone is not lifted within10 seconds, the ring-back tone will cease.

The ring signal on the main phoneline is detected by opto-coupler MCT-2E (IC1), which in turn activates the10-second ‘on timer’, formed by IC2(555), and energises relay RL10 (6V, 100-

ohm, 2 C/O). One of the ‘N/O’contacts of the relay has beenused to connect +6V rail to theprocessing circuitry and theother has been used to provide220-ohm loop resistance to de-energise the ringer relay intelephone exchange, to cut offthe ring.

When the caller dials theextension number (say, ‘1’) intone mode, tone receiverCM8870 (IC3) outputs code‘0001’, which is fed to the 4-bit BCD-to-10 line decimal de-coder IC4 (CD4028). The out-put of IC4 at its output pin14 (Q1) goes high andswitches on the SCR (TH-1)and associated relay RL1. Re-lay RL1, in turn, connects, viaits N/O contacts, the 50Hz ex-tension ring signal, derivedfrom the 230V AC mains, tothe line of telephone ‘1’. Thisring signal is available to tele-phone ‘1’ only, because halfof the signal is blocked by di-ode D1 and DIAC1 (which donot conduct below 35 volts).

As soon as phone ‘1’ islifted, the ring current in-creases and voltage dropacross R28 (220-ohm, 1/2W re-sistor) increases and operatesopto-coupler IC5 (MCT-2E).This in turn resets timer IC2causing:

(a) interruption of thepower supply for processingcircuitry as well as the ring

DHURJATI SINHA

Page 52: Electronics Projjects1

C I R C U I T I D E A S

ELECTRONICS FOR YOUAPRIL 2002

SOLIDSTATE SWITCH FORDC-OPERATED GADGETS

S.C. DWIVEDI

PRAVEEN SHANKER

This solidstate DC switch can be as-sembled using just three transistorsand some passive components. It

can be used to switch on one gadget whileswitching off the second gadget with mo-mentary operation of switch. To reversethe operation, you just have to momen-tarily depress another switch.

The circuit operates over 6V-15V DCsupply voltage. It uses positive feedback

from transistor T2 to transistor T1 to keepthis transistor pair in latched state (on/off), while the state of the third transistorstage is the complement of transistor T2’sconduction state.

Initially when switch S3 is closed, bothtransistors T1 and T2 are off, as no for-ward bias is available to these, while thebase of transistor T3 is effectively groundedvia resistors R8 and R6 (shunted by the

load of the firstgadget). As a re-sult, transistor T3is forward biasedand gadget 2 getsthe supply. Thisis indicated byglowing of LED2.

When switchS1 is momentarilydepressed, T1gets the basedrive and itgrounds the baseof transistor T2via resistor R4.

Hence transistor T2 (pnp) also conducts.The positive voltage available at the col-lector of transistor T2 is fed back to thebase of transistor T1 via resistor R3. Hencea latch is formed and transistor T2 (asalso transistor T1) continues to conduct,which activates gadget 1 and LED1 glows.

Conduction of transistor T2 causes itscollector to be pulled towards positive rail.Since the collector of T2 is connected tothe base of pnp transistor T3, it causestransistor T3 to cut off, switching off thesupply to gadget 2) as well as extinguish-ing LED2. This status is maintained untilswitch S2 is momentarily pressed. Depres-sion of switch S2 effectively grounds thebase of transistor T1, which cuts off andthus virtually opens the base-emitter cir-cuit of transistor T2 and thus cutting itoff. This is the same condition as was ob-tained initially. This condition can be re-versed by momentarily pressing switch S1as explained earlier.

EFY lab note. During testing, it wasnoticed that for proper operation of thecircuit, gadget 1 must draw a current ofmore than 100 mA (i.e. the resistance ofgadget 1 must be less than 220 ohms) tosustain the latched ‘on’ state. But this stipu-lation is not applicable for gadget 2. Amaximum current of 275 mA could bedrawn by any gadget.

The total cost of this circuit is aroundRs 30.

Page 53: Electronics Projjects1

C I R C U I T I D E A S

ELECTRONICS FOR YOUMARCH 2003

S.C. DWIVEDI

This reliable and easy-to-operate elec-tronic security system can be usedin banks, factories, commercial es-

tablishments, houses, etc.The system comprises a monitoring sys-

tem and several sensing zones. Each sens-ing zone is provided with a closed-loopswitch known as sense switch. Senseswitches are fixed on the doors of premisesunder security and connected to the moni-toring system. As long as the doors areclosed, sense switches are also closed. Themonitoring system can be installed at aconvenient central place for easy operation.

Fig. 1 shows the monitoring circuitonly for zone 1 along with the commonalarm circuit. For other zones, themonitoring circuit is identical, with onlythe prefixes of components changingas per zone number. Encircled points A,B, and C of each zone monitoring circuitneed to be joined to the correspondingpoints of the alarm circuit (upper halfof Fig. 1).

When zone 1 sensing switch S11, zoneon/off slide switch S12, and system on/offswitch S1 are all on, pnp transistor T12reverse biases to go in cut-off condition,with its collector at around 0 volt. Whenthe door fitted with sensor switch S11 isopened, transistor T12 gets forward biasedand it conducts. Its collector voltage goeshigh, which forward biases transistor T10via resistor R10 to turn it on. (CapacitorC10 serves as a filter capacitor.) As a re-sult, the collector voltage of transistor T10falls to forward bias transistor T11, whichconducts and its collector voltage is sus-tained at a high level. Under this latchedcondition, sensor switch S11 and the stateof transistor T12 have no effect. In thisstate, red LED11 of the zone remains lit.

Simultaneously, the high-level voltagefrom the collector of transistor T11 via di-ode D10 is applied to V

DD pin 5 of sirensound generator IC1 (UM3561) whose pin2 is grounded. Resistor R3 connected acrosspins 7 and 8 of IC1 determines the fre-quency of the in-built oscillator. As a re-sult, IC1 starts generating the audio signaloutput at pin 3. The output voltage fromIC1 is further amplified by Darlington pairof transistors T1 and T2. The amplified

ELECTRONIC SECURITY SYSTEMK. BHARATHAN output of

t h eDarlingtonpair drivesthe loud-s p e a k e rwhose out-put volumecan be con-trolled bypotentiom-eter VR1.CapacitorC1 servesas a filtercapacitor.

Y o ucan alterthe alarmsound asdesired bychang ingthe con-nections ofIC1 asshown inthe table.

T h ecircuit con-tinues tosound thealarm untilzone door

is closed (to close switch S11) and thereset switch is pressed momentarily (whichcauses transistor T10 to cut off, returningthe circuit to its initial state).

Fig. 1: Monitoring circuit along with the alarm circuit

The system operates off a 3V DC bat-tery or recharging battery with chargingcircuit or battery eliminator. If desired,more operating zones can be added.

Fig. 2: Physical layout of sensors and monitoring/alarm system

Page 54: Electronics Projjects1

C I R C U I T I D E A S

ELECTRONICS FOR YOU MARCH 2003

Alarm sound Circuit connections

IC pin 1 connected to IC pin 6 connected to

Police siren NC NCAmbulance siren NC VDD

Fire engine Sound NC VSS

Machinegun sound VSS NC

Note. NC indicates no connection

Initially keep the monitoring systemswitch S1 off. Keep all the zone doors fixedwith sensing switches S11, S21, S31, S41,etc closed. This keeps the sensing switches

for respectivezones in closedposition. Alsokeep zone slideswitches S12, S22,S32, S42, etc in‘on’ position. Thisputs the system inoperation, guard-ing all the zone

doors.Now, if the door of a particular zone

is opened, the monitoring system soundsan audible alarm and the LED correspond-

ing to the zone glows to indicate that thedoor of the zone is open. The alarm andthe LED indication will continue even af-ter that particular door with the sensingswitch is immediately closed, or even ifthat switch is removed/damaged or con-necting wire is cut open.

Any particular zone in the monitoringsystem can be put to operation or out ofoperation by switching on or switching offthe corresponding slide switch in the moni-toring system.

The circuit for monitoring four zonescosts around Rs 400.

Page 55: Electronics Projjects1

ELECTRONICS FOR YOU� ❚❚❚❚❚ �APRIL 2001

C I R C U I T I D E A S

������������������

Here is a low-cost, invisible lasercircuit to protect your housefrom thieves or trespassers. A

laser pointer torch, which is easily avail-able in the market, can be used to oper-ate this device.

The block diagram of the unit shownin Fig. 1 depicts the overall arrangementfor providing security to a house. A lasertorch powered by 3V power-supply is used

for generating a laser beam.A combination of plain mir-rors M1 through M6 is usedto direct the laser beamaround the house to form anet. The laser beam is di-rected to finally fall on anLDR that forms part of thereceiver unit as shown in Fig.2. Any interruption of the

beam by a thief/trespasser will re-sult intoenergisation ofthe alarm. The3V power-supplycircuit is a con-ventional full-wave rectifier-fil-ter circuit. Anyalarm unit thatoperates on 230VAC can be con-

nected at the output.The receiver unit comprises two iden-

tical step-down transformers (X1 and X2),two 6V relays (RL1 and RL2), an LDR, atransistor, and a few other passive com-

ponents. When switches S1 and S2 areactivated, transformer X1, followed by afull-wave rectifier and smoothing capaci-tor C1, drives relay RL1 through the la-ser switch.

The laser beam should be aimed con-tinuously on LDR. As long as the laserbeam falls on LDR, transistor T1 remainsforward biased and relay RL1 is thus inenergised condition. When a personcrosses the line of laser beam, relay RL1turns off and transformer X2 getsenergised to provide a parallel path acrossN/C contact and the pole of relay RL1.In this condition, the laser beam will haveno effect on LDR and the alarm will con-tinue to operate as long as switch S2 ison.

When the torch is switched on, thepointed laser beam is reflected from a defi-nite point/place on the periphery of thehouse. Making use of a set of properlyoriented mirrors one can form an invis-ible net of laser rays as shown in theblock diagram. The final ray should fallon LDR of the circuit.

Note. LDR should be kept in a longpipe to protect it from other sources oflight, and its total distance from thesource may be kept limited to 500 metres.The total cost of the circuit, including thelaser torch, is Rs 400 or less.

SUNIL KUMAR

MALAY BANERJEE

Page 56: Electronics Projjects1

C I R C U I T I D E A S

ELECTRONICS FOR YOUAPRIL 2003

SANI THEO

SONG NUMBERDISPLAYPRABHASH K.P.

Here’s a circuit to display the song number in an audiosystem for quick reference to songs. It also serves thepurpose of an extra visual indicator in modern audio

systems.When the power is switched on, the power-on-reset cir-

cuit comprising 3.3k resistor R20 and 1µF, 25V capacitor C6resets the counters, showing ‘00’ in the display. One can alsoreset the display to zero at any time by pressing reset switchS1.

When the first song starts playing, the output pins of IC1(KA2281) go low and capacitor C5 starts charging. This for-ward biases transistor T1 and hence the input to IC3 at pin 1goes to high state. As a result, the output of the counter goesto the next state, showing 01 on the display. The counterremains in this state until the song is completed.

During the time gap before the next song starts playing,capacitor C5 discharges. After discharging of capacitor C5,the input to IC3 becomes low again. When the song starts,the process described above is repeated and the display shows02. You can adjust VR3 to change the time gap setting. Thismust be set such that the circuit doesn’t respond to shortgaps, if any, within a song and responds only to long gapsbetween different songs.

Transistor T2 helps in gap-delay adjustment. The inten-sity of LED11 diminishes when a song is completed and thecounter is ready to accept the next pulse.

Connect the input to the preamp output or equaliser out-put of the audio system. Adjust VR1 and VR2 to get thecorrect audio-level indication. If you are already using KA2281for audio-level indication, just connect diodes D1 and D2 asshown in this circuit.

Note that the counter counts the songs by detecting thegaps. Therefore any long gap within a song may cause falsetriggering and the display will also be incremented. However,as this is very unlikely to happen, the circuit shows thecorrect song number almost all the time.

The circuit costs around Rs 100.

Page 57: Electronics Projjects1

ELECTRONICS FOR YOU� ❚❚❚❚❚ �NOVEMBER 2001

C I R C U I T I D E A S

T he circuit described here uses low-cost and easily available ICCD4017 to produce a speller type

light display. In such displays, each let-ter of the sign sequentially lights up, oneafter the other, until all letters are glow-ing. After a few seconds, the letters switchoff and the cycle repeats. This circuit pro-vides a maximum of nine channels andtherefore can be used to spell a word orsign having up to nine characters.

Timer IC1 (555) is configured in

astable mode to produce clock signal fortriggering IC2 (CD4017). Speed of switch-ing on the display can be controlled byvarying preset VR1.

CD4017 is a decade counter havingten outputs, of which one output is highfor each clock pulse. However, this pro-duces running lights effect. To change thissequence to get the speller effect, pnptransistors T1 through T9 are wired asshown in the figure. Nine triacs (triac 1through triac 9) are used to drive 230Vbulbs. (In place of 230V bulbs, miniaturelamps connected in series in the form ofcharacters or letters can also be used, pro-vided the voltage drop across the series

combination is 230 volts.)When any of the outputs of IC2 goes

high, the corresponding transistor con-nected to the output goes off. When Q0 is

high, transistor T1 goes off and its out-put at the collector goes low. Since theemitter of transistor T2 is connected tothe collector of transistor T1, and collec-tor and emitter terminals of transistorsT1 through T9 are connected in series,all transistors next to transistor T1, i.e.transistors T2 through T9, do not get sup-ply and hence all their outputs go low.

Next, when Q1 output goes high, tran-sistor T2 goes off. Thus outputs of tran-sistors T2 through T9 remain low. SinceQ0 output at this instant is low, transis-tor T1 is forward biased and its outputgoes high to light up the first character.

Similarly, when Q2 output goes high,Q0 and Q1 outputs are low and thereforeoutputs of transistors T1 and T2 go highto light up the first and second characters.

This process continues until all tran-sistors turn on, making all the characters

to light up. The cycle repeats endlessly,producing the speller type light effect.

VIJAYA KUMAR P.

�������������

���� �����S.C. DWIVEDI

Page 58: Electronics Projjects1

ELECTRONICS FOR YOU� ❚❚❚❚❚ �OCTOBER 2001

C I R C U I T I D E A S

SUNIL KUMAR

Here is a stereo tape head pream-plifier circuit for your PC soundcard that can playback your

favourite audio cassette through the PC.Audio signals from this circuit can be di-

rectly connected to the stereo-input (line-input) socket of the PC sound card forfurther processing.

The circuit is built around a popularstereo head preamp IC LA3161. Weakelectrical signals from the playback headsare fed to pins 1 and 8 of IC1 via DCdecoupling capacitors C1 and C6, respec-tively. Components between pins 2 and 3and pins 6 and 7 provide adequateequalisation to the signals for a normaltape playback.

The amplified and equalised signalsavailable at output pins 3 and 6 of IC1are coupled to the inputs of line amplifiercircuit built around transistors T1 (via ca-pacitor C5, potmeter VR1, resistor R8, and

capacitor C12) and T2 (via capacitor C10,potmeter VR2, resistor R19, and capaci-tor C16), respectively. Left and right play-back levels can be adjusted by variableresistors VR1 and VR2. The audio signalsare finally available at the negative endsof capacitors C13 and C17.

The circuit wired around relay drivertransistor T3 serves as a simple sourceselector. This is added deliberately to helpthe user share the common PC sound cardline-input terminal for operating some

other audio device as well.When the preamplifier is in ‘off’ state,

switching relay RL1 is off and it allowsconnection of external signals to the soundcard. When the preamplifier is turned ‘on’,the relay is energised by transistor T3after a short delay determined by the val-ues of resistor R21 and capacitor C23. Onenergisation, the relay contactschangeover the signals to internal source,i.e. the head preamplifier.

After constructing the whole circuiton a veroboard, enclose it in a mini me-tallic cabinet with level controls and sock-

ets at suitable points. Use a regulated1A, 12V DC power supply for poweringthe whole circuit including the tape deckmechanism. (A 1A, 18V AC secondarytransformer with 4700µF, 40V electrolyticcapacitor and 78M12 regulator is suffi-cient.)

You can use any kind of tape deckmechanism with this circuit. Use of good-quality playback head and well-screenedwires are recommended.

T.K. HAREENDRAN

���������������������� � ��

���������������

Page 59: Electronics Projjects1

C I R C U I T I D E A S

ELECTRONICS FOR YOU MARCH 2003

SANI THEOLEAD-ACID BATTERY CHARGER WITHVOLTAGE ANALYSERD. MOHAN KUMAR

Nowadays maintenance-free lead-acidbatteries are common in vehicles,inverters, and UPS systems. If the

battery is left in a poor state of charge, itsuseful life is shortened. It also reduces thecapacity and rechargeability of the battery.For older types of batteries, a hygrometercan be used to check the specific gravityof the acid, which, in turn, indicates thecharge condition of the battery. However,you cannot use a hygrometer for sealed-type maintenance-free batteries. The onlyway to know their charge level is by check-ing their terminal voltage.

The circuit presented here can replen-ish the charge in a battery within 6-8 hours.It also has a voltage analysing circuit forquick checking of voltage before start ofcharging, since overcharging may damagethe battery. The voltage analyser gives anaudio-visual indication of the battery volt-age level and also warns about the criticalvoltage level at which the battery requiresimmediate charging.

The charger circuit consists of a stan-dard step-down 12V AC (2-amp) trans-former and a bridge rectifier comprisingdiodes D1 through D4. Capacitor C1smoothes the AC ripples to provide a cleanDC for charging the battery.

The battery voltage analyser circuit isbuilt around the popular quad op-ampLM324 that has four separate op-amps (Athrough D) with differential inputs. Op-amps have been used here as compara-tors. Switch S2 is a pushswitch, which ispressed momentarily to check the batteryvoltage level before charging the battery.

The non-inverting terminals of op-ampsA through D are connected to the positivesupply rail via a potential divider chain

comprising resistors R1 through R5. Thusthe voltage applied to any non-invertinginput is the ratio of the resistance betweenthat non-inverting terminal and ground tothe total resistance (R1+R2+R3+R4+R5).The resistor chain provides a positive volt-age of above 5V to the non-inverting inputsof all op-amps when battery voltage is 12.5Vor more. A reference voltage of 5V is ap-plied to the inverting inputs of op-amps via5V zener diode ZD1.

When the circuit is connected to thebattery and pushswitch S2 is pressed (withS1 open), the battery voltage is sampledby the analyser circuit. If the supply volt-age sample applied to the non-invertinginput of an op-amp exceeds the reference

voltage appliedto the invert-ing inputs, theoutput of theop-amp goeshigh and theLED connectedat its outputlights up.

Battery voltage Status of LEDs Comments

Red Green Yellow Orange

<9.8V Off Off Off Off Buzzer off>9.8V On Off Off Off Danger level11.5V On On Off Off Low level12.0V On On On Off Normal level12.5V On On On On High level

Page 60: Electronics Projjects1

C I R C U I T I D E A S

ELECTRONICS FOR YOUMARCH 2003

The different levels of battery voltagesare indicated by LED1 through LED4. Allthe LEDs remain lit when the battery isfully charged (above 12.5V). The buzzerconnected to the output of IC1 also sounds(when S2 is pressed with S1 kept open) aslong as the voltage of battery is above

9.8V. If the voltage level goes below 9.8V,the buzzer goes off, which indicates thatit’s time to replace the battery. The statusof LEDs for different battery voltages isshown in the table.

The circuit can be assembled on a gen-eral-purpose PCB or a veroboard. Use 4mm

wire and crocodile clips to connect thecharger to the battery. A 2.5-amp fuse con-nected to the output of the charger pro-tects the analyser circuit against acciden-tal polarity reversal.

The circuit costs around Rs 120 withall accessories.

Page 61: Electronics Projjects1

C I R C U I T I D E A S

ELECTRONICS FOR YOU FEBRUARY 2003

S.C. DWIVEDITHREE-COLOUR DISPLAY USINGBICOLOUR LEDsPRIYANK MUDGAL

T he circuit presented here usesbicolour LEDs to generate a dis-play in three colours, namely, red,

green, and yellowish green.Transistors T1 through T20 form a grid

to which common-cathode bicolour LEDs(LED1 through LED10) are connected.Transistors T1 through T10 have their col-lector terminals connected to the emitterof transistor T21. Similarly, transistors T11through T20 have their collector terminalsconnected to the emitter of transistor T22.The bases of each pair of transistors (i.e.T1 and T11, T2 and T12,…, T10 and T20)are tied to outputs Q0, Q1,…, Q9, respec-tively, of IC1 (CD4017) through 10-kilo-ohm resistors as shown in the figure. Posi-tive supply to collectors of transistors T1through T10 is controlled by transistor T21.Similarly, positive supply to collectors oftransistors T11 through T20 is controlledby transistor T22.

IC1 and IC2 are decade counters. Clockpulse to IC1 is provided by the oscillatorcircuit comprising NOR gates N1 and N2.The outputs of IC1 advance sequentiallywith each clock. (Any other source ofsquarewave pulses also serves the pur-pose.) IC2 is used to select the mode ofdisplay. Clock input pin 14 of IC2 is con-nected to Q9 output of IC1. Thus IC2 re-ceives one pulse after every ten pulses re-ceived by IC1.

When the circuit is switched on, Q0output of IC2 is active high. Thus transis-tor T21 gets forward biased via diode D3and it conducts to extend positive supplyto transistors T1 through T10. TransistorsT1 through T10 are forward biased sequen-tially by Q0 through Q9 outputs of IC1,i.e. at a time only one of these ten transis-tors is forward biased (on). Thus only redLED parts of bicolour LEDs light up se-quentially. (Transistor T22 is not conduct-ing at this moment.)

When red LED part of LED10 glows,IC2 receives a clock pulse and its Q1 outputgoes high. Transistor T21 still conducts, asit is forward biased through diode D6, andnext again via diode D5. Thus red LEDscomplete two more glowing sequences.

After completion of the third glowingsequence of red LEDs, when Q3 output ofIC2 goes high, transistor T21 stops con-ducting and T22 starts conducting with thenext three sequences of green LEDs ofbicolour LEDs (LED1 through LED10)glowing sequentially.

After completion of three sequences ofgreen LEDs, output Q6 of IC2 goes high.

Now both transistors T21 and T22 con-duct due to diodes D1 and D2. Thus bothred and green LEDs in bicolour LEDs (LED1through LED10) glow sequentially. The ef-fect of red and green LEDs glowing to-gether is a distinct yellowish orange colour.This sequence repeats four times.

Thereafter, the whole sequence repeats,starting with red LEDs. Thus the bicolour-

Page 62: Electronics Projjects1

C I R C U I T I D E A S

ELECTRONICS FOR YOUFEBRUARY 2003

LED display shows three colours—red, green,and yellowish green—one after the other.

The speed of display can be controlled

by preset VR1. One can omit automaticselection of different colours by omittingIC2 and replacing connections to pins 3,

5, and 7 of IC2 with SPDT switches. (Thusdiodes D3-D12 are also omitted.)

This circuit costs around Rs 250.

Page 63: Electronics Projjects1

C I R C U I T I D E A S

ELECTRONICS FOR YOUFEBRUARY 2003

whereas no power is dissipated in a ca-pacitor. The value of capacitor is calcu-lated by using the following relationships:

XC = 1/(2πfC) ohms —————(a)XC = VRMS /I ohms ———— (b)

where XC is capacitive reactance in ohms,C is capacitance in farads, I is the currentthrough the LED in amperes, f is the mainsfrequency in Hz, and Vrms is the inputmains voltage.

The 100-ohm, 2W series resistor avoidsheavy ‘inrush’ current during transients.MOV at the input prevents surges or spikes,protecting the circuit. The 390-kilo-ohm,½-watt resistor acts as a bleeder to pro-vide discharge path for capacitor Cx whenmains supply is disconnected. The zenerdiode at the output section prevents ex-cess reverse voltage levels appearing acrossthe LEDs during negative half cycles. Dur-ing positive half cycle, the voltage acrossLEDs is limited to zener voltage.

Use AC capacitors for Cx. Filter capaci-tor C1 across the output provides flicker-free light. The circuit can be enclosed in aCFL round case, and thus it can be con-nected directly to AC bulb holder socket. Aseries combination of 16 LEDs (Fig. 2) givesa luminance (lux) equivalent of a 12Wbulb. But if you have two series combina-tions of 23 LEDs in parallel (total 46 LEDsas shown in Fig. 3), it gives light equal to a35W bulb. 15 LEDs are suitable for a table-lamp light.

Diode D1 (1N4007) and capacitor C1act as rectifying and smoothing elementsto provide DC voltage to the row of LEDs.For a 16-LED row, use Cx of 0.22 µF, 630V;C1 of 22 µF, 100V; and zener of 48V, 1W.Similarly, for 23+23 LED combination useCx of 0.47 mF, 630V; C1 of 33 µF, 150V;and zener of 69V, 1W.

This circuit (inclusive of LEDs) costsRs 200 to Rs 400.

Fig. 3: 46-LED combination

S.C. DWIVEDI

This ultra-bright white LED lampworks on 230V AC with minimalpower consumption. It can be used

to illuminate VU meters, SWR meters, etc.Ultra-bright LEDs available in the mar-

ket cost Rs 8 to 15. These LEDs emit a1000-6000mCd bright white light like weld-ing arc and work on 3 volts, 10 mA. Theirmaximum voltage is 3.6 volts and the cur-rent is 25 mA. Anti-static precautionsshould be taken when handling the LEDs.The LEDs in water-clear plastic package

emit spotlight, while diffused type LEDshave a wide-angle radiation pattern.

This circuit (Fig. 1) employs capaci-tive reactance for limiting the current flowthrough the LEDs on application of mainsvoltage to the circuit. If we use only aseries resistor for limiting the current withmains operation, the limiting resistor itselfwill dissipate around 2 to 3 watts of power,

ULTRA-BRIGHT LED LAMPN.S. HARISANKAR VU3NSH

Fig. 1: The circuit of ultra-bright white LEDlamp

Fig. 2: 16-LED combination

Page 64: Electronics Projjects1

C I R C U I T I D E A S

ELECTRONICS FOR YOU MARCH 2003

C I R C U I T I D E A S

VERSATILE EMERGENCY LIGHT USINGFLUORESCENT TUBESVIVEK KALKUR M.

Emergency lights using incandescentbulbs are inherently inefficient com-pared to those using fluorescent

tubes. Here’s a versatile emergency lightusing fluorescent tubes. You can operateit using readymade SUNCA or similar otherinverter transformers, which are readilyavailable in the market for around Rs 25.With this circuit you can drive two 6W,22.8cm (9-inch) fluorescent tubes, withthe option to use a single tube or a pairof tubes with the help of DPDT switchS2.

Step-down transformer X1, diodes D1-D4, capacitor C1, and 5V regulator IC1(7805) form a regulated power supply. A2.7V zener (ZD1) in common terminal ofthe regulator props up the output voltageto 7.7 volts. The regulated voltage is ap-plied to the battery through diodes D6 andD7, which cause a drop of about 1.4Vacross them. Thus the effective chargingvoltage is about 6.3V, which prevents over-charging of the battery as the terminal volt-age of the battery cannot exceed 6.3V.

When AC mains supply is present, thebattery starts charging and green LED1glows to indicate the same. Diode D5 re-verse biases transistor T1 forming part ofthe inverter oscillator and thus the tubesdon’t glow.

When mains supply fails, transistor T1starts oscillating and supplies power to in-verter transformer X2 and the tubes glow.

An on/off switch (S1) is used to switch offthe light when it is not required.

D882 (actually, 2SD882) is an npnpower transistor in TO-126 package. It ismounted on a suitable heat-sink to pre-

S.C. DWIVEDI

vent it from thermal runaway. For goodillumination, use Toshiba’s FL6D fluores-cent tubes.

The circuit (excluding the cabinet)costs around Rs 350.

Page 65: Electronics Projjects1

C I R C U I T I D E A S

ELECTRONICS FOR YOUMARCH 2003

S.C. DWIVEDI

It is quite difficult to find the switchboard in a dark room to turn on thelight. Here’s a clap switch that allows

you to switch on lights, fans, andmotors sequentially by just clapping inthe vicinity of the microphone used in thecircuit.

The mains supply is stepped down to15-0-15V AC by step-down transformerX1. The output of the transformer is recti-fied, filtered, and regulated by diodes D1through D4, capacitors C1 through C4,and IC1 (regulator IC 7812) and IC2 (regu-lator IC 7912), respectively. Additional

filtering is performed by capacitors C5through C8 to get +12V, 0V (Gnd) and–12V DC required for the operation of thecircuit.

The clap sound impulses are convertedinto electrical signals by a condenser mi-crophone that forms a Wheatstone bridgetogether with resistors R4, R5, and R3.The microphone is suitably biased throughresistor R3. The output of the microphoneis coupled to op-amp IC 741 (IC3) havinga voltage gain of 45. The output of IC3,after passing through capacitor C10, isfree from any DC component of signal.Capacitors C15 and C17 are used for spikeand surge suppression.

CLAP-BASED SWITCHING FOR DEVICES

MANOJ KUMAR SAHA Diodes D5 and D6 and capacitor C11form the detector circuit. Resistor R6 isused here for quick discharge of capacitorC10. The detected clap signal is used toswitch on transistor T1. On conduction oftransistor T1, its collector voltage falls totrigger timer IC4 connected as amonostable. The combination of resistorR9 and capacitor C12 determine thepulsewidth of the monostable (about onesecond, with the component valuesshown).

AND gate IC5 (4081) is used as a bufferbetween the output of IC4 and clock inputto decade counter IC6 (CD4017). Thus eachclap causes outputs of IC6 to advance in

sequential mannerand switch on thecorresponding de-vices.

If you want alamp to be switchedon when output Q1goes high (after firstclap), then in placeof R11 and LED2 usea relay driver circuitat Q1 output similarto that used for Q2output (for fan).

As stated earlier,only one output ofCD4017 can be highat any given time.Thus first clap causesLED1 to go off andLED2 to glow. Thesecond clap causesonly the fan toswitch on via relayRL1. The third clapcauses the miniature12V motor to run. Onfourth clap, Q4 out-put goes high mo-mentarily to reset IC6since Q4 output isconnected to its re-set pin 15. In resetstate, LED1 con-nected to Q0 outputlights up.

The circuit costsaround Rs 150.