71

Kumpulan skematik elektronika 4

Embed Size (px)

DESCRIPTION

SCHEMATIC ELECTRONIC FOR YOU... / KUMPULAN RANGKAIAN SKEMATIK ELEKTRONIKA.

Citation preview

Page 1: Kumpulan skematik elektronika 4
Page 2: Kumpulan skematik elektronika 4

ELECTRONICS PROJECTS Vol. 19200

Period Conditions Switchstatus

During daylight (when mains is present intelligent switch is ‘off ’. (when mains is absent)

During night darkness (when mains is present) intelligent switch is ‘off ’. (when mains is absent) intelligent switch is ‘on’.

[[

]]

This intelligent switch circuit ena- bles automatic, switching on of an emergency light system during

darkness in the event of mains failure.The mains power failure condition

is detected by the section consisting of mains step-down transformer X1 followed by bridge rectifier comprising diodes D1 through D4 and smoothing capacitor C1. If the mains is available then it causes energisation of relay RL1 which has two sets of changeover contacts.

The light/darkness condition is de-tected by the circuit comprising photo-transistor FPT100/2N5777 followed by Darlington pair comprising transistors T2 and T3. However, this section will function only when mains supply is not available (i.e. when relay RL1 is in de-energised state) since battery supply (negative lead) path gets completed via lower N/C contact of relay RL1.

During daylight, photo transistor conducts and places transistor T2 base near ground potential. Thus Darlington pair remains cut-off and relay RL2

remains de-en-ergised. How-ever, during darkness, pho-to transistor is cut-off and therefore tran-sistor T2 re-ceives forward base bias via resistor R1 (connected to positive rail), as resistor R2 is no more grounded (via photo-transis-tor T1). As a result, relay RL2 gets en-ergised.

T h u s i t would be ob-served that when mains is absent (relay RL1 de-energised) and it is dark (relay RL2 energised), the switch

output path is complete. In any other condition switch output path would get broken. The switch output terminals can be used (in series with supply) to control a lighting system directly or indirectly through another contactor/heavy-duty relay depending upon the load.

The working of the intelligent switch is summarised in the table.

INTELLIGENT SWITCH

Page 3: Kumpulan skematik elektronika 4

circuitideas

electronics for you • September 2008 • 109w w w . e f y m a g . c o m

Fig. 2: Pin configurations of bc547/557 and bS170

Most of the IR remotes work re-liably within a range of 5 me-tres. The circuit complexity

increases if you design the IR transmit-ter for reliable operation over a longer range, say, 10 metres. To double the range from 5 metres to 10 metres, you need to increase the transmitted power

four times. If you wish

to real ise a highly direc-tional IR beam (very narrow beam), you can suitably use an

EFY Lab

Long-RangE IR TRansmITTER s.c. dwivedi

IR laser pointer as the IR signal source. The laser pointer is readily available in the market. However, with a very nar-row beam from the laser pointer, you have to take extra care, lest a small jerk to the gadget may change the beam orientation and cause loss of contact.

Here is a simple circuit that will give you a pretty long range. It uses three infrared transmitting LEDs (IR1

through IR3) in series to increase the radiated power. Further, to increase the directivity and so also the power density, you may assemble the IR LEDs inside the reflector of a torch.

For increasing the circuit efficiency, a MOSFET (BS170) has been used, which acts as a switch and thus re-

duces the power loss that would result if a transistor were used. To avoid any dip during its ‘on’/‘off’ operations, a 100μF reservoir capacitor C2 is used across the battery supply. Its advan-tage will be more obvious when the IR transmitter is powered by ordinary batteries. Capacitor C2 supplies extra

charge during ‘switch-ing on’ operations.

As the MOSFET ex-hibits large capacitance across gate-source ter-minals, a special drive arrangement has been made using npn-pnp Darlington pair of BC547 and BC557 (as emitter followers), to avoid distortion of the gate drive input. Data (CMOS-compatible) to be transmitted is used for modulating the 38 kHz frequency gener-ated by CD4047 (IC1). However, in the circuit shown here, tactile switch S1 has been used for modulating

and transmitting the IR signal. Assemble the circuit on a gen-

eral-purpose PCB. Use switch S2 for power ‘on’/‘off’ control. Commer-cially available IR receiver modules (e.g., TSOP1738) could be used for efficient reception of the transmitted IR signals.

Fig. 1: circuit of the long-range ir transmitter

Page 4: Kumpulan skematik elektronika 4

ELECTRONICS PROJECTS Vol. 20

Long-range FM TransMiTTer

Several circuits for constructing FM transmitters have been published in EFY. The power output of most

of these circuits were very low because no power amplifier stages were incorpo-rated.

The transmitter circuit described here has an extra RF power amplifier stage, after the oscillator stage, to raise the power output to 200-250 milliwatts. With a good matching 50-ohm ground—plane antenna or multi-element Yagi antenna, this transmitter can provide reasonably good signal strength up to a distance of about 2 kilometres.

The circuit built around transistor T1 (BF494) is a basic low-power vari-able-frequency VHF oscillator. A varicap diode circuit is included to change the fre-quency of the transmitter and to provide frequency modulation by audio signals. The output of the oscillator is about 50 milliwatts. Transistor T2 (2N3866) forms a VHF-class A power amplifier. It boosts the oscillator signals’ power four to five times. Thus, 200-250 milliwatts of power is generated at the collector of transistor T2.

For better results, assemble the circuit on a good-quality glass epoxy board and house the transmitter inside an alumini-um case. Shield the oscillator stage using

an aluminium sheet.Coil winding details are given below:L1 – 4 turns of 20 SWG wire close

wound over 8mm diameter plastic former.

L2 – 2 turns of 24 SWG wire near top end of L1.

(Note: No core (i.e. air core) is used for the above coils)

L3 – 7 turns of 24 SWG wire close wound with 3mm diameter air core.

L4 – 7 turns of 24 SWG wire-wound on a ferrite bead (as choke)

Potentiometer VR1 is used to set the centre frequency whereas potentiometer

VR2 is used for power control. For hum-free operation, operate the transmitter on a 12V rechargeable battery pack of 10 x 1.2-volt Ni-Cd cells. Transistor T2 must be mounted on a heat sink. Do not switch on the transmitter without a matching antenna. Adjust both trim-mers (VC1 and VC2) for maximum transmission power. Adjust potentiom-eter VR1 to set the centre frequency near 100 MHz.

This transmitter should only be used for educational purposes. Regular trans-mission using such a transmitter without a licence is illegal in India.

Page 5: Kumpulan skematik elektronika 4

ELECTRONICS PROJECTS Vol. 21188

LOW-COST PCO BILLING METER

The circuit presented here can beused in PCOs for displaying theactual bill. The comparative

disadvantages of the presented circuit areas follows:

1. The calculator used along with thiscircuit is required to be switched ‘on’manually before making a call.

2. Certain manual entries have to bemade in the calculator; for example, fora pulse rate of Rs 1.26, number 1.26 is

to be entered after switching ‘on’ thecalculator followed by pressing of ‘+’button twice. However, possibility existsfor automating these two functions byusing additional circuitry.

In telephony, on-hook condition isrepresented by existance of 48V to 52Vacross the line. Similarly, the off-hookcondition is represented by the linevoltage dropping to a level of 8V to 10V(depending upon the length of the locallead line (local loop) from telephoneexchange to the subscriber’s premises as

well as upon the impedance of telephoneinstrument). Handset is normally liftedeither for dialing or in response to a ring.

In the circuit shown in Fig. 1, whenthe handset is off-hook, the optocouplerMCT2E (IC1) conducts and forwardbiases transistor T1, which, in turn,forward biases transistor T2 andenergises relay RL1. In energisedcondition of relay, the upper set of relaycontacts connects the positive supply rail

to PLL (phase-locked loop) IC2(LM567) pin 4,while the lower setof relay contactscouples the positivetelephone lead toinput pin 3 ofLM567 viacapacitor C1 andresistor R3.

The negativetelephone lead isp e r m a n e n t l y

capacitively coupled to ground viacapacitor C2. As soon as call matures,16kHz tone pulses would be pumped intothe telephone line by the telephoneexchange at suitable intervals. Thisinterval depends on the pulse rate of theplace called and also the time of the dayand whether it’s a working-day orholiday. On receipt of 16kHz pulse,output pin 8 of IC LM567 (which is tunedfor centre frequency of 16 kHz) goes ‘low’for the duration of the pulse. The outputof IC2 is coupled via transistor T3 to

optocoupler IC3. The output of thisoptocoupler is used to bridge the ‘=’button on a calculator (such as Taksunmake), which has the effect of pressingthe ‘=’ button of the calculator.

Considering that pulse rate for aspecific town/time/day happens to be Rs1.26 per pulse, then before maturity ofthe call one enters 1.26 followed bypressing of ‘+’ key twice. Now, if a totalof ten billing pulses have been received

from exchange for the duration of the call,then on completion of the call, thecalculator display would show 12.60. Thetelephone operator has to bill thecustomer Rs 14.60 (Rs 12.60 towards callcharges plus Rs 2.00 towards servicecharges).

For tuning of the PLL circuit aroundIC2, lift the handset and inject 16kHztone across the line input points.Tune IC2 to centre frequency of 16 kHzwith the help of preset VR1. Propertuning of the PLL will cause LED(D6) to glow even with a very low-amplitude 16kHz tone.

EFY Lab note. Arrangement used forsimulating a 16kHz pulsed tone is shownin Fig. 2. Push-to-on switch is used forgeneration of fixed-duration pulse formodulating and switching on a 16kHzoscillator.

For more details regarding pulserates, pulse codes, etc, readers areadvised to go through the tariff rates andpulse code information given in thebeginning pages of telephone directories,such as MTNL, Delhi directory, Vol. I.

Page 6: Kumpulan skematik elektronika 4

ELECTRONICS PROJECTS Vol. 20

Low Current, HigH VoLtage Power SuPPLy

Ahigh voltage power supply is a very useful source which can be effectively used in many applica-

tions like biasing of gas-discharge tubes and radiation detectors etc. Such a power supply could also be used for protection of property by charging of fences. Here the current requirement is of the order of a few microamps. In such an application, high voltage would essentially exist be-tween a ‘live’ wire and ground. When this ‘live’ wire is touched, the discharge occurs via body resistance and it gives a non-le-thal but deterrent shock to an intruder.

The circuit is built around a transis-torised blocking oscillator. An important element in this circuit is the transformer. It can be fabricated using easily available ferrite core. Two ‘E’ sections of the core are joined face-to-face after the enamelled copper wire wound on former is placed in it. The details of the transformer windings are given in the Table.

In this configuration, the primary wind-ing and the feedback winding are arranged such that a sustained oscillations are en-sured once the supply is switched on. The waveform’s duty cycle is asymmetrical, but it is not very important in this application. Please note that if the oscillations do not oc-cur at the ‘switch-on’ time, the transformer winding terminals of the feedback or the primary winding (but not both) should be reversed.

The primary oscillations amplitude is

TAbleDetails of the Transformer WindingsWindings No. of Standard wire turns gauge (SWG)Primary 50 31Feedback 12 31Secondary 1650 41

about 24V(p-p). This gets further ampli-fied due to the large step-up ratio of the transformer and we get about 800V(p-p) across the secondary. A simple series volt-age multiplier (known as Cockroft-Walton circuit) is used to boost up this voltage in steps to give a final DC voltage of about 2 kV.

The output voltage, however, is not very well regulated. But if there is a constant load, the final voltage can be

adjusted by varying the supply voltage. The present configuration gives 2 kV for an input DC voltage of 15 V. Though higher voltages could be achieved by increas-ing input supply, one word of caution is necessary: that the component ratings have to be kept in mind. If the ratings are exceeded then there will be electrical discharges and breakdowns, which will damage the device.

Page 7: Kumpulan skematik elektronika 4

ELECTRONICS PROJECTS Vol. 19 187

The circuit as shown in the figure employs 14 bi-colour (red and green) LEDs having three termi-

nals each. Different dancing colour pat-terns are produced using this circuit since each LED can produce three different colours. The middle terminal (pin 2) of the LEDs is the common cathode pin which is grounded. When a positive voltage is ap-plied to pin 1, it emits red light. Similarly, when positive voltage is applied to pin 3. it

MAGIC LIGHTSemits green light. And when positive volt-age is simultaneously applied to its pins 1 and 3, it emits amber light. The circuit can

be used for decorative lights.IC1 (555) is used in astable mode to

generate clock signal for IC2 and IC3 (CD4518) which are dual BCD counters. Both counters of each of these ICs have been cascaded to obtain 8 outputs from each. The outputs from IC2 and IC3 are connected to IC4 through IC7 which are

BCD to 7-segment latch/decodor/driver ICs. Thus we obtain a total of 14 seg-ment outputs from each of the IC pairs

consisting of IC4 plus IC5 and IC6 plus IC7. While outputs from former pair are connected to pin No. 1 of all the 14 bi-colour LEDs via current limiting resistors, the ouputs of the latter pair are similarly connected to pin No.3 of all the bi-colour LEDs to get a magical dancing lights effect.

Page 8: Kumpulan skematik elektronika 4

ELECTRONICS PROJECTS Vol. 20

Magnetic ProxiMity Switch

Here is an interesting circuit for a magnetic proximity switch which can be used in various applica-

tions.The circuit, consists of a reed switch

at its heart. When a magnet is brought in the vicinity of the sensor (reed switch), its contacts close to control the rest of the switching circuit. In place of the reed switch, one may, as well, use a general-purpose electromagnetic reed relay (by making use of the reed switch contacts) as the sensor, if required. These tiny reed relays are easily available as they are widely used in telecom products. The reed switch or relay to be used with this circuit should be the ‘normally open’ type.

When a magnet is brought/placed in the vicinity of the sensor element for a moment, the contacts of the reed switch close to trigger timer IC1 wired in monostable mode. As

a consequence its output at pin 3 goes high for a short duration and supplies clock to the clock input (pin 3) of IC2 (CD4013—dual D-type flip-flop). LED D2 is used as a response indicator.

This CMOS IC2 consists of two inde-pendent flip-flops though here only one

is used. Note that the flip-flop is wired in toggle mode with data input (pin 5) connected to the Q (pin 2) output. On receipt of clock pulse, the Q output at pin 1 changes from low to high state and due to this the relay driver transistor T1 gets forward-biased. As a result the relay RL1 is energised.

Page 9: Kumpulan skematik elektronika 4

CIRCUITIDEAS

8 0 • A U G U S T 2 0 0 5 • E L E C T R O N I C S F O R Y O U W W W . E F Y M A G . C O M

CMYK

PRADEEP G.

MEDIUM-POWERFM TRANSMITTER

T he range of this FM transmi-tter is around 100 metres at 9VDC supply.

The circuit comprises three stages.The first stage is a microphone pream-plifier built around BC548 transistor.The next stage is a VHF oscillator wiredaround another BC548. (BC series tran-sistors are generally used in low-fre-quency stages. But these also work fine

S.C. DWIVEDI

Fig. 1: FM transmitter

Fig. 2: Pinconfigurations oftransistors BC548and C2570

Fig. 3: Walkie-talkie arrangement

in RF stages as oscillator.) The thirdstage is a class-A tuned amplifier thatboosts signals from the oscillator. Useof the additional RF amplifier increasesthe range of the transmitter.

Coil L1 comprises four turns of20SWG enamelled copper wire woundto 1.5cm length of a 4mm dia. air core.Coil L2 comprises six turns of 20SWGenamelled copper wire wound on a4mm dia. air core.

Use a 75cm long wire as the an-

tenna. For themaximum range,use a sensitive re-ceiver. VC1 is afrequency-adjust-ing trimpot. VC2should be adjustedfor the maximumrange. The trans-mitter unit is pow-

ered by a 9V PP3 battery. It can becombined with a readily available FMreceiver kit to make a walkie-talkie setas shown in Fig. 3.

Page 10: Kumpulan skematik elektronika 4

CIRCUITIDEAS

E L E C T R O N I C S F O R Y O U • A P R I L 2 0 0 5 • 6 3W W W . E F Y M A G . C O M

CMYK

Using this circuit, you can con-trol the rotation of a DCmicromotor simply by press-

ing two push-to-on switches momen-tarily.

The circuit is built around twoNE555 ICs (IC1 and IC2) and a quad-NAND IC CD4011 (comprising NANDgates N1 through N4). The NE555 ICs(IC1 and IC2) are configured as invert-ing buffers. IC CD4011 (IC3) NANDgates are configured as bistable flip-flop. The DC motor to be controlled is

V. DAVID

MICROMOTOR CONTROLLER SUNIL KUMAR

connected between the outputs (pin 3)of IC1 and IC2.

Closing switch S5 provides powerto the circuit. Now, when you pressswitch S1 momentarily, pin 10 of IC3

goes high, while its pin 11 goes low.Since pin 10 of IC3 is connected to resetpin 4 of IC1 and IC2, the high output atpin 10 of IC3 will enable IC1 and IC2simultaneously. When switch S2 ispressed, pin 10 of IC3 goes low, whileits pin 11 goes high. The low logic atpin 10 disables both IC1 and IC2.

Switches S3 and S4 are used forforward and reverse motion of the mo-

tor in conjunction with switch S1. Ifyou press switch S3 after pressingswitch S1, pin 3 of IC3 goes high, whileits pin 4 goes low. The motor nowstarts rotating in the forward direction.

However, if you press switch S4 afterpressing switch S1, the motor will ro-tate in reverse direction.

Note. The complete kit of this cir-cuit can be obtained fromKits‘n’Spares, 303, Dohil Chambers, 46,Nehru Place, New Delhi 110019;Phone: 011-26430523, 26449577;Website: www.kitsnspares.com;E-mail: [email protected].

Page 11: Kumpulan skematik elektronika 4

8 2 • J A N U A R Y 2 0 0 5 • E L E C T R O N I C S F O R Y O U W W W . E F Y M A G . C O M

CIRCUITIDEAS

CMYK

S.C. DWIVEDI

This music-operated lighting ef-fect generator comprises fivesets of 60W bulbs that are ar-

DEBARAJ KEOT ranged in zig-zag fashion. The bulbsets glow one after another dependingon the intensity of the audio signal.No electrical connection is to be madebetween the music system and the

MUSICAL LIGHT CHASER

lighting effect generator circuit. Youjust need to place the gadget near thespeakers of the music system.

Fig. 1 shows the complete circuitof the musical light chaser, while Fig.

Fig. 1: Circuit diagram of musical light chaser

Page 12: Kumpulan skematik elektronika 4

CMYK

E L E C T R O N I C S F O R Y O U • J A N U A R Y 2 0 0 5 • 8 3W W W . E F Y M A G . C O M

CIRCUITIDEAS

plifier, comparators and constant cur-rent source at its output pins.

Depending on the intensity of theinput audio signals, all or some out-puts of IC3 go low to drive transistorsT1 through T5, which, in turn, fire thecorresponding triacs TR1 through TR5via their gates and multicoloured zig-zag bulb sets comprising ZL1 throughZL5 glow.

When the audio level is low, onlytriac T1 is fired and the zig-zag bulbset ZL1 turns on and off sequentially.When the audio level is high, triacsTR1 through TR5 get fired and all thebulb sets (ZL1 through ZL5) turn onand off sequentially.

Pin 7 of IC3 is used for selectingthe response speed of the lighting.The larger the time constant, theslower the response, and vice versa.

The time constant can be changed bychanging the values of resistor R6,variable resistor VR2 and capacitorC7. Here, variable resistor VR2 is usedfor varying the response speed of thechaser light as desired. When VR2 isset in the minimum resistance posi-tion, the response is very fast, andwhen it is set at the maximum resis-tance, the response is slow.

The complete circuit including thepower supply can be constructed onany general-purpose PCB ora small Vero board. Triacs TR1through TR5 should be kept awayfrom the op-amp and its related com-ponents. The metallic parts of thetriacs should not touch each other andthe other parts of the circuit. Afterassembling the circuit, house it in asuitable shockproof plastic cabinet.Make some holes in the cabinet forheat dissipation.

Note. 1. Some zig-zag lights havea special bulb called ‘master bulb’ forautomatic flickering. It should beremoved and replaced with a simplenon-flickering colour bulb.

2. Never touch any naked part ofthe circuit when it is connected to themains.

Fig. 2: Pin configuration

2 shows pin configurations of 9V regu-lator 7809, triac BT136 and level meterIC LB1403.

The circuit is powered by regulated9V DC. The AC mains is stepped downby transformer X1 to deliver a second-ary output of 12V AC at 250 mA. Thetransformer output is rectified by afull-wave rectifier comprising diodesD1 and D2 and filtered by capacitorsC1 and C2. Regulator IC 7809 (IC1)provides regulated 9V power supplyto the circuit. Closing switch S1 pro-vides power to the circuit and LED1glows to indicate that the circuit isready to work.

When you put your music systemin front of the condenser microphoneof the light chaser, the sound pressurevariation is converted into electricalsignals by the condenser microphone.These weak electrical signals are am-plified by op-amp µA741 (IC2), whichis configured as an inverting ampli-fier. Using preset VR1 you can set thesensitivity of the circuit.

The amplified output is fed to ICLB1403 (IC3) at its input pin 8. IC3 is afive-dot LED level meter commonlyused in stereo systems for LEDbargraph displays. It has a built-in am-

Page 13: Kumpulan skematik elektronika 4

ELECTRONICS PROJECTS Vol. 21 181

Often a need arises for connectionof two telephone instruments inparallel to one line. But it creates

quite a few problems in their properperformance, such as over loading andoverhearing of the conversation by anundesired person. In order to eliminate allsuch problems and get a clear reception, asimple scheme is presented here (Fig. 1).

This system will enable the incomingring to be heard at both the telephones.The DPDT switch, installed with each ofthe parallel telephones, connects you tothe line in one position of the switch and

PARALLEL TELEPHONE

WITH SECRECY

disconnects youin the otherposition of theswitch. At anyone time, onlyone telephone isconnected to theline. To receivea call at thei n s t r u m e n t ,which is notconnected to theline, you justhave to flip the

toggle switch atyour telephone endto receive the calland have aconversation. Assoon as the positionof the toggle switchis changed, the linegets transferred tothe other telephoneinstrument.

Mount oneDPDT toggleswitch, one

telephone ringer, and onetelephone terminal box ontwo wooden electricalswitchboards, as shown inFig. 3. Interconnect theboards using a 4-pairtelephone cable as per Fig.1. The system is ready touse. Ensure that the twolower leads of switch S2are connected to switch S1after reversal, as shown inthe figure.

Lab. Note: Theexternal ringer for theproject as shown in Fig. 2,was designed/fabricatedat EFY Lab.

Page 14: Kumpulan skematik elektronika 4

ELECTRONICS PROJECTS Vol. 20

PC-Based 7-segment Rolling disPlay

It is very interesting and con venient to be able to control everything while sitting at

your PC terminal. Here, a simple hardware circuit and software is used to interface a 7-segment based rolling display.

The printer port of a PC pro-vides a set of points with some act-ing as input lines and some others as output lines. Some lines are open collector type which can be used as input lines. The circuit given here can be used for interfacing with any type of PC’s printer port.

The 25-pin parallel port connec-tor at the back of a PC is a combi-nation of three ports. The address varies from 378H-37AH. The 7 lines of port 378H (pins 2 through 8) are used in this circuit to output the code for segment display through IC1. The remaining one line of port 378H (pin 9) and four lines of port 37AH (pins 1, 14, 16, 17) are used to enable the display digits (one a time) through IC2.

The bits D0, D1 and D3 of port 37AH connected to pins 1, 14 and 17 of ‘D’ connector are inverted by the computer before application to the pins while data bit D2 is not inverted. There-fore to get a logic high at any of former three pins, we must send logic 0 output to the corresponding pin of port 37AH.

Another important concept illustrated by the project is the time division multi-plexing. Note that all the five 7-segment displays share a common data bus. The

P r o g r a m/*DISP.C*** PC BASED ROLLING

DISPLAY *//* P.R.DESHMUKH*/#include<stdio.h>#include<conio.h>#include<dos.h>#define PORTA 0x378#define PORTB 0x37avoid main(){int dno[6]={0x0a,0x09,0x0f,0x03,0x80};

/* code for “hallo”*/int m[5]={0x76,0x77,0x38,0x38,0x3f };

/*code for the selection of display*/int f,j;

clrscr();for(f=200;f<=500;f+=100){sound(f );delay(100);}nosound();while (!kbhit()){for (j=0;j<=4;j++){outportb(PORTA,m[j]);if(j<=3){outportb(PORTB,dno[j]);

delay(300);

}

else{outportb(PORTB,0x0b); outportb(PORTA,m[j]);outportb(PORTA ,(m[j] || ( 0x80)));delay(300);}}}}

