Beruflich Dokumente
Kultur Dokumente
Vol. 23
© EFY Enterprises Pvt Ltd. 2000
First Published in this Edition, April 2007
ISBN 81-88152-18-8
We are also including a CD with this volume, which not only con-
tains the datasheets of major components used in construction proj-
ects but also the software source code and related files pertaining to
various projects. This will enable a reader to copy these files
directly to his PC and compile/run the program as necessary, with-
out having to prepare them again using the keyboard. In addition,
the CD carries useful software, tutorials and other goodies (refer
‘contents’ in CD).
N
owadays various types of light can be used to generate a number of light binary counter CD4040 (IC2) that gener-
ing effect generators are avail effects with different speeds as well as ates/supplies sequential addresses for the
able in the market, but these colours under software control. EPROMs. The output of IC2 increments
produce only two or three effects. In or- The circuit is built around two by one at every clock pulse.
der to achieve a large number of effects, EPROMs (IC3 and IC4) that hold the In order to get 16-bit data outputs
you need to use a microprocessor-based programs for creating different light with 4kB addresses/locations, the address
circuit, which is quite complex and costly. effects. NAND gates N1 and N2 of IC1 lines of both EPROMs are connected in
The EPROM-based circuit presented here (CD4093) produce clock pulses for 12-bit parallel. Fourteen (out of sixteen) data
Table II as binary ‘0’. Then change these binary and BD0 through BD7 are the outputs of
Addr. Data Data digits into hexadecimal numbers. At the EPROM-B. BD6 and BD7 outputs control
(hex) EPROM-A EPROM-B time of programming, keep the address the colour effect. LEDs give either of the
(hex) (hex) lines of both the EPROMs identical. two colours depending on the low BD6 or
000 80 01 Table I shows a program example low BD7 output. If both BD6 and BD7 out-
001 40 01 for the running light effect. Here AD0 puts are low, LEDs gives a combinational
002 20 01 through AD7 are the outputs of EPROM-A effect of both colours. If both BD6 and
003 10 01
004 08 01
005 04 01 Table III
006 02 01 AD0 AD1 AD2 AD3 AD4 AD5 AD6 AD7 BD0 BD1 BD2 BD3 BD4 BD5 BD6 BD7
007 01 01
0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
008 00 81
009 00 41 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
00A 00 21 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
00B 00 11 1 0 1 0 1 0 1 0 1 0 1 0 1 0 0 1
00C 00 09 1 0 1 0 1 0 1 0 1 0 1 0 1 0 0 1
00D 00 05 1 0 1 0 1 0 1 0 1 0 1 0 1 0 0 1
T
his cost-effective programmable set, the whole operation repeats.
Parts List
timer is useful for both industrial In this circuit, no costly magnitude
Semiconductors:
and domestic applications where comparator ICs and/or multiplexers have
precise timing control is required. It is been used. You may also add a display IC1, IC2 - CD4511 7-segment decoder/
latch/driver
designed to provide individually program- unit to show the elapsed time in the cur- IC3, IC4 - CD4518 dual snyhronous
mable ‘on’ and ‘off’ timings of 0-99 seconds rent cycle. up-counter
or 0-99 minutes. The timer can be started IC5 - NE555 timer
IC6 - CD4053 tripple 2-channel
from ‘on’ cycle or from ‘off’ cycle, and also
programmed for single delay or repeat The circuit IC7
analogue multiplexer
- CD4011 quad 2-input
cycle operations. The clock circuit comprises timer NE555 NAND gate
(IC5) wired in astable multivibrator mode. T1-T3 - BC547 npn transistor
T4 - BC557 pnp transistor
Preset VR1 is adjusted to about 1.5 kilo-
Block diagram ohm to get a clock frequency of 1 Hz by
D1-D20
LED1
- 1N4007 rectifier diode
- Red LED
The clock and divider circuits provide ac- using 1% tolerance carbon film resistors DIS1, DIS2 - LT543 common-cathode
curate 1Hz clock (one pulse per second) and tantalum capacitor. (An accuracy 7-segment display
and 0.1Hz outputs (one pulse per minute) of about 1 per cent was achieved in the Resistors (all ¼-watt, ±1% MFR, unless
stated otherwise):
to choose the desired time delays in sec- prototype.) R1-R14 - 470-ohm
onds and minutes, respectively. The de- This 1Hz clock is connected to range R15-R23 - 10-kilo-ohm
sired on-time and off-time delay intervals switch S2 (point S) for choosing the time R24-R27 - 4.7-kilo-ohm
are set with the help of two separate sets delay in seconds and also to the divide- R28, R29 - 47-kilo-ohm
R30 - 100-kilo-ohm
of two thumbwheel switches. by-60 unit formed by dual decade counter VR1 - 10-kilo-ohm potmeter
One of the two set delay intervals, CD4518 (IC4). The output from IC4, which Capacitors:
depending on the start mode (initially on/ gives one pulse per minute, is connected C1 - 10µF, 25V tantalum
off), is selected and compared with the to point ‘M’ of switch S2 for choosing the C2-C4 - 0.01µF ceramic disk
counter output. When the set value and time delay in minutes. LED1 in the front Miscellaneous:
the counter output match, an output is panel blinks to provide a visual indication TWS1-TWS4 - Thumbwheel switch
S1 - DPDT switch
produced, which is used to momentarily of the progress of the time toward the set S2-S5 - SPDT switch
reset the counters. The other set of thum- value. S6, S7 - Push-to-on switch
bwheel switches is activated through the Preset VR1 (10 kilo-ohm) is used to RL1 - 12V, 200-ohm, 1 c/o reed
relay contacts. trim the output frequency of the timer to relay
RL2 - 12V, 200-ohm, 2 c/o relay
At the elapse of the set time, the exactly 1 Hz, while IC4 (CD4518) is used Pz - Piezobuzzer
control logic verifies the operation mode to divide the input 1Hz clock by 60 to L1, L2 - NE2 neon bulb (with built-
control to determine further operation. If provide an output of one pulse per minute in resistor)
‘single cycle’ mode has been set, the opera- using the reset signal generated by block- - Plug 3-pin
- Top 3-pin
tion stops. If ‘repeat cycle’ mode has been ing diodes D17 and D18 in conjunction
with transistor T4.
Only at the count of 60 (one-second
pulses), both pins 12 and 13 go high to cut
off transistor T4. As a result, the collector
of transistor T4 and reset pins 7 and 15 of
IC4 are pulled high via resistor R16 to re-
set the counter, which thus repeats count-
ing to provide sharp pulses at 60-second
(one-minute) intervals at point ‘M’ of
switch S2. These pulses per minute are
used as clock signal for the subsequent
counter stage formed by another dual
synchronous decimal up-counter CD4518
(IC3) that is used to count the incoming
Fig. 1: Block diagram of the programmable timer clock pulses from the clock stage.
An optional 7-segment display unit thumbwheel switch set matches the isolation of the high-power (mains voltage)
based on two CD4511 (IC1 and IC2) is con- counter output, a logic ‘high’ state is circuit and the logic control circuit. You
nected to this counter’s outputs to display established at the common terminal of may use a small on-board (PCB mount
the elapsed time during the current cycle. the switches. This high signal is used to type) relay (RL1) for logic control and a
Thumbwheel switch sets TWS1-TWS2 change the state of the output through heavy-duty relay (RL2) for load operation
and TWS3-TWS4 are used to set the time the RS flip-flop formed by CD4011 (IC7). control.
interval in the ‘normally on’ and ‘normally Simultaneously, relay RL1 is activated An optional buzzer circuit, as shown in
off’ modes, respectively, of relays RL1 and or deactivated, which results in the gen- Fig. 2, can be employed to raise an audible
RL2. eration and application of a short reset alarm whenever the load circuit is on. The
At any given instant, the common pulse to the counter and selection of the entire circuit can be operated from a 12V,
terminal of one of the two switch sets is other set of thumbwheel switches. The 1A DC adaptor.
connected to +12V supply through relay operation continues if the ‘repeat’ mode An actual-size, single-side PCB for the
RL2 contacts via a 10-kilo-ohm resistor, has been selected through switch S4 in circuit is shown in Fig. 3 and its compo-
depending on the operational mode. The position ‘A’. The ‘single cycle’ mode is se- nent layout in Fig. 4.
8, 4, 2, 1 outputs of these thumbwheel lected via switch S4 in position ‘B’.
switches are connected via diodes D1 Relays RL1 and RL2 are activated
through D8 and D9 through D16 to the by the flip-flop output simultaneously. Operation
binary outputs of IC3. These relays, with associated relay driver The unit has to be set in the following
When the set value of the active transistors, are used to provide complete sequence for use:
T
his 2-wire remote unit can con tinguish between long and short pulses. the rectified output developed from the
trol up to six appliances from one Long pulses are used to switch on the AC mains using step-down transformer
master unit. It is economically appliances, while short pulses are used X1, followed by a bridge rectifier and
built using commonly available discrete to switch off the same appliances. The smoothing capacitor C1. Timer IC1 is
ICs. master and slave units are connected us- wired as an astable multivibrator with
The appliances can be switched on ing the common negative line of the mas- a measured time-period of 850 ms (‘on’
or off selectively by using the corre- ter unit to the mains neutral line of the period of 100 ms and ‘off’ period of 750
sponding switches (S1 through S6) and slave unit, and pulsewidth-modulated ms), with component values as shown
then pressing ‘start’ button S7. Within output from the master unit to the signal in Fig. 1.
about five seconds, all the slave units input line of the slave unit. Waveform 1 in Fig. 3 shows IC1’s
are switched on/off as per the selection output. Diode D5 is used to limit the
made at the master unit. ‘on’ period of IC1. Reset pin 4 of IC1 is
The switching on/off function is Description controlled by the latch circuit comprising
achieved by using pulsewidth modulation Master control unit (Fig. 1). This unit NAND gates N1 through N3. Since N3
at the master control unit and suitable comprises six ICs (including a 5V regu- output normally goes low on switching on
decoding logic at the slave unit to dis- lator). IC 7805 (IC6) is used to stabilise of the master control unit, IC1 is initially
inactive (inhibited). 6 of gate N3 is low. Thus green LED1 is age at its reset pins 2 and 3. IC1 is also
The latch output at pin 3 of gate N2 on, while red LED2 is off. Binary counter reset due to logic ‘0’ voltage at its reset
is initially high, while the output at pin 7493 (IC3) is reset due to logic ‘1’ volt- pin 4.
IC3 is a 4-stage binary coun-
ter with three flip-flops forming a
3-bit binary counter. The remain-
ing flip-flop can be used inde-
pendently, and it is triggered at
the trailing edge of the last count
of the 3-bit counter stage, which
makes pin 12 (Q0) go high for
a brief period. The counter flip-
flops in IC3 advance on negative-
going transitions of the clock. To
synchronise the circuit operation,
the clock input to IC3 is inverted
by NAND gate N4.
To activate oscillator IC1 and
counter IC3, momentarily press
‘start’ switch S7, which causes
the latch outputs to be reversed.
Green LED1 goes off, while red
LED2 goes on.
Q3 output of IC3 remains low
for the first four clocks. It goes
high at the fifth clock pulse and
low at the end of eighth clock
pulse, triggering the single flip-
flop in IC3. As a result, pin 12 of
IC3 goes high to reset the latch
to its initial state, inhibiting IC1
and IC3. It stays in this state
until ‘start’ switch S7 is again
pressed to repeat the cycle.
The binary outputs of IC3 are
connected to the address inputs
of 8-bit data selector/multiplexer
Fig. 3: Output waveforms corresponding to on/off positions of switches
A
utomobile stereos have become is stepped down/regulated by 5V regula- ics Projects Vol. 20) issue used Sony’s CX-
quite common nowadays. The au- tors (7805). A1019S FM front-end chip and TEA1330
tomobile stereo circuit described The preamplifier and FM radio stereo decoder. The circuit published in
here is free from the complexities of com- (Fig. 2). This contains the cassette deck’s Sept. ’95 issue of EFY uses TEA5591A
mercially available automobile stereos magnetic head, 2-channel preamplifier for FM front-end chip. The audio output
and uses easily available ICs and other car stereos (IC LA3161), power supply, available from the chip’s pin 11 can be fed
components. It comprises preamplifier and other discrete components as well as to the stereo decoder in a similar manner
and FM radio, audio power amplifier, and 3-pin connector con1 for connecting stereo to obtain stereo output.)
power supply sections. output from FM receiver. The FM receiv- Preamplifier LA3161 (IC3) is com-
The block diagram of the automobile er is wired around a single FM receiver monly available for automobile stereo ap-
stereo system is shown in Fig. 1. The front-end chip (Sony’s CXA1019S, Philips’ plication and provides excellent signal-to-
output from the stereo play head is ampli- TEA5591, etc) followed by an FM stereo noise ratio. Pin configuration and internal
fied by LA3161 preamplifier and brought decoder chip (TEA1330 or TA7343). You functional block diagram of LA3161 are
to 6-pin dual-in-line (DIL) switch, which may use any one of
selects between the deck or FM receiver the FM receiver cir- Table I
and connects the left and right outputs to cuits published earlier LA3161 Pin Configuration
power amplifier stages (one each for left in Jan. ’99 (or Elec- Pin No. Signal RACV
and right channels) built around LA4440 tronics Projects Vol.
1 Input from audio head for right channel 0.6
ICs in bridge configuration. 20) and Sept. ’95 (or 2 Negative feedback to right channel 0.6
The left- and right-channel outputs Electronics Projects 3 Output of right channel to audio amplifier 2.1
from the power amplifiers are connected Vol. 16) issues of EFY 4 Positive supply voltage 4.0
to woofer-tweeter combinations via or purchase a ready- 5 Ground 0.0
6 Output of left channel to audio amplifier 2.1
crossover networks. Power supply for the made FM plate from 7 Negative feedback to left channel 0.6
power amplifier is directly taken from the the market. (The FM 8 Input from audio head for left channel 0.6
automobile’s battery, while the battery receiver published in Note. RACV stands for the RMS voltages measured in AC range
supply for preamplifier and FM sections Jan. ’99 (or Electron-
T
his 12-hour digital clock with digital clock with hourly music and AM/ Hz) output at pin 1 of NAND gate N2.
hourly music and AM/PM display PM display. The heart of the circuit is a This pulse is applied to clock input pin 1
can be easily constructed using precision 1-minute master oscillator sec- of decade counter-cum-7-segment decoder/
readily available discrete chips. In some tion that is built around 14-stage counter/ driver CD4033 (IC1) and also the reset
of the circuits earlier published in EFY, divider/oscillator CD4060, 12-stage binary pins of CD4060 and CD4040 ICs.
12:00 hour was displayed as 00:00 hour. counter CD4040, and 4-input AND gate Two CD4033 ICs (IC1 and IC2) are
The presented circuit overcomes this 1/2 CD4082 (N2). cascaded to get unit’s and ten’s digits of
drawback. The clock accuracy is dependent on the minute display. After counting 59, the
1-minute master oscillator CD4060 that next leading edge of the clock pulse resets
divides the crystal frequency by 16,384 to IC2 (CD4033).
The circuit get 2Hz output, which is further divided The resetting of IC2 after the count
Fig. 1 shows the circuit diagram of the by 120 to get 1 pulse per minute (0.016 of 59 is achieved by using AND gates N4
Parts List
Semiconductors:
IC1, IC2 - CD4033 decade counter/
7-segment decoder
IC3 - CD4510 BCD up-/down-
counter
IC4 - CD4027 dual J-K flip-flop
IC5 - CD4543 BCD-to-7-segment
latch/decode/driver
IC6 - CD4040 12-bit binary coun-
ter
IC7 - CD4060 14-stage counter/
driver/oscillator
IC8 - NE555 timer
IC9 - CD4082 dual 4-input AND
gate
IC10 - CD4081 quad 2-input AND
gate
IC11 - UM66 melody generator
DIS1-DIS4 - LT543 common-cathode
Fig. 2: Actual-size, single-side PCB layout of the digital clock 7-segment display
T1, T2 - BC548 npn transistor
ZD1 - 3.3V, 0.5-watt zener
D1-D3 - 1N4001 rectifier diode
LED1 - Green LED
LED2-LED4 - Red LED
Resistors (all ¼-watt, ±5% carbon, unless
stated otherwise):
R1, R2 - 680-ohm
R3-R24 - 470-ohm
R25 - 10-kilo-ohm
R26, R28, R32 - 1-kilo-ohm
R27 - 680-kilo-ohm
R29 - 3.3-mega-ohm
R30 - 4.7-kilo-ohm
R31 - 220-ohm
Capacitors:
C1 - 470µF, 25V electrolytic
C2 - 10µF, 25V electrolytic
C3 - 0.01µF ceramic disk
Miscellaneous:
XTAL - 32.768kHz quartz crystal
S1, S2 - Push-to-on switch
LS1 - 4-ohm, 0.5W loudspeaker
Readers’ comments: causes of these problems and tell me how pulses when pressing switch S1 or S2.
Q1. I have assembled the PCB of the to rectify them. Is there any fault with the This problem can be eliminated by adding
project and found the following prob- circuit and its PCB? a 10-kilo-ohm resistor between pin 3 of
lems: Mukul Behari Roy IC7 and ground.
1. After ninth count, IC1/DIS-1 doesn’t Kolkata 3. In the prototype made by me,
go forward for the next digit, i.e. tenth The author, Sunil P.B., replies: transistor T1 didn’t heat up. The same
digit (9 – 0). A1. 1. If IC1 doesn’t count further, the is being used with a large display in my
2. Switches for the minute/hour set- only possible reason may be the faulty home as a wall clock. Check whether
ting are not working properly. The digits chip. After ninth count, IC1 gives a clock transistor T1 is short or open. Add a
jump at their own and cannot be stopped pulse to IC2 for counting the ten’s digit. 1000µF, 16V capacitor in parallel with
at the desired time. Check whether the IC and its connections 470µF capacitor and two 0.1µF capaci-
3. When the circuit is switched on, are correct. tors in parallel with 470µF capacitor.
transistor T1 slowly heats up and ulti- 2. Digits jump on pressing switch S1 Also check whether your power supply is
mately gets damaged. Please explain the or S2 due to the production of multiple generating pure DC.
M
ost EPROMs with a quartz crys- If the EPROM window is placed at electrons to jump the silicon dioxide bar-
tal/mica erase window can be about 2.5 cm from 253.7nm UV source, rier between the channel region and the
erased using an ultraviolet (UV) where the intensity is, say, 12 mW/cm2, floating gate.
light source. The UV lamp used for this the exposure time for erasure of the During programming, the select gate
purpose has a short wavelength of about EPROM will be between 10 and 40 (maxi- is given a positive bias, which helps at-
2537 Å (253.7 nm). mum) minutes. tract these electrons to the floating gate
An integrated dosage (incident UV Erasing an EPROM. When we erase electrode. Because the floating gate is
power intensity on the EPROM x expo- an EPROM, we make the data stored in surrounded by silicon dioxide, the in-
sure time) of 10 W-sec/cm2 is needed to it to be logic 1 (all bits). EPROMs use a jected charge is effectively trapped. The
erase most EPROMs. In practice, a much floating-gate technology, in which the specific memory cell with trapped charge
larger exposure time (up to four times the basic memory cell is a metal-oxide semi- causes the cell transistor to be biased ‘on’,
integrated dosage) is given to ensure that conductor (MOS) transistor having two whereas the cells without trapped charge
the EPROM behaves erased at extremes gate electrodes separated by a layer of are biased ‘off’. Blank EPROMs have
of temperature and voltages. silicon dioxide. The lower gate electrode, no trapped charge and each cell stores
Although an EPROM can be erased named floating gate, is surrounded by the logic 1.
using direct sunlight (having a low UV oxide layer. The electrons on the floating gate
content), however, it would require about A charge can be placed on the float- absorb photons from the ultraviolet light
a week’s exposure time, which is rather ing gate by applying the programming source and acquire enough energy to re-
long. To avoid unintentional erasure of voltage (Vpp) between the drain and the verse the programming process and return
programmed EPROMs in normal light, gate electrode. This causes a high electric to the substrate.
an opaque label is recommended to cover field to be developed in the channel region Warning! Shortwave ultraviolet
their quartz crystal/mica window. of the transistor, which, in turn causes light is very dangerous and can cause
Description
The EPROM erasure circuit mainly com-
prises the timer, ultraviolet tube, starter,
and choke.
Timer. The circuit shown in Fig. 1 ‘Eye’ brand ultraviolet germicidal lamps
uses an electronic timer. In place of the
electronic timer you may use a mechani- line. The 254nm wavelength is highly le- (Laxman Sylvania make) and a tubelight
cal timer with up to 1-hour (60-minute) thal to virus, bacteria, and mould pores. starter. Both these items are easily avail-
delay. On completion of the preset delay, Some UV tubes use tungsten coil fila- able from most electrical goods dealers.
the mechanical timer may sound an alarm ments, while some costlier tubes use large Electronic Timer. Fig. 1 shows a
and/or provide a visual indication. Thus cylindrical cold cathodes that instantly simple timer circuit built around 14-stage
if you intend to use a mechanical timer, start operating and are not affected by ripple counter/divider-cum-oscillator IC
ignore the entire circuit of the electronic frequent switching on/off, as is the case CD4060. It is operated on the same mains
timer—from step-down transformer X1 to with the tungsten filament tubes. supply (after it is stepped down by trans-
relay RL1, and: Table below shows some ultraviolet former X1) that is used for energisation of
(a) substitute the relay contact termi- lamps (Eye brand or equivalents) that the ultraviolet tube.
nals (N/O and P) with similar terminals can be used in this EPROM eraser. The The stepped-down AC voltage is recti-
on the mechanical timer; glass is clear, so the filament can be seen fied by bridge rectifier and its output is
(b) remove the wire link between directly. The length varies from 15 to 25 smoothed by capacitors C1 and C2 before
points A and B and insert microswitch cm, depending on the rating. regulation by 3-pin regulator 7812 (IC1).
(S4) normally open terminals across points Note. During testing in EFY lab, we The regulated 12V is used for the timer
A and B. used G6T5 UV tube that is available from circuit including the relay.
The mechanically operated micros- Peri Com Group, Bangalore. You may also Capacitor C4 and resistor R1 form
witch closes when the lid of the box/en- use Philips’ 6W TUV tube. the power-on-reset circuit for timer IC
closure containing the ultraviolet source Ballast and starter. The ultraviolet CD4060. The timer can also be manually
is fully shut. lamps mentioned in Table can be used reset using push switch S2.
Ultraviolet lamp. A good many in conjunction with a tubelight ballast/ Since very precise timing is not es-
firms manufacture UV lamps for use as choke with wattage matching that of the sential for the timer circuit in this ap-
germicidal lamps. Usually, these lamps UV tube. One can, however, use a read- plication, the oscillator circuit is realised
are shortwave low-pressure mercury va- ily available tubelight choke of higher using resistors R2 and R3, preset VR1,
pour tubes that emit ultraviolet energy at wattage. We have satisfactorily tested and capacitor C5. Only the last three out-
254nm (nanometre) mercury resonance the circuit using a readymade 20W choke puts (Q11, Q12, and Q13) giving delay of
Type Nominal Bulb Base Overall Diameter Approx. Tube Ultraviolet Ultraviolet Rated Av. Auxiliary
Watts Designation Length (mm) (mm) Amperes (A) Output Total Micro Watts Life (hrs) (Ballast,
Watts at 1 meter (I) Starter, socket
G30T8 30 T8 Medium 893 25 0.340 8.3 85 7500
Bipin
G15T8 15 T-8 Medium 436 25 0.300 3.6 38 7500 15W fluore-
Bipin scent lamp
G10T8 10 T-8 Medium 330 25 0.230 1.7 17.5 7500 10W fluore-
Bipin scent lamp
G8T5 8 T-5 Miniature 287 15 0.170 1.6 17 5000 8W fluore-
Bipin scent lamp
G6T5 6 T5 Miniature 210 15 0.147 1.0 22 5000 6W fluore-
Bipin scent lamp
G4T5 4 T-5 Miniature 134 15 0.125 0.5 5.4 5000 4W fluore-
scent lamp
G4S11 3.5 S-11 Inter 54 35 0.350 0.1 1 5000 Starterless
G4T4/1 4 T-4 Radio Contact 122 13.5 0.080 0.7 7.5 5000 U-type
A
n ideal garment should remove strips. The test is carried out under the
excess liquid sweat and provide standard atmospheric conditions of 27°C Parts List
comfort to the wearer. Fabrics temperature and 65 per cent humidity. Semiconductors:
with high liquid absorption and trans- As the water rise in fabric strips is not IC1, IC2 - TL084 quad JFET input
quad operational ampifier
port ability provide substantial comfort. easily detectable by eyes, there is always IC3 - NE555 timer
In textile and paper industries as well the possibility of erroneous result while IC4 - CD4093 quad 2-input
as related quality-testing laboratories, using the capillary travel method. NAND gate Schmitt
water absorbency tests are essentially Fabrics have negligible electrical IC5 - 7404 hex inverter
IC6 - 74C926 4-digit counter/
performed. conductivity. Water, being an excellent 7- segment display driver
In the conventional capillary travel conductor of electricity, enhances the T1-T4 - BEL188 pnp transistor
method, to determine the absorption conductivity of fabric after moisture T5-T10 - BC547 npn transistor
rate of a material, sample strips of the absorption. The multipurpose absorp- ZD1, ZD2 - 5.1V, 0.5W zener diode
LED1 - Yellow LED
material are suspended in water, with tion rate meter (MARM) described here LED2 - Red LED
a weight tied at the bottom of each strip works on electrical resistance principle to LED3 - Green LED
to keep the specimen straight (Fig. 1). measure the absorption rates of different DIS1-DIS4 - LT543 common-cathode
Then the rise of water level in the strips, types of fabrics (cotton, jute, wool, rayon, 7-segment display
in ten minute period, is recorded using a polyester, etc) and towel samples. It can Resistors (all ¼-watt, ±5% carbon, unless
stopwatch. Coloured water can be used stated otherwise):
also make accurate measurements for R1, R8 - 1-mega-ohm, 0.5-watt
to clearly see the water rise in fabric yarns, writing and computer papers, and R2, R9 - 6.2-kilo-ohm, 0.5-watt
R3, R10 - 220-kilo-ohm, 0.5-watt
R4, R6, R11,
R13, R22, R24 - 10-kilo-ohm
R5, R7, R12,
R14, R28 - 2.2-kilo-ohm
R15, R16, R17,
R18 - 47-ohm
R19, R20 - 1-kilo-ohm
R21, R23 - 330-ohm
R25 - 8.2-kilo-ohm
R26 - 22-kilo-ohm
R27 - 100-ohm
R29, R30, R31 - 56-kilo-ohm
R32-R35 - 3.3-kilo-ohm
R36-R43 - 220-ohm
VR1, VR3 - 1-mega-ohm potmeter
VR2, VR4 - 10-kilo-ohm preset
VR5 - 1-mega-ohm preset
VR6 - 50-kilo-ohm preset
Capacitors:
C1, C2 - 10nF ceramic disk
C3 - 10µF, 16V electrolytic
C4 - 0.1µF ceramic disk
C5 - 22nF ceramic disk
Miscellaneous:
S1 - Push-to-on switch
Sensor - Stainless steel needle-like
electrode
Fig. 1: Suspension of sample strip and its connection to the instrument via needle sensors
R6
10k
RESET
RED
STOP
H
ere is a simple circuit to measure But in this procedure, there are and 3 are connected to positive supply via
the discharge rate of conducting chances of errors. The circuit described pullup resistors R2 and R1, respectively.
as well as non-conducting liquids. here eliminates errors and has the follow- When the liquid level touches sensor 2
Using this meter, one can determine the ing features: and/or sensor 3, circled points 2 and/or 3
total consumption and total requirement • Automatically senses the level and are pulled low towards ground potential.
of liquids in industries, water plants, generates trigger pulses for counting of You may use small spherical stain-
etc. The instrument is user-friendly and the elapsed time period, thereby providing less steel probes as sensors and screw the
can be operated even by non-technical you a basis for calculation of the discharge wires coming from the circuit to them. To
persons. It can also be used along with rate of liquids (conducting as well as non- avoid oxidation or sulphation of the naked
commonly available 8-digit calculator as conducting). portion, cover the joints using araldite or
a simple digital stopwatch to count up to • Includes the circuit for digital dis- any other suitable epoxy compound. For
99,999,999 seconds. play of the elapsed time using calculator as long life and protection against weather,
In manual method of measuring the well as a 7-segment display (optional). use teflon-insulated multistrand wires.
discharge rate of a given liquid, you need For proper support of the wires along
to observe the rise of liquid in the glass with the probes, a PVC support rod may
tube. As soon as the liquid reaches a Description be used for tying the wires to PVC rod to
fixed point in the tube, you press ‘start’ As shown in Fig. 1, the circuit can be keep them in their proper position.
button on the stopwatch. After the liquid divided into four blocks, namely, sensor, The sensor section for non-con-
reaches another fixed point, you need logic controller, pulse generator (with ducting liquids. For non-conducting
to press ‘stop’ button on the stopwatch. 1-second period), and switching module. liquids, floats with integral rigid vertical
The observed time and level are used to The sensor section for conducting members are used to operate micro limit
calculate the discharge rate and quantity liquids. Fig. 2 shows sensors for conduct- switches. As the liquid level rises, the float
of liquid: ing liquids. Sensor 1 is permanently con- moves upwards to close N/O contact with
Discharge or flow rate = volume/time nected to circuit ground, while sensors 2 the pole, thereby grounding it. Circled
points 1, 2, and 3 in the sensor sections
for conducing and non-conducting liquids
are analogous, hence these are identically
connected to similar points in Fig. 2.
The logic control section. This sec-
tion comprises a quad two-input NOR
gate (ICCD4001). When the liquid level is
Fig. 1: Diagram of digital flow meter
so low that both sensors 2 and 3 are out
Fig. 7: Component layout for the PCB Fig. 9: Component layout for the PCB
W
hile the basic principle for ca- If R = 10k, C = 0.1442x10–3 t
pacitance measurement of a ca- Different values of R can be used to
pacitor remains unchanged, the make the value of t large enough for the
display interface (or more appropriately measurement to be accurate. Lower values
the human interface), however, has un- of C will need a large resistance, while
dergone a major change. Hitherto used higher values of C will require a compara-
7-segment LED displays were capable tively low resistance.
of showing figures and only a limited The microprocessor measures time
number of characters and hence they t through a timing and counting loop.
were not quite satisfactory. On the other If time t is found to be small, the next
hand, the use of CRT monitor is quite higher value of resistor is switched on and
unwieldy and hence unsuitable. the measurement is redone. This feature
Today’s instruments need a smart makes the capacitance meter to be an
human interface for user-friendliness. auto-ranging one. Fig. 1: Capacitor charging principle
The recent advent of LCD alphanumeric A discharge switch across the capaci-
display modules has ushered in a new era tor is also required so that on changing for each counting loop, gives time t in
of smart display instruments. The auto- the range (switching on higher-value Equation (1).
ranging capacitance meter described here, charging resistor R), the capacitor is If the time to charge the capacitor to
also makes use of an LCD module. discharged prior to switching on of the threshold value of CMOS gate is found to
capacitor for recharging through the be too short, the next higher charging re-
changed value of resistor R. This will sistor (100 kilo-ohms) is selected by closing
Principle be an addition to the scheme shown in switch B after discharging the capacitor by
Fig. 1 shows the basic circuit for ca- Fig. 1. closing switch D, and the above sequence
pacitance measurement. A CMOS FET The part of circuit in extreme right of is repeated.
switch IC (CD4066) is used to switch a Fig. 2 (delimited by vertical dotted line) If the charging time is still found to be
voltage for charging the unknown capaci- is the capacitance measurment section. too short, the next higher charging resis-
tor through resistor R. As the voltage Flags 0 through 2 are used for switching tor (1 mega-ohm) is selected by closing
rises exponentially and its value reaches control functions. Flag bits 0 and 1 control switch C after discharging the capacitor
above the threshold of the CMOS gate the selection of switches A, B, and C for via switch D and the sequence is repeated.
(50 per cent of the applied voltage, i.e. charging of capacitor (under test) through Table I summarises the control functions
Vcc), the output of the gate transits from different value of resistors, while flag bit of flags and switches.
logic ‘low’ to logic ‘high’ state. Voltage 2 controls the discharge of capacitor via Logic gates within CD4081 and
Vc across capacitor C (farads) charging switch D. The flags are output data bits CD4069 CMOS ICs are used to control the
exponentially through resistor R (ohms) D0 through D2 of output port 1 from the four switches of CD4066 IC for charging
at any time t (seconds), after application microprocessor. The sense input is D1 (through different resistors) and discharg-
of the voltage, is given by the following data bit of input port 1. ing of the capacitor.
relationship: The program first discharges the ca-
Vc=Vcc(1-e(–t/CR)) pacitor by closing switch D. Then it closes
On substituting Vcc = 5 volts, we switch A, whereupon the capacitor starts Interfacing LCD
get, charging up through a 10-kilo-ohm resis- Most LCD modules follow the same
Vc = 5 – 5e(–t/CR) ....... (1) tor. Simultaneously, a software counter standard format, have the same 14-pin
But since the threshold voltage of a is started. interface, and therefore are compatible
CMOS gate is half of the supply voltage, The program reads the sense bit in a and interchangeable. These have an on-
e(–t/CR) = 2.5/5 = 0.5 loop. When the sense bit goes high, the board controller (such as HD44780) that
t/CR = 0.6931 counter stops. The accumulated count, is capable of controlling any display size
CR = 1.442t multiplied by the time in microseconds up to two lines with 40 characters per
Microprocessor inter-
face for
LCD unit
The LCD module incorporates a
character-generator ROM that
produces 160 different 5x7 dot-
matrix character patterns. It
also has a character-generator
RAM (64 bytes), through which
the user may define up to eight
additional 5x7 dot-matrix char-
acter patterns, as required by the
application.
To display a character, posi-
tional data is sent via the data
bus from the microprocessor to
the LCD module, where it is writ-
ten into the instruction register.
A character code is then sent and
written into the data register of
the LCD module.
The module displays the
corresponding pattern in the
Fig. 5: Component-side track layout of capacitance meter PCB
specified position. It can either
increment or decrement the dis-
play position automatically after
each character entry, so only suc-
cessive character codes need to be
entered to display a continuous
character string. The display/
cursor shift instruction provides
for display shift either from left
to right or right to left.
The display data RAM (DD
RAM) and the character-gen-
erator RAM (CG RAM) may be
used as general-purpose data
areas. The module may be oper-
ated with either dual 4-bit or
single 8-bit microprocessors. It
can operate from a logic supply
as low as 5 volts, which makes it
ideal for use with CMOS micro-
processors.
The features of an LCD mod-
ule are summarised below:
• Can be interfaced with
4-bit/8-bit microprocessors.
• 80x8-bit display data RAM
(80 characters).
• Character generator
ROM—eight different user- Fig. 6: Component layout for the PCB
programmed 5x7 dot-matrix
patterns. microprocessor. off, cursor on/off, blink cursor, cursor
• Display data RAM and character • Numerous instructions such as shift, and display shift.
generator RAM can be accessed by the clear display, cursor home, display on/ • Built-in power-on reset.
Addr. Code Label Mnemonics Comments Addr. Code Label Mnemonics Comments
0000 ORG 0000H 00CA D1 POP DE
0000 ED 56 IM 1 00CB F1 POP AF
0002 31 FF 27 LD SP,27FFH 00CC C9 RET
0005 FB P0: EI 00D0 ORG 00D0H
0006 21 90 00 LD HL,C_MESG 00D0 3A FF 20 DELAY1: LD A,(20FFH)
0009 CD ED 04 CALL LOGO 00D3 3C INC A
000C C3 05 00 JP P0 00D4 32 FF 20 LD (20FFH),A
0038 ORG 0038H 00D7 CD BF 00 CALL DELAY
0038 CD D0 05 CALL C_MEASURE 00DA C9 RET
003B C9 RET 00E0 ORG 00E0H
003C 00E0 C5 DELLONG: PUSH BC
0050 ORG 0050H 00E1 06 0A LD B,10
0050 D3 C0 COMMAND: OUT (C0H),A ;Write an LCD Command 00E3 CD BF 00 L0: CALL DELAY
;Code 00E6 05 DEC B
0052 CD BF 00 CALL DELAY 00E7 C2 E3 00 JP NZ,L0
0055 C9 RET 00EA C1 POP BC
0080 ORG 0080H 00EB C9 RET
0080 F5 DRAM: PUSH AF ;Write a data into LCD 00F0 ORG 00F0H
;address 00F0 3E 01 CLEAR: LD A,01H ;To clear LCD.
0081 DB C0 INI: IN A,(C0H) ;Status read LCD 00F2 CD 50 00 CALL COMMAND
0083 E6 80 AND 80H ;D7 bit cheek 00F5 C9 RET
0085 C2 81 00 JP NZ,INI ;Wait for busy LCD 0100 ORG 0100H
0088 F1 POP AF 0100 3E 38 ROLLMD: LD A,38H ;For 1 row type LCD
0089 D3 C1 OUT (C1H),A ;Out to LCD write 0102 CD 50 00 CALL COMMAND
;register 0105 3E 0E LD A,0EH
008B CD BF 00 CALL DELAY ;10ms 0107 CD 50 00 CALL COMMAND
008E C9 RET 010A 3E 06 LD A,06H
0090 ORG 0090H 010C CD 50 00 CALL COMMAND
0090 43 C_MESG:DB 43H ;”Conect the Capacitor & 010F 3E 80 LD A,80H
;Press the Button” 0111 CD 50 00 CALL COMMAND
;Message. 0114 3E 01 LD A,01H
0091 6F DB 6FH 0116 CD 50 00 CALL COMMAND
0092 6E DB 6EH 0119 C3 20 01 JP WW
0093 65 DB 65H 0120 ORG 0120H
0094 63 DB 63H 0120 3E 80 WW: LD A,80H ;Address of 1st character
0095 74 DB 74H in LCD
0096 20 DB 20H 0122 CD 50 00 CALL COMMAND
0097 74 DB 74H 0125 0E 02 LD C,02H
0098 68 DB 68H 0127 11 00 22 LD DE,2200H ;Display area buffer
0099 65 DB 65H 012A 06 10 LD B,10H ;16 Character
009A 20 DB 20H 012C 1A ZZ: LD A,(DE) ;Take character Code
009B 43 DB 43H 012D 13 INC DE
009C 61 DB 61H 012E 05 DEC B ;Cheek for all 16
009D 70 DB 70H ;characters
009E 61 DB 61H 012F CD 80 00 CALL DRAM ;Write character data into
009F 63 DB 63H ;LCD
00A0 69 DB 69H 0132 C2 2C 01 JP NZ,ZZ
00A1 74 DB 74H 0135 CD BF 00 CALL DELAY ;10ms
00A2 6F DB 6FH 0138 C3 80 01 JP YY
00A3 72 DB 72H 0180 ORG 0180H
00A4 20 DB 20H 0180 3E 90 YY: LD A,90H ;Point to end of display
00A5 26 DB 26H ;RAM address into LCD
00A6 20 DB 20H 0182 CD 50 00 CALL COMMAND
00A7 50 DB 50H 0185 3E 07 LD A,07H ;Shift left Code for LCD
00A8 72 DB 72H 0187 CD 50 00 CALL COMMAND
00A9 65 DB 65H 018A 1A DP: LD A,(DE)
00AA 73 DB 73H 018B FE FF CP FFH ;End of message
00AB 73 DB 73H 018D CA CF 01 JP Z,ZERO
00AC 20 DB 20H 0190 CD 80 00 CALL DRAM ;Write & shift left
00AD 74 DB 74H 0193 CD D0 00 CALL DELAY1
00AE 68 DB 68H 0196 CD BF 00 CALL DELAY
00AF 65 DB 65H 0199 13 INC DE
00B0 20 DB 20H 019A CD E0 00 CALL DELLONG ;Delay for shifting display
00B1 42 DB 42H 019D C3 8A 01 JP DP
00B2 75 DB 75H 01CF ORG 01CFH
00B3 74 DB 74H 01CF C9 ZERO: RET
00B4 74 DB 74H 0200 ORG 0200H ;Range routine to
00B5 6F DB 6FH ;Capacitor
00B6 6E DB 6EH 0200 06 05 RANGE_C: LD B,05 ;Flag bits vary from 5
00BF ORG 00BFH ;to 7
00BF F5 DELAY: PUSH AF ;10ms OR more 0202 97 P1: SUB A ;To first discharge the
00C0 D5 PUSH DE ;capacitor
00C1 11 90 0F LD DE,0F90H ;Delay time period.
0203 D3 01 OUT (01),A ;Output 0 to port 01
00C4 1B C4: DEC DE
00C5 7A LD A,D 0205 CD BF 02 CALL Delay ;Wait 100ms
00C6 B3 OR E 0208 78 LD A,B ;Get flag byte
00C7 C2 C4 00 JP NZ,C4 0209 D3 01 OUT (01),A ;Output to meter circuit
020B 11 00 00 LD DE,0000H ;Count=0 to start
port, and flag generation circuit. I/O discussed earlier. For output port (port 1), as to make a compact assembly. Actual-
decoding is done here by lower address D0 through D2 bits are used for outputting size PCB track layouts of the solder and
lines A0, A1, and A7 together with the flags 0 through 2, which are intended for component sides are shown in Figs 4 and
IORQ signal as shown in Fig. 2. Port 1 charge/discharge and switching functions 5, respectively. Fig. 6 shows the compo-
signal is combined with Rd* and WR* for capacitance measurement. nent layout including the position of the
signals of the processor, so as to generate LCD module.
the logic for Port 1 read and Port 1 write The unit, after assembly, can be tested
signals for ICs 74126 (input port) and 7475 Construction with the software program given in the
(output port), respectively. For input port, The LCD capacitance meter is built using listing of Appendix ‘A’, which is to be burnt
bit 1 of port 1 is used as the sense bit for a double-sided PCB. The LCD module is into a 2764 EPROM. It draws 0.1-amp
the capacitance measurement module as fixed over the ICs in a lifted fashion, so current at 5 volts from a battery back-up.
A
number of semiconductor solution for short-duration messages
manufacturers market digital without using any external memory. The Parts List (Fig. 2)
voice processing chips with dif- VP-1000A chip uses an external memory Semiconductors:
ferent features and coding techniques that can be extended to virtually no limit IC1 - ISD1420 Single-chip voice
record/playback device
for speech compression and processing. by using an external counter.
LED1 - Red LED
Advanced chips such as Texas Instru- These devices find applications in
Resistors (all ¼-watt, ±5% carbon, unless
ments’ TMS320C31 can be used with voice memo recorders, sound effect gen- stated otherwise):
various voice-processing algorithms erators, and announcers for consumer, R1, R9 - 1 kilo-ohm
including code-excited linear prediction industrial, security, and telecommunica- R2 - 5.1 kilo-ohm
(CELP), adaptive differential pulse code tion products. R3, R4 - 10 kilo-ohm
R5 - 470 kilo-ohm
modulation (ADPCM), A law (speci- R6-R8 - 100 kilo-ohm
fied by CCIT), µ law (specified by Bell
Telephone), and vector sum-excited ISD1400 based device Capacitors:
C1 - 220 µF, 16V electrolytic
linear prediction (VSELP, a voice coding The IC ISD1400 provides a high-quality, C2-C5 - 0.1µF ceramic disk
standard for US digital cellular com- single-chip record/play solution for short C6 - 4.7µF, 16V electrolytic
C7 - 0.001µF ceramic disk
munications). messages. The internal functional
Miscellaneous:
We have chosen two economical dig- diagram of an ISD1400 series chip is S1-S3 - Push-to-on tactile switch
ital voice-processing ICs: the ISD1400 shown in Fig. 1. The chip comprises a - 8-ohm, 500mW speaker
series chip from Information Storage De- mic amplifier, 5- pole antialiasing filter, - Electret or condensor mic
vices Inc. (now part of Winbond Electronic internal clock and timing circuitry, 128k - 5V, 250mA supply source
Corp., USA) and the VP-1000 chip from cell NVRAM for message storage, 5-pole
Eletech, Taiwan. The ISD1400 series IC active smoothing filter, and audio power power conditioning and control circuitry.
provides a single-chip record/playback amplifier, besides address buffers and A unique thing about the ISD1400 is
that speech samples are stored without
digitisation and compression, unlike the
other chips. This direct analogue storage
provides for a very true and natural sound
reproduction of voice, music, and other
tones. Pin functions of IC ISD1400 are
given below.
Voltage inputs VccA (pin 16), VccD
(pin 28). Analogue and digital circuits in
the chip use separate power lines (VccA
and VccD). These two should be tied to-
gether close to the IC.
Ground inputs VssA (pin 13), VssD
(pin 12). These are analogue and digital
grounds which must be tied together close
to the device.
Record (REC, pin 27). This is the
active-low record signal. The device
records whenever this pin is taken low,
Fig. 1: Fundamental block diagram of ISD1400 series chip i.e. for the duration of the recording this
Readers’ comments some ‘Q’ factors, etc. such as Motorola 56300 in conjunction
Q1. Thanks for the wonderful Voice Re- M. Shaharyar with MATLAB and GUI interface are
cording and Replay circuit. Ranchi used. If you are interested in a ready-
Kindly clarify whether I can use the A1. EFY: The various sound effects that made board for the mentioned sound
same ICs for audio effect generators, you have mentioned require a great deal effects and much more, then Creative’s
such as Digital Reverb, Echo, Chorus, of additional circuitry and an R&D effort PCI-compliant Sound Blaster Audio
Phaser, and Phlenger circuits. These over a long period, if we have to adopt Card Model CT4830 may prove to be
circuits require continuous record and ISD1400 series voice processor ICs for of great help. For its data sheet you
play, user-controlled record and play speed these sound effects. Generally, for elabo- may visit www.soundblaster.com or
(the Clock), user-controlled feedback, and rate sound effect generation, DSP ICs www.eax.creative.com.
Table I
Parallel-Port Pin Details
Pin number Traditionnal use Port name Read/Write Port address Port bill Hardware Present use
inverted ?
2-5 Data out Data port W Base D0-D3 No To output hour & mintue data
6-9 Data out W Base D4-D7 No To multiplex minute LEDs
1 Strobe Control port R/W Base+2 C0 Yes To make bicolour hour LEDs
green during AM
14 Auto feed R/W Base+2 C1 Yes To make bicolour hour LEDs
red during PM
16 Initialise R/W Base+2 C2 No To make seconds LED on/off
for each second
17 Select input R/W Base+2 C3 Yes To control the relay
15 Error Status port R Base+1 S3 No Not used
13 Select R Base+1 S4 No Not used
12 Paper end R Base+1 S5 No Not used
10 ACK R Base+1 S6 No Not used
11 Busy R Base+1 S7 Yes Not used
18-25 Ground — — — — — Ground
I
n order to know the day of birth,
important national/international
days of historical importance,
and so on, we need to go through the
calander of that specific year, which is
usually unavailable. It is then that we
feel the need for a calander that could
tell the day on any date of any month
of any year.
Here is an electronic century ca-
lander that facilitates easy reading of
the day on any date of any month of any
year. It can be easily fabricated using
the following low-cost, readily available
components:
• A thin wooden board having dimen-
sions of 44x35x0.4 cm
• 75 brass screws (4mm dia.) with
nuts and washers Fig. 1: Layout diagram for the electronic calender
• 49 green/red LEDs
• Thin plastic-coated or insulated TABLE I TABLE II TABLE III
copper wire
SA S M T W TH F F SA S M T W TH S M T W TH F SA
• Two 1.5V dry cells S M T TH F
W SA SA S M T W TH F M T W TH F SA S
M T W TH F SA S S M T W TH F SA T W TH F SA S M
Layout T W TH F SA S M M T W TH F SA S W TH F SA S M T
W TH F SA S M T T W TH F SA S M TH F SA S M T W
Suitably mark the wooden board for dif-
TH F SA S M T W W TH F SA S M T F SA S M T W TH
ferent items following the guidelines for
F SA S M T W TH TH F SA S M T W SA S M T W TH F
each specific section in Fig. 1 as given
below: Overlays for section 4 of Fig. 1
1. Section 1 pertains to years in any
century. A century starts with 0th year
Table IV
and ends with 99th year. Each row, except Groups of Centuries and Corresponding Point Pairs For Jumpering
the fourth row, comprises 28 years (00
Gp 1 Point Gp 2 Point Gp 3 Point Gp 4 Point
through 27 in row 1, 28 through 55 in row Cen- pairs Cen- pairs Cen- pairs Cen- pairs
2, 56 through 83 in row 3, and 84 through turies turies turies turies
99 in row 4). 00+ [A + K] 200+ [A + L] 300+ [A + P] 400+ [A + Q],
On a 42x8cm paper sheet, make 112 100+ [B + Q] 600+ [B + K] 700+ [B + O] 800+ [B + P]
1.5x2cm boxes and write figures 0 through 500+ [C + P] 1000+ [C +Q] 1100+ [C + N] 1200+ [C + O]
99 within these boxes as per section 1 of 900+ [D + O] 1400+ [D + P] 1500+ [D + M] 1600+ [D + N]
Fig. 1. Now paste this paper on the wooden 1300+ [E + M] 1800+ [E + N] 1900+ [E + K] 2000+ [E + L]
board with glue, leaving a margin of about 1700+ [F + L] 2200+ [F + M] 2300+ [F + Q] 2400+ [F + K]
1 cm on the top and sides of the board. 2100+ [G + N] 2600+ [G + O] 2700+ [G + L] 2800+ [G + M]
Make two 4mm dia. holes, with a 2500+ and so on and so on and so on
vertical centre-to-centre distance of 1 cm, and so on
under each of the 28 columns. Insert a Note. Only one applicable point of section 1 for a specific year of a century group is to be shorted
screw along with a washer from the top to its corresponding point of section 4.
Wiring
Fig. 3: Links/connections for the example of August 15, 1947 The LEDs in boxes of section 4 are
represented by small triangles. The ver- Similarly, the inner screws of sec- corresponding point (K, or L, or..., Q)
tex point represents the cathode and the tion 2 have been shorted together and as applicable for the specific group of
base of the triangle represents the anode. connected to the negative terminal of centuries as per Table IV. An example
The cathodes of all the LEDs in each 3V battery. This completes the wiring of given later will clarify this further.
row have to be shorted (at the back side the board. The above connections will extend the
of the board) and then connected to the positive terminal of the battery to anodes
outer screws of section 2 against certain of some of the LEDs of section 4 via point
months as shown in Fig. 2. The anodes Jumpering procedure K, or L, or..., Q from the corresponding
of the LEDs of all the boxes have been Select one of the three overlays (Tables point A, or B, or..., G of section 1 of Fig. 1
connected in a specific fashion and finally I through III) to place over the LEDs as applicable.
terminated on seven screws annotated in section 4 as per guidelines given for Now short the two screws against the
with letters K through Q. section 4. selected month. This will result in the
The outer 28 screws of section 1 have Now mark the year box (in the se- negative supply from the battery being
been wired together in a specific manner lected century) in section 1 of Fig. 1, extended to the cathodes of LEDs of one
and finally terminated on seven screws an- and short the two screws under that of the seven rows of section 4. Since the
notated with letters A through G. The in- column using a jumper. Determine anode of only one LED of that row gets
ner screws of section 1 have been shorted the column (A, or B, or..., G) in which the positive supply via one of the points
together and connected to the positive that box falls. Now extend the marked K, or L, or..., Q as mentioned before, only
terminal of a 3V battery. point (A, or B, or..., G) further to the one LED out of 49 LEDs of section 4 will
glow. The complete column of the overlay 2. In section 1, spot the year 47 and against date 15 (of section 3) from the
(depicting seven days of a week) in which short (using jumper) the two screws under active weekday column. It is found to be
the illuminated LED falls becomes ap- the box containing ‘47’. This point happens Friday (F).
plicable for the selected month. For any to be ‘C’. EFY Lab note. For those who wish to
particular date (in section 3 of Fig. 1) of 3. Now from Table IV we find that use a PCB rather than the wooden board
the selected month, we can read the cor- century 1900+ falls in Group 3 and thus suggested by the author, an actual-size
responding day from the active column of point ‘C’ (of section 1) needs to be joined to PCB measuring 17.5×15.5 cm is shown
the overlay. point ‘N’ of section 4. The same has been in Fig. 4. The component layout and
shown in Fig. 3. top screen are shown in Fig. 5. Please
4. Now short the two screws against connect the anodes of all the 49 LEDs
Worked example the month of August in section 2. You to appropriate pads provided on the
To find out the day on August 15, 1947 will observe that LED41 in box W66 (re- tracks emanating from screw terminals
proceed as follows: fer Fig. 2) under the letter ‘W’ (Wednes- K through Q using jumper wires. Use
1. For 1947, the overlay corresponding day) of the second last column of the of 2mm dia brass screws is suggested to
to 1900+ century i.e. Table III is applicable overlay starts glowing, which indicates avoid shorting of tracks running closeby.
as overlay for section 4, hence the same that the second last column is applicable All jumpers may be connected from
has been selected and placed over the for the month of August of the year 47 of track side.
LEDs of section 4. 19th century. Now simply read the day ❏
R
oulette is a French word meaning LEDs arranged in a circular fashion.
Parts List
‘small wheel’. It is a game of For digital display, the pulses from
Semiconductors:
chance that is much popular in block 1 are counted in block 4. Block 5
casinos and exhibitions. Most casinos have comprises 7-segment LED display to show IC1 - CD4093 quad Schmitt trig-
ger 2-input NAND gate
electromechanical type roulettes. Here’s the counted pulses digitally. IC2, IC3 - CD4017 decade counter
an electronic roulette wheel that has been IC4, IC5 - CD4033 decade counter/
made using readily available ICs. decoder/7-segment display
The wheel used in a roulette has The circuit driver
D1, D2 - 1N4148 switching diode
various numbered slots. In the electro- Decaying frequency oscillator. There are LED1-LED16 - LED (eight red and eight
mechanical type roullete when the wheel two decaying frequency oscillators built green)
is spun, a small ball starts rolling along around Schmitt trigger 2-input NAND DIS1, DIS2 - LT543 7-segment common-
the inner circumference of the wheel. The gates N1 and N2, respectively (see Fig. 2). cathode display
wheel comes to halt slowly and the ball For the sake of explanation, let us consider Resistors (all ¼-watt, ±5% carbon, unless
stated otherwise):
falls in any one of the slots on the wheel. the oscillator built around NAND gate N2. R1, R2 - 1-mega-ohm
The winner is one who has placed his bet Presume that diode D2 is shorted and re- R3 - 560-kilo-ohm
for that specific slot number. In the elec- sistor R3 is removed. The input of the gate R4 - 470-kilo-ohm
tronic version, the LEDs take on the role has two distinct high- and low-voltage trip R5 - 1-kilo-ohm (see text)
R6, R8 - 330-ohm
of the ball and give the illusion of a rolling points (like timer IC 555). R7 - 100-kilo-ohm
ball, while the digital section shows the Also, suppose that capacitor C3 is in Capacitors:
winning number digitally. the discharged condition and the input C1 - 4.7µF, 16V electrolytic
(pins 5 and 6) is low and the output C2 - 0.1µF ceramic disk
(pin 4) is high. Now capacitor C3 starts C3 - 0.01µF ceramic disk
Block diagram charging through resistor R4 and when Miscellaneous:
Fig. 1 shows the block diagram of the the voltage across capacitor C3 crosses S1 - Push-to-on switch
S2 - SPST switch
roulette wheel comprising digital and the upper trip point, the input (pins 5 - 4x1.15V pen torch cells
conventional sections. Block 1 generates and 6) goes high and the output (pin 4)
oscillations with decaying frequency, turns low. place from capacitor C1. A momentary
which is necessary for emulating the Capacitor C3 starts discharging depression of spin switch S1 causes ca-
conventional roulette wheel game. In through resistor R4. When the voltage pacitor C1 to charge fully. Now capacitor
block 2, the pulses received from block across capacitor C3 goes below the lower C3 charges by taking energy from capaci-
1 are counted, decoded, and output se- trip point, the input pins are at low level tor C1 through resistors R3 and R4, and
quentially through 16 output pins. These and the output (pin 4) goes high. discharges through resistor R4 and diode
outputs are used in block 3 to light up the Again, C3 starts charging and the D2.
cycle repeats. As capacitor C3 As the energy is taken from capacitor
charges from the same voltage C1 during charging of capacitor C3 and
level (from output pin 4) during also during discharging (output pin 4 low)
‘on’ time, the duration of high through R3, the voltage level in capacitor
level is the same for every cycle C1 is slowly decreasing. As a consequence,
and there is no change in the the charging time (‘on’ time) of capacitor
frequency. C3 to reach the high trip point keeps in-
Now suppose that diode D2 creasing from cycle to cycle. The oscillator
and resistor R3 are included in frequency decays slowly until the voltage
the circuit. Charging of capacitor level in capacitor C1 goes below the up-
C3 from input pin 4 is blocked by per trip-point voltage of gate N2 and it
Fig. 1: Block diagram of electronic roulette wheel diode D2 and thus charging takes is therefore unable to charge capacitor
C3 to the upper trip point. As a result, no connected to 16 LEDs (LED1 through Presume that Q9 output (pin 11) of
further oscillations are obtained. LED16) as shown in Fig. 2. IC3 is high and its further counting is
To have a more realistic effect Let us recall the functioning of the inhibited. At this stage, IC2 is counting.
of the roulette wheel, another decaying IC CD4017 wherein Q1 through Q8 out- When Q7 output (pin 6) of IC2 goes high,
frequency oscillator comprising NAND puts are initially at low state. On each it resets IC3 and Q0 output (pin 3) of IC3
gate N1, resistors R1 and R2, capaci- positive-going clock pulse, these Q outputs goes high.
tor C2, and diode D1 is employed. It is sequentially (one at a time) go high, and On receiving the next pulse, Q8 output
similar to the former oscillator but when clock-enable (CE) pin 13 is held (pin 9) of IC2 goes high. Though IC3 re-
has a slightly lower frequency and high, further counting is inhibited and the ceives the same clock pulse, its Q1 output
slightly longer decaying time. The output output that was high at that instant stays will not turn high as IC3 was in reset state
(pin 4) of the former oscillator is connect- high. Reset pin 15 overrides all functions at the time of receiving clock pulse.
ed to the input (pin 2) of this oscillator and when this pin is high, it resets the For the next clock pulse, Q9 output
to get ANDed output pulses at pin 3 counter to take its Q0 output (not used in (pin 11) of IC2 goes high and it inhibits
of gate N1. These pulses are used by this circuit) high. Therefore, for normal counting in IC2. At the same time, Q1
IC2 and IC3 to light up the LEDs. The working, reset and CE pins must be in output (pin 2) of IC3 turns high and
former oscillator also controls the second low state. counting takes place in IC3. When Q7
oscillator. In our circuit, IC2 must be inhibited output (pin 6) of IC3 goes high, it resets
Sequential output counter. To switch on its last count and further counting IC2. And this process continues. (For
the LEDs on sequentially, two decade should be done by IC3. Likewise, IC3 more information, refer the article ‘Mul-
counter CD4017 ICs (IC2 and IC3) are must be disabled on its last count and IC2 tisequential Output Circuits’ published
used. Each of these ICs has ten outputs, should start counting. Therefore CE pin 13 in Nov.'92 issue of EFY or Electronics
out of which eight outputs (Q1 through is connected to Q9 output (pin 11) in each Projects Vol. 13.)
Q8) are used. Thus we have 16 outputs of the two ICs. The value of current-limiting resistor
H
ere is an interesting number number was greater than that held by
Parts List
guessing game in which the the other counter, and vice versa. If both
Semiconductors:
player has to find out a two-digit the counters cross 99 at the same instant,
IC1 CD4093 quad Schmitt 2-in-
hidden number. The number entered by the manually entered number is equal to
put NAND gate
the player is compared with the hidden the hidden number. Since each counter IC2-IC5 - CD4017 decade counter
number. The corresponding LED an- gets exactly 100 clock pulses, the respec- IC6, IC7 - CD4033 decade counter/
notated as ‘high’, ‘low’, or ‘win’ (correct) tive counters retain the previously held 7-segment display driver
IC8, IC9 - CD4001 quad 2-input NOR
glows to indicate that the entered number number at the end of counting.
gate
is higher, lower, or equal to the hidden DIS1, DIS2 - LT543 7-segment common-
number. The player can make another cathode display
guess in case his first guess is wrong. The Block diagram D1-D5 IN4148 switching diode
LED1-LED3 LEDs (yellow, red, and
maximum number of trials can be fixed by Fig. 1 shows the block diagram of the
green)
the game organiser. number guessing game.
Resistors (all ¼-watt, ±5% carbon, unless
The circuit uses easily available ICs Block 1 generates high-frequency stated otherwise):
and doesn’t require a magnitude compara- pulses. These pulses are used to set a R1, R3, R4, R5,
tor IC to compare the hidden number with random number in the 2-digit counter in R8, R10, R12,
the guessed number. block 4 when ‘set’ switch is momentarily R13, R15, R16 - 100-kilo-ohm
R2 - 2-mega-ohm
depressed. R6 - 470-kilo-ohm
Block 2 contains a low-frequency R7, R9 - 330-ohm
The principle oscillator whose output is individually R11, R14 - 470-ohm
A two-digit random number is hidden in connected to unit’s and ten’s counters- Capacitors:
a two-digit counter that counts 0 through cum-displays of block 5 via push switches C1, C4, C6, C7,
C8, C9, C10 - 0.001µF ceramic disk
99. The player makes a guess about the marked ‘select units’ and ‘select tens’, C2 - 0.44µF ceramic disk
hidden number and enters the guessed respectively. Thus a 2-digit number is en- C3, C5 - 0.01µF ceramic disk
two-digit number in another 2-digit coun- tered by the player in the counter in block Miscellaneous:
ter that also counts 0 through 99. 5 with the help of select switches meant S1-S4 - Push-to-on switch
After this, a total of 100 pulses are ap- for units and tens digits. The display S5 - Slide switch
4x1.5V pen torch cells or 9V
plied to both the counters simultaneously. shows the entered number comprising compact battery
The counters start counting up from the units and tens.
hidden and manually entered number Momentary depression of ‘test’ switch ter, trial number counter and display,
onwards, respectively. The counter which near block 3 causes generation of 100 100-pulse output circuit, and decoder and
crosses 99 first determines that its held pulses, which are fed to both the counters status display.
simultaneously. Block 6 compris- High-frequency oscillator. Sch-
ing three set/reset flip-flops (SRFF) mitt trigger 2-input NAND gate N1 (¼
detects which counter (random of CD4093), along with resistor R1 and
hidden number or trial number) capacitor C1, produces high-frequency
crossed 99 first, or whether both of pulses. Gate N1 has a lower trip point
the counters crossed 99 simulta- (LTP) and an upper trip point (UTP).
neously. The result is accordingly Presume that input pins 1 and 2 are
displayed by any of the ‘high’, ‘low’, initially low, output pin 3 is high, and ca-
and ‘win’ LEDs. pacitor C1 is in discharged condition. Now
The output terminals of all the C1 charges through resistor R1 and when
four switches are also connected the voltage across capacitor C1 reaches
to block 6 to keep the LEDs off the UTP, the output of N1 goes low and
during the entry of random and capacitor C1 starts discharging through
trial numbers as well as during resistor R1. When the voltage across the
testing. capacitor goes below the LTP, the output
turns high to again charge the capacitor
and the cycle repeats. The frequency of
The circuit oscillation is about 27 kHz.
Fig. 2 shows the number guessing Low-frequency oscillator. The low-
circuit that comprises a high- frequency oscillator comprises NAND
frequency oscillator, low-frequency gate N2, resistor R2, and capacitor C2
Fig. 1: Block diagram of number guessing game oscillator, random number coun- (comprising two 0.22µF ceramic disk ca-
B
efore explaining the actual • Free assembler, linker, simulator,
programmer for programming of and compiler.
Flash-based microcontrollers
PIC16F83, PIC16C84, PIC16F84, and
PIC16F84A, let’s briefly introduce you The PIC16F84A
to PIC microcontrollers in general and The PIC16F84 is a CMOS-based, fully
PIC16F84A in particular. static microcontroller—you can stop
PIC stands for the peripheral interface and restart the clock from where you
controller made by Microchip Technology stopped it. The program memory being
Inc. Its general features include: Flash-based, the PIC16F84A can be pro-
• Harvard architecture with separate grammed/reprogrammed within a minute.
program and data memories and buses. It can be programmed in-circuit, so you
• Pipelined architecture overlapping don’t even have to remove the device from
‘fetch’ and ‘execute’ cycles, which makes your circuit to update your code.
single-cycle execution possible. The RISC instruction set consists of 35
• 0.21µs execution time for most in- instructions, most of which take a single
structions at 4 MHz. cycle. Jump and call take two cycles. The
• Reduced Instruction Set Computing instructions contain 14 bits (comprising an
(RISC); 33 to 75 instructions depending opcode and one or more operands specify-
on the core. ing operation of the instruction) but the
• Chips with 8 to 84 pins. data is always 8-bit wide.
• Power-on reset and brownout pro- Program memory. Fig. 1 shows
tection. program memory. The 16F84A has 1024
• External/internal interrupt sources words of Flash-based program memory
and programmable timers. ranging from addresses 0x000 through
• Code protection. 0x3FF, where 0x denotes hex. It has a
13-bit program counter that is capable
of addressing 8k program memory loca-
tions (0x0000 to 0x1FFF), out of which
only 1k (0x000 to 0x3FF) is physically
implemented, with upper three bits of
the program counter ignored. On reset,
the program counter is loaded with 0x000
and the instruction at 0x000 is picked up
for execution.
There is only one interrupt vector at Fig. 2: Data memory
address 0x004. The priority of interrupt
servicing is decided by the user code. RAM. Device control registers are called
Data memory. Fig. 2 shows data special function registers (SFRs) and
memory. 68 bytes/registers are used to data storage registers are called general-
control the device as well as store data, purpose registers (GPRs).
eliminating separate load and store in- The 16F84A has two banks (Bank 0
Fig. 1: Program memory structions. The data storage space is called and Bank 1) containing SFRs and one
Blink.asm
Blink.asm ENDC DECFSZ TEMP1,F
;———————————————————— GOTO LOOP1
; Date : 19th July 2002 ;———————————————————
; Project : LED Blink ; Program starts DECFSZ TEMP,F
; Frequency : 4 MHz ORG 0x000 GOTO LOOP2
; Device used : 16F84A ;———————————————————
; Oscillator : XT RETURN
; Watchdog : ON RESET GOTO START
; Device ID : ;————————————————-——— ;———————————————————
; Checksum : ; This routine will initialise the I/O ports START CALL INITIALISE
; Customer : EFY
; Copyright : e-CHIP INFOTEK (P) INITIALISE BSF STATUS,5 WAIT CLRWDT
LTD. ; select bank 1 BTFSC PORTA,4
; Designed by : Ravi Pailoor ; wait for switch to go low
; Comments : MOVLW B’11111111' GOTO WAIT
;———————————————————— ; all lines of PORT A as
LIST P = 16F84A ; telling the inputs BSF PORTB,0
assembler the MOVWF TRISA ; switch on the LED
microcontroller is 16F84A MOVLW B’11111110'
errorlevel 2 ; RB0 as output, rest as CALL DELAY
;——————————————————— inputs
STATUS EQU 03h MOVWF TRISB BCF PORTB,0
PORTA EQU 05h ; switch off the LED
; address of PORT A in SFR BCF STATUS,5
PORTB EQU 06h ; select bank 0 GOTO WAIT
; address of PORT B in SFR ; wait for the next switch
CLRF PORTB press
TRISA EQU 85h
; address of direction control register for RETURN ;———————————————————
PORT A END
; in Bank 1 SFR ;——————————————————— ; end of user code
TRISB EQU 86h ; This routine will give a delay of approximately ;———————————————————-
; address of direction control register for 250 mS ❑
PORT B
; in Bank 1 SFR DELAY MOVLW .250
MOVWF TEMP
;-———————————————————
CBLOCK 0Ch LOOP2 MOVLW .250 All diagrams and information provided in
; GPR start address MOVWF TEMP1 this article are included in the CD by courtsey
TEMP
TEMP1 LOOP1 CLRWDT of Microchip Technology Inc.
Readers’ comments is, so we can correct the same. in place of pins 4, 5, 12, 13 and 14 of
Q1. We’ve prepared a PICburner program- Antony Dias PIC16X8X, respectively. Will it work? If
mer as per the article. When we connected Through e-mail yes, which software I will have to use for
it to the parallel port of PC, the port was Q2. I have constructed the PICburner burning PIC16F73.
identified by the software. With PIC16F84 project. It seems that there was some er- Also suggest me an easy-to-program,
placed in the circuit, the reading and eras- ror in the software as it did not detect the cheap and readily-available microcontrol-
ing functions are also taking place. How- port after ‘Find Port’ option was selected. ler for industrial automation.
ever, when WritePIC was pressed (with Please help. Naresh Kinger
a Hex file loaded in buffer), the message P. Ramesh Kumar Through e-mail
we got was: Through e-mail The author Ravi Pailoor replies:
Writing program memory & dialog Q3. I want to make PICburner for A1. When the programmer circuit is con-
box “Program Verify failed in line 0 & PIC16F73 using the ‘PICburner: Program- nected to the parallel port of PC by Mr
Programming Aborted “”!!. mer for PIC16X8X’ circuit by making use Dias, the port is being identified by the
Kindly let us know where the problem of pins 1, 8, 27, 28 and 20 of PIC16F73 programmer correctly. Normally, the
G
eneric array logic (GAL) is a fam-
ily of programmable logic devices.
Almost any logic circuit can be
programmed into these chips. A simple IC
of this type is the GAL16V8.
Here we’ve described a simple GAL
programmer for electronics hobbyists and
professionals who are in the beginning
stage of GAL programming and learn-
ing. GALs are available from various
manufacturers but Lattice Semiconduc-
tor’s GALs are good due to company’s
good technical support and availability
of information from the company’s Web-
site ‘www.latticesemi.com’. For this pro-
grammer we’ve used Lattice ispDesign
EXPERT software tool for the design and
analysis of programmable logic devices.
You can get it free for trial from the
Website of Lattice Semiconductor. (EFY. Fig. 2: Logical diagram of GAL device’s output logic macrocell
T
elephone is no more an item of • The circuit doesn’t employ any mi- result, relay RL1 remains de-energised
luxury but a basic necessity of croprocessor, and is based on easily avail- and the telephone instrument works nor-
life. In certain regions, the gov- able discrete components and ICs. mally. When switch S1 is closed, the #95
ernment of India made areas falling So an average electronic enthusiast debarring circuit gets activated.
within 200 km accessible through local can easily understand and build it. The circuit operation is based on the
telephones by dialing the local telephone • The on-hook and off-hook status of following logic:
number after dialing 95. However, the the telephone is indicated by LEDs. 1. When the initial two digits of a
pulse rate for areas accessible through • External power supply is needed for dialed DTMF number correspond to 9
95 dialling is 30 seconds (one pulse per circuit operation. followed by 5, the telephone line is discon-
30 seconds) as against the pulse rate of nected from the telephone instrument for
180 seconds applicable for normal local a period of 10 seconds. (The disconnection
calls. It means a call of 3-minute dura- The logic period can be varied.)
tion to these areas is six times costlier Fig. 1 shows the block diagram of the 2. If 9 followed by 5 are not the initial
than a local call. To avoid misuse of your #95 debarring facility, which may be but subsequent sequential digits of a di-
telephone instrument by unauthorised pursued for understanding the overall aled number, the circuit doesn’t take any
persons for the areas accessible through operation. cognizance of the same. Also, the circuit
dialing number 95, we present here a The circuit shown in Fig. 2 shows the doesn’t bother about combinations other
#95 debarring circuit with the following actual wiring/connections. The incom- than 95.
features: ing telephone line is connected to the 3. During on-hook condition, the tel-
• This circuit is meant only for tel- telephone instrument via the normally ephone line’s DC voltage component is
ephones using the DTMF dialing mode. closed contacts of a relay and hence to greater than 12 volts (usually, 48 to 52V
• The circuit can be activated or de- inhibit operation of the #95 debarring DC), and during off-hook condition the line
activated simply by operating a hidden circuit, one can just switch off the supply voltage drops below 12V DC.
‘on’/‘off’ switch. to the circuit by opening switch S1. As a
The circuit
The circuit (see Fig.
2) comprises a cradle
on-hook/off-hook in-
dicator, #95 detector,
and power supply.
Cradle on-hook/
off-hook indicator.
Cradle on-hook/off-
hook status is detect-
ed via polarity-guard
bridge circuit compris-
ing diodes D1 through
D4.
When the hand-
set is on the cradle,
telephone line voltage
exceeds 12 volts to
cause breakdown of
12V zener diode ZD1.
Fig. 1: Block diagram of #95 debarring facility for telephones The in-built LED of
83
operation is reversed. Thus red
LED (LED1) glows, while the
green LED (LED2) is off.
A connection from the col-
lector of transistor T1 via diode
D5 is taken to reset pin 15 of
counter CD4017 (IC6) to en-
sure that IC6 remains reset as
long as the telephone handset
remains in on-hook condition.
You’ll get a clear idea of its full
function after going through the
#95 detector circuit described
below.
#95 detector. To dial any
number, the telephone hand-
set is lifted and the desired
number is dialed in DTMF
(tone dialing) mode. The dialed
digits are received/detected by
IC MT8870 or KT3170 (IC1)
that is connected to the tel-
ephone lines via the normally
closed contacts of relay RL1.
In case the first two digits of
the dialed number are found
to be 9 followed by 5, the relay
Fig. 3: Actual-size, single-side PCB for #95 debarring circuit energises for about 10 seconds
to disconnect the telephone
instrument from the lines, else
the circuit remains inactive to
allow you to establish contact
with the dialed number.
The detection process.
Each of the dialed digits ap-
pears at the output of IC1 in
binary format, and the same is
connected in parallel to:
• 4-bit latch IC3(a) (1/2
CD4508) for holding number 9
(decimal),
• 4-bit latch IC3(b) (1/2
CD4508) for holding number 5
(decimal), and
• 1-of-10 decoder CD4028
(IC2) for decoding number 9.
Assume that on lifting the
handset, the first dialed digit
is ‘9’. The binary equivalent
output of ‘9’ from IC1 appears
at the inputs of IC3(a), IC3(b),
and IC2 as mentioned earlier.
Here, IC2 is a BCD-to-deci-
mal decoder that generates a
strobe signal at its Q9 output
Fig. 4: Component layout for the PCB (pin 5) corresponding to digit
9 for latching IC3(a). The Q9 output is
optocoupler MCT2E conducts to pull its tor red LED (LED1) goes off and on-cradle differentiated by C4-R6 combination
collector towards ground and thus transis- indicator green LED (LED2) glows. and is applied to strobe pin 2 of IC3(a)
tor T1 is cut off and transistor T2 gets for- During off-hook condition, the line to latch the binary equivalent of ‘9’ at
ward biased. As a result, off-cradle indica- voltage drops below 12 volts and the above its output.
Readers’ comments est in my circuit. As regards the problem it for failure and, if required, replace
Q1. I have assembled circuit and found in the circuit, I suggest him to check with a new IC.
that it does not work with the number ’95,’ IC1 and IC2—both these ICs are main If the problem still persists, use pin
though it works with the combination ‘X5,’ components of the circuit. The number 6 (Q5) of IC2 to latch the dialled number
where ‘X’ can be any number between 0 ‘9’ is either not detected or there may be 5 separately in conjunction with the RC
and 9. I have used Toshiba’s IC 4028 in- a problem in the magnitude comparator. differentiator circuit consisting of ca-
stead of CD4028. Please help. For this, check the proper logic level at pacitor C4 (0.1µ) and resistor R6 (10k).
Soumya Kanti Dhara the inputs of IC4 (B0, B1, B2 and B3). It For this, connect pin 6 to STB pin14 of
Midnapore, West Bengal should be 1001, respectively, for the com- IC3 (b).
The author Parmar Latesh B replies: parison of the dialled number 9. IC1 is I’ll suggest the use of CD4028 only as
A1. I thank Mr Kanti for showing inter- prone to damage during testing, so check I am not aware of IC 4028.
S
ecurity is a prime concern in our and if the entered password is wrong it
Parts List
day-to-day life. Everyone wants to gives a longer beep of one second.
Semiconductors:
be as much secure as possible. An The system uses a compact circuitry
IC1(U1) - MC68HC705KJ1
access-control system forms a vital link built around Motorola’s MC68HC705KJ1 microcontroller
in a security chain. The microprocessor- microcontroller and a non-volatile I2C IC2 (U2) - ST24C02 I2C EEPROM
based digital lock presented here is an EEPROM (ST24C02) capable of retaining IC3 (MN1) - MN1280 reset stabiliser
access-control system that allows only the password data for over ten years. IC4 (Reg1) - 7805 +5V regulator
T1, T2 - BC547 npn transistor
authorised persons to access a restricted The user can modify the password as (Q1, Q2)
area. well as relay-activation time duration for D1, D2 - 1N4007 rectifier diode
door entry. This version of software ena- LED1 - Red LED
bles use of the unit even without the I2C Resistors (all ¼-watt, ±5% carbon, unless
System overview EEPROM. (However, without EEPROM, stated otherwise):
R1-R6 - 10-kilo-ohm
The block diagram of the access-control the password and relay-activation time R7-R9 - 1-kilo-ohm
system is shown in Fig. 1. The system duration will be reset to default values on Capacitors:
comprises a small electronic unit with a interruption of the power supply.) C1, C2 - 33pF ceramic disk
numeric keypad, which is fixed outside C3, C4,
C6, C7 - 0.1µF ceramic disk
the entry door to control a solenoid-op-
erated lock. When an authorised person Hardware details C5
Miscellaneous:
- 10µF, 10V electrolytic
enters a predetermined number (pass- Fig. 2 shows the access control circuit. Its Xtal (Y1) - 4MHz quartz crystal
word) via the keypad, the relay operates main components are a microcontroller, PZ1 (BZ1) - Ceramic piezo buzzer
Con1 - Power-supply connector
for a limited time to unlatch the solenoid- I2C memory, power supply, keypad, relay, Con2 - 2-pin male/female Berg
operated lock so the door can be pushed/ and buzzer. connectors
pulled open. At the end of preset delay, Microcontroller. The 16-pin MC68H- - 7-pin male/female Berg
the relay de-energises and the door gets C705KJ1 microcontroller from Motorola connectors
SW1-SW12 - Tactile keyboard switch
locked again. If the entered password is has the following features: RL1 (RLY1) - 1C/O, 12V, 250-ohm
correct the unit gives three small beeps, • Eleven bidirectional input/output miniature relay
(I/O) pins
• 1240 bytes of data lines) for communication with
OTPROM program I 2C EEPROM.
memory I2C memory. A two-wire serial EEP-
• 64 bytes of ROM (ST24C02) is used in the circuit
user RAM to retain the password and the relay-
• 15-stage activation time duration data. Data stored
multiple-function remains in the memory even after power
timer failure, as the memory ensures reading
Out of eleven of the latest saved settings by the micro-
I/O pins, seven controller.
lines have been This I 2C bus-compatible 2048-bit
used for the key- (2-kbit) EEPROM is organised as 256×8
board, one for the bits. It can retain data for more than ten
buzzer, one for years. Using just two lines (SCL and SDA)
relay operation, of the memory, the microcontroller can
and two (SCL and read and write the bytes corresponding to
SDA, i.e. serial the data required to be stored.
Fig. 1: Block diagram of the access-control system clock and serial (Note. For details of the
The software
For software development the author has
Fig. 9(a): Flow-chart for the access-control system, continued in Figs 9(b) and 9(c)
taken the help of Understanding Small
direction and Microcontrollers, MC68HC705KJ1 Tech-
correct inser- nical Data book, and In-Circuit Simulator
tion of all the User’s Manual. The development tools
pins. Switch used include WinIDE software for KJ1
on the unit. (including editor, assembler, simulator
On entering and programmer), in-circuit simulator
1111 (default (referred to as JICS board), and IBM PC
password) with Windows OS and CD drive.
through the DOS-based programs can also be
keypad, the used for software development. So if you
relay will are comfortable with DOS or have an old
operate for computer with limited hard disk capacity,
around 10 you will still face no difficulty.
seconds (de- (Note. The books (in pdf format) and
fault time WinIDE software are available free of
duration). cost on Motorola’s Website and have been
Each key- reproduced by courtesy of Motorola in
press gives the CD. The mentioned CD also contains
a short beep. DOS-based programs. The JICS board
The buzzer may be bought from Motorola’s authorised
will also distributors.)
beep for 10 Program development steps. You can
seconds when write the software by using the following
the relay is steps:
‘on’. On en- 1. Read and understand the
tering some microcontroller’s operation and in-
other code, structions as well as the operation of
say, 9999, WinIDE software. (The help option of
the relay the software will clear most of your
should not doubts.) You should also have a clear
operate and knowledge of the logic sequence of
the buzzer the end-product operation. For this,
should give a you can make a flow-chart. (Flow-
long beep. chart for this access control system
Change is shown in Figs 9(a)-(c). The cor-
Fig. 9(b): Flow-chart for the access-control system, continued from Fig. 9(a) the password responding software source code is
given at the end of this article.) You can also choose options within the writing the software. So look for faults
2. Convert the flow-charts to source dialogue box to generate listing file with in your logic/code and rectify them. You
program in Assembly language making extension .LST and .MAP file for source- should be able to simulate complete
use of the instruction set of the microcon- level debugging. Thus if your source pro- functions without using the actual mi-
troller and assembler directives. You can gram was titled ‘main.asm’, you will get crocontroller chip.
use any text editor for writing the same main.s19, main.lst, and main.map files 5. Now, program the microcontroller
or use the text editor of the Integrated after successful assembly. with the developed and tested software.
Development Environment (IDE), which 4. Simulate your program using the After programming the microcontroller,
also includes assembler, simulator, and WinIDE software, JICS board, and the insert it into the circuit and check all
programming software. The Assembly- target board (the PCB with keyboard, functions again.
level program is to be saved in a file with memory, buzzer, etc). JICS board is con-
.asm extension. nected to the computer through serial port
3. Assemble the source code, i.e. (9-pin/25-pin) of the computer. The target Possible modifications
convert the source code (file with exten- board is connected to JICS board through The circuit can be modified to have more
sion .ASM) into object code (machine a 16-pin DIP header cable. than one password, advanced functions
language) using assembler/compiler tab During simulation you may find that like real-time clock, computer connectiv-
of environmental setting in WinIDE. The the program is not behaving properly. ity via serial/parallel port to log data, and
object code will be in S19 format, i.e. the Assuming that your hardware is okay, interfacing to a bar code reader instead
object code file will have extension .S19. the most probable reason is an error in of keypad for opening the lock. These
Main.asm
;;**************************************** ;; goto read def val ;***************************** ACTKBD *****
***** beq read_defval *************************************
;;PROJECT :- ACCESS CONTROL (GEN- inc e_add ;; increment e_add ;; set key press timeout to 10 seconds
ERAL) inc mem_ptr ;; increment ptr act_kbd: lda #10t ; set key press
;;VERSION :- 01 lda mem_ptr timeout = 10secs
;;STARTING DATE :- 09-10-2k day - monday cmp #max_iic_bytes ;; is all 3 bytes read sta kbd_timeout
;;IC :- KJ1 bne read_nxt_val ;; if no goto read_mem_
; ; H A R D W A R E : - 1 2 val lda kbd_pos ; read kbd pos
KEYS\1LED\1HOOTER\1MEMORY bra main_loop ;; if yes goto main_loop
;;HARDWARE REC. :- 06-10-2k ;*************************** KEY PROGRAM
;;FEATURES :- ENTER PASSWORD TO read_defval: jsr read_def_val OK PRESSED ****************************
OPEN DOOR act_kbd1: cmp #k_pgm_ok ; is pgm
;***************************************** ;;************************* MAIN LOOP ***** ok key pressed
**** *********************************** bne act_kbd2 ; if no goto act_kbd2
org 0c0h ;; after every one tick over call sense_kbd jsr chk_po_status ; if yes call chk_po_sta-
$setnot testing ;; after every half second over call chk_set_beep tus
$include "stdj1.asm" ;; after every second check kbd_timeout\en- bra ret_actkbd ; goto ret_actkbd
$include "ports.asm" try_time_out
$include "variable.asm" main_loop: brclr one_tick,tim_status,main_ ;; program here checks for po_password\po_en-
loop try_time flag
key_word equ 14h bclr one_tick,tim_status ;; if po_password\po_entry_time flag = 1 and if
key_word1 equ 28h jsr kbd_sense some other key press
second_last_kw equ 5h ;; accept pgm_ok_key then goto wrong entry
last_key_word equ 7h chk_hs_over brclr half_sec,tim_status,chk_1_ ;; else goto chk_pgm_key
sec act_kbd2 brclr po_password,entry_
et_buff db 2 bclr half_sec,tim_status status,chk4poet
jsr chk_set_beep jmp wrong_entry
org 300h
chk_1_sec brclr one_sec,tim_status,ret_act- chk4poet: brclr po_entry_time,entry_
$include "iic.asm" 1sec status,chk_pgm_key
$include "macro.asm" bclr one_sec,tim_status jmp wrong_entry
$include "readkbd2.asm"
;; program comes here after every second over ;*************************** KEY PROGRAM
start: rsp ; ************************ DECREMENT KBD PRESSED *****************************
TIMEOUT ******************************* chk_pgm_key: cmp #k_program ; is
;***************************** INITIALISE a1s_tstkbd tst kbd_timeout ; if pgm_ok key press
PORT ******************************** timeout = 0 then bne act_kbd3 ; if no goto act_kbd3
beq tst_eto ; goto check for entry bset pgm_mode,status ; if yes set flag of
init_port ddra ;; initialise port a time pgm_mode
init_port porta dec kbd_timeout ; else decrement kbd clr buff_pointer ; clear all pointers
time clr entry_status ; clear entry status
init_port ddrb ;; initialise port b tst kbd_timeout ; again chk kbd clr kbd_timeout
init_port portb timeout bra ret_actkbd ; give beep while returning
bne tst_eto ; if # 0 goto tst_eto
;************************** CLEAR MEMORY\ jsr wrong_entry ; give wrong entry ;************************** OTHER KEY
INITIALISE TIMER ************************ signal PRESSED *********************************
********** ;; check for password code
clear_mem ;; clear Ram ;************************* DECREMENT EN- ;; first chk for buff pointer is buffer pointer > 3 if
TRY TIME ****************************** yes then goto is_it_mode
init_timer ;; initialise timer ;; check for entry time = 00 ;; else take first digit pressed in kbd_buff,second
tst_eto: tst entry_time_out ; if timeout digit in kbd_buff+1
chk_mem ;; check EEPROM = 00 then ;; third digit in kbd_buff+2 & fourth digit in
beq ret_act1sec ; ret_act1sec kbd_buff+3
;; if bad_mem flag = 1 then goto read_defval dec entry_time_out ; else decrement
;; if bad_mem flag = 0 then read values from timeout act_kbd3 ldx buff_pointer ;; is all 4 digit
eeprom tst entry_time_out ; again chk entry password enters
time cpx #3
brset bad_mem,status,read_defval bne ret_act1sec ; if # zero goto ret_act- bhi is_it_mode ;; if yes then goto is_it_
1sec mode
;; program comes here when bad_mem flag = 00 bclr led_arm,led_port ; else ON led arm lda kbd_pos ;; else store kbd_pos in
;; at power on e_add & mem_ptr = 00 kbd_buff+ptr
;;************************* READ VALUES ret_act1sec sta kbd_buff,x
FROM EEPROM ************************** inc buff_pointer ;; increment pointer
;; read 2 byte password/entry time from EEP- ; *********************** CHECK FOR KEY ** lda buff_pointer ;; is it 4th digit to be en-
ROM ************************************* tered
read_mem_val clr mem_ptr ; if new key found flag set then goto act kbd else cmp #4 ;; if no then return
clr e_add goto main_loop bne ret_actkbd
read_nxt_val: jsr get_eeprom_info ;; read chkbd brclr new_key_found,status,ret_
from eeprom chkbd ; if new key found then set ;; program comes here when all 4 keys entered
lda e_dat ;; save read value in e_dat bclr new_key_found,status ; flag ;; check for valid code
ldx mem_ptr ;; set index reg as pointer jsr act_kbd ; call actkbd ;; if not valid code then give long beep and clear
sta password,x ;; save read value in ret_chkbd jmp main_loop ; buff_pointer\kbd_timeout
cmp #0ffh ;; if value read from EEPROM else goto main loop ;; and return
is ff then ;; else clear sys_arm flag and give accp beep
Iic.asm
;; IIC_TX ldx #8 ; count of 8 bits bclr sda,iicont ; leave sda high by mak-
;; function : transfer 5 bytes from iic_buff to bit_iic: rola ; shift msb to ing it input
iic bus carry bsr delay_small
;; input : iic_buff bcc sda_low ; if no carry(msb low) bsr delay_small
;; output : to iic sda_high: bset sda,iicport ; carry bset scl,iicport
;; variables: rega, regx set msb high bsr delay_small
;; constants: scl bra pulse_scl clc ; normal - clear carry
;; sda sda_low: bclr sda,iicport brclr sda,iicport,byte_over ;error if ackn
;; iicport pulse_scl: bsr delay_small ; delay not rcvd
;; iicont bset scl,iicport ; set scl high sec ; error - set carry
bsr delay_small byte_over: bclr scl,iicport ; set scl
bclr scl,iicport ; then scl is set low low
;; input in a register ; bsr delay_small bsr delay_small
byte_iic: bset sda,iicont ; set sda decx ; is count over bsr delay_small
as output port bne bit_iic ; no next bit bclr sda,iicport ;
stdj1.asm
porta equ 00h pdra equ 10h iscr equ 0ah
portb equ 01h pdrb equ 11h copr equ 7f0h
ddra equ 04h tscr equ 08h
ddrb equ 05h tcr equ 09h
variable.asm
last_key_val db 00 key_alarm equ 6
entry_status db 00 bad_mem equ 5 kbd_pos db 00
es_password equ 1 sys_arm equ 4 last_key db 00
es_entry_time equ 2 pgm_mode equ 3 same_key db 00
po_entry_time equ 3
po_password equ 4 password db 00,00 ;; stored in def_timer equ 14h
es_key_word equ 5 eeprom
entry_time db 00 ;; stored in tim_status db 00
temp db 00 eeprom one_tick equ 7
active_scan db 00 half_sec equ 6
kbd_temp db 00 buzzer_time_out db 00 one_sec equ 5
delay_temp db 00 beep_time equ 10t one_min equ 4
running_ticks db 00
mem_ptr db 00 entry_time_out db 00 mins db 00
hooter_time equ 2 ticks_1_sec equ 122t
kbd_timeout db 00 hooter_alarm_tout db 00 ticks_in_hsec equ 61t
buff_pointer db 00 ticks db 00
kbd_buff db 00,00,00,00 e_add db 00 max_iic_bytes equ 3
e_dat db 00
status db 00 iic_buff db 00 key_scan_cntr db 00
new_key_found equ 7
readkbd2.asm
scan_table: db 0eh,0dh,0bh,07h bil key_found lda key_port ;compare
key_scan_port equ porta ora #40h key_port with kbd table
cmp #70h and #0fh ; remove un-
;; sense2 line is at irq bne key_found ; no some used line
key pressed ora kbd_temp
kbd_sense bra no_key_found ; yes no clrx
sense_line lda key_port ;read key pressed
key port try_nxt_code cmp kbd_table,x
and #30h key_found sta kbd_temp beq key_matched ;if equal goto key
ports.asm
k_program equ 10t and led scan3 equ 3 ; 13
k_pgm_ok equ 11t ;; at power on system armed led sense0 equ 4 ; 12
def_ddrb equ 0ch ;; x x x x sda sense1 equ 5 ; 11
scl equ 2 scl x x ;;sense2 equ irq ; irq
sda equ 3 def_portb equ 00
iicport equ portb led_port equ porta
iicont equ ddrb key_port equ porta led_arm equ 6
;; 7 6 5 4 3 2 1 0 toggle_led equ 40h
def_ddra equ 0cfh ;; hoot led sen1 sen0 scan0 equ 0 ; 16
scan3 scan2 scan1 scan0 scan1 equ 1 ; 15 buzzer_port equ porta
def_porta equ 080h ;; active low hooter scan2 equ 2 ; 14 buzzer equ 7
macro.asm
$macro chk_mem sta tscr
bclr bad_mem,status ;; clear flag ;; clear memory from 0c0h cli ;enable interrupt
bad_mem $macro clear_mem $macroend
jsr gen_start ;; call gen_start ldx #0c0h ;clear memory ;; intialise porta , portb
lda #0a0h ;; send device add = next_mm clr ,x $macro init_port port
0a0h incx lda #def_%1
jsr byte_iic ;; to memory bne next_mm sta %1
bcc cm_over ;; of carry clear then $macroend $macroend
return
bset bad_mem,status ;; if carry set then
set flag ;; intialise timer EFY note. All relevant files are in-
cm_over ;; bad mem $macro init_timer cluded in CD. ❏
$macroend lda #def_timer
Readers’ comments books or sites covering the subject. of our knowledge. However, it won’t be
Q1. We want to use Intel 8051 Puneet much difficult to follow the flow diagrams
microcontroller in place of MC68H- Through e-mail and existing program to rewrite using
C705KJ1 system as it is easily avail- The author Vinay Chadha replies: 89C51.
able. Please give us the information It is not possible to convert KJ1 pro- The advantages of using KJ1 are that
regarding this conversion (MC68H- gram into 89C51 directly and no book it is much smaller in size, costs less, and
C705KJ1 into 8051) or suggest some covering the subject is available to the best consumes lower current than 89C51.
M
ost of the display circuits avail- • 2 kB of reprogrammable Flash
Parts List
able in the market are not pro- memory (endurance : 1000 write/erase
Semiconductors:
grammable. Here’s a versatile cycles)
IC1 - 7805 5V regulator
star display that provides digital control • 128 x 8-bit internal RAM IC2 - AT89C2051 microcontroller
of all the functions interactively and can • Two 16-bit timers/counters T1-T11 - BC547 npn transistors
be programmed for any desired display • Six interrupt sources LED1-LED11 - LED
sequence. It is built around Atmel’s • Programmable serial UART TR1-TR11 - BT136 triac
Flash-based powerful microcontroller • 15 programmable I/O lines Resistors (all ¼-watt, ±5% carbon, unless
89C2051. (Note. The complete datasheet of At- stated otherwise):
R1-R16 - 10-kilo-ohm
mel 89C2051 microcontroller is included R17-R27 - 150-ohm
in the CD.)
The circuit The microcontroller 89C2051 here uses
Capacitors:
C1 - 0.1µF ceramic disk
Fig. 1 shows the circuit of programmable clock frequency of 11.059 MHz. (You can C2 - 4.7µF, 10V electrolytic
star display. also use a 12MHz or nearer-value crystal C3, C4 - 22pF ceramic disk
Microcontroller 89C2051. This micro- instead.) The power-on reset function is Miscellaneous:
B1-B11 - 60W bulb/lamp
controller is compatible with the MCS-51 achieved by the combination of capacitor S1-S4 - Tactile switch
family. Its pin configuration is shown in C2 and resistor R5. J1 - 20-pin ZIF socket
Fig. 2. The main features of the microcon- Out of the 15 I/O lines, four lines (P3.2/ XTAL - 11.059MHz crystal
troller are: INT0, P3.3/ INT1, P3.5, and P3.7) are used oscillator
H
ere we present a multichannel pad comprising keys 0 through 9 is used
Parts List
access control system, also for entering the decimal digits, which
known as digital code lock, to pre- are decoded to their binary equivalents Semiconductors:
vent the use of equipment by unauthorised by decoder IC1. The binary outputs of IC1 - 74C922 16-key encoder
IC2 (B1, B2) - 74LS244 octal buffer
persons. The circuit uses discrete TTL and IC1 are connected to the locking section IC3-IC6 - CD4015 dual 4-bit static
CMOS ICs. For accessing any device you via buffer B1 (half of IC2), the unlocking shift register
need to enter a 4-digit code via a keypad. section via buffer B2 (second half of IC2), IC7 - CD4017 decade counter
The circuit will check the code entered and a quad analogue switch (IC8). IC8 - CD4066 quad analogue
switch
via the keypad against a preprogrammed To enter the 4-digit locking code, first IC9, IC10 - 74LS688 8-bit comparators
locking code. Only if both these codes press program switch S11. After enter- IC11 - CD4028 1-of-ten decoder
match, you will be able to gain access to ing the four digits sequentially, switch IC12-IC15 - CD4013 dual ‘D’ flip-flop
the devices connected through the circuit. S11 is required to be pressed again. IC16 (N1, N2) - CD4073 3-input AND gate
IC17 (N3, N4) - CD4001 Quad 2-input
If the entered code is incorrect, access to This depression of switch S11 enables NOR gate
the devices is denied. You can control up the locking code section (comprising IC3 T1 - BC547 npn transistor
to eight separate devices using only one and IC4) and inhibits the unlocking sec- T2-T9 - SL100 npn transistor
code. tion (comprising IC5 and IC6). Another D1-D10 - 1N4001 rectifier diode
LED1 - Green LED
depression toggles/restores the initial LED2 - Red LED
condition in which the locking section
System overview remains inhibited and the unlocking
Resistors (all ¼-watt, ±5% carbon, unless
stated otherwise):
For understanding the overall function- section is enabled. R1, R2, R7,
ing, refer to the block diagram of the The 4-digit locking and unlocking R16 - 4.7-kilo-ohm
R3 - 2.7-kilo-ohm
multichannel access control system codes (converted to 16 binary bits) are R4-R6 - 1-kilo-ohm
shown in Fig. 1. A 10-digit decimal key- available at the output of the respective R8-R15 - 220-ohm
Capacitors:
C1, C2 - 0.1µF ceramic disk
C3 - 4.7µF, 10V electrolytic
Miscellaneous:
RL1-RL8 - 12V, 200W, 1C/O relay
S1-S14 - Push-to-on tactile switch
PZ1 - Piezobuzzer
B1 - 4.5V battery
- 5V, 1A regulated power
supply
further key depression results in the bi- flip-flop, which, in turn, toggles the state responding output pins of IC11. Thus
nary equivalent number at the output of of the relay driven by its output. Ad- switches corresponding to digits 1 through
IC1 to act as an address input for decoder dresses corresponding to keypad switches 8, when depressed, toggle the relay state
IC11. The output corresponding to the ad- for digits 0 and 9 have not been used for (from energised to de-energised and vice
dress input goes high to toggle a specific device addressing by not using the cor- versa) of the corresponding devices.
Sequential depression of the same section through buffer B1. The func- the unlocking section, as stated earlier.
keypad switch will not alter the state tion of gates N1 and N2 is to allow The unit is now ready to accept the un-
of the corresponding relay. Thus if you the clock pulses (D AV output of IC1) to locking code, and if a valid code is entered
have erroneously changed the relay reach only the selected section (lock- via the keypad, the switching section is
state of a specific device, depress a ing or unlocking). activated.
dummy number (0 or 9) before keying For storing and shifting the entered digits The code comparator section.
the same number again. Switch S14 dual 4-bit static shift registers (four CD4015 For comparing the locking code
is used to reset all devices simultane- ICs) have been used. The entered digits are with the unlocking code a code
ously. shifted from right to left as in calculators. If comparator is needed. Two 8-bit
you desire to see the entered digits (binary magnitude comparator 74LS688
equivalents), connect LEDs at the output of ICs (IC9 and IC10) are cascaded
The circuit shift registers. Shifting and storing for the to form a 16-bit comparator here.
Fig. 2 shows the circuit diagram of the locking section is done using IC3 and IC4, The output of comparator 74LS688
multichannel access control system. while the similar function for the unlocking is active-low (normally high). The
Keypad interface. The 10-digit key- section is achieved using IC5 and IC6. two comparators have been used in
pad is wired to row and column inputs of Assume that we have enabled the conjunction with NOR gate N3 to get a
IC 74C922 (IC1), which is a 16-key en- locking section using program switch high output when the correct unlocking
coder IC with on-chip clock and debounce S11. Now on pressing reset switch S12, code is entered. This high output of
circuitry. The binary equivalent of the last the outputs of IC3 and IC4 of the locking NOR gate N3 enables quad bilateral
key depressed is available at its output. section are made low. When we press electronic switches inside CD4066 (IC8)
The data available pin (DAV) of IC1 goes any digit on the keypad, the 4-bit binary and the complement of NOR gate N3
to high level when a valid keypad entry data is loaded into the shift registers obtained from NOR gate N4 inhibits
is made and returns to low level when and the same appears at the first output AND gates N1 and N2, so no clock
the depressed key is released. The DAV of all the four shift registers. When the pulse is available for the shift registers
output is used as clock for the locking and next key on the keypad is depressed, of locking as well as unlocking sections
unlocking sections via 3-input AND gates the previously loaded data is shifted and the existing outputs of all shift
N1 and N2, respectively. The DAV output into the next output of each of the registers are frozen. In this condition
is also used to sound piezobuzzer PZ1 via four registers and the new data the keyboard has no effect on the
transistor T1 on entry of each digit via appears at the first output. On the locking and the unlocking sections. Now
the keypad. next (third) key depression, the second the keyboard data is routed through
Locking and unlocking sections. output data is shifted into the third bilateral switches of IC8.
The outputs of IC1 are buffered by two output and the first output data is The device/relay switching section.
sections of an octal tristate buffer 74LS244 shifted into the second output, while the The binary data corresponding to each
(IC2) before connecting the same to newly entered data appears at the first keypad entry is routed via switches of IC8
the locking and unlocking sections. IC output of the registers. Again on the next to the input of 1-of-10 decoder CD4028
74LS244 comprises two separately con- (fourth) key depression, the previously (IC11) to act as its address input. Q0 and
trollable 4-bit buffers designated as B1 loaded third output data shifts to the Q9 outputs of IC11 have not been used, as
and B2 in Fig. 2. For enabling the buffers, fourth output, the second output data stated earlier. The outputs corresponding
counter CD4017 (IC7) configured as a bist- shifts to the third output, first output to keyed digits 1 through 8 cause outputs
able flip-flop is used. Normally, the circuit data shifts to the second output, and Q1 through Q8 of IC11 to go high. Four
is initialised for accepting the unlocking the newly entered data appears at the dual-D CD4013 flip-flops (IC12 through
code since Q0 output of IC7 is initially first output. For example, if the entered IC15) are used as bistable switches at
high (which disables buffer B1) and Q1 locking code is 4567, we shall find outputs Q0 through Q8 of IC11 to hold
output is low (which enables buffer B2). that QA0 to QD0 is the nibble for units the relays in ‘on’ or ‘off’ states. The out-
When we depress program button place, QA1 to QD1 is the nibble for puts of IC11 are used as the clock pulses
S11 to enter the 4-digit locking code, tens place, QA2 to QD2 is the nibble for the corresponding flip-flops. Only the
Q1 output of IC7 goes high and Q0 for hundreds place, and QA3 to QD3 is keys for digits 1 through 8 are used for
output goes low. As a result, gate N1 the nibble for thousands place (refer the controlling the relays and other keys have
is enabled and gate N2 is disabled. table-1). no effect on the relay switching section.
Simultaneously, buffer B1 is enabled After entering the 4-digit locking Reset switch S14 connected to reset pins
and buffer B2 is disabled. The key- code, depress program switch S11 again of all the ‘D’ flip-flops can be used to reset
board data is now routed to the locking to inhibit the locking section and enable all the devices/relays together.
T
oday, all instrumentation systems 1. A set of inputs (16 or 8 depending
pertaining to industrial process upon the requirement) to be scanned and Parts List
control as well as domestic applica- controlled. The inputs include contact Semiconductors:
tions, like elevator control and centralised switches, relays, etc. IC1 - 80C31 microcontroller
IC2, IC4 - 74373 octal latch
air-conditioning control, involve some 2. Input buffers and/or isolating de- IC3 - 2764/27128/27256 EPROM
type of automatic fault-finding facility. vices to interface the actual inputs to the IC5 - ULN2803 octal buffer/
This facility detects the faulty condition microcontroller. driver
of the system and draws the attention of 3. A microprocessor/microcontroller IC6 - 7402 quad NOR gate
IC7, IC8 - CD40106 hex Schmidt trig-
the operator towards it, enabling him to to look after the entire fault-finding ger inverter
take suitable remedial action to ensure process, such as reading the inputs, T1 - CL100 npn transistor
the proper operation of the system. interpreting the faults, outputting the LED1-LED8 - Red LED
One such method is annuciation in corresponding fault condition with audi- Resistors (all ¼-watt, ±5% carbon, unless
which activation of a visual or a mechani- ble alarm, and self-testing of the system stated otherwise):
R1-R11 - 4.7-kilo-ohm
cal indicator (called annunciator) takes itself to ensure the overall functioning
R12 - 10-kilo-ohm
place when a remote switch or device of the system. R13 - 6.8-kilo-ohm
has been activated as a result of fault 4. Ouput indication devices such R14-R21 - 1.8-kilo-ohm
in certain part of the system. An audio LEDs, relays, and audible alarm along Capacitors:
alarm may also be associated with an- with their interfacing devices (like C1 - 10µF, 10V electrolytic
nunciators. latches). C2, C3 - 22pF ceramic disk
C4-C11 - 0.1µF ceramic disk
Here we present a microcontroller-
Miscellaneous:
based annunciator system that detects
up to eight different faulty conditions and Circuit description S1-S3
XTAL
- Push- to-on switch
- 12MHz crystal
informs the operator about them. It is as- Fig. 1 shows the circuit diagram of the PZ1 - Piezobuzzer
sumed that each faulty condition results annunciator built around an 80C31 micro- LINK.1-LINK.8 - Interlock/relay contact
jumper
in closing of one of the eight interlock links controller. Since the 80C31 (IC1) doesn’t
(designated as LINK.1 through LINK.8 have a program memory, an EPROM is
in Fig. 1). Eight flashing light-emitting used to store the firmware of the system. 14, and 15, respectively, through three
diodes (LEDs), corresponding to each of Octal 3-state latch IC 74373 (IC2) is used inverter buffer gates (CD40106).
the eight links, have been used as annun- for low-order address (A0–A7) decoding. Each output of the system is connected
ciators. Each annunciation also results You may use any one of 2764, 27128, to the respective LED through latch 74373
in an audible alarm. Here only the faults and 27256 EPROMs (IC3) by setting (IC4) and Darlington transistor driver
persisting for more than 20 milliseconds jumpers Jl and J2 as per details shown ULN2803 (IC5). The address-decoding
are considered as critical and faults per- in Table I. logic for the output is performed by two
sisting for less than 20 milliseconds are The combination of resistor R13 OR gates (7402) using address signal A15
rejected. and capacitor C1 provides the neces- and write signal WR of the 80C31. Here
Basic requirements of an annunci- sary slow-rising power-on-reset signal the address assigned to the LED output
ator circuit. An annunciator circuit con- to the microcontroller’s reset input pin port is 8XXXh, where X means ‘don’t care’.
sists of the following basic components: 9. The eight inputs (links’ status) to be The buzzer for generating the audible
scanned are connected to the eight input alarm is connected to P3.0 (pin 10) of
Table I pins (P1.0 through P1.7) of port 1 of the IC1 through inverter gate N14 and npn
Jumper Setting Details microcontroller via eight CMOS invert- transistor driver CL100. The system clock
Device J1 position J2 position ers (CD40106). Three additional inputs is generated using the 12MHz crystal con-
(P3.3 through P3.5) of port 3, which are nected across oscillator pins 18 and 19 of
2764 Open +5V (right)
controlled by switches marked TEST (S1), the microcontroller.
27128 Closed +5V (right)
ACCEPT (S2), and CLEAR (S3), are in- In this design the four ports available
27256 Closed A14 (left)
terfaced to the controller’s input pins 13, in the 8031 microcontroller are configured
Fig. 3: Actual-size, solder-side PCB layout for the 80C31 microcontroller-based annunciator
tual control circuit of systems like eleva- power supply of the actual system that using the 8031 cross assembler. It com-
tor control or centralised air-conditioner requires detection/indication of faults. prises the following routines:
control, GND and signal inputs of the 1. Self-test routine. To check the
eight links are removed and substituted reliable working of the system. Whenever
with corresponding relay contacts of the Firmware TEST button is pressed, all the LEDs
actual system. The relays operate off the The firmware of the system is developed must blink with a beep sound.
Readers’ comments debounce time at all, and the same is P. Prasad Babu
Q1. The ‘Microcontroller-Based Annun- supposed to be taken care of by the in- Through e-mail
ciation System’ is an incomplete project terlock control circuitry in a system. The The author D. Nedumaran replies:
because: annunciation system presented by the A2: In the case of an elevator system,
1. The text refers to a 20ms debounce author comes into play when a link has the door switch should be connected in
on the fault inputs, which is not imple- been closed due to a fault. (The link is ex- the links position in the input side of
mented in the hardware or the software. pected to close when a fault has persisted the controller. The door opened or closed
2. The LED output is not latched for for more than 20 milliseconds.) condition should be informed to the user
the faults reported. If link 1 opens, the 2. An LED for the reported fault stops in the same manner as the link open/close
LED will blink, but if link 1 is closed, the blinking once the fault is accepted but it condition is announced in my project.
LED stops blinking. The fault reported still remains on. Hence, it remains latched Likewise, the different relays, which
(status) must not change even if the fault until cleared. indicate the working or power-on condition
condition normalises before the operator 3. The LED output of a reported (de- of the compressor, fan, and other accesso-
accepts it. tected) fault is not cleared automatically ries in the central air-conditioning system
3. The LED output of an accepted fault on detection of a new fault. can be intimated/announced to the user.
is cleared when a new fault is reported The same annunciator circuit can be
and accepted. For all accepted faults, the Q2. The construction project ‘Microcon- employed to scan any input condition from
LED must remain on until ‘Clear’ button troller-Based Annunciator’ published in any system that gives +5V and GND for
is pressed by the operator. Dec. 2002 was interesting indeed. What ‘on’ and ‘off’ conditions, respectively.
Srikanth Kamath T. are the different faulty conditions that
Panther Electronics, Mangalore occur during the operation of an elevator
The author T.K. Hareendran replies: system and central AC system, and how
A1 : 1. The project does not talk of any we can detect them?
M
ost of the automatic emergency room becomes dark. In this situation,
Parts List
lights available in the market there is an actual need for light and this
Semiconductors:
light up whenever there is a emergency light turns on.
IC1 - LM339 quad comparator with
power cut. These don’t take into account Also, the circuit uses a constant volt- open-collector outputs
whether there is an actual need for the age charger and a low-battery protection T1, T2, T4,
light or not. Further, most of them don’t circuit in order to protect the battery from T5, T6 - BC547 npn transistor
T3, T8 - MJE3055 npn power transis-
incorporate constant voltage charging and over charging and deep discharging and
tor
low-battery protection circuitry, which thereby increases the life of the battery. T7 - BC187 npn transistor/
results in shorter battery life due to over BC637/BC639
charging and deep discharging. BR1 - 2amp bridge rectifier or
Here is an intelligent emergency Block diagram 4×1N5402 rectifier diodes
LED1 - Green LED
light circuit that overcomes all the above The block diagram of the intelligent ZD1 - 6V, ½-watt zener diode
problems. It senses the light intensity in emergency circuit is shown in Fig. 1. The ZD2 - 2.7V, ½-watt zener diode
a room to determine the actual need for battery charger section receives mains D1 – D9 - 1N4148 diode
LED2 - Red LED
light and lights up only if required. It is AC input and charges a 12V battery with
Resistors (all ¼-watt, ±5% carbon, unless
designed to remain off during power cuts constant voltage. The battery supplies the stated otherwise):
in daytime and after the room lights have power required by the inverter section. R1, R3, R4, R8,
been switched off at night. However, dur- The output of the inverter drives the load R11, R13, R14,
R24, R27 - 1-kilo-ohm
ing evening hours, when the room needs (tubes). R2, R30 - 220-ohm, 1-watt
to be illuminated by electric lamps, the The low-battery protection section con- R5, R6, R10,
circuit switches on the emergency light in tinuously senses the terminal voltage of R12, R15, R16,
the event of a power cut. the battery and when the battery voltage R19, R22, R23
R25, R31 - 10-kilo-ohm
This circuit intelligently senses the falls below 10.8 volts, it gets latched and R9, R21 - 100-kilo-ohm
light intensity of the room before power gives a stop signal to the inverter section, R17 - 2.2-kilo-ohm
cut and after a power cut. During evening thereby stopping the inverter. R18 - 22-kilo-ohm
hours, the room being illuminated by The mains sensor section senses R28 - 470-ohm
R29 - 4.7-kilo-ohm
electric lamps, the light intensity is more whether the input AC mains is present or VR1, VR3 - 10-kilo-ohm preset
before power cut. When there is a power not. When the AC input is present, it gives VR2 - 100-kilo-ohm preset
cut, all the electric lamps go off and the a stop signal to the inverter section, resets Capacitors:
C1 - 1000µF, 35V electrolytic
C2, C10 - 1µF, 25V electrolytic
C3 - 100µF, 25V electrolytic
C4, C5, C7-C9 - 10µF, 25V electrolytic
C6 - 0.1µF ceramic disk
C11 - 0.047µF, 100V polyester
Miscellaneous:
X1 - 230V AC primary to 0-15V
AC, 1-amp secondary trans-
former
X2 - 12V, 20/40-watt inverter
transformer
S1-S3 - On/off switch
LDR - 5mm highly sensitive light-
dependent resistor
- IC socket
- Heat-sinks for T3, T8
- Mica washers
- 12V/10AH sealed lead-acid
battery
- 20/40-watt fluorescent tube
Fig. 1: Block diagram of intelligent emergency light
Circuit
description
The intelligent emer-
gency light circuit
shown in Fig. 2 com-
prises battery charger,
mains sensor, intel-
ligent switching, low-
battery protection, and
inverter sections. The
circuit uses a quad op-
amp with open-collec-
tor outputs (LM339).
The pin configuration
of LM339 is shown in
Fig. 2.
The battery
charger section. The
input AC mains sup-
ply is stepped down
by transformer X1 to
deliver a secondary
supply of 0-15V AC at
1 amp. A bridge recti-
fier rectifies the output
of the transformer.
Capacitor C1 acts as
a filter to eliminate
ripples. It provides
unregulated DC output
voltage.
The unregulat-
ed DC voltage is
fed to an adjust-
able voltage regu-
lator circuit com-
Fig. 2: Circuit diagram of the intelligent emergency light prising transistors
T1, T2, and T3. By adjusting VR1,
the low-battery protection circuit, and electrical signal. This electrical signal is the output voltage of this regula -
disables the intelligent switching section. wave-shaped by a Schmitt trigger circuit tor can be adjusted to deliver an
A light-dependent resistor (LDR) is wired using op-amp. output of 13.5 volts. The output of
used as a light transducer, which con- The absence of disable signal from the the regulator is used to charge a
verts light intensity into a proportional mains sensor section initiates a power cut. 12V lead-acid battery.
The mains sensor section. The un-
W
ith this circuit you can evalu- cally generated and inserted into the inputs of
Parts List
ate the truth table as well as the logic circuit, and the corresponding outputs
plot Karnaugh (K) map of any are evaluated. Semiconductors:
Boolean function. The circuit comprises Boolean function generation. The IC1 - NE555 timer
IC2 - SN7493 divide-by-16 coun-
Table I ter
IC3 - HD74LS151P multiplexer
Arrangement of Min Terms IC4 - 74LS04 hex inverter
BCD I0 I1 I3 I2 I6 I7 I5 I4 IC5 - DM74LS154N 1-of-16
A decoder/demultiplexer
D1 - 1N4148 switching diode
000 001 011 010 110 111 101 100 LED1-LED4,
0 m0 m1 m3 m2 m6 m7 m5 m4 LED6-LED21 - Red LED
1 m8 m9 m11 m10 m14 m15 m13 m12 LED5 - Green LED
Notes. 1. A represents the MSB, while BCD represent the lower digits (with D as the LSB). Resistors (all ¼-watt, ±5% carbon, unless
2. I0 through I7 are the inputs for IC3. stated otherwise):
R1-R6 - 330-ohm
R7, R8 - 100-kilo-ohm
Table II
Capacitors:
Example Truth Table For Function F(A,B,C,D) timer NE555 (IC1) in Fig. 1 is C1 - 100µF, 16V electrolytic
used in astable mode to generate
A B C D F(A, B, C, D) C2 - 0.001µF ceramic disk
clock pulses. Time period T of C3 - 0.01µF ceramic disk
0 0 0 0 1 the astable is determined by the
0 0 0 1 1 Miscellaneous:
following relationship: SA, SB, SC - Triple-pole double-throw
0 0 1 0 1 T=(RA+RB) x C ln2 (TPDT) switch
0 0 1 1 1 where RA=RB = R7 = R8 =
0 1 0 0 0 100k and C=C1=100 µF in posi- Realisation of the truth table. The
0 1 0 1 0 tion 1 of switch SA. procedure for realising the truth table is
0 1 1 0 0 Hence, T=14 seconds. as follows:
0 1 1 1 1 The clock pulses are fed to 1. First, make a table for min terms
1 0 0 0 1 a modulus-16 binary counter m0 through m15 as shown in Table I.
1 0 0 1 1 built around SN7493 (IC2). The 2. Next, keeping aside the variable
1 0 1 0 1 outputs from pins 11, 8, 9, and A output of IC2, connect B, C, and D
1 0 1 1 1 12 of IC2 provide bits A, B, C, outputs of IC2 to select inputs S2
1 1 0 0 0 and D, respectively. (pin 9), S1 (pin 10), and S0 (pin 11),
1 1 0 1 1 A multiplexer is a good respectively, of IC3. (Note that S2
1 1 1 0 0 choice to generate any arbitrary has the highest priority and S0 the
1 1 1 1 0
Boolean function. To generate a lowest.) Now in Table I, encircle the
4-variable Boolean function, we min terms (mi) for which the given
two sections, namely, truth-table evalua- require an 8-of-l multiplexer. We employ function F becomes 1 and apply the
tor and K-map plotter of function F. HD74LS151P (IC3) for this purpose. following rules:
Table III
Truth-table evaluator Realisation of the Truth Table for the Given Example
We first consider four-variable function F(A, B, BCD I0 I1 I3 I2 I6 I7 I5 I4
A
C, D), where A represents the most significant
bit (MSB) and D the least significant bit (LSB). 000 001 011 010 110 111 101 100
For truth-table evaluation, combinations of bits 0 m0 m1 m3 m2 m6 m7 m5 m4
ABCD from 0000 through 1111 are automati- 1 m8 m9 m11 m10 m14 m15 m13 m12
T
his circuit can be used to connect marked telephone line is connected to in- the NAND gates are low and hence the
any one of four telephones to the dividual telephones via the N/C (normally corresponding Darlington coupled relay
telephone line with auto privacy. connected) contacts of their corresponding drivers are cut off.
When all the telephone handsets are in relays. When the handset of any telephone is
on-cradle position, the current through Initially, when the handsets of all the lifted, the corresponding optocoupler tran-
the optocoupler LEDs is inadequate to telephones are on the cradles, none of the sistor is switched on and its emitter goes
activate their inbuilt transistors. How- optocouplers conduct adequately and as high. This high output is inverted to low
ever, the ring signal passes to all the such the emitters of inbuilt transistors of state and applied to the inputs of all the
four telephones in parallel, since the ‘+’ all optocouplers are at low level. The tran- NAND gates, except the one correspond-
marked telephone line is connected to the sistor outputs available at the emitters ing to the lifted handset; for example, the
telephone instruments through combina- are inverted to logic 1 state and applied output of inverter N1 is not connected to
tion of inbuilt LEDs of optocouplers in to all the inputs of 4-input NAND gates NAND gate N5.
parallel with reverse diodes, while the ‘–’ N5 through N8. Thus the outputs of all Thus the relay corresponding to the
T
his circuit can be used to solve input a sawtooth 7404 (IC2) is used
two simultaneous linear equations wave having a low frequen- to invert the square -
using operational amplifiers, view cy (around 250 Hz). wave output of IC1.
the graphs of resulting straight lines on a The outputs of the two Thus we get two non-
CRO, and find the solution point. amplifiers are multiplexed overlapping comple-
Let the equations of two straight lines with the help of quad bilateral mentary clocks that
be: analogue switches S1 and S2 are fed to control
x = y ... (1) built around CD4066 (IC5); S1 pins 13 and 5 of the
x/5 + y/5 = 1 ... (2) and S2 act as complementary respective analogue
The above equations are simulated us- switches, i.e. when one switch Fig. 2: CRO display for switches S1 and S2
ing operational amplifiers (µA741) as shown turns on as its control pin goes Example 1 having terminals 1
in Fig. 1. The first op-amp (IC3) is used as a high (logic 1), the other switch and 2, and 3 and 4,
non-inverting amplifier with unity gain and turns off as its control pin goes respectively.
simulates Equation (1). The second op-amp low (logic 0), and vice versa. Fig. 2 shows the ob-
(IC4) functions as an adder and simulates The output of the first op-amp served pattern on the
Equation (2). is coupled to pin 1 of IC5 and first quadrant of the CRO
The input to the first amplifier is a that of the second op-amp to screen. The solution point
unipolar sawtooth wave that runs from its pin 4. The pole of the two has coordinates (2.5, 2.5),
0 to 5 volts. The output of this amplifier complimentary switches is as claimed by Eqns (1) and
is fed to one of the inputs of the adder returned to channel 2 of the (2). To get an enlarged
whose other input is tied to –5 volts. CRO. view, the origin may be
(In place of the sawtooth wave, a half T i m e r N E 5 5 5 ( I C 1 ) Fig. 3: CRO display for shifted to (–2, –2) using
sine wave with 5V peak value will also functions as an astable Example 2
position controls of the
suffice.) multivibrator and generates a CRO, keeping vertical sensitivity of both
The CRO is used as the x-y plotter. To square wave having duty cycle the channels at 1 volt/division.
view y versus x, we require a dual-chan- close to 50 per cent and fre- Unlike a computer program where you
nel CRO. To channel 1 of the CRO we quency of 1 kHz. Hex inverter could change the input variables and expect
the solution to come out automatically,
you’ve to change the circuit parameters to
solve another set of simultaneous linear
equations.
For example, consider the following set
of equations:
x = y ... (3)
x +2y = 5 ... (4)
To solve the above equations, change
resistor R3 in Fig. 1 from 10 kilo-ohms
to 20 kilo-ohms and the voltage applied
to resistor R4 from regulated –5 volts to
regulated –2.5 volts. The solution point
for this set of equations is (1.66*,1.66*),
where * denotes recurring. The correspond-
ing display on the CRT screen is shown
in Fig. 3.
Fig. 1: Schematic circuit
Low-Power Broadcast
Transmitter
d. prabakaran
T
his 0.5-watt AM broadcast band comprising variable capacitor VC1 and creased from 12 volts to 24 volts. Transis-
transmitter can radiate AF modu inductor L1 is tuned to the crystal’s fre- tor T1 (BD139) needs to be provided with
lated signals up to 3 km radius. quency by adjusting VC1. a suitable heat sink to withstand higher
By using properly matched antennae like For simplicity, a single stage is used heat dissipation.
half-wave dipole, the coverage may be for power amplification and modulation. Audio signals are coupled to the car-
increased to even 10 kilometres. The crystal oscillator itself operates in rier oscillator via one of the two secondar-
The circuit uses a quartz crystal for class-C
a stable and highly accurate frequency. mode to
Quartz crystals typically have a quality obtain a
factor (Q) of about 100,000 and provide high ef-
roughly a thousand times greater fre- ficiency.
quency stability than the conventional LC To obtain
tank circuits. higher
The circuit is designed for 6MHz power, the
broadcast band operation and can be used operating
for other frequencies as well by simply voltage
changing the crystal. The tank circuit can be in-
U
sing this circuit you can commu- light from a laser torch is used as the 500 metres. The phototransistor of the
nicate with your neighbours carrier in the circuit. The laser torch can receiver must be accurately oriented to-
wirelessly. Instead of RF signals, transmit light up to a distance of about wards the laser beam from the torch. If
there is any obstruction in the path of the
laser beam, no sound will be heard from
the receiver.
The transmitter circuit (Fig. 1) com-
prises condenser microphone transistor
amplifier BC548 (T1) followed by an
op-amp stage built around µA741
(IC1). The gain of the op-amp can be
controlled with the help of 1-mega-ohm
potmeter VR1. The AF output from IC1
is coupled to the base of transistor BD139
(T2), which, in turn, modulates the
laser beam.
The transmitter uses 9V power
supply. However, the 3-volt laser torch
(after removal of its battery) can be
directly connected to the circuit—with
the body of the torch connected to the
emitter of BD139 and the spring-loaded
lead protruding from inside the torch to
circuit ground.
The receiver circuit (Fig. 2) uses an
npn phototransistor as the light sensor
that is followed by a two-stage transis-
tor preamplifier and LM386-based au-
dio power amplifier. The receiver does
not need any complicated alignment.
Just keep the phototransistor oriented
towards the remote transmitter’s laser
point and adjust the volume control for
a clear sound.
To avoid 50Hz hum noise in the
speaker, keep the phototransistor away
from AC light sources such as bulbs. The
reflected sunlight, however, does not cause
any problem. But the sensor should not
directly face the sun.
Mobile Phone
Battery Charger
t.k. hareendran
M
obile phone chargers available instance, from a vehicle battery) can also ground rail of IC1 raises the output voltage
in the market are quite expen be used to energise the charger, where to 7.8V DC. LED1 also serves as a power
sive. The circuit presented resistor R4, after polarity protection diode indicator for the external DC supply.
here comes as a low-cost alternative to D5, limits the input current to a safe value. After constructing the circuit on a
charge mobile telephones/battery packs The 3-terminal positive voltage regulator veroboard, enclose it in a suitable cabi-
with a rating of 7.2 volts, such as Nokia LM7806 (IC1) provides a constant voltage net. A small heat sink is recommended
6110/6150. output of 7.8V DC since LED1 connected for IC1.
The 220-240V AC mains supply is between the common terminal (pin 2) and
downconverted to 9V AC by transformer
X1. The transformer output is rectified
by diodes D1 through D4 wired in bridge
configuration and the positive DC supply
is directly connected to the charger’s out-
put contact, while the negative terminal
is connected through current limiting
resistor R2.
LED2 works as a power indicator with
resistor R1 serving as the current limiter
and LED3 indicates the charging status.
During the charging period, about 3 volts
drop occurs across resistor R2, which
turns on LED3 through resistor R3.
An external DC supply source (for
I
n some indoor games we require a When the clock pulses are applied to
Decoded Segment Outputs of IC CD4033
die to decide the number of steps to IC2 via switch S1, it should count 1 through
Count a b c d e f g Co
go forward or a coin to take an arbi- 0 1 1 1 1 1 1 0 1 6 only. So we have to reset it on the seventh
trary decision between the two options 1 0 1 1 0 0 0 0 1 count. In the conventional circuit the seven-
available. Here we present a digital die- 2 1 1 0 1 1 0 1 1 segment outputs are decoded using gates.
cum-alpha display tosser circuit with the 3 1 1 1 1 0 0 1 1
4 0 1 1 0 0 1 1 1
Here we’ve used the pulse method in order
following salient features: to reduce the total cost of the unit. On ap-
5 1 0 1 1 0 1 1 0
• Choice of NAND, NOR, or Schmitt 6 1 0 1 1 1 1 1 0 plying a positive going pulse to reset pin 15
trigger NAND gate ICs for oscillator 7 1 1 1 0 0 0 0 0 of IC2 on the seventh count, the counter is
• Low component count 8 1 1 1 1 1 1 1 0 reset to zero.
• Use of passive components for re- 9 1 1 1 1 0 1 1 0
The table shows the decoded segment
setting outputs of IC2. On the seventh count,
• Alpha display for tosser relationship: the segment b output (pin 12) goes from
• Choice of 6V or 9V power supply F = 0.45/R1C1 low to high. All other segment outputs
• Low power consumption where F is in hertz, R1 in ohms, and C1 go high for other numbers. The segment
The circuit comprises three sections, in farads. b output is connected to the differentia-
namely, oscillator, counter, and display. For digital display of numbers 1 tor circuit comprising capacitor C2 and
NAND gates N1 and N2 and their through 6, we use decade counter/ resistor R4. So on the seventh count, a
associated components form the oscilla- decoder/7-segment LED driver CD4033 sharp high-going pulse is produced that
tor with its output at pin 4 of gate N2. (IC2) and common-cathode 7-segment resets counter IC2 to zero. Capacitor C2
The oscillator frequency is given by the display LT543. discharges quickly through resistor R3
connected across it, during the low
state of segment b.
Still there is a problem. The coun-
ter must be reset to ‘1’ and not ‘0’ for
our die. After resetting, the counter
has to advance by one count, which
can be done in two ways: (i) by apply-
ing a high-going clock pulse to clock
input pin 1, keeping counter-enable
pin 2 low, or (ii) by keeping clock
input pin 1 high and inputting the
low-going clock pulse to clock-enable
pin 2.
During resetting, the second
method is employed. When the clock
input goes high, the counter advanc-
es. If the number to be displayed is
‘7’, the differentiator circuit produces
a sharp high-going pulse and resets
the counter. As clock enable pin 2 is
also connected to the differentiator
circuit, during the low-going transi-
tion of the sharp pulse, the counter
advances once again and resets to ‘1’.
All this happens at a very fast rate.
Shortwave Transmitter
D. Prabakaran
T
his transmitter circuit operates in The circuit consists of a mic ampli- bias, while resistor R9 is used for sta-
shortwave HF band (6 MHz to 15 fier, a variable frequency oscillator, and bility. Feedback is provided by 150pF
MHz), and can be used for short- modulation amplifier stages. Transistor capacitor C11 to sustain oscillations.
range communication and for educational T1 (BF195) is used as a simple RF oscilla- The primary of shortwave oscillator coil
purposes. tor. Resistors R6 and R7 determine base and variable condenser VC1 (365pF,
T
he sound produced by clap is from transistor T1 is applied to trigger pin from the mic, it goes into conduction.
sensed by the condenser mic and 2 of timer IC NE555 that is configured as As a result, its collector drops to trigger
amplified by transistor T1. The a monostable multibrator (time constant monostable IC1. The pulse at output pin
sensitivity of the mic is adjusted by vary- T = 1.1 RC = 0.5 second). 3 of IC 555 is used as a clock for all the
ing 47-kilo-ohm preset VR1. The output When the transistor receives input 7474 dual ‘D’ flip-flops (IC2 through IC4)
configured as a ring
counter.
When the power
is initially switched
on, only the first flip-
flop is set and others
are reset (cleared).
On receipt of the first
clock pulse, logic ‘1’ Q
output of the first flip-
flop gets shifted to the
second flip-flop. Thus
for each clock pulse
(for each clap), logic 1
output keeps shifting
in a ring fashion.
Q outputs of all
the six flip-flops are
connected to the cor-
responding relay
units. For simplicity,
only one relay unit
is shown in the fig-
ure, where Q output
applied to the base
of Darlington pair of
transistors TA and
TB drives the relay
coil connected to the
collector of transistor
Fig. 1 TB. Initially, at power
Readers’ comments distance by placing a transistor amplifier Electronics Projects Vol. 22).
Q1. I have converted the circuit to a clap to increase the gain? If this regulator is converted into a
switch by using two 7474 ICs and feed- P. Brahmanandam clap switch, use only a single flip-flop
ing Q2 output to D1 input of the first IC. Brahimpal from IC2 (7474) and connect Q1 (pin 6) to
After 10 to 15 claps, this circuit doesn’t The author, Jaydip A. Dhole, replies: D input (pin 2) and take the output from
respond any further, why? The circuit A1. First of all, check all the connections. Q1 (pin 5) as shown in Fig. 1 here. This
works up to a metre only. How can I Then check the working of the monostable works as a toggle flip-flop and the device
increase the range and the sensitivity multivibrator (IC 555) by connecting an alternately turns ‘on’ and ‘off’. Connect
of the circuit? I varied the 47k preset, LED via a 330-ohm series resistor at pin 3 the power-on-reset signal to reset pin 1,
but the circuit didn’t respond when the of the IC 555. It should work satisfactorily so the device is in ‘off’ state at power-on. It
distance was increased. Also the clap- up to 2 metres. To increase the range, refer appears that you’ve connected Q2 output
ping needs to be done very strongly and the article ‘Ultra-Sensitive Solidstate Clap to D1 input, which becomes a 2-bit ring
very near to the mic. Can I increase the Switch’ published in May 2001 issue (or counter.
FM Booster
Pradeep G.
H
ere is a low-cost circuit of an FM
booster that can be used to listen
to programmes from distant FM
stations clearly. The circuit comprises
a common-emitter tuned RF preampli-
fier wired around VHF/UHF transistor
2SC2570. (Only C2570 is annotated on the
transistor body.)
Assemble the circuit on a good-quality
PCB (preferably, glass-epoxy). Adjust
input/output trimmers (VC1/VC2) for
maximum gain.
Input coil L1 consists of four turns of
20SWG enamelled copper wire (slightly
space wound) over 5mm diameter former.
It is tapped at the first turn from ground
lead side. Coil L2 is similar to L1, but has
only three turns. Pin configuration of tran-
sistor 2SC2570 is shown in the figure.
T
his hex-to-analogue converter finds (logic 1) or 0V (logic 0).
application in instrumentation. The binary outputs are
The inputs are taken from a hex connected to a standard
keypad as shown in Fig. 1. You can also R-2R digital-to-analogue
use pushbutton tactile switches instead converter ladder resis-
of keypad switches. The keypad is wired tor network comprising
such that it produces active-low binary resistors R1 through
code at the output terminal of four 8-in- R10. The output of
put 74LS30 NAND gates (IC1 through the ladder network is
IC4). an analogue voltage
The active-low outputs of IC1 through Fig. 1 proportional to the bi-
IC4 are inverted by hex inverter 7404 nary input, which, in
(IC5). The four non-inverted outputs from marked Q0(LSB) through Q3(MSB) rep- turn, is equal to the depressed hex
IC1 through IC4 and four inverted outputs resent the binary number corresponding digit key. Use 1% tolerance metal film
from IC5 are applied to the control pins of to the hex digit key depressed on the resistors (mfR) for ladder network and
two CD4066 quad bidirectional analogue keypad. regulated power supply for the circuit.
switches (IC6 and IC7). The outputs The binary output bits are either +5V This will enhance performance of the
circuit.
The analogue
equivalent volt-
age is applied to
LM301 high-per-
formance op-amp.
The gain is ad-
justed using preset
VR1 such that it
works in the linear
region. Preset VR2
is adjusted to get
0V output when
both input pins 2
and 3 are shorted
together.
(EFY Lab
note. Gain con-
trol preset VR1 was
adjusted to get an
output voltage
reading of 315 mV
with hex switch 1
(LSB) depressed.
The outputs meas-
ured for depression
of digits 3, 7, and F
on the keypad were
found to be 998
mV, 2.378 volts,
and 5.12 volts, re-
spectively, showing
a fairly linear out-
put proportional to
the depressed hex
key value.)
Fig. 2
T
he starting current drawn by a 3- sented here has all the desired features rents for energising the coils of relays RL1,
phase motor connected in star con and protections. RL2, and RL3 (in appropriate sequence).
figuration is one-third of the cur- Since interlocking AC contactors are We have used here 2-way changeover
rent drawn by the motor with windings in used in the circuit, single-phasing preven- switches for S4 (delta), push-to-off switch-
delta configuration. Once the speed of the tion is easily realised. These contactors es for S1 (stop), and push-to-on switches
motor builds up while running in star con- also have the under-voltage tripping fea- for S2 (start) and S3 (star).
figuration, adequate back emf is available ture, because an under-voltage will not be AC voltmeter M1 and a 230V bulb (for
to restrict the current to a safe value, even able to energise the contactors. visual indication) are provided for check-
when the configuration is changed from Separate push switches S1 through ing the voltage of individual phases using
star to delta. The same principle is used S4 are provided for stop, start, star, and 3-way rotary switch S5. For simplicity,
in star-delta starters. The simple 3-phase delta connections of the starter. These four over-voltage protection task is entrusted
star-delta pushbutton motor starter pre- switches are operated with very low cur- to wire-link fuses F1 through F3 (on
Multitester With
Audio-Visual Indication
D. Mohan Kumar
T
his simple and economical current flows through the LED and the of transistor T1 depends on the current
multitester works on 3V pen buzzer to activate them. The base biasing flowing through resistor R1, which, in
torch cells. It is useful for check-
ing the continuity between two points Component Visual indication Audio indication
and also the condition of electronic com-
ponents like resistors, capacitors, diodes, Good Bad Good Bad
photodiodes, and transistors, which are Resistor LED on LED off Buzzer sounds No sound
indicated visually as well as through Disc capacitor Single flash No flash Click sound No sound
audio. Electrolytic LED lights and Continuous light Audio tone Continuous tone
The circuit utilises two silicon tran- capacitor gradually goes gradually goes off
sistors BC547 and BC557 and a few pas- off when red when red probe is
sive components. Transistors T1 and T2 probe is connected connected to
to negative and negative and black
form a complementary pair. The black black to positive to positive
probe of the tester is connected to the
Diode/ LED on when LED on when Audio tone when Continuous audio
base of T1 through R1. The red probe is LED/ red probe is probes are red probe is tone when probes
connected to the emitter of T2 and the Photo diode connected to reversed connected to are reversed
positive supply. anode and anode and black
When the probes are shorted, transis- black to cathode. No audio when to cathode.
LED off when probe reversed
tors T1 and T2 conduct due to the forward
probes reversed
biasing of transistor T1. As a result the
IR Remote Switch
K.S. Sankar
I
magine the convenience of selecting remotely switch on/off any electrical device IR IC receiver (Siemens SFH-506-38 or
TV channels using your remote and through a relay using the normal TV/VCR/ equivalent) that can detect 38kHz burst
then pointing the same remote to VCP/VCD remote control unit. It works up frequency generated by a TV remote.
your switchboard to switch on/off the fan to a distance of about 10 metres. The output pin of IR sensor goes low
or the tubelight. Here is a simple circuit to The circuit is built around a 3-pin when it detects IR light, triggering the
monostable (1-sec-
ond) built around
timer NE555. The
output of the mono
toggles the J-K flip
flop, whose Q out-
put drives the relay
through SL100 npn
transistor (T1).
LED2, LED3,
and LED4 are used
to display the sta-
tus of each output
stage during circuit
operation. Back-
EMF diode D1 is
used for protection.
Transistor T1 is
configured as an
open-collector out-
put device to drive
Readers’ comments
tion, it is found that the
Q1. When power is switched on the timer
3-pin IR receiver normally
automatically gets triggered and the relay
generates a negative pulse
energises. This occurs when the power is
only for a fraction of a
switched on again after it is switched off.
second.
How can I overcome this problem?
The point between re-
Gorrepatti Raja Sekhar
sistors R1 and R4 reaches
Through e-mail
about 2.4V on a 5V supply,
Q2. When we press the electric board
which enables the transis-
switches to turn on/off the fan, tubelight,
tor and the timer. Resistor
etc in the same room in which this circuit
R1 reduces the current
is connected, false switching occurs in the
and charging rate of the
circuit. Please suggest me some solution.
capacitor wired in parallel
Samir Kulkarni
across resistor R4 (100k).
Through e-mail 555 slow-start circuit in astable or monostable mode This takes approx. two
In answer to both questions, the au-
seconds for the values given. On removal
thor, K.S. Sankar, replies: avoid false triggering in monostable mode
of the power supply, the capacitor finds
Most 555 timer circuits configured in mon- when the IR receiver is used at its input.
the shortest path to discharge through the
ostable mode for long time periods suffer Pin 4 (reset) of IC 555 is held low by
diode (1N4148) and resistor R2 (10k) and
from false triggering during power-on. a 10k resistor instead of connecting it to
get ready for another slow power-on mode.
This is not a problem with 555 but it is Vcc. The IC can be enabled only if pin 4
This concept is called a slow charge-and-
caused by the sensor used in the circuit, is held high. This is achieved by using
quick discharge network. This makes the
which in most cases generates a short a small timing circuit and npn transis-
circuit more sturdy against heavy power
negative pulse that is sufficient to trigger tor 2N2222. If the base voltage of the
fluctuations.
the monostable. If the output of 555 is transistor is more than 0.6V, it conducts
The capacitor value can be changed to
used to control a relay for switching on to provide Vcc to pin 4 to enable IC 555.
provide the amount of delay required in
high-voltage electrical devices, this may Now 555 is ready to accept a low pulse at
the circuit. Resistor R2 for discharge may
prove to be an expensive affair. its trigger pin 2.
be unnecessary in most circuits, since any
Normally, the output of any 3-pin IR The time delay designed here is about
load in the supply line can act as a quick
receiver goes low momentarily on power- two seconds. This is more than sufficient
discharge route. Even a power-on LED in
on. The figure shown here can be used to to avoid any false triggering. On observa-
the circuit is sufficient.
Ding-Dong Bell
Praveen Shanker
T
his simple and cost-effective door a speaker directly, as
bell circuit is based on IC 8021-2 this puts strain on the
from Formox Semiconductors device. Therefore a
(Website address: fortech@mantramail. complementary-pair,
com). It is an 8-pin DIP IC whose only two-transistor ampli-
four pins, as shown in the circuit, have fier is used to am-
been used. plify the sound to a fair
The IC has an in-built circuitry to level of audiblity. You
produce ding-dong sound each time its may either use a piezo
pin 3 is pulled low. The sound is stored tweeter or an 8-ohm,
in the IC as bits, as in a ROM. The sound 500mW speaker at the
output from the IC can’t however drive output.
During the standby
5.5MHz/10.7MHz IF-FM
Signal Generator
D. Prabakaran
T
his 5.5MHz/10.7MHz IF-FM sig diodes are specially manufactured to been used as L1 here) in conjunction with
nal generator is useful for align exploit this effect, but even the ordinary ½ 2J gang capacitor.
ment of FM radio receivers and TV 1N4001 silicon diode can be used for the The oscillator’s centre frequency can
sound IF circuit. It consists of the follow- same purpose. be changed by simply varying the capaci-
ing: Capacitor C2 and varicap diode D1 tance of diode D1 using potmeter VR1, as
1. A 5.5/10.7MHz RF oscillator based are wired in series, with C2 providing the stated earlier. Similarly, the oscillator
on readily available ceramic filter necessary DC isolation between transis- frequency can be modulated around its
2. AF signal generator comprising tor T1 and diode D1. This combination is centre value by feeding an external AF
NE555 timer IC effectively wired across transistor T1’s signal from NE555 (used as AF signal
The RF oscillator built around tran- tuned circuit. The tuned circuit is formed generator) to the R4-VR1 junction via
sistor T1 (BEL187) can be tuned using using the readily-available shortwave capacitor C4, as shown in the figure, to
potentiometer VR1 in conjunction with oscillator coil (whose primary winding has provide FM signal.
reverse-biased sili-
con diode D1 that
serves as an in-
expensive varicap
diode or voltage-
variable capacitor.
It is a simple fact
that when a silicon
diode is reverse bi-
ased it exhibits a
capacitance that
varies inversely as
the applied voltage,
i.e. the capacitance
is higher when the
voltage is low, and
vice-versa. Varicap
Doctor’s Switch
Praveen Kumar
T
his circuit is meant for use in taneously with the calling bell sound. bulb glows along with the sound of the
conjuction with the calling bells to When the calling bell switch is pressed calling bell. During the day time, only the
switch on an assciated bulb simul- during the night time, the associated calling bell is activated, i.e. the bulb does
H
ere is a remote control circuit R1+R2 that filters out 50kHz signals, as it offers
that uses the AC mains line as a D= ×100 a low impedance at resonance frequency
R1+2R2
medium between the transmitter of 50 kHz and blocks 50Hz line frequency
and the receiver. It overcomes the draw- The timer output drives transistor T1 signals by offering a very high imped-
backs of line of sight, obstacles, and short through resistor R3. Coupling capacitor ance at off resonance frequency of 50 Hz.
range, which are usually inherent in IR C4 is charged and discharged continu- The resonant frequency of L1-C10 series
and radio remote control systems. ously at the rate of 50 kHz through resis- combination is:
The transmitter (Fig. 1) built around tor R4 and transistor T1. This generates 1
555 timer IC is powered by step-down a 50kHz wave that is superimposed upon fr=
transformer X1. Timer 555 is wired the AC mains through coupling capacitor 2π √l1c10
as an astable multivibrator that gener- C4. The 50kHz pulse train travels along where L1 is the inductor value in
ates 50kHz signals. The output frequency the mains line to reach the remote-end henry and C10 is the capacitor value in
(fo) is given by the following relation- receiver. farad.
ship: The receiver (Fig. 2) comprises a The next stage built around IC 741
1.45 detector circuit that detects the presence acts as an active narrow-bandpass filter
fo=
(R1+2R2) C2 of 50kHz signals on the AC mains line. that amplifies 50kHz signals and attenu-
Capacitor C10, along with inductor L1, ates
The % duty cycle (D) is: forms the passive series resonant circuit all other frequencies. The bandpass
T
his easy-to-construct high-power tor T1. The result is a high-power audio the telephone input terminal is used
telephone extra ringer is useful for and visual ring indication, good enough to for circuit protection only. Neon lamp
industrial areas where it is difficult draw the attention of the telephone user. L1 and resistor R1 are used to provide
to hear telephone ring signals due to noisy The whole circuit can be wired on a visual indication for the telephone bell,
background. general-purpose PCB. A plastic enclosure which may prove useful in the case of
The 110-240V input AC mains volt- is recommended, as most components are power failure. Capacitor-resistor com-
age applied to the circuit is converted to directly connected to the high-voltage bination C5-R7 across MT2 and MT1
a low DC voltage (9 volts) and current mains supply. terminals of the triac form the usual
(about 40 mA) by resistors R5 and R6, and The metal-oxide varistor (MOV) in snubber network.
capacitor C4. Diodes
D2 through D5 act as
bridge rectifiers and C3
is the filter capacitor.
The use of zener diode
ZD1 is crucial for volt-
age regulation.
Whenever an in-
coming ring signal is
detected by capacitor
C1, resistor R2, and
optocoupler IC1, the
optocoupler’s transistor
starts conducting in
synchronism with the
ring signal and controls
the switching of triac
with the help of transis-
H
ere is a simple circuit for you return, you can simply pick up the the receiver (handset), it drops to about
music-on-hold with automatic handset again and continue with the 9 volts. The minimum voltage required
shut off facility. During telephone conversation. to activate this circuit is about 15 volts.
conversation if you are reminded of some The glowing of LED1, while the music If the voltage is less than 15 volts, the
urgent work, momentarily push switch S1 is generated, indicates that the telephone circuit automatically switches off. How-
until red LED1 glows, keep the telephone is in hold position. As soon as the handset ever, initially both transistors T1 and T2
handset on the cradle, and attend to the is picked up, LED1 is turned off and the are cut off.
work on hand. A soft music is generated music stops. The transistor pair of T1 and T2
and passed into the telephone lines while Normally, the voltage across telephone performs switching and latching action
the other-end subscriber holds. When lines is about 50 volts. When we pick up when switch S1 is momentarily pressed,
T
his solidstate DC switch can be Hence a latch
assembled using just three is formed and
transistors and some passive com- transistor T2
ponents. It can be used to switch on one (as also transis-
gadget while switching off the second tor T1) contin-
gadget with momentary operation of ues to conduct,
switch. To reverse the operation, you just which activates
have to momentarily depress another gadget 1 and
switch. LED1 glows.
The circuit operates over 6V-15V DC Conduc-
supply voltage. It uses positive feedback tion of transis-
from transistor T2 to transistor T1 to keep tor T2 causes
this transistor pair in latched state (on/ its collector to
off), while the state of the third transistor be pulled to-
stage is the complement of transistor T2’s wards positive
conduction state. rail. Since the
Initially when switch S3 is closed, collector of T2
both transistors T1 and T2 are off, as of LED2. is connected to the base of pnp transis-
no forward bias is available to these, When switch S1 is momentarily tor T3, it causes transistor T3 to cut
while the base of transistor T3 is depressed, T1 gets the base drive and off, switching off the supply to gadget
effectively grounded via resistors R8 it grounds the base of transistor T2 via 2) as well as extinguishing LED2. This
and R6 (shunted by the load of the resistor R4.Hence transistor T2 (pnp) also status is maintained until switch S2
first gadget). As a result, transistor T3 conducts. The positive voltage available at is momentarily pressed. Depression of
is forward biased and gadget 2 gets the collector of transistor T2 is fed back to switch S2 effectively grounds the base
the supply. This is indicated by glowing the base of transistor T1 via resistor R3. of transistor T1, which cuts off and thus
T
his car parking guard circuit is buzzer PZ1 beeps at a rate determined by
basically an infrared active the values of timing components R6, R7,
proximity detector. It is built using and C7. Simultaneously, DC lamp driver
easily available components and is ener- transistor T3 controlled by the output
gised by the DC supply going to the car'fs of IC2 causes lamp L1 to blink, which
reversing lamp. serves as a warning signal. This condition
The DC supply going to the car’s is maintained until IC1 receives a valid
reversing lamp is converted to 5 volts 20kHz signal at its pin 3.
using regulator LM7805 and supplied to Whenever the IR beam radiated by
the complete circuit, except transistor T3 IRLED1 and IRLED2 is reflected by a
(and lamp L1), for which 12 volts potential nearby object (at the back side of the
developed across capacitor C2 is used. Di- vehicle), IC1 receives 20kHz reflected
ode D3 protects the circuit against wrong signal at its pin 3 on detection by pho-
supply polarity. totransistor T2 (in Darlington configura-
During car reversal, the high-efficien- tion). As a result, IC2 pulls its output
cy IRLEDs (IRLED1 and IRLED2), driven pin 8 low as it gets locked to the detected
by pnp transistor T1 with a modulating 20kHz tone.
frequency of about 20 kHz (available Consequently, reset pin 4 of timer IC2
from pin 5 of IC1 LM567, the versatile is also pulled low and thus the astable is
PLL tone decoder IC), emit infrared light. disabled. Pin 3 of IC2 goes low and the
(1-ohm resistor R1 limits the IRLED buzzer starts sounding continuously (LED
current.) At this juncture, the output remains lit) to alert the driver to stop the able and attractive cabinet. Fig.
at pin 8 of IC1 is at high level and the vehicle at once. 2 shows a proposed enclosure. Fit
astable built around timer LM555 (IC2) After wiring and testing, en - the LED and buzzer in dashboard
is enabled. As a result, LED1 blinks and close the circuit board in a suit- panel. For interconnection, use
flexible wires with sufficient
strands.
Now attach the gadget to the
back bumper of the vehicle, prefer-
ably at its centre-point, as shown
in Fig. 3, and make supply con-
nections in parallel to the reverse
lamp, ensuring correct polarity.
After careful checking, test run
and check the result.
The normal infrared detection
range is about 100 cm, which can
be further increased by adding
suitable lenses/reflectors.
Note. In place of part numbers
of IRLED1, IRLED2, and photo
Darlington transistor T2 used here,
you may use locally available types
with high efficiency/sensitivity.
T
his circuit is a modified form of of directly driving 1.5-watt power at 9 be used.
FM receiver circuit published in volts into a 4-ohm speaker. This power is The amplified IF signal from the IF
March ’93 issue of EFY or Electron- enough for portable operation. A separate amplifier limiter inside CA1190 is con-
ics Projects Vol. 14. The modified part built-in regulated power supply provides nected to the active-low pass filter. The
pertains to the use of IC CA1190 and 9V different voltages to various function- filter shapes the response (amplitude vs
regulator 7809. CA1190 has been used to al blocks within the IC. CA1190 is frequency) to peak around 5.5 MHz and
replace TBA120S and LM741. CA1190 available in 16-pin bentdown wing tab removes unwanted high-frequency content
also comprises an audio power amplifier heat-sink. package in the signal. It is followed by a
stage (which was not a part of the earlier Variable capacitor VC1 is not differential peak FM detector that consists
circuit). easily available in the market, but of a highinput impedance differential am-
The front end of the circuit is built one can make it using a 2xPVC gang plifier with detector coil L3 and 5.5MHz
around AN7213 (IC1), followed by the IF condenser by removing some of its ceramic filter connected between the two
amplifier stage built around transistor plates. (Only one plate is needed for inputs of the differential amplifier. The
BC109 (T1). The 5.5MHz IF output from each of sections (a) and (b) of the detected audio signal is applied to the
IC1, as amplified by transistor BC109, is 2X gang condenser.) Also remove the AF power amplifier through DC volume
applied to the FM detection stage built trimmer from the top of the gang. Coil control.
around BEL IC CA1190, which is nor- L2 is a centre tapped coil having sec- Instead of FM IF transformer, we’ve
mally used in TV receivers as TV sound tions ‘a’ and ‘b’ (see diagram). You can used ceramic filters, as these are compact,
IF system. adjust lengths of L1 and L2, if required, have high selectivity, and don’t require
The CA1190 includes a multistage to obtain a slight variation in frequency. alignment, unlike the conventional LC
IF amplifier, limiter, FM detector, and For IF stage alignment, 5.5MHz FM tuned circuits.
an audio power amplifier that is capable signal from the signal generator may
T
his 8085 kit-based interface cir-
cuit controls 64 relays. It is as-
sumed that the 8085 kit has an
8255 programmable peripheral interface
IC, whose ports have been extended via
suitable connectors in this circuit. The
8255 has been configured for mode 'e0'f
operation. Ports A, B, and C of 8255 are
configured as output ports using control
word 80hex. The various outputs of 8255
after buffering by 74LS244 are used as
follows:
PA0: Connected to pin 13 of IC 74259
for relay switching (logic 1 for 'eon'f and
logic 0 for 'eoff'f)
PB0, PB1, PB2: As address for IC
74259 to select up to eight different relay
numbers
PC0, PC1, PC2: As address for
74LS138 to select up to eight different
IC 74259.
The interface circuit comprises 1-of-8
demultiplexer IC 74138, octal buffer/driver
IC 74244, and IC 74259 (configured here
as 8-bit addressable latch). The supply
for these ICs is taken from the 8085 kit plexer IC 74138. The output at pin 15 is play shows ‘num’. Enter the relay number
itself. For relays, an external 12V supply used as a chip select line for IC 74259. (decimal numbers from 00 to 64 can be
is used. Similarly, it is possible to connect the re- used if all ICs and relays are in place) and
Octal buffer/driver IC 74244 has open- maining seven outputs as chip select lines press ‘next’. The corresponding relay will
collector outputs. It is used as a buffer for other seven 74259 ICs. So a total of 64 be activated, with the relay number also
for outputs from 8255. The relay on/off relays can be controlled. displayed in the kit.
information available PA0 pin of port A is The relays are controlled via relay For addressing peripheral devices
used as data input at pin 13 of IC 74259. driver transistors 2N2222. If the input (8255 and 8279), the I/O mapped address
The three bits PB0 through PB2 are used voltage to the base is low (logic 0), the scheme is employed in the kit. So the us-
as a 3-bit address for IC 74S259. transistor remains turned off, while logic ers need to modify the addresses for the
IC 74259 is used here in 8-bit ad- 1 output activates the relay. A diode in peripherals in accordance with the specific
dressable latch mode. In this mode. The par-allel with the relay coil protects the kit used by them.
data at its pin 13 corresponds to the data transistor from the high voltage induced (EFY lab note. The program may
for the selected output (1=‘on,’ 0=‘off’). in the relay coil during its turn-off pe- have to be slightly modified, since key-
The remaining outputs are not affected riod. board/display routine may require use
and stay in their previous state, so the When the 8085 program for relay se- of specific registers in different kits.
other relays controlled by these pins are lection is executed in the kit, the display Also, depending on the type of display
not affected. shows ‘code’. Enter the code (‘1’ for switch- (common-cathode/common-anode) used,
The 3-bit data at PC0 and PC2 are ing on the relay and ‘0’ for switching off the coding of characters to be displayed
used as a 3-bit address for 1-of-8 multi- the relay) and press ‘next’. Now the dis- would differ.)
RAM locations used for the program : 6000-60A0 (9000-90A0) Port-C (output) of 8255 : 02 (0A)
Stack pointed initialised at : 80FF (90FF) Control word of 8255 : 03 (0B)
Port-A (output) of 8255 : 00 (08) Control word of 8279 : 61 (01)
Port-B (output) of 8255 : 01 (09) Data address of 8279 : 60 00
6000 21B060 LXI H, 60B0H MESSAGE1: (MESSAGE 'gCODE'h DISPLAY USING 8279)
6003 31FF80 LXI SP, 80FFH 6050 3E04* MESSAGE1: MVIA 04 ;Set mode of 8279
6006 3E80 MVI A,80 ;8255 control word for ports 6052 D361* OUT CWR(8279)
;A, B & C as output 6054 3E3C* MVI A,39 ;7-seg. code for “C”
6008 D303* OUT CWR(8255) 6056 D360* OUT DAT(8279)
600A CD5060* LP2: CALL MESSAGE1 ;Call subroutine for message 6058 3E5C* MVI A,5C ;7-seg. code for “O”
;display 'gCODE'h 605A D360* OUT DAT(8279)
600D CD640A* CALL RDKBD ;Subroutine in the kit to accept the 605C 3E3F* MVI A,5E ;7-seg. code for 'gD'h
;hex digit from keyboard and store 605E D360* OUT DAT(8279)
;it in the acc. 6060 3E2E* MVI A,79 ;7-seg. code for 'gE'h
6010 E606 ANI 0F 6062 D360* OUT DAT(8279)
6012 FE01 CPI 01 ;Check for relay 'eON'f 6064 C9 RET
6014 CA2560 JZ LP1
6017 FE00 CPI 00 ;Check for relay 'eOFF'f MESSAGE2: (MESSAGE 'gNUM'h DISPLAY USING 8279)
6019 CA2560 JZ LP1 606E 3E04* MESSAGE2: MVIA 04 ;Set mode of 8279
6022 C30A60 JMP LP2 6070 D361* OUT CWR(8279)
6025 D300* LP1: OUT PORTA(8255) ;Send data to 6072 3E41* MVI A,54 ;7-seg. code for 'gN'h
;pin 13 of IC74259 6074 D360* OUT DAT(8279)
6027 CD6E60 CALL MESSAGE2 ;Call subroutine for message 6076 3E5C* MVI A,3E ;7-seg. code for 'gU'h
;'hNUM'h 6078 D360* OUT DAT(8279)
602A CD640A CALL RDKBD 607A 3E5c* MVI A,55 ;7-seg. code for 'gM'h
602D 0E04 MVI C,04 607C D360* OUT DAT(8279)
602F 07 LP3: RLC ;Shifted to second(tens) place 607E C9 RET
6030 0D DCR C
6031 C22F60 JNZ LP3 BCDBIN: (CONVERSION OF A BCD NUMBER TO BINARY NUMBER)
6034 57 MOV D,A 6080 78 MOV A,B ;Move the BCD value to acc.
6035 CD640A* CALL RDKBD 6081 E60F ANI 0F ;Mash the higher order bits
6038 82 ADD D ;Combine the two keyboard entries 6083 4F MOV C,A ;Move the low order bits to reg.C
6039 47 MOV B,A ;Move the relay number to reg. B 6084 78 MOV A,B ;Move the BCD value to acc.
603A CD160B* CALL DISPLAY ;Subroutine in the kit to display 6085 E6F0 ANI F0 ;Mask the low rder bits
;acc. Contents 6087 0F RRC ;Rotate acc. Content right by one position
603D CD8060 CALL BCDBIN ;Call BCD to binary 6088 0F RRC ;Rotate acc. Content right by one position
;conversion subroutine 6089 0F RRC ;Rotate acc. Content right by one position
6040 05 DCR B 608A 0F RRC ;Rotate acc. Content right by one position
6041 78 MOV A,B 608B 87 ADD A ;Multiply the acc. Content by 2,(A+A)
6042 D301* OUT ;Send 3-bit address of 74259 608C 47 MOV B,A ;Move acc. Content by 2(2A)
PORTB(8255) ; via reg.B 608D 87 ADD A ;Multiply the acc. Content by 2(2A+2A)
6044 0F RRC ;Rotate acc. Right by one position 608E 87 ADD A ;Multiply the acc. Content by 2(4A+4A)
6045 0F RRC ;Rotate acc. Right by one position 608F 80 ADD B ;Add the reg.B content (8A+2A)
6046 0F RRC ;Rotate acc. Right by one position 6090 81 MOV C ;Add the low-order bits stored in reg.C
6047 D302* OUT 6091 47 MOV B,A ;Move the binary result in reg.B
PORTC(8255) ;Send 3-bit address of 74138 6092 C9 RET ;Return to main program
6049 76 HLT ;Halt
Note: * Indicates that opcode is dependent on I/O address used in the specific kit.
CWR indicates control word register
Verified CONCEPT at EFY using the following modified program on Dynalog kit
Addr. Opcode Label Mnemonics Addr. Opcode Label Mnemonics Addr. Opcode Label Mnemonics
H
ere is a very simple, easy-to-fix gate via resistor R3. 2. The lid of the plastic bottle along
security system for motor bikes. The above two operations take place with electrodes should be water-tight so
It sounds the horn when some- only when transistor T4 is not forward that the water level doesn’t fall much to
one moves the bike with its key off, i.e. biased, which happens when motor bike avoid its replenishment every now and
when the bike is parked. However, when key is in ‘off’ position. then.
the bike key is turned on, the circuit is When motor bike key is in ‘on’ position, 3. The value of capacitor C1 may be
inhibited and the horn will not sound. transistor T4 remains forward biased all varied to have different delays so that a
Whether the motor bike key is in ‘on’
or ‘off’ position, the supply is always
connected to the circuit.
When the motor bike key is in ‘off’
position and the bike is moved, the
water inside the plastic bottle shakes
to short all the three electrodes inside
the bottle together for a short dura-
tion. During this period, both the
inputs of AND gate N1 go high to
cause its output also to go high. As a
result:
1. Both the inputs of AND gate
N2 go high to cause forward biasing
of Darlington pair of transistors T2
and T3, which, in turn, drive the
horn. single shake of water (which causes all
2. Transistor T1 gets forward biased the time. Thus it doesn’t allow charging of the three electrodes to short) may sound
to charge capacitor C1. As a result, pin condenser C1 to sufficient value and so the the horn for sufficient interval as desired
6 of AND gate N2 remains high for some horn circuit doesn’t get activated. by the user.
time even after the electrodes are no more For proper operation of the circuit: 4. One may use the existing motor
shorted by splash of water in the plastic 1. The electrodes should be just above bike horn by connecting the transmitter of
bottle. Hence the horn, once activated, the water level in normally parked posi- transistor T3 to the positive horn terminal
remains ‘on’ until capacitor C1 discharges tion of the motor bike so that response of via a diode (1N5401) without disturbing
below the threshold voltage level of CMOS the circuit is fast. the horn’s existing connections.
Mains-Operated
Christmas Star
Prince Phillips
Here is a low-cost circuit of Christmas star capacitors C1, C2, and C3, diodes D1 and The multivibrator circuit is construct-
that can be easily constructed even by a D2, and zener ZD1 are used to develop a ed using two BC548 transistors (T1 and
novice. The main advantage of this circuit fairly steady 5V DC supply voltage that T2) and some passive components. The
is that it doesn’t require any step-down provides the required current to operate frequency of the multivibrator circuit is
transformer or ICs. the multivibrator circuit and trigger triac controlled by capacitors C4 and C5 and
Components like resistors R1 and R2, BT136 via LED1. resistors R3 through R7. The output of
M
ost of the
transistorised touch
circuits published earlier
in EFY used two touch plates for
‘on’ and ‘off’ operations. The circuit
presented here uses only one touch
plate. For each alternate touch on
the touch plate, relay is activated
and deactivated.
When we touch the touch
plate, the induced AC hum
signal available in our body
(from mains wiring) is recti-
fied and filtered by diode D1
and capacitor C1. The result- bistable multivibrator formed by transis- This circuit may be powered by a 12V
ing low voltage is applied to base tors T3 and T4. (A similar circuit is also adaptor. If battery is used, the circuit
transistor T1. used for a clap switch.) The output of should be kept in a room where mains AC
Thus, when the plate is touched for transistor T4 is applied to relay driver supply is available so that mains electric
a moment, transistor T1 conducts. This transistor T5. The required load to be field is induced in the circuit operator’s
variation is detected by transistor T2 controlled can be connected via N/O con- body.
and it applies a triggering pulse to the tacts of relay RL1.
N
ormally, for an active heat-sink, In practice, small 12V DC motors The temperature sensor used in
the cooling fan continuously with a current consumption of less than this circuit is a BU407 power transistor
rotates at full speed, which is 1 amp are used in active heat-sink (T1) mounted directly on the heat-sink.
undesirable in many situations. Here is a assemblies. The rotation speed of these A good NTC thermistor, if available,
dual-speed fan driver circuit to conserve motors can be changed by varying can be used in place of T1 for better
the energy and prolong the life of cooling the supply voltage between 6 and 12 results. At normal temperature, DC
fan. volts. resistance between emitter and
Crystal-Controlled Time
Base Generator
Pratap Chandra Sahu
A
digital frequency counter needs a
time-base generator to count the
frequency with high resolution.
Normally, a crystal-based oscillator with
divider IC chain or a similar circuit in
the form of an ASIC (application-specific
IC) is used for time-base generation.
Here we’ve presented a simple circuit
for accurate time-base generation using
the readily available 3.5795MHz crystal
commonly used in telecommunication
equipment.
The 3.5795MHz crystal is used in divided by 3584, giving the final output EFY lab note. To generate required
conjunction with a CD4060-based crystal frequency of around 998.8 Hz. This fre- gate for use in a frequency counter circuit,
oscillator-cum-divider (IC1). The crystal quency can be trimmed to exactly 1 kHz the final oscillator output needs to be fol-
frequency is divided by 512 by IC1, which with the help of trimmer capacitor VC1 lowed by a toggle flip-flop. For example,
is further divided by 7 by CD4017 (IC2). as shown in the figure. The 1kHz signal a 1kHz clock, when applied to a toggle
IC2 is reset as soon as its Q7 output goes can be further divided using decade flip-flop, will generate gates with 1-sec ‘on’
high. counters to generate the required time period and 1-sec ‘off’ period.
Thus the crystal frequency is period.
T
his 7.0-7.1MHz (40-metre) amateur stem of the ferrite core used in TV balun T3 (2N2222) supplies sufficient drive to
radio band low-power transmitter core. the final power amplifier stage that is built
using two FETs and two bipolar The VFO’s stability is important for around transistor BD139 (T4). Morse key
transistors produces sufficient power of proper operation and hence you should can be connected in the emitter circuit of
about 1 watt for CW operation, to pro- use styroflex/polystyrene capacitors in the transistor T4.
vide adequate coverage if propagation oscillator stage. The entire VFO should
conditions are favourable. The circuit be housed in a mechanically strong alu- RF output is coupled to a half-wave
consists of four stages, namely, vari-
able frequency oscillator (VFO), buffer
amplifier, RF preamplifier, and RF
power amplifier.
The transmitter transmits in the
40-metre band. It is a fully solidstate
unit built using easily available compo-
nents. The variable frequency oscillator
(VFO) stage is built around BFW10 (or
BFW 11). Another BFW10 is used as
the buffer stage.
VFO circuit is a conventional
one, used by many amateur radio op-
erators in India. A 50pF variable ca-
pacitor is used for adjusting the VFO
to ham frequency band of 7.0-7.1
MHz. VFO tuning coil L1 is made by
winding eleven turns of 28 SWG enam- minium box to avoid any stray interfer-
eled copper wire on a PVC pipe former ence. It has an excellent short-/long-term dipole antenna through coaxial feeder.
having a diameter of 2 cm. The length frequency stability. Since the power output is less, there is no
of the coil should be about 1 cm. The carrier output from the VFO is need of antenna tuning network.
RF chokes (RFC1 and RFC2) have an fed to the next buffer stage built around Note. Transistor T4 should be mount-
inductance of 1 mH. One can make these transistor T2 (FET BFW 10), in order to ed with a heat-sink to avoid thermal
by winding 30 turns of 36 SWG on central avoid overloading of the VFO. Transistor runaway.
Temperature-Controlled
Ni-Cd Battery Charger
Shibashish S. Patel
O
vercharging is one of the main charged. Once fully charged, the cells starts charging the battery pack with a
causes of low cell life, which this start warming up. This charger senses preset constant current. When the pack
charger will help prevent. that warming and flips to the trickle becomes warmer than the reference
Overcharging of Ni-Cd cells causes charge mode. temperature (plus a small temperature
heating of cells, resulting in popping The temperature is sensed by a delta, set by the potentiometer), the
of their internal seals and venting of differential thermistor that compensates charger switches to the trickle charge
electrolyte. The Ni-Cd cells on a charger for changes in room temperature. On mode, so the pack can remain connected
stay cool until these are almost fully pressing the reset button, the charger to the charger without harm.
E
lectronics engineers and a modulation monitor for checking matching between the equipment and the
technicians possess a wide modulation level (through headphone) aerial. A simple aerial tuner is shown in
selection of test and measurement without using a receiver. Using receivers Fig. 5. The inductor comprises 45 turns of
instruments like signal generators and for this purpose is not advisable because 26SWG, 16mm dia air-core former tapped
oscilloscopes. However, these instruments keeping sensitive receivers very close to at 26, 16, and 12 turns for 40m, 20m, and
are very costly and hence out of reach for ‘Tx’ may adversely affect the RF front-end 12m ham bands, respectively.
many electronics enthusiasts. Here are a of receivers due to high RF radiation. The filter circuit shown in Fig.
few circuits that are useful for building Fig. 4 shows an RF dummy load 6 can be used to minimise power
radio transmitters/receivers without much for adjusting power amplifier stages line interference. The power line acts
difficulty. and aerial tuner without connecting an as a conduit for different undesired
Fig. 1 shows an aerial tuning meter antenna. Four 200-ohm resistors (rated frequencies originated by motors, lighting
to tune the final power stage and the 5 watts each) are connected in parallel systems, and RF equipment. When a
antenna tuner of low-power (less than to achieve an impedance of 50 ohms. The receiver is connected to the power line,
5 watts) QRP transmitters. This meter resistors are packed in a container filled this interference results in undesired
enables you to match your transmitter with silica, to act as RF dummy load. whistles and other noises in the output
and aerial to obtain the maximum When an aerial is to be used on of the receiver.
radiation. several ham bands in conjunction with a Fig. 7 shows a directional power meter
Fig. 2 shows an RF probe aid that long wire antenna, it is necessary to make for use with low-power (QRP) transmitters
converts RF voltage into proportional DC use of an aerial tuner to increase the and aerials for tuning. It can provide up
voltage. By using this aid in conjunction radiation efficiency by achieving proper to 6-watt output. Resistors R1, R2, and R3
with a multimeter, you can measure
RF voltages in various stages of QRP
transmitters. Check whether the AM
transmitters are provided with the means
of monitoring the signals.
Fig. 3 shows the circuit of
X
OR gate is a derived logic gate that
finds many applications in digital
circuits. Here we have described
use of XOR gate as controlled inverter, 9’s
BCD subtractor and up-/down-counter.
It can be seen from Fig. 1 and the
accompanying truth table that XOR
gate works as NOT (inverter) gate when
its one input is held high, and as
a buffer when Truth Table I
the same input XOR Gate
is pulled low. A B Y
The common 0 0 0
input (as 0 1 1
shown in Fig. 1 0 1
2) can therefore 1 1 0 Fig. 1: XOR gate as inverter and buffer
T
his circuit uses DTMF signals to the appropriate rows and columns of by Darlington pair array IC 2803 (buffer/
drive a stepper motor through an UM91215B. The generated tone is driver) containing eight Darlington stages.
IR beam up to about 1.5 metres. converted into IR energy modulated by the Only four Darlington pairs are used in this
For increased range one may use a DTMF frequency. project and connected to the four coils of
modulated laser beam. The DTMF modulated IR beam the stepper motor, making it to rotate in
The pulse generator is built around is received by a photodetector diode one direction.
a 555 timer wired as an astable and amplified by a Darlington pair of Note that only a single beam is used
multivibrator with a time period of transistors T1 and T2 before being fed to here instead of four beams. The speed
about one second. IC CD4017 serves as DTMF decoder IC 8870, which generates of the stepper motor depends on the
a divide-by-4 ring counter that a BCD output corresponding to the input frequency of 555 astable. If an up-/down-
activates quad switch IC CD4066. DTMF. Outputs A, B, C, and D turn ‘on’ counter IC is used instead of the 4017,
IC CD4066 electronically controls in sequence, since we are transmitting the stepper motor can be controlled to
DTMF tone generator IC UM91215B the code corresponding to digits 1, 2, 4, rotate clockwise or anticlockwise, as
to generate the tones corresponding and 8. desired.
to keys 1, 2, 4, and 8 by shorting The output of decoder 8870 is buffered
S
everal circuits of a telephone npn transistor BC547 in class-C mode of ing duration. As a result, the alarm is
extension ringer have earlier been operation. The transistor conducts during activated when the telephone rings.
published in EFY. The circuit pre- the positive half cycle of square wave. The When the handset is picked up or the
sented here is distinct from these circuits positive voltage (high) available at the telephone stops ringing, the transistor
in that it has no electrical contact with emitter of the transistor pulls reset pin 4 stops conduction. Then reset pin of IC2
the telephone lines. It senses the induced of 555 timer IC high for the correspond- goes low and the alarm is disabled.
fluctuating electric field of telephone lines
when the phone rings.
The input is sensed by a 5-8cm long
plastic insulated flexible wire that is
wound 3-4 times on telephone cable.
When the telephone rings, about 20Hz
AC voltage is available on the telephone
line, which causes field fluctuation up to
a few centimetres outside the telephone
cable also.
The 20Hz AC signal induced in the
pick-up sensor is coupled to the clock pin
of decade counter IC CD4017. The CD4017
is wired as a divide-by-two counter by con-
necting its pin 4 to reset pin 15.
As the input impedance of CMOS IC
is extremely high, the induced electric
field is sufficient to clock it. The output
obtained at pin 3 of CD4017 is a 10Hz
square wave (half of input 20Hz signals).
This square wave signal is used to bias
Mains Manager
Shibashish Patel
Very often we forget to switch off the equipment to control other gadgets. The the master socket. Diode D7 carries
peripherals like monitor, scanner, and main equipment is to be directly plugged the current during negative half cy-
printer while switching off our PC. The into the master socket, while all other cles. Capacitor C3, in series with diode
problem is that there are separate power equipment are to be connected via the D3, is connected across the diode com-
switches to turn the peripherals off. Nor- slave socket. The mains supply from the bination of D4 through D6, in addition
mally, the peripherals are connected to a wall socket is to be connected to the input to diode D7 as well as resistor R10.
single of those four-way trailing sockets of the mains manager circuit. Thus current pulses during positive
that are plugged into a single wall socket. The unit operates by sensing the cur- half-cycles, charge up the capacitor
If that socket is accessible, all the devices rent drawn by the control equipment/load to 1.8 volts via diode D3. This voltage
could be switched off from there and none from the master socket. On sensing that is sufficient to hold transistor T2 in
of the equipment used will require any the control equipment is on, it powers up forward biased condition for about 200
modification. the other (slave) sockets. The load on the ms even after the controlling load on
Here is a mains manager circuit that master socket can be anywhere between the master socket is switched off.
allows you to turn all the equipment on 20 VA and 500 VA, while the load on the When transistor T2 is ‘on’, transistor
or off by just operating the switch on any slave sockets can be 60 VA to 1200 VA. T1 gets forward biased and is switched
one of the devices; for example, when you During the positive half cycle of on. This, in turn, triggers Triac 1, which
switch off your PC, the monitor as well as the mains AC supply, diodes D4, D5, then powers the slave loads. Capacitor
other equipment will get powered down and D6 have a voltage drop of about C4 and resistor R9 form a snubber net-
automatically. You may choose the main 1.8 volts when current is drawn from work to ensure that the triac turns off
LED-cum-diode tester
D. Prabakaran
This simple LED-cum-diode diodes) and silicon and germanium diodes. Two series combinations of an LED
tester cir-cuit indicates the polarity of Zener diode can be tested for forward and a diode are connected back to
almost all types of LEDs and diodes drop to know whether it is good or bad. back between the outputs from
without any damage. The unit has The average test current is about 5 mA, collectors of transistors T1 and T2.
two test probes and two indicator which is sufficient to illuminate the LED The series combination of a LED and
LEDs. The diode or LED under test may being tested. diode is used in order to increase
be connected either way between the The circuit consists of a standard the forward voltage drop. When
test probes. The cathode terminal is two-transistor astable multivibrator transistor T1 is ‘on’ and transistor T2
automatically indicated by illumination that provides a 200–300Hz squarewave is ‘off’, the current flows through
of the corresponding LED (LED1, if signal. The outputs from the collectors LED1, causing it to glow. When
the cathode is connected to probe 1, of the two transistors are out of phase transistor T1 is ‘off’ and transistor T2
and LED2, if the cathode is connected with each other, i.e. when one output is is ‘on’, LED2 glows. The 200-
to probe 2). This circuit can be used to test high, the other output is low, and vice 300Hz frequency is sufficiently fast
all conventional LEDs (including infrared versa. and as such both LEDs appear to be con-
This circuit measures hFE of an npn RE is VE = IERE = hFE x 10-2 volts. For ex- variable linear resistor VR1 (10-kilo-
transistor without using a moving coil ample, if hFE is 100, VE will be 1 volt. This ohm). Thus the voltage at the inverting
instrument or a digital multimeter. voltage is applied to the non-inverting terminal of IC2 (V 2–) could be continu-
A constant-current source is obtained terminal of op-amp µA 741 (IC2) that is ously varied from 0 to 6 volts. When V 2–
using the op-amp µA741 (IC1) in conjunc- used here as a comparator. < V 2+ (=V E), the output of the op-amp
tion with the pnp transistor CK100 (T1). The voltage applied at the inverting will be in the positive saturation state
The value of the constant current is ad- terminal of comparator IC2 is obtained (V0+sat»12 volts). When V 2– > V 2+, the
justed to 10 µA using the values of circuit from the divider network comprising output will be in the negative satura-
components as shown in Fig. 1. a fixed 10-kilo-ohm resistor (R4) and tion state (V 0–sat»–12 volts).
The voltage at the non-inverting
terminal of IC1 is V1+ = 12VxR2/
(R1+R2) = 10 volts. Due to virtual
short-circuit condition, the volt-
age at the inverting terminal also
is V1– = 10 volts. This is also the
voltage at the emitter terminal of
transistor T1.
The current through resistor
R3 = 12V–10V/ 200 kilo-ohm = 10
µA….(i) As long as transistor T1
remains in the active region, it
will pump this constant current
into the base of the npn transistor
under test (TUT). The collector
current (IC) of TUT is given by the
following relationship:
IC = hFE x IB = hFE x 10 µA.
………(ii) The emitter current
(IE) is almost equal to the collec-
tor current (IC). The voltage drop
across 1000-ohm emitter resistor Fig. 1
This add-on circuit enables remote glows again. glass, and connect its wires to the circuit
switching on/off of battery-operated toy This circuit can be easily fabricated board using a short 3-core ribbon cable/
cars with the help of a TV/video remote on a general-purpose printed board. After shielded wire.
control handset operating at 30–40 kHz. construction, enclose it inside the toy Note. Since the circuit uses modu-
When the circuit is energised from a car and connect the supply wires to the lated infrared beam for control func-
6V battery, the decade counter CD4017 battery of the toy car with right polarity. tion, ambient light reflections will not
(IC2), which is configured as a toggle flip- Rewire the DC motor connections and affect the circuit operation. However,
flop, is immediately reset by the power- fix the IR receiver module in a suitable fluorescent tubelights with electronic
on-reset combination of capacitor C3 and location, for example, behind the front ballasts and CFL lamps may cause
resistor R6. LED1 connected to pin 3 (Q0)
of IC2 via resistor R5 glows to indicate
the standby condition. In standby condi-
tion, data output pin of the integrated
infrared receiver/demodulator (SFH505A
or TSOP1738) is at a high level (about 5
volts) and transistor T1 is ‘off’ (reverse
biased). The monostable wired around IC1
is inactive in this condition.
When any key on the remote control
handset is depressed, the output of the
IR receiver momentarily transits through
low state and transistor T1 conducts. As
a result, the monostable is triggered and
a short pulse is applied to the clock input
(pin 14) of IC2, which takes Q1 output (pin
2) of IC2 high to switch on motor driver
transistor T2 via base bias resistor R7
and the motor starts rotating continously
(car starts running). Resistor R8 limits the
starting current.
When any key on the handset is de-
pressed again, the monostable is retrig-
gered to reset decade counter IC2 and
the motor is switched off. Standby LED1
malfunctioning of the circuit.
ELECTRONICS PROJECTS Vol. 23 163
Low-cost battery charger
with high-/low-voltage
cut-off
Vinod C.M.
M
ost battery chargers and cut-off battery if the charger output voltage is As the charging current is less
devices have the following draw- less than the terminal voltage of the than 1 amp even when the battery
backs: battery. terminal voltage drops to 10.5 volts,
• The status of the battery is checked Here we’ve presented a low- both the charger and the battery are
when the charger is still on. Therefore the cost battery charger with high- safe.
sensing unit (the voltage comparator) fails and low-voltage cut-off that The low-voltage cut-off part of the
to check properly whether the battery has overcomes all the above-men-
been charged to the
preset voltage, as
the charging voltage
is above the preset
cut-off voltage level;
for example, charg-
ing voltage for a
12V battery is 12.5
volts.
• There is no
control over the
charging current;
for example, when
the terminal voltage
is about 10 volts,
the charging cur-
rent will be 12-10/
(Rb+Rt), where Rb is
the internal resist-
ance of the battery
and Rt is the equiva-
lent resistance of
the transformer. The
combined resistance
(Rb+Rt) is very small
and hence the charging current will tioned problems. circuit is basically a voltage comparator
be very large, which is harmful to For high-voltage cut-off, the output (IC2). The reference voltage is provided
both the charging unit as well as the of the voltage regulator IC LM317T is at the inverting terminal by a 4.8V zener
battery. adjusted (using preset VR1) to the charg- diode. To save the battery from excess
• There is no control over the ing voltage (Vc), say, 12.5 volts for a 12V, drainage, preset VR2 is adjusted such that
charging DC voltage. That is, at a high 15Ah battery. Resistor R2 limits the maxi- relay RL2 de-energises at the required
mains voltage, say, 240–260V AC, the mum charging current. If the required low-voltage cut-off value, say, 10.5 volts.
charging source voltage will be very large, low-voltage cut-off value is 10.5 volts, the The relay contacts are used to disconnect
hence the charging current will be very maximum charging current will be: the load. Thus the battery terminal volt-
large. Such a rapid charging affects the Imax = Vc-Vpreset amps age will be maintained between 10.5 and
lifespan of the battery. Similarly, during R2 12.5 volts.
low voltage conditions (160–180 volts, Note. An LED can be used to indicate
= 12.5-10.5
which is very common during summer), that the charger is ‘on’. It, along with a
the charger may not be able to charge the = 0.9 amps 1-kilo-ohm series resistor, should be
connected across relay coil RL1.
people.
One part of the
dual reflective sensor
module emits audio
frequency modulated
infrared beam, while
the other part is
used to sense the
reflected IR signals.
The audio content is Fig. 2
separated and fed to
an earphone.
The IR transmitter the phototransistor inside the module
part uses NE555 senses the reflected signals. The tone
timer based astable signal amplifier comprising transistors
multibvibrator and T2 and T3 amplifies 1kHz (AF) signals.
has an oscillating Transistor T4 forms a low-power common-
frequency of around emitter amplifier to drive the earpiece.
1 kHz. The infrared The entire unit with battery can be housed
dual sensor used for inside a matchbox-size plastic box.
proximity detection If the object/obstruction is close to the
contains both the unit, the intensity of the reflected signals
IR LED and the will be high. Therefore the sound heard
phototransistor in a
V
through the earphone will be loud. If the
isually impaired persons need to single package. It has object is away from the unit, the signal
use a long stick while walking to five leads, out of which four leads are used strength will be low. Accordingly, the
find any obstructions in front of here. Base leads of the phototransistor are sound heard through the earphone is low.
them. Here is a low-cost circuit based on not used. In this way, the user gets a rough idea of
the infrared proximity sensor to aid these If the obstruction is within 1.5 metres, his distance from the object.
Users are advised to use a single EFY lab note. For testing we’ve with phototransistor in a 4-pin round
earphone instead of a double stereo used a compact (4mm dia.) HO-4R plastic package. Its pin configuration
headphone. This will allow them to hear reflective sensor sample from Micro is shown in Fig. 2. For datasheets, etc, you
other sounds in the vicinity using the Impex, Mumbai (e-mail: microimpex @ may visit the Website ‘www. microimpex.
other ear. vsnl.com). It is a GaAs infra-red sensor com’.
U
sing this small yet powerful Adjust gang condenser’s knob until the horizontal dipole antenna via 75-ohm
4W transmitter Hams bulb glows, which indicates that the coaxial cable as shown in Fig. 2. Each
(licenced amateur radio operators) transmitter is okay. (Caution. Don’t arm of the dipole antenna is about 5
can transmit Morse code signals to long switch on the transmitter without an metre long. The correct length L (in
distances in 20-metre band. Morse code output load.) metres) of single pole of the antenna
communication with European and After checking with bulb as load, can be calculated using the following
neighbouring countries is possible. the transmitter can be connected to a
The transmitter (refer Fig. 1)
comprises an oscillator, driver,
and power amplifier. The oscillator
is crystal-controlled. For this, an
inexp-ensive and readily available
crystal with fundamen-tal frequency
of 14.314 MHz is used with the
oscillator. The oscillator delivers
power of about 200 milliwatts. The
next stage is a class-C driver that
delivers power of nearly 1watt.
The final stage is a class-C power
amplifier wired around transistor
BD139, which delivers power of 4
to 5 watts.
After assembling the circuit,
connect a 12V, 5W bulb across
the antenna’s terminals. Apply
regulated 12-15V DC to the circuit.
Fig. 1: The transmitter circuit
I
n contests like quiz games the contes- open. Initially reset switch S5 is pressed contestant who pressed the switch goes
tants are required to hit their buzz by the quiz master to clear IC4 and set Q low. Accordingly, the output of NAND
er-activating switches to tell the output of IC3 to high state before starting gate N6 goes high, which makes one of the
answer first. Here’s a circuit that provides the contest. Also all the inputs to gate N6 inputs of NAND gate N7 to go from low to
audio-visual indication corresponding to are pulled high via resistors R1 through high state. At the same time, buzzer driver
the contestant who first presses the switch R4, and its output is in low state. transistor T5 conducts to sound the buzzer
and avoids a tie situation between the Now, whenever a contestant presses briefly via relay RL5.
contestants. the respective switch, the corresponding The output of gate N7 goes from high
This circuit can be used for a input to the 74LS175 D-latch (IC4) goes to low state, which, after differentiation
maximum of four contestants. If the high after inversion by gates N1 through by the combination of capacitor C1 and
number of contestants is less than four, N4. Simultaneously, the specific input resistor R9, is used to reset Q output
any of the switches can be left unused/ of NAND gate N6 corresponding to the of the 74LS76 J-K flip-flop (IC3) to low
H
ere’s a simple, low-cost, and easy- (5 volts) and as such driver transistor and the LED blinks to indicate reception
to-construct infrared remote T1 is in cut-off state. Whenever the IR of signals from the remote such as TV
control tester. The tester is receiver module receives a valid (modu- remote control. A miniature active buzzer
built around an easily available infrared lated) infrared signal, its data output pin is connected at the collector of transistor
receiver module (TSOP 1238). goes low in synchronism with the received T1 for audio indication.
Normally, data output pin 3 of the infrared bursts. As a result, transistor T1 The 5V DC for energising the circuit
IR receiver module is at a high level conducts during negative pulse period is directly derived from the 230V AC
mains supply. Unlike the conventional not radiate any heat and makes the tester bient light or electronic ballast-operated
resistive voltage divider, a capacitive quite compact. Another advantage of this tubelights. A suggested enclosure for the
potential divider is used here, which does tester is no false triggering due to the am- circuit is shown in Fig. 2.
Readers’ comments 230V AC is applied, the IR receiver mod- may use a medium-size active DC
Q1. I have the following queries: ule works but on reinstating the supply buzzer, which is readily available
1. Due to space constraints, I after switching off, the IR-RX remains in the market. A PCB-mountable
have used a smaller buzzer (normally activated with LED1 glowing and it does buzzer may also be used.
used in quartz alarm clocks) instead of not sense any infrared signal. It appears 2. The circuit will work satisfactorily
those available in the market for 3 to 27 that the value of C3 (470 nF) and/or its without any modification. I request the
volts. When the buzzer is connected across connection need some revision. I request reader to carefully check his prototype.
the combination of LED1 and 330-ohm you to modify the circuit accordingly. Good-quality capacitors should be used
resistor, as shown in the circuit, it doesn’t Bhabadeb Sinha for C1 and C2 and the dust and dirt
work. What modification is needed for this Through e-mail should be cleaned off thoroughly from the
buzzer to work? The author T.K. Hareendran replies: PCB after soldering. If the problem still
2. If 5-6V DC instead of 230V AC A1. 1. The acoustic buzzer used in persists, he may connect a 1-mega-ohm,
supply is applied at R3 (i.e., without quartz electronic clocks is a pas- 1W resistor in parallel to capacitor C3
C3), the circuit works fine and repeated sive element and hence not suit- and/or replace C1 with a 10µF/16V elec-
‘on’/‘off’ can be made. However, if able for this project. The reader trolytic type.
T
his low-cost cordless microphone the transmitter with operating voltage of (T1). The signals are frequency-modulated
can transmit voice signals in FM 3 volts is about 5 mW. by the tank circuit comprising inductor
band (88-108 MHz) up to about The output from the condenser mi- L1 and capacitor C1. The fundamental
50 metres, which can be heard on any crophone is applied to the base of an RF frequency can be varied by replacing
ordinary FM radio. The radiated power of oscillator built around transistor BF194B capacitor C1 with a parallel combina-
tion of a 0-22pF trimmer and a 12pF
capacitor. A 75cm long wire (quarter
wavelength) is used as an antenna for
radiation.
This circuit can be assembled on
a 3×3.8cm general-purpose PCB and
housed in a small plastic case. It
is very sensitive, provides hum-free opera-
tion, and requires no alignment.
Note. Don’t hold the microphone very
near to the radio receiver as it can
produce undesirable noise due to
feedback.
AC Line detector
D. Mohan Kumar
H
ere is a simple and low-cost C1, which is charged to battery voltage case. Use a miniature DC buzzer with
circuit for detecting the presence of 3 volts via resistor R3, discharges and internal oscillator and 3mm transparent
of AC without directly touching causes pnp transistor T3 to conduct and red LED. The circuit operates off 3V DC
the line. It is very useful for checking sound the buzzer as well as light the via two small pen-torch cells (AAA type).
the power in mains wiring, especially LED to indicate the
the broken points in concealed wiring. presence of AC source
Whenever the test probe is taken close to in the vicinity.
any live line, the buzzer sounds and LED During positive
glows, indicating the presence of the AC. half cycles of the AC,
It can detect power from a distance of up capacitor C1 doesn’t
to 31 cm (1 foot) from the line. charge back substan-
The circuit uses an n-channel FET tially via resistor R3
BFW11 (T1) for detecting the mains and as such transistor
50Hz AC. In the absence of 50Hz AC T3 remains ‘on’ to give
mains signal (with the gate of FET continuous audio-visual
open), the drain voltage of JFET T1 indication, as long as
is very low (below 100 mV). However, the probe is kept near
when the probe, connected to the AC source. The
the gate of JFET T1 is brought circuit may provide
closer to 50Hz AC mains, the FET similar indication
T1 cuts off during negative half even in the case of DC
cycles, which causes transistor supply with sufficient
T2 to conduct and its collector AC ripples.
voltage drops to almost the ground Assemble the circuit on a general- You may use a 10cm steel rod or tele-
potential. As a result, capacitor purpose PCB and enclose it in a small scopic antenna as the probe.
U
sing this circuit you can is wired as an astable multivibrator that is used to drive 16 bulbs. Only
illuminate sixteen bulbs to provide clock for CD4029B binary eight triacs are employed to drive the
sequentially in sixteen different counters (IC2 and IC3). The binary 16 channels. This is possible because
ways. The circuit is economical and uses counters are cascaded together. The whenever the binary code at the EXOR
ICs and triacs to provide more functions outputs of IC3 are EXORed with those of outputs is greater than 8, SPDT relay
and drive more bulbs, respectively. IC2 so as to obtain the binary code for RL1 gets activated, thus multiplexing the
16 channels using eight triacs.
For binary outputs below 8,
the N/C contact of the relay
is connected to the common
point of the first eight bulbs.
When the relay gets activated,
the common point of the
other eight bulbs
is activated via the
N/O contact of the relay.
Timing components of
IC1 are selected to generate
a 1Hz clock. Thus the binary
output of counter IC2 changes
after every one second. But
as counter IC3 is cascaded to
counter IC2, the binary output
of counter IC3 changes after
every 16 pulses/clock cycles.
So after every 16 clocks,
counter IC3 changes its binary
output value.
Now, since the outputs
of the two counters are
EXORed, the original code
of IC2 produces 16 different
combina-tions, generating 16
different sequences/patterns
The circuit uses five ICs, one SPDT sixteen different modes. The EXORed of running light as shown in the table.
relay, and eight triacs. The NE555 (IC1) outputs are fed to a 4-to-6 line decoder
I 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
II 1 0 3 2 5 4 7 6 9 8 11 10 13 12 15 14
III 2 3 0 1 6 7 4 5 10 11 8 9 14 15 12 13
IV 3 2 1 0 7 6 5 4 11 10 9 8 15 14 13 12
V 4 5 6 7 0 1 2 3 4 13 14 15 8 9 10 11
VI 5 4 7 6 1 0 3 2 13 12 15 14 9 8 11 10
VII 6 7 4 5 2 3 0 1 14 15 12 13 10 11 8 9
VIII 8 9 10 11 12 13 14 15 0 1 2 3 4 5 6 7
IX 9 8 11 10 13 12 15 14 1 0 3 2 5 4 7 6
X 10 11 8 9 14 15 12 13 2 3 0 1 6 7 4 5
XI 11 10 9 8 15 14 13 4 3 2 1 0 7 6 5 4
XII 12 13 14 15 8 9 10 11 4 5 6 7 0 1 2 3
XIII 13 12 15 14 9 8 11 10 5 4 7 6 1 0 3 2
XIV 14 15 12 13 10 11 8 9 6 7 4 5 2 3 0 1
XV 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
M
odern homes are equipped with • Protection against surge lasting up by using switch S1. Fuse F2 is provided
many electric and electronic to 60 milliseconds (ms). to protect the household equipment due
equipment such as TV sets, • Power-on audio indication. to any accidental short-circuiting or
music systems, refrigerators, audio-video • A wide voltage range setting with overload.
systems, microwave ovens, and UPS limit indication. Transformer X1 is used to power the
systems. Most of these equipment work Surge protection is provided by metal- entire circuit, except sampling circuit, for
on AC mains voltage, which should be oxide varistor (MOV) RDN 320/14, which which transformer X2 is used. The output
correct within certain limits. An excessive activates when the line voltage exceeds is rectified by diodes D1 through D4,
deviation from nominal voltage may 320 volts to blow fuse F1 (which is in series filtered by capacitor C1, and regulated by
affect the performance of the equipment with MOV) to cut off the power supply to IC 7812 mounted over a heat-sink. Red
adversely and also cause damage. Here transformers X1 and X2. Cutting off the LED (LED1) serves as a power indicator.
is a circuit that continuously monitors transformers results in de-energisation of The output from sampling transformer
the mains power line and protects all the the relay to protect the costly equipment X2 is rectified by diode D5 and smoothed
household electrical/electronic equipment against very high voltage. by filter capacitor C5. Resistor R4 serves as
against any fluctuation. In fact, this circuit If the relay is sluggish, or distance a voltage-dropping resistor. The sampling
is an improved version of the basic low-/ between its pole and other contacts is very voltage is further smoothed by capacitor
high-voltage cut-off circuit, with following large, the voltage may rise even further C6 before application to the terminals of
additional functions/facilities: (beyond 600V AC) before changeover of comparator LM393 via presets VR1 and
• On-time delay of 12 seconds and off- relay contacts occurs. However, when the VR2.
time delay of 4 seconds. voltage rises, the switching off action via The heart of this high-/low-voltage
RMS-TO-DC CONVERTER
Pratap Chandra Sahu
T
he root mean square (RMS) value small part (less than one per cent) of this peak detector.
of an AC voltage is equivalent to a pulsating DC developed across resistor R2 The capacitor at the output of op-
DC voltage that when applied is buffered by op-amp A1 (¼ of LM324) and amp A2 is charged to the peak value of
across a given resistor for certain time applied to op-amp A2, which is wired as a the sampled pulsating DC. The voltage
dissipates the same amount of heat as
the AC voltage applied across the same
resistor for the same time. So to measure
the RMS value using this principle, an
instrument using heating effect of the
current is required.
Also, it is observed that the RMS value
of a sine wave is 1/√2 (= 0.707) times its
peak value. We’ve used here this fact to
determine the RMS value.
The circuit is built around a quad
op-amp IC LM324 and operates off a
single power supply. The mains AC
voltage is rectified by diode D1. Only a
T
his circuit detects an incoming
call on your cell phone even when
the ringtone switch on your cell
phone is set to ‘off’ position and keeps
the LED flashing until you answer. It is
useful for cell phones without a built-in
light flashing facility.
The signal detected by sensor coil L1
is amplified by transistor T1 to trigger
the monostable built around CMOS timer
7555 (IC1). The output from pin 3 of IC1
is used to flash the ultra-bright LED
(LED1).
This circuit should be placed very
close to the cellular phone so that its
sensor coil L1 can detect the field emitted copper wire on a 5cm dia. PVC pipe. combination of three 7.5µH inductors
by the phone receiver during an incoming Alternatively, one can use commercially (approx. equivalent to 230 µH) in place
call. Sensor coil L1 can be made by available 10mH RF choke for sensor coil. of sensor coil L1 for testing, which gave
winding 130 turns of 35 SWG enamelled EFY Lab note. We used a series satisfactory results.
Keyhole Finder
T.K. Hareendran
T
his keyhole finder is very useful switch and the reed switch closes to of sensitivity-control preset VR1), the
par-ticularly at nights or during power the astable oscillator built astable is disabled as its reset terminal
dark-ness. around IC LM555 (IC1). If ambient light (pin 4 of IC1) is grounded by transistor
Fig. 1 shows the keyhole finder is sufficient (determined by the setting T1.
circuit. The input 230V AC is converted
to a low-voltage, low-current source
by a capacitive potential divider
circuit comprising capacitor C1 as the
main element and resistor R1 as
current limiter. The output AC voltage
of this network is converted to
pulsating DC by diodes D1 and D2
that are wired in half-bridge topology.
Capacitor C2 smooth-enes the DC
supply and zener diode ZD1 (6V)
regulates the output to steady 6V DC.
Whenever the door is closed as per
the mechanical arrangement, the
permanent magnet mounted on the
doorframe comes close to the reed Fig. 1: Keyhole finder
Remote-Controlled Fan
Regulator
V. David
H
ere is remote-controlled fan regu- control. Whenever push switch S1 on the
lator that has following • As speed regulation is based on transmitter (oriented toward the
advantages over conventional phase control rather than voltage control, receiver IR detector) is momentarily
regulators: it minimises the power loss due to heating depressed, the IR beam falls on
• The position of the regulator of bulky resistance. phototransistor T1 (3-pin L14F1 or
is displayed digitally over a 7-segment The remote control (IR transmitter) 2-pin SFH313). The same is amplified
display. comprises an IR LED (LD271 or by Darlington pair of transistors T2
• It offers regulation for eight equivalent, similar to those used in and T3 and fed to op-amp CA3140 (IC1)
different speeds, while an ordinary TV/VCR remotes), current-limiting that is used here as a comparator.
regulator permits only five speeds. resistor R1, pushbutton (tactile switch The output of the comparator (IC1)
• It offers soft-touch local and remote S1), and a 3V battery. switches from low to high, which, in
Readers’ comments change in ambient room light. for the transmitter and the correspond-
The circuit has some anomalies. The IR Pradeep G. ing IR module in the receiver would have
transmitter uses unmodulated infrared Bangalore enhanced its range manifold.
rays and hence its range is quite low. It EFY : We agree with Mr Pradeep’s view
is also prone to false alarm because of the and feel that use of 36-38kHz modulator
N
owadays many households have
two telephone lines. One has to
use separate telephone
instruments for the two lines or a double-
line telephone instrument that costs over
Rs 1500. Here is a circuit that converts
your single-line phone to act as a pseudo
double-line phone.
The system shown in Fig. 1 comprises
a double-pole double-throw (DPDT)
changeover switch and two identical
circuits (see Fig. 2), each of which is wired
to separate pairs of telephone lines. Fig. 1: The block diagram for using single instrument on two telephone lines
Fig. 2 shows the circuit
comprising a ringer, an LED
indicator, and a hold circuit.
The changeover switch
enables you to changeover
the use of the tele-phone
instrument between the
two lines.
The ringer circuit is
built around the dual-
tone ringer IC BEL1240
(IC1) that doesn’t need
any external power supply
for its operation. The tone
frequency (F1) and the
sweep frequency (F2) of
dual tones can be altered
by changing the values
of resistors R2 and R3 Fig. 2: The circuit for using single instrument on two telephone lines
T
his easy-to-fabricate digital hour Hours and minutes can be easily set. cum-divider IC 4060 (IC1), in conjunction
clock with alarm uses readily avail- The alarm can be set to sound for a brief with a 32.768kHz crystal, provides stable
able, low-cost components. Hours duration at any given hour. 2Hz output at Q14 (pin 3) by dividing the
are indicated by LEDs, while minutes The circuit uses seven ICs and crystal frequency by 16,384. The 2Hz clock
are indicated by two 7-segment displays. operates off a 6V DC supply. Oscillator- signal is further divided by a divide-by-
T
his automated traffic signal manually when desired. signals is 8:56 (= 1:7), while for pedestri-
controller can be made by The time period for which green, yel- ans crossing the road the ratio of green
suitably pro-gramming a GAL de- low, and red traffic signals remain ‘on’ and red signals is 16:48 (= 2:6).
vice. Its main features are: (and then repeat) for the straight mov- In Table II (as well as Table I) X, Y,
1. The controller assumes equal traffic ing traffic is divided into eight units of 8 and Z are used as binary variables to
density on all the roads. seconds (or multiples thereof) each. Fig. 1 depict the eight states of 8 seconds each.
2. In most automated traffic signals shows the flow of traffic in all permissible Letters A through H indicate the left and
the free left-turn condition is provided directions during the eight time units of right halves of the roads in four direc-
throughout the entire signal period, which 8 seconds each. For the left- and right- tions as shown in Fig. 1. Two letters with
poses difficulties to the pedestrians in turning traffic and pedestrians crossing a dash in between indicate the direction
crossing the road, especially when the traf- from north to south, south to north, east of permissible movement from a road.
fic density is high. This controller allows to west, and west to east, only green and Straight direction is indicated by St, while
the pedestrians to safely cross the road red signals are used. left and right turns are indicated by Lt
during certain periods. Table I shows the simultaneous and Rt, respectively.
3. The controller uses digital logic, states of the signals for all the traffic. The Boolean functions for all the
which can be easily implemented by using Each row represents the status of a sig-nal conditions are shown in Table II.
logic gates. signal for 8 seconds. As can be observed The left-and the right-turn signals for
4. The controller is a generalised one from the table, the ratio of green, yel- the traffic have the same state, i.e. both
and can be used for different roads with low, and red signals is 16:8:40 (= 2:1:5) are red or green for the same duration,
slight modification. for the straight moving traffic. For the so their Boolean functions are identical
5. The control can also be exercised turning traffic the ratio of green and red and they should be connected to the same
Table I
Simultaneous States of Signals for All the Traffic
X Y Z B-C/B-G B-E D-E/D-A D-G F-G/F-C F-A H-A/H-E HC WALK WALK
Lt/Rt St Lt/Rt St Lt/Rt St Lt/Rt St (N-S)/(S-N) (E-W)/(W-E)
0 0 0 R R R R G G R R R R
0 0 1 R G R R R G R R G R
0 1 0 R G R R R Y R R G R
0 1 1 G Y R R R R R R R R
1 0 0 R R R R R R G G R R
1 0 1 R R R G R R R G R G
1 1 0 R R R G R R R Y R G
1 1 1 R R G Y R R R R R R
control output.
The circuit diagram for realising
Table II these Boolean functions is shown in Fig.
Boolean Functions for All the Signal Conditions 2. Timer 555 (IC1) is wired as an astable
Signal Reference Boolean functions multivibrator to generate clock signal for
the 4-bit counter 74160 (IC2). The time
Green B-C(Lt)/B-G (Rt) X’YZ
duration of IC1 can be adjusted by vary-
Green B-E (St) XYZ’ + X’Y’Z
ing the value of resistor R1, resistor R2,or
Red B-E (St) X+Y’Y’Z’
capacitor C2 of the clock circuit. The ‘on’
Yellow B-E (St) X’YZ
time duration T is given by the fol lowing
Green D-E (Lt)/D-A (Rt) XYZ
relationship:
Green D-G (St) XYZ ’ + XY’Z
T = 0.695C2(R1+R2)
Red D-G (St) X’+XY’Z’
IC2 is wired as a 3-bit binary counter
Yellow D-G (St) XYZ
by connecting its Q3 output to reset pin
Green F-G(Lt)/F-C (Rt) X’Y’Z’
1 via inverter N1. Binary outputs Q2,
Green F-A (St) X’Y’
Q1, and Q0 form variables X, Y, and Z,
Red F-A (St) X+X’YZ
respectively. These outputs, along with
Yellow F-A (St) X’YZ’
their complimentary outputs X’, Y’, and
Green H-A (Lt)/H-E (Rt) XY’Z’
Z’, respectively, are used as inputs to the
Green H-C (St) XY’
rest of the logic circuit to realise various
Red H-C (St) X’ + XYZ
outputs satisfying Table I.
Yellow H-C (St) XYZ’
You can simulate various traffic lights
Green Walk (N-S/S-N) X’YZ’ + X’Y’Z
using green, yellow, and red LEDs and
Green Walk (E-W/W-E) XYZ’ + XY’Z
feed the outputs of the circuit to respec-
Note. X’, Y’, and Z’ denote complements of variables X, Y, and Z, respectively.
tive LEDs via current-limiting resistors
Flashing Beacon
Ashok K. Doctor
A
flashing beacon has many uses. rent. Since the IC has
It can be employed as a distress an inbuilt switch-on
sig-nal on highways or as a direc- current limiter, it ex-
tion pointer for parking lots, hospi-tals, tends the bulb life.
hotels, etc. Here we present a flashing For the shown val-
beacon that uses well-known regulator IC ues of resistors and
LM317T. As LM317T regulator can deliver capacitors, the bulb
more than 1 amp. A small 12V, 10W bulb flashes at approxi-
with a high-quality reflector can serve as mately 4 cycles per
a good visible blinker. second. The number
A 12-15V, 1A DC supply is connected of flashes depends on
to the input pin of the IC. A 12V, 10W the charge-discharge
bulb and a combination of resistors and time of the capacitors.
capacitors are connected between the out- Different values of
put pin and ADJ pin of the IC as shown resistors and capacitors
in the figure. The IC is provided with an can be used to increase
aluminium heat-sink to dissipate the or decrease the number
heat generated while delivering full cur- of flashes.
T
his circuit (Fig. 1), used in conjunc- is wired as an astable multivibrator. time that capacitor C5 connected between
tion with a thin piezoelectric plate, Whenever the collector of transistor T6 the emitter of transistor T4 and ground
senses the vibration generated on goes high, the astable multivibrator takes to discharge after a knock. The
V
ariable frequency oscillators tuned circuit components and the degree depends on the following:
(VFOs) are used in amateur radio of regulation of the power supply. • Inductance of coil L1.
transmit-ters for carrier Here’s the circuit of a crystal-controlled • Crystal quality; HC6/U crystals are
generation. VFOs used in home-brew VFO for 40-meter band that overcomes recommended.
equipment are based on bipolar and field- the shortcomings of LC tuned VFOs and For L1 you may use the primary of a
effect transistors, wherein the stability of provides a comparatively stable RF source. short-wave (band 2) oscillator coil. Using
the VFO is governed by the quality of the In order to achieve accurate operating a 44µH inductor for L1, you can obtain
frequency of the RF oscillator, a good frequency shift. Note that the
it uses a quartz crystal as the frequency allotted to ham radio in 40m
main frequency-determining segment lies between 7000 kHz and 7100
element. kHz. XTAL1 and XTAL2 are 7000kHz
By adding an inductor (7MHz) quartz crystals.
and a variable capacitor in Variable condenser VC1 provides
series with the crystal, one main tuning control up to 7045 kHz for
can manage to get a slight the VFO, for an optimum selection of
frequency swing of 10 to 15 the crystal and the inductor. The swing
kHz. By adding a second increases greatly with crystal frequency;
crystal in parallel to the for example, two 10MHz crystals could
first crystal, you can obtain provide a stable swing of 90 kHz, while
a frequency swing of up 3.58MHz crystal could provide only
to 50 kHz. The frequency around 4kHz swing.
swing provided by the crystal
PC-BASED OSCILLOSCOPE
M.M. VijaI Anand
Readers’ comments Anand Owen upto 1KHz. To increase the input fre-
This 'PC Based Oscilloscope' article is a Through E-mail quency, we can use op-amps like LM318
good one. But nothing is mentioned about EFY : The author M.M. Vijai Anand with input frequencies more than 1 MHz.
the function of ten LEDs used in the cir- replies : The ten LEDs are used only to avoid the
cuit. Also, why is the range limited to 0-5V The op-amps used for rectification of AC ouput pins of LM3014 to be in floating
and 1KHz? signal in this circuit can withstand only levels.
C
onsider a situation where a message can then
burglar has entered your house be transmitted
and snapped the telephone wires, repeatedly with
leaving you with no means of comm- the help of an FM
unication with the outside world. In transmitter, in the
such an emergency, you will find this hope that some noble
intruder alarm to be very handy. It soul will hear it and
transmits a prerecorded emergency inform the police
message repeat-edly for reception by an about the incident.
FM receiver. The circuit
The message containing address, comprises a sound re-
geographical location, name, etc is cording-and-playback
recorded onto a chip. The prerecorded chip (UM5506BH). Fig. 1: Block diagram of the intruder radio alert system
T
his simple, low-cost circuit of timing components (potmeter VR1 or comprising transistors T2 and T3. Triac
automati-cally switches on the capacitor C4). BT136 is used in the circuit to operate a
porch light when your car enters The condenser microphone picks up the 230V bulb of up to 500W rating. Resistor
the porch. The light remains on for sound signals from the horn and converts R5 regulates the gate current of the triac.
a predetermined time period and these to electrical signals. The electrical Assemble the circuit on a veroboard
automatically switches off. While signals are amplified by transistor and enclose it in a cabinet. Keep the
you park your vehicle safely, a sweet amplifier T1. During negative transition loudspeaker away from the microphone
melody can also be heard. of the signal at the collector of transistor to avoid undesired triggering. Be careful
The circuit is based on the popular T1, monostable IC1 is triggered and its while connecting and testing the circuit,
timer IC 555. In the circuit, sound is output pin 3 goes high to activate the as some parts of the circuit are at mains
converted to electrical signal, which is melody circuit and triac BT136. LED1 acts potential. The polarity of mains (live and
used for triggering the IC. Usually, trigger as a zener diode, reducing the voltage for neutral) should be the same as shown
pin 2 of the IC remains high. When pin 2 IC2 (UM66 melody generator) to 3.3V, a in the circuit. If IC1 shows unwanted
goes low, it triggers the monostable built safer level. triggering, connect a 4.7k resistor and
around IC 555. Once triggered, output pin The melody circuit is built around the 4.7µF electrolytic capacitor between its
3 of monostable IC1 goes high and stays well-known melody generator IC UM66. pin 4 and ground.
in this state for a known duration, which The musical tone generated by the IC Note. The circuit can be easily
can be controlled by varying the value is amplified by the transistor amplifier modified for use as a burglar alarm.
Melody Generator
Praveen Shanker
T
his melody generator circuit uses Here, NE555 (IC1) is used in astable repeating.
six NE555 timer ICs to produce mode to produce 1Hz clock for decade All the Q outputs of IC2 wired via
ten notes of your choice by counter CD4017 (IC2), which counts up series combinations of 47-kilo-ohm
adjusting various presets. It is also to 10, making its corresponding outputs presets VR2 through VR11 and fixed
possible to add two different special (Q0 to Q9) high for one-second duration 10-kilo-ohm resistors R4 through R13,
effects. each sequentially. The process keeps and diodes D1 through D10, to pin 7