Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
D. PRABAHARAN
T
he circuit
of a 7MHz
C W / A M
QRP transmit-
ter described here
can be used to
transmit either
CW or audio fre-
quency modulat-
ed signal over a
7MHz carrier.
The carrier fre-
quency oscillator is
crystal controlled
using 7MHz crystal
in its fundamental
mode. The tank
circuit comprises a
shortwave oscilla-
tor coil which can
be tuned to 7MHz
frequency with the
help of ½J gang
capacitor VC1.
Transistor T2
(with identical tank circuit connected sion line for maximum power transfer. For CW operation, switch S1 is to be
at its collector as in case of transis- Suitable heatsink should be used for kept on for bypassing the audio driver
tor T1) serves as a power amplifier. transistor T2. transformer and Morse key is used
The RF output from oscillator stage Tuning adjustments may be accom- for on/off-type modulation. CW would
is inductively coupled to the power plished using a 6-volt torch bulb. Connect be generated during key depressions.
amplifier stage. The output from power the bulb to the collector of transistor T1 For AF modulation, Morse key points
amplifier is routed via capacitor C3 first through a coupling capacitor and should be closed and switch S1 should
and inductor L3 to a half-wave dipole tune ½J gang VC1 for maximum bril- be flipped to ‘off ’ position.
using a 75-ohm coaxial cable. ½J gang liance. (Note: the bulb would light ac- Any suitable mic. amplifier may be
capacitor VC3 along with inductor L3 cording to intensity of RF energy.) Same used to feed audio input to the audio
forms an antenna tuning and matching procedure may be repeated for power am- driver transformer X1. (For transformer
network between the output of power plifier stage and antenna tuning network X1 you may use the transistor-radio
amplifier stage and coaxial transmis- for ensuring maximum power transfer. type AF driver transformer.)
that data value is cancelled using XNOR lines ‘1’. to 74138 is 1 1 0 and it outputs M0
gates (N1 through N8) to retain the sec- The highest-priority line is cancelled through M7 = 1 1 1 1 1 1 0 1. Since M6=0,
ond-highest priority value that is gener- using eight XNOR gates as shown in the only L6 is complemented by XNOR gates.
ated by the second encoder. figure. Let the output lines from XNOR Thus the outputs of XNORs are N0
To understand the logic, let the in- gates be N0 through N7. Consider inputs through N7 = X X X 0 1 1 1 1. Now N3=0
coming data lines be denoted as L0 to L7. Lp and Mp of the corresponding XNOR and the highest priority for ‘N’ is 3. This
Lp is the highest-priority line (active-‘low’) gate. Since Mp = 0 and also Lp = 0, the value is recovered by priority encoder 2
and Lq the second-highest priority line output of this XNOR gate is Np = comple- (IC3) as S2 S1 S0 = 1 0 0.
CIRCUIT
IDEAS
A
tmel’s AVR microcontroller generated by the programmer from the well as an isolator circuit when the
chips are in-system program- PC. AVR is not in programming mode. In
mable (ISP), i.e. these can be 4. RST (Reset): Reset (low pulse) idle mode, all the outputs are tristated
programmed directly in the target cir- generated by the program. The AVR so as not to affect the operation of the
cuit. A special programmer software is programmed while in reset state. target system.
is used to download the program from Here’s a dongle circuit for in-sys- When the AVR’s ISP mode is se-
the PC into the AVR’s flash memory. tem programming of Atmel’s AVR chip lected, the lower half of IC 74LS244
Atmel offers a software package called AT90S8515 using such software pack- is enabled, pulling the target system’s
the Atmel AVR ISP that allows pro- ages as Atmel ISP 2.65 and Reset line low. Once the target
gramming of the AVR microcontrollers PonyProg2000. Though not exactly the system is in Reset mode, the SCK,
in the circuit using a simple dongle. A same, a similar dongle circuit can be MISO and MOSI lines are no longer
dongle is nothing but an adaptor cable found at the Website ‘www.iready.org/ loaded by the peripheral circuitry, if
that connects the PC’s parallel port projects/uinternet/ispdongle.pdf.’ any, on the target system. Now, it is
with the ISP pins of the AVR chip for The PC’s parallel-port pins 4 and safe to enable the upper half of
programming. 5 drive buffer IC 74LS244 by enabling 74LS244, driving the MOSI, LED and
For programming, the four lines re- its pins 19 and 1, respectively. A low SCK lines of the dongle. The RST pin
quired from the AVR chip to the ISP pulse on these pins will allow the becomes high after the AVR is pro-
adaptor (dongle) are: passing of the serial clock and data grammed. Glowing of LED2 indicates
1. MOSI (Master Out, Slave In): during programming. MOSI, LED, that the AVR is in programming mode.
Data being transmitted to the AVR be- SCK and RST outputs are buffered There are two standard connectors
ing programmed is sent on this pin from the parallel port’s pins 7, 8, 6 for in-system programming of Atmel
2. MISO (Master In, Slave Out): and 9, respectively. The MISO input AVR microcontroller. One is the 10-
Data received from the AVR being pro- from the AVR is fed into pin 10 of the pin header (dual-in-line (DIL) connec-
CIRCUIT
IDEAS
tor)) used on the Atmel STK kits. The the dongle is identified as a value- 6-line cable of about 30cm length is
other is a 6-pin header (DIL connec- added pack dongle. required for connecting this ISP adap-
tor) used in Atmel ISPs. The two loop- Here, we’ve used an 8-pin single-in- tor (dongle) to the target circuit.
back connections, pin 2-to-pin 12 and line (SIL) connector and an additional If the AVR is not on the target cir-
pin 3-to-pin 11 of the parallel port, are 6-pin SIL connector for the Atmel pro- cuit, you can insert the AVR into the
used to identify the dongle. With only gramer circuit. With the buffer and the ZIF socket and program it. Regulated
pin 2-to-pin 12 link, the dongle is 40-pin ZIF socket in this circuit, it can be 5V DC is required for the AVR and
called STK300 or AVR ISP dongle. used as a standalone programmer. The the associated dongle circuit, whose
With only pin 3-to-pin 11 link, the 6-pin SIL male connector is used for terminals are also provided in connec-
dongle is called STK200 or old Kanda connection between the dongle and the tor CON4. LED1 is used as the power
ISP dongle. With both links in place, AVR on the target board. Thus, another indicator for the circuit. z
CIRCUIT
IDEAS
PERSONAL STEREO
M. VENK ATESWAR AN
TESWARAN pushpull amplifier, each transistor (T2 tor T2 and R5 and R7 for transistor
or T3) gets double the voltage when T3) so that the acceptable output
I
n the output stages of most broad- activated. without overheating is obtained.
cast receivers and some amplifiers, Connect the low audio signal from You can also replace these transistors
there is a limit up to which maxi- the stereo system at input terminals A with another pair of suitable high-
mum power can be developed with- and B of the audio amplifier and pro- power transistors.
out distortion. In the widely accepted vide mains AC to activate the circuit. For driving transistors T2 and T3,
output circuit, two output transistors During the first half cycle of an AF a 9V audio driver transformer having
are connected in series between the cycle, transistor T2 conducts and the six leads is used. It is readily available
positive and ground and biasing is ad- current flows from positive rail to in the market and reasonably matches
justed so that each transistor gets half ground rail (centre tap of transformer the output and input impedances of
the supply voltage. X1) via the loudspeaker coil (connected the preceeding and succeeding stages.
The circuit presented here is a between the emitter of transistor T2 To test the quality of the audio
simple audio amplifier for a personal and ground) in one direction. While output, connect the stereo’s outputs
stereo system. In this, supply voltage in the second half cycle, transistor T3 to the respective terminals A and B.
to each transistor can be enhanced to conducts and the current flows from Now increase the volume level of
produce a larger output. The audio ground rail to negative rail via the the stereo slowly. If you get a
driver transformer drives the transis- loudspeaker coil (connected between high-level, high-quality sound across
tors adequately. ground and the collector of transistor loudspeaker L1, the amplifier is
A 9V-0-9V, 300mA transformer has T3) in a direction opposite to the pre- working well. If the sound quality is
been used in the set-up. Out of vious flow. not good, decrease the volume level
the four diodes (D1 through D4), two Transistors T2 and T3 of the until the audio amplifier gives good
are used for developing the positive pushpull audio amplifier should results.
voltage rail (+9V) and the other be matched correctly. If these transis- Note that this audio amplifier
two are used for developing the tors get heated, change the bleeding works well for low-level audio
negative voltage rail (–9V). In the resistor pairs (R3 and R4 for transis- signals. z
T
his over/under voltage cut-out very low mains voltages. inside 555 timer ICs. Supply is tapped
will save your costly electrical The circuit features auto reset and from different points of the power sup-
and electronic appliances from utilises easily available components. It ply circuit for relay and control circuit
the adverse effects of very high and makes use of the comparators available operation to achieve reliability.
CIRCUIT
IDEAS
BATTERY CHARGER
Y.M. ANANDAVARDHANA to energise electromagnetic relay RL1. Pushing switch S1 latches relay
Relay RL1 is connected to the collec- RL1 and the battery cells start charg-
T
his charger for series-connected tor of transistor T1. Transistor T1 is ing. As the voltage per cell increases
4-cell AA batteries automatically driven by pnp transistor T2, which, in beyond 1.3V, the voltage drop across
disconnects from mains to stop turn, is driven by pnp transistor T3. resistor R4 starts decreasing. When it
charging when the batteries are fully Resistor R4 (10-ohm, 0.5W) is con- falls below 650 mV, transistor T3 cuts
charged. It can be used to charge par- nected between the emitter and base off to drive transistor T2 and, in turn,
tially discharged cells as well. of transistor T3. cuts off transistor T3. As a result, re-
The circuit is simple and can be When a current of over 65 mA lay RL1 de-energises to cut off the
divided into AC-to-DC converter, relay flows through the 12V line, it causes a charger and red LED1 turns off.
driver and charging sections. voltage drop of about 650 mV across You may determine the charging
In the AC-to-DC converter section, resistor R4 to drive transistor T3 and voltage depending on the NiCd cell
transformer X1 steps down mains 230V cut off transistor T2. This, in turn, turns specifications by the manufacturer.
AC to 9V AC at 750 mA, which is rec- transistor T1 ‘on’ to energise relay RL1. Here, we’ve set the charging voltage
tified by a full-wave rectifier compris- Now even if the pushbutton is re- at 7.35V for four 1.5V cells. Nowadays,
ing diodes D1 through D4 and filtered leased, mains is still available to the 700mAH cells are available in the mar-
by capacitor C1. Regulator IC LM317 primary of the transformer through its ket, which can be charged at 70 mA
(IC1) provides the required 12V DC normally open (N/O) contacts. for 10 hours. The open-circuit voltage
charging voltage. When you press In the charging section, regulator is about 1.3V.
switch S1 momentarily, the charger IC1 is biased to give about 7.35V. Pre- The shut-off voltage point is deter-
starts operating and the power-on set VR1 is used for adjusting the bias mined by charging the four cells fully
LED1 glows to indicate that the voltage. Diode D6 connected between (at 70 mA for 14 hours). After measur-
charger is ‘on.’ the output of IC1 and battery limits ing the output voltage, add the diode
The relay driver section uses pnp the output voltage to about 6.7V, drop (about 0.65V) and bias LM317 ac-
transistors T1, T2 and T3 (each BC558) which is used for charging the battery. cordingly. z
This terminal count output from pin Initially, pin 3 (Q0) of IC3 is high nected to 1-of-10 decoder CD4028 (IC4).
7, after inversion by gate N3, is con- and the counter is in count-up state. On During count-up operation of IC2, the
nected to clock pin 14 of decade counter reaching ninth count, pin 3 of IC3 goes outputs of IC4 go logic high sequentially
IC3 (CD4017) which is configured here low and as a result IC2 starts counting from Q0 to Q9 and thus trigger the tri-
as a toggle flip-flop by returning its Q2 down. When the counter reaches 0 count, acs and lighting bulbs 1 through 10,
output at pin 4 to reset pin 15. Thus Q2 output of IC3 momentarily goes high to one after the other. Thereafter, during
output at pin 3 of IC3 goes to logic 1 and reset it, thus taking pin 3 to logic 1 state, count-down operation of IC2, the bulbs
logic 0 state alternately at each terminal and the cycle repeats. light in the reverse order, presenting a
count of IC2. The BCD outputs of IC2 are con- wonderful visual effect.
PRIYANK MUDGAL stepped down by transformer X1, rec- former output is fed to the collector of
tified by a full-wave rectifier compris- transistor T1, which provides a fixed
T
his emergency light has the ing diodes D1 and D2, filtered by ca- bias voltage of 6.8V to charge the bat-
following two advantages: pacitor C1 and fed to relay coil RL1. tery. When the battery is fully charged,
1. It turns on automatically The relay energises to connect the bat- the battery voltage becomes equal to
the breakdown voltage
of the zener diode
(ZD1). Zener diode ZD1
conducts to provide an
alternative path for the
current to ground and
battery charging stops.
When mains fails,
relay RL1 de-energises.
The battery now gets
connected to the white
LED array (comprising
LED1 through LED6)
through current-limit-
ing resistor R2. The
when the mains power fails, so you tery to the charging circuit through its LEDs glow to light up the room. To
need not search it in the dark. normally-opened (N/O) contacts. Free- increase the brightness in your room,
2. Its battery starts charging as soon wheeling diode D3 acts as a spike you can increase the number of white
as the mains resumes. buster for the relay. LEDs after reducing the value of resis-
Operation of the circuit is quite The charging circuit is built around tor R2 and also use a reflector assem-
straightforward. Mains supply is npn transistor BD139 (T1). The trans- bly.
RAJ KUMAR MONDAL (IC2 and IC3) and AND gate CD4081 (IC4). gate. When SCR1 is fired, it provides
Timer IC1 is wired as an astable ground path to operate the circuit after
C
onsider that a school has a total of multivibrator, whose clock output pulses resetting both decade counters IC2 and
eight periods with a lunch break are fed to IC2. IC2 increases the time IC3. At the same time, LED1 glows to in-
after the fourth period. Each period periods of IC1 (4.5 and 3 minutes) by ten dicate that school bell is now active.
is 45 minutes long, while the duration of times to provide a clock pulse to IC3 ev- When switch S2 is pressed momen-
the lunch break is 30 minutes. ery 45 minutes or after 30 minutes, re- tarily, the anode of SCR1 is again
To ring this automatic school bell to spectively. When the class periods are go- grounded and the circuit stops operating.
start the first period, the peon needs to ing on, the outputs of IC3 switch on tran- In this condition, both LED1 and LED2
momentarily press switch S1. Thereafter, sistors T1 and T2 via diodes D4 through don’t glow.
the bell sounds every 45 minutes to indi- D12. When the eighth period is over, Q9
cate the end of consecutive periods, ex- Resistors R4 and R5 connected in se- output of IC3 goes high. At this time, tran-
cept immediately after the fourth period, ries to the emitter of npn transistor T2 sistors T1 and T2 don’t get any voltage
when it sounds after 30 minutes to indi- decide the 4.5-minute time period of IC1. through the outputs of IC2. As a result, the
cate that the lunch break is over. When The output of IC1 is further connected to astable multivibrator (IC1) stops working.
the last period is over, LED2 glows to in- pin 14 of IC2 to provide a period with a The school bell sounds for around 8
dicate that the bell circuit should now be duration of 45 minutes. Similarly, resis- seconds at the end of each period. One
switched off manually. tors R2 and R3 connected in series to the can increase/decrease the ringing time of
In case the peon has been late to start emitter of npn transistor T1 decide the 3- the bell by adding/removing diodes con-
the school bell, the delay in minutes can minute time period of IC1, which is fur- nected in series across pins 6 and 7 of
be adjusted by advancing the time using ther given to IC2 to provide the lunch- IC1.
switch S3. Each pushing of switch S3 ad- break duration of 30 minutes. The terminals of the 230V AC
vances the time by 4.5 minutes. If the Initially, the circuit does not ground electric bell are connected to the nor-
school is closed early, the peon can turn to perform its operation when 12V power mally-open (N/O) contact of relay RL1.
the bell circuit off by momentarily press- supply is given to the circuit. The circuit works off a 12V regulated
ing switch S2. When switch S1 is pressed momen- power supply. However, a battery source
The bell circuit contains timer IC tarily, a high enough voltage to fire sili- for back-up in case the power fails is also
NE555 (IC1), two CD4017 decade counters con-controlled resistor SCR1 appears at its recommended.
A
flashing beacon has many uses. It heat-sink to dissipate the
can be employed as a distress sig- heat generated while deliv-
nal on highways or as a direction ering full current. Since the
pointer for parking lots, hospitals, hotels, IC has an inbuilt switch-on
etc. Here we present a flashing beacon current limiter, it extends
that uses well-known regulator IC LM317T. the bulb life.
As LM317T regulator can deliver more than For the shown values
1 amp. A small 12V, 10W bulb with a of resistors and capacitors,
high-quality reflector can serve as a good the bulb flashes at approxi-
visible blinker. mately 4 cycles per second.
A 12-15V, 1A DC supply is connected The number of flashes de-
to the input pin of the IC. A 12V, 10W pends on the charge-dis-
bulb and a combination of resistors and charge time of the capaci-
capacitors are connected between the out- tors. Different values of resistors and ca- crease the number of flashes.
put pin and ADJ pin of the IC as shown in pacitors can be used to increase or de- This circuit costs around Rs 50.
MOHAMMAD USMAN QURESHI depending on the selected values of R7 and On second clap, a negative pulse trig-
C3. This ‘on’ time (T) of IC1 can be calcu- gers IC2 and its output pin 3 goes high for
H
ere’s a clap switch free from false lated using the following relationship: a time period depending on R9 and C5.
triggering. To turn on/off any ap T=1.1R7.C3 This provides a positive pulse at clock pin
pliance, you just have to clap seconds 14 of decade counter IC 4017 (IC3). De-
twice. The cir-cuit changes its output state where R7 is in ohms and C3 in microfar- cade counter IC3 is wired here as a
only when you clap twice within the set ads. bistable.
time period. Here, you’ve to clap within 3 On first clap, output pin 3 of IC1 goes Each pulse applied at clock pin 14
seconds. high and remains in this standby position changes the output state at pin 2 (Q1) of
The clap sound sensed by condenser for the preset time. Also, LED1 glows for IC3 because Q2 is connected to reset pin
microphone is amplified by transistor T1. this period. The output of IC1 provides 15. The high output at pin 2 drives transis-
The amplified signal provides negative pulse supply voltage to IC2 at its pins 8 and 4. tor T2 and also energises relay RL1. LED2
to pin 2 of IC1 and IC2, triggering both the Now IC2 is ready to receive the triggering indicates activation of relay RL1 and on/off
ICs. IC1, commonly used as a timer, is signal. Resistor R10 and capacitor C7 con- status of the appliance. A free-wheeling
wired here as a monostable multivibrator. nected to pin 4 of IC2 prevent false trig- diode (D1) prevents damage of T2 when
Trigging of IC1 causes pin 3 to go high and gering when IC1 provides the supply volt- relay de-energises.
it remains high for a certain time period age to IC2 at first clap. This circuit costs around Rs 80.
T
he circuit given here can
be used to send telegraph-
ic messages via compu-
ter. The message data entered
through the computer keyboard is
converted to corresponding Morse
code and transmitted via the cir-
cuit attached to any IBM compat-
ible computer’s printer port.
Morse code pulses from the
computer appearing at pin 3
of the 25-pin parallel port are
routed to the base of transistor
T1(CL100) which in turn switches
on the audio frequency oscillator
built around IC1 (NE555) for the
duration of each pulse. The frequency of As stated earlier, this circuit is con- various characters appears under the
the oscillator can be varied by adjusting nected to the parallel port of the PC. Only function ‘write(ch)’ of the program wherein
potmeters VR1 (20 kilo-ohm) and VR2 (50 pins 3 and 25 of the ‘D’ connector are used. ‘di’ represents a short duration pulse and
kilo-ohm). Pin 3 corresponding to data bit D1 of port ‘da’ represents a long duration pulse. The
The audio output from pin 3 of IC 378(hex) carries the Morse Code data from program is interactive and permits varia-
(NE555) is connected to an FM transmit- the computer to the circuit while pin 25 tion of speed. The program can be modified
ter comprising transistor T2 (BF194B) and serves as common ground. to read and transmit the text files or one
the associated components. The frequency The circuit should be powered by +5 can even make a TSR (terminate and-stay-
of the transmitter can be changed with volts regulated power supply. It should resident) program.
the help of trimmer capacitor VC1 or by be fixed inside a metal box to reduce in- It is hoped that this circuit idea
changing the number of turns of coil L1. terference. would prove to be of great value to the
The FM modulated signal is coupled to The program, written in TURBO government’s telecom department, defence
a short-wire antenna via capacitor C7. The PASCAL 7.0, accepts the message via services, coast guard, merchant navy and
signal can be received using any ready- the keyboard, converts it to correspond- amateur radio operators as well as all
made FM receiver tuned to the frequency ing Morse code and sends the code to pin those who make use of Morse code for
of the transmitter. 3 of the printer port. The Morse code of message transmission.
PC INTERFACED AUDIO
S.C. DWIVEDI
S Hardware
ounds of various kinds have always put from IC2(a) is the required audio sig-
fascinated human beings. Many de- nal that has to be processed and ampli-
vices have been invented for re- The circuit functions as an 8-bit mono fied to feed the speaker. The part follow-
cording and playing back the sounds— player, i.e. the sound files (with .WAV ing the I-V converter is the bass- and
from magnetic tapes to DVD (digital ver- extension) with sound quantised to eight treble-control circuit employing RC-type
satile disc), from Adlib cards to high-per- bits or 256 levels can be played. In variable low-pass and high-pass filters
formance sound cards with ‘surround case of files with 16-bit quantisation, these connected to the input of audio amplifier
sound’ capability. For personal comput- are re-quantised as discussed under ‘Soft- built around the second op-amp inside
ers (PCs), there is a wide variety of such ware’ subheading. Thus, only eight bits LF353 [IC2(b)].
devices. A modern PC, generally, has a are sent to the card through the printer The frequency response of the filters
‘Sound Blaster’ card installed in it. If your port. can be varied using potentiometers VR1
PC does not have a sound card, here is Since there is no duplex communica- and VR2. The low frequencies or bass can
a low-cost audio playback circuit with tion necessary between the player card be cut or boosted with the help of poten-
bass, treble, and volume controls to cre- and the PC, it is sufficient to use the eight tiometer VR1. Similarly, high frequencies
ate your own music player. output data lines of the port 378H (pins 2 or treble can be cut or boosted with the
The playback device ‘M-player’ (i.e. through 9 of 25-pin D-connector). This 8- help of potentiometer VR2. At low fre-
media player) described here uses mini- bit digital output is converted into an ana- quencies, capacitors C2, C3, and C4 act
mal hardware to achieve a moderately logue signal using DAC 0808 (IC1) from as open circuits and the effective feed-
good-quality audio playback device. National Semiconductor. back is through 10k resistors (R4, R5,
The software that accompanies the hard- The output current from the DAC and R6) and potentiometer VR1.
ware is meant for a PC running under varies with the input digital level The audio amplifier IC2(b) acts as an
MS-DOS or a compatible operating sys- (represented by bits D0 through D7), inverting amplifier and the amplification
tem. This device can play a simple 8-bit the reference voltage (Vref), and the value (or attenuation) of the low-frequency bass
PCM (pulse code modulation) wave file of series resistor R1 connected to Vref signals depends on the value of potenti-
with some special effects. The PC is con- pin 14 of DAC0808 IC. The output cur- ometer VR1. The frequency f1 at which C
nected to the device through the PC par- rent Io (in mA) is given by the relation- = C2 = C3 becomes effective is given by
allel port. ship: the equation:
Software
- Loudspeaker 8-ohm, 2W PCM data with data chunk. Every wave
- Power supply: (a) +12V, 500mA file has some minimum chunks (see Table
- (b) –12V, 100mA
The software accompanying this construc- II). These chunks will be present in every
- (c) +5V, 100mA
tion project is written in Turbo C/C++ for wave file. Then there are other chunks
DOS. It can be used to which are actually non-standard. In PCM
TABLE I
play simple 8-bit PCM itself, the above chunk may be followed
Relevant Details of Parallel Port
wave files. 16-bit wave either by DATA chunk or by LIST chunk
Pin No. Pin No. SPP signal Direction Register
(D-type 25) (centronics) in/out files are converted into 8- which, in turn, has lots of sub-chunks.
bit PCM data before pro- (Any information obtained on these
2 2 Data 0 Out Data
3 3 Data 1 Out Data ceeding. chunks by the readers may please be
4 4 Data 2 Out Data Even stereo wave shared with the authors.)
5 5 Data 3 Out Data files can be played; but During playback, the speed with
6 6 Data 4 Out Data
not the stereo way. Only which the processor in the PC can ex-
7 7 Data 5 Out Data
8 8 Data 6 Out Data one channel is chosen. ecute the main loop is first studied using
9 9 Data 7 Out Data Up to six-channel PCM a dummy loop and thus the delay is
18 - 25 19-30 Ground Gnd data can be read and con- adaptively varied with respect to the speed
Program Listing
MPLAYER.CPP cprintf(“%c”,205); delay(75);
#include “Sounds.h” for(j=y1+1;j<=y2-1;j++){ gotoxy(3,13);cprintf(“ ”);
void DisplayTip(char *string) gotoxy(x1,j); delay(75);
{ cprintf(“%c”,186); gotoxy(3,14);cprintf(“ ”);
text_info tinf; gotoxy(x2,j); delay(75);
if(strlen(string)<75) cprintf(“%c”,186); gotoxy(3,15);cprintf(“ ”);
{ } delay(75);
gettextinfo(&tinf); gotoxy(x1,y1);cprintf(“%c”,201); gotoxy(3,16);cprintf(“ ”);
textbackground(LIGHTGRAY);textcolor(RED); gotoxy(x2,y1);cprintf(“%c”,187); delay(75);
gotoxy(2,25); gotoxy(x1,y2);cprintf(“%c”,200); gotoxy(3,17);cprintf(“ ”);
for(int i=0;i<75;i++) cprintf(“ ”); gotoxy(x2,y2);cprintf(“%c”,188); return;
gotoxy(2,25); if(caption!=NULL){ }
cprintf(string); textcolor(WHITE); void MenuInitialise(void)
textattr(tinf.attribute); gotoxy(x1+2,y1); {
gotoxy(tinf.curx,tinf.cury); cprintf(“%s”,caption); int i;
} } // The FILE menu option
return; textattr(tinfo.attribute); Menu[MNU_FILE].nextMenu=MNU_EFFECT;
} return; Menu[MNU_FILE].prevMenu=MNU_OPERATION;
void Window(int x1,int y1,int x2,int y2,char } Menu[MNU_FILE].Child=FALSE;
*caption,int BackCol,int TextCol) void DrawScreen(void) Menu[MNU_FILE].num_items=4;
{ { for(i=0;i<4;i++)
text_info tinfo; textbackground(LIGHTGRAY);textcolor(BLACK); {
int i,j; clrscr(); Menu[MNU_FILE].Enabled[i]=TRUE;
gettextinfo(&tinfo); Window(1,2,80,24,NULL,BLUE,WHITE); Menu[MNU_FILE].subMenu[i]=NONE;
textbackground(BackCol);textcolor(TextCol); gotoxy(1,1);cprintf(“ File Effects Operation”); Menu[MNU_FILE].String[i]=(char *)malloc(15);
for(j=y1;j<=y2;j++){ textcolor(RED); Menu[MNU_FILE].Tip[i]=(char *)malloc(50);
gotoxy(x1,j); gotoxy(3,1);cprintf(“F”); Menu[MNU_FILE].OptionID[i]=1+i;
for(i=x1;i<=x2;i++) gotoxy(12,1);cprintf(“E”); }
cprintf(“ ”); gotoxy(24,1);cprintf(“O”); Menu[MNU_FILE].Enabled[1]=FALSE;
} textbackground(BLUE);textcolor(LIGHTBLUE); strcpy(&(Menu[MNU_FILE].String[0][0]),“Open”);
gotoxy(x1+1,y1); gotoxy(3,10);cprintf(“ ”); strcpy(&(Menu[MNU_FILE].String[1][0]),“Save”);
for(i=x1+1;i<=x2-1;i++) delay(75); strcpy(&(Menu[MNU_FILE].String[2][0]),“-”);
cprintf(“%c”,205); gotoxy(3,11);cprintf(“ ”); strcpy(&(Menu[MNU_FILE].String[3][0]),“Exit”);
gotoxy(x1+1,y2); delay(75); strcpy(&(Menu[MNU_FILE].Tip[0][0]),“Open the
for(i=x1+1;i<=x2-1;i++) gotoxy(3,12);cprintf(“ ”); *.wav file”);
RemoveMenu(MenuID); } ButtonDisplay(45,7,ENABLE_NOTACTIVE,“Cancel”);
return(0); void ButtonDisplay(int x1,int y1,char state gotoxy(x,y);
} char *caption) break;
else { case 1:
{ text_info tinfo; _setcursortype(_NOCURSOR);
if(prevMenu!=NONE) gettextinfo(&tinfo); ButtonDisplay(25,7,ENABLE_ACTIVE,“ Ok ”);
{ int i; break;
RemoveMenu(MenuID); if(state==ENABLE_NOTACTIVE) textcolor case 2:
return(ShowMenu(prevMenu)); (YELLOW); ButtonDisplay(45,7,ENABLE_ACTIVE,“Cancel”);
} if(state==ENABLE_ACTIVE) textcolor(WHITE); ButtonDisplay(25,7,ENABLE_NOTACTIVE,“
} if(state==DISABLE) textcolor(LIGHTGRAY); Ok ”);
break; textbackground(CYAN); break;
case RIGHT_ARROW: gotoxy(x1,y1);cprintf(“ %s ”,caption); }
if(subMenu[CurSelect]!=NONE) textbackground(LIGHTGRAY);textcolor(YELLOW); ch=getch();
{ cprintf(“%c”,220); if(ch==0) ch=getch()+300;
RetVal=ShowMenu(subMenu[CurSelect]); gotoxy(x1+1,y1+1);for(i=0;i<8;i++)cprintf(“%c”,223); ch+=300;
if(RetVal!=0) textattr(tinfo.attribute); switch(ch)
{ } {
RemoveMenu(MenuID); void ButtonPushed(int x1,int y1,char *caption) case TAB:
return(RetVal); { Control=(++Control)%3;
} text_info tinfo; break;
} gettextinfo(&tinfo); case ESCAPE:
else int i; _setcursortype(_NOCURSOR);
{ textbackground(LIGHTGRAY);textcolor(WHITE); ButtonPushed(45,7,“Cancel”);
if(nextMenu!=NONE) gotoxy(x1,y1);cprintf(“ ”); ch=1; Control=2;
{ gotoxy(x1,y1+1);cprintf(“ ”); break;
RemoveMenu(MenuID); textbackground(CYAN); case ENTER:
return(ShowMenu(nextMenu)); gotoxy(x1+1,y1);cprintf(“ %s ”,caption); _setcursortype(_NOCURSOR);
} delay(250); ButtonPushed(25,7,“ Ok “);
} gotoxy(x1,y1);cprintf(“ %s ”,caption); ch=1;Control=1;
break; textbackground(LIGHTGRAY);textcolor(YELLOW); break;
case DOWN_ARROW: cprintf(“%c”,220); case SPACE:
textbackground(LIGHTGRAY); gotoxy(x1,y1+1);cprintf(“ ”);for(i=0;i<8;i++) if(Control==2){_setcursortype(_NOCURSOR);
if(Enabled[CurSelect]) cprintf(“%c”,223); ButtonPushed(45,7,“Cancel”);ch=1;}
textcolor(BLACK); textattr(tinfo.attribute); if(Control==1){_setcursortype(_NOCURSOR);
else } ButtonPushed(25,7,“ Ok ”);ch=1;}
textcolor(BROWN); BOOL DisplayDialog(char mode) break;
gotoxy(StartX+1,StartY+CurSelect+1); { case BACK_SPACE:
cprintf(“ ”); int Control=0,ch; if(Control==0 && i>0)
for(j=0;j<longLength+1;j++) int x=29,y=5,i=0,N=0; {
if(j<strlen(String[CurSelect])) char TempStr[40];TempStr[0]=0; gotoxy(—x,y);
cprintf(“%c”,String[CurSelect][j]); switch(mode) cprintf(“ ”);
else { i—;
cprintf(“ ”); case FILE_OPEN: Window(10,3,70,9,“Open TempStr[i]=0;
CurSelect++; File”,LIGHTGRAY,YELLOW);break; gotoxy(29,5);
if(CurSelect==num_items) CurSelect=0; case FILE_SAVE: Window(10,3,70,9,“Save cprintf(“%s”,TempStr);
while(String[CurSelect][0]==’-’) File”,LIGHTGRAY,YELLOW);break; }
{ case PLAYBACK_RATE: Window(10,3,70,9,” break;
if(CurSelect==num_items) Playback Rate”,LIGHTGRAY,YELLOW);break; default:
CurSelect=0; } ch-=300;
else ButtonDisplay(25,7,ENABLE_NOTACTIVE,“ if(ch<300 && i<N)
CurSelect++; Ok ”); {
} ButtonDisplay(45,7,ENABLE_NOTACTIVE,“Cancel”); TempStr[i++]=(char)ch;
break; textbackground(LIGHTGRAY);textcolor(YELLOW); TempStr[i]=0;
case UP_ARROW: gotoxy(13,5); gotoxy(29,5);
textbackground(LIGHTGRAY); if(mode==FILE_OPEN || mode==FILE_SAVE) cprintf(“%s”,TempStr);
if(Enabled[CurSelect]) { x++;
textcolor(BLACK); cprintf(“Enter Filename: ”); }
else strcpy(TempStr,sFileName); break;
textcolor(BROWN); N=39; }
gotoxy(StartX+1,StartY+CurSelect+1); } if(ch==1) break;
cprintf(“ ”); else }
for(j=0;j<longLength+1;j++) { textbackground(BLUE);textcolor(WHITE);
if(j<strlen(String[CurSelect])) cprintf(“Playback Rate : ”); for(ch=3;ch<=9;ch++)
cprintf(“%c”,String[CurSelect][j]); strcpy(TempStr,sPlayBackRate); }
else N=5; gotoxy(10,ch);
cprintf(“ ”); } for(i=10;i<=70;i++)
CurSelect—; textbackground(BLUE);textcolor(WHITE); cprintf(“ ”);
if(CurSelect<0) CurSelect=num_items-1; cprintf(“ ”); }
while(String[CurSelect][0]==’-’) gotoxy(29,5);cprintf(“%s”,TempStr); if(Control==1)
{ i=strlen(TempStr); {
if(CurSelect<0) x+=i; if(mode==FILE_SAVE || mode==FILE_OPEN)
CurSelect=num_items-1; for(;;) strcpy(sFileName,TempStr);
else { if(mode==PLAYBACK_RATE)strcpy(sPlayBackRate,
CurSelect—; switch(Control) TempStr);
} { return(TRUE);
break; case 0: }
} _setcursortype(_NORMALCURSOR); return(FALSE);
} textbackground(BLUE);textcolor(WHITE); }
EDI
DC MOTOR CONTROL USING A SINGLE SWITCH S.C.
DWIV
V. DAVID When you momentarily press switch If you press S1 again, the high output
S1, timer 555 (IC1) provides a pulse to of IC2 shifts from Q3 to Q4. Since Q4 is
T
his simple circuit lets you run a DC decade counter CD4017 (IC2), which ad- connected to reset pin 15, it resets decade
motor in clockwise or anti-clockwise vances its output by one and its high state counter CD4017 and its Q0 output goes
direction and stop it using a single shifts from Q0 to Q1. When Q1 goes high, high, so the motor does not rotate. LED1
switch. It provides a constant voltage for the output of IC3 at pin 3 goes low, so the glows via diode D1 to indicate that the
proper operation of the motor. The glow- motor starts running in clockwise (forward) motor is in stop condition. Thereafter, the
ing of LED1 through LED3 indicates that direction. LED2 glows to indicate that the cycle repeats.
the motor is in stop, forward rotation and motor is running in forward direction. If you don’t want to operate the motor
reverse conditions, respectively. Now if you press S1 again, the high in reverse direction, remove timer IC4
Here, timer IC1 is wired as a output of IC2 shifts from Q1 to Q2. The along with resistors R5 and R7 and LED3.
monostable multivibrator to avoid false low Q1 output of IC2 makes pin 3 of IC3 And connect ‘b’ terminal of the motor to
triggering of the motor while pressing high and the motor doesn’t rotate. LED1 +Vcc.
switch S1. Its time period is approximately glows (via diode D2) to indicate that the Similarly, if you don’t want to run the
500 milliseconds (ms). motor is in stop condition. motor in forward direction, remove timer
Suppose, initially, the circuit is in Pressing switch S1 once again shifts IC3 along with resistors R4 and R6 and
reset condition with Q0 output of IC2 the high output of IC2 from Q2 to Q3. LED2. And connect ‘a’ terminal of the mo-
being high. Since Q1 and Q3 outputs of The high Q3 output of IC2 makes pin 3 of tor to +Vcc.
IC2 are low, the outputs of IC3 and IC4 IC4 low and the motor starts running in The circuit works off a 9V regulated
are high and the motor doesn’t rotate. anti-clockwise (reverse) direction. LED3 power supply for a 9V DC motor. Use a
LED1 glows to indicate that the motor is glows to indicate that the motor is run- 6V regulated power supply for a 6V DC
in stop condition. ning in reverse direction. motor.
DIGITAL AUDIO/VIDEO
INPUT SELECTOR
IVEDI
S.C. DW
T.K. HAREENDRAN
N
eed to connect more than one S1 once. To select the second AV sig- inputs are connected to the second AV
audio-video (AV) source to nal, press switch S1 twice. In the same signal (not shown in the figure). LED4
your colour television? Don’t way, you can select the other two sig- (not shown in figure) glows to indi-
worry, here’s an AV input expander nals. cate this.
for your TV. It is inexpensive and easy Momentarily pressing of switch S1 Similarly, pressing switch S1 thrice
to construct. once results in clocking of the decade makes the Q3 output of IC1 high. Con-
The working of the circuit is simple counter and relay driver transistor T1 sequently, 2C/O relay RL3 (not shown
in the figure) energises
and the television inputs
are connected to the
third AV signal source.
LED5 (not shown in the
figure) glows to indicate
this.
Again, pressing
switch S1 four times
makes the Q4 output of
IC1 high. Consequently,
2C/O relay RL4
energises and the TV in-
puts are connected to the
fourth AV signal source
(marked as Video-in 4
and Audio-in 4). LED6
glows to indicate this.
and straightforward. Whenever 12V conducts to energise relay RL1. Now Further pressing of switch S1 resets
DC is applied to the circuit, power-on normally opened (N/O) contacts of the decade counter and LED2 glows
LED1 glows. Now reset the decade two-changeover relay RL1 connect the again. Thereafter, the cycle repeats. The
counter by momentarily pressing television set’s inputs to the first AV circuit is wired for four-input selec-
switch S2 to make Q0 output of IC1 signal (marked as Video-In 1 and Au- tion, therefore the Q5 output of IC1 is
high. LED2 glows to indicate that the dio-in 1). LED3 glows to indicate this. connected to reset pin 15 of IC1.
circuit is ready to work. When you press switch S1 twice, Enclose the assembled PCB along
Switch S1 is used for selecting a the Q2 output of IC1 goes high. Con- with the relays in a cabinet with the
particular audio-video (AV) signal. To sequently, 2C/O relay RL2 (not shown input/output sockets and indicators
select the first AV signal, press switch in the circuit) energises and television mounted on the body of the cabinet. z
CMYK
DIGITAL DICE WITH NUMERIC
DISPLAY
T
he circuit described here is that binary output pins of the counter IC2 are TABLE I
of a digital dice with numeric dis- connected to corresponding input pins of Dice range Connect Connect
play. Timer IC 555 wired as an 4-bit binary adder IC3 (7483) which is pin 2 to pin 3 to
astable multivibrator produces pulses at wired to give binary output equal to bi- 1 to 2 pin 9 +5V
1 to 3 pin 9 pin 12
about 48 kHz rate. These pulses are fed nary input+1. Thus the output of the dice 1 to 4 pin 8 +5V
to pin 14 of the decade counter IC 7490. ranges from 1 to 6. For obtaining other 1 to 5 pin 8 pin 12
The oscillator is activated by depression dice ranges, reset pins 2 and 3 connections 1 to 6 pin 8 pin 9
of switch S1. may be made as per Table I. 1 to 8 pin 11 +5V
1 to 9 pin 11 pin 12
Using different connections tor pins 2, The binary summation outputs from
3 (reset to zero inputs Ro(1) and Ro(2)) and IC 7483 are connected to IC4 (7447) which of about 48,000 times per second. As soon
the binary output pins 12, 9, 8 and 11 of is a BCD to 7-segment decoder/driver. as the switch is released, the last (latest)
IC7490, various count ranges can be set. The output from IC4 is connected to a number remains on display. Thus the
For the given circuit the count range is set 7-segment common-anode LED display circuit performs the function of a random
as 0 to 5 by connecting QB and QC outputs (LTS542). number generator with the displayed
to Ro(1) and Ro(2) inputs, respectively. When switch S1 is depressed, the LED number lying within the selected (wired)
At the count of 6, QB and QC outputs (D1) glows and the number displayed at range.
of IC2 go high and counter is reset. The the 7-segment display changes at a rate
to set the DC voltages corresponding to The output of comparator A2 is low regulator arrangements for obtaining a
the 16 voltage levels over the 50-250V until the sensed voltage is greater than regulated supply for the functioning of the
range as marked on LED1 through the reference input applied at the non- circuit so that performance of the circuit
LED16, respectively, in the figure. The inverting pins of comparator A2 via buffer is not affected even when the mains volt-
LED bar graph is multiplexed from the A1. When the sensed voltage goes below age falls as low as 50V or goes as high as
bottom to the top with the help of ICs the reference voltage, the output of com- 280V. During Lab testing regulated 12-
CD4067B (16-channel multiplexer) and parator A2 goes high. The high output volt supply for circuit operation was used.)
C.H. VITHALANI push-on-switch S3. When S2 is momen- Thus, when switch S3 is pressed, reset
tarily pressed, the count value becomes pin 13 of IC2 is connected to ground
H
ere’s a digital stop watch built 0, transistor T1 conducts and it resets via transistor T1 and the oscillator does
around timer IC LM555 and 4-digit IC1. Counting starts when S2 is in ‘off’ not generate clock pulses. This is done
counter IC with multiplexed 7-seg- condition. to achieve synchronisation between IC1
ment output drivers (MM74C926). A low signal on the latch-enable input and IC2.
IC MM74C926 consists of a 4-digit pin 5 (LE) of IC2 latches the number in First, reset the circuit so that the dis-
counter, an internal output latch, npn the counter into the internal output latches. play shows ‘0000.’ Now open switch S2
output sourcing drivers for common- When switch S2 is pressed, pin 5 goes for the stop watch to start counting the
cathode, 7-segment display and an low and hence the count value gets stored time. If you want to stop the clock, close
internal multiplexing circuitry with four in the latch. Display-select pin 6 (DS) de- switch S2.
multiplexing outputs. The multiplexing cir- cides whether the number on the counter Rotary switch S1 is used to select the
cuit has its own free running oscillator, or the number stored in the latch is to be different time periods at the output of the
and requires no external clock. The displayed. If pin 6 is low the number in astable multivibrator (IC1). The circuit
counter advances on negative edge of the output latch is displayed, and if pin 6 works off a 5V power supply. It can be
the clock. The clock is generated by timer is high the number in the counter is dis- easily assembled on a general-purpose
IC LM555 (IC1) and applied to pin 12 played. PCB. Enclose the circuit in a metal box
of IC2. When switch S2 is pressed, the with provisions for four 7-segment dis-
A high signal on reset pin 13 of base of pnp transistor T2 is connected to plays, rotary switch S1, start/stop switch
IC2 resets the counter to zero. Reset pin ground and it starts conducting. The emit- S2 and reset switch S3 in the front panel
13 is connected to +5V through reset ter of T2 is connected to DS pin of IC2. of the box.
T
his instrument displays the speed the IR LED, a phototransistor is and thus output of LM324 becomes logic
of the vehicle in kmph. An mounted. IC LM324 is wired as a ‘high’. So rotation of the speedometer
opaque disc is mounted on the comparator. cable results in a pulse (square wave) at
spindle attached to the front wheel of When a hole appears between the the output of LM324. The frequency of
the vehicle. The disc has ten equidistant IR LED and phototransistor, the this waveform is proportional to the
holes on its periphery. On one side of phototransistor conducts. Hence the volt- speed.
the disc an infrared LED is fixed and on age at collector of the phototransistor Let ‘N’ be the number of pulses in
the opposite side of the disc, in line with and inverting input of LM324 go ‘low’, time ‘t’ seconds and numerically equal
to the number of kilometres per hour
(kmph). For a vehicle such as LML
Vespa, with a wheel circumference of
1.38 metres, and number of pulses equal
to 10 per revolution, we get the
relationship:
N pulses
= N kmph
t
Nx1000
= metres per second
3600x1.38
Nx1000x10
= pulses per second
3600x1.38
counting begins afresh at t=0.53 sec. up The calculations shown above are for multiturn pots and low temperature co-
to the time t=0.52+0.2068 sec. However LML Vespa and Kinetic Honda. The cal- efficient components should be used in
the ‘D’ flip-flops are not enabled and the culations for using this speedometer for the timer ICs.
H
ere is a novel idea
for using the printer
port of a PC, for con-
trol application using soft-
ware and some interface
hardware. The interface cir-
cuit along with the given
software can be used with
the printer port of any PC for
controlling up to eight equip-
ment. for only one device, being controlled by
The interface circuit D0 bit at pin 2 of the 25-pin parallel port.
shown in the figure is drawn Identical circuits for the remaining data
T
his jam circuit can be used in through R8. All eight outputs of IC1 presses his switch first, jams the dis-
quiz contests wherein any par- are connected to inputs of priority en- play to show only his number. In the
ticipant who presses his button coder 74LS147 (IC2) as well as 8-input unlikely event of simultaneous press-
(switch) before the other contestants, NAND gate 74LS30 (IC3). The output ing (within few nano-seconds difference)
gets the first chance to answer a ques- of IC3 thus becomes logic 0 which, after of more than one switch, the higher
tion. The circuit given here permits up inversion by NAND gate N2, is applied priority number (switch no.) will be
to eight contestants with each one al- to latch-enable pin 11 of IC1. With all displayed. Simultaneously, the logic 0
lotted a distinct number (1 to 8). The input pins of IC2 being logic 1, its BCD output of gate N1 drives the buzzer via
display will show the number of the con- output is 0000, which is applied to 7- pnp transistor BC158 (T1). The buzzer
testant pressing his button before the segment decoder/driver 74LS47 (IC6) af- as well the display can be reset (to
others. Simultaneously, a buzzer will ter inversion by hex inverter gates in- show 0) by momentary pressing of re-
also sound. Both, the display as well as side 74LS04 (IC5). Thus, on reset the set switch S9 so that next round may
the buzzer have to be reset manually display shows 0. start.
using a common reset switch. When any one of the push-to-on Lab Note: The original circuit sent
Initially, when reset switch S9 is mo- switches—S1 through S8—is pressed, by the author has been modified as it
mentarily pressed and released, all out- the corresponding output line of IC1 is did not jam the display, and a higher
puts of 74LS373 (IC1) transparent latch latched at logic 0 level and the display number switch (higher priority), even
go ‘high’ since all the input data lines indicates the number associated with when pressed later, was able to change
are returned to Vcc via resistors R1 the specific switch. At the same time, the displayed number.
T.A. BABU preset VR1 such that T1 conducts when While making over-/under-voltage set-
voltages goes beyond upper limit (say, ting, disconnect C2 temporarily. Capacitor
T
his motor starter protects single- 260V). When T1 conducts, it switches off C2 prevents relay chattering due to rapid
phase motors against voltage fluc- T2. Transistor T2 works as the under-volt- voltage fluctuations.
tuations and overloading. Its salient age protector. The under-voltage setting is Regulator IC 7809 gives the 9V regu-
feature is a soft on/off electronic switch done with the help of preset VR2 such that lated supply to soft switch as well as the
for easy operation. T2 stops conducting when voltage is below relay after filtering by capacitor C4. A suit-
The transformer steps down the AC lower limit (say, 180V). Zener diodes ZD1 able miniature circuit breaker is used for
voltage from 230V to 15V. Diodes D1 and and ZD2 provide base bias to transistors T1 automatic over-current protection. Green
D2 rectify the AC voltage to DC. The un- and T2, respectively. Transistors T3 and T4 LED (LED1) indicates that the motor is
regulated power supply is given to the pro- are connected back to back to form an SCR ‘on’ and red LED (LED2) indicates that
tection circuit. configuration, which behaves as an ‘on’/ the power is ‘on’. The motor is connected
In the protection circuit, transistor T1 is ‘off’ control. Switch S1 is used to turn on to the normally-open contact of the relay.
used to protect the motor from over-volt- the pump, while switch S2 is used to turn When the relay energises, the motor turns
age. The over-voltage setting is done using off the pump. on.
K. BHARATHAN output of
t h e
T
his reliable and easy-to-operate elec- Darlington
tronic security system can be used pair drives
in banks, factories, commercial es- the loud-
tablishments, houses, etc. speaker
The system comprises a monitoring sys- whose out-
tem and several sensing zones. Each sens- put volume
ing zone is provided with a closed-loop can be con-
switch known as sense switch. Sense trolled by
switches are fixed on the doors of premises potentiom-
under security and connected to the moni- eter VR1.
toring system. As long as the doors are Capacitor
closed, sense switches are also closed. The C1 serves
monitoring system can be installed at a as a filter
convenient central place for easy operation. capacitor.
Fig. 1 shows the monitoring circuit Y o u
only for zone 1 along with the common can alter
alarm circuit. For other zones, the the alarm
monitoring circuit is identical, with only sound as
the prefixes of components changing desired by
as per zone number. Encircled points A, changing
B, and C of each zone monitoring circuit the con-
need to be joined to the corresponding nections of
points of the alarm circuit (upper half IC1 as
of Fig. 1). shown in
When zone 1 sensing switch S11, zone the table.
on/off slide switch S12, and system on/off T h e
switch S1 are all on, pnp transistor T12 circuit con-
reverse biases to go in cut-off condition, tinues to
with its collector at around 0 volt. When sound the
the door fitted with sensor switch S11 is alarm until
opened, transistor T12 gets forward biased zone door Fig. 1: Monitoring circuit along with the alarm circuit
and it conducts. Its collector voltage goes
high, which forward biases transistor T10
via resistor R10 to turn it on. (Capacitor
C10 serves as a filter capacitor.) As a re-
sult, the collector voltage of transistor T10
falls to forward bias transistor T11, which
conducts and its collector voltage is sus-
tained at a high level. Under this latched
condition, sensor switch S11 and the state
of transistor T12 have no effect. In this
state, red LED11 of the zone remains lit.
Simultaneously, the high-level voltage
from the collector of transistor T11 via di-
ode D10 is applied to VDD pin 5 of siren
sound generator IC1 (UM3561) whose pin
2 is grounded. Resistor R3 connected across
pins 7 and 8 of IC1 determines the fre-
Fig. 2: Physical layout of sensors and monitoring/alarm system
quency of the in-built oscillator. As a re-
sult, IC1 starts generating the audio signal is closed (to close switch S11) and the The system operates off a 3V DC bat-
output at pin 3. The output voltage from reset switch is pressed momentarily (which tery or recharging battery with charging
IC1 is further amplified by Darlington pair causes transistor T10 to cut off, returning circuit or battery eliminator. If desired,
of transistors T1 and T2. The amplified the circuit to its initial state). more operating zones can be added.
Alarm sound Circuit connections for respective ing to the zone glows to indicate that the
zones in closed door of the zone is open. The alarm and
IC pin 1 connected to IC pin 6 connected to position. Also the LED indication will continue even af-
Police siren NC NC keep zone slide ter that particular door with the sensing
Ambulance siren NC VDD switches S12, S22, switch is immediately closed, or even if
Fire engine Sound NC VSS S32, S42, etc in that switch is removed/damaged or con-
Machinegun sound VSS NC ‘on’ position. This necting wire is cut open.
puts the system in Any particular zone in the monitoring
Note. NC indicates no connection
operation, guard- system can be put to operation or out of
ing all the zone operation by switching on or switching off
Initially keep the monitoring system doors. the corresponding slide switch in the moni-
switch S1 off. Keep all the zone doors fixed Now, if the door of a particular zone toring system.
with sensing switches S11, S21, S31, S41, is opened, the monitoring system sounds The circuit for monitoring four zones
etc closed. This keeps the sensing switches an audible alarm and the LED correspond- costs around Rs 400.
H
ere’s an electronic watchdog for a receiver unit, which
your house that sounds to inform are mounted face to
you that somebody is at the gate. face on the opposite
transmitter is derived from the receiver and trigger pin 2 of IC2 remains high. Fig. 4 shows mounting arrangement
circuit by connecting its points A and B When anyone interrupts the IR beam for both the transmitter and receiver units
to the respective points of the receiver falling on the sensor, its output goes high on the gate pillars. To achieve a high di-
circuit. The receiver is powered by regu- to drive transistor T1 into conduction and rectivity of the IR beam towards the sen-
lated 6V DC. For the purpose, you can pin 2 of IC2 goes low momentarily. As a sor, use a reflector behind the IR LED.
use a 6V battery. result, IC2 gets triggered and its pin 3 After both the units have been built,
The transmitter and receiver units are goes high to supply 3.3V to melody gen- connect 6V power supply to the receiver
aligned such that the IR beam falls di- erator IC3 at its pin 2, which produces a circuit. You should hear a continuous
rectly on the IR sensor. As long as IR sweet melody through the speaker fitted melody from the speaker. Now connect
beam falls on the sensor, its output re- inside the house. Output pin 3 of IC2 6V power to the transmitter also and
mains low, transistor T1 does not conduct remains high for around 30 seconds. orient IR LED1 towards IR receiver. The
melody should stop after about 30 sec- door, the IR beam is interrupted and the Using preset VR1, you can set the volume
onds. Now the transmitter and the re- alarm sounds for 30 seconds. The alarm of the loudspeaker.
ceiver units are ready for use. keeps sounding as long as one stands This circuit can also be used as a door-
When somebody enters through the between the transmitter and receiver units. bell or burglar alarm.
A
friend of mine plays guitar with into two sections: power supply and
several guitar effect pedals. He signal handling. The power supply regulators. This supply is more than
had a problem with battery section is built around transformer X1, enough for the five effect pedals.
eliminators and cables of the pedals regulators 7805 and 7905, bridge recti- The greater the voltage drop across
cluttering the stage and so he asked fier comprising diodes D1 through D4, the regulator, the lower the output
for help. The solution is simple as de- and a few discrete components. The current potential. Resistors R1 and
scribed here. signal-handling circuit is built around R2 provide a constant load to ensure
A small box is fitted to the rear of two OP27 op-amps (IC3 and IC4). that the regulators keep regulating.
the amplifier providing a 9V output for The power supply of about 9V Capacitors C3 through C8 ensure that
the effect pedal. The amplifier section for the effect pedals is derived from the supplies are as clean as possible. It
gets 9V through step-down transformer X1. MOV1 is a is very important to use proper heat-
a pedal switch metal-oxide varistor that absorbs any sinks for IC1 and IC2. Otherwise, these
(refer Fig. 1). large spike in mains power. could heat up.
This power out- IC 7905 (IC1) is a -5V low-power Working of the circuit is simple.
put and guitar regulator. By using a 3.9V zener diode The input signal stage uses a basic
signal input (ZD1) at its ground terminal, you get differentiation amplifier to accept the
lines are com- -8.9V output. The same technique is incoming signal and a voltage fol-
bined into a also applied to IC 7805 (IC2)—a +5V lower to buffer the output to the power
Fig. 1: A typical guitar
single unit with regulator to get 8.9V. Use good-qual- amplifier. The differential amplifier is
pedal switch multi-way cable ity components and heat-sinks for the built around IC3. It works by effective-
ly looking at the signals
presented to its inputs.
If the input signals are of
different amplitudes, IC3
amplifies the difference
by a factor determined
by R4/R3 (where R4=R6
and R3=R5). If the input
signals have same ampli-
tudes, these are attenuat-
ed by the common-mode
rejection ratio (CMRR) of
the circuit. The value of
CMRR is determined by
the choice of the op-amp
the auxiliary components
used and circuit topolo-
gy. You can use standard
resistors. With the values
shown, you get an overall
gain of unity.
The combination
of resistor R7 and C13
serves as a passive low-
pass filter, progressively
attenuating unwanted
high-frequency signals.
Fig. 2: Pedal power circuit The second op-amp (IC4)
1 0 8 • D e c e m b e r 2 0 1 0 • e l e c t ro n i c s f o r yo u w w w. e f y m ag . co m
circuit
ideas
forms a simple voltage follower (its amplifier. The unit must be compact, First, mains power is tapped from the
output follows its input), providing a yet robust. So use a very sturdy alu- transformer. The second lead carries
low output impedance to drive into the minium extrusion for the cabinet in or- the 9V output to the amplifier. The
standard power amplifier. der to neatly house the assembled PCB. third is the guitar signal input at the
Assemble the circuit on a general- To ensure simple operation, there five-way socket for connection to the
purpose PCB and fit it to the rear of an are only three connections to the unit. effect pedal.
w w w. e f y m ag . co m e l e c t ro n i c s f o r yo u • D e c e m b e r 2 0 1 0 • 1 0 9
Handy Zener Diode Tester
H
ere is a handy zener diode four 1.5V batteries and the remaining one- quired AC voltage across transformer’s
tester which tests zener diodes third is sufficient for accommodating this 230V AC terminals. This AC voltage is
with breakdown voltages extend- circuit. In this circuit a commonly available converted to DC by diode D1 and filter
ing up to 120 volts. The main advantage transformer with 230V AC primary to 9-0- capacitor C2 and is used to test the zener
of this circuit is that it works with a volt- 9V, 500mA secondary is used in reverse to diodes. R3 is used as a series current
age as low as 6V DC and consumes less achieve higher AC voltage across 230V AC limiting resistor.
than 8 mA current. terminals. After assembling the circuit, check DC
The circuit can be fitted in a 9V battery Transistor T1 (BC547) is configured voltage across points A and B without con-
box. Two-third of the box may be used for as an oscillator and driver to obtain re- necting any zener diode. Now switch S1
on. The DC voltage across A-B should vary
from 10V to 120V by adjusting potmeter
VR1 (10k). If every thing is all right, the
circuit is ready for use.
For testing a zener diode of un-
known value, connect it across points A
and B with cathode towards A. Adjust
potmeter VR1 so as to obtain the maxi-
mum DC voltage across A and B. Note
down this zener value corresponding
to DC voltage reading on the digital
multimeter.
When testing zener diode of value less
than 3.3V, the meter shows less voltage
instead of the actual zener value. However,
correct reading is obtained for zener diodes
of value above 5.8V with a tolerance of ±10
per cent. In case zener diode shorts, the
multimeter shows 0 volts.
T
his versatile hit switch is the elec- rectifier comprising diodes D1 through D4 sistor R1 and the circuit changes its state.
tronic equivalent of a conventional acts as a voltage-control switch. The in- This latch continues until the bistable
switch. It can be used to control verter gates of IC CD4069 (IC1) together switch gets the next triggering input.
the switching of a variety of electronic with associated components form a Every time the hit plate receives a hit,
devices. bistable switch. the voltage-control switch triggers the
The circuit of the hit switch uses a IC CD4069 is a CMOS hex inverter. bistable circuit. That means every subse-
piezoelectric diaphragm (piezobuzzer) as Out of the six available inverter gates, only quent hit at the sensor will toggle the state
the hit sensor. A piezoelectric material de- three are used here. IC1 operates at any of the switch. The red LED (LED1) con-
velops electric polarisation when strained voltage between 3V and 15V and offers a nected at the output of gate N3 indicates
‘on’/‘off’ position of
the switch. Relay
RL1 is activated by
the hit switch to con-
trol the connected
load.
The circuit works
off 12V DC. It can be
constructed on any
general-purpose PCB.
For the desired re-
sults, proper connec-
tions and installation
of the hit sensor are
necessary. Remove
the cover of the
by an applied stress. The hit sensor makes high immunity against noise. The recom- piezobuzzer and connect its two leads to
use of this property. mended operating temperature range for the circuit. Mount the plate such that it
When you hit or knock the piezo ele- this IC is –55°C to 125°C. This device is receives the hit properly. The piezoelectric
ment (hit plate) with your fingertip, a small intended for all general-purpose inverter material on the plate can easily get dam-
voltage developed by the piezo element is applications. aged, so hit the switch gently.
H
ere is a low-cost, invisible laser M1 through M6 is used to direct the step-down transformers (X1 and X2), two
circuit to protect your house laser beam around the house to form a 6V relays (RL1 and RL2), an LDR, a
from thieves or trespassers. A net. The laser beam is directed to fi- transistor, and a few other passive com-
laser pointer torch, which is easily avail- nally fall on an LDR that forms part of ponents. When switches S1 and S2 are
able in the market, can be used to oper- the receiver unit as shown in Fig. 2. activated, transformer X1, followed by a
ate this device. Any interruption of the beam by a thief/ full-wave rectifier and smoothing capaci-
The block diagram of the unit shown trespasser will result into energisation tor C1, drives relay RL1 through the
in Fig. 1 depicts the overall arrange- of the alarm. The 3V power-supply cir- laser switch.
ment for providing security to a house. cuit is a conventional full-wave recti- The laser beam should be aimed con-
A laser torch powered by 3V power- fier-filter circuit. Any alarm unit that tinuously on LDR. As long as the laser
supply is used for generating a laser operates on 230V AC can be connected beam falls on LDR, transistor T1 re-
beam. A combination of plain mirrors at the output. mains forward biased and relay RL1 is
The receiver thus in de-energised condition. When a
unit comprises person crosses the line of laser beam,
two identical relay RL1 turns on and transformer X2
T
his circuit can be used to de- trains into noticeable au-
tect the presence of modulated ral notes.
infrared signals in its vicinity S1 is used to switch
from any electronic source, for in- on/off mains power and
stance, an IR handheld remote control- LED1 indicates power-
ler. It can also be used for testing IR ‘on.’ Resistor R4 and
burglar alarm systems. zener diode ZD2 form
Fig. 1 shows the circuit of the in- a low-current voltage Fig. 2: Pin configurations of LM386, BC547/337 and UM66
frared bug. Besides the power supply stabiliser for providing
(one 9V PP3/6F22 compact battery steady 5.1V DC to the small signal- T2. The amplified signal is fed to the
pack), it consists of an infrared preamplifier circuit. IR LED1 is the melody generator via resistor R5. The
signal detector-cum-preamplifier main sensing element. output of the melody generator is fed
followed by a melody generator The IR signal detected by IR LED1 to LM386 low-power audio amplifier
and a tiny audio amplifier. The cir- is amplified by npn transistors T1 and (IC2) via variable resistor VR1, which
works as the volume control.
The loudspeaker sounds to in-
dicate the presence of IR signal
near the circuit.
IC LM386 is wired as a
minimum-parts amplifier with
a voltage gain of ‘20,’ which is
sufficient for this application.
Capacitor C3 is used for
decoupling of the positive rail
and the R-C combination net-
work comprising C4 and R7
bypasses high frequency to
ground.
The circuit can be easily
wired on a small veroboard or
any general-purpose PCB. Pin
configurations of IC LM386,
transistor BC547 and melody
generator UM66 are shown in
Fig. 2. A miniature metallic
cabinet may be used for enclos-
Fig. 1: Infrared bug ing the gadget. z
CMYK
CIRCUIT IDEAS
K.S. SANKAR The receiver section comprises an in- Both the transmitter and the receiver
frared receiver module, a 555 monostable parts can be mounted on a single bread-
T
his proximity detector using an multivibrator, and an LED indicator. Upon board or PCB. The infrared receiver must
infrared detector (Fig. 1) can be reception of infrared signals, 555 timer be placed behind the infrared LED to avoid
used in various equipment like au- (mono) turns on and remains on as long false indication due to infrared leakage.
tomatic door openers and burglar alarms. as infrared signals are received. When the An object moving nearby actually
The circuit primarily consists of an infra- signals are interrupted, the mono goes off reflects the infrared rays emitted by the
red transmitter and an infrared receiver. after a few seconds (period=1.1 R7xC6) infrared LED. The infrared receiver has
The transmitter section consists of a depending upon the value of R7-C6 com- sensitivity angle (lobe) of 0-60 degrees,
555 timer IC functioning in astable mode. bination. Thus if R7=470 kilo-ohms and hence when the reflected IR ray is
It is wired as shown in the figure. The C6=4.7µF, the mono period will be around sensed, the mono in the receiver part is
output from astable is fed to an infrared 2.5 seconds. triggered. The output from the mono may
LED via resistor R4, which limits its oper- be used in any desired fashion. For ex-
ating current. This circuit provides a fre- ample, it can be used to turn on a
quency output of 38 kHz at 50 per cent light when a person comes nearby by
duty cycle, which is required for the infra- energising a relay. The light would auto-
red detector/receiver module. Siemens matically turn off after some time as the
SFH5110-38 is a much better choice than person moves away and the mono pulse
SFH506-38. Siemens SFH5110-38 is turned period is over.
on by a continuous frequency of 38 kHz The sensitivity of the detector depends
with 50 per cent duty cycle, whereas Fig. 2: Proposed arrangement for on current-limiting resistor R4 in series
SFH506 requires a burst frequency of 38k separation of IR LED and receiver module with the infrared LED. Range is approxi-
to sense. Hence, SFH5110-38 is used. in the proximity detector mately 40 cm. For 20-ohm value of R4 the
object at 25 cm can
be sensed, while for
30-ohm value of R4
the sensing range re-
duces by 22.5 cm.
(Note. The au-
thor procured the
samples of Siemens
products from
Arihant Electricals,
New Delhi, the dis-
tributor of Siemens
in India.)
This circuit costs
Fig. 1: IR proximity detector around Rs 125.
T
his infrared remote control timer can of potmeter VR3.
be used to turn an appliance on/off When switch S1 of
for a period of 0.11 second to 110.0 the transmitter is
seconds. pressed, the modu-
The circuit comprises two sections, lated IR rays are gen-
namely, the transmitter section and the erated, which are re-
receiver section. ceived by photodiodes
Fig. 1 shows the IR transmitter sec- in the receiver section
tion. The astable multivibrator NE555 (IC1) and amplified by the
is used to generate a 10kHz modulated IR amplifier circuit. The
signal. The output of IC1 is connected to output of op-amp goes
the base of pnp transistor T1 via resistor low to trigger the
R2. Two infrared LEDs (IR1 and IR2) are monostable. Then high
connected in series between the collector output at pin 3 of IC3
(via resistor R3) and ground. activates the two-
When switch S1 is pressed, the IR LEDs changeover relay RL
transmit the modulated IR signal of 10-11 via transistor T3
kHz. This frequency can be changed with (BC548) for a preset
the help of VR1 potmeter. time.
In the receiver section shown in Fig. The on/off time
2, two photodiodes (IR3 and IR4) receive can be set in the timer
the IR signal transmitted by the IR trans- with the help of VR3
mitter. Transistors T2 and T3 amplify the and C10. Switch S2 is
weak signal. The amplified signal is fil- used to reset the
tered by capacitors C6 and C7. The ampli- monostable. If you
fied and filtered signal is now fed to the want to turn the appli-
inverting input pin 2 of op-amp IC2 (IC ance on for a preset
741). The output of IC2 is further con- time, connect the ap-
nected to trigger pin 2 of timer NE555 (IC3) pliance via relay RL(a).
that is used as a monostable multivibrator On the other hand, if
you want to
turn the appli-
ance off for a
preset time,
connect the ap-
pliance via re-
lay RL(b). The
timer can be re-
set by pressing
reset switch S2.
The circuit
works up to 3
metres without
using any fo-
cusing lens.
However, you
can increase
the operating
range by using
focusing lens.
This circuit
costs around
Fig. 1: IR transmitter section Rs 100.