PC places the 7-segment code for the first digit/character on the data bus and ena-bles only the first 7-segment display. After delay of a few milliseconds, the 7-segment code for the digit/character is replaced by that of the next charter/digit, but this time only second display digit is enabled.

After the display of all characters/digits in this way, the cycle repeats itself

over and over again. Because of this rep-etition at a fairly high rate, there is an illusion that all the digits/characters are continuously being displayed. DISP1 is to be physically placed as the least signifi-cant digit.

IC1 (74LS244) is an octal buffer which is primarily used to increase the driving capability. It has two groups of four buff-

Page 15: Kumpulan skematik elektronika 4

ELECTRONICS PROJECTS Vol. 20

ers with non-inverted tri-state outputs. The buffer is controlled by two active low enable lines. IC2 (75492) can drive a maximum of six 7-segment displays. (For driving up to seven common-cathode displays one may use ULN2003 described in the previous circuit idea.)

The program for rolling display is given in the listing DISP.C above.

Whatever the message/characters to be displayed (here five characters have been displayed), these are separated and stored in an array. Then these are decoded.

Decoding software is very simple. Just replace the desired character with the binary equivalent of the display code. The display code is a byte that

has the appropriate bits turned on. For example, to display character ‘L’, the segments to be turned on are f, e and d. This is equivalent to 111000 binary or 38 hex.

Please note that only limited char-acters can be formed using 7-segment display. Characters such as M, N and K cannot be formed properly.

Page 16: Kumpulan skematik elektronika 4

ELECTRONICS PROJECTS Vol. 21 167

PHONE BROADCASTER

Here is a simple yet very usefulcircuit which can be used toeavesdrop on a telephone con-

versation. The circuit can also be used asa wireless telephone amplifier.

One important feature of this circuitis that the circuit derives its power di-rectly from the active telephone lines, andthus avoids use of any external batteryor other power supplies. This not onlysaves a lot of space but also money. Itconsumes very low current from telephonelines without disturbing its performance.The circuit is very tiny and can bebuilt using a single-IC type veroboard thatcan be easily fitted inside a telephoneconnection box of 3.75 cm x 5 cm.

The circuit consists of two sec-tions, namely, automatic switch-ing section and FM transmittersection.

Automatic switching sectioncomprises resistors R1 to R3,preset VR1, transistors T1 and T2,zener D2, and diode D1. ResistorR1, along with preset VR1, worksas a voltage divider. When voltageacross the telephone lines is 48VDC, the voltage available at wiperof preset VR1 ranges from 0 to 32V(adjustable). The switching voltageof the circuit depends on zener

breakdown voltage (here 24V) and switch-ing voltage of the transistor T1 (0.7V).Thus, if we adjust preset VR1 to get over24.7 volts, it will cause the zener tobreakdown and transistor T1 to conduct.As a result collector of transistor T1 willget pulled towards negative supply, to cutoff transistor T2. At this stage, if you liftthe handset of the telephone, the line volt-age drops to about 11V and transistor T1is cut off. As a result, transistor T2 getsforward biased through resistor R2, to pro-vide a DC path for transistor T3 used inthe following FM transmitter section.

The low-power FM transmitter sec-tion comprises oscillator transistor T3, coilL1, and a few other components. Transis-

tor T3 works as a common-emitter RFoscillator, with transistor T2 serving asan electronic ‘on’/‘off’ switch. The audiosignal available across the telephone linesautomatically modulates oscillator fre-quency via transistor T2 along with itsseries biasing resistor R3. The modu-lated RF signal is fed to the antenna. Thetelephone conversation can be heard onan FM receiver remotely when it is tunedto FM transmitter frequency.

Lab Note: During testing of the cir-cuit it was observed that the telephoneused was giving an engaged tonewhen dialed by any subscriber. Additionof resistor R5 and capacitor C6 was foundnecessary for rectification of the fault.

Page 17: Kumpulan skematik elektronika 4

CIRCUITIDEAS

E L E C T R O N I C S F O R Y O U • M A R C H 2 0 0 6 • 1 0 1W W W . E F Y M A G . C O M

CMYK

D. MOHAN KUMAR

PICNIC LAMP S.C. DWIVEDI

Y ou can take this white LED-based night lamp on your pic-nic outings. The lamp has

sound trigger and push-to-on facili-ties and gives ample light dur-ing a walk at night. It will alsoprove useful in locating thedoor of your tent in the dark-ness. A click of the fingers willswitch on the lamp for threeminutes to help you in astrange place.

The circuit uses low-powerICs to save the battery power.JFET op-amp TL071 (IC1) am-plifies the sound picked up bythe condenser microphone. Re-sistor R1 and low-value capaci-tor C1 (0.22µF) make the am-plifier insensitive to very low-frequency sounds, eliminatingthe chance of false triggering.VR1 is used to adjust the sensitivity ofthe microphone and VR2 adjusts thegain of IC1.

The amplified output from IC1 iscoupled to trigger pin 2 of IC2, which

is a monostable multivibrator builtaround low-power CMOS timer IC7555. Resistor R4 keeps trigger inputpin 2 of the monostable normally highin the absence of the trigger input.Timing elements R6 and C4 give a time

delay of three minutes. Reset pin 4 ofIC2 is connected to the positive railthrough R5 and to the negative railthrough C2 to provide power-on-resetfunction. The output of IC2 powers the

white LED (LED1) through ballast re-sistor R7.

The circuit can be easily assembledon a perforated board. Make the cir-cuit assembly as compact as possibleto enclose in a small case. Use three

1.5V pen-light cells to power the cir-cuit. Adjust VR1 and VR2 suitably toget sufficient sensitivity of IC1. Toggleswitch S1 can be used to switch on thelamp like a torch.

Page 18: Kumpulan skematik elektronika 4

ELECTRONICS PROJECTS Vol. 21182

Most of the power-supply failureindicator circuits need a sepa-rate power-supply for them-

selves. But the alarm circuit presentedhere needs no additional supply source. Itemploys an electrolytic capacitor to storeadequate charge, to feed power to thealarm circuit which sounds an alarm fora reasonable duration when the mainssupply fails.

During the presence of mains powersupply, the rectified mains voltage isstepped down to a required low level. Azener is used to limit thefiltered voltage to 15-volt level.Mains presence is indicated byan LED. The low-level DC isused for charging capacitor C3and reverse biasing switchingtransistor T1. Thus, transistorT1 remains cut-off as long asthe mains supply is present. Assoon as the mains power fails,the charge stored in the capaci-tor acts as a power-supplysource for transistor T1. Since,in the absence of mains supply,the base of transistor is pulled

‘low’ via resistor R8, it conducts andsounds the buzzer (alarm) to give awarning of the power-failure.

With the value of C3 as shown, a good-quality buzzer would sound for about aminute. By increasing or decreasing thevalue of capacitor C3, this time can bealtered to serve one’s need.

Assembly is quite easy. The values ofthe components are not critical. If thealarm circuit is powered from any exter-nal DC power-supply source, the mains-supply section up to points ‘P’ and ‘M’ can

be omitted from the circuit. Followingpoints may be noted:

1. At a higher DC voltage level, tran-sistor T1 (BC558) may pass some collec-tor-to-emitter leakage current, causing acontinuous murmuring sound from thebuzzer. In that case, replace it with somelow-gain transistor.

2. Piezo buzzer must be a continuoustone version, with built-in oscillator.

To save space, one may use five small-sized 1000μF capacitors (in parallel) inplace of bulky high-value capacitor C3.

POWER-SUPPLY FAILURE ALARM

Page 19: Kumpulan skematik elektronika 4

ELECTRONICS FOR YOU !!!!! JULY 2000

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

Most of the power-supply failureindicator circuits need a sepa-rate power-supply for them-

selves. But the alarm circuitpresented here needs no addi-tional supply source. It em-ploys an electrolytic capacitorto store adequate charge, tofeed power to the alarm cir-cuit which sounds an alarmfor a reasonable durationwhen the mains supply fails.

During the presence ofmains power supply, the rec-tified mains voltage is steppeddown to a required low level.A zener is used to limit thefiltered voltage to 15-voltlevel. Mains presence is indicated by anLED. The low-level DC is used for charg-ing capacitor C3 and reverse biasingswitching transistor T1. Thus, transistorT1 remains cut-off as long as the mainssupply is present. As soon as the mainspower fails, the charge stored in the ca-pacitor acts as a power-supply source for

S.C. DWIVEDI

M.K. CHANDRA MOULEESWARAN

POWER-SUPPLY FAILURE ALARM

transistor T1. Since, in the absence ofmains supply, the base of transistor ispulled ‘low’ via resistor R8, it conducts

and sounds the buzzer (alarm) to give awarning of the power-failure.

With the value of C3 as shown, a good-quality buzzer would sound for about aminute. By increasing or decreasing thevalue of capacitor C3, this time can bealtered to serve one’s need.

Assembly is quite easy. The values of

the components are not critical. If thealarm circuit is powered from any exter-nal DC power-supply source, the mains-supply section up to points ‘P’ and ‘M’ canbe omitted from the circuit. Followingpoints may be noted:

1. At a higher DC voltage level, tran-sistor T1 (BC558) may pass some collec-tor-to-emitter leakage current, causing acontinuous murmuring sound from the

buzzer. In that case, replace it with somelow-gain transistor.

2. Piezo buzzer must be a continuoustone version, with built-in oscillator.

To save space, one may use five small-sized 1000µF capacitors (in parallel) inplace of bulky high-value capacitor C3.

"

Page 20: Kumpulan skematik elektronika 4

ELECTRONICS PROJECTS Vol. 22

PRECISION ATTENUATOR

WITH DIGITAL CONTROL

When instruments are designed,an analogue front-end is es-sential. Further, as most equip-

ment have digital or microcontroller in-terface, the analogue circuit needs to havedigital control/access.

The circuit of a programmable attenu-

ator with digital control is described here,where digital control can be a remote dipswitch, or CMOS logic outputs of a de-cade counter (having binary equivalentweight of 1, 2, 4, and 8, respectively), orI/O port of a microcontroller like 80C31.

The heart of this circuit is the popu-lar OP07 op-amp with ultra-low offset inthe inverting configuration. A dual, 4-channel CMOS analogue multiplexerswitch CD4052 enables the change ingain. An innovative feature of the circuitis that the ‘on’ resistance (around 100ohms) of CD4052 switch is bypassed sothat no error is introduced by its use.

Resistors R1 to R6 used in the circuitshould be of 0.1 per cent tolerance, 50ppm (parts per million) if you use 3½-digit DPM, i.e. ±1999 counts (approx. 11bits). But for 4½-digit DPM (approx. 14bits), you may need to have trimpots (e.g.replace 1k-ohm resistor R6 by a fixed 900-ohm resistor in series with a 200-ohmtrimpot) to replace R3, R4, R5, and R6gain selection resistors for proper calibra-tion to required accuracy. However, for

testing or trials, use 1 per cent 100ppmMFR resistors. The expected errors willbe around 1 per cent.

To keep parts count (hence cost) to aminimum, the common or ground isused as the positive input terminal andone end of resistor R1 as the negative.

This is so because the op-amp invertsthe polarity as it is used in invertingconfiguration. This does not matter asthe equipment will be isolated by thepower supply transformer and all polari-ties are relative. In case you want thecommon to be the negative, you will haveto add some stages (IC4 and IC5 circuitryshown in precision amplifier circuit de-scribed later).

The OP07 pinout is based on stan-dard single op-amp 741. Any otherop-amp like CA3140, TLO71, or LF351can be used but with offset errors in ex-cess of 1 per cent, which is not tolerablein precision instrumentation.

The OP07 has equivalent ICs likeμA741 and LM607 having ultra-low off-set voltage (<100μV), low input biascurrent (<10nA), and high input imped-ance (>100M), which are the key require-ments for a good instrumentation op-ampfor use with DC inputs.

The following design considerationsshould be kept in mind:

(a) Input: 500V max

Since ¼W resistors can withstand upto 250V, resistors R1 and R2 in series areused for 1 meg-ohm with 500V (max) in-put limit. These resistors additionallylimit the input current as well. Diodes D1and D2 clamp the voltage across input ofop-amp to ±0.5V, thereby protecting the

op-amp.(b) OutputThe output can be connected to a 7107/

7135-based DPM or any other analogue-to-digital converter or op-amp stage. Usea buffer at the output if the output has tobe loaded by a load less than 1 meg-ohm.

Use an inverting buffer if input leadshave to have polarity where ground is theinverting terminal. (For details, see nextcircuit.)

(c) CD4052 CMOS switchThe on-resistance (100-ohm approx.)

comes in series with the op-amp outputsource resistance, which produces no er-ror at output.

Caution. The circuit does not isolate,it only attenuates. When high voltage ispresent at its input, do not touch any partof the circuit.

(d) Digital control options(i) A and B can be controlled by I/O

port of a microcontroller like 80C31 sothat the controller can control gain.

(ii) A and B can be given to counterslike 4029/4518 to scroll gain digitally.

(iii) A and B can be connected to DIPswitch.

(iv) A and B can be connected to athumbwheel switch.

Notes. 1. Digital input logic 0 is 0Vand logic 1 is 5V.

2. All resistors are metal film resis-tors (MFR) with 1% tolerance, unlessspecified otherwise.

3. C2 and C3 are ceramic disk capaci-tors of 0.1μF = 100nF value.

Truth Table (Control input VS attenuation)X,Y (ON-switch (2) (1) GainPair) B A (Attenuation)X0,Y0 0 0 1/1000X1,Y1 0 1 1/100X2,Y2 1 0 1/10X3,Y3 1 1 1

Page 21: Kumpulan skematik elektronika 4

ELECTRONICS PROJECTS Vol. 21174

PRECISION DIGITAL AC

POWER CONTROLLER

S CRs and Triacs areextensively used inmodern electronic power

controllers—in which power iscontrolled by means of phaseangle variation of the conductionperiod. Controlling the phaseangle can be made simple andeasy if we set different firingtimes corresponding to differentfiring angles. The design givenhere is a synchronised program-mable timer which achieves thisobjective.

The following equation for asinewave shows how firing timeand the phase angle are relatedto each other:

θ = 2πft or θ∝tHere, θ is the angle described

by a sinewave in time t (seconds),while f is the frequency ofsinewave in Hz. Time period T(in seconds) of a sinewave isequal to the reciprocal of its

frequency, i.e. T = 1/f.The above equation indicates that

if one divides the angle describedduring one complete cycle of thesinewave (2π = 360o) into equal parts,then time period T of the wave will bedivided into identical equal parts.Thus, it becomes fairly easy to set thedifferent programmable timingssynchronised with the AC mainssinewave at zero crossing. The mainadvantage of such an arrangement,as already mentioned earlier, is thatonly the firing time has to beprogrammed to set different firing

angles. It is to be noted that themore precise the timer, the moreprecise will be the power being con-trolled.

In this circuit, the time periodof mains waveform is divided into20 equal parts. So, there is a timeinterval of 1 ms between two con-secutive steps. The sampling volt-age is unfiltered full-wave and isobtained from the diode bridge atthe output of the powertransformer. The timer is reset atevery zero crossing of full wave and

set again instantly for the next delay time.This arrangement helps the timer to beset for every half of mains wave—whenthe positive half of the mains waveformstarts building up, the timer is set forthat half and as it begins to cross zero, itgets reset and set again for negative half,when the negative half begins to buildup. The process is repeated. Here, insteadof using two zero crossing detectors—onefor each half of mains wave—a single de-tector is used to perform both thefunctions. This is possible because thesampling wave for negative half is in-verted by the rectifier diode bridge.

The 18V AC from power transformeris fed to the four diodes in bridgeconfiguration, followed by the filter ca-pacitor which is again followed by a three-terminal voltage regulator IC LM7812.The voltage so obtained drives the cir-cuit. The unfiltered voltage is isolatedfrom the filter capacitor by a diode and isfed to zener diode D8, which acts as aclipper to clip voltage above 6 volts.

This voltage is fed to the base oftransistor T1, which is wired as zero cross-ing detector. When base voltage reachesthe threshold, it conducts. It thus sup-

Page 22: Kumpulan skematik elektronika 4

ELECTRONICS PROJECTS Vol. 21 175

plies a narrow positive pulse which resetsthe timer at every zero crossing.

A 32.768kHz crystal is usedto get stable output of nearly1 kHz (1,024Hz) frequency afterfive stages of binary division byan oscillator-cum-divider IC CD4060. The32.768kHz crystal is used because it canbe found in unused quartz clocks and isreadily available in the market. But useof a 1kHz crystal using a quad-NAND IC

CD4093 as clock generator, as shown inFig. 2, is better as it provides the exacttime interval required. In that case,CD4060 oscillator/divider is not required.

The CD4017B counter-cum-decoder ICthen divides this 1kHz signal into ten equalintervals, which are programmed via thesingle-pole, 10-way rotary switch. Oncethe delayed output reaches the desiredtime interval, the corresponding output ofCD4017 inhibits the counter CD4017 (via

pole of rotary switch and diode D6) andfires the Triac. Transistor T2 here acts asa driver transistor. The reset pin of 4017is connected to zero crossing detector out-put to reset it at every zero crossing. (Theload-current waveforms for a few positionsof the rotary switch, as observed at EFYLab, are shown in Fig. 3.)

The circuit can be used as power con-troller in lighting equipment, hot-air oven,universal single-phase AC motor, heater, etc.

Page 23: Kumpulan skematik elektronika 4

ELECTRONICS PROJECTS Vol. 20

Precision 1Hz clock Generator usinG cHiP-on-Board

Usually the circuits for generation of 1Hz clock for applications in digital clock and counter circuits

make use of ICs in conjunction with a crystal and trimmer capacitors, etc. However, similar or better accuracy can be achieved using a chip-on-board (COB) device found inside a digital clock, which is readily available in the market for Rs 15-20. This COB consists of IC, ca-pacitors and quartz crystal, etc which are mounted on its surface. It works on 1.4 volt DC source. This COB can be used to derive 1Hz clock.

Resistor R1, capacitor C3, diodes D1 and D2 shown in the circuit convert 5V DC into 1.4V DC. A ½Hz clock is avail-able at terminals A and B with a phase difference of 90o. The two outputs, are combined using capacitors C1 and C2 to obtain a complete 1Hz clock. This 1Hz

clock pulse has a very low amplitude of the order of a few milli-volts which cannot be used to drive the digital cir-cuits directly. This low-level voltage is amplified several times by op-amp IC CA3140.

The op-amp CA3140 is connected in a non-inverting mode, and its gain is set by resistors R4 and R3. Capacitor C2 reduces the AC gain and unwanted stray pick-up and thus improves stability of the circuit.

The input impedance of IC CA3140 is very high and thus there is no drop

at the input when 1Hz clock signal of low level is connected across its input terminals from the COB. Amplified 1Hz clock pulse is available at its output pin 6, which is further amplified by transis-tors T1 and T2 to drive the digital clocks and timers.

Preset VR1 is offset null control used to adjust proper 1Hz pulse at the output terminal ‘E’. Connect one LED in series with 220-ohm resistor between the terminal ‘E’ and ground and adjust preset VR1 till the LED blinks once every second. When using the COB, affix the same

on a general-purpose PCB using rubber based adhesive and solder the terminals neatly using thin single-strand wire.

Lab Note: The COBs used in dif-f e r e n t w a t c h e s may differ some-w h a t i n t h e i r c o n f i g u r a t i o n . But by trial-and- error one can al-ways find out the appropriate points corresponding to

points A, B, C and D. Figure of a sec-ond COB used by EFY Lab is shown alongside. The points A and B (on the COB used by us) were observed to have complementary 1Hz outputs and hence anyone (only) could be used as input to opamp CA3140.

Page 24: Kumpulan skematik elektronika 4

ELECTRONICS PROJECTS Vol. 19192

PROGRAMMABLE DOOR-BELL WITH FLASHING LEDS

IC1 (NE555) is used here as a clock generator. It is configured as an astable multivibrator whose frequency

can be adjusted with the help of potmeter VR1. The clock pulses obtained from IC1 are fed to pin 14 of IC2 (CD4017) which is a well-known decade counter.

Here LEDS have been connected in a rather unusual way. The LEDs flash sequentially from Q0 to Q9. Five presets

of 100k each are connected to each pair of LEDs.

IC3 here works as tune generator and the Darlington pair comprising transistors BC547B and SL100B is used to amplify its output. The frequency of IC3 is adjusted by potmeter VR2. Each 100k preset (VR3 through VR7) is ad-justed for a different tune depending on individual choice. The 10-LED display

is assembled in such a way that the first vertical column has orange LED1 through LED5 and the second parallel column has green LED10 through LED6, as shown in the figure.

The circuit can be easily assembled on a veroboard. Any well-filtered 9V, 250mA DC power supply is suitable. Primary of the supply transformer may be connected to the bell AC outlet points.

Page 25: Kumpulan skematik elektronika 4

ELECTRONICS PROJECTS Vol. 22 �

Programmable leD InDIcatorAlthough IC CD4017 is a decade

counter, it can be used in a vari- ety of ways. In this circuit it has

been used to program a bicolour LED indicator in 10 different modes which can be selected with a single push-button switch.

IC3(555) is used in astable mode to generate square wave and transistor T1 is used to obtain its complementary wave-form. IC2 CD4081 is a quad 2-input AND gate. These AND gates and the diode ma-trix form the logical part of the circuit. IC4 (555) is configured as a monostable flip-flop which provides a single clock pulse to IC1 CD4017 for changing the mode by depression of push-to-on switch S1. The use of IC4 avoids switch debouncing prob-lem which causes multiple makes/breaks.

Switch S2 is included for resetting the circuit. Instead of just one bicolour LED you can use an array of bicolour LEDs in conjunction with two driver transistors.

The bicolour (RED and GREEN) LED has three legs. The middle terminal (pin2) LED is the common cathode pin which is grounded when a positive voltage is ap-

TABLE IMode Operation0 Off1 Red ON2 Green ON3 Blinking Green-Yellow-Green-Yellow...4 Blinking Red5 Blinking Yellow6 Blinking Green7 Yellow ON8 Blinking Red-Yellow-Red-Yellow... 9 Blinking Red-Green-Red-Green...

plied to pin1, it emits red light. Similarly, when positive voltage is applied to pin3, it emits green light. And when positive volt-age is simultaneously applied to its pin1 and 3, it emits yellowish light.

Power supply used is +5V regulated. Various modes of this circuit are sum-merised in Table I.

Outputs of IC1 can also be selected through a 10-way rotary switch connected to Vcc. Now IC1 can be eliminated. Differ-ent indications can be activated for differ-ent functions of a device.

Construction is very easy and total cost of this circuit is less than Rs 60. Current con-sumption of the circuit is less than 100mA.

Page 26: Kumpulan skematik elektronika 4

ELECTRONICS PROJECTS Vol. 21 155

PROTECTION FOR YOUR

ELECTRICAL APPLIANCES

Here is a very low-cost circuit tosave your electrically operatedappliances, such as TV, tape

recorder, refrigerator, and otherinstruments during sudden tripping andresumption of mains supply. Applianceslike refrigerators and air-conditioners aremore prone to damage due to suchconditions.

The simple circuit given here switchesoff the mains supply to theload as soon as the powertrips. The supply can beresumed only by manualintervention. Thus, thesupply may be switched ononly after it has stabilised.

The circuit comprises astep-down transformerfollowed by a full-waverectifier and smoothingcapacitor C1 which acts asa supply source for relay

RL1. Initially, when the circuit is switchedon, the power supply path to the step-down transformer X1 as well as the load isincomplete, as the relay is in de-energisedstate. To energise the relay, press switchS1 for a short duration. This completesthe path for the supply to transformer X1as also the load via closed contacts of switchS1. Meanwhile, the supply to relay becomesavailable and it gets energised to provide

a parallel path for the supply to thetransformer as well as the load.

If there is any interruption in the powersupply, the supply to the transformer isnot available and the relay de-energises.Thus, once the supply is interrupted evenfor a brief period, the relay is de-energisedand you have to press switch S1momentarily (when the supply resumes)to make it available to the load.

Very-short-duration(say, 1 to 5 milliseconds)interruptions orfluctuations will notaffect the circuit becauseof presence of large-value capacitor whichhas to discharge via therelay coil. Thus thecircuit provides suitablesafety against erraticpower supplyconditions.

N

NPH

PH

Page 27: Kumpulan skematik elektronika 4

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

ELECTRONICS FOR YOUJUNE 2003

S.C. DWIVEDI

This circuit is very useful whilechecking/operating counters, step-ping relays, etc. It avoids the pro-

cedure of setting a switch for the requirednumber of pulses. By pressing appropriateswitches S1 to S9, one can get 1 to 9 nega-tive-going clock pulses, respectively.

Schmitt trigger NAND gate N1 of IC2,resistor R1, and capacitor C1 are wired toproduce clock pulses. These pulses are takenout through NAND gate N3 that is con-trolled by decade counter CD4017 (IC1).

Initially no switch from S1 to S9 is

PULSE GENERATOR

A. JEYABAL depressed and the LED is glowing. As pins5 and 6 of NAND gate N2 are pulled upby resistor R3, its output pin 4 goes low.This disables NAND gate N3 to take itsoutput pin 10 to high state, and no pulseis available.

IC1 is a decade counter whose Q out-puts normally remain low. When clockpulses are applied, its Q outputs go highsuccessively, i.e. Q0 shifts to Q1, Q1 shiftsto Q2, Q3 shifts to Q4, and so on.

If any one of switches S1 through S9,say, S5 (for five pulses), is momentarilydepressed, pins 5 and 6 of NAND gate N2go low, making its output pin 4 high, which

fully charges capacitor C2 via diode D. Atthe same time, this high output of N2 en-ables NAND gate N3 and clock pulses comeout through pin 10. These are the requirednumber of pulses used to check our de-vice.

The clock pulses are fed to clock-enablepin 13 of IC1, which starts counting. Assoon as output pin 1 (Q5) of IC1 turns high,input pins 5 and 6 of NAND gate N2 willalso become high via switch S5 becausehigh-frequency clock allowed five pulsesduring momentary pressing. This high in-put of N2 provides low output at pin 4 todisable NAND gate N3 and finally no pulsewill be available to advance counter IC1.

Before the next usage, counter IC1must be in the standby state, i.e. Q0 out-put must be in the high state. To do this,a time-delay pulse generator wired aroundNAND gate N4, resister R4, diode D, ca-pacitor C2, and differentiator circuit com-prising C3 and R5 is used.

When output pin 4 of NAND gate N2is low, it discharges capacitor C2 slowlythrough resistor R4. When the voltageacross capacitor C2 goes below the lowertrip point, output pin 11 of NAND gate N4turns high and a high-going sharp pulse isproduced at the junction of capacitor C3and resistor R5. This sharp pulse resetscounter IC1 and its Q0 output (pin 3) goeshigh. This is represented by the glowingof LED.

Ensure the red LED is glowing beforeproceeding to get the next pulse. Pressany of the switches momentarily and theLED will glow. If the switch is keptpressed, the counter counts continuouslyand you cannot get the exact number ofpulses.

This circuit costs around Rs 70.

Page 28: Kumpulan skematik elektronika 4

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

ELECTRONICS FOR YOUAUGUST 2004

SUNIL KUMARQUALITY FM TRANSMITTERTAPAN KUMAR MAHARANA

This FM transmitter for your stereoor any other amplifier provides agood signal strength up to a dis-

tance of 500 metres with a poweroutput of about 200 mW. It worksoff a 9V battery.

The audio-frequency modula-tion stage is built around transis-tor BF494 (T1), which is wiredas a VHF oscillator and modu-lates the audio signal present atthe base. Using preset VR1, youcan adjust the audio signal level.The VHF frequency is decided bycoil L1 and variable capacitorVC1. Reduce the value of VR2 tohave a greater power output.

The next stage is built aroundtransistor BC548 (T2), whichserves as a Class-A power ampli-fier. This stage is inductivelycoupled to the audio-frequencymodulation stage. The antennamatching network consists ofvariable capacitor VC2 and capacitor C9.Adjust VC2 for the maximum transmis-sion of power or signal strength at thereceiver.

L1: 5 turns of 24 SWG wire closelywound over a 5mm dia. air core

L2: 2 turns of 24 SWG wire closelywound over the 5mm dia. air core

L3: 7 turns of 24 SWG wire closely

wound over a 4mm dia. air coreL4: 5 turns of 28 SWG wire on an

intermediate-frequency transmitter (IFT)ferrite core

For frequency stability, use a regulatedDC power supply and house the transmit-ter inside a metallic cabinet. For higherantenna gain, use a telescopic antenna inplace of the simple wire. Coils L1 and L2

are to be wound over the same air coresuch that windings for coil L2 start fromthe end point for coil L1. Coil windingdetails are given below:

Page 29: Kumpulan skematik elektronika 4

ELECTRONICS PROJECTS Vol. 19 177

The circuit described here can be used for control- ling a decorative lamp

from zero intensity to maximum intensity in a specified time. Typical applications are for controlling Christmas lamps and serial lampsets etc. The bright-ness of the lamps is controlled by a continuously running ramp voltage generated by a timer.

The circuit features a triac (BT136) controlled by pulses from a UJT (unijunction transis-tor) relaxation oscillator. Pedes-tal voltage control is employed for controlling the firing angle. Pedestal voltage is derived from a ramp generator which sets the time period of intensity control.

X1 secondary (sec. 2) pro-vides the power supply for the ramp generator section. The 555 timer circuit is configured as astable multivibrator which provides rectangular pulses having required time period which are converted to a positive going ramp by sweep generator transistor T1. This is coupled to the base of transistor T2. The time period of control can be altered by modifying the sweep generator and 555 timer sections.

X1 is a step-down transformer hav-ing two secondaries. Any centre-tapped

RAMP CONTROLLED LIGHT

step-down transformer will serve the purpose. However, it is advisable to have a higher voltage rating (9V or 12V) for X1 secondary (sec. 1) for extended control range.

Zener diode D12 generates the re-quired trapezoidal waveform for the UJT oscillator from the bridge rectifier output.

Transistor T2 controls the charging time of capacitor C5, thus providing the pedes-tal voltage control.

The pulses generated by the UJT oscillator are coupled to the gate of triac through a pulse transformer (X2). A ferrite core transformer with 1:1 ratio can also be used for X2.

Page 30: Kumpulan skematik elektronika 4

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

ELECTRONICS FOR YOU OCTOBER 2003

REMOTE-OPERATED MUSICAL BELL S.C. DWIVEDI

PRADEEP G.

This infrared light-controlled 12-tonemusical bell can be

operated using any TV re-mote control. It can beoperated from up to 10metres, provided the re-mote control is directedtowards the sensor.

The circuit uses thepopular 3-lead IR sensorTK1836 to trigger musi-cal bell built around ICUM3481(IC1). (You canalso use IC UM3482,UM3483, or UM3484in place of IC UM3481.)The sensor responds only to 36 kHz.Most TV remote controls transmit thisfrequency.

When any button on the TV remotecontrol is pressed, the sensor’s output

pulses low. Transistor T1 conducts to ap-ply a triggering pulse to IC1 at its pin 4.After playing one musical tone, the circuitautomatically resets. If you again press anyof the remote’s buttons, another music is

heard. This way, twelve different musicaltones can be generated.

The circuit works off a 5V power sup-ply. Regulator IC 7805, powered from a 9-12V DC source, provides regulated 5V.

Page 31: Kumpulan skematik elektronika 4

ELECTRONICS PROJECTS Vol. 20

Running Message DisplayLight emitting diodes are advanta-

geous due to their smaller size, low current consumption and

catchy colours they emit. Here is a run-ning message display circuit wherein the letters formed by LED arrangement light up progressively. Once all the letters of the message have been lit up, the circuit gets reset.

The circuit is built around Johnson decade counter CD4017BC (IC2). One of the IC CD4017BE’s features is its provi-sion of ten fully decoded outputs, making

the IC ideal for use in a whole range of sequencing operations. In the circuit only one of the outputs remains high and the other outputs switch to high state successively on the arrival of each

clock pulse.The timer NE555 (IC1) is wired as a

1Hz astable multivibrator which clocks the IC2 for sequencing operations. On reset, output pin 3 goes high and drives transistor T7 to ‘on’ state. The output of transistor T7 is connected to letter ‘W’ of the LED word array (all LEDs of a letter array are connected in parallel) and thus letter ‘W’ is illuminated. On arrival of first clock pulse, pin 3 goes low and pin 2 goes high. Transistor T6 conducts and let-ter ‘E’ lights up. The preceding letter ‘W’

also remains lighted because of forward biasing of transistor T7 via diode D21. In a similar fashion, on the arrival of each successive pulse, the other letters of the display are also illuminated and finally

the complete word becomes visible. On the following clock pulse, pin 6 goes to logic 1 and resets the circuit, and the sequence repeats itself. The frequency of sequenc-ing operations is controlled with the help of potmeter VR1.

The display can be fixed on a veroboard of suitable size and connected to ground of a common supply (of 6V to 9V) while the anodes of LEDs are to be connected to emitters of transistors T1 through T7 as shown in the circuit.

The above circuit is very versatile and

can be wired with a large number of LEDs to make an LED fashion jewellery of any design. With two circuits connected in a similar manner, multiplexing of LEDs can be done to give a moving display effect.

Page 32: Kumpulan skematik elektronika 4

CIRCUIT

IDEAS

9 4 • D E C E M B E R 2 0 0 6 • E L E C T R O N I C S F O R Y O U W W W . E F Y M A G . C O M

Many people move throughthe corridors and steps inmultistoried buildings. As

most of them are strangers for the in-habitants of the flats, it becomes nec-essary to verify the identity of the visi-tor before opening the door as he canbe a burglar.

This circuit helps you identify themembers of your family. It is basically

a switchless musical bell that activateswith a single puff of breath. The con-denser mic fitted inside the existingdoor-bell switch box will trigger thebell on detecting air-pressure changesfollowing the breath. As only the mem-bers of your family know the secret ofthe bell and hence puff out before thehole for the switch box, the door canbe opened without fear.

The front end of the circuit is a con-denser mic amplifier with fixed sensi-

tivity. Transistor T1 amplifies the sig-nal received from the condenser micthrough capacitor C1. When transistorT1 conducts, a short negative pulsetriggers the monostable wired aroundIC1. The monostable time is decided

by resistor R7and capacitorC5. Reset pin 4of IC1 is madestable by R6 andC3. Resistor R5acts as a pull-upresistor for trig-ger pin 2 of IC1to keep the trig-

ger pin high in the standby mode.The high output from IC1 is used

to power IC UM66 (IC2). IC2 gener-ates a soft melody on receiv-ing 3 volts at pin 2. Transis-tor T2 amplifies the musicnotes. A zener diode main-tains the power for IC2 at asafer level of 3 volts.

Assemble the circuit onany general-purpose PCBand enclose in a suitablecabinet. The condenser micshould be connected to thecircuit using a single-coreshielded wire to reducenoise interference. Drill a1mm hole in the cover of theexisting bell switch box andfix the mic inside the boxwith adhesive. The front sideof the mic should face thehole. �Fig. 1: Secret bell circuit

Fig. 2: Pin configurationof UM66 and BC548/549

� D. MOHAN KUMAR

SECRET BELLSUNIL

KUMAR

Page 33: Kumpulan skematik elektronika 4

ELECTRONICS PROJECTS Vol. 19 189

SENSITIVE TEMPERATURE SWITCH

This temperature switch has a high sensitivity and is quite re- liable. Here, in place of a single

transistor, a Darlington pair has been used for switching.

At normal room temperature germi-num diode D1 (0A79 or equivalent) has a back resistance value of about 10 kilo-ohms. As a result Darlington pair, com-prising transistors T1 and T2. conducts and keeps the anode terminal of diode D2 at ground potential. Consequently, transistor T3 does not get base bias and thus relay RL1 is not activated.

But when temperature increases. the back resistance of diode D1 decreases

sharply, which results in cutting off of Darlington pair and forward biasing of tran-sistor T3 via resistor R2 and diode D2. As a result, relay RL1 energises and switches on the alarm. Potmeter VR1 may be adjusted for required sensitivity.

This simple circuit can be used as an overheat indicator, fire alarm, or it can be used in a constant temperature circuit for switching on a fan etc. The circuit can be easily assembled on a piece of veroboard. Diode

sensor D1 must be of germanium type and not silicon.

Page 34: Kumpulan skematik elektronika 4

CIRCUITIDEAS

1 0 0 • J A N U A R Y 2 0 0 6 • E L E C T R O N I C S F O R Y O U W W W . E F Y M A G . C O M

CMYK

D. MOHAN KUMAR

SHADOW ALARM SANI THEO

This opto-sensitive circuit soundsan alarm whenever a shadowfalls on it. So it can be used at

night by shopkeepers to protect thevaluables in their showrooms. A dimlighting in the room is necessary todetect the moving shadow. Unlikeopto-interruption alarms based onlight-dependent resistors (LDRs), itdoes not require an aligned light beamto illuminate the photo-sensor.

The circuit is powered by a 9V PP3battery and uses the most sensitivephoto-sensor L14F1 to detect shadows.It is portable and can be used at anyplace that is to be monitored.

Op-amp µA741 (IC1) is used as avoltage comparator. Its inverting in-put is biased by the voltage obtainedfrom the junction of 100k resistor R1and the collector of phototransistor T1.

The non-inverting input of IC1 gets acontrolled voltage from potential di-vider R2 and VR1.

In the presence of ambient light,the phototransistor conducts and theinverting input (pin 2) of IC1 gets alower voltage than its non-invertinginput (pin 3). This makes the outputof IC1 high, which is indicated by theglowing of LED1.

When a shadow falls on the photo-sensor, the output of IC1 goes low.This low pulse triggers the monostable

(IC2) designed for a delay of 51 sec-onds using R6 and C3. The output ofIC2 is used to light up LED2 and acti-vate the alarm.

Slide switch S2 is used to select ei-ther the buzzer or siren. When it istowards left the buzzer beeps, andwhen it is towards right IC UM3561(IC3) activates to give a loud alarmsimulating a police siren. Resistor R8

and zener diode ZD1 provide 3.1V DCto IC UM3561.

The circuit is easy to assemble asit requires only a few low-cost com-ponents. Enclose it in a cabinet withthe photo-sensor inside. Drill a 5mmhole on the front panel of the cabinetto let ambient light fall on the photo-sensor.

Adjust potmeter VR1 (47k) untilLED2 stops glowing and the buzzerstops beeping while LED1 glows. Thisis the position of VR1 to be main-

tained for that particularintensity of light. LED1 will continueto glow even when a shadow isdetected.

The circuit is now ready to use.To test it, move a paper in front ofthe unit. If LED2 glows along withthe beep of the buzzer, it means thatthe photo-sensor has detected ashadow.

Page 35: Kumpulan skematik elektronika 4

ELECTRONICS PROJECTS Vol. 19 179

The main feature of this transmit-ter is that it is free from the LC (inductor, capacitor) tuned circuit

and operates on a fixed frequency of 12 MHz which is extremely stable. An LC based tuned circuit is inherently unstable due to drift of resonant frequency on ac-count of temperature and humidity varia-tions. The circuit is very simple and uses only a few components.

The figure shows the complete circuit diagram of the transmitter. Resistors R1 and R2 are used for DC biasing of transis-tor T1. The capacitor C1 provides coupling between the condenser microphone and the base of transistor T1. Similarly, resis-tors R3, R4 and R5 provide DC biasing to transistor T2.

The oscillator section is a combina-tion of transistor T2, crystal XTAL, ca-pacitor C2, C3 and resistors R3, R4 and R5. The crystal is excited by a portion of energy from the collector of transistor T2 through the feedback capacitor C2. The crystal vibrates at its fundamental frequency and the oscillations occurring due to the crystal are applied to the base of transistor T2 across resistor R4. In this way, continuous undamped oscilla-tions are obtained. Any crystal having

the frequency in short wave range can be substitut-ed in this circuit, although the op-eration was test-ed with a 12 MHz crystal.

Transistor T1 serves three func-tions:

1. It provides the DC path for extending +VCC supply to transis-tor T2.

2. It amplifies the audio signals obtained from condenser microphone.

3. It injects the audio signal into the high frequency carrier signal for modula-tion.

The condenser microphone converts the voice message into the electrical signal which is amplified by transistor T1. This amplified audio signal modu-lates the carrier frequency generated by transistor T2. The amplitude modulated output is obtained at the collector of transistor T2 and is transmitted by a

loop antenna into space in the form of electromagnetic waves. The antenna can be tuned to a particular frequency varying trimmer C5 and also by chang-ing the length of ferrite rod into the coil.

The transmitted signals can be re-ceived on any short wave receiver without distortion and noise. The range of this transmitter is 25 to 30 metres and can be extended further if the length of the antenna wire is suitably increased along with proper matching.

short wave aM traNsMItterRAJESH KAMBOJ

Page 36: Kumpulan skematik elektronika 4

ELECTRONICS PROJECTS Vol. 23134

SHORTWAVE TRANSMITTER

This transmitter circuit operates inshortwave HF band (6 MHz to 15MHz), and can be used for short-

range communication and for educationalpurposes.

The circuit consists of a mic ampli-fier, a variable frequency oscillator, andmodulation amplifier stages. TransistorT1 (BF195) is used as a simple RF oscil-lator. Resistors R6 and R7 determine basebias, while resistor R9 is used for stabil-ity. Feedback is provided by 150pF ca-pacitor C11 to sustain oscillations. Theprimary of shortwave oscillator coil andvariable condenser VC1 (365pF, 1/2Jgang) form the frequency determining net-work.

By varying the coil inductance or the

capacitance of gang condenser, the fre-quency of oscillation can be changed. Thecarrier RF signal from the oscillator isinductively coupled through the second-ary of transformer X1 to the next RF am-

plifier-cum-modulation stage built aroundtransistor T2 that is operated in class ‘A’mode. Audio signal from the audio ampli-fier built around IC BEL1895 is coupledto the emitter of transistor 2N2222 (T2)for RF modulation.

IC BEL1895 is a monolithic audiopower amplifier designed for sensitive AMradio applications. It can deliver 1W powerto 4 ohms at 9V power supply, with lowdistortion and noise characteristics. Sincethe amplifier’s voltage gain is of the orderof 600, the signal from condenser mic can

be directly connected to its input withoutany amplification.

The transmitter’s stability is gov-erned by the quality of the tuned circuitcomponents as well as the degree of regu-

lation of the supply voltage. A 9V regu-lated power supply is required. RF out-put to the aerial contains harmonics, be-cause transistor T2 doesn’t have tunedcoil in its collector circuit. However, forshort-range communication, this does notcreate any problem. The harmonic con-tent of the output may be reduced bymeans of a high-Q L-C filter or resonantL-C traps tuned to each of theprominent harmonics. The power outputof this transmitter is about 100milliwatts.

Page 37: Kumpulan skematik elektronika 4

ELECTRONICS PROJECTS Vol. 21 169

SIMPLE ELECTRONIC

CODE LOCK

The circuit diagram of a simple elec-tronic code lock is shown in fig-ure. A 9-digit code number is used

to operate the code lock.When power supply to the circuit is

turned on, a positive pulse is applied tothe RESET pin (pin 15) through capaci-tor C1. Thus, the first output terminalQ1 (pin 3) of the decade counter IC (CD4017) will be high and all other outputs(Q2 to Q10) will be low. To shift the highstate from Q1 to Q2, a positive pulse mustbe applied at the clock input terminal (pin14) of IC1. This is possible only by press-ing the push-to-on switch S1 momentarily.On pressing switch S1, the high stateshifts from Q1 to Q2.

Now, to change the high state fromQ2 to Q3, apply another positive pulse atpin 14, which is possible only by pressingswitch S2. Similarly, the high state canbe shifted up to the tenth output (Q10)by pressing the switches S1 through S9sequentially in that order. When Q10 (pin11) is high, transistor T1 conducts andenergises relay RL1. The relay can beused to switch ‘on’ power to any electricalappliance.

Diodes D1 through D9 are providedto prevent damage/malfunctioning of theIC when two switches corresponding to‘high’ and ‘low’ output terminals arepressed simultaneously. Capacitor C2 andresistor R3 are provided to prevent noiseduring switching action.

Switch S10 is used to reset thecircuit manually. Switches S1 to S10

can be mounted on a keyboard panel,and any number or letter can be used tomark them. Switch S10 is also placedtogether with other switches so that anystranger trying to operate the lock fre-quently presses the switch S10, therebyresetting the circuit many times. Thus,he is never able to turn the relay ‘on’. Ifnecessary, two or three switches can

be connected in parallel with S10 andplaced on the keyboard panel for moresafety.

A 12V power supply is used for thecircuit. The circuit is very simple and canbe easily assembled on a general-purposePCB. The code number can be easilychanged by changing the connections toswitches (S1 to S9).

Page 38: Kumpulan skematik elektronika 4

CIRCUIT

IDEAS

E L E C T R O N I C S F O R Y O U • A P R I L 2 0 0 6 • 9 5W W W . E F Y M A G . C O M

CMYK

This low-cost short-wave trans-mitter is tunable from 10 to 15MHz with the help of ½J gang

condenser VC1, which determinesthe carrier frequency of thetransmitter in conjunction withinductor L1. The frequency trimmingcan be done with VC2. The carrieris amplified by transistor T4and coupled to RF amplifier transis-tor T1 (BD677) through transformerX1*.

The transmitter does not use anymodulator transformer. The audio out-put from condenser MIC ispreamplified by transistor T3 (BC548).The audio output from T3 is furtheramplified by transistor T2 (BD139),which modulates the RF amplifierbuilt around transistor T1 by varyingthe current through it in accordancewith the audio signal’s amplitude.RFC1 is used to block the carrier RFsignal from transistor T2 and thepower supply.

The modulated RF is coupledto the antenna via capacitor C9.For antenna, one can use a 0.5mlong telescopic aerial. Details ofRF choke, inductor L1 and coupling

� PRINCE PHILLIPS

SIMPLE SHORT-WAVETRANSMITTER

S.C. DWIVED

I

Fig. 1: Simple shortwave transmitter

Fig. 2: Pin configurations ofBD139, BD677 and BC548

transformer X1, we used a readymadeshort-wave antenna coil withtuning slug (Jawahar make),which worked satisfactorily. We testedthe transmitter reception up to75 metres and found good signalstrength. �

t ransformerare given inthe figure.

EFY Lab.During test-ing, in place ofc o u p l i n g

Page 39: Kumpulan skematik elektronika 4

ELECTRONICS PROJECTS Vol. 20

Smart Phone LightThe circuit shown here is used to switch on a lamp when the tele- phone rings, provided that the ambient light is insufficient.

The circuit can be implemented using just two ICs. A light dependent resistance (LDR), with about 5 kilo-ohms resistance

in the ambient light and greather than 100 kilo-ohms in darkness, is at the heart of the circuit.

The circuit is fully isolated from the

phone lines and it draws current only when the phone rings. The lamp can be battery powered to provide light during

power failure or load shedding also. The light switches off automati-

cally after a programmable time period. If required, the lamp lighting period can

be extended by simply pressing a pushbut-ton switch (S1).

The first part of the circuit functions as a ring detector. When telephone is on-hook, around 48V DC is present across the TIP and RING terminals. The diode in the opto-coupler is ‘off’ during this condition and it draws practically no current from the telephone lines. The opto-coupler also isolates the circuit from the telephone lines. Transistor in the opto-cou-pler is normally ‘off’ and a voltage of +5V is present at the ring indicator line B.

When telephone rings, an AC voltage of around 70-80V AC present across the telephone lines turns on the diode inside the opto-coupler (IC2), which in turn switches on transistor inside the opto-coupler. The voltage at its collector drops to a low level during ringing to trigger IC3 74LS123(A) monostable flip-flop.

The other opto-coupler (IC1) is used to detect the ambient light condition. When there is sufficient light, LDR has a low resistance of about 5 kilo-ohms and the transistor inside the opto-coupler is in ‘on’ state. When there is insufficient light available, the resistance of LDR increases to a few mega-ohms and the transistor switches to ‘off’ state. Thus

Page 40: Kumpulan skematik elektronika 4

ELECTRONICS PROJECTS Vol. 20

the DC voltage present at the collector of transistor of the opto-coupler is normally low and it jumps to 5V when there is no light or insufficient light.

The 74LS123 retriggerable monos-table multivibrator IC is used to gener-ate a programmable pulse-width. The first monostable 74LS123(A) generates a pulse from the trigger input avail-able during ringing, provided its pin 2 input (marked B) is logic high (i.e. during darkness). It remains high for

the programmed durat i on and switches back to 0V at the end of the pulse period.

This high-to-low transition (trail-ing edge) is used to trigger the second monostable flip-flop 74LS123(B) in the same package. Output of the second monostable is used to control a relay. The lamp being controlled via the N/O contacts of the relay gets switched ‘on.’ The ‘on’ period can be extended by sim-ply pressing pushbutton switch S1. If

nobody attends the phone, the light turns off automatically after the specific time period equal to the pulse-width of the second flip-flop.

The l ight sens i t iv i ty o f LDR can be changed by changing re -s istance R3 connected at co l lec -tor of the transistor in light mon-i tor c ircuit . Similarly , switch-on period of the lamp can be controlled by changing capacitor C3’s value in the second 74123(B) monostable circuit.

Page 41: Kumpulan skematik elektronika 4

ELECTRONICS FOR YOU ❚ MAY 2000

S O F T W A R E S E C T I O N

76

S O F T W A R E S E C T I O N

Here, the number 128 gives the sizeof the key in bits. This key size gives akey space (total number of combinationsof bits in the key) of 3.4 x 1038 keys, whichmakes the ‘Brute force attack’ impracti-cal. Higher the key size, tougher it is tocrack the ciphertext. In IDEA, eightrounds or iterations of data manipulationare done to generate the final output.

The manipulations may consist of oneor a combination of the following threeoperations:

Bit-by-Bit exclusive-ORingAddition of integers modulo 216

Multiplication of integers modulo 216

The expression ‘x mod y’ gives the re-mainder when x is divided by y. The valueof y is referred to as the modulus of the

expression; for example,10 mod 3 = 1. The use ofthese manipulations in asequential order producesa complex transformationof the input data, mak-ing crypt analysis diffi-cult.

Data encryption standard (DES)In DES, the plaintext ought to be of 64bits and the key of 56 bits. Longer blocksof plaintext are encrypted in 64-bit blocks.Each block of 64-bit input is passedthrough 16 iterations, with each iterationproducing an intermediate 64-bit value.

The iteration is essentially the samecomplex function that involves a permu-tation of bits and substitution of one bitpattern by another. A variation of DES,the ‘Triple DES’ that uses two keys andthree executions of the algorithm, hasgained considerable success. Triple DESemploys an encrypt-decrypt-encrypt se-quence. There is no cryptographic signifi-cance to the use of decryption for the sec-ond stage. It only allows users of tripleDES to decrypt data encoded by users ofthe older single DES.

Public-key encryptionAnother commonly used method for en-cryption is the public-private key encryp-tion. This method uses two passwords, onetermed as public key and the other pri-vate key. The algorithms used to generatekeys are based on mathematical numbersgenerated by the computer on user’s re-quest, instead of simple bit operations.

An analogy of public-key encryption isFig. 1: Triple DES

CRYPTOGRAPHY

that a letter may be replaced by anotherletter three places (offset or key) downthe order; for example, the letter ‘a’ willbecome ‘d’, and so on.

Here, lesser number of keys are pos-sible. Also, the encryption and decryptionalgorithms are known and the languageis understood easily. Because of these fac-tors, an advanced computer using either

parallel processing or distributed comput-ing can crack this method. This type ofcracking is termed as ‘Brute Force At-tack’ in computer parlance.

International Data Encryption Algo-rithm (IDEA) and Data Encryption Stan-dard (DES) are two algorithms that usethe bit-replacement technique explainedabove. These algorithms, along with com-pression, are used to send secure e-mailusing software programs like PGP (PrettyGood Privacy)—the present standard forencrypted mail. In PGP, the public-keyencryption explained in the later part ofthe article is also used.

International data encryptionalgorithm (IDEA)

The Swiss Federal Institute ofTechnology developed IDEA in1990. This method uses a 128-bitkey; only the powers of two areused as key-size. If the key is toolarge, the computations involvedin encryption and decryption makethe working of the algorithmslower; and if it is too small, thealgorithm becomes insecure. Aswith any other bit replacementscheme, there are two inputs,namely, the plain text and the key.

News item in ‘The Times of India’,Mumbai, on June 27, 1999: “TheIndian Institute of Technology,

Kanpur, has developed a new-generationcipher code for the Indian navy. Thebreakthrough would provide a technologi-cal edge to defence communication. Chris-tened ‘Trinetra’, the cipher is a moderncomputer-based code language systemwhich can digitise long, alphabetic mes-sages within seconds.”

This article is about cryptography—the science of scrambling data to make itunintelligible to all, except the intendedperson. It has come to focus recently dueto the expanding influence of e-commerce.Almost all the credit card transactionstaking place on the Internet or elsewheremake use of cryptography. This conceptis also used in ‘secure server’ transactions,where the data is guarded by the use ofcryptography.

Some of the terms used in this articleare explained below:

Plaintext is the text or data that is tobe encrypted. It is one of the inputs tothe encryption algorithm.

Key is the password used to decryptthe coded message.

Ciphertext is the output of the encryp-tion algorithm. It can be transmitted safelyas it is unintelligible without the key.

One of the earliest known and sim-plest methods of encryption is the ‘Cae-sar Cipher’ method, which involves re-placement of each letter in the messagewith some other letter or numeral. Theprinciple of ‘bit replacement technique’ is

S. SUNDAR

Fig. 2: Public-key encryption

Page 42: Kumpulan skematik elektronika 4

ELECTRONICS FOR YOU ❚ MAY 2000

S O F T W A R E S E C T I O N

77

safe with a special type of lock that can belocked/unlocked with one or two differentkeys. A left key turns the mechanism tothe left and a right key turns it to theright. In the unlocked state, the mecha-nism is in the centre position. If lockedwith the right key, the only way to unlockit is by using the left key and vice-versa. If‘A’ wants to send a message to ‘B’, he/shecan put the message in the box and lock it

with the right key. On receiving the mes-sage, ‘B’ can unlock the box usingthe corresponding left key and read themessage.

The lock will open only when a par-ticular key combination is used. Supposea group of people wants to share mes-sages using this method. Then everyonein the group buys one’s own safe box andfreely supplies the respective right keyduplicates but keeps one’s left keys tooneselves. For communication, one canjust write the message, put it in the safe,lock it using the right key of the recipi-ent, and pass it to the recipient who usesone’s own left key to unlock it.

Thus, the message can be transmit-ted safely, since apart from the intendedrecipient no one else would be having thecorrect left key.

A similar technique is used in public-key encryption. In place of a right key, apublic key is used while encrypting and,in place of a left key, a private key isused for decrypting.

Once a key is lost, the data encryptedusing the particular key can’t be recov-ered. So backup copies of all the keys usedmust be kept necessarily.

Furthermore, these algorithms havethe following important characteristics:

• It is computationally unfeasible todetermine the decryption key with theknowledge of the cryptography and theencryption key.

• Either of the two related keys canbe used for encryption.

With conventional encryption (bit re-placement technique as opposed to pub-lic-key encryption), a fundamental re-quirement for two parties to communi-cate securely was to share a secret key.

How to distribute the secret key was themost difficult problem for conventional en-cryption. This problem is eliminated bythe public-key encryption, consideringthat private key is never distributed.

RSARon Rivest, Adi Shamir, and Len Adlemanat MIT (Massachusetts Institute of Tech-

nology) devel-oped one of thefirst public-keyschemes in1977. The RSAscheme thenreigned su-preme as the

only widely accepted and implemented ap-proach to public-key encryption.

RSA is a cipher in which the plaintextand the ciphertext are integers between 0and ‘n-1’, for some valued ‘n’. For a longmessage, the message is broken intoblocks. These blocks are log2n bits long.Two high-value prime numbers are mul-tiplied to get ‘n’ so that extracting thevalue of ‘n’ becomes very difficult. As thepublic and private keys are dependent onthe value of ‘n’, guessing this value is verydifficult.

Encryption and decryption make useof modular arithmetic. The RSA algorithmfor plaintext block M and ciphertext blockC with keys ‘e’ and ‘d’ is given below:Key generationSelect p,q p and q are both primeCalculate n = p x qCalculate f(n) = (p-1)(q-1)Select integer e gcd(f(n),e)=1; 1<e<f(n)Calculate d d=e-1 mod f (n)Public Key KU = {e,n}Private Key KR = {d,n}EncryptionPlaintext: M<nCiphertext: C = Me (mod n)DecryptionCiphertext: CPlaintext: M = Cd (mod n)The RSA AlgorithmC = Me mod nM = Cd mod n = (Me)d mod n = Med mod n

Both sender and receiver must knowthe value of ‘n’ and ‘e’; whereas the valueof d is known only to the receiver. Thus,this is a public-key encryption algorithmin which the public key is {e,n} and theprivate key is {d,n}. For public-key en-cryption, this algorithm will be satisfac-tory if the following conditions are ful-

filled:• Values of e, d, and n exist such that

M = Med mod n, for all M < n.• It should be relatively easy to cal-

culate Me and Cd for all values of M < n.• It should be unfeasible to determine

d, even if the values of e and n are known.The third condition would be satis-

fied only for large values of e and n.Another method, the Secure Hash

Function (developed by Ron Rivest, ‘R’ ofRSA), is based on public-key encryption.With the advent of Internet, intense re-search is going on in this field, using di-verse technologies which employ distrib-uted networking and the use of the inher-ently present noise in transmission chan-nel to encrypt data. The five steps involvedin this algorithm are detailed below:

Step 1: Append padding bits. Themessage is padded such that the lengthof the padded message is 64 bits less thanan integer multiple of 512 bits. Paddingis necessarily done even if the message isalready of desired length; for example,even a message of 448 (512-64) bits ismade to 960 (512x2-64) bits by padding512 bits to it. Thus, the number of pad-ding bits lies between 1 and 512. The pad-ding consists of a single -1- bit followedby the necessary number of -0- bits.

Step 2: Append length. A 64-bit rep-resentation of the length in bits of theoriginal message (before padding) is ap-pended to the result of Step 1. The out-come is a message which is an integermultiple of 512 bits in length. The mes-sage is represented in blocks of 512 bitsY0,Y1,Y2,...,YL-1,... So, the total length ofthe expanded message is L x 512.

Step 3: Initialise MD buffer. A 128-bit buffer is used to hold intermediate andfinal results of the hash function. Thebuffer can be represented as four 32-bitregisters (A, B, C, and D). These regis-ters are initialised to the following hexa-decimal values:A = 01234567B = 89ABCDEFC = FEDCBA98D = 76543210

Step 4: Process message in 512-bitblocks. The heart of the algorithm is themodule that consists of four rounds of pro-cessing. These rounds may have a simi-lar structure, but each may use a differ-ent primitive logical function, like AND,OR, etc.

Step 5: Output. After all L 512-bitblocks have been processed, the output

Fig. 3: Example of RSA algorithm

Page 43: Kumpulan skematik elektronika 4

ELECTRONICS FOR YOU ❚ MAY 2000

S O F T W A R E S E C T I O N

78

case ‘B’ : strcpy (code, “-...”) ; break;case ‘C’ : strcpy (code, “-.-.”) ; break;case ‘D’ : strcpy (code, “-..”) ; break;case ‘E’ : strcpy (code, “.”) ; break;case ‘F’ : strcpy (code, “ ..-.”) ; break;case ‘G’ : strcpy(code,“—.”) ; break;case ‘H’ : strcpy(code,“....”) ; break;case ‘I’ : strcpy(code,“..”) ; break;case ‘J’ : strcpy(code,“.—”) ; break;case ‘K’ : strcpy(code,“-.-”) ; break;case ‘L’ : strcpy(code,“.-..”) ; break;case ‘M’ : strcpy(code,“—”) ; break;case ‘N’ : strcpy(code,“-.”) ; break;case ‘O’ : strcpy(code,“—”) ; break;case ‘P’ : strcpy(code,“.—.”) ; break;case ‘Q’ : strcpy(code,“—.-”) ; break;case ‘R’ : strcpy(code,“.-.”) ; break;case ‘S’ : strcpy(code,“...”) ; break;case ‘T’ : strcpy(code,“-”) ; break;case ‘U’ : strcpy(code,“..-”) ; break;case ‘V’ : strcpy(code,“...-”) ; break;case ‘W’ : strcpy(code,“.—”) ; break;case ‘X’ : strcpy(code,“-..-”) ; break;case ‘Y’ : strcpy(code,“-.—”) ; break;case ‘Z’ : strcpy(code,“—..”) ; break;case ‘1’ : strcpy(code,“.——”) ; break;case ‘2’ : strcpy(code,“..—”) ; break;case ‘3’ : strcpy(code,“...—”) ; break;case ‘4’ : strcpy(code,“....-”) ; break;case ‘5’ : strcpy(code,“.....”) ; break;case ‘6’ : strcpy(code,“-....”) ; break;case ‘7’ : strcpy(code,“—...”) ; break;case ‘8’ : strcpy(code,“—..”) ; break;case ‘9’ : strcpy (code,“——.”) ; break;case ‘0’ : strcpy(code,“——”) ; break;case ‘-’ : strcpy(code,“-....-”) ; break;case ‘?’ : strcpy(code,“..—..”) ; break;case ‘(‘ : strcpy(code,“-.—.”) ; break;case ‘)’ : strcpy(code,“-.—.-”) ; break;case ‘.’ : strcpy(code,“.-.-.-”) ; break;case ‘=’ : strcpy(code,“-...-”) ; break;case ‘/’ : strcpy(code,“-..-.”) ; break;case ‘+’ : strcpy(code,“.-.-.”) ; break;case ‘:’ : strcpy(code,“—...”) ; break;case ‘,’ : strcpy(code,“—..—”) ; break;default: cout<<endl<<“MSG-Switch::Invalid

character \”;cout<<in<<“\”<<endl; break;}int len=strlen(code) ;for (int i=0; i<len; i++){ sound (FREQ) ;if(code [i]==‘.’) delay(DOT) ;elseif(code[i]==‘-’) delay(3*DOT) ;nosound() ; delay (DOT) ;}delay (3*DOT) ;}int mnu_one(){int ch;clrscr() ;gotoxy(30,7) ; cout<<“MORSE CODE TUTOR”;gotoxy(30,8) ;cout<<“~~~~~~~~~~~~~~~~” ;gotoxy(33,9) ; cout<<“l. CHARACTER MODE”;gotoxy(33,10) ; cout<<“2. LINE MODE” ;gotoxy(33,11) ; cout<<“3. FILE MODE” ;gotoxy(33,12) ; cout<<“4. SETTINGS” ;gotoxy(33,13) ; cout<<“5. EXIT” ;gotoxy(30,15) ; cout<<“Enter your choice : ” ;gotoxy(25,19) ; cout<<“A Freeware From VU3PRX” ;gotoxy(50,15) ; cin>>ch ; return ch ;}void mode_line(){int flag=1; char line[80] ;clrscr() ; cout<<“LINE MODE”<<endl ;cout<<“Type ‘*’ to END sending”<<endl ;while(flag){gets(line) ;int len=strlen(line) ;for (int i=0; i<len; i++){in=line[i] ;if(in==‘ ’) { delay (6*DOT) ; continue ;}else if(in==‘*’) { flag=0; break;}

Program Listing in C++

Morse tutor is a program writtenin C++. It can be used for learn-ing or sending Morse code.

Morse code uses long (dash) and short(dot) sounds to communicate. The dot isthe basic unit and the dash is equal tothe length of three dots.

Morse code was developed by SamualMorse in 1897. Due to advantages likeoverriding noise, static and simple trans-mitter, and low power requirements, it isstill used for communication.

The program provides character mode,line mode, and file mode of operations. In

#include<iostream.h>#include<conio.h>#include<dos.h>#include<stdio.h>#include<string.h>#include<stdlib.h>#include<ctype.h>void morse() ;int mnu_one();void mode_line() ;void mode_file() ;void mode_sett() ;void mode_char() ;char in ;int FREQ=700; // default tone 700 Hzint DOT=50; // default speed 12 wpmvoid main(){int choice ;while (1){choice=mnu_one() ;if (choice==1) mode_char() ;else if( choice==2 ) mode_line () ;else if(choice==3) mode_file () ;else if(choice==4) mode_sett () ;else if(choice==5) break ;}clrscr() ;cout<<endl<<“Thank you for using” ;highvideo() ; cprintf(“MORSE TUTOR”) ;normvideo() ;cout<<endl<<“ 73 & Good Bye...” ;cout<<endl<<“de” ;cout<<endl<<“\t\tYUJIN BOBY, Radio VU3PRX” ;cout<<endl<<“\t\tKoilparambil, Arthinkal” ;cout<<endl<<“\t\tKerala, PIN - 688 530” ;cout<<endl<<endl ;}void morse (){char code [8] ;switch (toupper(in)){case ‘A’ : strcpy (code, “.-”) ; break;

from the Lth stage is the 128-bit messagedigest.

Starting from the simple bit-replace-ment technique to computer-based codelanguage systems, the science of cryptog-

raphy has indeed come a long way. TheIndian system of ‘Trinetra’ can evendigitise and encode the voice of a sender.Cryptographers have come up with vari-ous schemes considered to be virtually un-

breakable, only to find out later that theywere not so. And thus, public-key encryp-tion remains the standard for secure en-cryption till date.

YUJIN BOBY

MORSE TUTORcharacter mode, separate characters canbe practiced. In file mode, storedmessages can be sent. This mode alsohas provision for creating a new messagefile. The speed can be set between 5 WPM(words per minute) and 20 WPM, andthe tone can be varied betwen 100 Hzand 4,000 Hz using the program. Thedefault speed is 12 WPM and the tone is700 Hz.

Page 44: Kumpulan skematik elektronika 4

ELECTRONICS FOR YOU ❚ MAY 2000

S O F T W A R E S E C T I O N

79

void mode_sett() ;void mode_sett(){int cho ;clrscr() ;cout<<“l. CHANGE FREQUENCY”<<endl ;cout<<“2. CHANGE SPEED”<<endl ;cout<<endl<<“Enter your choice : ” ;cin>>cho ;if(cho==1){cout<<endl<<“Current Frequency of tone is” <<FREQ<<“Hz”<<endl ;cout<<“The valid frequency range is from 100 Hz to 4000 Hz” ;cout<<endl<<endl<<“Enter the new frequency : ” ;int tmp ;cin>>tmp ;cout<<endl<<endl;if ( (tmp>99) && (tmp<4001) ){FREQ=tmp ;cout<<“Now the Frequency is changed to” <<FREQ<<“Hz”<<endl;}else cout<<“Error : Invalid frequency range” ;getch() ;}if(cho==2){int speed ;speed=36000/(DOT*60) ;

cout<<“\nCurrent speed is ”<<speed<<“ Words/Minute”<<endl ;cout<<“The valid Speed is from 5 WPM to 20 WPM ”<<endl ;cout<<“\n\nEnter new speed : ” ;cin>>speed ;if((speed>4) && (speed<21)){DOT=36000/ (speed*60) ;cout<<“\n\nNow the speed is ”<<speed<< “Words Per Minute” ;}else cout<<“\n\nError : Speed “<<speed<< “WPM not allowed\n” ;getch() ;}}void mode_char(){clrscr() ;cout<<“CHARACTER MODE”<<endl ;cout<<“Type ‘*’ to END sending”<<endl ;while (1){in=getche() ;if(in==‘ ’) { delay (6*DOT) ; continue;}else if(in==‘*’) break ;morse () ;}}

morse() ;}}}void mode_file(){FILE *fp ; char fname[10] ;clrscr() ;cout<<“Enter file name : ”; cin>> fname;if ((fp=fopen(fname,“r”)) !=NULL){while((in=getc(fp)) !=EOF){if (in==’ ‘){delay(6*DOT); continue;}morse() ;}}else{char ans ;cout<<endl<<“File not found, Create New (Y/N) ? ” ;cin>>ans ;if((ans==‘y’) || (ans==’Y’))if((fp=fopen(fname,“w”)) !=NULL)while((ans=getchar() ) !=‘\n’)putc(ans, fp) ;}fclose(fp) ;}

Connect-four is a very simple andpopular game. Here is the com-puter version of this game. The

game is quite easy and self-explanatory.Online help is provided to avoid any con-fusion during the game.

This game is executable only inQBASIC and it runs only on a systemwith VGA monitor or a higher system. A486 or higher system is recommended, asthe game will run very slow on a lowersystem.

In this game, two different colours are

CONNECT-FOUR GAMEprovided for two players. This game isalmost like tick-tack-toe. You have to just

place four pieces of your colour adjacentto each other, as you place in tick-tack-toe. In tick-tack-toe, you can put your pieceanywhere. But in connect-four, a piece willbe placed at the lowest empty block.

The player who places four pieces ofhis colour in a row, column, or diagonallywill win. The software will automaticallydetect the winner. All the runtime keysare specified in the online help. Save thisfile as CONNECT4.BAS. If you want torun this game directly from DOS-prompt,make a file CONNECT4.BAT in your di-rectory as follows:@ECHO OFFCLSQBASIC/RUN CONNECT4.BASCLS

DHAVAL Y. TRIVEDI

Program Listing in QBASICCLEAR , , 8096: CLS : SCREEN 1210 CLS : SCREEN 12: DIM cur(11): PSET (2, 0): DRAW “g2 e2 f2 h2 d8”: DEF SEG = 0: POKE 1047, &H0: DEF SEGGET (0, 0)-(4, 8), cur: CLS : PAINT (1, 1), 7LINE (0, 345)-(640, 345), 15: LINE (560, 0)-(560, 345), 15LINE (572, 80)-(627, 105), 7, BF: LINE (572, 80)-(627, 105), 5, BF: GOSUB grid:LINE (560, 175)-(639, 175), 15: LINE (0, 0)-(639, 479), 15, BX = 30: y = 330: r1 = 325: r2 = 325: r3 = 325: r4 = 325: r5 = 325: r6 = 325: r7 = 325: r8 = 325: r9 = 325: r10 = 325: turn = 6: gr = 7: PUT (X, y), curLOCATE 2, 72: PRINT “PLAYER 1”: LOCATE 13, 72: PRINT “PLAYER

2”: GOSUB hlpPLAY “L20”: PLAY “O 3CDEFG”90 K$ = INKEY$KEY 17, CHR$(0) + CHR$(16): ON KEY(17) GOSUB ex: KEY(17) ON: KEY18, CHR$(0) + CHR$(34): ON KEY(18) GOSUB grid: KEY(18) ONKEY 15, CHR$(0) + CHR$(42): ON KEY(15) GOSUB p1: KEY(15) ON:KEY 16, CHR$(0) + CHR$(49): ON KEY(16) GOSUB restart: KEY(16) ONIF LEN(K$) < 2 THEN 90K = ASC(RIGHT$(K$, 1))IF K = 75 THEN x1 = -55: y1 = 330: GOTO 170IF K = 77 THEN x1 = 55: y1 = 330: GOTO 170GOTO 90

Page 45: Kumpulan skematik elektronika 4

ELECTRONICS FOR YOU ❚ MAY 2000

S O F T W A R E S E C T I O N

80

170 PUT (X, y), cur: X = X + x1: y = y1IF X < 30 THEN X = 525 ELSE IF X > 525 THEN X = 30SOUND 190, .5: PUT (X, y), curGOTO 90p1:turn = turn - 1IF X = 30 THEN r1 = r1 - 25: SOUND 990, .5: IF r1 < 25 THEN turn = 6: BEEP: GOSUB play2t: GOTO 90 ELSE LINE (X - 24, r1 + 24)-(X + 29, r1 + 1), turn, BFIF X = 85 THEN r2 = r2 - 25: SOUND 990, .5: IF r2 < 25 THEN turn = 6: BEEP: GOSUB play2t: GOTO 90 ELSE LINE (X - 24, r2 + 24)-(X + 29, r2 + 1), turn, BFIF X = 140 THEN r3 = r3 - 25: SOUND 990, .5: IF r3 < 25 THEN turn = 6: BEEP: GOSUB play2t: GOTO 90 ELSE LINE (X - 24, r3 + 24)-(X + 29, r3 + 1), turn, BFIF X = 195 THEN r4 = r4 - 25: SOUND 990, .5: IF r4 < 25 THEN turn = 6: BEEP: GOSUB play2t: GOTO 90 ELSE LINE (X - 24, r4 + 24)-(X + 29, r4 + 1), turn, BFIF X = 250 THEN r5 = r5 - 25: SOUND 990, .5: IF r5 < 25 THEN turn = 6: BEEP: GOSUB play2t: GOTO 90 ELSE LINE (X - 24, r5 + 24)-(X + 29, r5 + 1), turn, BFIF X = 305 THEN r6 = r6 - 25: SOUND 990, .5: IF r6 < 25 THEN turn = 6: BEEP: GOSUB play2t: GOTO 90 ELSE LINE (X - 24, r6 + 24)-(X + 29, r6 + 1), turn, BFIF X = 360 THEN r7 = r7 - 25: SOUND 990, .5: IF r7 < 25 THEN turn = 6: BEEP: GOSUB play2t: GOTO 90 ELSE LINE (X - 24, r7 + 24)-(X + 29, r7 + 1), turn, BFIF X = 415 THEN r8 = r8 - 25: SOUND 990, .5: IF r8 < 25 THEN turn = 6: BEEP: GOSUB play2t: GOTO 90 ELSE LINE (X - 24, r8 + 24)-(X + 29, r8 + 1), turn, BFIF X = 470 THEN r9 = r9 - 25: SOUND 990, .5: IF r9 < 25 THEN turn = 6: BEEP: GOSUB play2t: GOTO 90 ELSE LINE (X - 24, r9 + 24)-(X + 29, r9 + 1), turn, BFIF X = 525 THEN r10 = r10 - 25: SOUND 990, .5: IF r10 < 25 THEN turn = 6: BEEP: GOSUB play2t: GOTO 90 ELSE LINE (X - 24, r10 + 24)-(X + 29, r10 + 1), turn, BFGOSUB checkGOSUB play1t320 K$ = INKEY$ON KEY(17) GOSUB ex: ON KEY(18) GOSUB gridKEY 15, CHR$(0) + CHR$(54): ON KEY(15) GOSUB p2: KEY(15) ON: ON KEY(16) GOSUB restart: KEY(16) ONIF LEN(K$) < 2 THEN 320K = ASC(RIGHT$(K$, 1))IF K = 75 THEN x1 = -55: y1 = 330: GOTO 400IF K = 77 THEN x1 = 55: y1 = 330: GOTO 400GOTO 320400 PUT (X, y), cur: X = X + x1: y = y1IF X < 30 THEN X = 525 ELSE IF X > 525 THEN X = 30SOUND 190, .5: PUT (X, y), curGOTO 320p2:turn = turn + 1IF X = 30 THEN r1 = r1 - 25: SOUND 990, .5: IF r1 < 25 THEN turn = 5: BEEP: GOSUB play1t: GOTO 320 ELSE LINE (X - 24, r1 + 24)-(X + 29, r1 + 1), turn, BFIF X = 85 THEN r2 = r2 - 25: SOUND 990, .5: IF r2 < 25 THEN turn = 5: BEEP: GOSUB play1t: GOTO 320 ELSE LINE (X - 24, r2 + 24)-(X + 29, r2 + 1), turn, BFIF X = 140 THEN r3 = r3 - 25: SOUND 990, .5: IF r3 < 25 THEN turn = 5: BEEP: GOSUB play1t: GOTO 320 ELSE LINE (X - 24, r3 + 24)-(X + 29, r3 + 1), turn, BFIF X = 195 THEN r4 = r4 - 25: SOUND 990, .5: IF r4 < 25 THEN turn = 5: BEEP: GOSUB play1t: GOTO 320 ELSE LINE (X - 24, r4 + 24)-(X + 29, r4 + 1), turn, BFIF X = 250 THEN r5 = r5 - 25: SOUND 990, .5: IF r5 < 25 THEN turn = 5: BEEP: GOSUB play1t: GOTO 320 ELSE LINE (X - 24, r5 + 24)-(X + 29, r5 + 1), turn, BFIF X = 305 THEN r6 = r6 - 25: SOUND 990, .5: IF r6 < 25 THEN turn = 5: BEEP: GOSUB play1t: GOTO 320 ELSE LINE (X - 24, r6 + 24)-(X + 29, r6 + 1), turn, BFIF X = 360 THEN r7 = r7 - 25: SOUND 990, .5: IF r7 < 25 THEN turn = 5: BEEP: GOSUB play1t: GOTO 320 ELSE LINE (X - 24, r7 + 24)-(X + 29, r7 + 1), turn, BFIF X = 415 THEN r8 = r8 - 25: SOUND 990, .5: IF r8 < 25 THEN turn = 5: BEEP: GOSUB play1t: GOTO 320 ELSE LINE (X - 24, r8 + 24)-(X + 29, r8 + 1), turn, BF

IF X = 470 THEN r9 = r9 - 25: SOUND 990, .5: IF r9 < 25 THEN turn = 5: BEEP: GOSUB play1t: GOTO 320 ELSE LINE (X - 24, r9 + 24)-(X + 29, r9 + 1), turn, BFIF X = 525 THEN r10 = r10 - 25: SOUND 990, .5: IF r10 < 25 THEN turn = 5: BEEP: GOSUB play1t: GOTO 320 ELSE LINE (X - 24, r10 + 24)-(X + 29, r10 + 1), turn, BFGOSUB checkGOSUB play2tturn = 6GOTO 90ENDrestart:GOTO 10check:FOR U = 35 TO 325 STEP 25FOR D = 30 TO 525 STEP 55IF POINT(D, U) = turn AND POINT(D + 55, U) = turn AND POINT(D + 110, U) = turn AND POINT(D + 165, U) = turn THEN GOSUB winIF POINT(D, U) = turn AND POINT(D, U + 25) = turn AND POINT(D, U + 50) = turn AND POINT(D, U + 75) = turn THEN GOSUB winIF POINT(D, U) = turn AND POINT(D + 55, U + 25) = turn AND POINT(D + 110, U + 50) = turn AND POINT(D + 165, U + 75) = turn THEN GOSUB winIF POINT(D, U) = turn AND POINT(D + 55, U - 25) = turn AND POINT(D + 110, U - 50) = turn AND POINT(D + 165, U - 75) = turn THEN GOSUB winNEXTNEXTRETURNwin:PLAY “L20”: PLAY “O 3GFEDCP8CDEFGP8GFEDCP8CDEFG”: PLAY “L30”CLS : SCREEN 12: PAINT (1, 1), 7: KEY OFF: FOR I = 1 TO 520 STEP 7: LINE (1, 1)-(I, 479), 5: LINE (640, 1)-(640 - I, 1), 5: LINE (1, 479)-(I, 1), 5: LINE (640, 479)-(640 - I, 1), 5: LOCATE 15, 36: COLOR 7: PRINT “PLAYER “; turn - 4: LOCATE 17, 39: PRINT “WINS”: NEXTSLEEP 1GOTO 10play1t:LINE (572, 80)-(627, 105), 7, BF: LINE (572, 250)-(627, 275), 6, BFRETURNplay2t:LINE (572, 250)-(627, 275), 7, BF: LINE (572, 80)-(627, 105), 5, BFRETURNex:CLS : SCREEN 0LOCATE 11, 35: COLOR 30: PRINT “CONNECT FOUR”LOCATE 12, 29: COLOR 7: PRINT “BY:- DHAVAL.Y.TRIVEDI,”LOCATE 13, 30: PRINT “KANCHAN JUNGHA APPT, 101,”LOCATE 14, 26: PRINT “ROYAL PARK-6, UNI.ROAD, RAJKOT-5.”PLAY “L20”: PLAY “O 3GFEDC”SYSTEMgrid:IF gr = 7 THEN gr = 1 ELSE IF gr = 1 THEN gr = 7LINE (5, 325)-(555, 300), gr, B: LINE (5, 300)-(555, 275), gr, B: LINE (5, 275)-(555, 250), gr, BLINE (5, 250)-(555, 225), gr, B: LINE (5, 225)-(555, 200), gr, B: LINE (5, 200)-(555, 175), gr, BLINE (5, 175)-(555, 150), gr, B: LINE (5, 150)-(555, 125), gr, B: LINE (5, 125)-(555, 100), gr, BLINE (5, 100)-(555, 75), gr, B: LINE (5, 75)-(555, 50), gr, B: LINE (5, 50)-(555, 25), gr, BLINE (5, 325)-(60, 25), gr, B: LINE (60, 325)-(115, 25), gr, B: LINE (115, 325)-(170, 25), gr, BLINE (170, 325)-(225, 25), gr, B: LINE (225, 325)-(280, 25), gr, B: LINE (280, 325)-(335, 25), gr, BLINE (335, 325)-(390, 25), gr, B: LINE (390, 325)-(445, 25), gr, B: LINE (445, 325)-(500, 25), gr, BLINE (500, 325)-(555, 25), gr, BRETURNhlp:LOCATE 28, 2: COLOR 15: PRINT “<LEFT SHIFT>=PLAYER 1 <RIGHT SHIFT>=PLAYER 2 <G>=GRID ON/OFF <N>=NEW <Q>=QUIT”RETURN

Page 46: Kumpulan skematik elektronika 4

CIRCUITIDEAS

E L E C T R O N I C S F O R Y O U • A P R I L 2 0 0 5 • 6 7W W W . E F Y M A G . C O M

CMYK

SANI THEO

Hide this solar-powered circuitsuitably and see the reactionof your friends to the chirpy

sound produced by it every few min-utes. In all probability, it will coaxthem to find out where the sound iscoming from.

The circuit runs off a miniature so-lar power panel, which can be takenout from an old calculator such as Citi-zen CT-500. A panel giving 1.5V to

D. SOMNATH

SOLAR BUG

2.5V is required. Note that the circuitcan work properly from a panel as

small as 3 cm2.If a digital voltmeter is connected

across capacitor C2, a slow build-upof voltage can be observed when thepanel is exposed to light. TransistorsT1 and T2 form a relaxation oscillator.When C1 charges to 0.6V, transistorT1 conducts and the charge built upin C2 is discharged through thepiezobuzzer to produce a short beep.

While testing the circuit, the valueof resistor R1 can be reduced to, say, 1kilo-ohm. Use a good-quality buzzerto ensure that the sound produced isloud enough.

Page 47: Kumpulan skematik elektronika 4

CIRCUIT

IDEAS

9 8 • A P R I L 2 0 0 6 • E L E C T R O N I C S F O R Y O U W W W . E F Y M A G . C O M

CMYK

The world cannot continue to relyfor long on fossil fuels for itsenergy requirements. Fossil fuel

reserves are limited. In addition, whenburnt, these add to global warming,air pollution and acid rain.

So solar photovoltaic systems areideal for providing independent elec-trical power and lighting in isolatedrural areas that are far away from the

power grid. These systems are non-polluting, don’t deplete the natural re-sources and are cheap in the long run.The aim of this circuit is to demon-strate how we can utilise solar light toelectrify the remote areas, i.e., how wecan store the solar energy and then useit for small-scale lighting applications.

Solar cells generate direct current,so make sure that DPDT switch S1 istowards the solar panel side. The DCvoltage from the solar panel is used tocharge the battery and control the re-lay.

Capacitor C1 connected in parallelwith a 12V relay coil remains chargedin daytime until the relay is activated.Capacitor C1 is used to increase theresponse time of the relay, so switch-

� ASHISH AHUJA

SOLAR LIGHTING SYSTEM S.C. DWIVED

I

ing occurs moments after the voltageacross it falls below 12V. Capacitor C1also filters the rectified output if thebattery is charged through AC power.The higher the value of the capacitor,the more the delay in switching. Theswitching time is to be properly ad-justed because the charging wouldpractically stop in the early eveningwhile we want the light to be ‘on’ dur-ing late evening.

During daytime, relay RL1

energises, provided DPDT switch S1is towards the solar panel side. Due toenergisation of relay RL1, the positiveterminal of the battery is connected tothe output of regulator IC 7808 (a 3-terminal, 1A, 8V regulator) via diodeD1 and normally-open (N/O) contactsof relay RL1. Here we have used a 6V,4.5Ah maintenance-free, lead-acid re-chargeable battery. It requires a con-stant voltage of approx. 7.3 volts forits proper charging.

Even though the output of the so-lar panel keeps varying with the lightintensity, IC 7808 (IC1) is used to givea constant output of 8V. Diode D1causes a drop of 0.7V, so we getapprox. 7.3V to charge the battery.LED1 indicates that the circuit is work-

ing and the battery is in the chargingmode.

At night, there will be no genera-tion of electricity. The relay will notenergise and charging will not takeplace. The solar energy stored in thebattery can then be used to light upthe lamp. A 3W lamp glows continu-ously for around 6 hours if the batteryis fully charged. Instead of a 3W lamp,you can also use a parallel array ofserially connected white LEDs and lim-

iting resistors to provide sufficientlight for even longer duration.

In case the battery is connected inreverse polarity while charging, IC7808 will get damaged. The circuit in-dicates this damage by lighting upLED2, which is connected in reversewith resistor R2. However, the circuitprovides only the indication of reversepolarity and no measure to protect theIC. A diode can be connected in re-verse to the common terminal of theIC but this would reduce the voltageavailable to the battery for chargingby another 0.7 volt.

There is also a provision for esti-mating the approximate voltage in thebattery. This has been done by connect-ing ten 1N4007 diodes (D2 through D11)

Page 48: Kumpulan skematik elektronika 4

CIRCUIT

IDEAS

E L E C T R O N I C S F O R Y O U • A P R I L 2 0 0 6 • 9 9W W W . E F Y M A G . C O M

CMYK

in forward bias with the battery. Theoutput is taken by LED3 across diodesD2, D3, D4 and D5, which is equal to2.8V when the battery is fully charged.LED3 lights up at 2.5 volts or above.Here it glows with the voltage dropacross the four diodes, which indicatesthat the battery is charged. If the bat-

tery voltage falls due to prolonged op-eration, LED3 no longer glows as thedrop across D2, D3, D4 and D5 is notenough to light it up. This indicatesthat the battery has gone weak. Micro-switch S1 has been provided to do thistest whenever you want.

If the weather is cloudy for some

consecutive days, the battery will notcharge. So a transformer and full-waverectifier have been added to charge thebattery by using DPDT switch S1. Thisis particularly helpful in those areaswhere power supply is irregular; thebattery can be charged whenevermains power is available. �

Page 49: Kumpulan skematik elektronika 4

circuitideas

w w w . e f y m a g . c o m electronics for you • may 2008 • 71

Raj K. GoRKhali

StaiRcaSe liGht With auto SWitch-off

We are all familiar with the electrical wiring arrange-ment that connects an elec-

trical bulb with two switches: one at the bottom of a staircase and the other at the top. Wiring is done such that either of the two switches can be used to switch the bulb on or off. In such a wiring arrangement, while climbing up the staircase which is in dark, the switch located at the bottom of the staircase is used to switch on the light. After you have climbed the staircase, you use the switch located there to switch off the light.

The circuit presented here is an electronic-cum-electrical arrangement to get a similar facility as provided by the hard-wired electrical system, but you need to operate the switch only once. Whereas in the hard-wired arrangement if you forget to switch off the light once you have traversed the staircase, light would remain ‘on,’ wasting energy.

In this circuit also, we have two

micro-switches—one located at the top and the other located at the bottom of the staircase—that can be pushed and released easily during climb-up from the bottom of the staircase or climb-down from the top of the staircase. With every push and release of either of the two switches, bulb L1 lights up for a preset time period of, say, 40 seconds, which is considered adequate for climb-ing up or going down the staircase. The bulb goes off automatically after the set 40 seconds. You can change this ‘on’ time by changing the values of resis-tor R7 and/or capacitor C4 depending upon your requirement.

Switches S1 and S2 are the two micro-switches, which provide low in-puts to the respective de-bouncing cir-cuits. Each de-bouncing circuit is built around two NAND gates connected back to back. The de-bouncing circuits ensure a clean, bounce-free pulse at the output every time the micro-switch is pressed and released. The outputs from the two de-bouncing circuits are ORed using diodes D1 and D2 (1N4001). So every time you press and release either

7

of the micro-switches, you get a posi-tive-going pulse at the junction of the cathodes of diodes D1 and D2.

These pulses are used to trigger the monostable circuit built around timer IC2. On the trailing edge of the pulse, the output of the monostable goes high for a time period of 40 seconds. This drives relay-driver transistor 2N2222 (T1) wired as a switch. Relay RL1 gets energised and closes N/O contacts of the relay, wired in series with the mains and the bulb (L1). Bulb L1 switches off when the relay gets de-energised after 40-second pulse pe-riod. Free-wheeling diode D4 (1N4001) protects transistor T1 against transients during relay switch-off operation.

The circuit operates off a 9V bat-tery, which gets connected to the cir-cuit through ‘on’/‘off’ switch S3. You can also use regulated 9V power sup-ply. Assemble the circuit on a general-purpose PCB and house in a small box. Connect micro-switches S1 and S2 near top and bottom of the staircase through flexible wires and bulb in the middle of the staircase.

s.c. dwivedi

Page 50: Kumpulan skematik elektronika 4

CIRCUITIDEAS

E L E C T R O N I C S F O R Y O U • S E P T E M B E R 2 0 0 5 • 1 0 1W W W . E F Y M A G . C O M

CMYK

Fig. 1: Circuit of the stress meter

Fig. 2: Display panel

Fig. 3: Self-locking straps

D. MOHAN KUMAR

STRESS METER

T his stress monitor lets youassess your emotional pain. Ifthe stress is very high, it gives

visual indication through a light-emit-ting diode (LED) display along with a

warning beep. The gadget is smallenough to be worn around the wrist.

The gadget is based on the prin-ciple that the resistance of the skin var-ies in accordance with your emotionalstates. If the stress level is high theskin offers less resistance, and if thebody is relaxed the skin resistance ishigh. The low resistance of the skinduring high stress is due to an increasein the blood supply to the skin. Thisincreases the permeability of the skinand hence the conductivity for electriccurrent.

This property of the skin is usedhere to measure the stress level. Thetouch pads of the stress meter sensethe voltage variations across the touchpads and convey the same to the cir-

cuit. The circuit is very sensitive anddetects even a minute voltage varia-tion across the touch pads.

The circuit comprises signal ampli-fier and analogue display sections.Voltage variations from the sensingpads are amplified by transistor BC548

(T1), which is configured as a com-mon-emitter amplifier. The base of T1is connected to one of the touch padsthrough resistor R1 and to the groundrail through potmeter VR1. By vary-ing VR1, the sensitivity of T1 can beadjusted to the desired level. Diode D1maintains proper biasing of T1 and ca-pacitor C1 keeps the voltage from theemitter of T1 steady.

The amplified signal from transis-tor T1 is given to the input of ICLM3915 (IC1) through VR2. ICLM3915 is a monolithic integrated cir-cuit that senses analogue voltage lev-els at its pin 5 and displays themthrough LEDs providing a logarith-mic analogue display. It can drive upto ten LEDs one by one in the dot/

bar mode for each increment of 125mV in the input.

Here, we’ve used only five LEDsconnected at pins 14 through 18 of IC1.LED1 glows when input pin 5 of IC1receives 150 mV. LED5 glows whenthe voltage rises to 650 mV and LED5

flashes andpiezobuzzer PZ1beeps when thestress level is high.

Resistors R4and R5 and capaci-tor C2 form theflashing elements.Resistor R3 main-tains the LED cur-

rent ataround 20mA. Ca-pacitor C3should bep l a c e dclose to pin3 for properfunctioning

of the IC. Zener diode ZD1 in serieswith resistor R6 provides regulated 5Vto the circuit.

The circuit can be assembled on asmall piece of perforated board. Usetransparent 3mm LEDs and a smallpiezobuzzer for audio-visual indica-tions. Enclose the circuit in a smallplastic case with touch pads on theback side. Two self-locking straps canbe used to tie the unit around yourwrist.

After tying the unit around yourwrist (with touch pads in contact withthe skin), slowly vary VR1 until LED1glows (assuming that you are in re-laxed state). Adjust VR2 if the sensi-tivity of IC1 is very high. The gadgetis now ready for use.

SANI THEO

Page 51: Kumpulan skematik elektronika 4

ELECTRONICS PROJECTS Vol. 21 167

In this circuit, a simple calculator, inconjunction with a COB (chip-on-board) from an analogue quartz clock,

is used to make a telephone call meter.The calculator enables conversion of STD/ISD calls to local call equivalents and al-ways displays current local call-meterreading.

The circuit is simple and presents anelegant look, with feather-touch operation.It consumes very low current and is fullybattery operated. The batteries used lastmore than a year.

Another advantage of using this cir-cuit is that it is compatible with any typeof pulse rate format, i.e. pulse rate inwhole number, or whole number withdecimal part. Recently, the telephone de-partment announced changes in pulserate format, which included pulse ratein whole number plus decimal part. Insuch a case, this circuit proves veryhandy.

To convert STD/ISD calls to local calls,this circuit needs accurate 1Hz clockpulses, generated by clock COB. This COBis found inside analogue quartz wallclocks or time-piece mechanisms. Itconsists of IC, chip capacitors, and crystalthat one can retrieve from scrap quartzclock mechanisms.

Normally, the COB inside clockmechanism will be in good condition.However, before using the COB, pleasecheck its serviceability by applying1.5V DC across terminals C and D, asshown in the figure. Then check DCvoltage across terminals A and B;these terminals in a clock are connectedto a coil. If the COB is in good condition,the multimeter needle would deflectforward and backward once every sec-ond. In fact, 0.5Hz clock is available atterminals A and B, with a phasedifference of 90o. The advantage of usingthis COB is that it works on a 1.5V DCsource.

TELEPHONE CALL ME TER USING

CALCULATOR AND COB

The clock pulses available from ter-minal A and B are combined using abridge, comprising diodes D1 to D4, to

obtain 1Hz clock pulses. These clockpulses are applied to the base of transis-tor T1. The collector and emitter of tran-sistor T1 are connected across calculator’s‘=’ terminals.

The number of pulses forming anequivalent call may be determined fromthe latest telephone directory. However,the pulse rate (PR) found in the directorycannot be used directly in this circuit.For compatibility with this circuit, thepulse rate applicable for a particularplace/distance, based on time of theday/holidays, is converted to pulse rateequivalent (PRE) using the formulaPRE = 1/PR.

You may prepare a look-up table forvarious pulse rates and their equivalents(see Table). Suppose you are going tomake an STD call in pulse rate 4. Notedown from the table the pulse rate equiva-lent for pulse rate 4, which is 0.25. Pleasenote that on maturity of a call in thetelephone exchange, the exchange callmeter immediately advances to one calland it will be further incremented ac-cording to pulse rate. So one call should

always be included before counting thecalls.

For making call in pulse rate 4, slide

switch S1 to ‘off’ (pulse set position) andpress calculator buttons in the followingorder: 1, ‘+’, 0.25, ‘=’. Here, 1 is initialcount, and 0.25 is PRE. Now calculatordisplays 1.25. This call meter is now readyto count. Now make the call, and as soonas the call matures, immediately slideswitch S1 to ‘on’ (start/standby position).The COB starts generating clockpulses of 1 Hz. Transistor T1 conductsonce every second, and thus ‘=’ button incalculator is activated electronically onceevery second. The calculator display startsfrom 1.25, advancing every second asfollows:

1.25, 1.5, 1.75, 2.00, 2.25, 2.50, and so on.After finishing the call, immediately

slide switch S1 to ‘off’ position (pulse setposition) and note down the local callmeter reading from the calculator display.If decimal value is more than or equal to0.9, add another call to the whole num-ber value. If decimal value is less than0.9, neglect decimal value and note downonly whole numbers.

To store this local call meter readinginto calculator memory, press ‘M+’ but-ton. Now local call meter reading is storedin memory and is added to the previouslocal call meter reading. For continuousdisplay of current local call meter read-ing, press ‘MRC’ button and slide switchS1 to ‘on’ (start/standby position). The cur-rent local call meter reading will blink

LOOKUP TABLEPulse rate (PR) 2 2.5 3 4 6 8 12 16 24 32 36 48

Pulse rateeqlt. (PRE) 0.500 0.400 0.333 0.250 0.166 0.125 0.083 0.062 0.041 0.031 0.027 0.020

Note: Here PRE is shown up to three decimal places. In practice, one may use up to five or six decimal places.

Page 52: Kumpulan skematik elektronika 4

ELECTRONICS PROJECTS Vol. 21168

once every second.In prototype circuit, the author used

TAKSUN calculator. The display heightwas 1 cm. In this calculator, hesubstituted the two button-type batterieswith two externally connected 1.5V R6type batteries to run the calculator formore than an year.

The power ‘off’ button terminals weremade dummy by affixing cellotape on con-tacts to avoid erasing of memory, shouldsomeone accidentally press the power ‘off’button. This calculator has auto ‘off’ fa-cility. Therefore, some button needs to bepressed frequently to keep the calculator‘on’. So, in the idle condition, the ‘=’ but-

ton is activated electronically once everysecond by transistor T1, to keep the cal-culator continuously ‘on’.

Useful hints. Solder the ‘=’ buttonterminals by drilling small holes in itsvicinity on PCB pattern using thin cop-per wire and solder it neatly, such thatthe ‘=’ button could get activated elec-tronically as well as manually. Takethe copper wire through a hole to thebackside of the PCB, from where it istaken out of the calculator as terminalsG and H.

At calculator’s battery terminals, sol-der two wires to ‘+’ and ‘–’ terminals.These wires are also taken out from cal-

culator as terminals E and F. Affix COBon a general-purpose PCB and solder theremaining components neatly. For giv-ing the unit an elegant look, purchase ajewellery plastic box with flip-type cover(size 15cm x 15cm). Now fix the board,calculator, and batteries, along withholder inside the jewellery box. Thenmount the box on the wall and paste thelook-up table inside the box cover in sucha way that on opening the box, it is vis-ible on left side of the box.

Caution. The negative terminals ofbattery A and battery B are to be keptisolated from each other for proper opera-tion of this circuit.

Page 53: Kumpulan skematik elektronika 4

ELECTRONICS PROJECTS Vol. 21

This circuit enables automatic switching-on of the tape recorder when the handset is lifted. The

tape recorder gets switched off when the handset is replaced. The signals are suit-ably attenuated to a level at which they can be recorded using the 'MICIN' socket of the tape recorder.

Points X and Y in the circuit are con-nected to the telephone lines. Resistors R1 and R2 act as a voltage divider. The voltage appearing across R2 is fed to the 'MIC-IN' socket of the tape recorder. The values of R1 and R2 may be changed depending on the input impedance of the tape recorder's 'MIC-IN' terminals. Capacitor C1 is used for blocking the flow of DC.

The second part of the circuit controls relay RL1, which is used to switch on/off the tape recorder. A voltage of 48 volts appears across the telephone lines in on-hook condition. This voltage drops to about 9 volts when the handset is lifted. Diodes D1 through D4 constitute a bridge rectifier/polarity guard. This

ensures that transistor T1 gets voltage of proper polarity, irrespective of the polarity of the telephone lines.

During on-hook condition, the output from the bridge (48V DC) passes through 12V zener D5 and is applied to the base of transistor T1 via the voltage divider com-prising resistors R3 and R4. This switches on transistor T1 and its collector is pulled low. This, in turn, causes transistor T2 to cut off and relay RL1 is not energised.

When the telephone handset is lifted, the voltage across points X and Y falls below 12 volts and so zener diode D5 does not conduct. As a result, base of transis-

tor T1 is pulled to ground potential via resistor R4 and thus is cut off. Thus, base of transistor T2 gets forward biased via resistor R5, which results in the energisa-tion of relay RL1. The tape recorder is switched 'on' and recording begins.

The tape recorder should be kept loaded with a cassette and the record button of the tape recorder should re-main pressed to enable it to record the conversation as soon as the handset is lifted. Capacitor C2 ensures that the re-lay is not switched on-and-off repeatedly when a number is being dialled in pulse dialling mode.

Telephone ConversaTion reCorder

Page 54: Kumpulan skematik elektronika 4

ELECTRONICS PROJECTS Vol. 21 187

TELEPHONE LINE BASED AUDIO

MUTING AND LIGHT-ON CIRCUIT

Very often when enjoying music orwatching TV at high audio level,we may not be able to hear a

telephone ring and thus missan important incoming phonecall. To overcome thissituation, the circuitpresented here can be used.The circuit wouldautomatically light a bulb onarrival of a telephone ring andsimultaneously mute themusic system/TV audio forthe duration the telephonehandset is off-hook. Lightingof the bulb would not onlyindicate an incoming call butalso help in locating thetelephone during darkness.

On arrival of a ring, orwhen the handset is off-hook, the inbuilt transistorof IC1 (opto-coupler)conducts and capacitor C1gets charged and, in turn,transistor T1 gets forwardbiased. As a result,transistor T1 conducts,causing energisation ofrelays RL1, RL2, and RL3.Diode D1 connected in anti-parallel to inbuilt diode ofIC1, in shunt with resistor R1, providesan easy path for AC current and helpsin limiting the voltage across inbuiltdiode to a safe value during the ringing.(The RMS value of ring voltage liesbetween 70 and 90 volts RMS.) CapacitorC1 maintains necessary voltage forcontinuously forward biasing transistorT1 so that the relays arenot de-energised during the negativehalf cycles and off-period of ring signal.Once the handset is picked up, the

relays will still remain energised becauseof low-impedance DC path available(via cradle switch and handset) for

the in-built diode of IC1. After completionof call when handset is placed back onits cradle, the low-impedance paththrough handset is no more availableand thus relays RL1 through RL3 aredeactivated.

As shown in the figure, the energisedrelay RL1 contacts switch on the light,while energisation of relay RL2 causes thepath of TV speaker lead to be opened. (Fordual-speaker TV, replace relay RL2 with aDPDT relay of 6V, 200 ohm.)

The timer IC2 (555) is configured inmonostable mode and connected betweentransistor T1 and relay units provides a

holding time of around 0.5 minutes.Similarly, energisation of DPDT

relay RL3 opens the leads going tothe speakers and thus mutes both audiospeakers. Use ‘N/C’ contacts of relayRL3 in series with speakers of musicsystem and ‘N/C’ contacts of RL2 inseries with TV speaker. Use ‘N/O’ contactof relay RL1 in series with a bulb toget the visual indication of an incomingcall as well as light during off-hookperiod.

Page 55: Kumpulan skematik elektronika 4

ELECTRONICS PROJECTS Vol. 20

Acompact, inexpensive and l ow component count telecom head-set can be con-

structed using two readily available transistors and a few other electron-ic components. This circuit is very useful for hands-free operation of EPABX and pager communication. Since the circuit draws very little current, it is ideal for parallel opera-tion with electronic telephone set.

Working of the circuit is simple and straightforward. Resistor R1 and an ordinary neon glow-lamp forms a complete visual ringer cir-cuit. This simple arrangement does not require a DC blocking capacitor because, under idle conditions, the tel-ephone line voltage is insufficient to ionise the neon gas and thus the lamp does not light. Only when the ring signal is being received, it flashes at the ringing rate to indicate an incoming call.

The bridge rectifier using diodes D1 through D4 acts as a polarity guard which protects the electronic circuit from any reversal in the telephone line polarity. Zener diode D5 at the output of this bridge rectifier is used for additional circuit protection.

Section comprising transistor T1, re-sistors R2, R3 and zener diode D6 forms a constant voltage regulator that provides a low voltage output of about 5 volts. Dial tone and speech signals from ex-change are coupled to the audio ampli-fier stage built around transistor T2 and related parts, i.e. resistors R7, R6 and capacitor C5. Amplified signals from col-

lector of transistor T2 are coupled to dynamic receiver RT-200 (used as earpiece) via capacitor C7.

A condenser micro-phone, connected as shown in the circuit, is used as transmitter. Audio signals developed across the microphone are coupled to the base of transistor T1 via capacitor C3. Resistor R4 deter-mines the DC bias required for the microphone. After amplification by transistor T1, the audio signals are coupled to the telephone lines via the

diode bridge. The whole circuit can be wired on a

very small PCB and housed in a medium size headphone, as shown in the illustra-tion. For better results at low line cur-rents, value of resistor R2 may be reduced after testing.

Telecom HeadseT

Page 56: Kumpulan skematik elektronika 4

ELECTRONICS PROJECTS Vol. 21 203

TELEPHONE RINGER

USING TIMER ICs

U sing modulated rectangularwaves of different time periods,the circuit presented here pro-

duces ringing tones similar to thoseproduced by a telephone.

The circuit requires four astablemultivibrators for its working. Thereforetwo 556 ICs are used here. The IC 556

contains two timers (similar to 555 ICs)in a single package. One can also as-semble this circuit using four separate555 ICs. The first multivibrator producesa rectangular waveform with 1-second‘low’ duration and 2-second ‘high’duration. This waveform is used to con-trol the next multivibrator that produces

another rectangular waveform.A resistor R7 is used at the collector of

transistor T2 to prevent capacitor C3 fromfully discharging when transistor T2 isconducting. Preset VR1 must be set atsuch a value that two ringing tones areheard in the loudspeaker in one second.The remaining two multivibrators are used

to produce ringing tones correspond-ing to the ringing pulses producedby the preceding multivibratorstages.

When switch S1 is closed, tran-sistor T1 cuts off and thus the firstmultivibrator starts generatingpulses. If this switch is placed in thepower supply path, one has to waitfor a longer time for the ringing tostart after the switch is closed. Thecircuit used also has a provision forapplying a drive voltage to the circuitto start the ringing.

Note that the circuit is not meantfor connection to the telephone lines.Using appropriate drive circuitry atthe input (across switch S1) one canuse this circuit with intercoms, etc.Since ringing pulses are generatedwithin the circuit, only a constantvoltage is to be sent to the calledparty for ringing.

EFY Lab note. To resemble theactual telephone ringing a 400 Hztone is switched on in the followingsequence: 400ms on, 200ms off,400ms on and 2000ms off and thenrepeat.

Page 57: Kumpulan skematik elektronika 4

CIRCUIT

IDEAS

1 0 0 • O C T O B E R 2 0 0 6 • E L E C T R O N I C S F O R Y O U W W W . E F Y M A G . C O M

CMYK

Dual-tone multiple-frequency(DTMF) receiver IC is com-monly used in telephone

equipment. One common DTMFreceiver is Holtek HT9170 used inelectronic communication circuits. TheHoltek HT9170 series comprises DTMFreceivers integrated with digital de-coder and bandsplit filter functions.All HT9170 series ICs use digitalcounting techniques to detect and de-code all the 16 DTMF tone pairs into a4-bit code output.

This telephone-operated calling cir-cuit is very helpful for doctors in call-ing the patients, in banks and in vari-ous other situations where personshave to be called or signalled. Whenyou need to call a person amongstmany standing outside your cabin, justlift the telephone handset off the cradleand press the respective number. Thenumber of the person called will bedisplayed and a bell will sound to in-form the person that it is his turn.

The circuit can also be used in quizcontests and by visually- or hearing-impaired people. It can be used to calla maximum of nine different persons.

The circuit is built around DTMFreceiver IC HT9170, BCD-to-7-segmentdecoder/driver 7447, quad 2-input ORgate and common-anode display.Simple melody generator IC UM66 isused to produce melody sound in theloudspeaker through Darlington-pairtransistors (T1 and T2).

The tone pair DTMF generated bypressing the telephone key is con-verted into binary values internally inthe IC. The binary values are indicatedby the glowing of LEDs at the outputof IC1.

The output of IC1 is connected to:1. LEDs connected via resistors R15

through R18 at pins 11 through 14, re-spectively. LED1 indicates the LSB andLED4 indicates the MSB.

2. BCD-to-7-segment decoder/driver 7447, whose outputs are con-nected to the common-anode displayfor displaying the pressed number on

the telephone connected in parallel tothe circuit.

3. Gates N1 and N2 to activate thecall bell.

Here is how the circuit works: Con-nect the telephone and the circuit inparallel to the telephone line. Connect6V to the circuit. When you pressswitch S1, DIS1 shows ‘0.’ Lift thehandset off the cradle and dial a num-ber, say, ‘1.’ The output of IC1 becomesA3A2A1A0 = 0001. LED1 glows, thedisplay shows ‘1’ and the call bellsounds.

To stop the call bell, put the re-ceiver on the cradle and press switchS1 momentarily. Now DIS1 shows ‘0’and LED1 stops glowing.

For calling other numbers, followthe same procedure: Lift the handsetoff the cradle and press the desirednumber (0 through 9). The respectiveLED will glow, the number will be dis-played on DIS1 and the call bell willsound. Now put the handset on thecradle and press S1 momentarily tostop the call bell. �

� YOGESH KATARIA (VU3PYF)

TELEPHONE-OPERATEDCALLING SYSTEM

S.C. DWIVE

DI

Page 58: Kumpulan skematik elektronika 4

ELECTRONICS PROJECTS Vol. 20

Tiny Dew SenSorDew (condensed moisture) ad-

versely affects the normal per- formance of sensitive electronic

devices. A low-cost circuit described here can be used to switch off any gadget automatically in case of excessive humidity.

At the heart of the circuit is an inexpensive (resistor type) dew sensor element. Although dew sensor elements are widely used in video cassette players and recorders, these may not be easily available in local market. However, the

same can be procured from authorised service centres of reputed companies. The author used the dew sensor for FUNAI VCP model No. V.I.P. 3000A (Part No: 6808-08-04, reference no. 336) in his pro-totype. In practice, it is observed that all dew sensors available for video application possess the same electrical characteristics irrespective of their physical shape/size, and hence are interchangeable and can be used in this project.

The circuit is basically a switching type circuit made with the help of a

popular dual op-amp IC LM358N which is configured here as a comparator. (Note that only one half of the IC is used here.) Under normal conditions, resistance of the dew sensor is low (1 kilo-ohm or so) and thus the voltage at its non-inverting terminal (pin 3) is low compared to that at its inverting input (pin 2) terminal. The corresponding output of the comparator (at pin 1) is accordingly low and thus noth-ing happens in the circuit.

When humidity exceeds 80 per cent, the sensor resistance increases rapidly. As a result, the non-inverting pin becomes more positive than the inverting pin. This pushes up the output of IC1 to a high level. As a consequence, the LED inside the opto-coupler is energised. At the same time LED1 provides a visual indication. The opto-coupler can be suitably inter-faced to any electronic device for switching purpose.

Circuit comprising diode D1, resistors R8 and R6 and capacitor C1 forms a low-voltage, low-current power supply unit. This simple arrangement obviates the requirement for a bulky and expensive step-down transformer.

Page 59: Kumpulan skematik elektronika 4

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

ELECTRONICS FOR YOUDECEMBER 2003

Pin Assignments of IC TT6061A

Pin No. Pin name Function description

1 CK System clock input2 FI 50Hz line frequency3 VDD Power input pin for VDD

4 TI Touch input5 CI Sensor control input6 NC Not connected7 VSS Power input pin for VSS

8 AT Angle-trigger output

TOUCH DIMMER S.C. DWIVEDI

K. KRISHNA MURTY

By simply touching this touch dim-mer you can increase the light in-tensity of incandescent lamps in

three steps. The touch dimmer is builtaround 8-pin CMOS IC TT8486A/TT6061Aspecifically manufactured for touch dim-

mer applications.Initially, when mains switch is ‘on,’

the bulb is ‘off’. Now, if you touch thetouch plate, the bulb glows dimly. On

second touch, the bulb gives medium light.At the third touch, the bulb is drivenfully. Another touch puts off the light.

Since the IC is highly sensitive, use along wire to connect the IC to the touchsensor. The circuit uses minimum exter-nal components. For touch plate, you canuse a simple copper plate of 1cm×1cm or

even the end of the lead wire. Touch plateis coupled to the touch detector through820pF, 2kV capacitors C1, C2, and C3 con-nected in series. Internally IC TT6061A’s

touch signal is connected to the counter/decoder via a resistor and clock input CKis connected to the counter/decoder via afrequency generator.

Line frequency signal is taken throughR4 at pin 2 of IC TT6061A. At zero cross-ing, the triac (BT136) triggers to drive a200W bulb.

The 6.8V power supply is taken di-rectly from mains through resistors R1 andR3, diode D3, capacitor C4, and zenerdiode and fed to power-input pin 3 of theIC. Capacitors C1, C2, and C3 connectedbetween touch input pin 4 and touch plate

remove the shock potential from the touchplate, so do not replace these capacitorswith a single capacitor or with a capacitorof a lower voltage rating. Mains potentialexists in the circuit. Needless to say, it isdangerous to touch the circuit when mainsis ‘on.’

Note. The IC had been procured bythe author from SM Semiconductors,Santacruz (W), Mumbai.

Page 60: Kumpulan skematik elektronika 4

ELECTRONICS PROJECTS Vol. 19 185

TOUCH-SENSITIVE MUSICAL BELL WITH TIMER

This circuit is built around CMOS IC CD4011 and pop-

ular melody generator IC UM66. When touch plates are bridged by hand for a moment. the circuit starts to generate music. After a few sec-onds the music automati-cally stops.

Maximum supply voltage for this circuit is +5 volts. The IC UM66 can not operate beyond 3.3V voltage. IC 7805 regulator based power supply can be used to power this circuit.

Time delay can be changed by chang-

ing values of capacitor C1 and resistor R2. Three silicon diodes connected in series between pin 2 of UM66 IC and positive

5-volt rail keep voltage applied to pin2 of UM66 below 3.2 volts because of the drop of approximately 1.8 volts across them.

Page 61: Kumpulan skematik elektronika 4

CIRCUIT

IDEAS

8 8 • D E C E M B E R 2 0 0 6 • E L E C T R O N I C S F O R Y O U W W W . E F Y M A G . C O M

W e the humans can hearsound of up to 20kHz fre-quency only. This proxim-

ity detector works at a frequency of 40kHz. It uses two specially made ultra-sonic transducers: One transduceremits 40kHz sound, while the otherreceives 40kHz sound and converts itinto electrical variation of the same fre-quency.

Fig. 1 shows the block diagram ofthe ultrasonic proximity detector andFig. 2 shows its circuit. Mount thetransducers (transmitter as well as re-ceiver) about 5 cm apart on a piece of

ing CMOS decade counter IC4017 (IC1)is used at the output of the amplifier.IC1 divides the input frequency by ’10,’so the 40kHz signal becomes 4 kHz,which is within the audible range. The4kHz signals are fed to op-amp IC 741(IC2), which is wired as an earphoneamplifier.

This circuit can be used as an elec-tronic guard for the blind. Keep it(along with 9V battery) in their pocketwith earphone plugged to their ear.The transducer modules should be di-rected to-wards thew a l k i n gpath. Ifany objectcomes upin front orn e a r b y ,they will

� PRADEEP G.

ULTRASONIC PROXIMITY DETECTOR

S.C. DWIVE

DI

Fig. 1: Block diagram of ultrasonic proximity detector

Fig. 2: Circuit of ultrasonic proximity detector

Fig. 3: Transducers mountedon the PCB

general-purpose PCB as shown inFig. 3 and connect to identical points(‘a’ through ‘d’) of the detector circuit(Fig. 2) via external wires.

The 40kHz oscillator is builtaround transistors T1 and T2. If thereis a solid object in front of the ultra-sonic transmitter module (TX1), somesignals will be reflected back andsensed by the receiver transducer(RX1). The 40kHz ultrasonic signals areconverted into 40kHz electric signalsby the receiver and then amplified bytransistors T3 and T4.

The amplified signals are still inthe inaudible range, i.e., these can’t beheard. So a frequency-divider stage us-

Page 62: Kumpulan skematik elektronika 4

CIRCUIT

IDEAS

E L E C T R O N I C S F O R Y O U • D E C E M B E R 2 0 0 6 • 8 9W W W . E F Y M A G . C O M

hear 4kHz sound through the ear-phone and can change their path ac-cordingly.

One thing to be noted here is thatwhile using this device, avoid the com-pany of your pets. The reason is that

pets can hear ultrasonic sound, whichwill irritate them and they will barkunnecessarily.

EFY note. A similar device is usedin some cars, such as Skoda’s Lauramodel, to help the drivers in backing

up and avoid banging against someinvisible objects. However, instead ofearphones the sound in this case isheard through a speaker and there isalso an LCD screen to visually assistthe driver. �

Page 63: Kumpulan skematik elektronika 4

ELECTRONICS PROJECTS Vol. 19182

UPS FOR CORDLESS TELEPHONES

Cordless telephones are very popular nowadays. But they have a major drawback, i.e. they

cannot be operated during power fail-ure. Therefore usually another ordinary telephone is connected in parallel to the

cordless telephone. This results in lack of secrecy. UPS is a permanent solution to this problem.

Since the UPS is meant only for the cordless telephone, its output power is limited to around 1.5W. This is sufficient to operate most cordless telephones. as these employ only small capacity adapters (usually 9V/12V, 500mA), to enable the operation of the circuit and to charge the battery present in the handset.

The UPS presently designed is of on-line type. Here the inverter is ‘on’ through-

out, irrespective of the presence of the AC mains. When the AC mains is present, the same is converted into DC and fed to the inverter. A part of the mains rectified output is used to charge the battery. When the mains power fails, the DC supply to the inverter is from the battery and from this is obtained AC at the inverter output. This is shown in fig.1.

The circuit wired around IC CD4047 is an astable multivibrator operating at a frequency of 50 Hz. The Q and Q outputs of this multivibrator directly drive power MOSFETS IRF540. The configuration used is push-pull type. The inverter output is filtered and the spikes are reduced using

MOV (metal oxide varistor). The inverter transformer used is an ordinary 9V-0-9V, 1.5A mains transformer readily available in the market. Two LEDS (D6 and D7) indi-cate the presence of mains/battery.

The mains supply (when present) is stepped down, rectified and filtered using diodes D1 through D4 and capacitor C1. A part of this supply is also used to charge the battery. In place of a single 12V, 4Ah

Fig. 1: Block diagram of UPS.

Fig. 2: Circuit diagram of UPS

Fig. 3: Proposed layout of front and rear panels.

battery, one may use two 6V, 4Ah batter-ies (SUNCA or any other suitable brand).

The circuit can be easily assembled on a general-purpose PCB and placed inside a metal box. The two transformers may be mounted on the chassis of the box. Also,

the two batteries can be mounted in the box using supporting clamps. The front and back panel designs are shown in the Fig. 3.

The same circuit can deliver up to 100W, provided the inverter transformer and charging transformer are replaced with higher current rating transformers, so that the system can be used for some other applications as well.

Page 64: Kumpulan skematik elektronika 4

CIRCUIT

IDEAS

9 6 • N O V E M B E R 2 0 0 6 • E L E C T R O N I C S F O R Y O U W W W . E F Y M A G . C O M

Common ResistorCombinations for the

7805 RegulatorVout (approx.) R1 (ohms) R2 (ohms)

5V 470 0

6V 470 100

8V 470 220

9V 470 330

12V 470 510

Avoltage regulator (also calleda ‘regulator’) with only threeterminals appears to be a

simple device, but it is in fact a verycomplex integrated circuit. It convertsa varying input voltage into a constant‘regulated’ output voltage. Voltageregulators are available in a variety ofoutputs like 5V, 6V, 9V, 12V and 15V.

The LM78XX series of voltage regu-lators are designed for positive input.For applications requiring negative in-put, the LM79XX series is used. Fig. 1shows the pin configuration of a 5V7805 regulator.

The output voltage of a regulatorcircuit can be increased

� DR MAHESH N. JIVANI AND DR

NIKESH A. SHAH

S.C. DWIVE

DI

by using a pair of ‘voltage-divider’ re-sistors. It is not possible to obtain avoltage lower than the stated rating.You cannot use a 12V regulator tomake a 5V power supply, but you canuse a 5V regulator to make a 12V sup-ply.

Voltage regulators are very robust.These can withstand over-currentdraw due to short circuits and alsoover-heating. In both cases, the regu-lator will cut off before any damageoccurs. The only way to destroy aregulator is to apply reverse voltageto its input. Reverse polarity destroysthe regulator almost instantly.

Fig. 2 shows the circuit for increas-ing the output voltage of a regulatorcircuit using a pair of voltage-dividerresistors. Let’s assume the value of R1

as 470 ohms, whichmeans that a constantcurrent of 10.6 mA willbe available betweenterminals 2 and 3 of7805. This constant cur-rent plus the regulatorstandby current ofabout 2.5 mA will flowthrough R2 to groundregardless of its value.

Because of this constant 13.1mA cur-rent, R2 can now be set to a value thatwill give constant 7 volts across resis-tor R2. A resistor value of 533 or 510ohms (standard value) will give thenecessary 7 volts.

With 5 volts across R1 and 7 voltsacross R2, a total of about 12 volts(regulated) will appear across termi-nal 2 and ground. If a variable resis-tor is used as R2, the output voltagecan be easily fine-tuned to any valuegreater than 5 volts. The standbycurrent will vary slightly in theregulator 7805, but 2.5 mA will yieldgood results in the calculations. If anexact voltage (within 0.3 volt) isneeded, R2 must be a variable resis-tor. To make any fixed regulator ad-justable, use the following formula:

where Vout is the desired outputvoltage, Vfixed is the fixed voltageof the IC regulator (5 volts) andIstandby is the standby current of theregulator (2.5 mA). For resistor R1,use any value from 470 ohms to 1kilo-ohm for best results. For vari-able resistor R2, put any valuefrom the table given here for de-sired voltage operation.

Fig. 3 shows the circuit of a 6V-12V variable power supply usinga 5V regulator. The 220V AC mainsvoltage is stepped down by trans-former X1 to 9 volts, rectified by

Fig. 1: Pinconfiguration of7805 regulator Fig. 2: Circuit for increasing the output voltage

Fig. 3: Circuit of variable power supply using a 5V regulator

VARIABLE POWER SUPPLY USINGA FIXED-VOLTAGE REGULATOR IC

Vout= Vfixed+R2 +Istandby

Vfixed

R1

Page 65: Kumpulan skematik elektronika 4

CIRCUIT

IDEAS

E L E C T R O N I C S F O R Y O U • N O V E M B E R 2 0 0 6 • 9 7W W W . E F Y M A G . C O M

the bridge rectifier comprising 1N4007diodes D1 through D4, filtered bysmoothing capacitors C1 and C2, andregulated by IC 7805 (IC1). CapacitorsC1 and C2 help to maintain a constantinput to the regulator.

Capacitor C1 should be rated at aminimum of 1000 µF for each ampere

of current drawn and at least twicethe input voltage. Wire the 270nF orgreater disk (ceramic) capacitor closeto the input terminal of the IC, and a10µF or greater electrolytic capacitoracross the output. The regulator ICstypically give 60 dB of ripple rejec-tion, so 1V of input ripple appears as

a mere 1 mV of ripple in the regu-lated output.

Attach the 5-way rotary switch toresistors of different values to get theregulated output as shown in the table.Or, you can use a 1-kilo-ohm potmeteras a variable resistor to get the regu-lated 5V-12V output. �

Page 66: Kumpulan skematik elektronika 4

circuitideas

92 • February 2008 • electronics for you w w w . e F y m a g . c o m

EFY Lab

VErsatiLE CMOs/ttL LOgiC and CLOCk PrObE s.c. dwivedi

For fault diagnosis of any logic circuit, you need a probe that can test the logic level or existence of

clock activity. The circuit shown here can be used to test CMOS and TTL logic circuits for logic states and also for the presence of clock activity from a few hertz to more than 10 MHz, at any

point of the logic circuit.Supply for the probe circuit is

taken from the circuit under test using alligator clips. In the circuit, LM319 dual-comparator is connected as a window detector. The non-invert-ing pin of comparator N1 is biased to nearly 2V when switch S1 is in TTL position and 80 per cent of Vcc in CMOS position. The output of N1

goes low only when logic input at the probe tip exceeds the biasing voltage and, as a result, the red LED lights up to indicate logic 1 state at the probe tip.

Similarly, the inverting pin of comparator N2 is biased at nearly 0.8V (in TTL position of switch S1) and 20 per cent of Vcc (in CMOS position of switch S1). Only when the input volt-

Test ResultsTest Specified Observed Red Green Yellow Buzzer conditions level level LED LED LED sound

TTL (5V)

Low <0.8V <0.8V Off On Off Off

High >2V ≥2.1V On Off Off Off

Clock TTL 1Hzto10MHz Off Momentarily Onfor Onfor compatible orevenmore on/off 3seconds 3seconds

CMOS (12V)

Low <2.5V ≤2.35V Off On Off Off

High >9.5V >9.5V On Off Off Off

Clock CMOS 1Hzto10MHz Off Momentarily ‘On’for ‘On’for compatible orevenmore on/off 3seconds 3seconds

age at probe tip is less than the biasing voltage, will its output drop low to light up the green LED to indicate logic 0 state.

The probe tip is also connected to the input of CD4049 (N3) via capacitor C1 to pass AC/clock signals. It simply acts as a buffer and couples only the high-to-low going signals at the in-put/output of the gate to the input of next gate N4.

The output of gate N4 is further coupled to gate N5, which is wired as a monostable. A positive feedback from

Page 67: Kumpulan skematik elektronika 4

circuitideas

electronics for you • February 2008 • 93w w w . e F y m a g . c o m

the output of gate N5 to the input of gate N4 ensures that unless capacitor C4 (0.47µF) discharges sufficiently via 4.7-mega-ohm resistor, further clock pulses at the input of N4 will have no effect.

Gate N6 is used for driving a yel-low LED (indicating oscillatory input at probe tip), which will be switched on for a brief period. The output of gate N6 is further used to inhibit/en-able the oscillator formed by gates N7

and N8. It briefly activates the buzzer to beep during mono period, indicat-ing oscillatory input at the probe tip. Thus we have audio-visual indication during clock/oscillatory input at the probe tip.

Page 68: Kumpulan skematik elektronika 4

CIRCUITIDEAS

8 4 • F E B R U A R Y 2 0 0 6 • E L E C T R O N I C S F O R Y O U W W W . E F Y M A G . C O M

CMYK

U sing this circuit, you can ob-tain the following voltages(approx.) at a current limited

to one ampere: 3.3V, 5V, 6V, 9V, 12Vand 15V.

The AC mains is stepped downby transformer X1 to deliver the sec-ondary output of 18V AC at a maxi-mum current of 1A dependant uponthe load. The transformer output isrectified by the bridge rectifier com-prising diodes D1 through D4, filteredby capacitor C1 and fed to regulatorIC LM317, which is a 3-terminal posi-

tive regulator capable of providing1.2V to 37 volts at 1.5A current to theload.

Resistor R13 and selected combi-nations of resistors R1 through R12are used to produce approximately3.3V, 5V, 6V, 9V, 12V and 15V at theoutput. The desired resistors are se-lected by switching into conductionone of the six pnp transistors T1through T6 by grounding the corre-sponding transistor base using rotaryswitch S1.

For example, to get regulated 3.3V,simply rotate the knob of rotary switchto 3.3V position. Consequently, tran-

SUNIL KUMAR

VERSATILE POWER SUPPLY S.C. DWIVEDI

sistor T1 is forward biased to switchresistors R1 and R2 (in series) acrossAdj pin of LM317 and ground to pro-duce 3.3V.

Other voltages can be produced inthe same way by using rotary switchS1. Capacitor C2 bypasses any ripplein the output. Diode D5 is used as theprotection diode. Use a heat-sink fordissipation of heat from IC LM317. Thefuse-rated lamp provides protectionagainst short circuit.

This 1A rated power supply canbe used for testing of various circuitideas as well as construction projectspublished in EFY.

Page 69: Kumpulan skematik elektronika 4

CIRCUIT

IDEAS

E L E C T R O N I C S F O R Y O U • M A Y 2 0 0 6 • 8 9W W W . E F Y M A G . C O M

CMYK

� RAJ K. GORKHALI

VISUAL AC MAINSVOLTAGE INDICATOR

S.C. DWIVED

I

You should not be surprised ifsomeone tells you that themains voltage fluctuation could

be anywhere from 160 volts to 270volts. Although majority of our elec-trical and electronics appliances havesome kind of voltage stabilisation in-ternally built-in, more than 90 per centof the faults in these appliances occurdue to these power fluctuations.

This simple test gadget gives vi-sual indication of AC mains voltagefrom 160 volts to 270 volts in steps of10 volts.

There are twelve LEDs numberedLED1 to LED12 to indicate the voltagelevel. For input AC mains voltage ofless than 160 volts, all the LEDs remainoff. LED1 glows when the voltage

reaches 160 volts, LED2 glows whenthe voltage reaches 170 volts and so on.The number of LEDs that glow keepsincreasing with every additional 10volts. When the input voltage reaches270 volts, all the LEDs glow.

The circuit basically comprisesthree LM339 comparators (IC1, IC2and IC3) and a 12V regulator (IC4). Itis powered by regulated 12V DC. Forpower supply, mains 230V AC isstepped down to 15V AC by step-down transformer X1, rectified by abridge rectifier comprising diodes D1through D4, filtered by capacitor C4and regulated by IC4. The inputvoltage of the regulator is also fed tothe inverting inputs of gates N1through N12 for controlling the levelof the AC.

The LED-based display circuit is

built around quad op-amp compara-tors IC1 through IC3. The inverting in-put of all the comparators is fed withthe unregulated DC voltage, which isproportional to mains input, whereasthe non-inverting inputs are derivedfrom regulated output of IC4 througha series network of precision resistorsto serve as reference DC voltages.

Resistors R13 to R25 are chosensuch that the reference voltage atpoints 1 to 12 is 0.93V, 1.87V, 2.80V,3.73V, 4.67V, 5.60V, 6.53V, 7.46V,8.40V, 9.33V, 10.27V and 11.20V, re-spectively. When the input voltage var-ies from 160V AC to 270V AC, the DCvoltage at the anode of ZD1 also var-ies accordingly. With input voltagevarying from 160V to 270V, the out-put across filter capacitors C1 and C2varies from 14.3V to 24.1V approxi-

Page 70: Kumpulan skematik elektronika 4

CIRCUIT

IDEAS

9 0 • M A Y 2 0 0 6 • E L E C T R O N I C S F O R Y O U W W W . E F Y M A G . C O M

CMYK

mately. Zener ZD1 is used to dropfixed 12V and apply proportional volt-ages to all comparator stages (invert-ing pins). Whenever the voltage at thenon-inverting input of the compara-tors goes high, the LED connected atthe output glows.

Assemble the circuit on a general-

purpose PCB such that all the LEDsmake a bargraph. In the bargraph,mark LED1 for minimum level of160V, then LED2 for 170V and so on.Finally, mark LED12 for maximumlevel of 270V.

Now your test gadget is ready touse. For measuring the AC voltage,

simply plug the gadget into the mainsAC measuring point, press switch S1and observe the bargraph built aroundLEDs. Let’s assume that LED1 throughLED6 glow. The measured voltage inthis case is 220V. Similarly, if all theLEDs glow, it means that the voltageis more than 270V. �

Page 71: Kumpulan skematik elektronika 4

ELECTRONICS PROJECTS Vol. 19184

WATCH-DOG FOR TELEPHONESMost of the telephone security

devices available in market are simple but quite expensive.

These devices provide blinking or beeping type line-tap/misuse indications. Quite often they do not offer guaranteed pro-tection against unauthorised operation. A very simple and unique circuit of a telephone watch-dog to safeguard sub-scriber telephone lines against any fraud is described here.

This little circuit keeps continuous watch over the telephone lines and sounds

an alarm in case of any misuse. In ad-dition it transmits a loud tone through the telephone lines to prevent further misuse.

When switch S1 is turned on, the normal (on-hook) telephone line voltage at the output of bridge-rectifier diodes D1 to D4 is approximately 48 volts, which being well above the break-down voltage of zener diode D5, the diode conducts. As a result transistor T2 gets forward biased. This effectively grounds the base of transistor T1 which is thus

cut off and the remaining circuit does not get any power supply. In this state, only a small (negligible) current is taken by the circuit, which will not affect the telephone line condition. However, when handset of any telephone connected to the telephone lines is lifted (off-hook), line voltage suddenly drops to about 10 volts. As a result, transistor T2 is switched off and transistor T1 gets forward biased via resistor R1. Now, the astable multivibrator built around timer IC1 starts oscillating and the speaker

starts sounding. Output of the astable multivibrator is also connected to the base of transistor T1 through ca-pacitor C5. As a result, only a loud (and irritating) tone is heard in the ear-piece of the unauthorised telephone instrument.

This circuit can be con-structed on a veroboard us-ing easily available low-cost components and it can be connected to any telephone line without the fear of mal-functioning. No extra power supply is required as it draws power from the telephone line for operation.EFY Note: Please discon-nect the gadget when you are yourself using the telephone as it cannot distinguish between authorised and unauthorised operation.