You are on page 1of 238

Electronic Projects

new collections
Volume 3
m. *

mm
I
ip
■ ■ j*

rjT

*>
j-

*/ -
* m* « » a- * a fcjf J- * V a

lit. -
# 9 *
v
■*
■- # # 4 ##-#-#>#*# # , m
*
4
Jt
*
*
* -i # # f 4 -f rr. . r a . # * * - P ! ■>
*
I V f V I I i-
-

avcpft«lt#«ffi»|wfltai - « J
- -
f * f i a ri
* *

'

AMI
■if#-* M f f i # « » » a » # <

» -“
More than constructional
50 projects
CIRCUIT IDEAS

FM BOOSTER
■ 30
MAR
IL KU
SUN
PRADEEP G.

H
ere is a low-cost circuit of an FM stations clearly. The circuit comprises a 2SC2570. (Only C2570 is annotated on the
booster that can be used to listen common-emitter tuned RF preamplifier transistor body.)
to programmes from distant FM wired around VHF/UHF transistor Assemble the circuit on a good-quality
PCB (preferably, glass-epoxy). Adjust in-
O
R3
T C6 +12V
put/output trimmers (VC1/VC2) for maxi-
mum gain.
C2570 1K
Input coil L1 consists of four turns of
—L C3 20SWG enamelled copper wire (slightly
1n R2
B E C
270Q space wound) over 5mm diameter former.
V) OUTPUT TO It is tapped at the first turn from ground
C1
5.6P
C4 C5 F. M. RADIO lead side. Coil L2 is similar to L1, but has
R1 10P 10P ANTENNA
only three turns. Pin configuration of tran-
INPUT FROM
ANTENNA T VC1 o
o
CD»—
JLI Hi
C2
’27K

a C2570
L2
sistor 2SC2570 is shown in the figure.

ZL 22P
/TRIMMER
\P
(3 + 1)T
5.6P
(3T)
# VC2
22P
TRIMMER

GNDQ
L1 = 4T, 20 SWG 5mm DIA, AIR CORE
TAPED AT 1T FROM BOTTOM END
L2 = 3T, 20SWG 5mm DIA, Al CORE

ELECTRONICS FOR YOU FEBRUARY 2002


CCOON N
S TSR TU R
C TUI OCNT I O N

INTERACTIVE GAL PROGRAMMER SUN


IL KU
MAR

FOR BEGINNERS
JUNOMON ABRAHAM
CK OE

G
eneric array logic (GAL) is a fam- T
ily of programmable logic devices. S
M
Almost any logic circuit can be U
programmed into these chips. A simple IC X
P Vcc
T
of this type is the GAL16V8. M
Here we’ve described a simple GAL U O
programmer for electronics hobbyists
and professionals who are in the FROM
X
POLARITY
CONTROL GATE Q
M
U
X >> E2
l/0(n)
beginning stage of GAL programming
and learning. GALs are available from
AND
ARRAY
)E> D Q

various manufacturers but Lattice / XOR(n)


Semiconductor’s GALs are good due to F

company’s good technical support and □a M


U
availability of information from the
company’s Website ‘www.latticesemi.com’.
FEEDBACK
X

I
1
FROM
ADJACENT
For this programmer we’ve used Lattice CK OE STAGE
ispDesign EXPERT software tool for the OUTPUT (m)
design and analysis of programmable Fig. 2: Logical diagram of GAL device’s output logic macrocell
logic devices. You can get it free for
trial from the Website of Lattice (S) Pte Ltd in Bangalore and Delhi in a programmable array logic (PAL)
Semiconductor. (EFY. In-flux Technology is Indian representative of Lattice. For device.
any help, the firm Each column is connected to the input
9 Vcc can be approached of an AND gate and each row is con-
l/CLK 1- > l/CLK
in
e-mail
Delhi via
address:
nected to an input variable or its comple-
20 ment. Any combination of input variables
/
191/O/Q iftdelhi@vsnl.net) or complements can be applied to an AND
o OLMC
gate to get the desired product by
2— fc programming each E2CMOS cell to either
/ Introduction to
181/O/Q ‘on’ or ‘off’ state. A cell that is ‘on’ effec-
o OLMC the GAL16V8
tively connects the corresponding row and
3 — te 3CH
L a t t i c e
7f8 — 171/O/Q Semiconductor PARTS LIST
OLMC
4 — te :£H Company introduced Semiconductors:
LU
/ the GAL16V8 in IC1, IC2 - 74LS244 octal buffer
CQ>- o ~ 161/O/Q IC3 - 7812 12V regulator
< < OLMC the mid 1980s. Fig. 1
5 — te S 5
DC CO :£H shows the functional IC4
T1
- 7805 5V regulator
- BC547 npn transistor
<< * /
— 15 1/O/Q block diagram of
o OLMC D1-D4 - 1N4007 rectifier diode
the GAL16V8. The
6 — te o<
DC
3N)—
GAL16V8 has a fixed Resistors (all ¼-watt, ±5% carbon, unless
Q. / stated otherwise):
o OLMC 141/O/Q OR array and a
R1, R2 - 2.2-kilo-ohm
programmable
7 — te AND array. The
R3-R5 - 10-kilo-ohm
/ R6-R11 - 3.3-kilo-ohm
o OLMC — 131/O/Q reprogrammable R12 - 4.7-kilo-ohm
s— te array is essentially a Capacitors:
/ grid of conductors C1 - 1000µF, 25V electrolytic
a OLMC
— 12 1/O/Q
forming rows and C2-C5 - 0.1µF ceramic disk
te
9—

10
I OE o<|— i— 11 l/OE
columns with an elec-
trically erasable
Miscellaneous:
X1 - 230V AC primary to 0-15V,
CMOS (E2CMOS) cell 150mA secondary transformer
OGND at each cross-point, - 25-pin D connector
Fig. 1: Functional block diagram of the GAL16V8 rather than a fuse as

ELECTRONICS FOR YOU SEPTEMBER 2002


CONSTRUCTION

(Note. De- PAL replacement. Each of the


E> t a i l e d GAL16V8 and the GAL20V8 can directly
information replace over 20 of the common PAL
about the programmable logic devices. This means
[B> GAL is you need to stock only two GAL types to
available in handle your programmable logic device
1 6 V 8 needs.

E> datasheet,
which will
be included
Space savings. Each GAL typically re-
places two to four standard TTL chips,
saving a large amount of board space.

t>? in the next


month’s
EFY-CD.)
Speed. GALs are fast devices with
propagation delay as low as 7 nanosec-
onds (ns). Typical GALs have a propaga-
Fig. 3: An example logic circuit
tion delay of only 15 ns and hence are
column, and a cell that is ‘off’ discon- faster than standard 7400 or 74LS series
nects the corresponding row and column.
Benefits of using GAL logic devices.
The cells can be electrically erased and GALs offer the following benefits to hard- Reprogrammability. Programmable
reprogrammed. ware designers: GALs allow correction of design errors and
The GAL has the programmable Flexibility. GALs are very flexible de- make board layout easier. These can be
logic and 16 OLMCs (output logic macro vices and can implement both combina- reprogrammed up to a hundred times. Eras-
cells, refer Fig. 2 for its logic diagram) tional logic functions (AND, OR, NAND, ing and programming take only a few sec-
that includes OR gates and flip-flops. etc) as well as registered logic functions onds.
Apart from this, some memory bits are (counters, shift registers, etc) on the same Secrecy. Since the logic is configured
allotted for configuring the device modes. chip. through programming, secrecy of the cir-

o
25 PIN IC1, IC2 = 74LS244 G
T +5V
1 20
D CONNECTOR Y1 R3 R4 R5
18
A1 Y2
13
2 < 16 10K510K* 10K
25 A2 C5
o 4 14
Y3
DC
O o
A3 6 o Y4
0.1M
Q- (> A4 12
8 20
LU
o RA5
()
7
o RA4
<
CE
o D7 6
O
2 o
o D6 RA3
5
cr
LU
h-
=>
Q_
o
o
o
o-
D5
D4
RA2
4
1 — VWV
R6
— '
3.3K
o
o o
O
o
o
D3
D2
D1
G
A1
19
11
A2 13
20

CD 9
Y1 RA1
3
GAL
16V8A/B/C/D
13 — VWV
R7

3.3K
i

ON
O
cr
LL O
o
O
DO O 7
Y2 RAO
18 ZIF
14 — VWV—
R8
i

14 .o o AUTO SOCKET 3.3K


1
FEED
10
P/V
15 — VWV—R9
1

19
PHASE STB 3.3K
O-
11 16 — A/WV- — i

L SDIN
9 R10

t o
C=>
o
230V AC O
50Hz o
015V
<3
c=>
LU
QD
O
cr
G
1
20
18
Y1
SCLK
SDOUT
8

12
17
3.3K
— VWV—
R11
3.3K
i

INIT A1 Y2
O Q 0V 2 < EDIT

I CD
(f)
A2 16
4 CM Y3 2
A3 6 Q 14 10
X1 Y4
a 230V A4 8 12
NEUTRAL AC PRIMARY
W
TOO-15V, 150mA
ACKNOWLEDGE
l/CLK [ 1 20 ] VCC
SECONDARY [ ] l/O/Q
TRANSFORMER
+12V
[ ] l/O/Q
+12V R12 [ ] l/O/Q
O
4.7K R2 GAL
IC3 IC4 G 2.2K [ 5
16V8
] l/O/Q
IN OUT IN OUT 19 Y1
1 7812 3 1 7805 3 0+5V 9 [ 15 ] l/O/Q
'
D1 ~ÿb3 + COM. COM.
CD
CM
O
[ ] l/O/Q
C2
C4
[ ] l/O/Q
I 01 0.1p C3
0.1p 0.1M 11 10 [ ] l/O/Q
1000M A1 R1 T1
D2
25V 2.2K BC547 GND [ 10 11 ] l/OE

D1-D4 = 1N4007

Fig. 4: Schematic circuit of GAL programmer

SEPTEMBER 2002 ELECTRONICS FOR YOU


CONSTRUCTION

cuit is possible. as Solid State Technology


Cost. ICs GAL16V8 and GAL20V8, with Association). The box START
standard speeds of 25 ns and 15 ns, re- shows the listing of a JEDEC
spectively, cost only a few rupees even file prepared for the
when purchased in small quantities. example logic circuit shown
in Fig. 3. The logic circuit PA/ = HIGH
can be designed and con-
GAL-based logic design
verted into JEDEC file
Depending upon the logic circuit design, with the help of Lattice
the memory cells have to be programmed, ispDesign EXPERT develop- RA5....RA0 = ROW ADDRESS
i.e. the logic circuit is entered into ment software. (Hints given
the GAL as a bitstream or fuse map. in box on page 56.)
The standard fuse map is in JEDEC format. The steps for GAL-based
(JEDEC stands for Joint Electronic Device logic design are as follows: APPLY A BIT TO SDIN 4
Engineering Council, which is now known 1. Prepare the required
logic diagram.
2. Convert the
JEDEC File Contents of the Logic logic diagram to the NO
TRANSFERRED ALL SCLK = PULSE
Circuit in Fig. 3 bitstream that is BITS IN THIS ROW? (POSITIVE
EDGE
ispDesignEXPERT 8.3 Lattice Semiconductor Corp. acceptable by the TRIGGERING)

JEDEC file for: P16V8AS V9.0 GAL internal


YES
Created on: Tue Dec 18 23:08:07 2001 memory. This can be
achieved by using
logic.bls Lattice ispDesign EX- STB = LOW PULSE
* PERT tool, which (20 TO 100mSEC FOR ERASING
QP20* QF2194* QV0* 1 TO 10mSEC FOR PROGRAMMING)
allows you to design
X0*
NOTE Table of pin names and numbers* the logic as a sche-
NOTE PINS A:4 B:1 Q:16 C:2 D:3*
L0000 4 Indicating the memory cell address
matic diagram or us-
ing any programming
I
00000000000000000000000000000000 language such as PA/ = LOW
ADD 22 ROWS OF 32 ZEROS EACH HERE VHDL and ABEL. The
00000000000000000000000000000000 result is a JEDEC file i
10100111111111111111111111111111
11011111101111111111111111111111
(fuse map). Detailed
information about NO ALL BITS ARE
00000000000000000000000000000000 CORRECT?
ADD 36 ROWS OF 32 ZEROS EACH HERE how to create the
00000000000000000000000000000000* JEDEC file is given in
L2048 ‘Tutorial’ section of YES
00010000* the Lattice ispDesign
L2056 STOP
EXPERT development
0 ADD 62 MORE ZEROZ HERE 0*
L2120 tool.
0* 3. Transfer the Fig. 5: Flowchart for writing/erasing the GAL16V8
L2121 fuse map bits to
0* proper locations of GAL memory Thus the programming source signals
L2122 cells. (from the PC’s parallel port in this case)
0* 4. Now GAL is ready for cus- should be connected only when the GAL
L2123
tom use. is in program mode. This control function
0*
L2124 is achieved via 74LS244 tristate buffers.
0* Programming is done using the
GAL programmer circuit
L2125 PC’s parallel port. The circuit consists
0* Fig. 4 shows the GAL program- of two tristate octal buffer ICs and the
L2126 mer circuit. When the GAL is in programming voltage is 12 volts. (The pro-
0* normal mode, some of its pins act gramming voltage is different for different
L2127
as inputs and rest of the pins act GAL ICs. This information can be obtained
0*
L2128 as outputs. When the GAL enters from the GAL itself.) The programming
1 ADD 62 MORE ONES HERE 1* the programming mode, the states voltage is developed using a 12V regula-
L2192 of the pins may change, i.e. some tor IC 7812.
1* outputs may change to inputs When the GAL enters the program
L2193 and vice versa. Programming mode (via the PC’s parallel port), the par-
0* mode is invoked by applying pro- allel port pins will get connected to the
C0FD9*
F78D
gramming voltage of usually GAL through the buffers. At this stage,
12 volts to EDIT pin (see Fig. 4). the buffers change from high-impedance

ELECTRONICS FOR YOU SEPTEMBER 2002


CONSTRUCTION
■ -ÿÿ
' I. »*T»y. .ÿMnSilllflnl IHAI jjy
IdVIS n l?tl ILI EE51E.
nteyu HF] ™|
LLS3LI
1 san i = “* F*-ÿl hBUfi
.ÿS .=,i»—
a
MOI = A/d
"
|_ j B_|-rk> j
- r
-
“•sHfm ±J1 imO
■ ■
VT-P-I ■"I. *J

r
n** frÿElS
'ÿI Jl
= 0Vd""SVd SS3d00V MOd r: -* y'Vl yjj *1 «
*ÿ B i _-JJJ F-»J-*Jÿ||
W*!MBBT|| [rA
-
«d TflhftB
3Sind MOI = ais
(03SriOl 01 L = HiaiM 3Sind) L( BIT, 'ÿ»
.* i «.i '£«ÿ*ÿ ■
na v av3d inoas Aiodd >

M-I-I] 1ÿ.. « H-H- J*f. ■* 'i «*•, F— a. -=ÿ


Fi .Tw-
t ink ■** ■
.*fe
ON 3SlDd
= M10S -r *-i | " i|
nv av3d NI sna 4
6M0d SIH1 3AlllSOd)
■J
3003 IHU in* TvL«L*:W Vn i , •


;,«[*
pin -wr I
I?:r 1»
(0Nld300ldl
.
S3A Screenshot: ispDesign EXPERT IDE showing the setting of JEDEC file properties to
Full JEDEC, which is needed for our programmer
dOlS
gram/verify mode) in serial fashion by is written in C language. It is self-explana-
signals SCLK (serial clock) and SDIN tory and easy to understand. User-friendly
Fig. 6: Flowchart for reading the GAL16V8 (serial data input), and is latched by interfaces have been used in most of the
STB (active-low) signal. Note that all modules.
state to active state by auto line feed (pin the operations (program, verify, erase, etc) The program is tested using a Pentium
14) signal of the parallel port. P/V should be performed only when the pro- III PC. For use with other PCs, some tim-
(1/0) determines the program or verify gramming voltage is applied to EDIT pin. ing constants may need to be changed
mode. The flowcharts for programming depending upon their processor speed.
Pins RA5 through RA0 select the rows (writing/erasing) and reading of GAL16V8 This has been suitably indicated in the
of the GAL memory. The column data is are shown in Figs 5 and 6, respectively. software listing.
transferred to or from the GAL (in pro- Fuse map. The arrangement of The JEDEC file obtained from the
memory cells or fuses inside design should be in the Full JEDEC for-
TABLE I the GAL16V8D, with only mat (not the Brief JEDEC or the Hex
Row Address of the Fuses the commonly required JEDEC format) since our software pro-
rows, is shown in Table I. cesses only the Full JEDEC format. This
0 0,32,64, ………..2016
1 1,33,65,………...2017 Physical orientations of these can be achieved by setting the ‘Proper-
2 2,34,66,………...2018 fuses are obtained from the ties’ to ‘Full JEDEC’ while creating JEDEC
3 3,35,67,………...2019 internal logic diagram of the file by the ispDesign EXPERT (refer
. ……………. GAL. screenshot above).
. ……………. An actual-size, single-side This programmer is checked for
. …………….
31 31,63,95,………2047 PCB for the GAL program- Lattice’s GAL16V8D and guaranteed
mer is shown in Fig. 7 with for 16V8A/B/C/D/Z/ZD series ICs that
32 2056,2057,2058,2059,…………..2119 (64-bit user its component layout in differ from GAL16V8 in terms of
electronic signature) Fig. 8. programming algorithm. You can try the
54 When we write 1 to this row, the erase operation
programmer for any programmable device
will take place
58 64-bit manufacturer signature by understanding the basics of program-
Software
ming.
60 2048,2049,2050,2051,2193,2120,2121,2122,2123,2128, Since the arrangements of Instead of ZIF socket, you can use the
2129,2130,2131,2132,2133,2134,2135,2136,2137,2138, memory cells inside the GAL ordinary IC socket, which is economical.
2139,2140,2141,2142,2143,2144,2145,2146,2147,2148,
2149,2150,2151,2152,2153,2154,2155,2156,2157,2158, and the JEDEC files are not Take care while making the connections
2159,2160,2161,2162,2163,2164,2165,2166,2167,2168, the same, we need to rear- for the parallel port of the PC, especially
2169,2170,2171,2172,2173,2174,2175,2176,2177,2178, range the JEDEC file to a for- the programming voltage control
2179,2180,2181,2182,2183,2184,2185,2186,2187,2188, mat that is acceptable by the connections, as these may damage the
2189,2190,2191,2124,2125,2126,2127,2192,2052,2053, GAL. The software for trans- motherboard circuitry.
2054,2055 (82 configuration bits)
ferring JEDEC file to the GAL EFY Lab note. Source code, execut-
SEPTEMBER 2002 ELECTRONICS FOR YOU
CONSTRUCTION

Hints for using schematic tools from


within ispDesignEXPERT software for
drawing logic circuit and obtaining its
JEDEC file
The ispDesignEXPERT software provided by Lattice
o Semiconductor can be interactively installed using the

// installation instructions (being included in the next


month’s EFY-CD).
Once the software has been installed, it can be
run by clicking on Windows’ ‘Start’ button and selecting
o ‘Programs’, ‘Lattice semiconductor’, and finally
‘ispDesignEXPERT’. ispDesignEXPERT Project Navigator
screen as shown in the screenshot appears.
Under ‘File’ menu open a new project, name it,
and save it as schematic ‘Type’ in any directory of
your choice. Now open this project using File menu.
Now click on menu item ‘Window’ and select
‘Schematic Editor’. The Schematic Editor opens up to
present a sheet for drawing the schematic. The sheet
can be expanded or contracted as desired by using the
zoom-in and zoom-out options from within ‘View’
menu.
Again, in View menu select ‘Drawing Toolbar’. A
small screen captioned ‘Drawing’ with various tools
appears. You can take the mouse cursor to different
tools to find out each tool’s name/purpose and also go

4)1 through ‘Help’ menu topics relating to Schematic Editor


for their detailed usage. Now, if you click on ‘Add
symbol’ tool, a small window with ‘Symbol Libraries’
appears. This can be used for selecting various logic
gates and placing them in your sheet. Similarly, other
tools can be used to connect and label the gates as
well as nets and input/output terminals to realise the
Fig. 7: Actual-size, single-side PCB for GAL programmer
desired schematic.
Once the logic circuit is completed, it can be saved
GAL PROGRAMMER EFY SEPJ02 in a file name of your choice with .Sch extension.
RIO R8 After saving the schematic, close the Schematic Editor
R6 7
1 RL1
m$\
2K — O
R3 R4
to come back to ‘ISP Design Expert Project Navigator’
k screen again.
y Select ‘ISPLSIS256VE-165LF256’ listed under
J14
XI J15 ‘Sources in Project’ window and double click on ‘Open’
o HH
n co
o E B C 10K button. A ‘Device Selector’ screen appears, wherein
mm
&. 7K
CJl
H " BC547 ZIF-20
R
2 you should select ‘GAL16LV8C’ device. Click on ‘Ok’
and ‘Yes’.
H3al o° J13 Now click on ‘Source’ menu toolbar and select
_ O- o- J12
o o° ‘Import’ option. Browse to get the .Sch file saved earlier
0 o cxJ Q 9 . Jll a © J10
and open it. The saved file with .Sch extension will
w £ — B2 2» 2K
R2
J8
J9
appear in the ‘Sources in Project’ window.
C2 a © Click on the saved .Sch file and select ‘Compile
\%v9\ J7°ÿ o
o Schematic’ option from ‘Processes for Current Source’.
0000000000 J6 0000000000
IC2 Then click on ‘Start’ button for its compilation.
§ 2 [ IC1
74LS244 74LS244 After compilation is over, proceed to select
oI o 0 000000000 D000000000 ‘GAL16LV8C10LJ’ from ‘Source in Project’ window and
ai a J4
© then click on ‘JEDEC File’ option under ‘Processes for
J5
Current Source’. Click ‘Properties’ and double click on
J3

o?r•
© ‘Brief JEDEC’ (toggle) to get ‘Full JEDEC’ on the screen.
T T J* T9 J2

J1
°o Close the Properties window, click on ‘Start’ button
under ‘Processes for Current Source.’ After successful
4 ID 3 D2 D1
conversion to JEDEC format, the contents of this JEDEC
file can be seen by pressing ‘View’ button under
D1 D4 = 1N4007
OOOOOOOOOOOOB ‘Processes for Current Source’ and the same can be
oooooooooooo saved (from within the new window appearing via its
25-PIN D CONNECTORC FEMALE)
File option) with extension .JED.
SKT1 a © — EFY
J16
EEY/C0N/SEP-02/02

15U AC GAL PROGRAMMER EFY SEP'02 able file, GAL16V8 datasheet, and additional tuto-
rial/useful material for GAL devices will be included
Fig. 8: Component layout for the PCB in the next month’s EFY-CD.

ELECTRONICS FOR YOU SEPTEMBER 2002


CONSTRUCTION

GAL_PRO.C

/* This program is intended for the textattr(0x89); else if(i==1) goto start;
GAL16V8A/B/C/D/Z/ZD series banner(); cputs(“\r\nWait Verifying
textattr(0x0e); progress...............”);
it is tested for GAL16V8D and will work gotoxy(20,12);cputs(“What you want to do textattr(0x8e);
successfully for the above mentioned devices*/ with this programmer”); if(verify()==0)
textattr(0x0a); { textattr(0x8C);
#include<stdio.h> gotoxy(33,15);cputs(“P”); cputs(“\rError..Entered file is not equal
#include<dos.h> gotoxy(33,16);cputs(“V”); to GAL data - press any key to continue”);
#include<conio.h> gotoxy(33,17);cputs(“E”); getch();
#include<string.h> gotoxy(33,18);cputs(“Q”); goto start;
#define PORT 0x378 /*here you can change textattr(0x06); }
the LPT address if required*/ gotoxy(34,15);cputs(“rogram”); textattr(0x8A);
#define SDOUT 6 /* LPT port bit assign- gotoxy(34,16);cputs(“erify”); printf(“\rVerify Success..Entered file is equal
ment*/ gotoxy(34,17);cputs(“rase”); to GAL data- press any key to continue”);
#define SDIN 7 gotoxy(34,18);cputs(“uit”); getch();
#define SCLK 6 gotoxy(25,20);cputs(“Enter your choice”); goto start;
#define STB 0 top:
#define VPP 1 switch(getch())
#define P_V 2 { case ‘P’:goto program; /********************verify mode
#define ERASE_T 100 /*Erase pulse case ‘p’:goto program; ends********************/
time,this may change depending upon the type of case ‘V’:goto verify; /********************erase Mode
GAL & computer processor speed*/ case ‘v’:goto verify; starts*******************/
#define PROG_T 80 /*Programing pulse case ‘E’:goto erase; erase:
time,this may change depending upon the type of case ‘e’:goto erase; clrscr();
GAL & computer processor speed*/ case ‘Q’:exit(1); textattr(0x8d);
#define DL_CONST 400 /*Serial clock time case ‘q’:exit(1); banner();
constant,this also may change as stated above*/ default: goto top; textattr(0x03);
} gotoxy(2,10);cputs(“**********************”);
void banner(); /*function declaration*/ /******************program mode gotoxy(25,11);cputs(“Now we are in Erase
void setbit(int,int); starts********************************/ Mode”);
void clearbit(int,int); program: gotoxy(2,12);cputs(“**********************”);
char input(int,int); clrscr(); for(i=0;i<=2193;i++)
void newline(); textattr(0x8A); fuse[i]=’1';
void clock(); banner();
int load(); textattr(0x03); arrange();
void arrange(); gotoxy(2,10);cputs(“**********************”); erase();
void erase(); gotoxy(25,11);cputs(“Now we are in Program
int verify(); Mode”); cputs(“\r\nWait Erasing progress...............”);
void program(); gotoxy(2,12);cputs(“**********************”); textattr(0x8e);
if((i=load())==0) goto program; if(verify()==0)
FILE *fp; else if(i==1) goto start; { textattr(0x8C);
char c,msg[10],fuse[3000], /*fuse is used to cputs(“\r\nWait programming cputs(“\rError..GAL is not errased cor-
store the fuse map getting from JEDEC file*/ progress...............”); rectly - press any key to continue”);
pgm_file[61][83],fname[11]; / erase(); getch();
*pgm_file is for arranging the JEDEC format to a program(); goto start;
format that is acceptable by the GAL16V8A/B/C/ textattr(0x8e); }
D/Z/ZD*/ if(verify()==0) textattr(0x8A);
int raw,i,j,k; { textattr(0x8C); cputs(“\rErased Successfully... - press any
cputs(“\rError in programming - press any key to continue”);
/*sequence of bit addresses for 16v8A/B/C/ key to continue”); getch();
D/Z/ZD Configuration register*/ getch(); goto start;
int pattern[82]={ goto start;
2048,2049,2050,2051,2193,2120,2121,2122,2123,2128, } }
textattr(0x8A);
2129,2130,2131,2132,2133,2134,2135,2136,2137,2138, printf(“\rProgramming Success... press any /****************************function list-
key to continue”); ing starts********************/
2139,2140,2141,2142,2143,2144,2145,2146,2147,2148, getch();
goto start; /************************displaying ban-
2149,2150,2151,2152,2153,2154,2155,2156,2157,2158, /********************programm mode ner*********************/
ends***************/ void banner()
2159,2160,2161,2162,2163,2164,2165,2166,2167,2168, /**********************verify mode {
starts**************/
2169,2170,2171,2172,2173,2174,2175,2176,2177,2178, verify: gotoxy(2,4);cputs(“**********************”);
clrscr(); gotoxy(15,5);cputs(“Welcome to Interactive
2179,2180,2181,2182,2183,2184,2185,2186,2187,2188, textattr(0x8E); GAL programmer for Beginner’s”);
banner(); gotoxy(28,7);cputs(“by Junomon Abraham”);
2189,2190,2191,2124,2125,2126,2127,2192,2052,2053, textattr(0x02); gotoxy(2,8);cputs(“**********************”);
2054,2055 }; gotoxy(2,10);cputs(“**********************”); }
main() gotoxy(25,11);cputs(“Now we are in Verify
{ Mode”); /*****************load data from JEDEC file
start: gotoxy(2,12);cputs(“**********************”); to an array********/
clrscr(); if((i=load())==0) goto verify; int load()

SEPTEMBER 2002 ELECTRONICS FOR YOU


CONSTRUCTION

{ /********************Erase rou- delay(1);


gotoxy(20,14);cputs(“Enter ‘Q’ or ‘q’ to Quit tine**********************/ for(i=0;i<64;i++)
the program”); void erase() {
gotoxy(20,15);cputs(“Enter ‘B’ or ‘b’ to Go { if(input(PORT+1,SDOUT)!=pgm_file[raw][i]) re-
back”); clearbit(PORT+2,VPP); turn(0);
setbit(PORT+2,P_V); clock();
textattr(0x05); outportb(PORT,54); }
gotoxy(10,17);cputs(“Enter the JEDEC(.jed) setbit(PORT+2,VPP); }
file name: “); delay(1); outportb(PORT,60);
textattr(0x01); delay(1);
gotoxy(10,19);cputs(“JEDEC(.jed) file cotains setbit(PORT,SDIN); setbit(PORT+2,STB);
the fuse map for the GAL”); clock(); delay(1);
gotoxy(12,20);cputs(“It can be created by Lat- clearbit(PORT+2,STB);
tice ‘ispDesign EXPERT’”); setbit(PORT+2,STB); delay(1);
gotoxy(43,17); delay(100); for(i=0;i<82;i++)
gets(fname); clearbit(PORT+2,STB); {
if(strcmpi(fname,”q”)==0) exit(1); delay(1);
else if(strcmpi(fname,”b”)==0) return(1); outportb(PORT+2,0x00); if(input(PORT+1,SDOUT)!=pgm_file[60][i]) re-
outportb(PORT,0x00); turn(0);
fp=fopen(fname,”r”); } clock();
if(fp==NULL) }
{ printf(“\n\n\n\n unable to open the file, /**********************program rou- outportb(PORT+2,0x00);
Press any key to continue”); tine*************/ outportb(PORT,0x00);
getch(); return(0); void program() return(1);
} { }
int temp1;
while((fgets(msg,6,fp))!=NULL) clearbit(PORT+2,VPP); /**********generate a clock pulse to the
{ setbit(PORT+2,P_V); SCLK pin of GAL**************/
if(strncmp(msg,”L0000",5)==0) setbit(PORT+2,VPP); void clock()
break; delay(1); {
} printf(“\n”); long int delay1;
i=0; for(raw=0;raw<=32;raw++) setbit(PORT,SCLK);
while((c=getc(fp))!=EOF) { outportb(PORT,raw);delay(1); for(delay1=0;delay1<DL_CONST;delay1++);/
{ printf(“>>”); *for generating small delay*/
if((c==’0')||(c==’1')) for(i=0;i<64;i++) clearbit(PORT,SCLK);
{ fuse[i]=c;i++; } { for(delay1=0;delay1<DL_CONST;delay1++);/
else newline(); if(pgm_file[raw][i]==’1') temp1=0x80; *for generating small delay*/
} else temp1=0x00; }
outportb(PORT,raw|temp1);
arrange(); clock(); /************set a bit of LPT port regis-
textattr(0x06); } ters********************/
printf(“\nSuccessfully loaded the file setbit(PORT+2,STB);
%s”,fname); delay(PROG_T); void setbit(int address,int bit)
} clearbit(PORT+2,STB); {
delay(1); int temp,byte=01;
/******rearranging the fuse map that is ob- } byte=byte<<bit;
tained from JEDEC file**********************/ temp=inportb(address);
void arrange() outportb(PORT,60);delay(1); outportb(address,temp|byte);
{ for(i=0;i<82;i++) }
for(j=0;j<=31;j++) {
{ if(pgm_file[60][i]==’1') temp1=0x80; /************clear a bit of LPT port regis-
for(i=j,k=0;i<=2047;i=i+32,k++) else temp1=0x00; ters*****************/
pgm_file[j][k]=fuse[i]; outportb(PORT,60|temp1); void clearbit(int address,int bit)
} clock(); {
} int temp,byte=01;
for(i=2056,k=0;i<=2119;i++,k++) setbit(PORT+2,STB); byte=0xff^(byte<<bit);
{ delay(PROG_T);
pgm_file[32][k]=fuse[i]; clearbit(PORT+2,STB); temp=inportb(address);
} delay(1); outportb(address,temp&byte);
gotoxy(2,23); }
printf(“\n\n\n”); }
for(i=0;i<=81;i++) /*************read a bit from
{ /***************verify rou- LPT********************/
pgm_file[60][i]=fuse[pattern[i]]; tine****************************/
} int verify() char input(int address,int bit)
{ {
} clearbit(PORT+2,P_V); int temp,value;
setbit(PORT+2,VPP); char c;
/*****************skip to next line in the delay(1); temp=inportb(address);
JEDEC file***************/ for(raw=0;raw<=32;raw++) value=(temp>>bit);
void newline() { value=value&0x01;
{ outportb(PORT,raw); if(value==0x01) return(‘1’);
int i; delay(1); return(‘0’);
while(c!=’\n’) setbit(PORT+2,STB); }
c=getc(fp); delay(1); /*********************function listing
} clearbit(PORT+2,STB); ends****************/ ❑

ELECTRONICS FOR YOU SEPTEMBER 2002


CIRCUIT IDEAS

INFRARED TOY CAR $£>-


SAN
I THE
O

MOTOR CONTROLLER
T.K. HAREENDRAN

T
his add-on circuit enables remote depressed again, the monostable is example, behind the front glass, and con-
switching on/off of battery-operated retriggered to reset decade counter IC2 and nect its wires to the circuit board using a
toy cars with the help of a TV/ the motor is switched off. Standby LED1 short 3-core ribbon cable/shielded wire.
video remote control handset operating at glows again. Note. Since the circuit uses modu-
30–40 kHz.
When the circuit is energised
from a 6V battery, the decade
R1
wD2
o
S1 +6V
C3 1N4007 ON/OFF
counter CD4017 (IC2), which is 100Q
10M
configured as a toggle flip-flop, is 16V

immediately reset by the power-on- T_ ci 1 14 4 16


D1
1N4148
R8
1Q __C6 C7
100M C2 (1W) 100n 100M
reset combination of capacitor C3
and resistor R6. LED1 connected
X 16V '1 OOn
3 IC1 IC2
4
Q2
16V

to pin 3 (Q0) of IC2 via resistor R5


R4 CD 10 14 CD I
XH0T2
T1 1 M Q0
C557B 2 4047 3 4017 2
glows to indicate the standby con- 8
dition. In standby condition, data
R2
1K
i 12 15
220Q BD139
2 5 6 7 9 R5 13 8 12
1K
output pin of the integrated infra- \\( IR 3 R3
red receiver/demodulator RXR
1
2.2K
LED1
&
R6
100K +X
C4
100M M
+
1 C5
(SFH505A or TSOP1738) is at a (RED)
X
16V 100n GND
o
high level (about 5 volts) and tran- M=MOTOR (<6VDC)
sistor T1 is ‘off’ (reverse biased).
The monostable wired around IC1 FRONT VIEW IR RXR

m
SFH505A
is inactive in this condition. TSOP1738
When any key on the remote o BD o
control handset is depressed, the 139
output of the IR receiver momen- 1 2 3 1 2 3

tarily transits through low state and


C|BE| LU
o o I—
transistor T1 conducts. As a result, z Z>
0 > + O E C B
Vcc GND O/P
the monostable is triggered and a
short pulse is applied to the clock
input (pin 14) of IC2, which takes Q1 out- This circuit can be easily fabricated on lated infrared beam for control function,
put (pin 2) of IC2 high to switch on motor a general-purpose printed board. After con- ambient light reflections will not affect the
driver transistor T2 via base bias resistor struction, enclose it inside the toy car and circuit operation. However, fluorescent
R7 and the motor starts rotating connect the supply wires to the battery of tubelights with electronic ballasts and CFL
continously (car starts running). Resistor the toy car with right polarity. Rewire the lamps may cause malfunctioning of the
R8 limits the starting current. DC motor connections and fix the IR re- circuit.
When any key on the handset is ceiver module in a suitable location, for

JULY 2002 ELECTRONICS FOR YOU


CIRCUIT IDEAS

MOBILE PHONE I THE


O
configuration and the positive DC supply
is directly connected to the charger’s out-

BATTERY CHARGER SAN


put contact, while the negative terminal
is connected through current limiting re-
sistor R2.
T.K. HAREENDRAN LED2 works as a power indicator with
resistor R1 serving as the current limiter

M
obile phone chargers available in 7.2 volts, such as Nokia 6110/6150. and LED3 indicates the charging status.
the market are quite expensive. The 220-240V AC mains supply is During the charging period, about 3 volts
The circuit presented here comes downconverted to 9V AC by transformer drop occurs across resistor R2, which turns
as a low-cost alternative to charge mobile X1. The transformer output is rectified by on LED3 through resistor R3.
telephones/battery packs with a rating of diodes D1 through D4 wired in bridge An external DC supply source (for in-
stance, from a vehicle battery) can also be
on used to energise the charger, where resis-
o

t CD
X1
_
,
CD
9V D1 lV iÿD3
CELLPHONE
BATTERY tor R4, after polarity protection diode D5,
230V AC CD
CD
«- OH limits the input current to a safe value.
50Hz CD CHARGING
O The 3-terminal positive voltage regulator
I O CD R1 LED3
CD ov 1K R2
LM7806 (IC1) provides a constant voltage
D2~ÿ~ y
'470
o D4 POWER ON R3
.1000
output of 7.8V DC since LED1 connected
X1=230V AC PRIMARY TO 0-9V, 250mA _\\ LED2
SECONDARY TRANSFORMER D1-D6=1N4007 between the common terminal (pin 2) and
o ■K - ground rail of IC1 raises the output volt-
t
EXT. C1
lEXT. DC| age to 7.8V DC. LED1 also serves as a
power indicator for the external DC sup-
DC 1000(i
LED1 K D6 LM
12 TO. 13.8V 25V 7806 ply.
I
+
D5
R4
470
VWS/- 1 IC1
COM

3
0/P
1 2 3 After constructing the circuit on a
veroboard, enclose it in a suitable cabinet.
7806 7.8V IN COM OUT A small heat sink is recommended for IC1.

ELECTRONICS FOR YOU JANUARY 2002


CIRCUIT IDEAS

DING-DONG BELL SAN


I TH
EO
tary-pair, two-transistor amplifier is used
to amplify the sound to a fair level of
PRAVEEN SHANKER audiblity. You may either use a piezo
tweeter or an 8-ohm, 500mW speaker at

T
his simple and cost-effective door (Website address: fortech@mantramail. the output.
bell circuit is based on IC 8021-2 com). It is an 8-pin DIP IC whose only During the standby period, the IC con-
from Formox Semiconductors four pins, as shown in the circuit, have sumes nominal current of a few microam-
been used. peres only. Therefore switch S1 may be

T2
The IC has an in-built kept closed. Each time switch S2 is
S1
ON-OFF BC557 OR • •
1 2 3
• circuitry to produce ding- pressed, ding dong sound is produced

+
SWITCH 5

IC1
T1
BC548 OR
C8050/r
C8550
€) E B C
BOTTOM
dong sound each time its
VIEW OF pin 3 is pulled low. The
twice. If you try to press switch S2 a sec-
ond time when the first ding dong sound
3V 3 6 LS1 BC549/
BATT. 8021-2 4Q/8Q sound is stored in the IC is still being produed, it has no effect what-
BC557
R1 500MW as bits, as in a ROM. The ever and the two ding-dong bell sounds
1K + C1 LOUD
10(a SPEAKER sound output from the IC will be invariably produced.
12V
The circuit costs no more than Rs 35
HI S2


can’t however drive a
speaker directly, as this and the IC 8021-2 used in the circuit is
S2 =PUSH TO ON
puts strain on the device. readily available for around Rs 15 in the
SWITCH Therefore a complemen- market.

ELECTRONICS FOR YOU MARCH 2002


C I R CC UI RICTU I IT DI ED EAASS

when it detects IR light, triggering the


IR REMOTE SWITCH
K.S. SANKAR J9£%
H0 S .C. D
WIVE
D I
monostable (1-second) built around timer
NE555. The output of the mono toggles
the J-K flip flop, whose Q output drives
the relay through SL100 npn transistor (T1).
LED2, LED3, and LED4 are used to

I
magine the convenience of selecting works up to a distance of about 10 metres. display the status of each output stage dur-
TV channels using your remote and The circuit is built around a 3-pin IR ing circuit operation. Back-EMF diode D5
then pointing the same remote to your IC receiver (Siemens SFH-506-38 or equiva- is used for protection. Transistor T1 is con-
switchboard to switch on/off the fan or lent) that can detect 38kHz burst frequency figured as an open-collector output device
the tubelight. Here is a simple circuit to generated by a TV remote. (This IR re- to drive the relay rated at 12V DC.
remotely switch on/off any electrical de- ceiver module has been covered earlier in The circuit draws the power from volt-
vice through a relay using the normal TV/ many projects published in EFY.) age regulator 7805. Capacitor C5 is sol-
VCR/VCP/VCD remote control unit. It The output pin of IR sensor goes low dered close to the IR sensor’s pins to avoid

noise and false
L1
RL1
L-v N/O @
I
triggering. Ca-
g
L1 =100W, 230V BULB pacitor C3 and
IC1
RL1 = 9V, 150Q, 1 C/O RELAY
A D1 <=»
t resistor R3 also
« ►
IN 1 3 OUT <ÿ i ♦
230V AC
7805 1N4007 50Hz
2 1 »
N/C
I avoid false trig-
COM C1 +
R1 gering of
4700 R2
1000|a„ 100K monostable
16V
i r LED1 NE555. The
GREEN
monostable acts
+ J Vcc
C5 4 8
as a 1-second
R7 5 6 16
(9V-12V) 10ÿ TRS hysterisis unit to
BATT. 16V 1000 6
A/WV IC3 restrict the flip-
IC2
PIS ,, Q flop from getting
R8
R3 NE555 7 CD4027 1 T1 (FRONT VIEW
100K SL100 OF IR SENSOR r e t r i g g e r e d
1K IR CLK 1K
O/P TK 1838)
SENSOR Hi TRG
1 2 3 3 within one sec-
C3 5 R6
0.01n R5
4 7 8 1K O ond. To activate
+ RESET SET GND'
LED2 3300 any other 12V
GREEN C47“ C2
IR SENSOR=TK1838 0.01ÿ 10M logic device, use
OR SFH 506-38 16V //ÿ LED3 O/P Vcc
GREEN GREEN the output across
1 2 3
GND the relay coil ter-
minals.

MARCH 2002 ELECTRONICS FOR YOU


CIRCUIT IDEAS

AUTOMATED TRAFFIC SIGNAL RUP


ANJA
NA

CONTROLLER *5
VIKRAM BANERJEE sity is high. This controller allows the pe- of 8 seconds each. For the left- and right-
MRINAL KANTI MANDAL destrians to safely cross the road during turning traffic and pedestrians crossing
DR ANIRUDHA GHOSAL certain periods. from north to south, south to north, east
3. The controller uses digital logic, to west, and west to east, only green and

T
his automated traffic signal control- which can be easily implemented by us- red signals are used.
ler can be made by suitably pro- ing logic gates. Table I shows the simultaneous states
gramming a GAL device. (For GAL 4. The controller is a generalised one of the signals for all the traffic. Each row
programming you may refer to the con- and can be used for different roads with represents the status of a signal for 8

NORTH NORTH NORTH NORTH


A B A B A B A B

H H
co > C (- 1-
co
H C \— h-
co
H C i— \—
co
H > ► Ch
CO co CO CO
LU <
m
LU < LU < LU <
G 4 D G D m G D m Gÿ 4 4 D m

E
o F E
© F E
© F E
©
SOUTH SOUTH SOUTH SOUTH

NORTH NORTH NORTH NORTH


A B A B A B A B

H
CO
H > > * C l-
CO
H > c l-
CO
H > c H
CO
H > C
CO CO CO CO
LU < LU < LU < LU <
G4 4 D w G 4 D m G 4 D m G4 4 4 D w

F I E
© F E
© F E
O F E
©
SOUTH SOUTH SOUTH SOUTH

Fig. 1: Flow of traffic in all possible directions

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

struction project published on page 52 in slight modification. seconds. As can be observed from the
EFY’s September issue.) Its main features 5. The control can also be exercised table, the ratio of green, yellow, and red
are: manually when desired. signals is 16:8:40 (=2:1:5) for the straight
1. The controller assumes equal traffic The time period for which green, yel- moving traffic. For the turning traffic the
density on all the roads. low, and red traffic signals remain ‘on’ ratio of green and red signals is 8:56
2. In most automated traffic signals the (and then repeat) for the straight moving (=1:7), while for pedestrians crossing the
free left-turn condition is provided through- traffic is divided into eight units of 8 road the ratio of green and red signals is
out the entire signal period, which poses seconds (or multiples thereof) each. Fig. 16:48 (=2:6).
difficulties to the pedestrians in crossing 1 shows the flow of traffic in all permis- In Table II (as well as Table I) X, Y,
the road, especially when the traffic den- sible directions during the eight time units and Z are used as binary variables to

NOVEMBER 2002 ELECTRONICS FOR YOU


CIRCUIT IDEAS

TABLE II depict the eight states of 8 trol output.


Boolean Functions for All the Signal Conditions seconds each. Letters A The circuit diagram for realising these
Signal Reference through H indicate the left
Boolean functions Boolean functions is shown in Fig. 2.
and right halves of the roads Timer 555 (IC1) is wired as an astable
Green B-C(Lt)/B-G (Rt) X’YZ
in four directions as shown multivibrator to generate clock signal for
Green B-E (St) XYZ’+X’Y’Z
in Fig. 1. Two letters with a the 4-bit counter 74160 (IC2). The time
Red B-E (St) X+Y’Y’Z’ dash in between indicate the duration of IC1 can be adjusted by vary-
Yellow B-E (St) X’YZ direction of permissible ing the value of resistor R1, resistor R2,
Green D-E (Lt)/D-A (Rt) XYZ
movement from a road. or capacitor C2 of the clock circuit. The
Green D-G (St) XYZ’+XY’Z
Straight direction is indicated ‘on’ time duration T is given by the fol-
Red D-G (St) X’+XY’Z’
by St, while left and right lowing relationship:
Yellow D-G (St) XYZ
turns are indicated by Lt and T = 0.695C2(R1+R2)
Green F-G(Lt)/F-C (Rt) X’Y’Z’ Rt, respectively. IC2 is wired as a 3-bit binary counter
Green F-A (St) X’Y’ The Boolean functions by connecting its Q3 output to reset pin 1
Red F-A (St) X+X’YZ
for all the signal conditions via inverter N1. Binary outputs Q2, Q1,
Yellow F-A (St) X’YZ’
are shown in Table II. and Q0 form variables X, Y, and Z, re-
Green H-A (Lt)/H-E (Rt) XY’Z’
The left- and the right-turn spectively. These outputs, along with their
Green H-C (St) XY’
signals for the traffic have complimentary outputs X’, Y’, and Z’,
Red H-C (St) X’+XYZ the same state, i.e. both are respectively, are used as inputs to the rest
Yellow H-C (St) XYZ’ red or green for the same of the logic circuit to realise various out-
Green Walk (N-S/S-N) X’YZ’+X’Y’Z
duration, so their Boolean puts satisfying Table I.
Green Walk (E-W/W-E) XYZ’+XY’Z
functions are identical and You can simulate various traffic lights
Note. X’, Y’, and Z’ denote complements of variables X, Y,
they should be using green, yellow, and red LEDs and
and Z, respectively.
connected to the same con- feed the outputs of the circuit to respec-
tive LEDs via
o
Vcc IC3 (N1-N4) = 7404 current-limit-
R1 IC4 (N5-N8) = 7432 ing resistors of

■>
7 9 10 15 16
240K
1
R IC5 (N9, N10) = 7432 470 ohms each
IC6 (N11-N13) = 7411
8 4
IC7 (N14-N16) = 7411
to check the
7
Ql__Ti IC8 (N17, N18) = 7411 working of the

r
11
470K IC1 Vo IC2 Q2 IC9 (N19, N20) = 7408 circuit. Here,
2 3 2
555 CLK 74160 12 X for turning traf-
Q1
6 13 fic and pedes-
Y
+-1- C2 5
Q0
trians crossing
14 N4 N3 N2
10M C1 8 Z 8 5 3 the road, only
16V
~p).0lM
± YY r
9 ... 6 ... 4 14
green signal is
made avail-
Y' X’
8 able. It means
N10 <5 GREEN
that for the re-

3> _
F-G(Lt)/F-C(Rt)
1 14
9
maining period

n
YELLOW 8 RED
D-G(St) B-E(St) these signals
Vcc O 1Qi
GREEN O Vcc have to be
D-E (Lt)/D-A(Rt)
14 8
■O YELLOW
treated as ‘red’.
RED O-
F-A(St) In practice,
H-C(St) the outputs of
f|— >ki2 JNS GREEN
B-E(St)
Fig. 2 should
WALK

n
GREEN
B-C(Lt)/B-G(Rt)
YELLOW
B-E(St)
<31 6 (N-S/S-N)

GREEN
H-A(Lt)/H-E(Rt)
be connected
to solidstate re-
lays to operate
RED a high-power
F-A(St) O RED bulbs. Further,
[l Vcc
VCC O
Q 2
Z D-G(St)
if a particular

&T.
GREEN O-
F-A(St) Vcc o
-O YELLOW signal condi-
H-C(St)
tion (such as
GREEN O-
H-C(St)
6
p
fN20 GREEN turning signal)
7 D-G(St)
WALK
is not appli-
(E-W/W-E) cable to a
GND a
given road, the
output of that
NOTE. FOR DECODING THE TERMS USED WITH GREEN, YELLOW AND RED SIGNAL OUTPUTS REFER TABLE 1 signal condi-
Fig. 2: The circuit diagram for traffic light signalling tion should be

ELECTRONICS FOR YOU NOVEMBER 2002


CIRCUIT IDEAS

Table III connected by entering the binary value correspond-


Execution Results of Software Program to green ing to that particular state into the parallel
signal of input pins of the 3-bit counter. Similarly,
SIG-B SIG-D SIF-F SIG-H WALK(N-S) WALK(E-W)
the next the signal can be reset at any time by
GGRY GGRY GGRY GGRY GR GR state (refer providing logic 0 at the reset pin (pin 1)
0010 0100 1100 0010 01 01 Table I). of the counter using an external switch.
0100 0100 0100 0010 10 01 T h e A software program to verify the
0100 0100 0001 0010 10 01 traffic sig- functioning of the circuit using a PC
1001 0100 0010 0010 01 01 nals can is given below. (Source code and execut-
0010 0100 0010 1100 01 01 also be able file will be provided in the next
0010 1000 0010 0100 01 10 controlled month’s EFY-CD.) When executing the pro-
0010 1000 0010 0001 01 10 manually, gram, keep pressing Enter key to get the
0010 0011 0010 0010 01 01 if desired. next row of results. The test results on
Note. The first column under G (green) in each group of four signals indicates the Any signal execution of the program is shown in Table
turn signal, while the next three columns under GRY indicate signal for the straight state can be III.
traffic. established This circuit costs around Rs 125.

TRAFFIC.C

#include<stdio.h> c=(seq&1);b=(seq&2)>>1;a=(seq&4)>>2; walk_ns,stop_ns,


#include<conio.h> green_bl=and3(not(a),b,c); walk_ew,stop_ew);
#define TRUE 1 green_bs=or2(and3(not(a),b,not(c)),and3(not(a),not(b),c)); getch();
#define False 0 red_bs=or2(a,and3(not(a),not(b),not(c))); }
yellow_bs=and3(not(a),b,c); return;
int not(int x); green_dl=and3(a,b,c); }
int or2(int x,int y); green_ds=or2(and3(a,b,not(c)),and3(a,not(b),c)); int and2(int x,int y)
int or3(int x,int y,int z); red_ds=or2(not(a),and3(a,not(b),not(c))); {
int and2(int x,int y); yellow_ds=and3(a,b,c); return(x && y);
int and3(int x,int y,int z); green_fl=and3(not(a),not(b),not(c)); }
int main(void) green_fs=and2(not(a),not(b)); int and3(int x,int y,int z)
{ red_fs=or2(a,and3(not(a),b,c)); {
int a,b,c; yellow_fs=and3(not(a),b,not(c)); return(x && y && z);
int seq,green_bl,green_bs,red_bs,yellow_bs; green_hl=and3(a,not(b),not(c)); }
int green_dl,green_ds,red_ds,yellow_ds; green_hs=and2(a,not(b)); int or2(int x,int y)
int green_fl,green_fs,red_fs,yellow_fs; red_hs=or2(not(a),and3(a,b,c)); {
int green_hl,green_hs,red_hs,yellow_hs; yellow_hs=and3(a,b,not(c)); return(x || y);
int walk_ns,stop_ns; walk_ns=green_bs; }
int walk_ew,stop_ew; stop_ns=or3(and3(not(a),not(b),not(c)),and3(not(a),b,c),a); int or3(int x,int y,int z)
walk_ew=green_ds; {
clrscr(); stop_ew=or3(not(a),and3(a,b,c),and3(a,not(b),not(c))); return(x || y || z);
printf(“ SIG-B SIG-D SIF-F SIG-H printf(“%d %d %d %d %d %d %d %d }
WALK(N-S) WALK(E-W)\n”); %d %d %d %d %d %d %d %d %d %d int not(int x)
printf(“G G R Y G G R Y G G R Y G G R Y %d %d\n”, {
GR G R\n”); green_bl,green_bs,red_bs,yellow_bs, return(!x);
green_dl,green_ds,red_ds,yellow_ds, }
for(seq=0;seq<8;seq++) green_fl,green_fs,red_fs,yellow_fs,
{ green_hl,green_hs,red_hs,yellow_hs,

NOVEMBER 2002 ELECTRONICS FOR YOU


CIRCUIT IDEAS

THREE-COLOUR DISPLAY USING


BICOLOUR LEDs
PRIYANK MUDGAL
%
T he circuit presented here uses
bicolour LEDs to generate a dis¬
16
5 LED1
:T11
£ R11

5I Ifi-
QO.
play in three colours, namely, red,
3
green, and yellowish green, Q1.
Transistors T1 through T20 form a grid
to which common-cathode bicolour LEDs
(LED1 through LED10) are connected.
Transistors T1 through T10 have their col¬
14
2

4
02,
5 £ LED3 T13 1R13

lector terminals connected to the emitter


of transistor T21 . Similarly, transistors T11 VR1
7
03

-i&a LED4 T14

$
SR14

...
220K
through T20 have their collector terminals 04
10
connected to the emitter of transistor T22. -)l+
©•« §T,sg15
IC1 LED5
The bases of each pair of transistors (i.e. Cl CD4017
T1 and Til, T2 and T12 T10 and T20) z 1
05

are tied to outputs QO, Q1 Q9, respec¬ oe Re;


.4=“. Tie f
R18
5
tively, of IC1 (CD4017) through 10-kilo-
ohm resistors as shown in the figure. Posi¬
IC3 (N1, N2) = CD4001 §
=
T1-T22 BC548
D1-D12 = 1N4148
STROBE
13 6
tive supply to collectors of transistors T1 |R17
through T10 is controlled by transistor T21 .
Similarly, positive supply to collectors of
transistors Til through T20 is controlled
R1-R20 = 10K

FRONT VIEW
RESET 15 9
1 n
LED7 T17

"il™ 1R18

>o 3
11 09 kE.qe.Ti8
by transistor T22. BC
8
548
IC1 and IC2 are decade counters. Clock
pulse to IC1 is provided by the oscillator

M § •gL
R9 : LED® Tlfl
1
circuit comprising NOR gates N1 and N2.
CBE
The outputs of IC1 advance sequentially
with each clock. (Any other source of BI-COLOUR R10: :R20
LED *T10 LEP.10.T20
squarewave pulses also serves the pur¬
pose.) IC2 is used to select the mode of RED GREEN ■i
display. Clock input pin 14 of IC2 is con¬
T22
nected to Q9 output of IC1 . Thus IC2 re¬
RED I QREEN
ceives one pulse after every ten pulses re¬ GND
ceived by IC1 . D2

When the circuit is switched on, QO +4


D1
W
output of IC2 is active high. Thus transis¬ 4flV ii ik ikikikik nikik
D5 D6| D3| D12 D7 D8 DO DIO D11 D4
tor T21 gets forward biased via diode D3 DC
02 Q1 QO Q6 07 Q8 Q9 05 04 03
and it conducts to extend positive supply 4 2 3 5 6 9 11 1 10 7
CLK
to transistors T1 through T10. Transistors 14 IC2
T1 through T10 are forward biased sequen¬ CD4017
18
tially by QO through Q9 outputs of IC1, 13 8 15

i.e. at a time only one of these ten transis¬ pGND STROBE I RESET
tors is forward biased (on) . Thus only red
LED parts of bicolour LEDs light up se¬ After completion of the third glowing Now both transistors T21 and T22 con¬
quentially. (Transistor T22 is not conduct¬ sequence of red LEDs, when Q3 output of duct due to diodes D1 and D2. Thus both
ing at this moment.) IC2 goes high, transistor T21 stops con¬ red and green LEDs in bicolour LEDs (LED1
When red LED part of LED10 glows, ducting and T22 starts conducting with the through LED10) glow sequentially. The ef¬
IC2 receives a clock pulse and its Q1 output next three sequences of green LEDs of fect of red and green LEDs glowing to¬
goes high. Transistor T21 still conducts, as bicolour LEDs (LED1 through LED10) gether is a distinct yellowish orange colour.
it is forward biased through diode D6, and glowing sequentially. This sequence repeats four times.
next again via diode D5. Thus red LEDs After completion of three sequences of Thereafter, the whole sequence repeats,
complete two more glowing sequences. green LEDs, output Q6 of IC2 goes high. starting with red LEDs. Thus the bicolour-

I ELECTRONICS FOR YOU FEBRUARY 2003


CIRCUIT IDEAS

LED display shows threecolours— red, green, by preset VR1. One can omit automatic 5, and 7 of IC2 with SPDT switches. (Thus
and yellowish green — one after the other. selection of different colours by omitting diodes D3-D12 are also omitted.)
The speed of display can be controlled IC2 and replacing connections to pins 3, This circuit costs around Rs 250.

FEBRUARY 2003 ELECTRONICS FOR YOU


I
CIRCUIT IDEAS

COMPUTERISED UNIVERSAL TIMER


D.K. KAUSHIK
X1 = 230V AC PRIMARY TO 0-1 2V, 200mA
%
I
SECONDARY TRANSFORMER
ITIhis simple and flexible timer is more p
L
accurate than the real-time clock of
t| o N/O
■A. the computer used for the purpose. 12V D1 D2 D5 °
1N40O1 S
It can be used in laboratories, dark rooms, 230V AC
O N fC
5% T1
kitchens, and for competitions in educa¬ 50Hz BCS48 RL1
£ 12V, 2000
tional institutes. The program written in
Q-Basic is self-explanatory.
Generally, a universal timer provides
i N
X1
ov D4 D3
tLCi
*T470M
-\Wv
R1
10K 9 <X 1C/0
RELAY
LOAD
the facility for switching on an electrical/ PIN2-4-— =
D1-D4 1N4O01 50V 230V
2N2222 AC
electronic device after elapse of a certain TO 25 PIN'D'
CONNECTOR
time period, say, 5 minutes. The software 4
does the same job here. PIN18-25
When the program is executed, it dis¬
plays 0:0:0 on the monitor, indicating 0 hour, speak is filled the way it is discussed above. countdown of the time in the display box
0 minute, and 0 second. The display time The program may be changed as indicated starts. The device will remain on until the
0:0:0 is increased by 10 seconds each time by REM statements and the single quote Q display box shows 0:0:0 and then it will
function key F1 of the computer keyboard is in the beginning of a program line may be get switched off. The figure shows the re¬
depressed. So by depressing function key accordingly removed in the program. lay interface circuit connected between DO
FI the required time is set for which the Now, after setting the time in the man¬ line (pin 2) and ground line (pin 25) of
electrical or electronic device is to be ner as discussed above, function key F2 of 378H output port of LPTl printer port of
switched on. However, in debate competi¬ the computer keyboard is depressed to the computer.
tions the time allowed for a candidate to switch on any device. Simultaneously, the This circuit costs around Rs 85.

COMPUTER PROGRAM IN Q-BASIC


CLS : SCREEN 1: COLOR 3. 10 ST ART1:
N1 = 0: N2 = 0: N3 = 0 22 = VAL (RIGHTS (TIMES, 2))
LOCATE 4, 10: PRINT " PROGRAM DEVELOPED BY DR.D.K. KAUSHIK" IF Z2 = Z1 THEN GOTO START1 ELSE GOTO START2
LINE (90, 60)-(200, 60), 2: LINE -(200, 75), 2 START2:
LINE -(90, 75), 2: LINE -(90, 60), 2 IF N1 =0 AND N2 = 0 AND N3 = 0 THEN LOCATE 9, 14
LOCATE 9, 14: PRINT N3; N2; N1 PRINT N3; N2; Nl: GOTO LAST
LOCATE 13, 9: PRINT “PRESS FI KEY FOR TIME ADJUSTMENT" N1 = N1 - 1
LOCATE 15, 9: PRINT "PRESS F2 KEY FOR START” IF Nl < 0 THEN Nl = 59: N2 = N2 - 1
LOCATE 17, 9: PRINT “PRESS F3 KEY TO STOP” IF N2 < 0 THEN N2 = 59: N3 = N3 - 1
KEY (2) ON: ON KEY (2) GOSUB START IF N3 < 0 THEN N3 = 0
KEY (3) ON: ON KEY(3) GOSUB LAST1 LOCATE 9, 14: PRINT N3; N2; Nl
P0RT% = &H378 Z1 = Z1 + 1
DELAY: IF Z1 = 60 THEN Z1 = 0
KEY(l) ON: ON KEY(l) GOSUB SET IF Nl = 0 AND N2 = 0 AND N3 = 0 THEN GOTO LAST ELSE GOTO START1
GOTO DELAY LAST:
SET: OUT PORT%, 0
SOUND 650, 3 REM FOR DEBATE COMPETITION OUT%,0 SHOULE BE REPLACED
Nl = Nl + 10 BY OUT P0RT%,1
IF Nl < 60 THEN LOCATE 9, 14: PRINT N3; N2; Nl: RETURN FOR T = 1 TO 3
Nl = 0 SOUND 550, 17
N2 = N2 + 1 NEXT T
IF N2 < 60 THEN LOCATE 9, 14: PRINT N3; N2; Nl: RETURN ' FOR J = 1 TO 10
N2 = 0: N3 = N3 + 1 'FOR J = 1 TO 50000 : NEXT J : NEXT I
LOCATE 9, 14: PRINT N3; N2; Nl 'OUT PORT%,0
RETURN END
START: LAST1:
KEY(l) OFF: KEY (2) OFF OUT PORT%, 0
Z1 = V AL (RIGHTS (UM ES , 2)) END
OUT PORT%, 1
REM FOR DEBATE COMPETITION OUT PORT96.1 SHOULD BE REPLACED The author is Head of Electronic Science Department, Dayanand
REM BY OUT PORT%,0 College, Hisar, Haryana

JANUARY 2003 ELECTRONICS FOR YOU


I
CIRCUIT IDEAS

NON-CONTACT POWER MONITOR


D. MOHAN KUMAR
VWv
R1
--
« enabled
and the

H
ere is a simple non-contact AC icon piezobuzzer
power monitor for home appliances
and laboratory equipment that
VR
470K ;
s
ON/OFF 9 V produces a
shrill tone. Re¬
SWITCH

nr
PRESET
should remain continuously switched-on. sistor R1 pro¬
A fuse failure or power breakdown in the is tects T2 from
equipment going unnoticed may cause ir¬ short circuit if
R2 C2 BATT.-=-
reparable loss. The monitor sounds an 100K 0.04M
VR is adjusted
alarm on detecting power failure to the Tl'
+LCI »1 to zero resis¬
equipment. BC54S
T-4.7H
16V tance.
The circuit is built around CMOS IC T2 PIEZOT The circuit
2N2222 BUZZER
CD40H utilising only a few components. IC (N1, N2) = CD4011 can be easily
NAND gates N1 and N2 of the IC are wired assembled on a
as an oscillator that drives a piezobuzzer perforated/
direcdy. Resistors R2 and R3 and capaci¬ As the collectors of Tl and T2 are con¬ breadboard. Use a small plastic case to en¬
tor C2 are the oscillator components. The nected to pin 2 of NAND gate N1 of the close the circuit and a telescopic antenna as
amplifier comprising transistors Tl and T2 oscillator, the oscillator gets disabled when aerial. A 9V battery can be used to power
disables the oscillator when mains power the transistors conduct. Capacitor Cl pre¬ the circuit. Since the circuit draws only a
is available. vents rise of the collector voltage of T2 few microamperes current in the standby
In the standby mode, the base of Tl again during the negative half cycles. mode, the battery will last several months.
picks up 50Hz mains hum during the posi¬ When the power fails, the electrical After assembling the circuit, take the aerial
tive half cycles of AC and Tl conducts. field around the equipment’s wiring ceases near the mains cable and adjust VR until the
This provides base current to T2 and it and Tl and T2 turn off. Capacitor Cl starts alarm stops to indicate the standby mode.
also conducts, pulling the collector to charging via R1 and preset VR and when it The circuit can be placed on the equipment
ground potential. gets sufflciendy charged, the oscillator is to be monitored close to the mains cable.

I ELECTRONICS FOR YOU NOVEMBER 2003


CIRCUIT IDEAS

NUMBER GUESSING GAME


PRIYANK MUDGAL DIP
SWITCH.

T his number guessing game is quite


simple. In this game the player
thinks of any number between
1 and 99. Then he scans the eight groups
of numbers given in the eight boxes in the
and the number thought of by the person
is displayed on the 7 segment displays. Af¬
ter this, all switches on the 8-way DIP
switch need to be turned off to try display
of another number in a similar fashion.
lll§
mM
table. Each group corresponds to a spe¬ The circuit (Fig. 1 ) comprises two BCD- sag
cific switch (indicated on the top of each to-7-segment decoder/driver CD4511 ICs " FAPER STRIP
WITH NUMBERS
group) on an 8-way DIP switch. The per¬ (IC1 and IC2). IC1 generates the number (REFER TEXT)
son scans the numbers in each box and for tens position and IC2 generates the num¬
slides the switch corresponding to a box ber for units position. Input pins 7, 1, 2, Fig. 2: Suggested case
to ‘on’ position if he finds his number in and 6 of both the ICs are connected to ground
that box. After having scanned all the eight through 1 -kilo-ohm resistors. The common- Suppose you want to display 47. For
boxes and switching on the relevant DIP cathode terminals of both the displays are this, 4 is to be displayed in tens position
switches, he is required to press switch S9 connected to push-to-on switch S9. and 7 in units position. In order to gener¬
ate 4 (binary 100) on the display (DIS1),
DIS1, DIS2 = COMMON CATHODE 7 SEGMENT DISPLAY (LTS543)
DIS1 DIS2
X S9
switch S2 is to be turned on. To display 7
(binary 111) on the display (DIS2),
LTS543 COM LTS543 COM 560$
R9 <
a
switches S6, S7, and S8 are to be turned
3,8 9 V4W<
*1 1Q on. Thus to generate 47, switches S2, S6,
b
6 9
1 S7, and S8 are to be turned on. The num¬
ber 47 is placed in groups 6, 7, 8, and 2.
4
'a <t=S/a , e
So when you spot 47 in these groups,
2 1 9 10 7 6 4 2
switch on the same combination of
d e f 9 a b c d
switches. On depressing switch S9, 47 ap¬
a b c d a I 9 a b c d e f 9 pears on the display. Other numbers can
LT 13 12 11 10 9 15 14 13 12 11 10 9 15 14 LT be generated using the same procedure.
3 3
5
LE LE
5
In order to make the circuit compact,
Bl
4
IC1 IC2 4
Bl
a DIP switch has been used here. As it
CD4511 a 8 CD4511
1B 16
may be difficult to turn the small switches
6 2 1 7 6 2 1 7 on and off, you may use SPOT toggle
□ C B A R1 R5 □ C B A switches in place of the DIP switch. The
— VWVr circuit can be placed inside a plastic case
R2 R6 with appropriate cuts made for displays
R3 R7 and switches (Fig. 2) . A strip of paper con¬

— — — vwv
R4

R1 - R8 = 1K
RB
<

i
taining groups of numbers can be stuck
just under the 8-way DIP switch (or under
the row of SPOT switches used in place of
DIP switch). The proposed cabinet with
a WAY DIP SWITCH
ON

SI
<ÿo 0ÿ0 <ÿo
S2 S3 S4
CÿO OÿCKÿOOÿO
S5 SB S7 SB
OFF

fl front-panel layout is showm in the figure.


This circuit smoothly runs on two pen
torch batteries. Thus current-limiting re¬
sistors are not necessary for displays.
Fig. 1: Number guessing game circuit This circuit costs around Rs 100.

Eight Groups of Numbers and Their Respective Switches


Switch 1 Switch 2 Switch 3 Switch 4
80,81,82,83, 84,85,86, 87,88, 89 40,41,42, 43, 44, 45, 46,47,48, 49 20, 21,22, 23, 24,25,26, 27, 28, 29 10,11,12,13,14,15,16, 17, 18, 19
90,91,92, 93, 94,95,96, 97,98, 99 50,51,52, 53, 54, 55, 56,57,58, 59 30, 31,32, 33, 34,35,36, 37, 38, 39 30, 31,32, 33, 34,35,36, 37, 38, 39
60,61,62,63,64,65,66,67,68, 69 60, 61,62,63,64,65,66,67, 68,69 50, 51,52, 53, 54,55,56, 57, 58, 59
70,71,72,73,74,75, 76,77,78, 79 70, 71,72, 73,74.75,76,77, 78,79 70, 71,72, 73,74,75,76, 77, 78,79
90, 91,92, 93,94,95,96, 97, 98,99
Switch 5 Switch 6 Switch 7 Switch 8
8,9, 18,19,28, 29, 38, 39 4.5,6,7,14,15, 16, 17, 24,25,26, 27 2, 3, 6,7,12,13, 16, 17, 22,23,26, 27 1,3,5,7,9,11,13,15, 17, 19
48, 49, 58, 59,68,69,78,79 34, 35, 36,37,44, 45, 46, 47, 54,55 32, 33, 36,37,42, 43, 46, 47,52,53, 56, 21,23, 25,27,29, 31,33, 36,39
88, 89, 98, 99 56, 57,64,65,66,67, 74,75, 76,77 57,62, 63,66,67, 72,73, 76,77,82, 41,43, 45,47,49, 51,53, 55, 57,59
84, 85,86,87,94,95, 96,97 83, 86, 87,92, 93, 96,97 61,63, 65,67,69, 71,73,75,77,79
81,83, 85,87,89, 91,92, 93,95,97, 99

I ELECTRONICS FOR YOU JANUARY 2003


CIRCUIT IDEAS

THREE-COLOUR DISPLAY USING /S£ DWI


VED
I

BICOLOUR LEDs -ÿ0 S.C.

PRIYANK MUDGAL
R1 LED1 R11
T1 T11

T
he circuit presented here uses 16

bicolour LEDs to generate a dis- QO


R2 R12
play in three colours, namely, red, T2 LED2 T12
green, and yellowish green. 3 '"fc.":
Transistors T1 through T20 form a grid
to which common-cathode bicolour LEDs
14
2
Q1

R3
T3 LED3
* T13
R13
14 Q2
(LED1 through LED10) are connected. W— ■
7 4
Transistors T1 through T10 have their col-
« R4 R14
lector terminals connected to the emitter Q3 T4 LED4 T14
7
of transistor T21. Similarly, transistors T11 VR1
W
220K
through T20 have their collector terminals Q4
10
connected to the emitter of transistor T22. + IC1
R5
T5 LED5 T15
R15

The bases of each pair of transistors (i.e. C1


CD4017 Q5
10M 1
T1 and T11, T2 and T12,…, T10 and T20) 16V

are tied to outputs Q0, Q1,…, Q9, respec- Q6


R6
T6 LED6 T16
R16
5
tively, of IC1 (CD4017) through 10-kilo- :
IC3 (N1, N2) = CD4001
ohm resistors as shown in the figure. Posi- T1-T22 = BC548 STROBE Q7
13 6
tive supply to collectors of transistors T1 D1-D12 = 1N4148 R7 R17
R1-R20 = 10K T7 LED7 T17
through T10 is controlled by transistor T21. RESET 15 Q8
9 i

Similarly, positive supply to collectors of FRONT VIEW


transistors T11 through T20 is controlled R8 R18

by transistor T22. Ifi 11 Q9 T8 LED8 T18

IC1 and IC2 are decade counters. Clock


548
1 8
W ■■
HI:
pulse to IC1 is provided by the oscillator R9 LED9
R19
1 2 3 T9 T19
circuit comprising NOR gates N1 and N2. CB E A
The outputs of IC1 advance sequentially
with each clock. (Any other source of Bi-COLOUR R10 R20
LED T10 LED10 T20
squarewave pulses also serves the pur-
pose.) IC2 is used to select the mode of RED GREEN N— 1
'
iy
display. Clock input pin 14 of IC2 is con-
T22
nected to Q9 output of IC1. Thus IC2 re-
ceives one pulse after every ten pulses re-
RED
GND
GREEN
O'
avrnm
D2
ceived by IC1.
When the circuit is switched on, Q0
output of IC2 is active high. Thus transis- +6V
D5 D6 D3 D12 D7 D8 D9 D10 D11 D4
tor T21 gets forward biased via diode D3 DC
02 Q1 QO Q6 Q7 Q8 Q9 Q5| Q4 Q3
and it conducts to extend positive supply 4 2 3 5 6 9 11 1 10 7
CLK
to transistors T1 through T10. Transistors 14
IC2
T1 through T10 are forward biased sequen- CD4017
16
13 8 15
tially by Q0 through Q9 outputs of IC1,
STROBE RESET
i.e. at a time only one of these ten transis- O
GND

*
y-

tors is forward biased (on). Thus only red


LED parts of bicolour LEDs light up se- After completion of the third glowing Now both transistors T21 and T22 con-
quentially. (Transistor T22 is not conduct- sequence of red LEDs, when Q3 output of duct due to diodes D1 and D2. Thus both
ing at this moment.) IC2 goes high, transistor T21 stops con- red and green LEDs in bicolour LEDs (LED1
When red LED part of LED10 glows, ducting and T22 starts conducting with the through LED10) glow sequentially. The ef-
IC2 receives a clock pulse and its Q1 output next three sequences of green LEDs of fect of red and green LEDs glowing to-
goes high. Transistor T21 still conducts, as bicolour LEDs (LED1 through LED10) gether is a distinct yellowish orange colour.
it is forward biased through diode D6, and glowing sequentially. This sequence repeats four times.
next again via diode D5. Thus red LEDs After completion of three sequences of Thereafter, the whole sequence repeats,
complete two more glowing sequences. green LEDs, output Q6 of IC2 goes high. starting with red LEDs. Thus the bicolour-

ELECTRONICS FOR YOU FEBRUARY 2003


CIRCUIT IDEAS

LED display shows three colours—red, green, by preset VR1. One can omit automatic 5, and 7 of IC2 with SPDT switches. (Thus
and yellowish green—one after the other. selection of different colours by omitting diodes D3-D12 are also omitted.)
The speed of display can be controlled IC2 and replacing connections to pins 3, This circuit costs around Rs 250.

FEBRUARY 2003 ELECTRONICS FOR YOU


CIRCUIT IDEAS

ULTRA-BRIGHT LED LAMP $£>-


w
I
VED
DWI
S.C.

N.S. HARISANKAR VU3NSH R2


390K, 1/2W
pVWV— D1 LED1 LED2 LED3 LED4

T
his ultra-bright white LED lamp 1N4007
O
works on 230V AC with minimal
power consumption. It can be used cx*
o ft ft ft
LED5 LED6 LED7 LED8
to illuminate VU meters, SWR meters, etc. 0.22|J
Po
Ultra-bright LEDs available in the mar-
ket cost Rs 8 to 15. These LEDs emit a
230V AC
50Hz
2
630V AC
MOV ZD1* „
48V
+ w w
LED9 LED10 LED11 LED12
NO 270/20 C1*
1000-6000mCd bright white light like weld- ZENER 22|J
ing arc and work on 3 volts, 10 mA. Their 100V
o O °— ft ft ft ft
LED13 LED14 LED15 LED16
maximum voltage is 3.6 volts and the cur- R1
O
rent is 25 mA. Anti-static precautions 100Q, 2W * REFER TEXT LED1-LED16 = ULTRA-BRIGHT WHITE LED

should be taken when handling the LEDs. Fig. 1: The circuit of ultra-bright white LED Fig. 2: 16-LED combination
The LEDs in water-clear plastic package lamp

©O whereas no power is dissipated in a ca- Use AC capacitors for Cx. Filter capaci-
LED1 ▼\\ LED24 ▼& pacitor. The value of capacitor is calcu- tor C1 across the output provides flicker-
lated by using the following relationships: free light. The circuit can be enclosed in a
LED2 ▼\\ LED25 w XC = 1/(2πfC) ohms —————(a) CFL round case, and thus it can be con-
i
i
l
l XC = VRMS /I ohms ———— (b) nected directly to AC bulb holder socket. A
l
i
i l where XC is capacitive reactance in ohms, series combination of 16 LEDs (Fig. 2) gives
LED22▼\\ LED45 ▼w C is capacitance in farads, I is the current a luminance (lux) equivalent of a 12W
through the LED in amperes, f is the mains bulb. But if you have two series combina-
LED23▼\\ LED46 ▼& frequency in Hz, and Vrms is the input tions of 23 LEDs in parallel (total 46 LEDs
© & mains voltage. as shown in Fig. 3), it gives light equal to a
LED1-LED46 = ULTRA-BRIGHT WHITE LED The 100-ohm, 2W series resistor avoids 35W bulb. 15 LEDs are suitable for a table-
Fig. 3: 46-LED combination heavy ‘inrush’ current during transients. lamp light.
MOV at the input prevents surges or spikes, Diode D1 (1N4007) and capacitor C1
emit spotlight, while diffused type LEDs protecting the circuit. The 390-kilo-ohm, act as rectifying and smoothing elements
have a wide-angle radiation pattern. ½-watt resistor acts as a bleeder to pro- to provide DC voltage to the row of LEDs.
This circuit (Fig. 1) employs capaci- vide discharge path for capacitor Cx when For a 16-LED row, use Cx of 0.22 µF, 630V;
tive reactance for limiting the current flow mains supply is disconnected. The zener C1 of 22 µF, 100V; and zener of 48V, 1W.
through the LEDs on application of mains diode at the output section prevents ex- Similarly, for 23+23 LED combination use
voltage to the circuit. If we use only a cess reverse voltage levels appearing across Cx of 0.47 mF, 630V; C1 of 33 µF, 150V;
series resistor for limiting the current with the LEDs during negative half cycles. Dur- and zener of 69V, 1W.
mains operation, the limiting resistor itself ing positive half cycle, the voltage across This circuit (inclusive of LEDs) costs
will dissipate around 2 to 3 watts of power, LEDs is limited to zener voltage. Rs 200 to Rs 400.

FEBRUARY 2003 ELECTRONICS FOR YOU


CIRCUIT IDEAS

ELECTRONIC SECURITY SYSTEM


K. BHARATHAN output of
the
m S1
I ■ Ihis reliable and easy-to-operate elec¬ Darlington i LOUD
\ SPEAKER R2
OKI/OFF
SWITCH
tronic security system can be used pair drives Yl
n
on R1
220K
X. in banks, factories, commercial es¬ the loud¬ JJ 1W 220n

tablishments, houses, etc.


The system comprises a monitoring sys¬
speaker
whose out¬
3 --
I
7
1
8
-T-* 100M
00M
6V 3V
BATT. -=-
+
±
VR1
IC1
tem and several sensing zones. Each sens¬ put volume 10K
UM3561
iTi»Tir i=<
ing zone is provided with a closed-loop can be con¬
switch known as sense switch. Sense
switches are fixed on the doors of premises
under security and connected to the moni¬
trolled by
potentiom¬
eter VR1.
TIQ-
EL187 I

S11 = PUSH-TO-ON SENSE SWTTCH


toring system. As long as the doors are Capacitor S12 = ON/OFF SLIDE SWITCH
closed, sense switches are also closed. The Cl serves S13= PUSH-TOON SWrTCH 0 11 ©A
TOP VIEW
monitoring system can be installed at a as a filter "O % rsnu
convenient central place for easy operation.
Fig. 1 shows the monitoring circuit
only for zone 1 along with the common
capacitor.
You
can alter
D10
1N4007
tLcio
nÿiOM
■R11
10K
S11 np Y
6V
alarm circuit. For other zones, the the alarm
CB E
monitoring circuit is identical, with only sound as
the prefixes of components changing desired by R10
R12
as per zone number. Encircled points A, changing ■icon
:4.7K
□ OSC2
T12
BC558 SEL2 L1 8


B, and C of each zone monitoring circuit the con¬
need to be joined to the corresponding
points of the alarm circuit (upper half
of Fig. 1) .
nections of
IC1 as
shown in
BC548
rtrC)
BC558 9 Vss

OUTPUT C 3
C 2
UM3561
7

6
□ OSC1
□ SEL1
R13 R14
When zone 1 sensing switch S 11, zone the table.
on/off slide switch S12, and system on/off The
10011' 10K
NC C 4 5 □ VDO

switch SI are all on, pnp transistor T12 circuit con¬ -|°S13 LED11 j
reverse biases to go in cut-off condition,
with its collector at around 0 volt. When
tinues to
sound the
I
ZONE 1
l\ - ~\i
~ZP |
W I
PIN CONFIGURATION

NOTE: COMPONENTS FOR EACH ZONE


ARE PREFIXED WITH ZONE NUMBERS
the door fitted with sensor switch Sll is alarm until
opened, transistor T12 gets forward biased zone door Fig. 7. Monitoring circuit along with the alarm circuit
and it conducts. Its collector voltage goes
high, which forward biases transistor T10
via resistor RIO to turn it on. (Capacitor
CIO serves as a filter capacitor.) As a re¬
sult, the collector voltage of transistor T10 oo
S21 S31
$


falls to forward bias transistor Til, which OPERATING
SNAP SWITCH CLAMP
conducts and its collector voltage is sus¬
tained at a high level. Under this latched
condition, sensor switch Sll and the state
of transistor T12 have no effect. In this
state, red LED11 of the zone remains lit. MONITORING AND ALARM
S11 CIRCUIT S41
Simultaneously, the high-level voltage 813
S11-S41 - DOOR 03 oo o o
from the collector of transistor T11 via di¬ WITH -ZONE INDICATION-n
r ; DOOR WITH
ode DIO is applied to VDD pin 5 of siren SENSOR SWITCH
6 O LED31O LED41 J SENSOR SWITCH

sound generator IC1 (UM3561) whose pin


LED11
812ÿ
LED21
82?
nth nh nth nth
.. 333ÿ 844ÿ
VOUJME
CONTROL

2 is grounded. Resistor R3 connected across CN++OFT ON++OFF CN++OFF 0N3-WFF

pins 7 and 8 of IC1 determines the fre¬


Fig. 2: Physical layout of sensors and monitoring/alarm system
quency of the in built oscillator. As a re¬
sult, IC1 starts generating the audio signal is closed (to close switch Sll) and the The system operates off a 3V DC bat¬
output at pin 3. The output voltage from reset switch is pressed momentarily (which tery or recharging battery with charging
IC1 is further amplified by Darlington pair causes transistor T10 to cut off, returning circuit or battery eliminator. If desired,
of transistors T1 and T2. The amplified the circuit to its initial state) . more operating zones can be added.

MARCH 2003 ELECTRONICS FOR YOU


I
CIRCUIT IDEAS

Alarm sound Circuit connections for respective ing to the zone glows to indicate that the
zones in closed door of the zone is open. The alarm and
IC pin 1 connected to IC pin 6 connected to position. Also the LED indication will continue even af¬
Police siren NC NC keep zone slide ter that particular door with the sensing
Ambulance siren NC '“DD switches S12, S22, switch is immediately closed, or even if
Fire engine Sound NC Vss S32, S42, etc in that switch is removed/damaged or con¬
Machinegun sound NC ‘on’ position. This necting wire is cut open.
Vss
puts the system in Any particular zone in the monitoring
Note. NC indicates no connection
operation, guard¬ system can be put to operation or out of
ing all the zone operation by switching on or switching off
Initially keep the monitoring system doors. the corresponding slide switch in the moni¬
switch SI off. Keep all the zone doors fixed Now, if the door of a particular zone toring system.
with sensing switches SI 1, S21, S31, S41, is opened, the monitoring system sounds The circuit for monitoring four zones
etc closed. This keeps the sensing switches an audible alarm and the LED correspond- costs around Rs 400.

I ELECTRONICS FOR YOU MARCH 2003


CIRCUIT IDEAS

INFRARED REMOTE CONTROL TIMER ||||


DIPANJAN BHATTACHARJEE whose frequency may
be varied with the help 99a ® 11

T —
*m
his infrared remote control timer can of potmeter VR3 ,
be used to turn an appliance on/off When switch SI of 3 I*
g -vwv
I8I
for a period of 0.11 second to 110.0 the transmitter is S II
seconds. pressed, the modu- § 3
The circuit comprises two sections, lated IR rays are gen- «
namely, the transmitter section and the erated, which are re- g. I
m
m
receiver section. ceived by photodiodes §
so is
Fig. 1 shows the IR transmitter sec¬ in the receiver section o
tion. The astable multivibrator NE555 (IC1) and amplified by the 21
m
is used to generate a 10kHz modulated IR
signal. The output of IC1 is connected to
amplifier circuit, The
output of op-amp goes
a v*\
& l*
VvW
the base of pnp transistor T 1 via resistor
R2. Two infrared LEDs (IR1 and IR2) are
low to trigger the
monostable. Then high
I
§ ii
-VWSr
connected in series between the collector output at pin 3 of IC3 O
o
(via resistor R3) and ground. activates the two-
When switch SI is pressed, the IR LEDs changeover relay RL Is is
transmit the modulated IR signal of 10-11 via transistor T3 <X‘

kHz. This frequency can be changed with (BC548) for a preset


*5
the help of VR1 potmeter.
In the receiver section shown in Fig.
time.
The on/off time
£2
* V
AM
-
2, two photodiodes (IRS and IR4) receive can be set in the timer I|8
the IR signal transmitted by the IR trans¬ with the help of VR3 O
)F-
mitter. Transistors T2 and T3 amplify the and CIO. Switch S2 is 8<
■c
weak signal. The amplified signal is fil¬ used to reset the
W/v
tered by capacitors C6 and C7. The ampli¬ monostable. If you CO ro
fied and filtered signal is now fed to the want to turn the appli¬
inverting input pin 2 of op-amp IC2 (IC ance on for a preset
741). The output of IC2 is further con¬ time, connect the ap¬ -J

nected to trigger pin 2 of timer NE555 (IC3) pliance via relay RL(a) ,
that is used as a monostable multivibrator On the other hand, if
_ you want to §2

O-
+9V
O O
S1
PUSH-TO-ON
IR1, IR2 = INFRARED LED TRANSMITTER turn the appli¬
ance off for a
preset time,
II- z
o
K2
eo
*
A/WSr

SWITCH connect the ap¬


pliance via re¬ ro
— I
32

4 S
lay RL(b) . The z -F*. - n

timer can be re¬ fflo


S <*>
T1 set by pressing Ol 03
CK100 co -4
R1 reset switch S2.
OJ

2.2K: IC1 \ bg
NE555
3
R2
) The circuit * 8
"0 <

re
6

2
220n
R3
ion :
works up to 3
metres without
if
2W using any fo-
s-w
ci
0.01M
-1-
C2
0.01M
IR1
cusing lens,
However, you
can increase
03

s
>
3 3
IflQflOMQ ri
the operating
i!
ifIfI*
IR2
range by using
GND
O-
focusing lens. ii
This circuit
costs around
Fig. 1: IR transmitter section Rs 100.

MAY 2003 ELECTRONICS FOR YOU


I
CIRCUIT IDEAS

LEAD-ACID BATTERY CHARGER WITH


VOLTAGE ANALYSER
D. MOHAN KUMAR The charger circuit consists of a stan¬ comprising resistors R1 through R5. Thus
dard step-down 12V AC (2-amp) trans¬ the voltage applied to any non-inverting

N owadays maintenance-free lead-acid


batteries are common in vehicles,
inverters, and UPS systems. If the
battery is left in a poor state of charge, its
useful life is shortened. It also reduces the
former and a bridge rectifier comprising
diodes D1 through D4. Capacitor Cl
smoothes the AC ripples to provide a clean
DC for charging the battery.
input is the ratio of the resistance between
that non-inverting terminal and ground to
the total resistance (R1 + R2 + R3 + R4 + R5) .
The resistor chain provides a positive volt¬
The battery voltage analyser circuit is age of above 5V to the non-inverting inputs
capacity and rechargeability of the battery. built around the popular quad op-amp of all op-amps when battery voltage is 12.5V
For older types of batteries, a hygrometer LM324 that has four separate op-amps (A or more. A reference voltage of 5V is ap¬
can be used to check the specific gravity through D) with differential inputs. Op- plied to the inverting inputs of op-amps via
of the acid, which, in turn, indicates the amps have been used here as compara¬ 5V zener diode ZD1.
charge condition of the battery. However, tors. Switch S2 is a pushswitch, which is When the circuit is connected to the
you cannot use a hygrometer for sealed- pressed momentarily to check the battery battery and pushswitch S2 is pressed (with
type maintenance-free batteries. The only voltage level before charging the battery. SI open), the battery voltage is sampled
way to know their charge level is by check¬ The non-inverting terminals of op-amps by the analyser circuit. If the supply volt¬
ing their terminal voltage. A through D are connected to the positive age sample applied to the non-inverting
The circuit presented here can replen¬ supply rail via a potential divider chain input of an op-amp exceeds the reference
ish the charge in a battery within 6-8 hours. voltage applied
It also has a voltage analysing circuit for Comments to the invert¬
quick checking of voltage before start of ing inputs, the
charging, since overcharging may damage output of the
the battery. The voltage analyser gives an < 9.8V Off Off Off Off Buzzer off
op-amp goes
audio-visual indication of the battery volt¬ >9.8V On Off Off Off Danger level high and the
age level and also warns about the critical 11.5V On On Off Off Low level LED connected
voltage level at which the battery requires 12.0V On On On Off Normal level at its output
immediate charging. 12.5V On On On On High level
lights up.

- S1- 1 -q/V-
IC1 (A, B, C, D) = LM324 _|0
ON/OFF T‘IL.
S2
n PUSH-TO-ON
VOLTAGE LEVEL
INDICATOR
FUSE
2.5AM PS
SWITCH
R1 R6
18K; 3.9K
PZ1
PIEZO
BUZZER

i
R2
2.7K

D1 D2

230V
I
g R3
RED
©
TO
50Hz
c- eson: BATTERY

LFI!
-
0 230V
AC PRIMARY
TOO-12V
D3

D1-D4 = 1 N5402
D4

8
BLACK
CROCODILE
12V

R4 CUPS
2 AMP SECONDARY ±L 6800'
TRANSFORMER C1
2200|i -p R7-R9 = 4700
25V R10 = 1000
12
LED1 = RED
14
=
LED2 GREEN
R5
13 °ni ;R7 J ;R8 R9 R10
LED3 = YELLOW
LED4 = ORANGE
15K'
ZD1
ZENER
5V
LED4ÿ [ÿ3 &LED1

I ELECTRONICS FOR YOU MARCH 2003


CIRCUIT IDEAS

The different levels of battery voltages 9.8V. If the voltage level goes below 9.8V, wire and crocodile clips to connect the
are indicated by LED1 through LED4. All the buzzer goes off, which indicates that charger to the battery. A 2.5-amp fuse con¬
the LEDs remain lit when the battery is it's time to replace the battery. The status nected to the output of the charger pro¬
fully charged (above 12.5V). The buzzer of LEDs for different battery voltages is tects the analyser circuit against acciden¬
connected to the output of IC1 also sounds shown in the table. tal polarity reversal.
(when S2 is pressed with SI kept open) as The circuit can be assembled on a gen¬ The circuit costs around Rs 120 with
long as the voltage of battery is above eral-purpose PCB or a veroboard. Use 4mm all accessories.

MARCH 2003 ELECTRONICS FOR YOU I


CIRCUIT IDEAS

LEAD-ACID BATTERY CHARGER WITH I THE


O

VOLTAGE ANALYSER -ÿ0 SAN

D. MOHAN KUMAR The charger circuit consists of a stan- comprising resistors R1 through R5. Thus
dard step-down 12V AC (2-amp) trans- the voltage applied to any non-inverting

N
owadays maintenance-free lead-acid former and a bridge rectifier comprising input is the ratio of the resistance between
batteries are common in vehicles, diodes D1 through D4. Capacitor C1 that non-inverting terminal and ground to
inverters, and UPS systems. If the smoothes the AC ripples to provide a clean the total resistance (R1+R2+R3+R4+R5).
battery is left in a poor state of charge, its DC for charging the battery. The resistor chain provides a positive volt-
useful life is shortened. It also reduces the The battery voltage analyser circuit is age of above 5V to the non-inverting inputs
capacity and rechargeability of the battery. built around the popular quad op-amp of all op-amps when battery voltage is 12.5V
For older types of batteries, a hygrometer LM324 that has four separate op-amps (A or more. A reference voltage of 5V is ap-
can be used to check the specific gravity through D) with differential inputs. Op- plied to the inverting inputs of op-amps via
of the acid, which, in turn, indicates the amps have been used here as compara- 5V zener diode ZD1.
charge condition of the battery. However, tors. Switch S2 is a pushswitch, which is When the circuit is connected to the
you cannot use a hygrometer for sealed- pressed momentarily to check the battery battery and pushswitch S2 is pressed (with
type maintenance-free batteries. The only voltage level before charging the battery. S1 open), the battery voltage is sampled
way to know their charge level is by check- The non-inverting terminals of op-amps by the analyser circuit. If the supply volt-
ing their terminal voltage. A through D are connected to the positive age sample applied to the non-inverting
The circuit presented here can replen- supply rail via a potential divider chain input of an op-amp exceeds the reference
ish the charge in a battery within 6-8 hours. voltage applied
It also has a voltage analysing circuit for Battery voltage Status of LEDs Comments to the invert-
quick checking of voltage before start of Red Green Yellow Orange ing inputs, the
charging, since overcharging may damage output of the
the battery. The voltage analyser gives an <9.8V Off Off Off Off Buzzer off
op-amp goes
audio-visual indication of the battery volt- >9.8V On Off Off Off Danger level
high and the
age level and also warns about the critical 11.5V On On Off Off Low level
LED connected
voltage level at which the battery requires 12.0V On On On Off Normal level
at its output
immediate charging. 12.5V On On On On High level
lights up.

IC1 (A, B, C, D) = LM324 S1


ON/OFF
SWITCH
CHARGING
-r S2
O PUSH-TO-ON
VOLTAGE LEVEL
INDICATOR
FUSE
2.5AMPS

R1 R6
18K 3.9K
PZ1
3 PIEZO
1 BUZZER
R2 2
O
2.7K

L
t
>
D1 D2
CD 5
CD CD
o CD RED
230V CD CD
§ CD R3 6 TO
50Hz
CD CD 680Q BATTERY

i Tx CD

-
D3 D4
12V
Pÿvj/ppsa-ÿ Q

2>
cy 10
230V BLACK
AC PRIMARY D1-D4 = 1N5402 8
9 CROCODILE
TOO-12V R4 CLIPS
2 AMP SECONDARY 680Q
C1
TRANSFORMER
2200M R7-R9 = 470Q
25V R10 = 100Q
12
LED1 = RED
14 LED2 = GREEN
D
13 LED3= YELLOW
R5 R7 >R8 >R9 > R10 LED4 = ORANGE
11
15K
ZD1
ZENER LED4 y\\ y\\ y\\ y\\ LEDI
4 •

ELECTRONICS FOR YOU MARCH 2003


CIRCUIT IDEAS

The different levels of battery voltages 9.8V. If the voltage level goes below 9.8V, wire and crocodile clips to connect the
are indicated by LED1 through LED4. All the buzzer goes off, which indicates that charger to the battery. A 2.5-amp fuse con-
the LEDs remain lit when the battery is it’s time to replace the battery. The status nected to the output of the charger pro-
fully charged (above 12.5V). The buzzer of LEDs for different battery voltages is tects the analyser circuit against acciden-
connected to the output of IC1 also sounds shown in the table. tal polarity reversal.
(when S2 is pressed with S1 kept open) as The circuit can be assembled on a gen- The circuit costs around Rs 120 with
long as the voltage of battery is above eral-purpose PCB or a veroboard. Use 4mm all accessories.

MARCH 2003 ELECTRONICS FOR YOU


CIRCUIT IDEAS

ELECTRONIC SECURITY SYSTEM fit


J .C. DWIVEDI
-ÿ0 S

K. BHARATHAN output of
t h e S1
So

T
LOUD
his reliable and easy-to-operate elec- Darlington SPEAKER R2
ON/OFF
SWITCH
tronic security system can be used pair drives 220K

in banks, factories, commercial es- the loud-


8Q
1W R1
220Q
rAAAAn o
+ C1
tablishments, houses, etc. speaker 100M +
T2 8 6V 3V
The system comprises a monitoring sys- whose out- BC548 VR1 BATT. -=ÿ

IC1
tem and several sensing zones. Each sens- put volume 10K
UM3561
VOLUME
ing zone is provided with a closed-loop can be con- 5 2
switch known as sense switch. Sense trolled by
T1
switches are fixed on the doors of premises potentiom- BEL187
under security and connected to the moni- eter VR1.
S11 = PUSH-TO-ON SENSE SWITCH
toring system. As long as the doors are Capacitor S12 = ON/OFF SLIDE SWITCH
closed, sense switches are also closed. The C1 serves S13 = PUSH-TO-ON SWITCH oi G
n TOP VIEW
monitoring system can be installed at a as a filter o o
o
convenient central place for easy operation.
Fig. 1 shows the monitoring circuit
only for zone 1 along with the common
capacitor.
Y o u
can alter
D10
1N4007
tLcio
-p10M
6V
R11
10K —I S12*"ÿ
IQ
ON

O OFF
jT-E I JSJ
alarm circuit. For other zones, the the alarm 1 2 3
CB E
monitoring circuit is identical, with only sound as
the prefixes of components changing desired by R10
R12
100Q
as per zone number. Encircled points A, changing 4.7K T12
SEL2 C 1 8 □ OSC2
BC558
B, and C of each zone monitoring circuit the con-
need to be joined to the corresponding
points of the alarm circuit (upper half
nections of
IC1 as
T10
BC5483 BC558
©L€) Vss —©
C 2
UM3561
7 □ OSC1

of Fig. 1). shown in OUTPUT C 3 6 □ SEL1


R13 R14
When zone 1 sensing switch S11, zone the table.
5 □ VDD
100Q 10K
NC C 4
on/off slide switch S12, and system on/off T h e o
switch S1 are all on, pnp transistor T12 circuit con-
S13
RESET
H LED11 y\\
PIN CONFIGURATION
reverse biases to go in cut-off condition, tinues to O NOTE: COMPONENTS FOR EACH ZONE
with its collector at around 0 volt. When sound the ZONE 1 G ARE PREFIXED WITH ZONE NUMBERS
L
the door fitted with sensor switch S11 is alarm until
opened, transistor T12 gets forward biased zone door Fig. 1: Monitoring circuit along with the alarm circuit
and it conducts. Its collector voltage goes
o\
high, which forward biases transistor T10 \

via resistor R10 to turn it on. (Capacitor LEAF SWITCH


o,
C10 serves as a filter capacitor.) As a re-
sult, the collector voltage of transistor T10 o o

falls to forward bias transistor T11, which


S21 S31
B 7 •£
OPERATING
SNAP SWITCH CLAMP
conducts and its collector voltage is sus-
tained at a high level. Under this latched
condition, sensor switch S11 and the state
of transistor T12 have no effect. In this
state, red LED11 of the zone remains lit. MONITORING AND ALARM
S11 CIRCUIT S41
Simultaneously, the high-level voltage
-
#7f>
S13 S23 S33 S43
S11-S41 DOOR oQ> O cQo oQo
from the collector of transistor T11 via di- WITH ZONE INDICATION DOOR WITH
SENSOR SWITCH I I SENSOR SWITCH
ode D10 is applied to VDD pin 5 of siren o
LED11
o
LED21
o
LED31
o
LED41 VOLUME
sound generator IC1 (UM3561) whose pin
rich nth nth rich
CONTROL iPy
2 is grounded. Resistor R3 connected across ON-*— ►OFF ON-*— ►OFF ON-*-K)FF ON*-K)FF

pins 7 and 8 of IC1 determines the fre-


Fig. 2: Physical layout of sensors and monitoring/alarm system
quency of the in-built oscillator. As a re-
sult, IC1 starts generating the audio signal is closed (to close switch S11) and the The system operates off a 3V DC bat-
output at pin 3. The output voltage from reset switch is pressed momentarily (which tery or recharging battery with charging
IC1 is further amplified by Darlington pair causes transistor T10 to cut off, returning circuit or battery eliminator. If desired,
of transistors T1 and T2. The amplified the circuit to its initial state). more operating zones can be added.

MARCH 2003 ELECTRONICS FOR YOU


CIRCUIT IDEAS

Alarm sound Circuit connections for respective ing to the zone glows to indicate that the
zones in closed door of the zone is open. The alarm and
IC pin 1 connected to IC pin 6 connected to position. Also the LED indication will continue even af-
Police siren NC NC keep zone slide ter that particular door with the sensing
Ambulance siren NC VDD switches S12, S22, switch is immediately closed, or even if
Fire engine Sound NC VSS S32, S42, etc in that switch is removed/damaged or con-
Machinegun sound VSS NC ‘on’ position. This necting wire is cut open.
puts the system in Any particular zone in the monitoring
Note. NC indicates no connection
operation, guard- system can be put to operation or out of
ing all the zone operation by switching on or switching off
Initially keep the monitoring system doors. the corresponding slide switch in the moni-
switch S1 off. Keep all the zone doors fixed Now, if the door of a particular zone toring system.
with sensing switches S11, S21, S31, S41, is opened, the monitoring system sounds The circuit for monitoring four zones
etc closed. This keeps the sensing switches an audible alarm and the LED correspond- costs around Rs 400.

ELECTRONICS FOR YOU MARCH 2003


CIRCUIT IDEAS

MULTI-SWITCH DOORBELL
m
BUZZER

WITH INDICATORS m
LEDs
T.K. HAREENDRAN also pulled down by resistor R5. Clock in¬ ©©®©
put (pin 5) of the quad D-latch is wired in

H ere’s the circuit of a multi-switch


input musical doorbell (shown in
Fig.l). The circuit is built around
the popular and less expensive quad
D-latch CD4042B (IC1). When switch S6
normally low mode and hence all the four
outputs (QO through Q3) have the same
states as their corresponding data inputs.
As a result, LED1 through LED4 are in off
condition.
SB

Fig. 2: Suggested panel layout of musical


S5
|ON/OFF| | RESET |

doorbell
is pushed to ‘on’ condition, the circuit gets There are four switches fitted at four
+ 9V and the four data inputs (D1 through different doors/gates outside the home and switch SI at door 1), pins 2 and 4 of ICI
D4) of ICI are in low state because these a monitoring panel (as shown in Fig, 2) in go high.
are tied to ground via resistors R1 through the common room of the home. If any Simultaneously, pin 3 to ICI (QO out¬
R4. Polarity input (POL) pin 6 of ICI is switch is pressed by a visitor (for example, put) goes low and LED1 starts glowing to
indicate that switch
+9V Si is pressed by
■o someone.
S1-S4 = R6-R9 = 1 Ktl S6
ON/OFF Next, output pin
PUSH-TOON
TACTILE SWITCH : JRB J : R7 * : Rfi SwrrcH
13 of the dual 4-in-
|6 |6 (DOOR SWITCH)
To To ToTo put NOR gate (IC2,
S4 S3 S2 S1 VDP LED4 LEDS LEDZ LED1 here wired as a
Q3
16
1 + single 4-input OR
D3
14
03 c1 -L
0
rr
ri|
gate) goes high to
02 forward bias buzzer-
D2
11 I , i BZ1 driver transistor T1
HS5
13
IC1
12
02
Q1 T1
MUSICAL
BUZZER
(6-12V DC)
via resistor RIO.
The final result is

o
D1 CD4042B 10 SL100B
7
9
01 a soft and pleasing
DO 00 musical bell, which
4 2 RIO lasts until reset
00 10K
3 switch S5 is pressed
6 6
POL VSS CK
by the owner. For
i tiiis latching arrange¬
ment , output pin 1 3
R5 •|R4 R3 R2 R1 of IC2 from the NOR
gate is fed back to
R1-R5=t00Kn IC2 (N1-N2) = CD4002B 2ND the clock input of
ICI.
The circuit costs
Fig. 1: Multi-switch doorbell with indicators around Rs 100.

I ELECTRONICS FOR YOU APRIL 2003


CIRCUIT IDEAS

i?
SONG NUMBER
DISPLAY
Is
ils i
|55|“?Ss"h SiSa _
?H2 Is
M. s 3

if VAV
PRABHASH K.P.

I s 3

H
ere’s a circuit to display the song number in an audio
system for quick reference to songs. It also serves the *
purpose of an extra visual indicator in modern audio
systems. |i kPA kPikP'jjj jjj J kP i\Pi 7? i kÿi kÿ|
When the power is switched on, the power-on-reset cir¬
cuit comprising 3.3k resistor R20 and lpF, 25V capacitor C6
resets the counters, showing '00’ in the display. One can also
3
;3 :3 3 ;s :S , "Ihip-
reset the display to zero at any time by pressing reset switch
SI.
When the first song starts playing, the output pins of IC1
(KA2281) go low and capacitor C5 starts charging. This for¬
ward biases transistor T1 and hence the input to IC3 at pin 1
CO
al
?§ «1» 8|a
goes to high state. As a result, the output of the counter goes
to the next state, showing 01 on the display. The counter
I
remains in this state until the song is completed. is
During the time gap before the next song starts playing,
capacitor C5 discharges. After discharging of capacitor C5,
£3; is
the input to IC3 becomes low again. When the song starts,
the process described above is repeated and the display shows
02. You can adjust VR3 to change the time gap setting. This
must be set such that the circuit doesn’t respond to short S3;i d

gaps, if any, within a song and responds only to long gaps


between different songs. m
s si !•< 1S|_
un
Transistor T2 helps in gap-delay adjustment. The inten¬ 52
sity of LED11 diminishes when a song is completed and the
WA
counter is ready to accept the next pulse.
Connect the input to the preamp output or equaliser out¬ £3 !*B
put of the audio system. Adjust VR1 and VR2 to get the
correct audio-level indication. If you are already using KA2281
IIS 3
for audio-level indication, just connect diodes D1 and D2 as
shown in this circuit. "i 3 3
Note that the counter counts the songs by detecting the
gaps. Therefore any long gap within a song may cause false ii 3
3 3
if
triggering and the display will also be incremented. However,
as this is very unlikely to happen, the circuit shows the
correct song number almost all the time.
The circuit costs around Rs 100.
-WA
ISPP."
TT[
: i§ 8
I
qi
H

I £
c f>

«T *

AAAAr *PQ: : 8is =


ITT
i

APRIL 2003 ELECTRONICS FOR YOU I


CIRCUIT IDEAS

CLAP SWITCH
MOHAMMAD USMAN QURESHI depending on the selected values of R7 and On second clap, a negative pulse trig¬
C3. This 'on' time (T) of IC1 can be calcu¬ gers IC2 and its output pin 3 goes high for

H
ere’s a clap switch free from false lated using the following relationship: a time period depending on R9 and C5.
triggering. To turn on/off any ap T= 1.1R7.C3 This provides a positive pulse at clock pin
pliance, you just have to clap seconds 14 of decade counter IC 4017 (IC3). De¬
twice. The cir-cuit changes its output state where R7 is in ohms and C3 in microfar¬ cade counter IC3 is wired here as a
only when you clap twice within the set ads. bistable.
time period. Here, you've to clap within 3 On first clap, output pin 3 of IC1 goes Each pulse applied at clock pin 14
seconds. high and remains in this standby position changes the output state at pin 2 (Ql) of
The clap sound sensed by condenser for the preset time. Also, LED1 glows for IC3 because Q2 is connected to reset pin
microphone is amplified by transistor T1. this period. The output of IC1 provides 15. The high output at pin 2 drives transis¬
The amplified signal provides negative pulse supply voltage to IC2 at its pins 8 and 4. tor T2 and also energises relay RL1 . LED2


+9V
LED2T
R1
3.3K
R3
2J2M
R5
3.3K*

C2
0.1|i
R6
:IOK
R7
►27QK

4 B
R9
>100K

6
8 *
IC2
4
R10
10K

3
0/P CK
14
cnma
16
|
1N4001
|sn
RL1
9V, 1500
1C/0 RELAY
L
O
A
T 555 IC3 D
4017
V!VT2
i-VWV— |
R2
4.7K
C1 T1
6 'Cl
555
LED1
C2J
1 5
c4
L 15
R
4

8 13
R13
10K BC548

0.01(1 BC549
5 R8 P N
IK 2.2(1 230V AC
[ COND.
MIC
R4
270K
caÿ- C5 C6
1SV 50Hz
C4 0.01(1 0.01(1 R11
0.01(1 ►470K

ON D
•REFER TEXT

to pin 2 of IC1 and IC2, triggering both the Now IC2 is ready to receive the triggering indicates activation of relay RL1 and on/off
ICs. IC1, commonly used as a timer, is signal. Resistor RIO and capacitor C7 con¬ status of the appliance. A free-wheeling
wired here as a monostable multivibrator. nected to pin 4 of IC2 prevent false trig¬ diode (Dl) prevents damage of T2 when
Trigging of IC1 causes pin 3 to go high and gering when IC1 provides the supply volt¬ relay de-energises,
it remains high for a certain time period age to IC2 at first clap. This circuit costs around Rs 80.

I ELECTRONICS FOR YOU MAY 2003


CIRCUIT IDEAS

DTMF RECEIVER 1C MT8870 TESTER


RONE POUMAI radio communications, the tone duration
#
The Status of LEDs on Pressing Keys
may differ due to noise considerations. on the Telephone Keypad

T oday, most telephone equipment use


a DTMF receiver IC. One common
DTMF receiver IC is the Motorola
MT8870 that is widely used in electronic
communications circuits. The MT8870 is
Therefore, by adding an extra resistor and
steering diode the tone duration can be
set to different values.
The circuit is configured in balanced-
line mode. To reject common-mode noise
Key No. LED 4

1
(MSB)

Off
LED3

Off
LED2

Off
TED I
(LSB)

On
2 Off Off On Off
an 18-pin IC. It is used in telephones and signals, a balanced differential amplifier 3 Off Off On On
a variety of other applications. When a input is used. The circuit also provides an 4 Off On Off Off
proper output is not obtained in projects excellent bridging interface across a prop¬ 5 Off On Off On
using this IC, engineers or technicians need erly terminated telephone line. Transient 6 Off On On Off
to test this IC separately. A quick testing protection may be achieved by splitting 7 Off On On On
of this IC could save a lot of time in re¬ the input resistors and inserting zener di¬ 8 On Off- Off Off
search labs and manufacturing industries odes (ZD1 and ZD2) to achieve voltage 9 On Off Off On
of communication instruments. Here's a clamping. This allows the transient energy 0 On Off On Off
small and handy tester circuit for the DTMF to be dissipated in the resistors and di¬
A On On Off On
IC. It can be assembled on a multipurpose odes, and limits the maximum voltage that
B On On On Off
PCB with an 18-pin IC base, One can also may appear at the inputs. C On On On On
test the IC on a simple breadboard. Whenever you press any key on your D Off Off Off Off
For optimum working of telephone local telephone keypad, the delayed steer¬ Note. I. LED5 blinks momentarily whenever any key is
equipment, the DTMF receiver must be ing (Std) output of the IC goes high on pressed.
designed to recognise a valid tone pair receiving the tone-pair, causing LED5 (con¬ 2. On = l , while Off = 0
greater than 40 ms in duration and to ac¬ nected to pin 15 of IC via resistor R15) to
cept successive digit tone-pairs that are glow. It will be high for a duration de¬ The optional circuit shown within dot¬
greater than 40 ms apart. However, for pending on the values of capacitor and ted line is used for guard time adjustment.
other applications like remote controls and resistors at pins 16 and 17. The LEDs connected via resistors R 11
to R14 at pins 11
through 14, respec¬
+w
S2
5Z l
Oi

18 10
1. tively, indicate the
output of the IC.
The tone-pair DTMF
01\i
S1, S2 = ON/OFF SWrTCH (dual-tone multi-fre¬
Cl
°-1lJ
~== R8 17
ST/GT
FMH quency) generated

—I
R1 R3 10K
56K S6K R9 R10
1N4148 ≤ 100K by pressing the tele¬
330K
9 > AW\r
IT ZD1 R5
IN+
16
ESt
phone button is
converted into bi-
5.6V 47K: OPTIONAL nary values inter¬
ZENER VREF
TELEPHONE 4 nally in the IC. The
LINE
binary values are


R7

|—
cz

I ZD2 R6 150K IC
°-1lJ 5.6V 4 1 WA indicated by glow¬
250V
R2 R4 66K 3 MT88707 StD R15
56K ZENER 56K KT3170 15 -VAAF ing of LEDs at the
O-> vwv- “WW- output pins of the
OSC1
IN-
14 <*L
R14
E53ÿj LED4
IC. LED1 represents
R13

XTHL
1
a
13 AAAAr 4 LED3 the lowest signifi¬
cant bit (LSB) and
cn H12
3.5795
MHz
T OSC2
8
12
R11
4 LED2 LED4 represents the
most significant bit
mm®;®
HUB USD
11
Q0

inn
4 LED1 (MSB).
So, when you
EH® si© 6 9 dial a number, say,
5, LED1 and LED 3
GND R11-R15 = 1K will glow, which is
LOCAL TELEPHONE
equal to 0101. Simi¬
larly, for every

JUNE 2003 ELECTRONICS FOR YOU


I
CIRCUIT IDEAS

other number dialled on your telephone, switch S2 only if keys A, B, C, and D are or D) , the DTMF IC 8870 is correct.
the corresponding LEDs will glow. Thus, a to be used.) Keys A, B, C, and D on the telephone
non-defective IC should indicate proper bi¬ 4. Now push key to generate DTMF keypad are used for special signalling and
nary values corresponding to the decimal tone. are not available on standard pushbutton
number pressed on your telephone key¬ 5. Push any decimal key from the tele¬ telephone keypads. Pin 5 of the IC is
pad. phone keypad. pulled down to ground through resistor
To test the DTMF IC 8870/KT3170, pro¬ 6. Observe the equivalent binary as R8. Switch on auxiliary switch S2. Now
ceed as follows: shown in the table. the high logic at pin 5 enables the detec¬
1 . Connect local telephone and the cir¬ 7. If the binary number implied by tion of tones representing characters A, B,
cuit in parallel to the same telephone line. glowing of LED1 to LED4 is equivalent to C, and D.
2. Switch on SI. (Switch on auxiliary the pressed key number (decimal/A, B, C, This circuit costs around Rs 80.

I ELECTRONICS FOR YOU JUNE 2003


CIRCUIT IDEAS

PULSE GENERATOR
A. JEYABAL depressed and the LED is glowing, As pins fully charges capacitor C2 via diode D. At
5 and 6 of NAND gate N2 are pulled up the same time, this high output of N2 en¬

T
his circuit is very useful while by resistor R3, its output pin 4 goes low. ables NAND gate N3 and dock pulses come
checking/operating counters, step¬ This disables NAND gate N3 to take its out through pin 10. These are the required
ping relays, etc, It avoids the pro¬ output pin 10 to high state, and no pulse number of pulses used to check our de¬
cedure of setting a switch for the required is available, vice.
number of pulses, By pressing appropriate IC1 is a decade counter whose Q out¬ The clock pulses are fed to clock-enable
switches SI to S9, one can get 1 to 9 nega¬ puts normally remain low, When clock pin 1 3 of IC1 , which starts counting. As
tive-going clock pulses, respectively. pulses are applied, its Q outputs go high soon as output pin 1 (Q5) of IC1 turns high,
Schmitt trigger NAND gate N1 of IC2, successively, i.e. Q0 shifts to Ql, Q1 shifts input pins 5 and 6 of NAND gate N2 will
resistor R1 , and capacitor Cl are wired to to Q2, Q3 shifts to Q4, and so on. also become high via switch S5 because
produce clock pulses , These pulses are taken If any one of switches SI through S9, high-frequency clock allowed five pulses
out through NAND gate N3 that is con¬ say, S5 (for five pulses) , is momentarily during momentary pressing. This high in¬
trolled by decade counter CD401 7 (IC1) . depressed, pins 5 and 6 of NAND gate N2 put of N2 provides low output at pin 4 to
Initially no switch from SI to S9 is go low, making its output pin 4 high, which disable NAND gate N3 and finally no pulse
will be available to advance counter IC1.
Before the next usage, counter IC1
CK must be in the standby state, i.e. Q0 out¬
GND
16 put must be in the high state. To do this,
CE IC1 8 a time-delay pulse generator wired around
CD4017 15
R_ NAND gate N4, resister R4, diode D, ca¬
3247 10 15 69 11 pacitor C2, and differentiator circuit com¬
Q0|Q1 02 Q3 04 05 06 07 08 prising C3 and R5 is used.
When output pin 4 of NAND gate N2
LED!! & is low, it discharges capacitor C2 slowly
through resistor R4, When the voltage
R2 .R3
across capacitor C2 goes below the lower

lJr fir
IK ►100K trip point, output pin 11 of NAND gate N4
TS1 S2 TS3 IS4 ]S5 Tse turns high and a high-going sharp pulse is
produced at the junction of capacitor C3
S1-S9 = PUSH-TO-ON TACTILE SWITCH
and resistor R5, This sharp pulse resets
counter IC1 and its Q0 output (pin 3) goes


OUTPUT
o i_n_r

=
IC2 (N1-N4) CD4093
high, This is represented by the glowing
of LED.
Ensure the red LED is glowing before
i ~i> 3
proceeding to get the next pulse. Press
any of the switches momentarily and the
LED will glow. If the switch is kept

T«-
WW
R1
100K
2M 0 22M _[ C3
0.001M R5 ;
100K; pressed, the counter counts continuously
and you cannot get the exact number of
pulses.
This circuit costs around Rs 70.

JUNE 2003 ELECTRONICS FOR YOU I


CIRCUIT IDEAS

PARALLEL TELEPHONE WITH SECRECY -Jfe


AND CALL PREVENTION
SANJIB CHOWDHURY When someone picks up the handset
*
can again only receive incoming calls.
of the telephone connected in parallel to When a call comes, conversation can

T Iris circuit provides secrecy when


two or more telephones are con¬
nected in parallel to a telephone
line. The circuit also prevents incoming
the original (master) phone for making an
outgoing call, no dial tone is heard and
the phone appears to be dead. But when a
call comes, the ring signal switches the
be made only from the telephone which
is lifted up first. To carry out conversa¬
tion from the other telephone, the hand¬
set of the telephone that was lifted up
calls to as well as outgoing calls from other SCRs ‘on’ and conversation can be carried first has to be placed on the hook and
telephones connected in parallel, except out. As soon as the handset is kept on the then the push-to-on switch of the associ¬
from the one lifted first. hook, the SCR goes off and the telephone ated circuit of the other telephone has to
be pressed after lifting up its
If AVAr handset. Thus the circuit en¬
R3
150*1
+C5 R7 sures privacy because both the
1M 1500
telephones cannot be active
xif TELEPHONE 1 150v TELEPHONE 2

m
+C1 SCR1 SCR2
at the same time.
1M
Those who are don’t need
W
150V 2P4M 2P4M
+ o- parallel telephones can rig up
the associated circuit of a single
-'02 C3 < R4
1M fi> 51501 telephone to work as an outgo¬
“15M
10K< 150v 150v • 10K5 150v 150v ' ing call preventer. An outgoing
call can be made only when
one lifts up the handset and
TELEPHONE
x) o x) presses the push-to-on switch
UNE BC548 si bL BC54S 32 of its associated circuit.
■ PUSH- O ■
FROM
EXCHANGE
xX PUSH- O
TO-
xX TO- The polarity of the tele¬


SCR

VWW-IBC5'
R2
1500
ON
SWrTCH
2P4M
12 3
— —R6
1500
*
BC5<

7ÿ f"
ON
SWrTCH phone line can be determined
by a multimeter. To avoid con¬
fusion, a bridge rectifier can
+\[
K AG
C4 C8 be used at the input of the
22M 22M circuit.
150V 150V
- o- This circuit costs around
Rs 80.

JULY 2003 ELECTRONICS FOR YOU


I
CIRCUIT IDEAS

VOLTAGE-BASED CONTROLLER
FOR SWITCHES
RAJ K. GORKHALI
o-
%
+12V
N/O
LOAD 1 1

H
ere’s a simple circuit for con¬ -12V
D1 jk -£T|
trolling four switches from a dis¬ 1N4007 N/C
+12V 2 RL1
tance through just a pair of VREFI I R5
1K
wires,
In the circuit, the inverting inputs
(pin 2) of operational amplifiers IC1 '-XT
■VMf
Of BC54

through IC4 are set to refrence voltages


of + 12V, +9V, +6V, and + 3V, respec¬ N/O
IRI it
LOAD 2 1
tively, through a chain of four lk resis¬
tors (R1 through R4).
1K
D2
1N4007 <n
N/C
The reference voltage (VREF) can be vreF2 2SSLL R6 RL2
1K
simply calculated by the following rela¬
B
WA €)„
tionship:
Total applied voltage x Resistance
3
XT _| BC546

across reference voltage N/O


LOAD3I
vREF = R2
D3 A L
Total resistance 1K
<ri
vre4i«y_2 SJz
1N4007 N/C
R7
For example, reference voltage Vp£R
is calculated as follows: +3VTO
+12V
ICa\ 6
3
i>f_
741ÿ
1K

--C."
_ | BC548
INPUT
1 2V x (R3 + R4) 12V x 2k VARIABLE
V*E» R1+R2 + R3 + R4 4k VOLTAGE
N/O.
FOR ;R3 LOAD4I
= 6V CONTROLING 1K D4 i k,
<n
1N4007 N/C
+3V 2 R8
The non-inverting inputs (pin 3) of VBEF4 RL4
1K
IC4

Hr
the four op-amps ( IC1 through IC4) are vwv RL1-RL4- 12V, 2000
tied together and connected to a pair of 3 T4 1C/0 RELAY
BC548
wires that provide +3V to +12V input ;R4 N P
voltage for controlling the switches. QND
1K 230V AC
Four 12V, 200-ohm, single¬ 50Hz
changeover relays are connected to four
BC548 relay driver transistors (T1 through age input terminal: for example, relay RL4 connected to the terminals of the relays
T4) via resistors R5 through R8, respec- energises when controlling voltage input through the 220V AC, 50Hz mains.
tively. These relays energise depending on of + 3V is available at non-inverting pin 3 This circuit, excluding relays, costs
the voltage present at the controlling volt- of IC4. Four electrical equipment can be around Rs 60.

JULY 2003 ELECTRONICS FOR YOU I


CIRCUIT IDEAS

LOW-COST HEARING AID


PRADEEP G.
%
c ommerciaHy available hearing aids
are quite costly. Here is an inexpen¬
sive hearing aid circuit that uses
just four transistors and a few passive com¬
R1
2.2K

>K
H3
3.3K
H4
! 220K
R5
1.5K IR7
[100K

O
ON/OFF
SWITCH V
1 f

ponents.
On moving power switch S to ‘on’ posi¬
tion, the condenser microphone detects the
1C2 K).'s
0.1 1
T4
BC558

sound signal, which is amplified by transis¬


tors T1 and T2. Now the amplified signal
passes through coupling capacitor C3 to the
H 0.1
ret
C549C
BC54B
T3
BCS48
2X1.5 VOLT
CELLS
(3VOLTS) —
±L
''

base of transistor T3. The signal is further


amplified by pnp transistorT4 to drive alow-
PSCOND
LJ MIC PHONEÿ~p
impedance earphone. Capacitors C4 and C5
are the power supply decoupling capacitors.
The circuit can be easily assembled ply. For this, you may use two small 1.5V sensitivity of the condenser microphone,
on a small, general-purpose PCB or a cells. Keep switch S to ‘off’ state when house it inside a small tube.
Vero board. It operates off a 3V DC sup- the circuit is not in use. To increase the This circuit costs around Rs 65.

AUGUST 2003 ELECTRONICS FOR YOU I


CIRCUIT IDEAS

OVER-/UNDER-VOLTAGE PROTECTION OF
ELECTRICAL APPLIANCES
C.H. VITHALANI amplifier is zero and transistor T1 remains are protected against over-voltage.
off, The relay, which is connected to the Now let's consider the under-voltage

T his circuit protects refrigerators as


well as other appliances from over-
and under-voltage. Operational am¬
plifier IC LM324 (IC2) is used here as a
comparator. IC LM324 consists of four op¬
collector of transistor T1 , also remains de¬
energised, As the AC supply to the electri¬
cal appliances is given through the nor¬
mally closed (N/C) terminal of the relay,
the supply is not disconnected during nor¬
condition. When the line voltage is below
180V, the voltage at the inverting terminal
(pin 6) of operational amplifier N2 is less
than the voltage at the non-inverting ter¬
minal (6V). Thus the output of opera¬
erational amplifiers, of which only two op- mal operation. tional amplifier N2 goes high and it

t
230 V A/C
D1 D2 _
+L ~

IN 1 IC1
7812
2
•rn; R3
RL = 112V, 200ft
C/O RELAY

50HZ C2 33K 6.6K


D3 D4 C1 0.1 M COM C3

I X
470ÿ
35V 3
0.1M

VR1
47K

ZD1 R4
D1-D6=IN4007 IOK< : 6.8V
ZENER
IK
_D6
N/O

LED N/C
RED
jjS R7
G.8K IC2(N1-N2)=LM324 RL
lÿl

VR2
47K £
♦I-0SU
os 4«— 4*
A/C
230V50HZ
X-230VAC PRIMARY TO
0-12V,1 A SECONDARY
TRANSFORMER M k
ZD2

f£ 6.0V
ZENER REF. - REFRIGERATOR

erational amplifiers (N1 and N2) are used When the AC voltage increases beyond energises the relay through transistor T1 .
in the circuit, 240V, the voltage at the non-inverting ter¬ The AC supply is disconnected and elec¬
The unregulated power supply is con¬ minal (pin 3) of operational amplifier N1 trical appliances turn off. Thus the appli¬
nected to the series combination of resis¬ increases. The voltage at the inverting ter¬ ances are protected against under-voltage.
tors R1 and R2 and potmeter VR1. The minal is still 6.8V because of the zener IC1 is wired for a regulated 12V supply.
same supply is also connected to a 6.8V diode. Thus now if the voltage at pin 3 of Thus the relay energises in two condi¬
zener diode (ZD1) through resistor R3. the operational amplifier is higher than tions: first, if the voltage at pin 3 of IC2 is
Preset VR1 is adjusted such that for 6.8V, the output of the operational ampli¬ above 6.8V, and second, if the voltage at
the normal supply of 180V to 240V, the fier goes high to drive transistor T1 and pin 6 of IC2 is below 6V, Over-voltage and
voltage at the non-inverting terminal (pin hence energise relay RL. Consequently, the under-voltage levels can be adjusted using
3) of operational amplifier N1 is less than AC supply is disconnected and electrical presets VR1 and VR2, respectively.
6.8V. Hence the output of the operational appliances turn off. Thus the appliances This circuit costs around Rs 110.

AUGUST 2003 ELECTRONICS FOR YOU I


CIRCUIT IDEAS

TELEPHONE RECEIVER
S.K. ROUSHON
%
bridge rectifier consisting of diodes D1 voice input for the amplifier comes di¬
through D4 protects the circuit from any rectly from the positive end of the bridge

T his simple telephone receiver with¬


out a dialling section can be con¬
nected in parallel to a telephone line.
It can be easily assembled on a small vero
polarity change in the telephone line. PNP
transistor MPS-A92 (Tl) is the main inter¬
face transistor. The output of Tl is regu¬
lated by zener diode ZD and capacitor C2
rectifier.
The amplifier section is built around
high-performance, low-wattage power am¬
plifier IC LM386. Tliis circuit is designed
board or a PCB. A geometry box made in to get 6.8V for powering the amplifier as a high-gain amplifier. A small 8-ohm
the shape of a telephone receiver will be section. This power is also used to bias speaker is good enough for the output.
an excellent cabinet for it. No external the transmitter section. After all soldering is done, adjust pre-

s *.
o- R4 R8 < R7S R6
47n VR2
k7K< 1M< 8.2K
MPSA92
-m- 0.5W
"5JW— IH
C1
2.2M
150V
_ D1 D2
R2
100K

C3
6
+| L.
rlr iev
C4
10|J
C5
C8
0.01M
T2
BC548
11—
C9
0.047M
II 10M
63V
ll 220M
16V
TELEPHONE
LINE R1
D4 D3 C10
330P VR1 3 . ICO .8 5 +
4.7K 100K LM386.
2 7 C7 LS l+
R3 t 8 0.047M 811 R9 CONY I
5 \± 82K :150Q MIC v |
§ “ ZD
6.8V
C2
330(J
zz ce T R5 IT
I
m I 0.047M <
D1-D4 = 1N4007
ZENER 16V |ion
C0.5W I >
1

pow'er supply is needed, which makes the The transmitter section comprises tran¬ sets VR1 and VR2 to their middle position
circuit handy. sistor BC548 (T2) together with a few and connect the circuit to the telephone
The ringer section comprises Rl, Cl, discrete components and a condenser mi¬ line in parallel. Adjust VR1 and VR2 for
and a buzzer. If your telephone has a crophone. The transmit signal is fed to optimum reception as well as transmis¬
loud ringer, this circuit can be avoided. A the base of interface transistor Tl. The sion.

I ELECTRONICS FOR YOU SEPTEMBER 2003


CIRCUIT IDEAS

WASHING MACHINE S.C.


DWIV
EDI

MOTOR CONTROLLER
SANTHOSH VASUDEVAN efficiently replaces its mechanical equiva- trolled as shown in Fig. 2. When switch
lent. Basically, a single-phase motor re- S1 is in position A, coil L1 of the motor

W
ashing machines usually employ quires a master timer, which decides the receives the current directly, whereas coil
a single-phase motor. In semi- time for which the motor should keep L2 receives the current with a phase shift
automatic washing machines, a rotating (washing time), and a spin direc- due to capacitor C. So the rotor rotates in
purely mechanical switch controls the tim- tion controller, which stops the motor for clockwise direction (see Fig. 2(a)). When
ing and direction of the motor. These 3 seconds after every 10 seconds and switch S1 is in position B, the reverse hap-
switches are costly and wear out easily. then resumes rotation in opposite direc- pens and the rotor rotates in anti-clock-
Here’s a controller for single-phase tion. wise direction (see Fig. 2(b)). Thus switch
motors of washing machines (Fig. 1) that The direction of rotation can be con- S1 can change the rotation direction.
The motor cannot be re-
o versed instantly. It needs a
R1 R8 IC3(N1)=CD4011 +6VDC brief pause between switch-
47K 100K
ing directions, or else it may
8 4 get damaged. For this
VR 230 VAC
1M O/P
14 R2
RL1 50 HZ purpose, another spin di-
POT 7
IC1
555
3
3E)~C) 6V 100Q
1 C/O RELAY
L? N? rection control timer (IC2)
is employed. It is realised

I
START/RESET 7 SK100 O N/O
S2 6
D1 O o with an IC 555. This timer
O
Q O 2 IN4007
C=3
gives an alternate ‘on’ and
1 5 N/C
‘off’ time duration of 10
+— C1
1000M
02 I
0.01M
WASHING
MACHINE seconds and 3 seconds, re-
I16V I R5 R7
MOTOR
spectively. So after every l0
100Q 16 4700 /y\ seconds of running (either
Q
VWVT J
5 1 in clockwise or anticlock-
R6
100Q SK100 wise direction), the motor
R3 8 4
-VWVTTK 6 stops for a brief duration of
1M IC4
4027
Q
o N/0 A 3 seconds. The values of
0/P 2
7 3 T
3 02 ~A~ § S1 R3 and R4 are calculated
R4 IC2 IN4007 A k O
o N/C oB
470K 555
accordingly.
6 RL2
The master timer is
4 7 8
2
6V 100Q realised with monostable IC
R S 1 C/0 RELAY
1 5 555 (IC1) and its ‘on’ time
+ C3
10M C41 is decided by the resistance
of 1-mega-ohm potmeter
I 16V 0.01M
I GND
O VR. A 47-kilo-ohm resistor
Fig. 1: Circuit diagram of washing machine motor controller is added in series so that
even when the VR knob is
L1 in zero
(a)
JOOOOOT 6V
0-18 MINUTES resis-
OUTPUT PIN 3 tance po-
t 1 OF MASTER
_<r*6A c
ROTOR TIMER IC1 sition,
DIRECTION ov
S1
B
L2 the net
i 6V
i
10 SEC. 3 SEC. 10 SEC. 3 SEC. 10 SEC. 3 SEC. 10 SEC.
series re-
O/P PIN 3 OF
SPIN DIRECTION \ f S' t \
sistance
TIMER IC2
L1 OV
is not
(b)
ill i i i
zero.
A B A B The
A
1 ROTOR OUTPUT PIN1
6V
on-off
C DIRECTION OF IC4
S2
B
L2
cycle in
0V
1 t flJOOOOL i l FOR SAFETY OF THE MOTOR, THE SPIN DIRECTION IS SELECTED
the mas-
3 SECONDS BEFORE THE NEXT SPIN, i.e. DURING THE OFF TIME
ter timer
Fig. 2: Direction of motor Fig. 3: Timing diagram for rotation of motor should

SEPTEMBER 2003 ELECTRONICS FOR YOU


CIRCUIT IDEAS

go on only for the set time (here it is 18 only when the output from NAND gate relay RL2 and washing machine motor
minutes). Once the master timer goes off, N1 is low. As the mains 220V line is rotates in one direction. During the off
the cycle should stop. To achieve this, taken through relay RL1, the motor turns time of IC2, the output of N1 goes high
the outputs of both the timers are con- off during the 3-second off period after again to de-energise relay RL1, which
nected to NAND gate N1 (IC3), which the set time of 10 seconds is over. The cuts off the mains supply to RL2 and the
gives a low output only when both the graph is shown in Fig. 3. motor stops rotating.
timers are giving high outputs.The output During ‘on’ time of spin direction timer Floating point trouble may occur at trig-
pin 2 of N1 is connected to relay RL1 via IC2, the output of negative-edge triggerd ger pin 2 of IC1. Resistor R8 overcomes this
pnp transistor T1, so the relay energises JK flip-flop at pin 2 goes low to energise problem by holding pin 2 high.

ELECTRONICS FOR YOU SEPTEMBER 2003


CIRCUIT IDEAS

ELECTRONIC MOTOR STARTER


T.A. BABU preset VR1 such that T1 conducts when
voltages goes beyond upper limit (say,
%
While making over-/under-voltage set¬
ting, disconnect C2 temporarily. Capacitor

T his motor starter protects single¬


phase motors against voltage fluc¬
tuations and overloading. Its salient
feature is a soft on/off electronic switch
for easy operation.
260V). When T1 conducts, it switches off
T2. Transistor T2 works as the under-volt¬
age protector. The under-voltage setting is
done with the help of preset VR2 such that
T2 stops conducting when voltage is below
C2 prevents relay chattering due to rapid
voltage fluctuations.
Regulator IC 7809 gives the 9V regu¬
lated supply to soft switch as well as the
relay after filtering by capacitor C4. A suit¬
The transformer steps down the AC lower limit (say, 180V). Zener diodes ZD1 able miniature circuit breaker is used for
voltage from 230V to 15V. Diodes D1 and and ZD2 provide base bias to transistors T1 automatic over-current protection. Green

N
D2
S1 , S2 = PUSH-TO-ON SWrTCHÿÿ JjTT] IC IN
|R1 R2
O O
S1
OUT
3 7809 1 —
?1K 1K R3
1K
J.G23 COM
D1 230V AC PRIMARY TO 0-15V, 500mA
SECONDARY TRANSFORMER
°3 Ai. S2 O L

T1
BC548
ZD2
9.1V
RL
A
LED1

C3
POWER
ON
LED2 15V S
O t
230V
AC
ZD1
) 0.01M
s
VR1*
10K
OVER
ADJ
9.1V
<vn2*
10K
UNDER
ADJ
BC548
T3
BC550 R4
T4
BC548
0V
I
-O N
+ C4tL
C1
+ C2
470[J'T ( MCB
100M
35V
M
35V
=
RL 9V, 2000, IC/O RELAY

-
D1-D3 1 N4007
R5
4.7K
35V
R6
1K has. RELAY
CONTACTS (M)
wc MOTORT
zr
D2 rectify the AC voltage to DC. The un¬ and T2, respectively. Transistors T3 and T4 LED (LED1) indicates that the motor is
regulated power supply is given to the pro¬ are connected back to back to form an SCR ‘on’ and red LED (LED2) indicates that
tection circuit. configuration, which behaves as an ‘on’/ the power is ‘on’. The motor is connected
In the protection circuit, transistor T1 is ‘off’ control. Switch SI is used to turn on to the normally-open contact of the relay.
used to protect the motor from over-volt¬ the pump, while switch S2 is used to turn When the relay energises, the motor turns
age. The over-voltage setting is done using off the pump. on.

OCTOBER 2003 ELECTRONICS FOR YOU


I
CIRCUIT IDEAS

vV >
REMOTE-OPERATED MUSICAL BELL
PRADEEP G.
w +9VTO
OUT 102
3 7005 1 -

T his infrared light-


controlled 12-tone
musical bell can be
operated using any TV re¬
R1
T1
BC557

V 3 16
C2
47P
0.1\i

rr
T
T
LS
COM
I
T
0.1 M

FRONT VIEW OF
mote control. It can be 1000
D2
WAr 4
R3
13 LL «2
0.5V
IR SENSOR TK1836

:9
operated from up to 10 1N4148 IK IC1 14
metres, provided the re¬ R2 12 UM R5
3 100K
mote control is directed 2.2K 3481 15
towards the sensor.
The circuit uses the
popular 3-lead 1R sensor 2 TV
1N4148
9
5 6 7 8
11
—WW
R4
ioon
-fPj
VSL100T2
O/P
GND
Vcc

C1
0.1|J SENSOR
TK1836 to trigger musi¬
cal bell built around IC
UM3481(IC1), (You can GND
also use IC UM3482,
UM3483, or UM3484
in place of IC UM3481.)
The sensor responds only to 36 kHz. pulses low. Transistor T1 conducts to ap¬ heard. Tills way, twelve different musical
Most TV remote controls transmit this ply a triggering pulse to IC1 at its pin 4. tones can be generated.
frequency. After playing one musical tone, the circuit The circuit works off a 5V power sup¬
When any button on the TV remote automatically resets. If you again press any ply. Regulator IC 7805, powered from a 9-
control is pressed, the sensor’s output of the remote's buttons, another music is 12V DC source, provides regulated 5V.

I ELECTRONICS FOR YOU OCTOBER 2003


CIRCUIT IDEAS

MOSFET-BASED PREAMPLIFIER
FOR FM RADIO DXing
m
N.S. HARISANKAR.VU3NSH borrowed from amateur radio operators. much higher gain — approaching that of a
It means 'distance unknown’: D’ stands vacuum tube. These are classified into

F M transmissions can be received


within a range of 40 km. If you are
in fringe areas, you may get a very
weak signal. FM DXing refers to hearing
distant stations ( 1 500 km or more) on the
for ‘distance’ and ’X’ stands for ‘unknown.’
For an FM receiver lacking gain, or hav¬
ing a poor signal-to-noise ratio, using an
external preamplifier improves the signal
level.
junction FETs and MOSFETs. On compar¬
ing the FETs with a vacuum tube, the gate
implies the grid, the source implies the
cathode, and the drain implies the plate.
In a transistor, the base implies the grid,
FM band (88-108 MHz). The term ‘DX’ is The dual-gate MOSFET preamplifier cir- the emitter implies the source, and the
collector implies the drain.
1N4007 In dual-gate FETs, gate 1 is the signal
L M51 gate and gate 2 is the control gate. The

t
230V AC
50Hz
ON/OFF
SWITCH O
O
C6
100|J
t
FB

C8
100kP
. R3
;iookn
_L C9 RFC I
10kP
G2 I
gates are effectively in series, making it
easy to control the dynamic range of the
device by varying the bias on gate 2 .

I
o- r* C7
25V

I C10
The MOSFET is more flexible because
it can be controlled by a positive or nega¬
tive voltage at gate 2. The resistance be¬
100kP
I 1 kP
L2
BF966S
DG FET
tween the gate and rest of the device is
L1 = 7T, 5mm, AIR CORE, 20SWG/3T FROM GROUND extremely high because these are separated
L2 = 8T, 5mm, AIR CORE, 20SWG
RFC = 30T, 32SWG ON *W 1MQ CARBON RESISTOR by a thin dielectric layer. Thus the MOSFET
-
X 230V AC PRIMARY TO 0-1 2V, 250mA
SECONDARYTRANSFORMER BF966S
has an extremely high input impedance.
FB = FERRITE BEAD, 5 TURNS 36 SWG Dual-gate MOSFETs (DG MOSFETs) are
VR
47KV --'SAM--J— 1
C3 100k£l C4

DG FET
G2 D|
C5
1 kP
OUTPUT
very popular among radio amateurs. These
are being used in IF amplifiers, mixers,
"T“ 100kP TO
RADIO and preamplifiers in HF-VHF transceivers.
ANTENNA The isolation between the gates (G1 and
Q1 S -pVC2 G2) is relatively high in mixer applications.
7 22P
This reduces oscillator pulling and radia¬
tion. The oscillator pulling is troublesome
C1 4T
FROM
ANTENNA
(CUBICAL
QUAD)
-
|NpuT
1 kP
41

3T
L1 VC1
22P 7“ C2
1kP”r
l R1
220ft
particularly in shortwave communications.
It is a characteristic in many unsophisti¬
cated frequency-changer stages, where the
incoming signal, if large, pulls the oscilla¬
tor frequency slightly off the frequency set
Fig. 1: Circuit of MOSFET-based preamplifier for FM DXing by the tuning knob and towards a fre¬
quency favourable to the (large) incoming
cuit shown in signal. A DG MOSFET can also be used
CUBICAL QUAD WHIP ANTENNA
Fig. 1 gives for automatic gain control in RF amplifi-
0 A 3MSOL an excellent ers.
gain of about DG MOSFET BF966S is an n-channel
18 dB. It depletion- type MOSFET that is used for
INSULATING HOLDER costs less and general-purpose FM and VHF applications.
(FIBRE GLASS/
BAMBOO/HYLEM)
FOR CONNECTING
TO MAST
- IS
Eg
is simple to
design.
Field-ef¬
In this configuration, it is used for FM
radio band. The quadratic input character¬
istic of the FET input stage gives better
fect transis¬ results than the exponential characteristic
tors (FETs) of a bipolar transistor.
1 cm DIA ALUMINIUM
A I
are superior Gate 1 is meant for input and gate 2 is

if
TUBE (75cmx4)
SQUARE SHAPE SHORT LENGTH to bipolar for gain control. The input from the an¬
OF WIRE TO transistors in tenna is fed to gate G1 via Cl and LI.
RX PREAMP IN
many appli¬ Trimmer VC1 is used to tune and select
500/75ft COAX TO RX PRE AMP IN
cations as the input frequencies. Capacitor C4 (100
Fig. 2. Different antennae used for FM DXing these have a kpF) at the gain control electrode (gate 2)

NOVEMBER 2003 ELECTRONICS FOR YOU I


CIRCUIT IDEAS

decouples any variation in G2 volt¬ Coil & Capacitor Details for DXing of Various Frequency Bands
age at radio frequencies to main¬
tain constant gain. Set preset VR 10m band 6m band 3m band 2m band
(47k) to adjust the gain or connect (28 MHz) (50 MHz) (98 MHz) (144 MHz)
a fixed resistor for fixed gain. The amateur radio amateur radio FM radio FM radio
output of the circuit is obtained via
LI core 17T, 28 SWG 12T, 26 SWG 7T, 5mm dia. , 5T, 20SWG,
capacitor C5 and fed to the FM re¬
Amindoncore OnT-37-iO,Tap 20SWG Vi-inch ID, Vz -inch L
ceiver amplifier.
(T-50-6) , Tap at 5T from GND Aircore, 1cm Length, Tap 2 from GND
For indoor use, connect a 14-
at 6T from GND Tap 3T from GND
wavelength whip antenna, '/2-wave- 8T, close winding,
L2 core 17T, 28 SWG 12T, 26 SWG 4T, 20 SWG,
length 1.5m wire antenna, or any Amindoncore On T-37-10, 5mm dia. Air-core, No tap
other indoor antenna set-up with
T-50-6, without tap No tap
this circuit. You may use a 9V
Without tap
battery without the transformer and VC.l & VC2 60 pF 22 pF 22 pF 15 pF
diode 1N4007, or any 6V-12V power
supply to power the circuit (refer
Fig. 1). The RF output can be taken on page 72 of Electronics Projects Vol. 8.) strong signal overloading. It produces less
directly through capacitor C5. For an im¬ Mount the DG MOSFET BF966S at the cross- modulation than a conventional tran¬
proved input and output impedance, solder side of the PCB to keep parasitic sistor having negative temperature coeffi¬
change Cl from 1 kpF to 22 pF and C5 capacitance as small as possible. Use an cient, doesn’t succumb to thermal run¬
from 1 kpF to 100 kpF. epoxy PCB. After soldering, clean the PCB away at liigh frequencies, and decreases
For outdoor use at top mast, like a TV with isopropyl alcohol. Use a suitable noise. In VHF and UHF, the MOSFET
booster, connect the C5 output to the enclosure for the circuit. All component produces less noise and is comparable
pow'er supply unit (PSU) line. Use RG58U/ leads must be small. Avoid shambled wir¬ with JFETs. DG FETs reduce the feedback
RG1 1 or RG1 74 cable for feeding the power ing to prevent poor gain or self oscilla¬ capacitance as well as the noise power
supply to the receiver amplifier. The PSU tions. Connecting a single- element cubical coupled to the gate from the channel,
for the circuit is the same as that of a TV quad antenna to the circuit results in giving stable unneutralised power gain for
booster. For TV boosters, two types of ‘Open Sesam’ for DXing. wide band applications.
mountings are employed: The fixed tuned You can use a folded dipole or any This circuit can be used for other
booster is mounted on the mast of the other antenna. However, an excellent per¬ frequency bands by changing the input
antenna. The tunable booster consisting formance is obtained with a cubical quad and the output LC networks. The table
of the PSU is placed near the TV set for antenna (refer Fig. 2) and Sangean ATS- here gives details of the network compo¬
gain control of various TV channels. (For 803 world-band receiver. nents for DXing of stations at various
details, refer ‘High-Gain 4-Stage TV Booster’ In an amplifier, FET is immune to frequency bands,

I ELECTRONICS FOR YOU NOVEMBER 2003


CIRCUIT IDEAS

touch signal is connected to the counter/

TOUCH DIMMER
K. KRISHNA MURTY
%
second touch, the bub gives medium light.
At the third touch, the bulb is driven
decoder via a resistor and clock input CK
is connected to the counter/ decoder via a
frequency generator.
Line frequency signal is taken through
R4 at pin 2 of IC TT6061A. At zero cross¬
ing, the triac (BT136) triggers to drive a
200W bulb.

B
y simply touching this touch dim¬ fully. Another touch puts off the light. The 6.8V power supply is taken di¬
mer you can increase the light in¬ Since the IC is highly sensitive, use a rectly from mains through resistors R1 and
tensity of incandescent lamps in long wire to connect the IC to the touch R3, diode D3, capacitor C4, and zener
three steps. The touch dimmer is built sensor. The circuit uses minimum exter¬ diode and fed to power-input pin 3 of the
around 8-pin CMOS IC TT8486A/TT6061A nal components. For touch plate, you can IC. Capacitors Cl, C2, and C3 connected
specifically manufactured for touch dim- use a simple copper plate of 1cm * 1cm or between touch input pin 4 and touch plate

Pin Assignments of IC TT6061A


WA
R3
/
MANS A
FRONT VIEW
Pin No. Pin name Function description
1N4007
40K.2W
BULB* .
I SWITCH o
VM- FU 230V
TtXJCH R2 Um BOW 0T 1 CK System dock input
PLATE #20K
TWAC Az
13# 2 FI SOHzline frequency
R1 12 3 VDD Power input pin for VDD

C1 T TO
ajSM
3
a
CB

H
G A1
aaov
A1
A2
IG 4
5
n
Cl
Touch input
Sensor control input
S20P
02 I ZD
esv
ZENER IC
AC
80HZ
6
7
NC Not connected
Power input pin for
S2DP

C3
MDP
I Ri DZJ [
OS
0.47|i
8
TT6061A 8 R7
10K
8 AT Angle-trigger output

T IK 2SV

7
remove the shock potential from the touch
plate, so do not replace these capacitors
04 +1 . ,D1 with a single capacitor or with a capacitor
104i
•REFER TEXT D1-D3.1H414C of a lower voltage rating. Mains potential
exists in the circuit. Needless to say, it is
dangerous to touch the circuit when mains
mer applications. even the end of the lead wire. Touch plate is ‘on.’
Initially, when mains switch is ‘on,’ is coupled to the touch detector through Note. The IC had been procured by
the bulb is ‘off’. Now, if you touch the 820pF, 2kV capacitors Cl, C2, andC3 con- the author from SM Semiconductors,
touch plate, the bulb glows dimly. On nected in series. Internally IC TT6061A’s Santacruz (W), Mumbai.

DECEMBER 2003 EIECTBONICSRORYOU


CCI IRRC UCIUT IITD EIADS E A S

AUTOMATIC NIGHT LAMP WITH st> SAN


I THE
O

MORNING ALARM OTP


A

D. MOHAN KUMAR sistors (LDRs) for sensing darkness and Low-value capacitor C2 maintains the
light in the room. The resistance of LDR is monostable for continuous operation,

T
his circuit automatically turns on a very high in darkness, which reduces to eliminating the timer effect. By increasing
night lamp when bedroom light is minimum when LDR is fully illuminated. the value of C2, the ‘on’ time of the white
switched off. The lamp remains LDR1 detects darkness, while LDR2 de- LED can be adjusted to a predetermined
‘on’ until the light sensor senses daylight tects light in the morning. time.
in the morning. A super-bright white The circuit is designed around the LDR2 and associated components gen-
LED is used as the night lamp. It gives popular timer IC NE555 (IC2), which is erate the morning alarm at dawn. LDR2
bright and cool light in the room. When configured as a monostable. IC2 is acti- detects the ambient light in the room at
the sensor detects the daylight in the vated by a low pulse applied to its trigger sunrise and its resistance gradually falls
morning, a melodious morning alarm pin 2. Once triggered, output pin 3 of IC2 and transistor T1 starts conducting. When
sounds. goes high and remains in that position un- T1 conducts, melody-generator IC UM66

IC1

n
IN OUT
1 7806 3
D5 2
1N4001 GND FRONT VIEW
R6 S1

4 7
R1 D6 R3
5800 ON/OFF
1K 1N4001 120K LDR2 UM SWITCH
LDR1
4 8 T1
BC548
66
I
O

t
230V
AC °
L
O
C5
C> •O
O
D1-D4 = 1N4007

D1 D2

J+9V
TRIG
6

2
IC2
NE555
3
OUT

R4
R5
150K
© COM 3
2 1
Vcc
OUT
SPEAKER
80, 4.5W

T2
BC548
K
BATT. IC3
'sr©
50Hz O 2200 OUT
O C2 2 1

i _rx1 Lo
D3 D4
0.01y 1 5 R7
1K
UM66
3
5600
o 230V
AC PRIMARY
C1 + R2
1
C3 -i- i ZD
COM

TO 0-9V 1000M
25V
150K 0.01M LED ▼\\ 3-3V T
500mA
SECONDARY
j|~ 0.5W
|
TRANSFORMER

The circuit is powered from a til IC2 is triggered again at its pin 2. (IC3) gets supply voltage from the emitter
standard 0-9V transformer. Diodes D1 When LDR1 is illuminated with of T1 and it starts producing the melody.
through D4 rectify the AC voltage and the ambient light in the room, its resistance The musical tone generated by IC3 is
resulting DC voltage is smoothed by C1. remains low, which keeps trigger pin 2 amplified by single-transistor amplifier T2.
Regulator IC 7806 gives regulated 6V DC of IC2 at a positive potential. As a result, Resistor R7 limits the current to IC3 and
to the circuit. A battery backup is pro- output pin 3 of IC2 goes low and zener diode ZD limits the voltage to a
vided to power the circuit when mains the white LED remains off. As the safer level of 3.3 volts.
fails. When mains supply is available, the illumination of LDR1’s sensitive window The circuit can be easily
9V rechargeable battery charges via diode reduces, the resistance of the device in- assembled on a general-purpose PCB.
D5 and resistor R1 with a reasonably creases. Enclose it in a good-quality plastic case
constant current. In the event of mains In total darkness, the specified LDR with provisions for LDR and LED. Use a
failure, the battery automatically takes up has a resistance in excess of 280 kilo- reflective holder for white LED to
the load without any delay. Diode D5 ohms. When the resistance of LDR1 in- get a spotlight effect for reading. Place
prevents the battery from discharging back- creases, a short pulse is applied to trigger LDRs away from the white LED,
wards following the mains failure and pin 2 of IC2 via resistor R2 (150 kilo- preferably on the backside of the case, to
diode D6 provides current path from the ohms). This activates the monostable and avoid unnecessary illumination. The
battery. its output goes high, causing the white speaker should be small so as to make
The circuit utilises light-dependant re- LED to glow. the gadget compact.

ELECTRONICS FOR YOU DECEMBER 2003


CIRCUIT IDEAS

inverting pin is held at a reference volt¬

IC Controlled age of approximately 6.9 volts which is


obtained using diode D5 (1N4148) and
6.2-volt zener D6. The inverting pin of
IC1 is connected to the positive termi¬

Emergency Light nal of battery. Thus when mains


supply is present, IC1 comparator out¬
put is high, unless battery voltage ex¬
ceeds 6.9 volts. So transistor T1 is nor¬

with Charger mally forward biased, which energises


relay RL1. In this state the battery re¬
mains on charge via N/O contacts of
relay RL1 and current limiting resistor
R2. When battery voltage exceeds 6.9
A.P.S. DHILLON volts (overcharged condition), IC1 out¬
put goes low and relay RL1 gets de¬
energised, and thus stops ftirther charg¬
ing of battery.

T he circuit shown here is that of Battery overcharge preventer circuit


the IC controlled emergency is built around IC1 (LM308). Its non-
light. Its main
features are: automatic X1
MOSFETs T3 and T4 may be
mounted on suitable heat sinks.

AC PRIMARY TOO-6VAC
switching-on of the light 220V200mA
on mains failure and bat¬
8ECONDERY _
TRANSFORMER
tery charger with over¬ D1

t
D2
charge protection. 1N4007< 1N40G7 R2
10a
When mains is ab¬ 220V 1W
sent, relay RL2 is in de¬
energised state, feeding
battery supply to in¬
BOK/

1 D4
D3
1N40Q7 RL1
1 O N/O,
1N40Q7 IC1 BV,
verter section via its N/ ci R1 LM308 1000
RELAY IW007 MO
C contacts and switch 1000V 1Kfi 3 RL1
25V
Wv CONTACTS
SI. The inverter section
comprises IC2 (NE555)

:p-r»
-
which is used in stable
mode to produce sharp RL2 os ir
pulses at the rate of 50 6V, 1N4148- -
AJlRATT '- 2000
Hz for driving the »a m 'RELAY JkDS
MOSFETs. The output of 62V
ZENER
IC3 is fed to gate of
MOSFET (T4) directly
while it is applied to si
MOSFET (T3) gate after XSPS
yswm
inversion by transistor
T2. Thus the power am¬ R3
plifier built around R3 Re
1K IRF840
8200 4 8
MOSFETs T3 and T4
functions in push-pull
mode.
The output across
secondary of transformer
X2 can easily drive a
D8
1N4148 —— s
2
IC2
NE555
’!m47L
10K
4.6V

OV
X2

230Vp20W
FLUORESCENT
TUBE
8
230-volt, 20-watt fluores¬
cent tube. In case light C2±L 5 _ 1
48V

J- Rs| IRF940
is not required to be on SSTa
0.01(J
1K>
during mains failure,
simply flip switch SI to
I X2
4_fiV.Q-4-.6V (AC RMS), 5-AMP PRIMARY
TO 230V AC SECONDARY TRANSFORMER
off position.
CIRCUIT IDEAS

rv
mi. ■I
ui
, r*1 \
pi lj
■i

•••••
LED-BASED I
r
g|g IOOQOOOQQJ
••
tMM

8 |i a
MESSAGE DISPLAY '1l.
3
*
.
•••
••• ••••• ••
3 8 2
•••• •••••

S.C. DWIVEDI
% 2i-r-
a>

I
:::
'll
S|3
11
S
z
B
•••■ •■

• •••
*•«.«
•••••

•••;*
£ÿ |5 :***s .:!»
T
Ihis LED-based message display is
built around readily availble, low- la
MMI
-" • • •
•#•••

«•« ••
cost components. It is easy to fabri¬
ih
!••••

cate and makes use of 3mm red LEDs. A isa MtM **,
total of 172 LEDs have been arranged to
display the message “HAPPY NEW YEAR
If1 ••
2004."
The arrangement of LED1 through
LED11 is used to display ‘H’ as shown in o-
Fig. 1. The anodes of LED1 through LED11
are connected to point A and the cath¬
odes of these LEDs are connected to point
B. Similarly, letter 'A’ is built using LED12
Hh
Is
in

fs HR
5
VWV Irt 2»
;
through LED21. All the anodes of LED12 ± a m i
through LED21 are connected to point A,
while the cathodes of these LEDs are con¬ h s 3 [—ft*
:
nected to resistor R8 (not shown in the
circuit diagram). Other letters/ words can
|8" 0 Bl
-
s' £ £
"S|9
5
also be easily arranged to make the re¬
quired sentence. i* y
The power supply for the message dis¬ :
play circuit (Fig. 2) comprises a 0-9V, 2A
step-down transformer (XI), bridge recti¬
fier comprising diodes D1 through D4,
iga a I
M
2
ft*
i
:
.
and a filter capacitor (Cl) IC 7806 (IC1)

8 i* I |—r»
:
t 8 : :
£7 7£ M* 9 2
S f*i
i*
fl
3* I
V* Is ![g %
torn

»7
a a:
b
2
»
N Wr

Fig. I: LED arrangement for word V’

JANUARY 2004 I ELECTRONICS FOR YOU I 119


CIRCUIT IDEAS

provides regulated 6V DC to tire display high, transistor T2 conducts and the cur¬ Q6, Q7, or Q8 output go high, transistor
circuit comprising timer 555 (IC2) and rent flows through LED49 through LED87 T5 conducts and the current flows through
decade counter CD4017 (1C3). The astable via resistors R12 through R14. Now the all the LEDs via diodes D9 through D12
multivibrator built around IC2 produces word ‘NEW’ is displayed on the LED ar¬ and resistors R7 through R22. Now the
1Hz clock at its output pin 3. This output rangement board. complete message “HAPPY NEW YEAR
is connected to clock pin (pin 14) of the Again, when Q3 output goes high, tran¬ 2004“ is displayed on the LED arrange¬
decade counter. sistor T3 conducts and the current flows ment for four seconds.
The decade counter can count up to through LED88 through LED128 via resis¬ Thus, the display board displays
10. The output of IC3 advances by one tors R15 through R18. Now the word 'HAPPY,' ‘NEW,’ YEAR' and ‘2004’ one
count every second (depending on the ‘YEAR’ is displayed on the LED arrange¬ after another for one second each. After
time period of astable multivibrator IC2) . ment board. that, the message “HAPPY NEW YEAR
When Q1 output of IC3 goes high , tran¬ Similarly, when Q4 output goes high, 2004" is displayed for 4 seconds (because
sistor T1 conducts and the current flows transistor T4 conducts and the current Q5 through Q8 are connected to resistor
through LED1 through LED48 via resistors flows through LED129 through LED172 R6 via diodes D5 through D8).
R7 through Rll. Now the word ‘HAPPY’ via resistors R19 through R22. Now dig¬ At the next clock input output Q9 goes
built around LED1 through LED48 is dis¬ its ‘2004’ are displayed on the LED ar¬ high, and IC3 is reset and the display is
played on the LED arrangement board. rangement board. turned off for one second. Ther eafter the
Next, when Q2 output of IC3 goes During the entire period when Q5, cycle repeats.

120 | ELECTRONICS FOR YOU | JANUARY 2004


CIRCUIT IDEAS

MULTIBAND CWTRANSMinER J&


REJIMON G. VU2RGQ ceiver. The circuit works off a 9V the required positive feedback for
battery. oscillation and transistor T2 (BC547)
radio frequency oscillator is at Connect the Morse key (SI) across functions as the emitter follower.

A the heart of all radio transmitters


and receivers, It generates high-
capacitor CS as shown in the figure. At¬
tach a telescopic antenna (capable of
transmitting
The output is taken from the emitter of
T2.

over a short
KEY COL HAVHG (0 TURNS ON
40V O distance) at 14’ PVCTUBE
St
PUSH-TOON
the output ■
SWITCH terminal. b 32
m The coil and o,
CS
0.1(1
10K gang capaci¬ r
C1 AKTETNA tor C2 form
«

T: -Or©' I
1
the tank cir¬ S-POLE
T,W HOWRY TO JUNCTION
Til'* c* cuit. The SWITCH

a
OF Cl AND C2


a 2U2222 BCS47 Q.1U
coil (L) has
771 1 ~ 2J
~T47P
iF- a total of 60

L*
sa
& 2-00
d
32
ROTARY
(BANS)

i|w RS R4
turns.
Winding de¬
04
&» SWITCH ISP ‘ IK 27K tails are Gl¬ ♦ 9> •
>1 T given in Fig. BANG
CAPUCTTOH
2. Tappings TAPWBS
•RffffiTEXT
on the coil ■: For & 2-6.3 MHs (SO Him from gromd «1}
b:For S.7-7.2 MHz (40 bm» from amnd *nd)
allow selec¬ a For 6.8-5-ft kHz (30 turns bon pound md)
Fig. 1: Circuit of multiband CW transmitter tion of the d: Rr SO-1OS MHz (2S turn from pomd and)
o: For 11.3-12.7 MHz (20 burn from pound ond)
required f: Pdf 13.3-11X1 MU (is tun* Iran gromd md)
L: so nm* ot 220W3 cow Wr» etodtfy wouidm
frequency oscillations, which are known band. The frequency can be varied using AN'PVCUM
as carrier waves. Here’s a continuous- C2 (main tuning) . Bz Spots rotary MMI
wave (CW) transmitter for transmitting On reducing turns of the coil (using
fig. 2: Details of the inductor
Morse code signals in the shortwave band selector switch S2), the oscillator’s
(see Fig. 1). It is basically a variable frequency increases because frequency is For stable oscillations, use a polysty¬
frequency oscillator (VFO) whose fre¬ inversely proportional to inductance. rene capacitor as Cl. All other capacitors
quency can be varied from 5.2 MHz to Capacitor Cl couples the signal from may be ceramic disk type. Enclose the
15 MHz. The signal can be received in the tank circuit to the base of transistor circuit in a metal box for better
the shortwave band by any radio re- T1 (2N2222). Transistor T1 provides shielding.

124 | ELECTRONICS FOR YOU | JANUARY 3001


CIRCUIT IDEAS

PROGRAMMABLE TIMER ./Sjfer


FOR APPLIANCES
MITESH P. PARIKH the help of rotary switches S2 and S3. off. In the cyclic mode, this process re¬
The circuit works in two modes: off mode peats again and again.
and cyclic mode. Slide switch S4 is used The circuit is built around three quad

T
his programmable timer is useful
for domestic, commercial as well for mode selection. two-input NAND gate ICs CD4011 (IC1,
as industrial applications. It auto¬ In the off mode, the appliance turns IC3 and IC5), two 14-bit binary ripple
matically turns the appliance on/off after on after a preset time (set by rotary switch counters CD4020 (IC2 and IC4) and a re¬
a preset time, The time period can be S2), remains on for another preset time lay driver transistor (Tl). It works off a
varied from 8 seconds to 2 hours with (set by rotary switch S3) and then turns 12V DC, 500mA power supply. You can

X
IC1 (N1-N3) CD4011

ra T Cfi
1000M
a:
+ 61
ONAOFFBWTTCH
+12V

|U 18
7
08 188FC-
36V
X RL1
10 8
Q8 328EC. D1
. * 2JK
Q7 1MN.
1N4007

“fUSBSI || 08
Q8 2MN.
4MN.
APPLIANCE
HLI- 12142000
m CD4020 Q10 8MN. 62 lOOMUtf
R1 1M
4.7M
15 Tl
012 38MN.
C1
H 1 cwi

LED1
033M 2
8
Q13 1HR.
014 2HRS.
START
t
Rfi
rO
RI IK
rrri TIME
IK
I, I 1
& NB
3

-
82-83 ROTARY 8WTTCH

N7
i:
LED2
71 I . I

C3 T
0.01M T

10
18
7
04
08
08
8SEC.
IQSEC.
328EC.
i nr
OFFÿRTTOLEON
07 1MN. 84
8 SLIDE SWITCH
08 2MN.
\CA || 0» 4MN.
H4 CD4020 010 8MN. S3
RS IM
47M
15
VAX R Q12 32MN.
C4 1
Q13 1HR.
0.33M 2 ■a
IC3 (N4-H7) ■ CD4011 3
Q14 2HR8. t
K»(N8-N11) ■ CD4011 HOLD
R8 TIME
IK

FEBRUARY 2004 ELECTRONICS FOR YOU


CIRCUIT IDEAS

also power the circuit from mains by us¬ ond) is inhibited by the timing control tion slide switch S4 is towards off posi¬
ing a 12V DC, 500mA adaptor in place of circuit formed by NAND gates N6, N10 tion. The high Q8 output will inhibit the
the 12V DC power supply. and Nil. second oscillator via NAND gates N6, N10
Let’s assume that you want an appli¬ After 128 pulses (approximately two and Nil to stop clock pulses to pin 10 of
ance to turn on after two minutes and minutes) , the Q8 output of IC2 goes high IC4. Thus the relay is energised only once
keep it on for another two minutes. For to perform the following three functions: (for 2 minutes) since clock pulses to both
this set the rotary switches S2 and S3 to 1. Make the output at pin 10 of NAND IC2 and IC4 are stopped altogether and
positions as shown in the figure. gate N3 low via rotary switch S2, which their' outputs get latched.
Initially, whenpower switch S1is closed, inhibits the first oscillator In case the mode-selector switch S4
a small charging current pulse through 2. Energise relay RL1 via NAND gates is towards ‘cycle on’ side, clock pulses to
capacitors C2 andC3 resets both thecounters N8 and N9 and relay driver transistor T1 IC4 would continue and the relay is alter¬
(IC2 and IC4) to make all their outputs (Q4 to make appliance ‘on’ nately energised and de-energised for two
through Q14) low. The high output at pin 3. Make the output at pin 10 of NAND minutes each. This continues until the
10 of NAND gateN3 starts thefirst oscillator gate N10 low, which is connected to the circuit is switched off and started again,
comprising NAND gates N1 and N2, which inputs of NAND gate Nil to make its or the mode-selector switch is slided to¬
provides clock pulses to IC2 at the rate of output at pin 11 high. This high output is wards ‘cycle off side.
one pulse per second. The glowing of red further connected to the input (pin 1) of Rotary switch S2 is used for start
LED (LED1) indicates that this oscillator is NAND gate N4. time selection and rotary switch S3 is
working well and timer is 'on.' Now the second oscillator starts os¬ used for hold time selection. The start
During the first 2 minutes, relay RL1 cillating and provides clock pulses to pin and hold time can be increased up to 24
remains de-energised by the control cir¬ 10 of IC4 at the rate of one pulse per hours by changing the values of R and C
cuit formed by NAND gates N7, N8 and second. components of the oscillator circuit of
N9 and LED2 is off, which indicates that Now, after 128 pulses (approximately first and second oscillator.
the appliance is in ’off’ codition. The sec¬ two minutes) , the Q8 output of IC4 goes For heavier load, use a relay of a higher
ond oscillator built around NAND gates high. This de-energises the relay via current rating. The circuit can be made on
N4 and N5 (which provides clock pulses NAND gates N7 and N9 and relay driver a multipurpose PC,B and put in a plastic or
to IC4 at the rate of one pulse per sec¬ transistor Tl, provided the mode-selec- metal cabinet with proper ventilation.

I ELECTRONICS FOR YOU FEBRUARY 2004


CIRCUIT IDEAS

ANTI-BAG-SNATCHING ALARM
D. MOHAN KUMAR the voltage at the non-inverting input is
higher than at the inverting input and the
%
QC3) gets the supply voltage at its pin 5.
IC UM3561 is a complex ROM with

H ere is a simple alarm circuit to


thwart snatching of your valuables
while travelling. The circuit kept
in your bag or suitcase sounds a loud
output of IC1 is high.
The output from pin 6 of IC1 is fed to
triggerpin 2 of IC NE555 (IC2) via coupling
capacitor Cl (0.0047 pF). 1C2 is configured
an inbuilt oscillator. Resistor R8 forms
the oscillator component. Its output is fed
to the base of single-stage transistor am-
plifier BD139 (Tl) through resistor R9 (1
alarm, simulating a police horn, if some- as a monostable. Its trigger pin 2 is held kilo-ohm) .

FRO MT VIEW

A
BDItt

ITT
ECS
R1
TOOK

1
RS
100K

S4
fU
10K

Cl
OrXKTtl
RE
IBM

10M|_
fiii

tea
<3
DJXK7|J

R7
3301
n
7
RE
22WC

IC3
*

S'fcAKfcH

s
RB
5 SI If
CNCFF W
SWITCH'

7
NE6S6
3

1
Uhl3561
2 4
BIN
At
MOHOPUJG R3
1D0K
C2 +L
A.7u '-p i
ZD1
k 3.8V
SHORTED •lev 300 mW
LEADS MONOJACK
SOCKET

one attempts to snatch your bag or suit¬ high by resistor R4 (10 kilo-ohms). Nor¬ The alarm tone generated from IC3 is
case. This will draw the attention of other mally, the output of IC2 remains low and amplified by transistor Tl. A loudspeaker
passengers and the burglar can be caught the alarm is off. Resistor R6, along with is connected to the collector of Tl to pro¬
red handed. capacitor C3 connected to reset pin 4 of duce the alarm. The alarm can be put off
In the standby mode, the circuit is IC2, prevents any false triggering. Resistor if the plug is inserted into the socket
locked by a plug and socket arrangement R5 (10 mega-ohms), preset VR (10 mega¬ again. Transistor Tl requires a heat-sink.
(a mono plug with shorted leads plugged ohms) and capacitor C2 (4,7 pF, 16V) are Resistor R7 (330 ohms) limits the cur¬
into the mono-jack socket of the unit). timing components. With these values, the rent to IC3 and zener diode ZD1 limits
When the burglar tries to snatch the bag, output at pin 3 of IC2 is about one minute, the supply voltage to IC3 to a safe level
the plug detaches from the unit’s socket which can be increased by increasing ei¬ of 3.3 volts. Resistor R9 limits the cur¬
to activate the alarm. ther the value of capacitor C2 or preset VR . rent to the base of Tl .
The circuit is designed around op-amp When there is an attempt at snatch¬ The circuit can be easily constructed
IC CA3140 (IC1), which is configured as ing, the plug connected to the circuit de¬ on a vero board or general-purpose PCB .
a comparator. The non-inverting input taches. At that moment, the voltage at Use a small case for housing the circuit
(pin 3) of IC1 is kept at half the supply the inverting input of IC1 exceeds the and 9V battery. The speaker should be
voltage (around 4.5V) by the potential voltage at the non-inverting input and sub¬ small so as to make the gadget handy.
divider comprising resistors R2 and R3 of sequently its output goes low. This sends Connect a thin plastic wire to the plug
100 kilo-ohms each. The inverting input a low pulse to trigger pin 2 of IC2 to and secure it in your hand or tie up some¬
(pin 2) of IC1 is kept low through the make its output pin 3 high. Consequently, where else so that when the bag is pulled,
shorted plug at the socket. As a result, the alarm circuit built around IC UM3561 the plug detaches from the socket easily.

FEBRUARY 2004 ELECTRONICS FOR YOU


CIRCUIT IDEAS

MOBILE CELLPHONE CHARGER


D. MOHAN KUMAR cells gives sufficient
%
current (1.8A) to LED Status for Different Charging Conditions

C harging of the cellphone battery is charge the battery con¬ Load across the output
a big problem while travelling as nected across the out¬
power supply source is not gener¬ put terminals. The cir¬ No battery connected
ally accessible. If you keep your cellphone cuit also monitors the
switched on continuously, its battery will voltage level of the bat-
chÿin§ bauerV
batteW
Output frequency (at pin 3)
765 kHz
4.5
0
Hz
LED 1
On
Blinks
Off
go flat within five to six hours, making tery. It automatically
the cellphone useless, A fully charged bat¬ cuts off the charging process when its out¬ to take output pin 3 high, When the battery
tery becomes necessary especially when put terminal voltage increases above the is fully charged, the output terminal voltage
your distance from the nearest relay sta¬ predetermined voltage level. increases the voltage at pin 2 of IC1 above
tion increases. Here’s a simple charger that Timer IC NE555 is used to charge and the triggerpoint threshold.Thisswitches off
replenishes the cellphone battery within monitor the voltage level in the battery. the flip-flop and the output goes low to
two to three hours. Control voltage pin 5 of IC1 is provided terminate the charging process. Threshold
Basically, the charger is a current-lim- with a reference voltage of 5,6V by zener pin 6 of IC1 is referenced at 2/3Vcc set by
VR1. Transistor T1 is used to enhance the
charging current. Value of R3 is critical in

J R1
3000
R7
’Sw ——
1 Q-
L C2 “"TI
X0-0* 6L1Q0
providing the required current for charging .
With the given value of 39-ohm the charg¬
ing current is around 180 mA,
OWOFF
SWITCH FU M The circuit can be constructed on a
R3
;»K S.3K small general-purpose PCB . For calibration
3KV1W of cut-off voltage level, use a variable DC
a
1JVx8
Wf
A* CELLS
+ Cl I
ZZi-TV
23V
IC
* NEWS «
U VR1
2QK
SI »
CELLPHONE
power source. Connect the output termi¬
nals of the circuit to the variable power
VR2 BATTEHY supply set at 7V. Adjust VR1 in the middle
20K
t position and slowly adjust VR2 until LED1
RE
ZD1 4 k :+7K goes off, indicating low output. LED1
1J8V should turn on when the voltage of the
LED11 &

I0001
variable power supply reduces below 5V.
Enclose the circuit in a small plastic case
and use suitable connector for connecting
ited voltage source, Generally, cellphone diode ZD1. Threshold pin 6 is supplied to the cellphone battery.
battery packs require 3.6-6V DC and 180- with a voltage set by VR1 and trigger pin Note. At EFY lab, the circuit was tested
200mA current for charging. These usually 2 is supplied with a voltage set by VR2. with a Motorola make cellphone battery
contain three NiCd cells, each having 1,2V When the discharged cellphone battery rated at 3,6V, 320 mAH. In place of 5.6V
rating. Current of 100mA is sufficient for is connected to the circuit, the voltage given zener, a 3 .3V zener diode was used. The
charging the cellphone battery at a slow to trigger pin 2 of IC1 is below l/3Vcc and charging current measured was about 200
rate. A 12V battery containing eight pen hence the flip-flop in the IC is switched on mA.The statusof LED1 is shown in the table .

I ELECTRONICS FORYOU MARCH 2004


CIRCUIT IDEAS

SMART FOOT SWITCH


JAYAN A.R. two flip-flops are cross-connected, i.e.
% also connected to dear input CLR2 of
CLK1 (pin 1) is conneted to CLR2 (pin 8) flip-flop 1C1(B) so as to clear it asynchro¬
uch jobs as jewel cutting and polish¬ and CLR1 (pin 3) is connected to CLK2 ( nously. Switch debounces don’t affect the

S ing require the workers to switch on/


off two electrical applianoes one af¬
ter another repeatedly for two different ser-
pin 6), Clock input pins 1 and 6 are pulled
up high through resistors R1 and R4 (each
4.7k), respectively.
drcuit as the same J1 state is being trans¬
ferred to Q1 output on succeeding trailing
edges. At the same time, device 2 is

a
+5V +12V
.£go-rÿrn-
► R1
>4.7K
R2
10K
R3
22on
gR4
54.7K
R5
10K
R8
2200
R7
10K
1 16
wc
RL1
2
y 16

J1 +Vcc
4 6
IP
2
RE1 J2
9
PRE2 I 7
3 14

Q1 Q2 4 13
15 11

1 IC1 (A) LED1


e IC1 (B) LED2
6

14 31 10 6 11 NO
|DEV2|
16 13 3 12 8
1' V/r-M 7 10

■w
N/C
K1 GND Ycmi K2 9
8 RL2
L N
tC2 230V AC

■4
50Hz
H S1 S2 ULN 2003 RL1-RL2 = 12V, 2000
100 RELAY
M
I 1 J .
IC1 = 74LS76
S1-S3 PUSH-TOON SWITCH

vices on the same workpiece. This is cum¬ Push-to-on switches SI and S2 are con¬ switched off.
bersome as they need to fully concentrate nected between dock and ground of the When switch S2 is pressed, flip-flop
on delicate handwork on precious jewels. flip-flops. Switch SI activates device 1, IC1(A) gets cleared via CLR1 and the high
Switching in such situations cannot be while switch S2 activates device 2. Switch state of J2 input of flip-flop IC1(B) is trans¬
done by hand, and doing it by foot using S3 activates both device 1 and device 2 ferred to its Q2 output on the trailing edge
ordinary switches is too tedious. This is simultaneously. Device status is indicated of clock (CLK2). This high level (logicl)
mainly because of the difficulty in sensing by LED1 and LED2. Glowing of LED1 and activates relay RL2 through pin 15 of IC2,
and controlling the switch position by foot. LED2 indicates that device 1 and device 2, turning on device 2 via its N/O contacts.
Ordinary pushbutton switches make or respectively, are in on condition. The LEDs At the same time, device 1 is switched off.
break a contact momentarily, and they can¬ are connected from +SV to"Ql (pin 14) Now if you want to turn on both the
not hold the keypress status. You need a and Q2 (pin 10) of IC1 through resistors devices simultaniously, press switch S3
bistable multivibrator with two indepen¬ R3 and R6, respectively. momentarily. Switch S3 provides ground
dent trigger inputs to solve this problem. Initially when the power supply is to preset inputs PRE1 and PRE2 of flip-
Here’s a smart foot switch based on switched on, Q1 and Q2 outputs of the JK flops IC1(A) and IC1(B), making their Q1
dual negative-edge triggered master slave flip-flops are at low level (logic 0). When and Q2 outputs high, which energises
JK flip-flop 1C 74LS76 (IC1). J1 and J2 switch SI is pressed for the first time, the both the relays turning on the two de¬
inputs are conneted to SV through resis¬ high level (logic 1) present at J1 input is vices. LEDs glow to indicate that both the
tors R2 and RS (each 10k), respectively. transferred to Q1 output on the trailing devices are ‘on.’
K1 and K2 inputs are grounded. Preset edge of clock (CLK1). The high level Place all the three switches (SI through
pins 2 and 7 are shorted and connected to (logic 1) at Q1 activates relay RL1 through S3) where you can easily press them by
5V via resistor R7 (10k). Push-to-on switch pin 16 of 1C ULN2003 (1C2), turning on foot when required. The LEDs can also be
S3 connected to the preset inputs is also device 1 via its normally-opened (N/O) mounted at a convenient location to know
grounded. Clock and clear inputs of the contacts. Clock CLK1 of flip-flop IC1(A) is whether the devices are turned on.

I ELECTRONICS FOR YOU I MARCH 2004


CIRCUIT IDEAS

LOW-COST ELECTRONIC QUIZ TABLE


VINOD C.M. be ‘on’ after a particular competitor has
pressed the pushbutton. These timings
%
connected in parallel to bulb BL1 sounds
for the preset time. At the same time, ca¬

H ere is a simple, low-cost quiz table


for four game participants. It de¬
termines the contestant who first
presses the switch (SI through S4) to
can be set by presets VR1 through VR4 as
required,
The circuit works off 12V, 1.5A power
supply, The current rating of the power
pacitor Cl charges up to 12V, which then
discharges through preset VR1. The dis¬
charging time of capacitor Cl is decided
by preset VR1 . For example, if preset VR1
answer a question and locks out the re¬ supply should be according to the load is set for a resistance of 4.7k, it will give a
maining three entries. Simultaneously, the (wattage of bulbs). For higher-wattage delay of approximately 4 seconds, mean-

m
woa
6isi
PZ1 WOft m\m 1 R4
won PZI
+1ZV

or TI
0|S3
or ™ » 9ÿ TJ
I4 mo
FRONT VIEW
o
.gun Ql
2LJn

-Kfl 5s It it
a s & 1» s Dll
14 IRF
dÿs 44?
,VTC» +1 G2
-r-4711 _47|l
-Mn 44s D12 144

I SDK
Xs" IS 26V

ODS
T1-T4 > RFZ44
D1-D11-1N400T
Si-84- PUSH-TOON SWITCH
BE1-BH •PIEZtFBUZZER

OL1-BL4 12V, 15W BULB QND

Fig. I: Schematic of low<ost electronic quiz table


ing that buzzer
PZ1 and bulb BL1
FWHTlCinWA PAHTTCIPANTB FwrnawwTC RAFTTORWT D will be ‘on’ for 4

Si
©
PZ1
a BULB 2'

P22(g)
3
83
BULBS'

PZS
3 84
BULB 4 1

™(o)
seconds. It also
indicates that par¬
ticipant A is the
first to press his
TABLE 1 TABLE2 TABLE3 TABLE 4 switch. Even if
any other partici¬
pant say, partici¬
pant B, presses
CnCtJTTBGK switch S2 after
participant A has
already pressed
switch SI, buzzer
Fig. 2: Set-up for electronic quiz table PZ2 and bulb BL2
will not function
respective audio alarm sounds and the bulbs, use power supply of a higher cur¬ since MOSFET T2 has no gate voltage to
bulb glows. The quiz table can be used rent rating. trigger because it is grounded through R2
for more number of contestants simply by If participant A presses switch SI, and Dl.
adding buzzers, bulbs, MOSFETs and di¬ MOSFET Tl is triggered and the corre¬ The same principle applies for other
odes. Besides, it provides an option for sponding bulb BL1 (connected between contestants as well. Instead of bulbs, you
varying the time for which an individual drain of the MOSFET and 12V supply) can also use a group of LEDs, Fig, 2 shows
buzzer and the corresponding bulb should glows and simultaneously piezobuzzer PZ1 the set-up for electronic quiz table.

I ELECTRONICS FORYOU APRIL2004


CCOON SNTSR UT CRT U
I OCN T I O N

VOICE RECORDING AND PLAYBACK SUN


IL KU
MAR

USING APR9600 CHIP OTi

K. KRISHNA MURTY of a proprietary analogue storage technique PARTS LIST


implemented using flash non-volatile Semiconductors:

D
igital voice processing chips with memory process in which each cell IC1 - APR9600 voice processor
different features and coding tech- is capable of storing up to 256 voltage IC2 - LM386 low-power audio
niques for speech compression and levels. This technology enables the amplifier
processing are available on the market APR9600 to reproduce voice signals in their T1-T3 - BC557 pnp transistor
from a number of semiconductor manu- natural form. D1 - 1N4001 rectifier diode
facturers. Advanced chips such as Texas The APR9600 is a good standalone LED1-LED3 - Red LED
instruments’ TMS320C31 can implement voice recorder or playback IC with non- Resistors (all ¼-watt, ±5% carbon, unless
various voice-processing algorithms includ- volatile storage and playback capability stated otherwise):
ing code-excited linear prediction, adap- for 32 to 60 seconds. It can record and R1, R2, R4-R8,
R16, R17 - 100 kilo-ohm
tive differential pulse-code modulation, A play multiple messages at random or in
R3, R10 - 390-ohm
law (specified by California Council for sequential mode. The user can select R9 - 220-kilo-ohm
International Trade), µ law (specified by sample rates with consequent quality and R11 - 1-ohm
Bell Telephone) and vector sum-excited recording time trade-off. Microphone am- R12(A) - 33-kilo-ohm
linear prediction. plifier, automatic gain control (AGC) cir- R12(B) - 5-kilo-ohm
On the other hand, APR9600 single- cuits, internal anti-aliasing filter, integrated R13, R14 - 4.7-kilo-ohm
chip voice recorder and playback device output amplifier and messages manage- R15 - 1-kilo-ohm
from Aplus Integrated Circuits makes use ment are some of the features of the Capacitors:
C1, C3, C4, C6,
o C8, C9, C11 - 0.1µF ceramic disk
/Strobe C2 - 4.7µF, 16V electrolytic
OscR ICE /RE o
o- Internal /Busy C5 - 22µF, 16V electrolytic
ExtClk Oscillator Multiplexer o C7 - 100µF, 16V electrolytic
o BE o
Device Control MSEL1 C10 - 0.47µF, 63V electrolytic
o C12 - 100µF, 25V electrolytic
MSEL2
o C13 - 100µF, 10V electrolytic
Ana_ln Anti-Aliasing Sample & Hold
o
Ana Out Filter Circuit Miscellaneous:
o
Analogue Write & Low-Pass S1-S9 - Push-to-on switch
Micln
Automatic Gain Read Circuits Filter S10-S12 - On/off switch
o Control (AGC) SP- LS1 - 8-ohm, 0.5W speaker
Pre> 256k Cell o
T
o
MicRef AmD Flash EPROM
Analogue Storage
Ampÿ> SP+ o
- Condenser microphone
Array
AGC
o
Message Decoders
APR9600 chip.
Fig. 1 shows the functional block dia-
gram of IC APR9600. Complete chip man-
Power Supplies Message Control
agement is accomplished through the de-
vice control and message control blocks.
I I I 1 A I i l l l t
/M1_Message /M2_Next/M3 /M4 /M5 /M6 /M7_END /M8_Option
I Voice signal from the microphone (see
VCC VCCA VSSDVSSA
Fig. 2) is fed into the chip through a dif-
Fig. 1: Functional block diagram of IC APR9600 ferential amplifier. It is further amplified
by connecting Ana_Out (pin
21) to Ana_In (pin 20) via
TABLE I an external DC blocking ca-
Modes Selection pacitor C1. A bias signal is
Mode MSEL1 MSEL2 /M8_Option applied to the microphone
and to save power during
Random-access, 2 fixed-duration messages 0 1 Pull this pin to VCC through 100k resistor playback, the ground return
Random-access, 4 fixed-duration messages 1 0 Pull this pin to VCC through 100k resistor of this bias network can be
Random-access, 8 fixed-duration messages 1 1 Becomes the /M8 message trigger input pin connected to the normally
Tape-mode, normal operation 0 0 0 open side of the record
Tape-mode, auto-rewind operation 0 0 1 switch. Both Mic.in and

ELECTRONICS FOR YOU SEPTEMBER 2004


CONSTRUCTION

Mic.Ref (pins 18 and 19)


must be coupled to the +5V 9
microphone network M1 Vcc
o o 1 28 -i '
through capacitors. S1 R4 R5 R6
M2 100K <100K>100K
Recording signal I f O O 2 27 RE
from the external source S2
M3
can also be fed r ( O O 3 Extclk
S3 26 1 -
1
1r
directly into the chip us- M4
a 4 25 MSEL2 R10
ing Ana_In (pin 20), S4 390Q
S12
but the connection be- M5 MSEL1
•r O O
S5
5 24 R7
tween Ana_In (pin 20) 100K
7/LED2
M6
and Ana_out (pin 21) r ( -O O 6 23 CE o o- RECORD
R12(A) S6 S9 OR
is still required for 33K OSCR
PLAY
playback. An internal r (
vwv-vwv 7
IC1
22
STROBE
A/WV
R12(B) R8 T2
anti-aliasing filter auto- ( r
O O-
5K M7-END
8
APR9600
21
100K BC557
'
matically adjusts its S7 C1 R9
M8-0PTI0N
response according to < — O O ITO.IM 220K

qn
1 9 20 R13
S8 4.7K
the sampling frequency R1 BUSY AGO
100K 10 19 C3
selected. Then the sig- C2 v
9+5V R2
4.7|J,16V
0.1M
nal is processed into 100K BE
11 18
MICRef
< <ÿ
'
the memory array +
through a combination
of the sample-and-hold
12 17
MICin

VCCA +5V
C4
0.1|J
COND.
MICD
circuit and analogue
T1
BC557
13 16
Hi R14
-< '

read/write circuit. The BUSY SP+ SP-


4.7K
14 15 r
1
incoming voice signals LED1
C6
+ C5 0.1 jj
are sampled and the in- R3 -1- C8
i '

390Q 22M
stantaneous voltage C7 -TO.1M 16V C14 R15
22M
samples are stored in the
non-volatile flash
1r
100M
16V
i ♦
X C11 ♦ i t
16V
1K

memory cells in 8-bit VR1 0.1M LS1


10K SPEAKER 8Q
binary encoded format. 2 4 R11 0.5W
1Q
During playback, the VOLUME C9 IC2 5 +
stored signals are re- C13 CONTROL 0.1M LM386
3 8
100M -t- C12
trieved from the 10V 1 220M
memory, smoothed to 6
25V

form a continuous D1
1N4001
signal, low-pass filtered ♦ C10
and then amplified. The 0.47M
63V
signal level at the
speaker terminals SP+ Fig. 2: Random-access mode configuration
and SP- (pins 14
and 15, respectively) is at about 12mW quirement and thus reduce the duration. fined as the delay present before the AGC
power into 16-ohm impedance. The out- Lower sampling rates use fewer memory circuit begins to adjust gain.)
put from pin 14 (SP+) is further ampli- cells and effectively increase the record- Message management. The APR9600
fied by the low-power amplifier using ing/playback duration of the device. The chip supports the following message
LM386 (IC2) as shown in the figure. The RC network (comprising resistor R9 and modes:
recorded message is reproduced into capacitor C2 connected) at pin 19 sets the 1. Random-access mode with 2, 4
speaker LS1. AGC attack time. (The attack time is de- or 8 messages within the total recording
An internal oscillator provides sam- time.
pling clock to the APR9600. The frequency TABLE II 2. Tape mode with two
of the oscillator and sampling rate Reference Rosc Values and Corresponding options: auto rewind and
depend on the value of resistor R12 Sampling Frequencies normal operation.
[R12(A)+R12(B)] connected across OSCR The modes are defined
Ref Rosc Sampling Input Duration
(pin 7) of the chip and the ground. by pins 24 (MSEL1), 25
frequency bandwidth
Table II shows the sampling frequen- (MSEL2) and 9 (/M8_Option)
cies corresponding to different resistor val- 84k 4.2 kHz 2.1 kHz 60 sec as shown in Table I, and can-
ues, as well as the resulting input band- 38k 6.4 kHz 3.2 kHz 40 sec not be mixed.
width and duration of recording. Higher 24k 8.0 kHz 4.0 kHz 32 sec An important feature of
sampling rates improve the voice quality Note. Rosc table above is for reference only, different lots of ICs will have the APR9600 chip is indica-
but they also increase the bandwidth re- somewhat different Rosc value performance tion of changes in the de-

SEPTEMBER 2004 ELECTRONICS FOR YOU


CONSTRUCTION

messages in random-ac-
cess mode is shown in
+5VO
M1 Vcc Fig. 2. Pins 9
O 1 28
S1 R4 (M8_Option), 24
100K
27
RE (MSEL1) and 25
S10 (MSEL2) are pulled high
26 ■4
V
through resistors R1, R6
MSEL2 and R5, respectively.
25 R10
R7 390Q
When switch S10 is
100K
24
MSEL1 closed, record pin 27
R12(A)
7/ LED2 (RE) goes low to enable
+5V 33K
O 23 O O—
S9
RECORD recording of the message
R12(B) OR
5K OSCR PLAY from the microphone.
7 22 A/WV The maximum length of
IC1 R8 T2
M7-END APR9600 100K BC557 the eight sound tracks is
8 21
T3 7.5 seconds each.
BC557 C1 R9
M8-OPTION
100K
9 20 ITO.IM 220K R13 Now to start record-
R1 4.7K
ing the first message,
O T1
BC557
A/VW-
R2 +5V
100K ?
100K BUSY

BE
10

11
19

18
C2 1 v
4.7M- 16V
C3
0.1(J press switch S1 and hold
it in this position. A
+ beep sound is heard and
COND.
12 17 C4 MIC LED2 blinks. You can
LED1 LED3 +5V
0.1M now speak into the con-
BUSY END i► 13 16 O
H denser mic. The record-
R14
AAA/V— •
SP+
14 15 4.7K ing will terminate if
R3
+ C5
C6 switch S1 is released or
390Q 0.1M
-1- C8
22M if the recording time ex-
C7 -TO.IM 16V C14 + Ll_
R15 ceeds 7.5 seconds. Simi-
22M
100M
16V
X C11
16V
1K
larly, press switches S2
through S8 to record
0.1M LS1 other sound tracks. For
4 SPEAKER 8Q
2 R11 0.5W recording of two or four
VOLUME 1Q
CONTROL C9 IC2 5 + sound tracks of fixed du-
0.1M LM386 ration, the status of pins
VR1 3 8
10K 4 C12
1 220M 9, 24 and 25 is as per
25V
6 Table I.
+5V9 D1 C13
1N4001 100M Playback of sound
16V
tracks. Open switch S10
>4 C10
0.47M
16V to make pin 27 high
while keeping other
Fig. 3: Circuit for recording/playback in tape mode with auto-rewind option switches in the same po-
sitions as in recording.
vice status through beeps superimposed transistor T1, which is connected to pin Toggling switches S1 through S8 causes
on the device output; for example, the 10 (Busy) of the chip. LED2 indicates playback of particular sound tracks. Press-
start of recording is indicated by a beep, recording in each individual memory seg- ing the same switch again or switch S9
so the person can now start speaking into ment. It is driven by pin 22 (strobe) terminates playback of the sound track.
the microphone. This feature is enabled through transistor T2. Pressing any other switch (S1 through S8)
by making pin 11 (BE) high. while a sound track is being played causes
General functional description. On a new sound track to be played. If the
Random-access mode
power up, pin 23 (CE) is pulled switch is held pressed, the particular sound
low through resistor R7 to enable the As mentioned earlier, the random-access track will play continuously.
device for operation. Toggling this pin by mode supports 2, 4 or 8 messages of fixed
switch S9 also resets several message durations. It allows easy indexing of mes-
Tape mode
management features. Pin 27 (RE) is sages as they can be recorded or played
pulled low to enable recording and randomly. The length of each message is The tape mode operation is much
it is pulled high for playback. To start the total recording length available (as de- like the conventional cassette tape
recording/playback, switch the appropri- fined by the selected sampling rate) di- recorder, but with auto-rewind and normal
ate trigger pin as described later. Glowing vided by the total number of memory seg- operation options. In auto-rewind mode,
of LED1 indicates that the device is ments/tracks enabled (as per Table I). the device automatically rewinds to the
busy and no commands can be currently Recording of sound. The circuit for beginning of the message immediately after
accepted. The LED is driven by pnp recording/playback of eight fixed-duration recording or playing the message. In nor-

ELECTRONICS FOR YOU SEPTEMBER 2004


CONSTRUCTION
RECORD
OR +5VO Playback in tape
PLAY M1 Vcc
+5V 1 28 J t mode with auto-rewind
O S1 R4
option. Open switch S10
AAA/V
M2
2 27
RE 100K *
R17
100K
>— O
S13
2
SKIP
26

MSEL2
S10 to pull pin 27 high while
keeping other switches in
the same positions as ap-
25 R10 plicable during recording.
R7 390Q
BE MSEL1 100K Toggle switch S1 repeat-
11 24
R12(A)
7/ LED2
edly to play consecutive
33K 23 4 L O RECORD sound tracks. Press
R12(B) S9 OR
5K OSCR PLAY switch S9 to reset the
11 7 22 AA/W sound track counter to
IC1 R8 T2
M7-END APR9600 100K BC557
-►
zero. During playback,
8 21
T3 R16 R9 LED3 indicates that all re-
BC557 100K M8-OPTION
9 20 J~o% 220K R13
4.7K
corded messages have
been played.
(j AAA/V
R2
BUSY
10 19
C2 1 v
C3
0.1M Recording in tape
T1 4.7M, 16V
BC557 100K
18
mode with normal op-
+ tion. Fig. 4 shows the

LED1 LED3
12 17
+5V
C4
0.1M
COND.
MIC
D circuit for recorcding/
playback in tape mode
BUSY END 13 16 Hi ►
with normal option. Con-
R14
SP+ nect pins 24 (MSEL1), 25
AAAArÿ 15 4.7K
' 14
C6
R3
+ (MSEL2) and 9
3900
C8

22m
C5 0.1M ►
(M8_option) to ground.
C7
+ — T“0.1M *-p16V C14 R15
22M Close switch S10 to en-

100M
16V
Xi ♦
16V "j" 1K
able the recording of
I
I L ■ *ÿ

-1- C11 message. Press switch S9


0.1M LS1
4 SPEAKER 80 to reset the sound track
2 R11 0.5W
VOLUME
C9 1Q counter to zero. The nor-
CONTROL
0.1M IC2 5 + mal-mode recording is
VR1 LM386

5h
3 8
10K C12 similar to the rewind-
1 220M mode recording, except
25V
C13 6
HH
I that after swich S1 is re-
+5V D1
1N4001 100M
f
[+ 10V C10 leased, the sound counter
0.47M, 63V
doesn’t increment itself to
Fig. 4: Circuit for recording/playback in tape mode with normal option the next sound track lo-

mal mode, it must be switched for rewind.


Sound recording in tape mode with
auto-rewind option. Fig. 3 shows the cir-
*
cuit for recording/playback in tape mode
with auto-rewind option. In this configura-
tion, pins 24 (MSEL1) and 25 (MSEL2) are
connected to ground, whereas pin 9 is pulled
So
ifiSjj
bVs
high through resistor R1. Close switch S10
to enable the recording of message. Press
switch S9 to reset the sound track counter
to zero. Now press switch S1 and hold it in
this position. A beep sound is heard and
>
l
mm O
S »4

LED2 starts blinking. This means you can

i fi
speak into the mic. Recording will termi-
nate when switch S1 is released or if the
recording time exceeds 60 seconds. Press r
switch S1 again and again to record sec-
ond, third, fourth and other consecutive
sound tracks. Each sound track may have a r/s (i
different length but the total length of all
sound tracks cannot exceed 60 seconds.
KsÿTl
When LED3 lights up during recording, it
indicates the end of memory array. Fig. 5: Combined actual-size, single-side PCB for circuits of Figs 2, 3 and 4

SEPTEMBER 2004 ELECTRONICS FOR YOU


CONSTRUCTION

press switch S1 without toggling switch

+
3

Ld
z
Id

CJ
(J
CO

QQ

U-
>
a

o
\

Q
ex
LD
S13 to record the message, the message

LD CL
O
/A

CD
CN

o
CtLO

ex

Ld

VO O
i-
CD
CD
will be recorded at the location of the

<HNC
-ÿCO'
C-iCO'

©
ce. >1001
-O ft
>->
cn

owo
first message.


?

O co O
o_o
N

Q“

°ÿ0ÿ®
s*-
Playback in tape mode with normal

ft
Ld
ft ft CD
u
option. Open switch S10 to pull pin 27

CD r=T
$ ' CD 101
E
s
CO CD -I
UJ CN
high while keeping other switches in the

K
z>
vo,

(D.

CONI
same positions as during recording opera-

aQ ao_oo
°
CM

>1001
ex
CL
oc

VO
CO
CN

<E
o
o
tion. First, press switch S9 to reset the

3SIi_lJ IA

CJ
QCDID

VN03

™ CN03

£N00
ft
sound track counter to zero. Now mo-

*<=>
u

§9
uco S 21
mentarily press switch S1 to play the first

£o+
sound track. Momentarily pressing of

CO ■*-

oÿoJ£j[s| I®1»

-
ft
53

O
exo
o
switch S1 again and again will still play

ftÿXVft
.Oÿ
00000000000000
00000000000000

Qct
\

I
the first sound track. The sound track

3(Es

B
counter can be incremented to play the

+o
o

00
PLD
o
‘VSXS/ S\
next sound track by momentarily pressing

LD _l
VO
3
ID

i CD
©s?
m

K Ld Ld
a
oz
o-bt-o
ftAAÿft
switch S13.

<3
3 cou

s°-o Mn

loÿolloÿolloÿolloÿolloÿolloÿol
ID ft

O
CO
The combined actual-size, single-side

5u
VO |Q

3ÿ®znn
z
o
'J-
o

o
PCB for the circuits of Figs 2, 3 and 4 is

CM
ID

CN
CN

O
3
3

\
shown in Fig. 5 and its component layout

WZ~NW
o
.©.
m
J*9>

l
PoS calico a

\ÿJ
2 3JsC

..
CL

t
Ld
ex
«

CJ
Ld

>
>

=>
CL
CL

<c
Ld

r* °©° °©° °©° °©° °0° °©/n


CO

u
u

u
<£4-o
in Fig. 6.
To obtain the configuration of Fig. 2,
Fig. 6: Component layout for the PCB connect connector Con1 to Con2 using
burgstick connectors with ribbon cable or
cation. To record the first sound track, S1 and toggle switch S13. Now press simply using jumper wires. Similarly, con-
press switch S1 and hold it in this posi- switch S1 again and hold in this position. figuration of Fig. 3 or Fig. 4 can be
tion. A beep sounds and LED2 blinks. A beep sounds and LED2 blinks. This realised by connecting Con1 to Con3 or
Now you can speak into the microphone. means you can speak into the micro- Con4. Note that switch S1 is common for
To record the next message, release switch phone to record the message. In case you all configurations. ❑

ELECTRONICS FOR YOU SEPTEMBER 2004


CIRCUIT IDEAS

HIGHWAY ALERT SIGNAL LAMP


D. MOHAN KUMAR

H ere is a signal lamp R9 +1ZV


FU
HI HZ RS 1 600
for safe highway aac 4.7K ZfiK
100n;
T3
driving. The lamp
automatically emits bril¬ 4 9 9


liant tricolour light when a R» H7
vehicle approaches the rear IC1 9 10K 33K IC2
e

m
9
sideofyourvehide. It emits NEE6G 4 NE566
T2 e R10
light for 30 seconds that BOW won:
E
turns off when the ap¬ a s ! LED#'
L14F1
proaching vehicle over¬ R4
takes.The ultra -brightblue, tL ci
2SV
TC2
OUIM
4000
zsv
XL D.D1|I
]
1
LED7 A'.'li
5jp LEO.
ii
*
white and red LEDs of the
signal lamp emitvery bright
light to alert the approach- Fig. 1: Circuit diagram of highway alert signal lamp

BOTTOM VIEW FRONT VIEW ing vehicle’s nected to trig¬ level, This activates astable IC2, which
0FL14F1 0FL14F1
driver even ger pin 2 of
• • R switches on and off the LED chain alter¬


during the day, B B IC1, which is nately. The intermittent flashing of LEDs
giving addi¬ W w •
• • w normally kept gives a beautiful tricolour flashlight effect.
tional safety high by resistor The circuit can be easily co nstructed on
during night, or t % Rl. a small piece of general-purpose PCB. Fig.
when you need When 2 shows the bottom and front views of
Fig. 2: Pin configuration to stop yourve- Fig. 3: Suggested headlight from Darlington phototransistor L14F1 , The pro¬
hicle on side of arrangement of LEDs an approaching posed arrangement of LEDs, which are sol¬
the highway, The circuit saves consider¬ vehicle illumi¬ dered in a circular fashion on a general-
able battery power. nates the phototransistor, it conducts to purpose PCB, is shown in Fig. 3. Use a
The circuit is built around two timer give a short pulse to IC1, and the output circular reflector for the LEDs to get brighter
ICs NES55 (IC1 and IC2). IC1 is designed of IC1 goes high for a period determined light. Fix the LED arrangement on the rear
as a standard monostable, while IC2 is by resistor R2 and capacitor Cl , The out¬ side of yourvehicle, and the phototransistor
designed as an astable. Darlington put of IC1 is fed to the base of transistor where it is illuminated directly by the head¬
phototransistor L14F1 (Tl) is used as a T2 via resistor R3 . Transistor T2 conducts light of the approaching vehicle, 12V DC
photosensor to activate the monostable. to drive transistor T3 and its collector goes supply to the circuit, can be provided by
The collector of phototransistor Tl is con¬ high to take reset pin 4 of IC2 to high your vehicle battery with proper polarity.

I ELECTRONICS FORYOU APRIL2004


CIRCUIT IDEAS

CHILD'S LAMP
D. MOHAN KUMAR gate 2 (comprising input
pins 5 and 6 and output pin
ere is a mini emergency lamp that m

H 1K 1 T2 4) of IC1. Gate 2 serves as a


BC54-7

to
you can use as a tabletop lamp in R3 buffer to drive the white
your child’s study room. It is bat¬ 100ft OWOFF/
SWITCH T
LED (LED1).
tery-operated and gives sufficient light for For the given values of
the child to move out of the room when
1 TTt I 3
LDR1 LED1 resistor R2 and capacitor Cl,
power fails. The white LED in the circuit
14 13 12 9 8
1 J 111!I'M"!
9V
BATT. — the flashing rate of LED1 is
automatically turns on when light in the
room goes off following a power cut. The
V rCtt
BC547
A hJ414d
D1
i
+C1
one per second (1 Hz). It
can be increased by decreas¬
LED gives a flashing light instead of glow¬ 22m ing the value of capacitor
1BV
ing continuously to reduce power con¬ VR1 R2
1Q0K<
|| R4
< 10K
Cl. Pin 14 of IC1 is Vccand
sumption. all the unused input pins are
The circuit comprises a light sensor tied to the positive rail (pin
and an LED flasher designed around CMOS 14) to prevent floating.
IC CD4093 (IC1). The light sensor switch IC1 The circuit can be con¬
comprises a light-dependent resistor (LDR) CD4093 structed on a small
and npn transistors T1 and T2. When am¬ veroboard. Use a reflective
bient light is present, the low resistance of holder for LED1, which
LDR1 drives transistor T1 into conduction. and 2 and output pin 3). The oscillator’s should be directed downwards at an angle
This keeps transistor T2 cut-off due to low external components comprise resistor R2 of 45 degrees to prevent direct viewing of
base bias. The flasher circuit does not get and capacitor Cl. Diode D1 and resistor LED1 which gives a high-intensity light
power as long as ambient light falls on R4 help in rapid charging of capacitor Cl. that is harmful for eyes. Preset VR1 can be
LDR1. When the resistance of LDR1 be¬ When capacitor Cl charge to around 50% adjusted to control the sensitivity of LDR1.
comes high in darkness, transistor T1 stops of Vcc, output of gate 1 of IC1 goes low to You can enclose the circuit in a plas¬
conducting and transistor T2 starts con¬ discharge capacitor Cl. The output from tic doll with LED1 as its headlamp to
ducting to turn on the LED lamp. pin 3 of 1C1 again goes high to charge make it an attractive gadget for your child.
IC1 is designed as a simple oscillator capacitor Cl again. This cycle repeats and Mount LDR1 such that ambient light falls
using its gate 1 (comprising input pins 1 sets up an oscillation, which is given to on it directly.

MAY 2004 I ELECTRONICS FOR YOU


CIRCUIT IDEAS

WATCHMAN WATCHER
JAYAN A.R.
%
an instruction to register his presence by the circuit are connected across optocoupler
simply pointing his torch-light beam to¬ MCT2E (IC1) through a resistor-capacitor

H
ere is a circuit that can be used in wards a wall-mounted LDR sensor unit (Rl-Gl) combination. The diode in the
offices, stores, warehouses, etc dur¬ (without lifting the handset off-cradle of optocoupler conducts only during
ing night to check whether the the ringing telephone). This is to be done ring pulses. The collector of the optocoupler
watchman of your establishment is on duty. within the time period during which the transistor is normally off and a SV signal is
For operation, it uses an existing telephone alert lamp glows. If he fails to do it within available here. This signal is connected
(e.g. in office or store) closest to the the permissible time, the circuit registers to the trigger input of 1C SSS (IC2) config¬
watchman’s post. The watchman is given his absence by incrementing a count. If he ured in monostable mode. The time con¬
an audio alert signal by just ringing the does, the count remains unaltered. stant of IC2 is set to nearly one minute
office/store telephone once (minimum) Up to nine separate alert rings are con¬ (l.lRxC). Its output pin 3 is low during
from your residence or any other place, sidered here. The count displayed is the normal mode of operation and the relay is

e
+6V WO, R12
01
R2 4701
Cl IOK;
IN4001J
N/C 230V, SOW
<U7|j m BULB
R3
RING 1B0V RL1
1 T
4 8
3
Q/P 1K

T1
®u ALERT
DIS BC54S LAMP 10 4f
■> 6
IC2 9
e
TIP 555 Dm 3
IC1 THR RL1=SV,100fl LTS51 2
R4 1C/0 RELAY c
MCT2E 2.2K*
OR 4
L N SP550 b
e »
Si+
16V

5
~| CAJ+
230V AC
60Hz
7

C3 -L 1|I-T~
MJ"
0.01 18V
81 •TACTILE SWITCH

-I- C8
-r- 0.1|j
RIO
rm 1
R5
|2_2K
RB:i
IQK* ; BOO | N3N | N2N Nlÿ
1 2200
— T°si°
R13»

RB R
1K_|_
-i-
220n R11

Wjp
220H 16 11 14 3 4 5 16
LED1
13
C7 QO b
VR2 UP
10K 1M. 16V 6 12
1 Q1_ c
IC5> 2 1 ICS 11

1OD3
d
I7 ice
3
O/P
6
Wf
DN
4 IC7 03
8 4
8
74LS4710
9
6
555 R8 74LS1927 1
2200 1S
it 7
14 J.
16 1 10 9 S
1 5
C5 tL
LDR1 103 (N1-N3) = 74LS14
-
IC4 (M4-M6) 74LS00
1000M ~
16V X ce
ICS = LM358 -jÿ0.01|l

preferably using your mobile phone. The number of times the watchman failed to de-energised.
ring is detected by the given circuit and the register his presence. The mobile phone When the phone rings, the internal
watchman is also given a visual alert signal records the called number and call time, transistor of the optocoupler conducts to
by a glowing lamp. The lamp remains ‘on’ and it can be used with the displayed count cause a high-to-low transition at trigger
for a duration of nearly 60 seconds soon to get the timing details. pin 2 of monostable IC2. Timer IC2 gets
after the ringtone. The watchman is given The telephone lines (TIP and RING) in triggered on this trailing edge to energise

ELECTRONICS FOR YOU


I MAY 2004
CIRCUIT IDEAS

Mode-Select Table of 74LS192 the torch is used as a re¬ If LDR1 receives light from the torch
mote for triggering of the watchman within the allowed time
MRpin 14 PL pin 11 UPpin5 DNpin4 Mode monostable IC6 and this period, the down clock remains high until
H X X X Reset triggering is enabled only the up clock is high. The counter counts
L L X X Preset when alert lamp LI is up and then down, so, in effect, the count
L H H H No change ‘on.’ remains unchanged.
L H J" H Count up Monostable IC6 has All components, except LDR1, are kept
L H H _r Count down a time constant of nearly in a sealed cabinet with locking arrange¬
Note: X = Don’t care one minute (l.lRxC). It ment. Only LDR1 is wall-mounted and vis¬
is used to form a down ible outside. This is done to avoid manual
relay RL1. This relay is used to switch on clock signal for 4-bit up- /down-counter resetting of the counter. The circuit is to
alert lamp LI . The circuit doesn't respond 74LS192 (IC7). Counter IC7 has two sepa¬ be powered by a battery to avoid resetting
to additional bigger inputs for the set du¬ rate clocks for up and down counts (refer' of the count during power failure.
ration of the monostable. The caller may to the table). For correct counting, it needs The working procedure can be
cut the phone call after hearing ringback one clock line to be high during high-to- summarised as follows:
tone from the called phone. low transition of the other clock line. Oth¬ 1. Initially, when the power supply is
The sensor circuit formed using LDR1 erwise, it counts erratically. switched on, power-on-reset components
activates another monostable 555 (IC6). To operate counter IC7, the voltage C8 and R13 reset counter IC7 and the dis¬
LDR1 has a resistance of 2.2 kilo-ohms in levels and timings of the two clock inputs play shows ‘0.’
daylight, which drops below 50 ohms when (up and down) are to be properly adjusted. 2. Now dial the telephone number
torchlight beam falls on it. (An LDR of Both trigger inputs, i.e. up and down (where parallel system is installed) from
nearly 2cm diameter has been used in this clocks, are asynchronous. outside or from your mobile. For the first
circuit.) Comparator LM358 (IC5) compares The output of monostable IC2 is fil¬ ring, relay RL1 energises and alert lamp
the level set at pin 3 (nearly IV, set using a tered using capacitor C4 to remove un¬ LI glows.
10k pot) with the level at pin 2. wanted transitions and inverted using 3. When alert lamp LI is off, the
When no light is falling on LDR1, its Schmitt bigger inverter' 74LS14 (IC3). This counter is incremented by ‘1.’
voltage is above IV and IC5 has a low forms a signal with correct rising and 4. If the watchman focuses the torch¬
output at its pin 1. When light is falling on falling edges. The inverted signal from light beam on LDR1 within the glowing
LDR1, its voltage drops below IV and IC5 pin 6 of gate N3 is used as the up clock. time of alert lamp LI, the counter' first
output at its pin 1 becomes high. This low- Counter 74LS192 (IC7) is reset to zero counts up and then counts down and fi¬
to-high transition is NANDed with the out¬ state by making its reset pin 14 high through nally the display shows 0. This indicates
put of monostable 1C2 (via inverters gates reset switch SI. The 7-segment, common- that the watchman is present.
N1 and N2) to form the trigger signal for anode display DIS1 is driven through IC 5. If the watchman focuses the torch¬
monostable IC6. So the trigger input is 74LS47 (ICS) . When the phone rings, count light beam on LDR1 after alert lamp LI
normally high, which falls when torchlight T is displayed after nearly one minute. goes off, up-counting takes place and the
beam is focused on LDR1 . It returns to high This happens if the watchman fails to focus display shows ‘1.’ This indicates that the
state when torchlight is switched off. So the torchlight beam on LDR1. watchman is absent.

MAY 2004 ELECTRONICS FOR YOU


I
CIRCUIT IDEAS

CELL-PHONE-CONTROLLED dfr
AUDIO/VIDEO MUTE SWITCH
T.K. HAREENDRAN

:-:"1
+iw
his cell-phone-controlled audio/ FROM rin

T video mute switch is highly useful


in automobiles. The circuit auto¬
matically disconnects power supply to the
can
BATTERY
iw

-
RLI 13V. toon
-IQORHJOr

wo
i >i.-T i
81
SPST
SWITCH

audio/video system whenever the mobile


handset is lifted off the holder for making
M
im
5{!i
1
11*44007 WC
y*
RLI
-flfiV

7 R4
, IK

i
K1
T1 RS R#
SK100 IK IK

Cl +
ZD1

SNER
- i.
MV i
-A _ _
I LED1 ,1LDR1
S
LED2
"TO CAR
AUDOrYlDOO
9YSTEU

-an
LED1 o 0 LDR1 ■wv E3 E3
yo-aih
GW

I FfM LED& Fig. 2: The circuit of the cell phone-controlled audio/video mute switch
* *- video system is connected to the circuit LDR1 and its resistance decreases. As a
via normally opened (N/0) contacts of the result, the voltage at pin 2 of IC1 de¬
Fig. 1: Proposed ceW-pbone holder relay. creases to provide a high output at its
When the cell phone is in its holder, pin 3. The high output of IC1 deactivates
or receiving a call. You can use any readily LDR1 does not receive any light from relay RLI and the audio/video system
available cell-phone holder with some mi¬ white LED1 and its resistance is high. As does not get power supply. LED2 glows
nor alterations or fabricate it yourself as a result, the voltage at pin 2 of IC1 re¬ to indicate that the audio/video system
shown in Fig. 1. mains high to provide a low output at pin is 'off.'
The circuit is wired around IC LM555 3. The low output of 1C1 activates relay Preset VR1 is used to control the sen¬
(IC1), the CMOS version of timer NE555, RLI and the audio/video system gets sitivity of the circuit. Zener diode ZD1 is
as shown in Fig. 2. IC1 is used as a me¬ power supply via its N/0 contacts. LED3 used for protecting white LED1 from the
dium-current line driver with either an in¬ glows to indicate that the audio/video sys¬ higher voltage. The circuit works off a 12V
verting or non-inverting output It can sink tem is ‘on.’ car battery. Switch SI can be used to
(or source) current of up to 50 mA only, When the handset is taken off manually switch on/off the audio/video
so take care while handling it. The audio/ the holder, light rays from LED1 fall on system.

I ELECTRONICS FORYOU JUNE 2004


CIRCUIT IDEAS

PC-BASED DC MOTOR SPEED CONTROLLER Mi


R. KARTHICK The resistor network comprising pre¬ The software (speedM.c) is written in
sets VR1 through VR8, resistors R1 and ‘C’ language and compiled using Turbo C
compiler.

T
his circuit allows you to control the R2 and capacitor Cl are the timing com¬
speed of a DC motor (in eight lev¬ ponents of timer IC SS5 (IC4), which is Initially, when the motor is ‘off,* the
els) from your PC's parallel port. configured in astable mode. The output of program prompts you to press ‘Enter* key
The PC uses a software program to con¬ IC4 is a square wave, which is fed to the to start the motor. Once you press the
trol the speed of the motor. base of transistor T1 via current-limiting key, the motor starts running at full speed.
The motor is connected to the PC resistor R3. Transistor T1 is used to drive After a few seconds, the program asks you
through an interface circuit. The interface the motor. to press any key from the keyboard to go

25 PIN 'D1 TYPE


PARALLEL PORT +5VO-

/° 1
5
I
16
IC2 „
14 2 AD M. 1 2 VR1
° O-
3
4
A1
A2
2
14 or 3
00
A
MOTOR fM)
°o 3 6V -Sr
°o 13
w 5
18
"o
"o JI 4 IC1
8 8 VR4
H
04
R1
82K $ 4 a
11 10 VR5
°o 74LS138 11 04
R3
o
m 5 10
as
13 12 VR6
IC4 3
9 555
o° 1C I+6V 6
SL100
26 7 07 14
2 (WITH
13 HEATSINK]
1 2 VR7
V 8
3
ci 6

J
0.01p

0.01 |J
IC2-IC3 = 74LS04
VR1-VRB - 470K

1
ICS D1-D8 = 1N4148

circuit consists of l-of-8 decoder IC The pulse-width modulation (PWM) to the next screen for controlling the speed
74LS138 (IC1), hex inverter ICs 74LS04 method is used for efficient control of the of the motor. This screen has options for
(1C2 and IC3), resistor networks, timer IC motor. The output of the PC is decoded to increasing and decreasing the motor speed
SSS (IC4) and motor driver transistor SL100 select a particular preset (VR1 through and also for exiting from the program. For
(Tl). The decoder IC accepts binary VR8). The value of the selected preset, increasing the speed enter choice 1 and
weighted inputs AO, A1 and A2 at pins 1, along with resistors R1 and R2 and ca¬ press ‘Enter* key, and for decreasing the
2 and 3, respectively. With active-low en¬ pacitor Cl, changes the output pulse width speed enter choice 2 and press ‘Enter’ key.
able input pins 4 and S of the decoder at pin 3 of IC4. Thus the motor speed can This action changes the speed by one step
grounded, it provides eight mutually ex¬ be increased/decreased by choosing a par¬ at-a-time and the message “Speed de¬
clusive active-low outputs (QO through ticular resistance. For high-power motors, creased" or “Speed increased" is displayed
Q7). These outputs are inverted by hex the transistor can be replaced by an IGBT on the screen. To go to the main menu,
inverters IC2 and 1C3. or a power MOSFET. again press ‘Enter’ key.

SPEEDM.C
//R.KARTHICK.III ECE.K.L.N.C.E.,MADURAI clrscrQ;
//kaithick_klnce@ rediffmail.com outportb(P,0); for(i= 0;i < 8;i + +)
#include< stdio.h> textbackground(9); a[i]-i;
#include< conio,h> textcolor(3); gotoxy(23,ll);
intaiTUc; for(x=0;x< = 80;x + +) printf(" Press Enter to start the motor");
void stait(void); for(j = 0;j < = 25,'j + + ) getch();
void main (void) { gotoxy(28,13);
! gotoxy(x,J); printf("WAIT STARTINGMOTOR");
int P-0x0378,],c-7>cl,x>y; cprintfC "); startQ;

JUNE 2004
I ELECTRONICS FOR YOU
o
UJ
UJ
xx
s
to
2
UJ
Cb

23|
Q X
f
t
§ © S?..
UJ

a,
"•rig A Sfri cT
sÿS-g y !§• |sS| 52~gx
ssis § s - -S' fill
s
°o,a0~ÿ £-gÿ~g-saa
O tiD

li11 s'.:
§" §S
fv, Is II
ro

I! . 0
UJ
?_fi_f!__
°.i

E Q
3 UJ
UJ
O
s. b
w
'J

b
2
E
.

Cb
s

_
cb
£2 0
so f a 3
sSs
! S'l <L>
23SS
c.XSxc
o trfrg
IS r: ~l at v e § S>o,Sb~.Sfl-Si
ss1 Jill I
§is* t
&6
§ -g
B
tlO di
gs
"o

CO V)
_ s
0
XX

a
UJ
a.
jgÿ-a +
o

k
cXj
2

I
UJ

b
1 •-
E
cb
O UJ
5
to d
XX
. J
g;
2 UJ
a cb
=>
X 8 S Q
UJ
s
3 ■S<L> 8 .
Co

QJ
O
a
CO
(-.
a
UJ
UJ
to eg=>
UO CO
o
**-< CO
to
_ Es
**3 •
«=c
UJ
a
Is _ £ &ÿ
g+ OH +
U-

CO . 1 x F 2 gcc
v

=> 1I|L= s|f IE pi IE jclf |E s, », T1 XX


X; am
liltIf -I I*-It-Its-&i-II|i_ll-S_i.i
V-J
QC

»w>
m
CIRCUIT IDEAS

STABILISED POWER SUPPLY WITH


SHORT-CIRCUIT INDICATION
D. MOHAN KUMAR 18V, 500mA step-down transformer to gen¬ negative terminal is also at full supply volt¬
erate 18V AC. A rectifier diode compris¬ age (selected) . If there is a short circuit at

H
ere is an efficient 4-stage stabilised ing diodes D1 and D2 provides 18V DC, the output, LED2 glows to activate the
power supply unit for testing elec¬ which is smoothed by capacitor Cl and piezobuzzer.
tronic circuits. It provides well given to the combination of regulator ICs A fuse-failure indicator distinguishes
regulated and stabilised output, which is (IC1 through IC4) . The regulator ICs pro¬ short circuit at the output and input fail-

TOP VIEW

BC
S4S
ri!h—&Z3-
ONiCFF
SWITCH
. FI. 1 A FUSE

R1
SSOQ
R2
1K;

IM
1 »ia

COM
» our IN 1 102
TUB

COM
a OUT IN
2i£L_!£i 1

COM
103
2ÿ"ÿ
rsoe 3 OU “Ji m slsm;
COM

Cfi
LED1 IDOuSSV
1 DhCOLOUH
LED
CBE

D1
w
Z30VAC
i|i
svO *6- 03

- E© c-
5QHz
INPUT —I—
T
C2

» 4p RS RS
22K SKIM

k>
1«V
i
DZ
XI ■ 230V AC PRIMARY TOIIVO-UV -Tr'.: ' ■' I
1*. SECONDARY TRANSFORMER * op
u_
w +L
-
SZ ROTARY SWITCH
m-D* = 1W06I
PZ1
PBO-
BUZZER
3 &:
BOMS
m
100«
®
LED3

R7
0
WtrSri
METER

1£9T 1J*
rmiim 0
QND

essential for most electronic circuits to give duce fixed, regulated outputs of 12V, 9V, ure. It consists of a bicolour LED (LED1)
proper results. The circuit provides an au¬ 6V and 5V, respectively, which are con¬ and resistors R1 and R2. When power is
dio-visual indication if there is a short cir¬ nected to the rotary switch contacts. This available and the fuse is intact, red and
cuit in the PCB under test, so the power power supply is useful for loads requiring green halves of LED1 are effectively in
supply to the circuit 'under test’ can be up to 200mA current. parallel to output a yellowish light. When
cut-off immediately to save the valuable Complementary transistors T1 and T2 fuse fails, green LED goes off and red LED
components from damage. conduct when the power to the circuit is lights up to indicate fuse breakdown.
The circuit provides four different regu¬ switched on. Full selected supply voltage The circuit can be easily constructed
lated outputs (12V, 9V, 6V and 5V) and is available at the collector of transistor on a general-purpose PCB, Use small heat¬
an unregulated 18V output, which are se¬ T2, which is used to power the load. LED3 sinks for all ICs to dissipate heat. The out¬
lectable through rotary switch S2. The se¬ indicates the presence of output voltage. put voltage can be read on a voltmeter.
lected output is indicated on the analogue The negative terminal of piezobuzzer PZ1 Enclose the circuit in a metal box with
voltmeter connected to the outputs rails. is connected to the output rail via LED2, provisions for voltmeter, LEDs, rotary
The circuit uses a standard 18V-0- so the piezobuzzer remains silent as its switch, etc.

I ELECTRONICS FOR YOU JULY2004


CIRCUIT IDEAS

DIGITAL STOP WATCH


C.H. VITHALANI push-on -switch S3. When S2 is momen¬ Thus, when switch S3 is pressed, reset
tarily pressed, the count value becomes pin 13 of 1C2 is connected to ground

H ere’s a digital stop watch built 0, transistor T1 conducts and it resets via transistor T1 and the oscillator does
around timer I C LM555 and 4-digit IC1. Counting starts when S2 is in ‘off’ not generate clock pulses. This is done
counter 1C with multiplexed 7-seg¬ condition. to achieve synchronisation between IC1
ment output drivers (MM74C926) . A low signal on the latch-enable input and IC2.
IC MM74C926 consists of a 4-digit pin 5 (LE) of IC2 latches the number in First, reset the circuit so that the dis¬
counter, an internal output latch, npn the counter into the internal output latches. play shows ‘0000.’ Now open switch S2
output sourcing drivers for common- When switch S2 is pressed, pin 5 goes for the stop watch to start counting the
cathode, 7-segment display and an low and hence the count value gets stored time. If you want to stop the clock, close

RI ; :
*?
R+
10K
—I
I pr i
RM14-M0CI
R1M1S-1K
T3-T&-BCU7
DQ1-DIS4 .LTS43 COMMON -CATHOOE, 7-SEGMENT DISPLAY
+6V
O

; RST
R2 > Rs
S.BK; t ZOOK;
_ 1 13 18
-f-VWr
RB CHS1 EH 32 0183 018+

ft!ft! a; ft
18
1 0-191
L-%*'
EH 7
S
O/P CLK
12
IS 4-VWW-
fm-
S1 1
ROTARY s 1
SWTTCHJ * VR1 C1 IC2 a
22K LMB65 RS
10K
RB
10K MM74C926 4 0 a. a. a.
LE R14
AOUT
a 7
D8 TS T4 Tfi TB
2 0 BOUT
12 a

-o
R18

ci iL
8

T Adta
BC857„
QND
0 11 10
Dour Com 1 mo
YAV
R17
s.an -r- C2 VAA

I
10V aoi|i
I'lL-U Ria
VAV SH.Q

internal multiplexing circuitry with four in the latch. Display-select pin 6 (DS) de¬ switch S2.
multiplexing outputs. The multiplexing cir¬ cides whether the number on the counter Rotary switch SI is used to select the
cuit has its own free running oscillator, or the number stored in the latch is to be different time periods at the output of the
and requires no external clock. The displayed. If pin 6 is low the number in astable multivibrator (IC1). The circuit
counter advances on negative edge of the output latch is displayed, and if pin 6 works off a 5V power supply. It can be
the clock. The clock is generated by timer is high the number in the counter is dis¬ easily assembled on a general-purpose
IC LM555 (IC1) and applied to pin 12 played. PCB. Enclose the circuit in a metal box
of IC2. When switch S2 is pressed, the with provisions for four 7-segment dis¬
A high signal on reset pin 13 of base of pnp transistor T2 is connected to plays, rotary switch SI, start/ stop switch
IC2 resets the counter to zero, Reset pin ground and it starts conducting, The emit¬ S2 and reset switch S3 in the front panel
13 is connected to +5V through reset ter of T2 is connected to DS pin of IC2. of the box,

JULY 2004 ELECTRONICS (OR YOU


CIRCUIT IDEAS

FLASHING-CUM-RUNNING LIGHT #ÿ
A. SIVASUBRAMANIAN quencies, which are given to decade spectively. The LEDs are activated one by
counter IC2. The decade counter is de¬ one by the decade counter outputs.

T
his circuit generates flashing lights signed to count QO, Q1 and Q2 outputs, Astable multivibrator IC3 produces ap¬
in running pattern. In conventional while its fourth output (Q3) is used to proximately 8.4Hz clock, which is given
running lights, the LEDs glow one reset it. The QO, Q1 and Q2 outputs of IC2 to transistor T4 via resistor R9 to switch
on the supply to transis¬
tors T1 through T3 for
RMK-10C +1» each positive half cycle
R1 T1-T4-BCS47
T4
RIO of IC3 output.
Vcc «on How for each output
4 1«
3 10K< period of IC2, a particu¬
DjS

hSSc
2
01
4WV
O
** 2
7

R11
lar LED blinks at the rate
of 8.4 Hz. The blinking
then shifts to the next
JL
IC1
NE55S *
SSL
cue 7 4017 “ 3
ICS
NE«5 t
WK
LED when the output of
1M a

1 5 3 13
:? R#
1oOtl A 1 3
IC2 advances by one
count (after about 1.3
seconds). Similarly, the
blinking effect shifts to
QND STROBE
2& 35ft, 2!fc
LED! LB32 LEDS c-L 10M -r- the next LED after an¬
Tasv
I0.01V 0.01M
J_ MV
jjND
other1.3 seconds and the
cycle repeats thereafter.
Flashing frequencies
can be changed by
by one. In this circuit, the LEDs flash a are fed to npn transistors Tl, T2 and T3, changing the values of RIO and Rll and
number of times one by one. respectively. The collectors of transistors capacitor C4. The circuit can be easily as¬
The circuit comprises two astable Tl, T2 and T3 are connected to the emit¬ sembled on any general-purpose PCB. It
multivibrators (IC1 and IC3) and a decade ter of transistor T4, while their emitters works off a 12V regulated power supply.
counter (IC2). Astable multivibrator IC1 are connected to LED1, LED2 and LED3 You can also add more LEDs in series with
produces approximately 0,72Hz clock fre- via 150-ohm resistors R6, R7 and R8, re- LED1, LED2 and LED3, respectively.

I ELECTRONICS FORYOU AUGUST 2004


CIRCUIT IDEAS

QUALITY FM TRANSMITTER
TAPAN KUMAR MAHARANA For frequency stability, use a regulated LI: 5 turns of 24 SWG wire closely
DC power supply and house the transmit¬ wound over aSmm dia. air core
ter inside a metallic cabinet, For higher L2: 2 turns of 24 SWG wire closely

T
his FM transmitter for your stereo
or any other amplifier provides a antenna gain, use a telescopic antenna in wound over the 5mm dia. air core
good signal strength up to a dis¬ place of the simple wire. Coils LI and L2 L3: 7 turns of 24 SWG wire closely
tance of 500 metres with a power
output of about 200 mW. It works
off a 9V battery. C1 X c? rl T
C11
*
+»v
The audio -frequency modula¬ ani
tion stage is built around transis¬

X
tor BF494 (Tl), which is wired
as a VHF oscillator and modu¬ -
LI 5T 14 SwTJ Sirim Aran
R3
1DK
TR?M I
LI 3 n
-I 1
C1° -1-
aaxii =" ANTENNA
lates the audio signal present at Li-lTMSWQiiiimH
the base. Using preset VR1, you
L» = 7T M IWQ «nm 3C NK«n
L4-IT2* SWG an
HI
LF.T.
■IMan
hirih gara
r I - 05
3.9K L3 70om
OF WIRE
V
can adjust the audio signal level.
The VHF frequency is decided by LEFT
33K
|-|
-*-f H ) 1»
-±-
«.7p TZ
VC2
22
mu5™
coil LI and variable capacitor BC&4A
RIGHT
VC1. Reduce the value of VR2 to CHANNEL
have a greater power output.
The next stage is built around GKO
r "Trf m FIT

-L- CS

tl
transistor BC548 (T2), which VH1 C7
«7QQ CS
10K 0.01(1
serves as a Class-A power ampli¬
fier. This stage is inductively
coupled to the audio -frequency
I x
a OOIM
GND

modulation stage. The antenna


matching network consists of
variable capacitor VC 2 and capacitor C9. are to be wound over the same air core wound over a 4mm dia. air core
Adjust VC2 for the maximum transmis¬ such that windings for coil L2 start from L4: 5 turns of 28 SWG wire on an
sion of power or signal strength at the the end point for coil LI. Coil winding intermediate-frequency transmitter (IFT)
receiver. details are given below: ferrite core

AUGUST 2004 ELECTRONICS FOR YOU


CIRCUIT IDEAS

DC MOTOR CONTROL USING A SINGLE SWITCH /9*5?


S.C.
DWIV
EDI
m
to

V. DAVID When you momentarily press switch If you press S1 again, the high output
S1, timer 555 (IC1) provides a pulse to of IC2 shifts from Q3 to Q4. Since Q4 is

T
his simple circuit lets you run a DC decade counter CD4017 (IC2), which ad- connected to reset pin 15, it resets decade
motor in clockwise or anti-clockwise vances its output by one and its high state counter CD4017 and its Q0 output goes
direction and stop it using a single shifts from Q0 to Q1. When Q1 goes high, high, so the motor does not rotate. LED1
switch. It provides a constant voltage for the output of IC3 at pin 3 goes low, so the glows via diode D1 to indicate that the
proper operation of the motor. The glow- motor starts running in clockwise (forward) motor is in stop condition. Thereafter, the
ing of LED1 through LED3 indicates that direction. LED2 glows to indicate that the cycle repeats.
the motor is in stop, forward rotation and motor is running in forward direction. If you don’t want to operate the motor

o
D1-D2 = 1N4001 +9V
R1 R2
10K 47K
R Vcc R R Vcc
4 8 16 D1
QO 4 8 4 8
3 R6 T T
T 10K 2 2

T
2
2

4
Q1

Q2
D2
AAA/V
£
Th
6
IC3
555
3
a
O/P
9V
M
b
O/P
3
IC4
555 6
Th
IC1 3
O/P
14
IC2 R7 1 DC MOTOR 1
10K
S1 DiS 555 T 4017 Q3
AM/V-,
H° PUSH-TO- 7 7 GND GND
04
ON 10
O
SWITCH
Th
6
R
15 vwLED1 LED2
ILW
LED3
5 1 8 13 STOP FOR. REV.

C1 + _L C2 GND R3 R4 R5
10M
25V
— r o-i M 680Q 6800 6800

GND
O

reverse conditions, respectively. Now if you press S1 again, the high in reverse direction, remove timer IC4
Here, timer IC1 is wired as a output of IC2 shifts from Q1 to Q2. The along with resistors R5 and R7 and LED3.
monostable multivibrator to avoid false low Q1 output of IC2 makes pin 3 of IC3 And connect ‘b’ terminal of the motor to
triggering of the motor while pressing high and the motor doesn’t rotate. LED1 +Vcc.
switch S1. Its time period is approximately glows (via diode D2) to indicate that the Similarly, if you don’t want to run the
500 milliseconds (ms). motor is in stop condition. motor in forward direction, remove timer
Suppose, initially, the circuit is in Pressing switch S1 once again shifts IC3 along with resistors R4 and R6 and
reset condition with Q0 output of IC2 the high output of IC2 from Q2 to Q3. LED2. And connect ‘a’ terminal of the mo-
being high. Since Q1 and Q3 outputs of The high Q3 output of IC2 makes pin 3 of tor to +Vcc.
IC2 are low, the outputs of IC3 and IC4 IC4 low and the motor starts running in The circuit works off a 9V regulated
are high and the motor doesn’t rotate. anti-clockwise (reverse) direction. LED3 power supply for a 9V DC motor. Use a
LED1 glows to indicate that the motor is glows to indicate that the motor is run- 6V regulated power supply for a 6V DC
in stop condition. ning in reverse direction. motor.

ELECTRONICS FOR YOU SEPTEMBER 2004


CCOON SNTSR UT CRT U
I OCN T I O N

DYNAMIC TEMPERATURE INDICATOR /SB;


SUN
IL KUM
AR

AND CONTROLLER
NIRANJANA ASHOK AND SREEJA MENON cubators, thermal baths and veterinary op- PARTS LIST
erating tables. Semiconductors:

H
ere’s a standalone digital thermom- PIC16F73 microcontroller is the heart IC1 - 7812, 12V regulator
eter that also controls the tempera- of the circuit as it controls all the func- IC2 - 7805, 5V regulator
ture of the heating element of a tions. Fig. 1 shows the pin configuration IC3 - PIC16F73 microcontroller
T1 - SL100 npn transistor
device according to its requirement. Use of PIC16F73 microcontroller. D1-D5 - 1N4007 rectifier diode
of embedded technology makes this AD590 - Temperature sensor
closed-loop feedback control system effi- LED1 - Red LED
cient and reliable. Microcontroller
The circuit LED2 - Green LED
(PIC16F73) allows dynamic and faster con- Fig. 2 shows the functional block diagram - 16×2-line LCD
trol. A temperature-controller knob and of the PIC16F73-based dynamic tempera- Resistors (all ¼-watt, ±5% carbon,
unless stated otherwise):
liquid crystal display (LCD) make the sys- ture controller. The temperature transducer
R1, R8 - 1-kilo-ohm
tem user-friendly. The sensed and set tem- (AD590) senses the temperature and con-
R2, R3, R6,
perature values are simultaneously dis- verts it into an electrical signal, which is R7 - 10-kilo-ohm
played on the LCD panel in Kelvin scale. applied to the microcontroller. The ana- R4 - 3.9-kilo-ohm
The circuit is programmed for ‘on’/ logue signal is converted into digital for- R5 - 15-kilo-ohm
‘off’ control. It is very compact using few mat by the inbuilt analogue-to-digital con- VR1 - 10-kilo-ohm potmeter
VR2 - 10-kilo-ohm preset
components and can be implemented for verter (ADC) of the microcontroller. The
several applications including air-condi- sensed and set values of the temperature Capacitors:
C1 - 1000µF, 35V electrolytic
tioners, water-heaters, snow-melters, ov- are displayed on the 16x2-line LCD. The C2 - 0.33µF ceramic
ens, heat-exchangers, mixers, furnaces, in- microcontroller drives a transistor to con- C3-C6 - 0.33µF ceramic
trol the heating element C7 - 100µF, 100V electrolytic
c °1 K37 28□ RB7/PGD with the help of an elec- Miscellaneous:
27 □
MCLRA/PP
c2 RB6/PGC tromagnetic relay.

RAO/ANO X1 - 230V AC primary to 7.5V-0-
RA1/AN1 c 3 26 RB5
PIC16F73 is an 8-bit, 7.5V, 250mA secondary trans-
c4 25 3 RB4

RA2/AN2 former
c5 co RB3/PGM low-cost, high-perfor-

RA3/AN3A/REF 24 XTAL - 5MHz crystal
RA4/T0CKI 6 CO 23 □ RB2 mance flash RL1 - 12V, 200-ohm, 1 C/O relay
RA5/AN4/SS c7 22□ RB1 microcontroller. Its key S1 - On/off switch
Vss c8 LL
CD 21I] RBO/INT
features are 4k words of
OSC1/CLKIN c9 o 20□ VDD
C 10 19 J Vss flash program memory, 14-bit wide). The ADC simplifies the over-

OSC2/CLKOUT Q.
RCO/T10SO/T1CKI c 11 18 RC7/RX/DT 192 bytes of data RAM, all embedded system design by providing
RC1/T10SI/CCP2 c 12 17□ RC6/TX/CK
16 □
eleven interrupts, three a direct interface for temperature, pres-
c 13 RC5/SDO

RC2/CCP1
RC3/SCK/SCL L 14 15 RC4/SDI/SDA I/O ports, 8-bit ADC and sure, motion and other sensors. The set
only 35 powerful single- temperature value can be varied from
Fig. 1: Pin configuration of PIC16F73 microcontroller cycle instructions (each 253°K to 430°K using an external knob
on the front panel of the cabinet.
Fig. 3 shows the circuit of PIC16F73
CIRCUIT TO ENTER THE microcontroller-based dynamic tempera-
SET-POINT TEMPERATURE
ture controller. The temperature sensor
(AD590) outputs a current of 1 µA/°K. A
high-impedance constant current is deliv-
TRANSISTOR THAT
TEMPERATURE SWITCHES ACCORDING ered for a supply voltage between 4V and
MICROCONTROLLER ► TO THE ON/OFF SIGNAL
TRANSDUCER
FROM PIC
30V. The sensing range is linear from
218°K (–55°C) to 423°K (+150°C). A 10-
kilo-ohm resistor is used to convert the
current from the sensor into voltage with
HEATING LIQUID CRYSTAL ELECTROMAGNETIC a sensitivity of 1V/°K (1 µA/°K×1000).
ELEMENT DISPLAY (LCD) RELAY Hence, the voltage range is 2.18V to 4.23V.
This voltage is fed to pin 3 (RA1) of the
microcontroller.
PIC16F73 microcontroller is a 28-pin
Fig. 2: Block diagram of the PIC16F73-based dynamic temperature controller IC with three input/output ports: port A

ELECTRONICS FOR YOU SEPTEMBER 2004


CONSTRUCTION

1
S1
ON/OFF LX1 D1 D2 +
SWITCH C* 7.5V ■
CD
o CD
CD IN IC1 OUT IN IC2 OUT
230V AC CD
CD 1 7812 3 1 7805 3
CD CD
50Hz CAN
CD 2

I
CD 0 R1 BOTTOM VIEW
D3 D4 COM COM OF CAN AD590
1K
C1 + C2
o- 1000M 0.33M
X1 = 230V AC PRIMARY TO
35V _\\LED1
7.5V-0-7.5V, 250mA SECONDARY D1-D5 = 1N4007 POWER

-- --
TRANSFORMER

C3 C4
0.1M 0.1M RL1=12V, 200Q
1C/0 RELAY
RL1
R4 R8 N/O
CD
+Vcc MCLRA/PP 3.9K IK -Ar
20 1 D5

r
CD N/C
RC0
11
LED2
RC1 12
R7 RELAY
RC2 10K ON

O
13 RB1
RC3 14
22 A/WV
T1
RC4 RA3 VR1 SL100
15
RC5
5 vwv — 10K
POT
16 R6
IC3 10 10K
RC6 17 PIC16F73 XTAL I
j TEMP.
RC7 18 9 5 MHzÿ=j= C6
-pO.lM
+
RA2 4 AD590 VR2 + C7
RA4 6 z 10K 100M
< 16V
RA5 RA1 G >-
7
3 — f-VWV-< 1 L
C/3
R3 z
LU
8 19 10K i- R5
15K
R2
10K
+Vcc DO D1 D2 D3 D4 D5 D6 D7 RS RW EN GND C5 -1-
0.1m ~r
2 7 8 9 10 11 12 13 14 4 56 3 1

16x2 LCD

Fig. 3: Circuit of PIC16F73 microcontroller-based dynamic temperature controller

(RA0 through RA5), port B (RB0 through microcontroller and the shaft is rotated by nected to the heating element.
RB7) and port C (RC0 through RC7). the user to vary the set-point temperature Data is sent to the LCD’s data pins 7
Port-A pins 3 (RA1) and 5 (RA3) are that is visible on the LCD. through 14. Control signals required be-
programmed as analogue inputs. The inbuilt The microcontroller has been pro- fore each data transmission are sent to
8-bit ADC converts the analogue input sig- grammed to sense the analogue voltages pins 4, 5 and 6 (RS, R/W and Enable) of
nal into 8-bit digital equivalent output. Its corresponding to the sensed and set tem- the LCD.
analogue reference voltage is software- perature values. The sensed voltages are
selectable to either the positive supply volt- manipulated such that the corresponding
Working of the circuit
age of the device (Vcc) or the voltage level temperature values are displayed on the
of RA3 pin. Here, Vcc (5V) is selected as the LCD by sending out the corresponding data The mains supply is stepped down by
analogue reference voltage. signals through pins 11 through 18 (RC0 transformer X1 to deliver a secondary out-
Pins 3 (RA1) and 5 (RA3) are pro- through RC7) and control signals through put of 7.5V-0-7.5V AC, 250 mA. The trans-
grammed to sense the analogue voltages pins 4, 6 and 7 (RA2, RA4 and RA5) of the former output is rectified by a full-wave
corresponding to the sensed and set tem- microcontroller. Then the sensed tempera- rectifier comprising diodes D1 through D4
perature values, respectively. The voltage ture value is compared with the set-point and filtered by capacitor C1. ICs 7812 (IC1)
corresponding to the set temperature is temperature value. Pin 22 (RB1) of the and 7805 (IC2) provide regulated 12V and
obtained by means of a potential divider microcontroller goes high if the set-point 5V power supplies. Capacitors C2 and C4
network comprising a potentiometer (VR1) temperature is higher than the sensed bypass any ripple in the regulated out-
and two fixed resistors (R4 and R5). The temperature. This pin has been programmed puts. LED1 gives power-‘on’ indication
variable terminal of the potentiometer is as an output to control the relay through when current flows through resistor R1.
connected to pin 5 (RA3) of the transistor T1. The relay contacts are con- The 12V regulated supply is used for

SEPTEMBER 2004 ELECTRONICS FOR YOU


CONSTRUCTION

driving the temperature sensor to control the contrast by using preset VR2.
START (AD590). AD590 has three termi- The relay is connected between +12V
nals, namely, ‘+’, ‘–’ and ‘CAN.’ and the collector of transistor T1. When
The ‘+’ terminal is connected to pin 22 of the microcontroller is high, tran-
GO TO
LCD INITIALISE the 12V power supply and the sistor T1 saturates and the relay energises
►4 ‘CAN’ terminal is grounded. The to switch the device ‘on.’ When pin 22 is
current output obtained from the low, transistor T1 cuts off and the relay de-
GET THE ANALOGUE VALUE ‘–’ terminal is converted into volt- energises to turn the device ‘off.’ Diode D5
CORRESPONDING TO PRESENT TEMP. (P.T.)
FROM CHANNEL 1 age using resistor R2 (10 kilo- is used here as a free-wheeling diode.
ohms). This voltage is applied to
pin 3 (RA1) of the microcontroller.
DO THE A/D CONVERSION, CALIBRATION
Programming the
The potential divider network
AND DISPLAY THE TEMP. IN KELVIN SCALE
ON LCD comprising resistor R4 (4-kilo-
microcontroller
ohm), potentiometer VR1 (10-kilo- An El Cheapo programmer circuit (avail-
ohm) and resistor R5 (15-kilo- able on ‘www.myke.com/elcheapo.htm’)
GET THE ANALOGUE VALUE ohm) is connected across regu- has been used to program the
CORRESPONDING TO SET-POINT TEMP. (S.P.)
FROM CHANNEL 3 lated 5V supply. The variable ter- microcontroller. The program is written
minal of potentiometer VR1 is con- as ‘.asm’ file and assembled using MPLAB
nected to pin 5 of the IDE for generating ‘.hex’ file. The MPLAB
DO THE AID CONVERSION, CALIBRATION microcontroller. Capacitors C5
AND DISPLAY THE SET-POINT KELVIN SCALE IDE assembler can be downloaded from
ON LCD through C7 filter out the noise. A the Website of Microchip
5MHz crystal (XTAL) connected be- (www.microchip.com), the manufacturer
tween pins 9 and 10 of the of the PIC microcontroller. (Note. The
microcontroller provides clock fre- datasheet of PIC16F73 and other relevant
YES “ON" SIGNAL
SP>PT > TO RELAY
quency. files have been included in this month’s
Register-select pin 4, R/W pin EFY-CD.) The simulator gives the hex code
NO
5 and Enable pin 6 of the LCD are of the program, which is then burnt into
“OFF” SIGNAL TO RELAY THROUGH connected to pins 4, 6 and 7 of the the microcontroller using the parallel port
RB1 OF PORT B
microcontroller, respectively, and of the computer interfaced to the PIC pro-
data pins 7 through 14 are con- grammer. The programmed microcontroller
nected to pins 11 through 18, re- is then placed in the PCB.
Fig. 4: Flow-chart of the program spectively. Pin 3 of the LCD is used Fig. 4 shows the flow-chart of the pro-
gram. The
microcontroller is pro-
Q HI O o EFY/KCB/C0N2/SEPCH

R4
jOn— r
3 9 O grammed to give vari-
ous functional com-
mands with delays for
10K 10K in o §
UR2 UR1 o OCN (VCOO - Q LJ R1
proper initialisation of
INTENSITY Jl lk the LCD. The control

m
12 signals for the LCD are
o+ 6 |CRL9l '+ o
C7'
o given from Port A

10K
0~v\/sÿO O' CJ|
°-ÿr£ oou. jot
R2 OM. (RA1) of the
I
R3 ED2 IC1

s
10K <n
REL.
ON
microcontroller. The
7812
km °l vo m analogue voltage cor-
C5 u responding to the
CO

co
IN. sensed temperature
o lUPouj

©P p
given to Port A (RA1)
R7
<E is converted into a
X
o C1 o digital value and
1000U/35U
stored in the
microcontroller. A bi-
D4 D2
nary value of ‘255’
corresponds to 5V
(500 kilo-ohms).
16X2 LCD MODULE D1-05=1N4007,
Based on this relation,
m calibration is done to
TENP. INDICATOR USING PIC16F73
XI -SEC extract the digits of

o- ro o o o
9U AC
D3| D
o the sensed tempera-
ture value in degree
Kelvin. These digits
Fig. 5: Actual-size, single-side PCB layout for Fig. 6: Component layout for the PCB
temperature indicator using PIC16F73 are then sent from

ELECTRONICS FOR YOU SEPTEMBER 2004


CONSTRUCTION

Port C of the microcontroller to the data and check voltages at various points be- the required voltage.
lines of the LCD. fore placing the microcontroller into the Fluctuations visible on the LCD, espe-
Similarly, the set temperature is dis- circuit. Taking into consideration the sizes cially when the sensed temperature value
played on the LCD. The difference between of the various components and the way equals the set temperature value, can be
the sensed and set temperature values is they have been placed, select the dimen- eliminated by connecting capacitors be-
calculated and accordingly RB1 pin of Port sions of the cabinet for the device. Put tween the supply and the ground to by-
B goes high or low to control the relay. the entire circuit inside the cabinet and pass the AC interference. Make sure that
test the working of the circuit. a pin configured as output is not given
When burning the program into the an input signal by chance.
Construction and testing
microcontroller, use power supply with a Note. In EFY Lab, we used soldering
An actual-size, single-side PCB layout for proper current limiter to prevent damage iron as the heating element. The device
the dynamic temperature controller using to the parallel port of the computer as was modeled to give an ‘on’/‘off’ signal
PIC16F73 is shown in Fig. 5 and its com- well as the microcontroller. The analogue corresponding to the sensed and set-point
ponent layout in Fig. 6. After making the voltage to the microcontroller should not temperature. When the sensed tempera-
PCB, check whether all the tracks are as be given directly from the power supply, ture was below the set temperature, the
per the circuit diagram. If the tracks are as occasional spikes in the power supply soldering iron got switched ‘on,’ and when
correct, solder the components to the may damage the microcontroller. Instead, the sensed temperature crossed the set
board. Place AD590 close to the soldering you can provide the analogue voltage by temperature value, the soldering iron got
iron. Now switch on the power supply means of a potentiometer connected across switched off.

TEMP.LST
LOC OBJECT CODE LINE SOURCE TEXT VALUE 001A 2089 00064 CALL TENS
001B 2895 00065 GOTO SUBTRACT
00001 LIST P=16F73 00066
00002 INCLUDE "p16f73.inc" 00067
00001 LIST 001C 00068 MSCOUNTER ;*** 150ms counter before LCD initializaion
00002 ; P16F73.INC Standard Header File, Version 1.00 001C 302C 00069 MOVLW D'300'
Microchip Technology, Inc. 001D 00A2 00070 MOVWF TIME1
00320 LIST 001E 307C 00071 LOOP1 MOVLW D'124'
2007 3FF2 00003 __CONFIG _HS_OSC & _WDT_OFF & _PWRTE_ON 001F 00A3 00072 MOVWF TIME2
00000020 00004 BANK0RAM EQU H'20' 0020 0000 00073 LOOP2 NOP
00005 CBLOCK BANK0RAM 0021 0BA3 00074 DECFSZ TIME2,F
00000020 00006 AD1 0022 2820 00075 GOTO LOOP2
00000021 00007 ADUSER 0023 0BA2 00076 DECFSZ TIME1,F
00000022 00008 TIME1 0024 281E 00077 GOTO LOOP1
00000023 00009 TIME2 0025 0008 00078 RETURN
00000024 00010 TEMP 0026 00079 T48US ;*** 48us Delay Loop for LCD initialization
00000025 00011 FIN 0026 3090 00080 MOVLW D'400'
00000026 00012 CONFU 0027 00AD 00081 MOVWF COUNT0
00000027 00013 A 0028 00082 T_LOOP
00000028 00014 B3 0028 2062 00083 CALL T12US
00000029 00015 C3 0029 0BAD 00084 DECFSZ COUNT0,F
0000002A 00016 REM 002A 2828 00085 GOTO T_LOOP
0000002B 00017 COUNT1 002B 0008 00086 RETURN
0000002C 00018 COUNT 00087
0000002D 00019 COUNT0 00088
0000002E 00020 COUNTER 00089
0000002F 00021 COUNTER1 002C 00090 CHARACTER_ENTRY ;*** Character Entry Command for LCD
00000030 00022 A1 002C 1105 00091 BCF PORTA,RS
00000031 00023 B1 002D 1205 00092 BCF PORTA,RW
00000032 00024 C1 002E 3006 00093 MOVLW H'06'
00000033 00025 C2 002F 0087 00094 MOVWF PORTC
00000034 00026 B2 0030 2055 00095 CALL PULSE_E
00000035 00027 A2 0031 2026 00096 CALL T48US
00000036 00028 RANGE 0032 0008 00097 RETURN
00029 ENDC 0033 00098 CLEAR_DISPLAY ;*** Clear Display Command for LCD
00000002 00030 RS EQU H'02' 0033 1105 00099 BCF PORTA,RS
00000005 00031 E EQU H'05' 0034 1205 00100 BCF PORTA,RW
00000004 00032 RW EQU H'04' 0035 3001 00101 MOVLW H'1'
00000000 00033 RC0 EQU H'00' 0036 0087 00102 MOVWF PORTC
0000 00034 ORG 0X000 0037 2055 00103 CALL PULSE_E
0000 2805 00035 GOTO MAINLINE 0038 2026 00104 CALL T48US
0004 00036 ORG 0X004 0039 0008 00105 RETURN
0004 29CA 00037 GOTO INT 00106
0005 00038 MAINLINE 00107
0005 1683 00039 BSF STATUS,RP0 00108
0006 300A 00040 MOVLW B'00001010' ;to set ra1(present)& ra3(user-defined) as 003A 00109 FUNCTIONSET ;*** Function Set Command for LCD
00041 ;i/p pins&ra2,ra4,ra5 as o/p control to lcd 003A 1105 00110 BCF PORTA,RS
0007 0085 00042 MOVWF TRISA 003B 1205 00111 BCF PORTA,RW
0008 0187 00043 CLRF TRISC ;PORTC AS OUTPUT DATA PORT TO LCD 003C 3038 00112 MOVLW H'38'
0009 0186 00044 CLRF TRISB 003D 0087 00113 MOVWF PORTC
000A 3004 00045 MOVLW B'00000100' ;to set analog i/p(ra1&ra3),vref(Vcc) 003E 2055 00114 CALL PULSE_E
00046 ;dig i/p(ra3,ra4&ra5) 003F 2026 00115 CALL T48US
000B 009F 00047 MOVWF ADCON1 0040 0008 00116 RETURN
000C 1283 00048 BCF STATUS,RP0 ;to go to bank0 0041 00117 DISPLAYON ;*** Display On/Off & Cursor Command for LCD
000D 00049 INITIALIZE ;*** LCD Initialization 0041 1105 00118 BCF PORTA,RS
000D 01AD 00050 CLRF COUNT0 ;all these are delay loops 0042 1205 00119 BCF PORTA,RW
000E 01AE 00051 CLRF COUNTER 0043 300C 00120 MOVLW D'12'
000F 201C 00052 CALL MSCOUNTER 0044 0087 00121 MOVWF PORTC
0010 2026 00053 CALL T48US 0045 2055 00122 CALL PULSE_E
0011 203A 00054 CALL FUNCTIONSET 0046 2026 00123 CALL T48US
0012 202C 00055 CALL CHARACTER_ENTRY 0047 0008 00124 RETURN
0013 2033 00056 CALL CLEAR_DISPLAY 0048 00125 DISPLAY
0014 2041 00057 CALL DISPLAYON 0048 3008 00126 MOVLW D'8'
0015 00058 BEGIN ;beginning the proper function 0049 00AE 00127 MOVWF COUNTER
0015 2048 00059 CALL DISPLAY 004A 00128 MESSAGE
0016 2068 00060 CALL PRESENT 004A 082E 00129 MOVF COUNTER,W
0017 206D 00061 CALL CHECK 004B 3C08 00130 SUBLW D'8' ;Subtract character count from 19
0018 1803 00062 BTFSC STATUS,0 00131 ;& store result in W
0019 207E 00063 CALL HUNDREDS 004C 2059 00132 CALL TEXT

SEPTEMBER 2004 ELECTRONICS FOR YOU


CONSTRUCTION

004D 1505 00133 BSF PORTA,RS ;RS line to 1 to i/p Data 00A6 0828 00238 MOVF B3,W
004E 1205 00134 BCF PORTA,RW ;R/W line to 0 to write 00A7 0231 00239 SUBWF B1,W
004F 0087 00135 MOVWF PORTC ;send character to LCD 00A8 00B4 00240 MOVWF B2
0050 2055 00136 CALL PULSE_E ;Clock the LCD 00A9 0827 00241 MOVF A,W
0051 2026 00137 CALL T48US ;delay for LCD busy 00AA 0230 00242 SUBWF A1,W
0052 0BAE 00138 DECFSZ COUNTER,F ;counter - 1 = 0 ? 00AB 00B5 00243 MOVWF A2
00139 ;Are all characters displayed ? 00AC 28C7 00244 GOTO DISPLAY1
0053 284A 00140 GOTO MESSAGE ;No. Display the next character 00AD 00245 UNIT ;*when units place is zero and tens place
0054 0008 00141 RETURN ;Yes. Goto Initialize is nonzero
0055 00142 PULSE_E ;*** Display On/Off & Cursor Command for LCD 00AD 01B3 00246 CLRF C2
0055 1685 00143 BSF PORTA,E 00AE 3000 00247 MOVLW D'0'
0056 0000 00144 NOP 00AF 0628 00248 XORWF B3,W
0057 1285 00145 BCF PORTA,E 00B0 1903 00249 BTFSC STATUS,Z
0058 3400 00146 RETLW H'0' 00B1 28BA 00250 GOTO UNITY ;in case tens place is 0,A1 should be made 5
0059 00147 TEXT ;*** Initialization Display Data for LCD 00B2 0AB1 00251 INCF B1,F
0059 0782 00148 ADDWF 02,F ;Store (PC+W) in PC(addr $02) to jump 00B3 0828 00252 MOVF B3,W
;forward 00B4 0231 00253 SUBWF B1,W
005A 3454 00149 RETLW H'54' ;ascii for t 00B5 00B4 00254 MOVWF B2
005B 3465 00150 RETLW H'65' ;ASCII for e 00B6 0827 00255 MOVF A,W
005C 346D 00151 RETLW H'6d' ;ASCII for m 00B7 0230 00256 SUBWF A1,W
005D 3470 00152 RETLW H'70' ;ASCII for p 00B8 00B5 00257 MOVWF A2
005E 34A5 00153 RETLW H'a5' ;ASCII for . 00B9 28C7 00258 GOTO DISPLAY1
005F 34FE 00154 RETLW H'fe' ;ASCII for blank 00BA 00259 UNITY ;*when units place and tens place are
0060 343A 00155 RETLW H'3a' ;ASCII for : both zeroes
0061 34FE 00156 RETLW H'fe' 2;ASCII for blank 00BA 01B4 00260 CLRF B2
00157 00BB 0AB0 00261 INCF A1,F ;make A1=5
0062 00158 T12US ;*** 12 microseconds timer *** 00BC 0827 00262 MOVF A,W
0062 2863 00159 GOTO $+1 00BD 0230 00263 SUBWF A1,W
0063 2864 00160 GOTO $+1 00BE 00B5 00264 MOVWF A2
0064 2865 00161 GOTO $+1 00BF 28C7 00265 GOTO DISPLAY1
0065 2866 00162 GOTO $+1 00C0 00266 TEN ;*when tens place is zero and units place
0066 0000 00163 NOP is nonzero
0067 0008 00164 RETURN 00C0 0828 00267 MOVF B3,W
0068 00165 PRESENT 00C1 0231 00268 SUBWF B1,W
0068 3049 00166 MOVLW B'01001001' ;set clk 2 fosc/8,ADON,i/p channel ra1 00C2 00B4 00269 MOVWF B2
0069 009F 00167 MOVWF ADCON0 00C3 0827 00270 MOVF A,W
006A 201C 00168 CALL MSCOUNTER 00C4 0230 00271 SUBWF A1,W
006B 151F 00169 BSF ADCON0,2 ;set GO bit to start ADC 00C5 00B5 00272 MOVWF A2
006C 0008 00170 RETURN 00C6 28C7 00273 GOTO DISPLAY1
006D 00171 CHECK 00C7 00274 DISPLAY1 ;*to display the nos. on LCD
006D 191F 00172 BTFSC ADCON0,2 ;when conversion is complete ADCON0 will 00C7 1505 00275 BSF PORTA,RS ;RS line to 1 to i/p Data
00173 ;be cleared and control will come out of loop 00C8 1205 00276 BCF PORTA,RW ;R/W line to 0 to write
006E 286D 00174 GOTO CHECK 00C9 3030 00277 MOVLW D'48'
006F 081E 00175 MOVF ADRES,W ;the ADC value is found in ADRES 00CA 07B5 00278 ADDWF A2,F
0070 00A0 00176 MOVWF AD1 00CB 0835 00279 MOVF A2,W
0071 3CFF 00177 SUBLW D'255' ;255-ADRES 00CC 0087 00280 MOVWF PORTC ;send character to LCD
0072 00A5 00178 MOVWF FIN 00CD 2055 00281 CALL PULSE_E ;Clock the LCD
0073 1003 00179 BCF STATUS,0 00CE 2026 00282 CALL T48US ;delay for LCD busy
0074 0D25 00180 RLF FIN,W ;(255-ADRES)*2 00CF 1505 00283 BSF PORTA,RS ;RS line to 1 to i/p Data
0075 00A6 00181 MOVWF CONFU 00D0 1205 00284 BCF PORTA,RW ;R/W line to 0 to write
0076 3064 00182 MOVLW D'100' ;2 extract hundreds value 00D1 3030 00285 MOVLW D'48'
0077 0226 00183 SUBWF CONFU,W 00D2 07B4 00286 ADDWF B2,F
0078 01A7 00184 CLRF A 00D3 0834 00287 MOVF B2,W
0079 01A8 00185 CLRF B3 00D4 0087 00288 MOVWF PORTC ;send character to LCD
007A 01A9 00186 CLRF C3 00D5 2055 00289 CALL PULSE_E ;Clock the LCD
007B 01AC 00187 CLRF COUNT 00D6 2026 00290 CALL T48US
007C 01AB 00188 CLRF COUNT1 00D7 1505 00291 BSF PORTA,RS ;RS line to 1 to i/p Data
007D 0008 00189 RETURN 00D8 1205 00292 BCF PORTA,RW ;R/W line to 0 to write
007E 00190 HUNDREDS 00D9 3030 00293 MOVLW D'48'
007E 0FAB 00191 INCFSZ COUNT1,F ;2 count hundreds subtract from 100 until 00DA 07B3 00294 ADDWF C2,F
00192 ;*** 12 microseconds timer ***borrow 00DB 0833 00295 MOVF C2,W
is generated. 00DC 0087 00296 MOVWF PORTC ;send character to LCD
007F 3064 00193 MOVLW D'100' 00DD 2055 00297 CALL PULSE_E ;Clock the LCD
0080 02A6 00194 SUBWF CONFU,F 00DE 2026 00298 CALL T48US
0081 1803 00195 BTFSC STATUS,0 00DF 1505 00299 BSF PORTA,RS ;RS line to 1 to i/p Data
0082 287E 00196 GOTO HUNDREDS 00E0 1205 00300 BCF PORTA,RW ;R/W line to 0 to write
0083 3001 00197 MOVLW D'1' 00E1 30DF 00301 MOVLW B'11011111' ;to print symbol for degree
0084 022B 00198 SUBWF COUNT1,W 00E2 0087 00302 MOVWF PORTC ;send character to LCD
0085 00A7 00199 MOVWF A 00E3 2055 00303 CALL PULSE_E ;Clock the LCD
0086 3064 00200 MOVLW D'100' 00E4 2026 00304 CALL T48US
0087 07A6 00201 ADDWF CONFU,F ;the difference obtained should be added with 00E5 1505 00305 BSF PORTA,RS ;RS line to 1 to i/p Data
00202 ;100 so as to extract the tens place 00E6 1205 00306 BCF PORTA,RW ;R/W line to 0 to write
0088 0008 00203 RETURN 00E7 304B 00307 MOVLW 'K'
0089 00204 TENS 00E8 0087 00308 MOVWF PORTC ;send character to LCD
0089 0FAC 00205 INCFSZ COUNT,F ;2 count tens subtract from 10 00E9 2055 00309 CALL PULSE_E ;Clock the LCD
008A 300A 00206 MOVLW D'10' 00EA 2026 00310 CALL T48US
008B 02A6 00207 SUBWF CONFU,F 00311 ;*to give the set-point value follow the
008C 1803 00208 BTFSC STATUS,0 same procedure as above user_defined
008D 2889 00209 GOTO TENS 00EB 3059 00312 MOVLW B'01011001' ;set clk 2 fosc/8,ADON,i/p channel ra3
008E 300A 00210 MOVLW D'10' 00EC 009F 00313 MOVWF ADCON0
008F 0726 00211 ADDWF CONFU,W 00ED 201C 00314 CALL MSCOUNTER
0090 00A9 00212 MOVWF C3 ;ones place-difference+10 gives ones place 00EE 151F 00315 BSF ADCON0,2
0091 3001 00213 MOVLW D'1' 00EF 00316 CHECK1
0092 022C 00214 SUBWF COUNT,W 00EF 191F 00317 BTFSC ADCON0,2
0093 00A8 00215 MOVWF B3 ;tens place-count gives tens place 00F0 28EF 00318 GOTO CHECK1
0094 0008 00216 RETURN 00F1 081E 00319 MOVF ADRES,W
00217 ;temp in kevin =500 -(255-ADRES)*2 00F2 00A1 00320 MOVWF ADUSER
00218 ;******subtraction from 500 is done by 00F3 3CFF 00321 SUBLW D'255'
digitwise subtraction 00F4 00A5 00322 MOVWF FIN
00219 ;various cases are to be considered inorder 00F5 1003 00323 BCF STATUS,0
to initiate subtraction 00F6 0D25 00324 RLF FIN,W
0095 00220 SUBTRACT 00F7 00A6 00325 MOVWF CONFU
0095 300A 00221 MOVLW D'10' 00F8 3064 00326 MOVLW D'100' ;2 extract hundreds value
0096 00B2 00222 MOVWF C1 00F9 0226 00327 SUBWF CONFU,W
0097 3009 00223 MOVLW D'9' 00FA 01A7 00328 CLRF A
0098 00B1 00224 MOVWF B1 00FB 01A8 00329 CLRF B3
0099 3004 00225 MOVLW D'4' 00FC 01A9 00330 CLRF C3
009A 00B0 00226 MOVWF A1 00FD 01AC 00331 CLRF COUNT
009B 3000 00227 MOVLW D'0' 00FE 01AB 00332 CLRF COUNT1
009C 0629 00228 XORWF C3,W 00FF 1803 00333 BTFSC STATUS,0
009D 1903 00229 BTFSC STATUS,Z 0100 2103 00334 CALL HUNDREDS1
009E 28AD 00230 GOTO UNIT ;if ones place is 0,B1 should be made 10 0101 210E 00335 CALL TENS1
009F 0829 00231 MOVF C3,W 0102 2919 00336 GOTO SUBTRACT1
00A0 0232 00232 SUBWF C1,W 0103 00337 HUNDREDS1
00A1 00B3 00233 MOVWF C2 0103 0FAB 00338 INCFSZ COUNT1,F ;2 count hundreds
00A2 3000 00234 MOVLW D'0' 0104 3064 00339 MOVLW D'100'
00A3 0628 00235 XORWF B3,W 0105 02A6 00340 SUBWF CONFU,F
00A4 1903 00236 BTFSC STATUS,Z 0106 1803 00341 BTFSC STATUS,0
00A5 28C0 00237 GOTO TEN ;if tens place is 0 0107 2903 00342 GOTO HUNDREDS1

ELECTRONICS FOR YOU SEPTEMBER 2004


CONSTRUCTION

0108 3001 00343 MOVLW D'1' 016D 2055 00450 CALL PULSE_E ;Clock the LCD
0109 022B 00344 SUBWF COUNT1,W 016E 2026 00451 CALL T48US
010A 00A7 00345 MOVWF A 016F 1505 00452 BSF PORTA,RS ;RS line to 1 to i/p Data
010B 3064 00346 MOVLW D'100' 0170 1205 00453 BCF PORTA,RW ;R/W line to 0 to write
010C 07A6 00347 ADDWF CONFU,F 0171 306F 00454 MOVLW 'o'
010D 0008 00348 RETURN 0172 0087 00455 MOVWF PORTC ;send character to LCD
010E 00349 TENS1 0173 2055 00456 CALL PULSE_E ;Clock the LCD
010E 0FAC 00350 INCFSZ COUNT,F ;2 count tens 0174 2026 00457 CALL T48US
010F 300A 00351 MOVLW D'10' 0175 1505 00458 BSF PORTA,RS ;RS line to 1 to i/p Data
0110 02A6 00352 SUBWF CONFU,F 0176 1205 00459 BCF PORTA,RW ;R/W line to 0 to write
0111 1803 00353 BTFSC STATUS,0 0177 3069 00460 MOVLW 'i'
0112 290E 00354 GOTO TENS1 0178 0087 00461 MOVWF PORTC ;send character to LCD
0113 300A 00355 MOVLW D'10' 0179 2055 00462 CALL PULSE_E ;Clock the LCD
0114 0726 00356 ADDWF CONFU,W 017A 2026 00463 CALL T48US
0115 00A9 00357 MOVWF C3 ;ones place 017B 1505 00464 BSF PORTA,RS ;RS line to 1 to i/p Data
0116 3001 00358 MOVLW D'1' 017C 1205 00465 BCF PORTA,RW ;R/W line to 0 to write
0117 022C 00359 SUBWF COUNT,W 017D 306E 00466 MOVLW 'n'
0118 00A8 00360 MOVWF B3 017E 0087 00467 MOVWF PORTC ;send character to LCD
0119 00361 SUBTRACT1 017F 2055 00468 CALL PULSE_E ;Clock the LCD
0119 300A 00362 MOVLW D'10' 0180 2026 00469 CALL T48US
011A 00B2 00363 MOVWF C1 0181 1505 00470 BSF PORTA,RS ;RS line to 1 to i/p Data
011B 3009 00364 MOVLW D'9' 0182 1205 00471 BCF PORTA,RW ;R/W line to 0 to write
011C 00B1 00365 MOVWF B1 0183 3074 00472 MOVLW 't'
011D 3004 00366 MOVLW D'4' 0184 0087 00473 MOVWF PORTC ;send character to LCD
011E 00B0 00367 MOVWF A1 0185 2055 00474 CALL PULSE_E ;Clock the LCD
011F 3000 00368 MOVLW D'0' 0186 2026 00475 CALL T48US
0120 0629 00369 XORWF C3,W 0187 1505 00476 BSF PORTA,RS ;RS line to 1 to i/p Data
0121 1903 00370 BTFSC STATUS,Z 0188 1205 00477 BCF PORTA,RW ;R/W line to 0 to write
0122 2931 00371 GOTO UNIT1 ;in case tens place is 0,B1 should be made 10 0189 303A 00478 MOVLW ':'
0123 0829 00372 MOVF C3,W 018A 0087 00479 MOVWF PORTC ;send character to LCD
0124 0232 00373 SUBWF C1,W 018B 2055 00480 CALL PULSE_E ;Clock the LCD
0125 00B3 00374 MOVWF C2 018C 2026 00481 CALL T48US
0126 3000 00375 MOVLW D'0' 018D 1505 00482 BSF PORTA,RS ;RS line to 1 to i/p Data
0127 0628 00376 XORWF B3,W 018E 1205 00483 BCF PORTA,RW ;R/W line to 0 to write
0128 1903 00377 BTFSC STATUS,Z 018F 30FE 00484 MOVLW H'fe'
0129 2944 00378 GOTO TEN1 ;in case tens place is 0 ,A1 should be made 5 0190 0087 00485 MOVWF PORTC ;send character to LCD
012A 0828 00379 MOVF B3,W 0191 2055 00486 CALL PULSE_E ;Clock the LCD
012B 0231 00380 SUBWF B1,W 0192 2026 00487 CALL T48US
012C 00B4 00381 MOVWF B2 0193 1505 00488 BSF PORTA,RS ;RS line to 1 to i/p Data
012D 0827 00382 MOVF A,W 0194 1205 00489 BCF PORTA,RW ;R/W line to 0 to write
012E 0230 00383 SUBWF A1,W 0195 3030 00490 MOVLW D'48'
012F 00B5 00384 MOVWF A2 0196 07B5 00491 ADDWF A2,F
0130 294B 00385 GOTO DISPLAY2 0197 0835 00492 MOVF A2,W
0131 00386 UNIT1 ;*when units place is zero 0198 0087 00493 MOVWF PORTC ;send character to LCD
0131 01B3 00387 CLRF C2 0199 2055 00494 CALL PULSE_E ;Clock the LCD
0132 3000 00388 MOVLW D'0' 019A 2026 00495 CALL T48US ;delay for LCD busy
0133 0628 00389 XORWF B3,W 019B 1505 00496 BSF PORTA,RS ;RS line to 1 to i/p Data
0134 1903 00390 BTFSC STATUS,Z 019C 1205 00497 BCF PORTA,RW ;R/W line to 0 to write
0135 293E 00391 GOTO UNITY1 019D 3030 00498 MOVLW D'48'
0136 0AB1 00392 INCF B1,F 019E 07B4 00499 ADDWF B2,F
0137 0828 00393 MOVF B3,W 019F 0834 00500 MOVF B2,W
0138 0231 00394 SUBWF B1,W 01A0 0087 00501 MOVWF PORTC ;send character to LCD
0139 00B4 00395 MOVWF B2 01A1 2055 00502 CALL PULSE_E ;Clock the LCD
013A 0827 00396 MOVF A,W 01A2 2026 00503 CALL T48US
013B 0230 00397 SUBWF A1,W 01A3 1505 00504 BSF PORTA,RS ;RS line to 1 to i/p Data
013C 00B5 00398 MOVWF A2 01A4 1205 00505 BCF PORTA,RW ;R/W line to 0 to write
013D 294B 00399 GOTO DISPLAY2 01A5 3030 00506 MOVLW D'48'
013E 00400 UNITY1 ;*when units place and tens place are 01A6 07B3 00507 ADDWF C2,F
both zeroes 01A7 0833 00508 MOVF C2,W
013E 01B4 00401 CLRF B2 01A8 0087 00509 MOVWF PORTC ;send character to LCD
013F 0AB0 00402 INCF A1,F 01A9 2055 00510 CALL PULSE_E ;Clock the LCD
0140 0827 00403 MOVF A,W 01AA 2026 00511 CALL T48US
0141 0230 00404 SUBWF A1,W 01AB 1505 00512 BSF PORTA,RS ;RS line to 1 to i/p Data
0142 00B5 00405 MOVWF A2 01AC 1205 00513 BCF PORTA,RW ;R/W line to 0 to write
0143 294B 00406 GOTO DISPLAY2 01AD 30DF 00514 MOVLW B'11011111' ;to print symbol for degree
0144 00407 TEN1 ;*when tens place is zero and units place 01AE 0087 00515 MOVWF PORTC ;send character to LCD
is nonzero 01AF 2055 00516 CALL PULSE_E ;Clock the LCD
0144 0828 00408 MOVF B3,W 01B0 2026 00517 CALL T48US
0145 0231 00409 SUBWF B1,W 01B1 1505 00518 BSF PORTA,RS ;RS line to 1 to i/p Data
0146 00B4 00410 MOVWF B2 01B2 1205 00519 BCF PORTA,RW ;R/W line to 0 to write
0147 0827 00411 MOVF A,W 01B3 304B 00520 MOVLW 'K'
0148 0230 00412 SUBWF A1,W 01B4 0087 00521 MOVWF PORTC ;send character to LCD
0149 00B5 00413 MOVWF A2 01B5 2055 00522 CALL PULSE_E ;Clock the LCD
014A 294B 00414 GOTO DISPLAY2 01B6 2026 00523 CALL T48US
014B 00415 DISPLAY2 00524 ;****to generate the ON/OFF signal
014B 1105 00416 BCF PORTA,RS subtract ADUSER from AD1
014C 1205 00417 BCF PORTA,RW 01B7 00525 CONTROL
014D 30A8 00418 MOVLW H'a8' ;TO GOTO SECOND LINE 01B7 0820 00526 MOVF AD1,W
014E 0087 00419 MOVWF PORTC 01B8 0221 00527 SUBWF ADUSER,W
014F 2055 00420 CALL PULSE_E 01B9 1803 00528 BTFSC STATUS,0
0150 2026 00421 CALL T48US 01BA 29BD 00529 GOTO CONTROL1
0151 1505 00422 BSF PORTA,RS ;RS line to 1 to i/p Data 01BB 1086 00530 BCF PORTB,1
0152 1205 00423 BCF PORTA,RW ;R/W line to 0 to write 01BC 29C3 00531 GOTO CURSOR1
0153 3053 00424 MOVLW 'S' 01BD 00532 CONTROL1
0154 0087 00425 MOVWF PORTC ;send character to LCD 01BD 1903 00533 BTFSC STATUS,Z
0155 2055 00426 CALL PULSE_E ;Clock the LCD 01BE 29C1 00534 GOTO CLEAR ;To give the OFF signal
0156 2026 00427 CALL T48US 01BF 1486 00535 BSF PORTB,1 ;To give the ON signal
0157 1505 00428 BSF PORTA,RS ;RS line to 1 to i/p Data 01C0 29C3 00536 GOTO CURSOR1
0158 1205 00429 BCF PORTA,RW ;R/W line to 0 to write 01C1 00537 CLEAR
0159 3065 00430 MOVLW 'e' 01C1 1086 00538 BCF PORTB,1
015A 0087 00431 MOVWF PORTC ;send character to LCD 01C2 29C3 00539 GOTO CURSOR1
015B 2055 00432 CALL PULSE_E ;Clock the LCD 01C3 00540 CURSOR1 ;*********to give cursor home command
015C 2026 00433 CALL T48US to LCD
015D 1505 00434 BSF PORTA,RS ;RS line to 1 to i/p Data 00541
015E 1205 00435 BCF PORTA,RW ;R/W line to 0 to write 01C3 1105 00542 BCF PORTA,RS
015F 3074 00436 MOVLW 't' 01C4 1205 00543 BCF PORTA,RW
0160 0087 00437 MOVWF PORTC ;send character to LCD 01C5 3003 00544 MOVLW H'03'
0161 2055 00438 CALL PULSE_E ;Clock the LCD 01C6 0087 00545 MOVWF PORTC
0162 2026 00439 CALL T48US 01C7 2055 00546 CALL PULSE_E
0163 1505 00440 BSF PORTA,RS ;RS line to 1 to i/p Data 01C8 2026 00547 CALL T48US
0164 1205 00441 BCF PORTA,RW ;R/W line to 0 to write 01C9 2815 00548 GOTO BEGIN
0165 30FE 00442 MOVLW H'FE' 01CA 00549 INT
0166 0087 00443 MOVWF PORTC ;send character to LCD 01CA 2805 00550 GOTO MAINLINE
0167 2055 00444 CALL PULSE_E ;Clock the LCD 00551 END
0168 2026 00445 CALL T48US Program Memory Words Used: 456
0169 1505 00446 BSF PORTA,RS ;RS line to 1 to i/p Data Program Memory Words Free: 3640
016A 1205 00447 BCF PORTA,RW ;R/W line to 0 to write Errors : 0
016B 3050 00448 MOVLW 'P' Warnings : 0 reported, 2 suppressed
016C 0087 00449 MOVWF PORTC ;send character to LCD Messages : 0 reported, 4 suppressed ❑

SEPTEMBER 2004 ELECTRONICS FOR YOU


CIRCUIT IDEAS

SOLIDSTATE REMOTE CONTROL SWITCH <5*3


SAN
I TH
EO
A
*5

SEEMANT SINGH from the transmitter, the


IRD1-IRD2 = INFRARED TRANSMITTER LED
O output of the IR receiver
S1

H
ere is a solidstate remote control REMOTE module is high (approx.
CONTROL
switch which uses readily available SWITCH R1
IR
5V).
8.2K
electronic components. The control R Vcc LED1 When the transmitter
4 8
circuit comprises the transmitter and re- DIS 7 IR
is pointed at the receiver
T1
ceiver sections. The range of the transmit- + BC547
LED2 and switch S1 is momen-
ter is around seven metres. T
9V
BATT. C1 + _ R2
15K IC1 3
O/P
A/WV
tarily pressed, the trans-
100M T 555
The transmitter circuit (shown in Fig. 25V 2 R4
470Q
mitted IR rays are sensed
R3
1) is built around a timer IC (555) wired 6 1K
T2
by the receiver module
Th 1
as an astable multivibrator. It works off a 5 BC547 and its output pulses low
9V battery. When remote control switch
__ C2 GND
R5 to trigger the monostable
0.001ÿ
JL\\LED1 10Q
(IC2). The output of IC2
S1 is pressed, the astable multivibrator C3

I
0.01|J SIGNAL
built around IC1 starts oscillating at a fre- TRANSMIT goes high for about five
quency of about 38 kHz. The signal fre- seconds. Thus, even if
quency at output pin 3 of IC1 is transmit- Fig. 1: Transmitter circuit you press the remote

O/P IC4 IN
+9V
3 1 O TSOP
7806
R8
1K R13
1K
I
C9 +
100M
2
1738

C4 + ZD1 R7 R10 16V COM


100M 5.1V 5K 220K 16
16V POWER R
R9 15
LED2 1 2 3
10K 4 8
DIS 7 Q2 GND OUT
4 +Vcc
IRX C6 R12
TSOP1738 Th 6 1k CLK L
10M
2
16V
IC2
555
O/P
VWV- 14 IC3 2 — -vwv I o
3 T 2 CD4017 R14 L
C Cout Q0
470Q O
R6 T3 12 3 A
680Q BC558 R11 D
1 1K
1 5 13 R15 MT1 230V AC
C5 + C7 + 1K
10M 22M
GND -L C8 8 V- 50Hz
16V 16V

|— 0.01M _\\ LED4 / Ml
GND G
SIGNAL I LED3 APPLIANCE TRIAC
RECEIVE OFF BT136
♦ O
N

Fig. 2: Receiver circuit

ted through two infrared diodes (IR LED1 consists of regulator IC 7806 (IC4), IR re- switch more than one time by mistake,
and IR LED2). A green LED (LED1) con- ceiver module (TSOP1738), timer 555 there won’t be any change in the output
nected to pin 3 glows whenever S1 is (IC2) and decade counter CD4017 (IC3). of the receiver within this period and hence
pressed, indicating the presence of a sig- Timer 555 (IC2) is wired as a monostable no undesired switching of the appliance.
nal for transmission at the output of the multivibrator. The signal reception is indicated by glow-
multivibrator. The 9V DC power supply for the re- ing of the green LED (LED3).
The output frequency F at pin 3 of IC1 ceiver circuit is regulated by regulator IC The output of IC2 is given to the clock
depends on the timing components, viz, 7806. The presence of power in the circuit is input (pin 14) of IC3. Here, IC3 is wired as
resistors R1 and R2 and capacitor C2. It is indicated by glowing of the red LED (LED2). a bistable circuit. For every clock input,
given by the following relationship: The IR receiver module (TSOP1738), pins 2 and 3 of IC3 alternately go high.
F = 1.443/(R1+2R2)C2 which gets 5.1V power supply through ze- Initially, when the power to the re-
This frequency is fed to npn transis- ner diode ZD1, receives the transmitted ceiver circuit is switched on, pin 3 of IC3
tors T1 and T2 (each BC547) through re- signal of about 38 kHz. The signal is am- is high and therefore the yellow LED
sistor R4 (470-ohm) to drive the IR LEDs. plified by transistor BC558 (T3) and given (LED4) connected to it glows. The glow-
Resistor R5 limits the current flowing to triggering pin 2 of IC2 through cou- ing of LED4 indicates that the appliance is
through the IR LEDs. pling capacitor C6. in ‘off’ condition.
The receiver circuit (shown in Fig. 2) Initially, when no signal is received When a clock pulse is received at pin 14

SEPTEMBER 2004 ELECTRONICS FOR YOU


CIRCUIT IDEAS

of IC3, pin 3 goes low to turn off LED4, while turn, controls the appliance. AC mains. Also, make sure that the neutral
pin 2 becomes high. The high output at pin Precautions. Don’t touch the leads of point of mains is connected to the ground
2 triggers the gate of triac BT136, which, in the triac as it is connected across the 230V line of the circuit and not vice versa.

ELECTRONICS FOR YOU SEPTEMBER 2004


CIRCUIT IDEAS

of IC3, pin 3 goes low to turn off LED4, while turn, controls the appliance, AC mains. Also, make sure that the neutral
pin 2 becomes high. The high output at pin Precautions. Don’t touch the leads of point of mains is connected to the ground
2 triggers tire gate of triac BT136, which, in the triac as it is connected across tire 230V line of the circuit and not vice versa.

I ELECTRONICS FOR YOU SEPTEMBER 2004


CIRCUIT IDEAS

AUTOMATIC SCHOOL BELL S.C. DWI


VED
-5
I

RAJ KUMAR MONDAL (IC2 and IC3) and AND gate CD4081 (IC4). gate. When SCR1 is fired, it provides
Timer IC1 is wired as an astable ground path to operate the circuit after

C
onsider that a school has a total of multivibrator, whose clock output pulses resetting both decade counters IC2 and
eight periods with a lunch break are fed to IC2. IC2 increases the time IC3. At the same time, LED1 glows to in-
after the fourth period. Each period periods of IC1 (4.5 and 3 minutes) by ten dicate that school bell is now active.
is 45 minutes long, while the duration of times to provide a clock pulse to IC3 ev- When switch S2 is pressed momen-
the lunch break is 30 minutes. ery 45 minutes or after 30 minutes, re- tarily, the anode of SCR1 is again
To ring this automatic school bell to spectively. When the class periods are go- grounded and the circuit stops operating.
start the first period, the peon needs to ing on, the outputs of IC3 switch on tran- In this condition, both LED1 and LED2
momentarily press switch S1. Thereafter, sistors T1 and T2 via diodes D4 through don’t glow.
the bell sounds every 45 minutes to indi- D12. When the eighth period is over, Q9
cate the end of consecutive periods, ex- Resistors R4 and R5 connected in se- output of IC3 goes high. At this time, tran-
cept immediately after the fourth period, ries to the emitter of npn transistor T2 sistors T1 and T2 don’t get any voltage

o-

R>T1 I
+12V IC4 (N1) = CD4081 14 O N/0
O o
R6 1 D14 C3
S1-S3 = PUSH-TO-ON SWITCH 10K 1N4007 o
2 o> N/C
ADV D1-D13 = 1N4148
R12 RL1
S3
i T1 T2
D1
R Vcc QO R I
R
7
1K 12V, 200Q
1C/0 RELAY fS3
H 7 4 8 16 3 15 16 15
BC547, BC547/
T3 230V
COUT CLK SL100 AC
D2 12 14
R1 R3 R4 D4 QO
3 ww- BELL

1K 150K ,270K R11 LED1


D3 D5 Q1 1K
IC1 o/p CLK IC2 2 IC3 GREEN
3 14
R2 R5 Th NE555 CD4017 D6 Q2 CD4017
6 4
100K 100K
T D7 Q3 7 Q9 *— O O—i i-O O
2 11
S1 S2
D8 Q4 10 N L
1 5 8 13 OFF
1 5 6 9 8 13 230V AC
FRONT VIEW D9 Q5 50Hz
C1 + GND GND T R13
iooon~;
o 16V C2
D10
4 Q7
Q6 1K
SCR1 A
TYN
R7
0.01 D11 eoy-
TYN
604 1K D12
4 Q8 A/WV G
D13 R10
— vwv 4 LED2 R9
100Q

K G
AAA/V RED 1K
A R8
1K
GND
O-

when it sounds after 30 minutes to indi- decide the 4.5-minute time period of IC1. through the outputs of IC2. As a result, the
cate that the lunch break is over. When The output of IC1 is further connected to astable multivibrator (IC1) stops working.
the last period is over, LED2 glows to in- pin 14 of IC2 to provide a period with a The school bell sounds for around 8
dicate that the bell circuit should now be duration of 45 minutes. Similarly, resis- seconds at the end of each period. One
switched off manually. tors R2 and R3 connected in series to the can increase/decrease the ringing time of
In case the peon has been late to start emitter of npn transistor T1 decide the 3- the bell by adding/removing diodes con-
the school bell, the delay in minutes can minute time period of IC1, which is fur- nected in series across pins 6 and 7 of
be adjusted by advancing the time using ther given to IC2 to provide the lunch- IC1.
switch S3. Each pushing of switch S3 ad- break duration of 30 minutes. The terminals of the 230V AC
vances the time by 4.5 minutes. If the Initially, the circuit does not ground electric bell are connected to the nor-
school is closed early, the peon can turn to perform its operation when 12V power mally-open (N/O) contact of relay RL1.
the bell circuit off by momentarily press- supply is given to the circuit. The circuit works off a 12V regulated
ing switch S2. When switch S1 is pressed momen- power supply. However, a battery source
The bell circuit contains timer IC tarily, a high enough voltage to fire sili- for back-up in case the power fails is also
NE555 (IC1), two CD4017 decade counters con-controlled resistor SCR1 appears at its recommended.

ELECTRONICS FOR YOU OCTOBER 2004


CIRCUIT IDEAS

ANTI-THEFT ALARM FOR BIKES


PRAVEEN KUMAR M.P. module TSOP 1738 (IRX1), which is nor¬
% of the mobike’s horn, while the positive
mally used in TV receivers. The receiver terminal of the horn is connected to the
f anybody tries to steal your bike, this module senses the IR modulated frequency positive terminal of the battery via resistor

I circuit turns on the horn of the bike to


alert you of the impending theft.
Usually, a handle lock is used on the
transmitted by the IR LED.
When no IR rays are incident on the
sensor, its output is high. But the output of
Rl. The energised relay drives the horn,
which continues sounding until you press
reset switch S2 momentarily.
handle bar for the safety of bikes, with the IR sensor goes low when it senses the At night, lock your bike using the
the front mudguard in a slanted position. modulated IR signal. The output of the handle lock and switch on the circuit us-

"(C
+1ZV
(FROM
BAIT).

S1°
ill, 78O5 *\°F-
IRLED1
- IIFRARED TRANSMITTER LED, IRX1
- R RECBVER (TSOP 1738)

R1
ON/OFF
SWITCH
SCI
2W COM

:IBK
R2

7
4 8
£1 1£> ji&
8
Vcc H*”
CLK1
1
v=c
DI i r
1N4001 J k
tL cz
_10jjl Si HfC

E
RL1

Us'
12V. 2000
+L C1
„47(*j
R+ C5 tL R10

TO
2.21* RELAY

°«©
TSOP 40V IC2 IC4 12
1738 3
R3
555 7473
C2

A.7K BCS47
K1
3
T2
SL100
'
0.1M
6 LM311
11 H1 = MOTOR BKE
123

GNDI■Woe OUT _ C3
2 1 _5
C4
IRLED1 O-
IRX1
TSOP
R8
1K
1_ 4 2

AC.tL PUSHÿTO-ON
HORN

GNO
0.001M
T 0.01M 1738
2ol SWrTCH

When the handle lock is freed, the front receiver module is given to a negative- ing switch SI. Since the IR transmitter (IR
mudguard can be aligned with the body voltage comparator built around IC LM311 LEDll and the receiver (IRX1) will not be
of the bike. (IC3). The input voltage at pin 2 of IC3 is in line of sight, IR rays from IR LED1 will
This circuit consists of transmitter and fixed by using the voltage-divider network not be incident on the sensor. When any¬
receiver sections. The transmitter (IR comprising resistors R7 and R8. one tries to move the bike away, the IR
LED1) is fitted on the back end of the When IR rays are not incident on the IR transmitter and the IR receiver will come
front mudguard and the receiver sensor receiver module, the voltage at pin 3 of IC3 in line of sight and the IR rays from the
(IRX1) is fitted on the central portion of is greater than the voltage at pin 2. As a IR transmitter will be incident on the re¬
the crash guard of the bike such that IR result, the output of comparator IC3 is low. ceiver. This will make the output of the
rays from the transmitter directly fall on But when the receiver senses IR rays from comparator (IC3) high. The pulse from the
the sensor when the front mudguard IR LED1, the voltage at pin 3 of IC3 is lower comparator will make the output of latch
comes in line with the body of the bike. than the voltage at pin 2. As a result, the IC4 high and transistor T2 will conduct to
The transmitter section is built around output of the comparator goes high. sound the horn via relay RL1.
timer SS5 (IC2), which is wired as an astable The output of the comparator is given Note. The circuit excluding the trans¬
multivibrator with a frequency of around to a latch made up of JK flip-flop (IC4). The mitter and the receiver can be housed in
38 kHz. The output of IC2 is further ampli¬ low-to-high going pulse from the compara¬ a small metal box and kept inside the tool
fied by transistor T1 and given to an infra¬ tor makes the output of IC4 high until it is box of the bike.
red light-emitting diode (IR LED1), which reset. The output of IC4 is latched and used Before you start your bike, make
continuously transmits the IR frequency. to energise relay RL1 via transistor T2. The sure that the circuit is switched off using
The receiver section uses IR receiver relay is connected to the negative terminal switch SI.

OCTOBER 2004 ELECTRONICS FOR YOU


CIRCUIT IDEAS

ELECTRONIC WATCHDOG #
Dt
TAPAN KUMAR MAHARANA The circuit comprises
a transmitter unit and SPEAKER LS1
FITTED «I1W

H
ere’s an electronic watchdog for a receiver unit, which NSIDE HOME LOUDSPEAKER
your house that sounds to inform are mounted face to
you that somebody is at the gate. BATE
face on the opposite

— i— ;
—i
---------
in IR
LETM RX1
tL J_ cs
ci TRANS¬ RECEIVER
R1
1K
1$ r 0-1M MITTER > > >
IRRAY
TSOP
1738

4
7
R3
7TO. OUTSIDE
R2
20K IC1 1W
3 VAV Fig. 4: Mounting arrangement for transmitter and receiver units
NES5S
6
IR RECEIVER FRONT VIEW pillars of the gate such that the IR
SENSOR beam gets interrupted when someone
5
JÿIRLEDI UM is standing at the gate or passing
T
TSOP
1738 68
O.OOItTT through it.
C4
3J2 1 The transmitter circuit (see Fig. 1)
O.Q1(j

X B
■O
ll IIIOUT
GUI
+V00
1I
GNU
Vcc
CUP is built around timer NE555 (IC1),
which is wired as an astable
fig. 1: 38kHz IR transmitter circuit Fig. 3: Pin configurations of multivibrator producing a frequency of
TS0P1 738 and UM66
_
about 38 kHz. The infrared (IR) beam
is transmitted through IR LED1.
The receiver circuit is
il
O- 4>

C7 shown in Fig. 2. It comprises


R8 5 R7
1-2K ?B80H IR sensor TSOP1738 (IR RX1),
R4 1-81 npn transistor BC548 (Tl),
100C1 8 an
Z
CL6W timer NE555 (IC2) and some
Rfl
resistors and capacitors. IC2 is
R6
IC2 ioon VOG IC3 1k wired as a monostable
2 UMS6 1 VMr
B
NESS5 * AWr-f- W multivibrator with a time pe¬

*I
RS 3 riod of around 30 seconds. The
ioon
-VAV
€X BC548
6 ZD1
S8V
GND
VR1
4.7K ihsO
melody generator section is
built around melody generator
+ 06
33u
18V
tL C8
IftJ
16V
+l ca
T» C8
T
0.0111
ZENER IC UM66 (IC3), transistor T2
and loudspeaker LSI. Fig. 3
shows pin configurations of IR
a QND
sensor TSOP1738 and melody
generator IC UM66.
fig. 2; Receiver circuit The power supply for the

transmitter is derived from the receiver and trigger pin 2 of IC2 remains high, Fig. 4 shows mounting arrangement
circuit by connecting its points A and B When anyone interrupts the IR beam for both the transmitter and receiver units
to the respective points of the receiver falling on the sensor, its output goes high on the gate pillars. To achieve a high di¬
circuit. The receiver is powered by regu¬ to drive transistor Tl into conduction and rectivity of the IR beam towards the sen¬
lated 6V DC. For the purpose, you can pin 2 of IC2 goes low momentarily. As a sor, use a reflector behind the IR LED.
use a 6V battery. result, IC2 gets triggered and its pin 3 After both the units have been built,
The transmitter and receiver units are goes high to supply 3.3V to melody gen¬ connect 6V power supply to the receiver
aligned such that the IR beam falls di¬ erator IC3 at its pin 2, which produces a circuit. You should hear a continuous
rectly on the IR sensor. As long as IR sweet melody through the speaker fitted melody from the speaker. Now connect
beam falls on the sensor, its output re¬ inside the house. Output pin 3 of IC2 6V power to the transmitter also and
mains low, transistor Tl does not conduct remains high for around 30 seconds. orient IR LED1 towards IR receiver. The

NOVEMBER 2004 ELECTRONICS FOR YOU


CIRCUIT IDEAS

melody should stop after about 30 sec¬ door, the IR beam is interrupted and the Using preset VR1, you can set the volume
onds. Now the transmitter and the re¬ alarm sounds for 30 seconds. The alarm of the loudspeaker.
ceiver units are ready for use. keeps sounding as long as one stands This circuit can also be used as a door¬
When somebody enters through the between tire transmitter and receiver' units. bell or burglar alarm.

I ELECTRONICS FOR YOU NOVEMBER 2004


CIRCUIT IDEAS

VJL
FIRE ALARM USING THERMISTOR
PRINCE PHILLIPS ■o

R1
SI Rfl
+8V

I
n this fire alarm circuit, a thermistor 4700 TH1 27K
THB4M8TOR LS1
works as the heat sensor. When tem¬ 10K 80, 1W
perature increases, its resistance de¬ 8 SPEAKER
BC558
creases, and vice versa. At normal tem¬ LED1 Ft;:
F® R7
perature, the resistance of the thermistor 47K 4700
(TH1) is approximately 10 kilo-ohms,
which reduces to a few ohms as the tem¬
1N40Q1 BC84S «
IC1
NE555
3

6L1Q0B
perature increases beyond 100°C. The cir¬ Jj RJ
cuit uses readily available components and R8 *-p 10u 4700 1 s
4700 16V
can be easily constructed on any general-
purpose PCB.
R4 ! ;
8600?
cz
0.04)1
T C3
Timer IC NE555 (IC1) is wired as an
as table multivibrator oscillating in audio
I D.D1)l
GND
«
frequency band. Switching transistors T1
and T2 drive multivibrator NE555 (IC1).
The output of IC1 is connected to npn and increases the ‘on’ time of alarm. The discharging of capacitor Cl when the ther¬
transistor T3, which drives the loudspeaker higher the value of capacitor Cl, the higher mistor connected to the positive supply
(LSI) to generate sound. The frequency the forward voltage applied to the base of cools down and provides a high-resistance
of IC1 depends on the values of resistors transistor T1 (BC548). (10-kilo-ohm) path. It also stops the con¬
R5 and R6 and capacitor C2. Since the collector of transistor T1 is duction of Tl. To prevent the thermistor
When thermistor TH1 becomes hot, it connected to the base of transistor T2, from melting, wrap it up in mica tape.
provides a low-resistance path to extend transistor T2 provides positive voltage to The circuit works off a 6V-12V regu¬
positive voltage to the base of transistor reset pin 4 of IC1 (NE55S). Resistor R4 is lated power supply. LED1 is used to indi¬
T1 via diode D1 and resistor R2. Capaci¬ used such that IC1 remains inactive in the cate that power to the circuit is switched
tor Cl charges up to the positive voltage absence of positive voltage. Diode D1 stops on.

I ELECTRONICS FOR YOU NOVEMBER 2004


CIRCUIT IDEAS

HIT SWITCH
T.A. BABU
% Initially, the input of gate N1 is low,
while the input of gate N2 is high. Trig¬
gering the voltage-control switch by hit¬
ting the sensor pulls the input of gate N1
amplified by transistor BC547 (Tl). The to high level and causes the bistable to
combination of transistor Tl and the bridge toggle. The capacitor gets charged via re¬

T
his versatile hit switch is the elec¬ rectifier comprising diodes D1 through D4 sistor R1 and the circuit changes its state.
tronic equivalent of a conventional acts as a voltage-control switch. The in¬ This latch continues until the bistable
switch. It can be used to control verter gates of IC CD40S9 QC1) together switch gets the next triggering input.
the switching of a variety of electronic with associated components form a Every time the hit plate receives a hit,
devices. bistable switch. the voltage-control switch triggers the
The circuit of the hit switch uses a IC CD4069 is a CMOS hex inverter. bistable circuit. That means every subse¬
piezoelectric diaphragm (piezobuzzer) as Out of the six available inverter gates, only quent hit at the sensor will toggle the state
the hit sensor. A piezoelectric material de¬ three are used here. IC1 operates at any of the switch. The red LED (LED1) con¬
velops electric polarisation when strained voltage between 3V and 15V and offers a nected at the output of gate N3 indicates
‘on’/'off’ position of
the switch. Relay
Hrr RL1 is activated by
PLATE ■•+12V
R2 the hit switch to con¬
1(K « trol the connected
1 iJM hJU LH31
load.
The circuit works
D1
Tl
'BC547
D2

Id (m-Nt)>CMOM
€>.s. off 12V DC. It can be
constructed on any
□1-04 = 1N614A general-purpose PCB.
R1
D4 D9 66K 1N40G7 For the desired re¬
sults, proper connec¬
tions and installation
RL1 POWER'
12V. MOB SJPHY of the hit sensor are
1CTO
necessary. Remove
the cover of the
by an applied stress. The hit sensor makes high immunity against noise. The recom¬ piezobuzzer and connect its two leads to
use of this property. mended operating temperature range for the circuit, Mount the plate such that it
When you hit or knock the piezo ele¬ this IC is -55° C to 125°C. This device is receives the hit properly. The piezoelectric
ment (hit plate) with your fingertip, a small intended for all general-purpose inverter material on the plate can easily get dam¬
voltage developed by the piezo element is applications. aged, so hit the switch gently.

I ELECTRONICS FOR YOU DECEMBER 2004


CIRCUIT IDEAS

WATER-LEVEL CONTROLLER
K.P. VI SWAN ATHAN positions.
%
pushes the moving contact of switch S2
Normally, N/C contact of switch SI is to N/O position and it gets connected to

H ere is a simple, automatic water-


level controller for overhead tanks
that switches on/off the pump mo¬
tor when water in the tank goes below/
above the minimum/maximum level. The
connected to ground and N/C contact of
switch S2 is connected to 12V power sup¬
ply. IC 555 is wired such that when its
trigger pin 2 is grounded it gets triggered,
and when reset pin 4 is grounded it gets
ground, How IC1 is reset and its output
goes low to switch the pump off.
As water is consumed, its level in the
overhead tank goes down. Accordingly,
the float of sensor 2 also goes down, This
water level is sensed by two floats to op¬ reset. Threshold pin 6 and discharge pin 7 causes the moving contact of switch S2 to
erate the switches for controlling the pump are not used in the circuit. shift back to NC position and reset pin 4
motor. When water in the tank goes below of IC1 is again connected to 12V. But IC1
Each sensors float is suspended from the minimum level, moving contacts (PI doesn’t get triggered because its trigger
pin 2 is still clamped to 12V by switch SI .
So the pump remains switched off,

-
SUPPORT- CMCULAR DISC
&1-S3 ■ LEAP WMTCtl When water level further goes down
Sri SUPPORT WO RL1 1SV awn 1CtO RELAY ■M2V to reach the minimum level, the moving
Aflt- RESET Vcc
MU
— Tx
«
contact of switch SI shifts back to N/C
position to connect trigger pin 2 of IC1 to

lH
MAXMJM
LEVEL
FLOAT
4

Lx z Si
IC1
B

5
a/p
D1
1 wool

\NW
RL1
NiC
»TOFF
iwrrcH

ZJWAC
ground, This triggers IC1 and the pump is
switched on.
The float sensor units can be assembled
R1 PUfcF BO Hi at home. Both the units are identical, ex¬
PVC SUOO MOTOR MAINS
PIPE
4.7K cept that their length is different. The depth

I— I — FLOAT
MINIMUM
GND

I
6

1 Cl
0.011]
1o
of the water tank from top to the outlet
water pipe can be taken as the length of the
minimum-level sensing unit. The depth of
the water tank from top to the level you
GND want the tank to be filled up to is taken as
WATER
OUTLET the length of the maximum-level sensing
OVERHEADTAMC
unit. The leaf switches are fixed at the top
of the tank as shown in the figure.
above using an aluminium rod. This ar¬ and P2) of both leaf switches will be in Each pipe is closed at both the ends by
rangement is encased in a PVC pipe and N/C position. That means trigger pin 2 using two caps, A 5mm dia. hole is drilled
fixed vertically on the inside wall of the and reset pin 4 of IC1 are connected to at the centre of the top cap so that the
water tank, Such sensors are more reli¬ ground and 12V, respectively. This trig¬ aluminium rod can pass through it easily to
able than induction -type sensors. Sensor gers IC1 and its output goes high to select the contact of leaf switches. Simi¬
1 senses the minimum water level, while energise relay RL1 through driver transis¬ larly, a hole is to be drilled at the bottom
sensor 2 senses the maximum water level tor SL100 (Tl). The pump motor is cap of the pipe so that water can enter the
(see the figure) . switched on and it starts pumping water pipe to lift the float.
Leaf switches SI and S2 (used in tape into the overhead tank if switch S3 is ’on.’ When water reaches the maximum
recorders) are fixed at the top of the sen¬ As the water level in the tank rises, level, the floats should not go up more
sor units such that when the floats are the float of sensor 1 goes up. This shifts than the required distance for pushing
lifted, the attached 5mm dia. (approx.) alu¬ the moving contact of switch SI to N/O the moving contact of the leaf switch to
minium rods push the moving contacts position and trigger pin 2 of IC1 gets con¬ N/O position. Otherwise, the pressure on
(PI and P2) of leaf switches SI and S2 nected to 12V. This doesn’t have any im¬ the float may break the leaf switch itself.
from normally closed (N/C) position to pact on IC1 and its output remains high The length of the aluminium rod is to be
normally open (N/O) position. Similarly, to keep the pump motor running. selected accordingly. It should be affixed
when the water level goes down, the mov¬ As the water level rises further to reach on the metal/thermocole float using some
ing contacts revert back to their original the maximum level, the float of sensor 2 glue (such as Araldite).

I ELECTRONICS FOR YOU DECEMBER 2004


CIRCUIT
IDEAS

AUDIO AMPLIFIER FOR


PERSONAL STEREO
■ M. VEN KATESWAR AN pushpull amplifier, each transistor (T2 tor T2 and R5 and R7 for transistor
or T3) gets double the voltage when T3) so that the acceptable output

I n the output stages of most broad¬


cast receivers and some amplifiers,
there is a limit up to which maxi¬
mum power can be developed with¬
out distortion. In the widely accepted
activated.
Connect the low audio signal from
the stereo system at input terminals A
and B of the audio amplifier and pro¬
vide mains AC to activate the circuit.
without overheating is obtained.
You can also replace these transistors
with another pair of suitable high-
power transistors.
For driving transistors T2 and T3,
output circuit, two output transistors During the first half cycle of an AF a 9V audio driver transformer having
are connected in series between the cycle, transistor T2 conducts and the six leads is used. It is readily available
positive and ground and biasing is ad- current flows from positive rail to in the market and reasonably matches

□1-04- 144007 R3

iC>-
UK
I
t
230V AC
MHz
p
K
XI

S
D1 □2
C1 +
»=F
Ri
ioon
X2
BD139
HEAT

I o
F D4 D3 C3 +
R4
68ft
+
_ ,£f
ce
NO
X1=230V
AC PRIMARY
TO 9V-0-SV, 300mA
J LS1
4ft,1W
SECONDARY
TRANSFORMER
X2-9V AUDIO DRIVER
TRANSFORMER WrTH
SIX LEAD
C2 +
O
R2 .
100K;

:UK
ECL
BD139
SINK

AUDIO0 BC548
INPUT
o Rfi _ 100i
+1 04
470f

I!R *I
j usted so that each transistor gets half ground rail (centre tap of transformer the output and input impedances of
the supply voltage. XI) via the loudspeaker coil (connected the preceeding and succeeding stages.
The circuit presented here is a between the emitter of transistor T2 To test the quality of the audio
simple audio amplifier for a personal and ground) in one direction. While output, connect the stereo's outputs
stereo system. In this, supply voltage in the second half cycle, transistor T3 to the respective terminals A and B.
to each transistor can be enhanced to conducts and the current flows from Now increase the volume level of
produce a larger output. The audio ground rail to negative rail via the the stereo slowly. If you get a
driver transformer drives the transis¬ loudspeaker coil (connected between high-level, high-quality sound across
tors adequately. ground and the collector of transistor loudspeaker LI, the amplifier is
A 9V-0-9V, 300mA transformer has T3) in a direction opposite to the pre¬ working well. If the sound quality is
been used in the set-up. Out of vious flow. not good, decrease the volume level
the four diodes (D1 through D4), two Transistors T2 and T3 of the until the audio amplifier gives good
are used for developing the positive pushpull audio amplifier should results.
voltage rail (+9V) and the other be matched correctly. If these transis¬ Note that this audio amplifier
two are used for developing the tors get heated, change the bleeding works well for low-level audio
negative voltage rail (-9V). In the resistor pairs (R3 and R4 for transis- signals. •
76 • JANUARY 200S • ELECTRONICS FOR YOU WWW.EFYMAG.COM
CIRCUIT
IDEAS

MUSICAL LIGHT CHASER TV pwwÿpj

m DEBARAJ KEOT ranged in zig-zag fashion. The bulb lighting effect generator circuit. You
sets glow one after another depending just need to place the gadget near the

T
his music-operated lighting ef¬ on the intensity of the audio signal. speakers of the music system.
fect generator comprises five No electrical connection is to be made Fig. 1 shows the complete circuit
sets of 60W bulbs that are ar- between the music system and the of the musical light chaser, while Fig.

L
O- o/b oN> t |
W
I*1
t
230V AC
F1
5A
FUSE
„31
ON/OFF
8WITCH
P
11
11

8
D1
1N4007


IN
1 LM7809 3
Ol/T

r >4 I
60Hz
g R7

I
O
X1=230V
02
1N4007 C1
1000p
25V
-J- 02
0.1M
GND
±;«
T°-1M T
6800

N
AC PRIMARY
TO 12V-0-12V, 250mA
SECONDARY
TRANSFORMER

R1
8-2K T1-T5 ■ BC557

R2
102
- TR1-TR5 ■ BT136 TR1AC
ZL1-ZL5 = MULTICOLOUR ZIG-ZAG
LKMHTSOWj 230V

10K 9
1
8 rtA’
4rai| MTl|ÿ|
MT2
R3 ZL1
.. S.8K 8EN8mVTTY


HC5 Q

0.1 M
FATT
US. VR-I R10
1K
T2
47K
IC2ÿ>w VA*
6 + u 8
R11
MnhjjMTZ
4
i><r C8
0.47u 470ft

Zl_2

D COND.
MIC
SRA
10K
16V

R12
\ TR2
G

1K
R5 >
IC3 3
10K< LB1403 £L1MMT2
R13
470ft 7S ZL3

R14 T4
1K
4
WTl|tejMT2 ... H.
//1™
R16 ZL4
C7 + 470ft TR4
iii1K
25V G

R16 T5

Q
VR2
6
1K

MT1BBMT2 .0.
22K R17 ZL5
470ft TR5
G

Fig. 1: Circuit diagram of musical light chaser

82 • JANUARY 2005 • ELECTRONICS FOR YOU WWW.EFYMAG.COM


CIRCUIT
IDEAS
2 shows pin configurations of 9V regu¬ FRONT VIEW FRONT VIEW The time constant can be changed by
lator 7809, triac BT136 and level meter o FRONT VIEW changing the values of resistor R6,
O
IC LB1403. LB1403
variable resistor VR2 and capacitor
BT
The circuit is powered by regulated LM7809 136 C7. Here, variable resistor VR2 is used
9V DC. The AC mains is stepped down 1 2| 1 9 for varying the response speed of the
by transformer XI to deliver a second¬ MTll MT2 G chaser light as desired. When VR2 is
ary output of 12V AC at 250 mA. The set in the minimum resistance posi¬
transformer output is rectified by a
IN
IJM „P
tion, the response is very fast, and
full-wave rectifier comprising diodes Fig. 2: Pin configuration when it is set at the maximum resis¬
D1 and D2 and filtered by capacitors tance, the response is slow.
Cl and C2. Regulator IC 7809 (IC1) plifier, comparators and constant cur¬ The complete circuit including the
provides regulated 9V power supply rent source at its output pins. power supply can be constructed on
to the circuit. Closing switch SI pro¬ Depending on the intensity of the any general-purpose PCB or
vides power to the circuit and LED1 input audio signals, all or some out¬ a small Vero board. Triacs TR1
glows to indicate that the circuit is puts of IC3 go low to drive transistors through TR5 should be kept away
ready to work. T1 through T5, which, in turn, fire the from the op-amp and its related com¬
When you put your music system corresponding triacs TR1 through TR5 ponents. The metallic parts of the
in front of the condenser microphone via their gates and multicoloured zig¬ triacs should not touch each other and
of the light chaser, the sound pressure zag bulb sets comprising ZL1 through the other parts of the circuit. After
variation is converted into electrical ZL5 glow. assembling the circuit, house it in a
signals by the condenser microphone. When the audio level is low, only suitable shockproof plastic cabinet.
These weak electrical signals are am¬ triac T1 is fired and the zig-zag bulb Make some holes in the cabinet for
plified by op-amp pA741 (IC2), which set ZL1 turns on and off sequentially. heat dissipation.
is configured as an inverting ampli¬ When the audio level is high, triacs Note. 1. Some zig-zag lights have
fier. Using preset VR1 you can set the TR1 through TR5 get fired and all the a special bulb called 'master bulb' for
sensitivity of the circuit. bulb sets (ZL1 through ZL5) turn on automatic flickering. It should be
The amplified output is fed to IC and off sequentially. removed and replaced with a simple
LB1403 (IC3) at its input pin 8. IC3 is a Pin 7 of IC3 is used for selecting non-flickering colour bulb.
five-dot LED level meter commonly the response speed of the lighting. 2. Never touch any naked part of
used in stereo systems for LED The larger the time constant, the the circuit when it is connected to the
bargraph displays. It has a built-in am- slower the response, and vice versa. mains. •

WWW.EFYMAG.COM ELECTRONICS FOR YOU • JANUARY 2005 • 83


CIRCUIT
8s*

ATMEL AVR ISP DONGLE 1

■ EFY LAB g rammed is sent on this pin parallel port.


3. SCK (Shift Clock): Serial clock IC 74LS244 (IC1) acts as a buffer as

A
tmel's AVR microcontroller generated by the programmer from the well as an isolator circuit when the
chips are in-system program¬ PC. AVR is not in programming mode. In
mable (ISP), i.e. these can be 4. RST (Reset): Reset (low pulse) idle mode, all the outputs are tristated
programmed directly in the target cir¬ generated by the program. The AVR so as not to affect the operation of the
cuit. A special programmer software is programmed while in reset state. target system.
is used to download the program from Here's a dongle circuit for in-sys- When the AVR's ISP mode is se¬
the PC into the AVR's flash memory. tem programming of Atmel's AVR chip lected, the lower half of IC 74LS244
Atmel offers a software package called AT90S8515 using such software pack¬ is enabled, pulling the target system's
the Atmel AVR ISP that allows pro¬ ages as Atmel ISP 2.65 and Reset line low. Once the target
gramming of the AVR microcontrollers PonyProg2000. Though not exactly the system is in Reset mode, the SCK,
in the circuit using a simple dongle. A same, a similar dongle circuit can be MISO and MOSI lines are no longer
dongle is nothing but an adaptor cable found at the Website 'www.iready.org/ loaded by the peripheral circuitry, if
that connects the PC's parallel port projects/ uinternet/ispdongle.pdf.' any, on the target system. Now, it is
with the ISP pins of the AVR chip for The PC's parallel-port pins 4 and safe to enable the upper half of
programming. 5 drive buffer IC 74LS244 by enabling 74LS244, driving the MOSI, LED and
For programming, the four lines re¬ its pins 19 and 1, respectively. A low SCK lines of the dongle. The RST pin
quired from the AVR chip to the ISP pulse on these pins will allow the becomes high after the AVR is pro¬
adaptor (dongle) are: passing of the serial clock and data grammed. Glowing of LED2 indicates
1. MOSI (Master Out, Slave In): during programming. MOSI, LED, that the AVR is in programming mode.
Data being transmitted to the AVR be¬ SCK and RST outputs are buffered There are two standard connectors
ing programmed is sent on this pin from the parallel port's pins 7, 8, 6 for in-system programming of Atmel
2. MISO (Master In, Slave Out): and 9, respectively. The MISO input AVR microcontroller. One is the 10-
Data received from the AVR being pro- from the AVR is fed into pin 10 of the pin header (dual-in-line (DIL) connec-

R3
6200

o'
25-PIND-TYPE
MALE CONNECTOR
PARALLEL PORT +5V JO ci +T T AV* .
ON/OFF
140 Ql DO SWTTCN
100(1
JL
R1 R2
:100K 6600 : cSaf>
r
ST 1 20
O Q2 D1
COM2 COM3 m 19
LEW 40
°o± D2
o o 1A1
2 18
1Y1
COM4

°
18?o*
o* D3

D4
o
o
o
o
1A2
1A3
4
6
16
«
1Y2
1Y3
I MOSI

f 1A4
|C1
74LS244 12 1Y4 SCK 40 PIN
° o* D5
o o 2Y1
8
9 11
2A1 MISO
6
7
7
ZIF
SOCKET
°o* D6
o o 2A2
13 7
2Y2 RST
9
FOR
AVR

V
C 1
07

D6
o o
2A3
2A4
15 5
3
2Y3
2Y4 16

C)
o o 10
19
GND
()
cP- o o 6MHz
20
C3 1 C4
33P-i— T-22P
-O T
X o13
\J --
COM2 8-PM FEMALE CONNECTOR
CONS 8-PM MALE CONNECTOR
COM4 = S-PM «IL MALE CONNECTOR

• FEBRUARY 2005 • ELECTRONICS FOR YOU WWW.EFYMAG.COM


CIRCUIT
IDEAS
tor)) used on the Atmel STK kits. The the dongle is identified as a value- 6-line cable of about 30cm length is
other is a 6-pin header (DIL connec¬ added pack dongle. required for connecting this ISP adap¬
tor) used in Atmel ISPs. The two loop- Here, we've used an 8-pin single-in¬ tor (dongle) to the target circuit.
back connections, pin 2-to-pin 12 and line (SIL) connector and an additional If the AVR is not on the target cir¬
pin 3-to-pin 11 of the parallel port, are 6-pin SIL connector for the Atmel pro- cuit, you can insert the AVR into the
used to identify the dongle. With only gramer circuit. With the buffer and the ZIF socket and program it. Regulated
pin 2-to-pin 12 link, the dongle is 40-pin ZIF socket in this circuit, it can be 5V DC is required for the AVR and
called STK300 or AVR ISP dongle. used as a standalone programmer. The the associated dongle circuit, whose
With only pin 3-to-pin 11 link, the 6-pin SIL male connector is used for terminals are also provided in connec¬
dongle is called STK200 or old Kanda connection between the dongle and the tor CON4. LED1 is used as the power
ISP dongle. With both links in place, AVR on the target board . Thus, another •
indicator for the circuit.

WWW.EFYMAG.COM ELECTRONICS FOR YOU • FEBRUARY 2005 •


CIRCUIT
\o

AUTO TURN-OFF
BATTERY CHARGER
■ Y.M. ANANDAVARDHANA to energise electromagnetic relay RL1. Pushing switch SI latches relay
Relay RL1 is connected to the collec¬ RL1 and the battery cells start charg¬

T his charger for series-connected


4ÿoell AA batteries automatically
disconnects from mains to stop
charging when the batteries are fully
tor of transistor Tl. Transistor T1 is
driven by pnp transistor T2, which, in
turn, is driven by pnp transistor T3.
Resistor R4 (10-ohm, 0.5W) is con¬
ing. As the voltage per cell increases
beyond 1.3V, the voltage drop across
resistor R4 starts decreasing. When it
falls below 650 mV, transistor T3 cuts
off to drive transistor T2 and, in turn,
charged. It can be used to charge par¬ nected between the emitter and base
tially discharged cells as well. of transistor T3. cuts off transistor T3. As a result, re¬
The circuit is simple and can be When a current of over 65 mA lay RL1 de-energises to cut off the
divided into AC-to-DC converter, relay flows through the 12V line, it causes a charger and red LED1 turns off.

S1- PUSH-TOON
TACTILE SWITCH FRONT VIEW
ffl
ifl
ADJjl I 'IN
OUT
D1-D« = 1ftN4001
RL1 ■ 1ZV, 2000, 1CK> RELAY
R4
ion
0.5W

IN «1
3 LM317 2

ADJ
OUT.

R6 I0%
□8

2200'
T1
IX1 D1 D2 BC65S T3
NK> BC669

N/C R1
- T2
BC868
BATTERY
1j6«4
AACELL
0
K
□3 33«
ONTACTB OF D4 + R2 R3
RELAY RL1 10K 100K
N
X1 -230V AC PRIMARY TO 9V. 750mA
’ST LED1
RJ-1
SECONDARY TRANS3FORMER

driver and charging sections. voltage drop of about 650 mV across You may determine the charging
In the AC-to-DC converter section, resistor R4 to drive transistor T3 and voltage depending on the NiCd cell
transformer XI steps down mains 230V cut off transistor T2. This, in turn, turns specifications by the manufacturer.
AC to 9V AC at 750 mA, which is rec¬ transistor Tl 'on' to energise relay RL1. Here, we've set the charging voltage
tified by a full-wave rectifier compris¬ Now even if the pushbutton is re¬ at 7.35V for four 1.5V cells. Nowadays,
ing diodes D1 through D4 and filtered leased, mains is still available to the 700mAH cells are available in the mar¬
by capacitor Cl. Regulator IC LM317 primary of the transformer through its ket, which can be charged at 70 mA
(IC1) provides the required 12V DC normally open (N/O) contacts. for 10 hours. The open-circuit voltage
charging voltage. When you press In the charging section, regulator is about 1.3V.
switch SI momentarily, the charger IC1 is biased to give about 7.35V. Pre¬ The shut-off voltage point is deter¬
starts operating and the power-on set VR1 is used for adjusting the bias mined by charging the four cells fully
LED1 glows to indicate that the voltage. Diode D6 connected between (at 70 mA for 14 hours). After measur¬
charger is 'on.' the output of IC1 and battery limits ing the output voltage, add the diode
The relay driver section uses pnp the output voltage to about 6.7V, drop (about 0.65V) and bias LM317 ac¬
transistors Tl, T2 and T3 (each BC558) which is used for charging the battery. cordingly. •

• FEBRUARY 2005 • ELECTRONICS FOR YOU WWW.EFYMA6.COM


CIRCUIT
IDEAS

DIGITAL AUDIO/VIDEO
INPUT SELECTOR
IVEDI
S.C. DW

„ T.K. HAREENDRAN

N
eed to connect more than one S1 once. To select the second AV sig- inputs are connected to the second AV
audio-video (AV) source to nal, press switch S1 twice. In the same signal (not shown in the figure). LED4
your colour television? Don’t way, you can select the other two sig- (not shown in figure) glows to indi-
worry, here’s an AV input expander nals. cate this.
for your TV. It is inexpensive and easy Momentarily pressing of switch S1 Similarly, pressing switch S1 thrice
to construct. once results in clocking of the decade makes the Q3 output of IC1 high. Con-
The working of the circuit is simple counter and relay driver transistor T1 sequently, 2C/O relay RL3 (not shown
in the figure) energises
N/01 and the television inputs

I
O o
+12V
L\\ o VIDEO IN are connected to the
LED3 g
+ 100ÿC2 D2 N/C1
C1 -1- 1N4001 third AV signal source.
0.1M~r R2 R5 O N/02_ AUDIO IN
o-o
25V I
22K 1K
Vcc R4
TV SET LED5 (not shown in the
R1 16 2 Q1 1K
A/WV
N/C2 figure) glows to indicate
O O 14 RL1
1K T1
S1
BC547 this.
SELECT
R 4 Q2 o) VIDEO-IN 1 Again, pressing
15
IC1 +12V N/01
o) AUDIO-IN 1 switch S1 four times
o o

1 makes the Q4 output of


CD4017 7 03
O < <-
Q5
1 D5 § «£5 N/C1 IC1 high. Consequently,
S2 1N4001 LED6 o
LED1 RESET
o
Q4 R11 O 2C/O relay RL4
10 1K

R3
8 13 3 R10
1K N/C2
o) VIDEO-IN 4 energises and the TV in-
R12 — ww
1K GND Q0
T4
RL4 o) AUDIO-IN 4 puts are connected to the
1K BC547
RL1, RL4 = 12V, 200Q fourth AV signal source
GND _\\ LED2 2C/0 RELAY
O (marked as Video-in 4
S1, S2 = PUSH-TO-ON SWITCH
and Audio-in 4). LED6
glows to indicate this.
and straightforward. Whenever 12V conducts to energise relay RL1. Now Further pressing of switch S1 resets
DC is applied to the circuit, power-on normally opened (N/O) contacts of the decade counter and LED2 glows
LED1 glows. Now reset the decade two-changeover relay RL1 connect the again. Thereafter, the cycle repeats. The
counter by momentarily pressing television set’s inputs to the first AV circuit is wired for four-input selec-
switch S2 to make Q0 output of IC1 signal (marked as Video-In 1 and Au- tion, therefore the Q5 output of IC1 is
high. LED2 glows to indicate that the dio-in 1). LED3 glows to indicate this. connected to reset pin 15 of IC1.
circuit is ready to work. When you press switch S1 twice, Enclose the assembled PCB along
Switch S1 is used for selecting a the Q2 output of IC1 goes high. Con- with the relays in a cabinet with the
particular audio-video (AV) signal. To sequently, 2C/O relay RL2 (not shown input/output sockets and indicators
select the first AV signal, press switch in the circuit) energises and television mounted on the body of the cabinet. z

PCB FOR 8085


Available at:
MICROPROCESSOR KIT

D
Kits‘n’Spares
(EFY NOVEMBER 99) 303, Dohil Chambers, 46, Nehru Place,
New Delhi 110019; Phone: 26430523,
26449577; E-mail: kits@efyindia.com
WITH ALL ITS ICs

108 • MARCH 2005 • ELECTRONICS FOR YOU WWW.EFYMAG.COM

CMYK
CIRCUIT
DEAS

SIMPLE DIGITAL
SECURITY SYSTEM
■ PHERDAUS ISLAM nected as shown in Fig. 1. If you don't
want to use a buzzer, switch it off by \ (

I
Y
ou can use this simple and reli¬ opening switch S2. :
able security system as a watch¬ The circuit works off a 9V regu¬
dog by installing the sensing lated power supply. However, battery E3
ENAMELLED
loops around your building. You have back-up is recommended. A common- 1 COPPER WIRE

to stretch the loop wires two feet above cathode, 7-segment display (LTS543) § 32 SWGTYPE

the ground to sense the unauthorised is used for displaying whether the EZ3
UNDERGROUND
entry into your premises. loops are intact or not. ft
: :.
ORWRL
PROTECTED
CABLE.
W ire loops 1, 2 and 4 are connected If loop 1 is broken, the display will COWECTB
to the A, B and C inputs of 7-segment show '1'. If two or all the three loops LOOPTO UNIT
LOOP-1
decoder 4511 (ICl), respectively, while are broken, the display will show the
the D input of ICl is grounded perma- sum of the respective broken loop Fig. 2: The proposed wiring diagram of loops

+9V
S1
ON/OFF
SWrTCH
R1 R2 R3
R1-R3
- -
47K, S1-S2-ON/OFF SWITCH
IC2 (N1-N2) C04000
S2
ON/OFF
SWITCH
PZI
PIEZO¬
BUZZER
k l_l

m
Vcc DIS1 14
3 4 18 h 3
R6
Q1 1K

C
2
15
14
i2-*4
la
5
N1
8
X)
13 BC54B
B
1
IC1 12 7
A
4511 11
7
10
fi
5 6 6 3.6
DBS-1 = LT8S43
COMMON CATHODE

QND
51515 R4
700
47«
DISPLAY

Fig. 1: The digital security system circuit

nently. The loops are also connected to numbers. For example, if loops 1 and transistor T1 in cut-off position and the
a dual 3-input NOR gate and inverter 4 are broken, the display will show piezobuzzer does not sound.
CD4000 (EC2) to activate the alarm. 5(1+4). When any loop is broken, the out¬
Fig. 1 shows the circuit of the digi¬ When all the three loops are intact, put of NOR gate N1 goes low, while
tal security system, while Fig. 2 shows the display will show '0.' All the three the output of gate N2 goes high. T ran-
the proposed wiring diagram for the inputs of gate N1 remain low to give a sistor T1 conducts and the buzzer
loops around the premises. Before us¬ high output. This high output is fur¬ sounds to alert you. You can mute the
ing this security system, make sure ther given to gate N2 and, as a result, buzzer by switching off power to the
that loops shown in Fig. 2 are con- its output remains low. This keeps circuit through switch SI. •

WWW.EFYMAG.COM ELECTRONICS FOR YOU • MARCH 2005 • 10S


CIRCUIT
IDEAS

MICROMOTOR CONTROLLER EQMAR

■ V. DAVID connected between the outputs (pin 3) tor in conjunction with switch SI. If

u
ofICl and IC2. you press switch S3 after pressing
sing tit is circuit, you can con¬ Closing switch S5 provides power switch SI, pin 3 of IC3 goes high, while
trol the rotation of a DC to the circuit. Now, when you press its pin 4 goes low. The motor now
micromotor simply by press- switch SI momentarily, pin 10 of IC3 starts rotating in the forward direction.

81-84 ■ PUSH-TOON SWITCH 8ft ■ ON/OFF SWITCH


✓o
S5 +-SV
14 IC3 (N1-N4) ■ CD4011 a
{FOR)
1
N1
3 I □i N3 17
filn R1
2
R3 8 4 8 4
oh
6 M1 6
y _H , (OM)

84jO t** d R4
R9 M2 | R8;
:H
9* S2
?
t
4 T
(REV) 6 N2 N4 13 (OFF)
R7 R10
LED1 7

--
Rl-fU 1D0K
R7-R10 IK LED3
HI -8V DC MOTOR
EZ2S1 i
LED2

ing two push-to-on switches momen¬ goes high, while its pin 11 goes low. However, if you press switch S4 after
tarily. Since pin 10 of IC3 is connected to reset pressing switch SI, the motor will ro¬
The circuit is built around two pin 4 of IC1 and IC2, the high output at tate in reverse direction.
NE555 ICs (IC1 and IC2) and a quad- pin 10 of IC3 will enable IC1 and IC2 Note. The complete kit of this cir¬
NAND IC CD4011 (comprising NAND simultaneously. When switch S2 is cuit can be obtained from
gates N1 through N4). The NE555 ICs pressed, pin 10 of IC3 goes low, while Kits'n'Spares, 303, Dohil Chambers, 46,
(ICl and IC2) are configured as invert¬ its pin 11 goes high. The low logic at Nehru Place, New Delhi 110019;
ing buffers. IC CD4011 (IC3) NAND pin 10 disables both IC1 and IC2. Phone: 011-26430523, 26449577;
gates are configured as bistable flip- Switches S3 and S4 are used for Website: www.kitsnspares.com;
flop. The DC motor to be controlled is forward and reverse motion of the mo- E-mail: kits@efyind ia.com •

WWW.EFYMAG.COM ELECTRONICS FOR YOU • APRIL 2005 • 63


CIRCUIT
IDEAS

SOLAR BUG SAMI

small as 3 cm2.
If a digital voltmeter is connected
■ D. SOMNATH across capacitor C2, a slow build-up
92
5m 1K of voltage can be observed when the
<10M

H
ide this solar-powered circuit T2 panel is exposed to light. Transistors
BC55B
suitably and see the reaction iLcT T1 and T2 form a relaxation oscillator.

IK
T1
of your friends to the chirpy TJB BC64S CZ+L
47u „
When Cl charges to 0.6V, transistor
sound produced by it every few min¬ 10V T1 conducts and the charge built up
utes. In all probability, it will coax MINIATURE
SOLAR in C2 is discharged through the
+
them to find out where the sound is PZ1 PANEL piezobuzzer to produce a short beep.
1.5V-2.5V

i
PIEZO¬
coming from. BUZZER CITIZEN
CT-600
While testing the circuit, the value
The circuit runs off a miniature so¬ of resistor R1 can be reduced to, say, 1
lar power panel, which can be taken kilo-ohm Use a good-quality buzzer
out from an old calculator such as Citi¬ 2.5V is required. Note that the circuit to ensure that the sound produced is
zen CT-500. A panel giving 1.5V to can work properly from a panel as loud enough. •

WWW.EFYMAG.COM ELECTRONICS FOR YOU • APRIL 200S • 67


CIRCUIT

MAINS SUPPLY FAILURE ALARM

■ TK. HAREENDRAN

RL1
- »V. 1500 1C/0 RELAY

W
henever AC mains supply N L
fails, this circuit alerts you ' 230V AC'
50 Hz
CONTACTS
ma '
°- ®— BUZZER
O''
0FRL1 SI
by sounding an alarm It also SPST
D2 OtWOFF
provides a backup light to help you
find your way to the torch or the gen¬ *1
0.6W
> R4 1N40Q7 RL1 SWITCH

erator key in the dark.


The circuit is powered directly by
R2
390S1 R6
2.2M 11 1fi 13 R7
f
a 9V PP3/6F22 compact battery. Press¬
ing of switch SI provides the 9V power
10
O 4 7K
'ÿ£)
BC548
*TT* LED2ÿ
supply to the circuit. A red LED 15 ■<»
CD4538
(LED2), in conjunction with zener di¬
It ■ss?
ode ZD1 (6V), is used to indicate the R3

s
C1 B
i2on
battery power level. Resistor R9 limits
the operating current (and hence the
brightness) of LED2. + C3
8 4.7K BC6E7 I
— H LED1
MV
Rfi
470«
:ÿioou
26V
When the battery voltage is 9V, jJ
LED2 glows with full intensity.
IC1
MCT2E
l± GNO

As the battery voltage goes below 8V,


the intensity of LED2 decreases and
it glows very dimly. LED2 goes off CD4538 (IC2) is used here. goes low and pnp transistor T2 gets
when the battery voltage goes below When mains goes off, IC2 is trig¬ forward biased to light up the white
7.5V. gered after a short duration deter¬ LED (LED1). Light provided by this
Initially, in standby state, both the mined by components Cl, R4 and C3. back-up LED is sufficient to search the
LEDs are off and the buzzer does not Output pin 10 of IC2 goes high to for¬ torch or generator key.
sound. The 230V AC mains is directly ward bias relay driver transistor T1 via During the mono time-out period,
fed to mains-voltage detection resistor R7. Relay RL1 energises to ac¬ the circuit can beswitched off by open¬
optocoupler IC MCT2E (IC1) via resis¬ tivate the piezobuzzer via its N/O con¬ ing switch SI. The 'on' period of the
tors Rl, R2 and R3, bridge rectifier BR1 tact for the time-out period of the monostable multivibrator may be
and capacitor Cl. Illumination of the monostable multivibrator (approxi¬ changed by changing the value of re¬
LED inside optocoupler IC1 activates mately 17 minutes). At the same time, sistor R5 or capacitor C2.
its internal phototransistor and clock the N/C contact removes the positive If mains doesn't resume when
inputpin 12 of IC2 (connected to 9V via supply to resistor R4. The time-out pe¬ the 'on' period of the monostable
N/C contact of relay RL1) is pulled riod of the monostable multivibrator lapses, the timer is retriggered after a
low. Note that only one monostable of is determined by R5 and C2. short delay determined by resistor R4
dual-monostable multivibrator IC Simultaneously, output pin 9 of IC2 andC3. •

WWW.EFVMAG.COM ELECTRONICS FOR YOU • MAY 2005 • 8S


CIRCUIT
IDEAS

REMOTE CONTROL FOR


HOME APPLIANCES
•S. MOHAN nal is fed to dock pin 14 of decade appliance. T ransistor T2 (BC548) con¬

c
counter IC CD4017 (IC1). Pin 8 of IC1 nected to pin 2 of IC1 drives relay RL1.
onnect this circuit to any of is grounded, pin 16 is connected to Vcc Diode 1N4007 (Dl) acts as a freewheel¬
your home appliances (lamp, and pin 3 is connected to LED1 (red), ing diode. The appliance to be con¬
fan, radio, etc) to make the which glows to indicate that the ap¬ trolled is connected between the pole of
appliance turn on /off from a TV, VCD pliance is 'off.' the relay and neutral terminal of mains.
or DVD remote control. The circuit can The output of IC1 is taken from its It gets connected to live terminal of AC
be activated from up to 10 metres. pin 2. LED2 (green) connected to pin 2 mainsvia normally opened (N /O) con¬
The 38kHz infrared (IR) rays
generated by the re¬
is used to indicate the 'on' state of the tact when the relay energises. •
mote control are re¬ 18,
RLI ■moon,
ceived by IR receiver R5
470 1C7D RELAY
module TSOP1738 of TV/VCD 2 WO,
the circuit. Pin 1 of REMOTE
CONTROL 3 Vcc
TSOP1738 is connected IRX1 16
TSOP BC668" R
toground, pin 2 isoon- 1738 RLI
nected to the power R1 |C1 LI
C1 +
supply through resis¬
tor R5 and the output
«4 C2
0.1(1
220K

R2
3CD40172
02
Oi
R3
. IK
VM
Cu
100W
230V
BULB
TSOP FRONT J
is taken from pin 3. The 1738 VIEW 330n a 13 BC548 N
230V AC
output signal is ampli¬

1
3ÿ. GND 60Hz
2 a LED2
12 3
fied by transistor T1 LED1 GND
GW) OUT -O
Wcc
(BC558).
The amplified sig-

82 • MAY 2005 • ELECTRONICS FOR YOU WWW.EFYMA6, CO M


CIRCUIT
"MU A
J

BRAKE FAILURE INDICATOR


■ D. MOHAN KUMAR monitoring the brake switch and re¬ ing elements R7 and C4 make the out¬
minds you of the condition of the put high for one second to activate the

D
o you want to get an early brake every time the brake is applied. buzzer and LED2. Usually, the trigger
warning of brake failure The circuit uses an op-amp IC pin of IC3 is high due to R6 and the
while driving? Here is a CA3140 (IC2) as voltage comparator buzzer and LED2 remain 'off.'
brake failure indicator circuit that con¬ and timer NE555 (IC3) in monostable When the brake pedal is pressed,
stantly monitors the condition of the configuration for alarm. Voltage com¬ pin 2 of IC2 gets a higher voltage from
brake and gives an audio-visual indi- parator IC2 senses the voltage level the brake switch and its output goes
low to switch off
OFFrciir-| the red LED. The
OUT IC4 IN
FROM
'
3 7812
M-orf*-
D2
low output of IC2
R6
IOOK:
R7
4-70K COM 1N4007 81 gives a short nega¬
IONimo
swrrc H tive pulse to the
_ - D1 SWITCH 4 J + monostable
1N40Q7 7
C2 " C7
0.02>J 6 C6 through C2 to trig¬
1 1+
CA3140ÿ> 2 ICS a ger it. This acti¬
&
■—
IN IC1 OUT
17812 3
COM

- R1
> R4
R5 £
1700
J+
NE5S5

5
iR8
4700 1QK
CAR
BATT. vates the buzzer
Q-
and LED2 to indi¬
cate that the brake

i is working.
Cl :IOK ;IOK
system
’S' LED! -
C3 . C4 05
0.01m
PZ1
PIEZO¬ When there is pres¬
V Si Si 10u
BUZZER
sure drop in the
VEHICLE'S BODY GROUND
brake system due
to leakage, LED1
cation. When the brake is applied, the across the brake switch. Its non-invert¬ remains 'on' and the buzzer does not
green LED blinks and the piezobuzzer ing input (pin 3) gets half the supply sound when the brake is applied.
beeps for around one second if the voltage through potential divider re¬ The circuit can be assembled on
brake system is intact If the brake fails, sistors R3 and R4 of 10 kilo-ohms each. any general-purpose PCB or perfo¬
the red LED glows and the buzzer The inverting input (pin 2) of IC2 is rated board. Connect point A to that
stops beeping. connected to the brake switch through terminal of the brake switch which
The circuit will work only in ve¬ diode Dl, IC 7812 (IC1) and resistor goes to the brake lamps. The circuit
hicles with negative grounding. It also R2. It receives a higher voltage when can be powered from the vehicle's
gives an indication of brake switch fail¬ the brake is applied. battery.
ure. Normally, when the brake is not The circuit requires well-regulated
In hydraulic brake systems of ve¬ applied, the output of IC2 remains power supply to avoid unwanted trig¬
hicles, a brake switch is mounted on high and the red LED (LED1) glows gering while the battery is charging
the brake cylinder to operate the rear The output of IC2 is fed to trigger pin from the dynamo. IC4, C6 and C7 pro¬
brake lamps. The brake switch is fluid- 2 of the monostable through coupling vide regulated 12V to the circuit. The
operated and doesn't function if the capacitor C2. Resistor R1 is used for power supply should be taken from
fluid pressure drops due to leakage. the input stability of IC2. IC1 and Cl the ignition switch and the circuit
The fluid leakage cannot be detected provide a ripple-free regulated supply ground should be clamped to the
easily unless there is a severe pressure to the inverting input of IC2. vehicle's body. A bicolour LED can
drop in the brake pedal. This circuit IC3 is wired as a monostable to be used in place of LED1 and LED2
senses the chance of a brake failure by give pulse output of one second. Tim- if desired.•

88 • JUNE 2005 • ELECTRONICS FOR YOU WWW.EFYMAG.C0 M


CIRCUIT
IDEAS
counter.
The anode of the SCR is connected

SAFETY GUARD to +9V and the cathode is connected


to the relay coil. The other pin of the
relay coil is connected to the negative
supply, while its contacts are used for
■ A. RAMESH BABU a 14-bit binary ripple counter. Here switching on the appliances.
the clock oscillations are governed Whenever power to the appliances

P
rotect your home appliances by resistor R1 and capacitor Cl. In is switched on or resumes after mains
from voltage spikes with this this circuit, only two outputs of the failure, the oscillator starts oscillat¬
simple time delay circuit. IC (Q5 and Q14) have been used. Q5 ing and LED1 blinks. This continues
At the heart of the circuit is IC is connected to an LED (LED1) and for three minutes. After that, Q14 out¬
CD4060, which consists of two in¬ Q14 is used to trigger the gate of the put of IC CD4060 goes high to trig¬
verter gates for clock generation and SCR tit rough D4 as well as reset the ger the gate of the SCR through D4.
At this moment,
IN IC1 OUT
the voltage is
A D1
H 1 7809 3
SCR1 G
available at the
Rfi N/O
1N4007 2P4M
4700 cathode of the
+ MW SCR, which

i
12V
-p C1
1000u
25V ca
IC2
s Q1V|
gl !r T -t « LED2
D3
1N4007

4|[)
S® energises the relay

ic!”
230V AC r
rW coil to activate the
flvjson

I
SQHz
|O02M CD4080 1N4140 <R7 1 era
1QK
0 3ELAY I appliance and
12V 06
rVAV
0

5
-r 1 \_OQ N
230V AC LED2 glows.
XI
D2
12
RESET
R4
B6K
+T~c*10u
SQHz
Switch SI is used
V
O-
1N4007 yÿLEDI
X1-ZS0VACP RMAKY TO 12W0-1W,2ttrnA SECONDARY TRANSFORMER
I 25V

TTTKAG
for quick start
without waiting

for delay.

WWW.EFYMAG.COM ELECTRONICS FOR YOU • JUNE 2005 • 91


CIRCUIT
\VJ

FUEL RESERVE INDICATOR


FOR VEHICLES
■ D. MOHAN KUMAR by sensing the voltage vatiation de¬ 'on' time will be around four minutes.
veloped across the meter and activates The output of IC2 is used to power

H
ere is a simple circuit for moni¬ the beeper when the fuel tank is al¬ the astable circuit consisting of tinier
toring the fuel level in ve¬ most empty. Its point A is connected 555 (IC3) via diode D2. Oscillations of
hicles. It gives an audiovisual to the input terminal of the fuel meter IC3 are controlled by R6, R7, VR2 and
indication when the fuel level drops and point B is connected to the body C4. With the given values, the 'on' and
alarmingly below the reserve level, of the vehicle. 'off' time periods are 27 and 18 sec¬
helping you to avoid running out of The circuit consists of an op-amp onds, respectively. The pulses from IC3
petrol on the way. IC CA3140 (IC1), two 555 timer ICs are given to the clock input (pin 14) of
Nowadays vehicles come with a (IC2 and IC3) and decade counter decade counter CD4017 (IC4) and its
dash-mounted fuel gauge meter that CD4017 (IC4). outputs go high one by one.
indicates the fuel levels on an analogue Op-amp IC CA3140 is wired as a When the circuit is switched on,
display. The 'reserve' level is indicated voltage comparator. Its inverting in¬ LED1 and LED2 glow if your vehicle
by a red marking in some vehicles, but put (pin 2) receives a reference volt¬ has sufficient petrol in the tank.
the needle movement through the red age controlled through VR1. The non¬ When the fuel goes below the reserve
marking may be confusing and not inverting input (pin 3) receives a vari¬ level, the output of IC1 goes low, LED1
precise. This circuit monitors the fuel able voltage tapped from the input ter¬ turns off and a negative triggering
tank below the reserve level and warns minal of the fuel meter through resis¬ pulse is received at pin 2 of IC2. The
through LED indicators and audible tor Rl. output of IC2 goes high for around
beeps when the danger level is ap¬ When the voltage at pin 3 is higher four minutes and during this time pe¬
proaching. than at pin 2, the output of IC1 goes riod, clock pin 14 of IC4 receives the
The fuel sensor system consists of a high and the green LED (LED1) glows. clock pulse (low to high) from the
tank-mounted float sensor and a cur¬ This condition is maintained until the output of IC3.
rent meter (fuel meter), which are con¬ voltage at pin 3 drops below that at For the first clock pulse, QO output
nected in series. The float-driven sen¬ pin 2. When this happens, the output of IC4 goes high and the green LED
sor attached to an internal rheostat of IC1 swings from high to low, send¬ (LED2) glows for around 50 seconds.
offers high resistance when the tank is ing a low pulse to the trigger pin of On receiving the second clock pulse,
empty. When the tank is full, the resis¬ the monostable (usually held high by Q1 goes high to light up the yellow
tance decreases, allowing morecurrent R3) via Cl. The monostable triggers LED (LED3) and sound the buzzer for
to pass through the meter to give a and its output goes high for a prede¬ around 45 seconds. This audio-visual
higher reading. termined time based on the values of signal warns you that the vehicle is
The fuel monitoring circuit works R5 and C2. With the given values, the running out of fuel. On receiving the

our II 3 ICS ip
|,N
7812

“Mu R3 :
IOK:
:
,22U
R5
DJ-1N4148

D1
1 N4148
w Vcc
JthS
R9
[COM

LED2
El
/otVOFF

SWITCH

■MD2.1N4001
IC1
2 4
8 R 18
CA3140 3 15 3
t l
FROM
TERMINAL OF
FUEL GAUGE ,A , sur - 4
a% e IC2
7
555
RS:
1M;
7
4 8 Ai
D3

oa
5 R10 it i1*/..!
"
12V
'(VEHICLE)

FROM 9B R4 ;
4700
1_ 5
330K‘
,C3
555 3 14
IC4
CD4017
2
LEDS

i
BODY OF
THE VEHICLE
28
1
~C2 8 13
VR2 *!1 LED4
LED1 1£r 470K
R8
08O£l
+

i
C4 4.7 K PZ1
“piSiii 22li PIEZO¬

i
25V BUZZER

WWW.EFYMAG.C0 M ELECTRONICS FOR YOU • JULY 2005 • 97


CIRCUIT
IDEAS
third clock pulse, LED3 and the buzzer Q6 output of IC4 is connected to The circuit can be assembled on a
go off. There is a gap of around two- its reset pin 15 via diode D3. This perforated board. Adjust VR1 until the
and-a-half minutes before Q5 output means that after 'on' state of Q5, the voltage at pin 2 of IC1 drops to 1.5V.
goes high. count will always start from QO. Ca¬ When point A is connected to the fuel
By the time Q5 goes high and the pacitor C5 provides power-on reset to meter (fuel gauge) terminal that goes
red LED (LED4) glows, four minutes IC4 when switch SI is closed. The out¬ to the fuel sensor, green LEDs (LED1
elapse and the power supply to IC3 is put of IC1 is also connected to reset and LED2) glow to indicate the nor¬
cut off. The output state at Q5 will not pin of IC4 via diode D1 (1N4148). So mal fuel level. VR2 can be varied to
change unless a low-to-high clock in¬ when your vehicle is refueled above set the 'on' time period of IC3 at
put is received at its pin 14. Thus LED4 the reserve level, LED2 glows to indi¬ around 20 seconds.
will glow continuously along with the cate that the tank has sufficient fuel. Enclose the circuit in a small case
beep. The continuous glowing of the IC5 provides regulated 12V DC for and mount on the dashboard using ad¬
red LED (LED4) and the beep from the proper functioning of the circuit even hesive tape. The circuit works only in
buzzer indicate that the vehicle will when the battery is charged to more vehicles with negative grounding of
run out of fuel very shortly. than 12V. the body. •

98 • JULY 2005 • ELECTRONICS FOR YOU WWW.EFYMAG.COM


CIRCUIT
IDEAS

SMART CELLPHONE HOLDER C r DW'VEPj

■ TK. HAREENDRAN holder will stop


+12V


flashing to indicate
D1 S1

T
his smart cellphone holder VR1 1N40Q1 OWOFF SWITCH that the mobile
100K
makes sure that you don't VW VVÿ phone is not in the
forget to carry your mobile
phone. Fitted in the cap it keeps +1ZV
R1
4700 R2
1K
T
R3
220K
R7
m
1W
C5
— L
C4
I
_ cell holder of the
case. Resistor R1
searching for the mobile phone a VWlrtÿ limits the current
Voc
within the holder using infrared I jI DIS
7* S flowing through
(IR) rays and alerts you through a !M*!OFF R4 JR LED1 and resis¬
flashing LED when it doesn't find one.
E_IS?JON
S2I- 114400ÿ
D3 22K
6
IC1
LM555 3
o/P470n
R6
tor R6 limits the
You can attach tire circuit to your ex¬ IGNITION
□2
TH. operating current
SWITCH LED2
isting cellphone holder op with a little 1N4001 T. and hence lumi¬
skill, construct one as per your require¬
/Z nance of LED2.
GND T2
ment. R5 BC547B Variable resistor

_ 0.01M 1K
The circuit, wired around IC VR1 determines
LM555 (IC1), derives power from the IR + C1 ZD1
2.2V
VWV-J-
C2 -L the detection sen¬
LED1
12V DC automobile battery. Diode D1 25V ZENER 100n of
is an accidental wrong-polarity input
I DIODE -L sitivity
phototransistor Tl.
guard. Resistor R7 limits the inrush The blinking rate
current to IC1. Fig. 1: Circuit of smart cellphone holder of LED2 can be
When power is applied to the cir¬ changed by
cuit, the low-frequency astable
multivibrator built around IC1 is acti¬
rsffi rÿTi
from IR LED!
fall on El CELL
PHONE
changing the
value of ca¬
vated and LED2 at its output pin 3 547 1 5777 M phototransistor
I pacitor Cl (or
flashes briefly.
When ignition switch S2 is flipped
to 'on' position, the +12V DC from the
car's battery disables the astable
multivibrator via diode D2 and LED2
nr nr
CBE ECB

Fig. 2: Pin configurations


Tl and it con¬
ducts to pull
the base of
LED driver
transistor T2
IR
LED1 >
4ÿ°
LED2
Fig. 3: Proposed
T1
2N6777
R3-R4 resistor
combination).
P i n
configurations
of BC547 and
turns off. of BC547 and 2N5777 towards cellphone holder phototransistor
When the ignition is turned off and ground to dis¬ 2N5 7 7 7 ,
the mobile phone is in its holder, LED2 able the visual indicator (LED2). and the proposed cellphone
again starts blinking. In case the If you've forgotten to carry your holder are drown in Figs 2 and 3, re¬
cellphone holder is empty, IR rays cellphone, LED2 fitted in the cellphone spectively. •

94 • JULY 2005 • ELECTRONICS FOR YOU WWW. EFYMAG.COM


Inexpensive Car Protection Unit | Full Project Available https://electronicsforu.com/electronics-projects/inexpensive-car-protection-unit

Inexpensive Car Protection Unit


M. Venkateswaran and T.E. Parthasarathy
December 5, 2017

For car protection, custom made units are available but they are costly. Here's an inexpensive car
protection unit to protect car stereo, etc. from pilferage that costs less and requires no adjustments in
the car but a good car cover. •ÿc.pwwfcPl

Place the circuit at your bedside and bring the two wires from the unit to the car (parked outside your
home) and connect one wire-end to the cover and the other to the ground, with both wire-ends
shorted by some weight such as a brick. So outwardly the mechanism is not visible.

Car protection unit circuit

PZ2
R7 RS PIEZO- +
10K 100K BUZZER
4 a (INTER¬
6 MITTENT
TVDE:ÿ

1 of 3 1/25/2018, 12:39 AM
Inexpensive Car Protection Unit | Full Project Available

C5>
C6 _l+ C7
6.8M
1GV| 16V
■ K
4, 7M-
_
I

[
[
■>
IC3 .
i-J . NE555
2
hF£)
5
https://electronicsforu.com/electronics-projects/inexpensive-car-protection-unit

cs
O.01M
mt
SL100
iJ

Fig. 1: Circuit of car protection unit with alarm

If someone tries to remove the cover, the alarm of the circuit starts sounding to alert you. The alarm can be switched off by
resetting it using switch S1 .

The car protection circuit comprises two timer ICs: one for the alarm circuit (see IC2 in Fig.1) and the other to indicate that
the battery has taken over as the power source (see IC3 in Fig. 2). Normally, the protector operates off AC mains and the
battery takes over only when mains fail. As the battery current is not high, the battery will last long.

2 of 3 1/25/2018, 12:39 AM
Inexpensive Car Protection Unit | Full Project Available https://electronicsforu.com/electronics-projects/inexpensive-car-protection-unit

Circuit operation

As long as the two wires remain shorted, transistor T1 remains cut off. When shorting is removed, transistor T1 gets
forward biased and its collector voltage drops to trigger IC2 and the piezobuzzer starts sounding.

If mains fails, the battery-takeover indicator (shown in Fig. 2 and connected to points A, B and C in Fig. 1) immediately gets
triggered at pin 2 of IC3. Its high output activates the battery-operation alarm for a couple of seconds. IC1 draws power
from the battery to activate the protection unit.

After setting up the unit properly and shorting both the wires, press test switch S2. If there is no fault in the circuit, the
alarm will sound. Now release test switch S2 and momentarily press reset switch S1 to switch off the alarm.

The article was first published in July 2005 and has recently been updated.

3 of 3 1/25/2018, 12:39 AM
CIRCUIT
IDEAS

MEDIUM-POWER
FM TRANSMITTER
■ PRADEEP G. in RF stages as oscillator.) The third FRONT VIEW tenna. For the
stage is a class-A tuned amplifier that maximum range,

T
he range of this FM transmi¬ boosts signals from the oscillator. Use BC C use a sensitive re¬

nrn
54« 2570
tter is around 100 metres at 9V of theadditional RF amplifier increases ceiver. VC1 is a
-M. DC supply. the range of the transmitter. frequency-ad] ust-
The circuit comprises three stages. Coil LI comprises four turns of ing trimpot. VC2
The first stage is a microphone pream¬ 20SWG enamelled copper wire wound CB E BEC should be adjusted
plifier built around BC548 transistor. to 1.5cm length of a 4mm dia. air core. Fig. 2: Pin for the maximum
configurations of
Thenextstage isa VHF oscillator wired Coil L2 comprises six turns of 20SWG transistors BC54B range. The trans¬
around another BC548. (BC series tran¬ enamelled copper wire wound on a and C2570 mitter unit ispow-
sistors are generally used in low-fre¬ 4mm dia. air core.
quency stages. But these also work fine Use a 75cm long wire as the an¬
AMT
V*
9V
*S2(a) li
T
5RI I470P ap-rJ;1a|
vci !1 C7
0.01 n
i_2*
ce
L || O.1M
SI 4* + BATT.
FM
TRANSMITTER
nL
ANT.

R7| —
<10K
R3
4.7K S ~ 4* VC2 ANT
75CM

C1
0.1 M
m
C2
I V? r 10K

T2
f-7 , 1

C6
10P
56K<

T3
22P

9v" 7
BATT.
+1
V 1+
FM
RECEIVER

F
ANT. IsI
32(b)

C5
H T1
BC548 10P C2570 S2(a) AND S2(b)=2POLE 2-WAY SWITCH
+ BC548 Fig. 3: Walkie-talkie arrangement

D COND.
MIC
47Qpjÿ i R5
10K
R6
«2(1 VC3
22P ered by a 9V PP3 battery. It can be
•REFER TEXT combined with a readily available FM
receiver kit to make a walkie-talkie set
Fig. 1: FM transmitter as drown in Fig. 3. •

80 • AUGUST 2005 • ELECTRONICS FOR YOU WWW.EFYMAG.COM


CIRCUIT
IDEAS

K5 olNIVtUl
TELECONFERENCING SYSTEM Q
C IM\ y ■

m PRINCE PHILLIPS Both the primary and secondary line in operation even though no tele¬
ooilsofthecoupling transformer consist phone on that line is present.

H
ere is a low-cost teleconfer¬ of 500 turns of 40SWG insulated copper Here, transistor T1 acts like a re¬
encing system that lets you wire. At the secondary side, a small sistor to DC and as high impedance
talk to two persons at a time circuit is used for DC holding. Thiscir- for audio signals. The high impedance
in any part of the world
over two telephone lines. RING
So 4h Hi X RING
-o

f
The circuit makes use of

1
S2
a coupling transformer
S1
A; Cl U C2 R2 T1
BC \\
and some passive com¬ 1M IOIJV ;i5K
547
TELEPHONE
LED1 100V \LB02 TELEPHONE
ponents. LINE NO. 1 PRI. SEC. LINE NO. 2
The circuit is con¬ R1 R4
PHONE 1 3.3K 3.3K PHONE 2
nected between the two C3 . R3
22M boon
telephone lines. It works
So xi 63VI X
like this: When 9C calls 71,1 XI, PRIMARY 500T OF 40SWG ON IRON CORE, SECONDARY 500T OF 40SWG ON IRON CORE TIP
'A' on the first telephone
line, 'A' puts this call on cuit is built around transistor T1 of the circuit is provided by condenser
hold, dials 'Y' on the other telephone (BC547), resistors R2 and R3 (15 kilo- C3, which prevents any audio signal
line (which is free) and keeps this call ohmsand 100 ohms, respectively), con¬ from appearing at the base of Tl.
too on hold, and slides switches SI and denser C3 (22 pF, 63V) and two LEDs as Thus any audio voltage appearing
S2 to 'on' position. Now 'X/ 'A' and indicators for both the primary and sec¬ across telephone line No. 2 will not
JY' can talk to one another simulta¬ ondary sides. It provides proper DC cause a corresponding current in the
neously over the two telephone lines. characteristic to hold second telephone •
transistor.

WWW.EFYMAG.COM ELECTRONICS FOR YOU • AUGUST 200S • 81


CIRCUIT
IDEAS

LITTLE DOOR GUARD S.C. DWIVED'

■ TK. HAREENDRAN
IC2 IN
3 7805 1

I f some intruder tries to open the 91


R2 COM ON/OFF
N/O
33K SWITCH
door of your house, this circuit T2
BGS48 fC1
R3
sounds an alarm to alert you R1 1CK 0.1li
vwv
against the attempted intrusion.
The circuit (Fig. 1) uses
2200 R6
1K
ZD1
3.1V »T»”T
readily available, low-cost compo¬ R4
10K
nents. For compactness, an

K
T3
BC548
alkaline 12V battery is used for 7 R7
1K
powering the unit. Input DC supply R6
KM 3 AWr
is further regulated to a steady i20K UM3561
Rfi
DC voltage of 5V by 3-pin regulator 2N5777
1K T4
SPEAKER
LED1 8
IC 7805 (IC2). 6
SL100
2D2
Assemble the unit on a general- © 3.1V
purpose PCB as shown in Fig. 4 and
mount the same on the door as shown
in Fig. 3. Now mount a piece of mir¬
Ja
ror on the doorframe such that it is Fig. 1: Circuit of the door guard

TOP VIEW and IC1 does not get


FRONT VIEW FRONT VIEW
A ♦ F positive supply at its pin 5.
SEUQ

fr iff W
OSC2 As a result, no tone is pro¬
ITONEI duced at its output pin 3
vssQ UM3961 03C1
and the loudspeaker re¬
OUTPUT Q SEL. EC B CB E LS1 iPOWERl mains silent. Resistor R1
LOUD- SI limits the operating current
v fTON
( T1 SPEAKER
NC[ÿ VDC for the IR LED.
When the door is
Fig. 2: Pin configurations of UM3561 and transistors Fig. 4: Suggested enclosure with opened, the absence of BR
2N5777 and BC547 major components layout rays at phototransistor T1
forward biases npn
exactly aligned with the unit. transistor T2, which provides positive
Pin configurations of IC supply to IC1. Now 3-siren
DOO|
FRAMIE UM3561 and transistors sound generator IC UM3561 (IC1) gets
2N5777 and BC547 are power via resistor R5. The output
DOOR
shown in Fig. 2. of IC1 at pin 3 is amplified by
MIRROR
9 Initially, when the Darling ton-pair transistors T3 and T4
(GLUED IN door is closed, the infrared to produce the alert tone via the
FRAME)
GADGET (IR) beam transmitted by loudspeaker.
(MOU NTED
"" |T1 IN DOOR) IR LED1 is reflected (by the Rotary switch S2 is used to select
mirror) back to the three preprogrammed tones of IC1.
phototransistor 2N5777 (Tl). IC1 produces fire engine, police and
The IR beam falling on ambulance siren sounds when its pin
phototransistor Tl reverse bi¬ 6 is connected to point F, P or A, re¬
Fig. 3: Back view of the door assembly ases npn transistor T2 spectively.

WWW.EFYMAG.COM ELECTRONICS FOR YOU • SEPTEMBER 2005 • 103


CIRCUIT
IDEAS

STRESS METER SAMI

■ D. MOHAN KUMAR cuit. The circuit is very sensitive and bar mode for each increment of 125
detects even a minute voltage varia¬ mV in the input.

T
his stress monitor lets you tion across the touch pads. Here, we've used only five LEDs
assess your emotional pain. If The circuit comprises signal ampli¬ connected at pins 14 through 18 of IC1.
the stress is very high, it gives fier and analogue display sections. LED1 glows when input pin 5 of IC1
visual indication through a light-emit¬ Voltage variations from the sensing receives 150 mV. LED5 glows when
ting diode (LED) display along with a pads are amplified by transistor BC548 the voltage rises to 650 mV and LED5

_
c5Ejg| |I?K
L D„ LED1 LED2 LED3 LEM LEDS ■ II ICR
LOW
STRESS
ooooo
HIGH
STRESS
flashes
piezobuzzer PZ1
beeps when the
and

ji £i //y_£ R6
:IK
R8
47K 1 2 3 4 5 stress level is high.
T1
BC548
PZ1
EZO-
Resistors R4
vVA r 1<& UZZER and R5 and capaci¬
R1
560E
0 « tor C2 form the
flashing elements.

5
18 17

IC1
16 15 14

3
Esif ON/OFF
- Resistor R3 main-
Fig. 2: Display panei tains the LED cur¬
VR2 LM3915 02 - t J-! C3 rent at
47K
2 4 8 7 S '®T TW around 20
ikllSU R4 : mA. Ca¬

R3
470E
47CE:
ZD1 i
5.1V
0.6W
n□
TOUCH PADS
pacitor C3
should be
placed
close to pin
Fig. 3: Setf-iocking straps 3 for proper
Fig. 1: Circuit of the stress meter
functioning
warning beep. The gadget is small (Tl), which is configured as a com¬ of the IC. Zener diode ZD1 in series
enough to be worn around the wrist. mon-emitter amplifier. The base of T1 with resistor R6 provides regulated 5V
The gadget is based on the prin¬ is connected to one of the touch pads to the circuit.
ciple that the resistance of theskin var¬ through resistor R1 and to the ground The circuit can be assembled on a
ies in accordance with your emotional rail through potmeter VR1. By vary¬ small piece of perforated board. Use
states. If the stress level is high the ing VR1, the sensitivity of T1 can be transparent 3mm LEDs and a small
skin offers less resistance, and if the adjusted to the desired level. Diode D1 piezobuzzer for audio-visual indica¬
body is relaxed the skin resistance is maintains proper biasing of T1 and ca¬ tions. Enclose the circuit in a small
high. The low resistance of the skin pacitor Cl keeps the voltage from the plastic case with touch pads on the
during high stress is due to an increase emitter of T1 steady. back side. Two self-locking straps can
in the blood supply to the skin. This The amplified signal from transis¬ be used to tie the unit around your
increases the permeability of the skin tor T1 is given to the input of IC wrist.
and hence the conductivity for electric LM3915 (IC1) through VR2. IC After tying the unit around your
current. LM3915 is a monolithic integrated cir¬ wrist (with touch pads in contact with
This property of the skin is used cuit that senses analogue voltage lev¬ the skin), slowly vary VR1 until LED1
here to measure the stress level. The els at its pin 5 and displays them glows (assuming that you are in re¬
touch pads of the stress meter sense through LEDs providing a logarith¬ laxed state). Adjust VR2 if the sensi¬
the voltage variations across the touch mic analogue display. It can drive up tivity of IC1 is very high. The gadget
pads and convey the same to the cir- to ten LEDs one by one in the dot/ is now ready for use. •

WWW.EFYMAG.COM ELECTRONICS FOR YOU • SEPTEMBER 2005 • 101


CIRCUIT
IDEAS

DIGITAL DICE
■ SAGAR G. YADAV The circuit is divided into three sec¬ LED2 and LED5 always glow at the
tions: counter, logic and display. same count, as do LED1 and LED6,

T
he digital dice presented here The counter section is built around and LED3 and LED4. Using these three
acts just like a normal dice. It binary counter IC CD4060BC (IC1). pairs of LEDs and LED7, four logical
has six faces (refer Fig. 2) like The counter frequency (f) is decided combinations have been made in the
the normal dice and uses four differ¬ by the in-built oscillator formed by re¬ circuit. LED1 and LED6 glow at all
ent logic gate combinations to bring sistor R1 and capacitor Cl as follows: counts, except '0' and '1/ Further, it
out the six faces of the dice. f=l/2.2RlCl. can be noticed that they glow when
At the heart of the circuit is a 147- Here, the frequency is fixed at around 'A' or 'B' is high, hence a NOR gate
stage ripple-carry binary counter IC 2056 Hz. whose output is A+B according to
CD4060BC (TCI) with built-in oscilla- Only the first three outputs of the Boolean algebra will perform the job

81
ONI/O
/OFF
SWITCH
R2
!.2M
R3
;IOOK
14
LÿÿÿWIO
isaor
JTA, LED7
R5
560(1
R8
56011
R7 R8 R9 R10
560(1 560(1 5600 560(1
Vcc R
+
13 03
LE05
z& LED2zÿ
r 9V D1
■' BATT. 11

IC1
TOUCH
PLATE CD4060BC
02 LED4
z&
LED3
z LED1
zÿ zÿ
LED6

R1
AVY 10
9 $
VH-
470K
GND A+ec

C1
470p
D1-D2-1N4148 IC2 {N1-H4ÿCD4001, IC3 (A-D)*CD4011 GND

Fig. 1: Digital dice

counter (designated as A, B of operating these LEDs.


and C, respectively) have LED3 and LED4 glow at all counts,
LKJ1
been used in the circuit. The except for the first three counts, i.e.,
LED7 LED2 LEDS • •LH17 counter is designed to reset they glow when either A, or B and C
LEDS
at the sixth count (110) as are high. This logic function can be ob¬
only six counts are required tained by using an OR gate and an
for operation. This is done AND gate, but since we are using only
with the help of diodes D1 NAND and NOR gates in the circuit
LH>1 LED4 LED1 LED4 LED1 LHJ4 and D2 and resistor R3, we make use of two NAND gates and
L*7 LED2 LED6 which are connected such a NOR gate (with A+BC output) to
that they generate an AND perform this function.
JED3 LEDS LB03 LED6 LED3 LS*
logic. LED2 and LED5 glow only at the
- From the table it can be first and fifth counts. In other words,
Fig. 2: Different faces of dice
noticed that at the sixth they glow only when the complement
tor. The logic section is designed count, the counter outputs A and B of B and C outputs goes high. This
around CMOS quad 2-input NOR gate hold logic 1 simultaneously for the first function can be obtained by using two
IC CD4001BC (IC2) and quad 2-input time, so by ANDing A and B outputs NAND gates such that their output
NAND gate IC CD4011BC (IC3). The you can give logic 1 to the reset termi¬ corresponds to the Boolean expression
display section is formed by a group nal of the counter at the sixth count, BC or B+C according to De Morgan's
of seven LEDs. thereby resetting the counter. theorem

100 • OCTOBER 2005 • ELECTRONICS FOR YOU WWW.EFYMAG.COM


CIRCUIT
IDEAS
LEDs of the display section
Dice Score and LEDs Lit at Different Counts will appear to glow simultaneously
Count Dice ABC LEDs lit due to the high counter frequency.
score This high-frequency counting will
0 1 0 0 0 LE D7 make the dice foolproof. When you
1 2 0 0 1 LED2 LED5
2 3 0 1 0 LED1 LED7 LED6 remove your finger from the touch
3 4 0 1 1 LED1 LED3 LED4 LED6 pad, the counter will stop counting
4
5
5
6
1
1
0
0
0
1
LED1
LED1
LED3
LED3 LED2
LED7 —LED5 LED4
LED4
LED6
LED6
and the display section will show any
one of the six possible faces with a
6 1 1 0
probability of 1/6.
The entire circuit can be powered
LED7 glows at even counts like 0, common cathodes, as do LED2 and by a 9V battery as the inbuilt oscilla¬
2 and 4. In other words, it glows LED5, and LED3 and LED4. The an¬ tor of the counter IC will not work
when the C output is low. This func¬ odes of all the LEDs are tied together properly below 7V. Use of CMOS ICs
tion can be achieved easily by invert¬ to the positive terminal of the battery means less power consumption.
ing the C output twice using the re¬ via resistors R4 through RIO, respec¬ The circuit can be constructed on a
maining two NAND gates. The out¬ tively. general-purpose PCB and housed in¬
put will also be buffered by these two When you place your finger on side a plastic case with the LEDs array
inverter gates. the touch pad, the oscillator starts os¬ mounted on the top as shown in Fig.
The display section comprises cillating. The counter will start count¬ 2. The touch pad can be mounted be¬
seven LEDs. LED1 and LED6 have ing at the rate of 2056 Hz and all the •
side the array.

WWW.EFYMAG.COM ELECTRONICS FOR YOU • OCTOBER 2005 • 101


CIRCUIT

REMOTE-CONTROLLED tT* rr.. DWWED>


POWER-OFF SWITCH
B DEBAR AJ KEOT accessories, including the circuit itself, base of transistor T2 are high, relay
from mains using the remote for the ELI energises. The relay de-energises
emote controllers for various audio or video systems. if both the inputs to transistor T2 go

R audio /video systems are usu¬


ally provided with a power
'on'/ 'off' or standby-mode selector
The circuit consists of a timer IC
NE555, a decade counter IC HCF4017,
three BC548 transistors, an infrared
low.
Initially, to switch on mains sup¬
ply for the audio /video system and
button. But turning the system off (IR) sensor IC TSOP1738 and a few dis¬ the circuit itself, pushbutton switch SI
from the remote handset actually does crete components. T ransformer XI, di¬ is pressed momentarily.
not cut off the whole system from odes D1 and D2, and capacitor Cl form Normally, the output of IR receiver
mains Some circuitry inside the sys¬ power supply for the circuit. Zener di¬ module IC3 is high when it is not be¬
tem continues to get power from mains ode ZD1 provides regulated voltage ing activated by a remote, and the re¬
even when the power is turned off us¬ to IR sensor TSOP1738 (IC3). lay energises to close the N/O contact
ing the remote handset. One needs to Timer IC NE555 (IC1) is configured and place a short across switch SI. This
turn off the mechanical switch pro¬ as an astable multivibrator that pro¬ circuit and the load continue to get
vided on the system's front panel or duces a clock pulse every two seconds. power through the N/O contact of re¬
wall outlet in order to turn off the en¬ The clock pulse is fed to decade lay RL1 even when pushbutton SI is
tire system counter IC HCF4017 (IC2), whose Q7 released.
Also, accessories like TV boosters, output is inverted by transistor T1 and At the same time, the output of IC2
stabilisers and additional ampli- applied to the base of transistor T2 to starts scrolling around its output pins,
speaker systems cannot be turned off drive the relay. i.e., pins 5 and 6 go high and low al¬
from the remote handset. And it is very The output of sensor IC3 is used ternately for the clock pulses received.
annoying to get out of bed to switch to drive transistor T3 and activate the When Q6 output goes high the 'warn¬
off mains after watching some relay via transistor T2. ing' LED (yellow) glows, and when Q7
programme on TV or listening to mu- The outputs of transistors T1 and output goes high the 'off' LED (red)
sic. T3 are ORed and the resultant is ap¬ glows.
The circuit given here can discon¬ plied to transistor T2. Thus if any one Yellow LED (LED1) indicates that
nect the entire system along with the or both the inputs connected to the it's time to switch off the audio or

S1


D1
1N4001 KT
RI <
o
4
*-o o
PUSH¬
N 150K 6.6K D3
1N4148
TO-ON
SWITCH Vcc
e
R
is
N N/O

230V AC Rfi
7
60Hz li N/C
<37 10K
X)
L J+ IC2 B Oil , RL1
D2 WK IC1 3 14 1N4001 RL1=BV,
1N40CM ci „ 6 NE555 HCF BCS48 1000
X1
230V AC
PRIMARY
W-O L 2
4017 5
06 1C/0
RELAY
TO8V-0-6VAC
250mA
SECOMJARY
GND
5 8 13 15 R4
>3300
R5
> 3300
X)
BC54S
TRANSFORMER
C3
0.D1|J

STABILISER
R3
1000
I LED1 LED2

V4V FRO NT VIEW


R10
470 T3 TSOP
AUDIO OR iS /p\
BCS48 173fl

ST'3'*"
ioon
VIDEO
SYSTEM D5
U A 1N4143
IC3
T80P1733 1 w GND
Vcc

104 • OCTOBER 2005 • ELECTRONICS FOR YOU WWW.EFYMAG.COM


CIRCUIT
IDEAS
video system. the remote handset is pressed, the sen¬ the load connected across the
The entire system can be turned off sor output goes low for a while. Since transformer's primary winding.
by pressing any key on the handset both the inputs connected to the base Any normal operation (increasing/
once when the red LED (LED2) is of transistor T2 become low at this decreasing volume, changing channels,
glowing. The reason is that red LED2 time, the transistor stops conducting etc) can be performed when either both
glows when the Q7 output of IC2 is and the relay de-energises. As a re¬ the LEDs are 'off or the remote is not
high. Due to this, the output of tran¬ sult, the N/O contact of the relay oriented towards IR receiver module
sistor T1 is low. Now if any key on opens to switch off the circuit and IC3. •

WWW.EFYMAG.COM ELECTRONICS FOR YOU • OCTOBER 2005 • 105


Electronic Fuse Circuit | Detailed Circuit Diagram Available https://electronicsforu.com/electronics-projects/electronic-fuse

Electronic Fuse
By T.A. Babu
December 5, 2017

An absolute necessity of every electronics lab is a workbench power supply. The power supply should
be regulated and protected against short circuit. Most power-supply protection circuits use a low-
value, high-wattage resistor connected in series with the load for current sensing. The voltage drop
across the sensor resistor is weighed to activate the protection circuit. The given electronic fuse circuit
is based on a poly-fuse application, which is a re-settable fuse by itself.

Electronic fuse circuit

o
N
O

♦ ♦ ©
RL2 +12V
REED RELAY LED1
PZ1 0
FI PIEZO*
POLY FUSE A
R3 BUZZER D
100 mA
H1 1Sf

1 of 4 1/25/2018, 12:11 AM
Electronic Fuse Circuit | Detailed Circuit Diagram Available https://electronicsforu.com/electronics-projects/electronic-fuse

i r i

50011 $
cJ

st *
:ÿled2 N/°
S ■o
R2 2P4M R4 01
2,2K 1K 1N4007 N/C
SCR1
T
I0.01M
C1
RL1
4
S1=PUSH-T0-0FF SWITCH RL1-12V, 200a 1C/0 RELAY
Fig. 1: Electronic fuse

Circuit operation

Initially, when the circuit is powered, silicon-controlled rectifier 5CR1 is 'off.' Relay RL1 energizes through the polyfuse and
the load is connected through the normally opened (N/O) contact of the relay. When the current drawn by the load
increases above a certain level (which depends on the number of turns in the winding on reed relay, see Fig. 2 and the
accompanying table), the contacts of reed relay RL2 close to trigger SCR1 . As a result, relay RL1 de-energises and the load
gets disconnected. The polyfuse remains in high-resistance state until SCR1 is turned off.

> GLASS

2 of 4 1/25/2018, 12:11 AM
Electronic Fuse Circuit | Detailed Circuit Diagram Available https://electronicsforu.com/electronics-projects/electronic-fuse

4
x
COIL (COPPER ENAMELED WIRE)
Fig. 2: Reed relay with coil winding

Heed Relay Winding Details


lor Dillerent Load Currents
Current (amperes) Turns SWG
10 5 13
5 10 16
2.5 20 18
1,25 4 21

The circuit can be reset either by switching off the power supply or by pushing reset switch S1. LED2 indicates that the
power supply is working normally. LED1 indicates that the power supply unit is under the protection mode and the buzzer
sounds to warn the user.

The turns of reed relay winding are based on the current drawn through the load, so refer to the table for winding details
for your load current requirements. At EFY, testing was done for approximately 1 .85A AC load current at 230V AC mains and
accordingly 1 6 turns of 22SWG copper-enameled wire were wound on the reed relay.

3 of 4 1/25/2018, 12:11 AM
Electronic Fuse Circuit | Detailed Circuit Diagram Available https://electronicsforu.com/electronics-projects/electronic-fuse

The article was first published in October 2005 and has recently been updated.
0

4 of 4 1/25/2018, 12:11 AM
CIRCUIT
AO

HEAT-SENSITIVE SWITCH

m M.K. CHANDRA rails via a voltage divider network at the inverting input of IC2. So the
MOULEESWARAN AND formed by potmeter VR1. load is turned on as soon as the ambi¬
MISS KALAI PRIYA
Since the wiper of potmeter VR1 is ent temperature rises above the set
connected to the inverting input of IC2, level. Capacitor C3 at this pin helps

A
t the heart of this heat-sensi¬ the voltage presented to this pin is lin¬ iron out any ripple that passes through
tive switch is IC LM35 (IC1), early variable. This voltage is used as the positive supply rail to avoid er¬
which is a linear temperature the reference level for the comparator rors in the circuit operation.
sensor and linear temperature-to-volt- against the output supplied by IC1. By adjusting potmeter VR1 and

D1-Q5-1N4007
OUT IC3 IN
VAV 3 7806 1
R4
eaon COM LOAD
R1
1.2K &' RB
1.5K
03 D2

OL
R3
12K
-VAV
C3
0.1 p
D1 wo S
I
P 230V AC
2
IC1 VR1< CA313ÿ> LEDI4£L Ai. 50Hz
IOK :
1
LM35 i/f S| l.l TYi WC

_
P0T.< 2

+ C1 C2 J±
C \Wv
RL1

+ 04 05 D4 XT
2MV
T2 it it AC PRIMARY
i1dvT R7 r
BD138

:UK
R8 1K

f
__ TO 12V AC
250mA
SECONDARY
TRANSFORMER
RL1-12V. MOn, 1C/0 RELAY

age converter circuit. So if the non-inverting input of thereby varying the reference voltage
The converter provides accurately IC2 receives a voltage lower than the level at the inverting input pin of IC1,
linear and directly proportional out¬ set level, its output goes low (approxi¬ the temperature threshold at which
put signal in millivolts over the tem¬ mately 650 mV). This low level is ap¬ energisation of the relay is required
perature range of 0°C to 155°C. It de¬ plied to the input of the load-relay can be set. As this setting is
velops an output voltage of 10 mV driver comprising npn transistors T1 linear, the knob of potmeter VR1 can
per degree centigrade change in the and T2. The low level presented at be provided with a linear dial
ambient temperature. Therefore the the base of transistor T1 keeps it non- caliberated in degrees centigrade.
output voltage varies from 0 mV at conductive. Since T2 receives the for¬ Therefore any temperature level can
0°C to IV at 100°C and any voltage ward bias voltage via the emitter of be selected and constantly monitored
measurement circuit connected across Tl, it is also kept non-conductive. for external actions like turning on a
the output pins can read the tempera¬ Hence, relay RL1 is in de-energised room heater in winter or a room cooler
ture directly. state, keeping mains supply to the in summer. The circuit can also be
The input and ground pins of this load 'off' as long as the temperature used to activate emergency fire extin¬
heat-to-voltage converter IC are con¬ at the sensor is low. guishers, if positioned at the probable
nected across the regulated power sup¬ Conversely, if the non-inverting in¬ fire accident site.
ply railsand decoupled by R1 and Cl. put receives a voltage higher than the The circuit can be modified to op¬
Its temperature-tracking output is ap¬ set level, its output goes high (approxi¬ erate any electrical appliance. In that
plied to the non-inverting input (pin mately 2200 mV) and the load is case, relay RL1 must be a heavy-duty
3) of the comparator built around IC2. turned 'on.' This happens when IC1 is type with appropriately rated contacts
The inverting input (pin 2) of IC2 is at a higher temperature and its output to match the power demands of the
connected across the positive supply voltage is also higher than the set level load to be operated. •
WWW.EFYMAG.COM ELECTRONICS FOR YOU • NOVEMBER 2005 • 99
CIRCUIT
IDEAS

SENSITIVE VIBRATION
DETECTOR
■ TK. HAREENDRAN of IC1 goes high and
FRONT VIEW (REMOTE
the entire circuit is in MONITORING
ZONE/GUARD

T
his vibration detector is realised BT idle state. LED1 indi¬ ROOM)
169
using readily available, low- cates the power sta¬ HQADOEThrift
cost components. One of its tus.
SENSOR
many applications is in a rolling shut¬ In the event of
KG A
ter guard for offices and shops. The vibrations, IC2 is ‘SHUTTER
MAGAZINE
detector will sense vibration caused by B clocked by the ■
ROLLING
activities like drilling and switdi on pulses from the SHUTTER
the connected load (bulb, piezobuzzer, PIEZO ELEMENT piezoceramic element WALL
etc) to alert you. (BACK VIEW)
connected to its
The circuit works off a 6V battery Fig. 2: Pin clock pin 14. Q1 (INSIDE VIEW)
or 6V regulated power supply and configuration of
through Q9 outputs Fig. 3: Arrangement for rolling shutter guard
SCR1 BT169 and
uses a piezoceramic element as the back view of the of IC2 are fed to re¬ for shops, offices and banks

vibration detector. The same is easily piezo element lay-driver switching


available from electronics/telephone transistor T1 through its gate. This, in turn, energises relay
component vendors or you can take it diodes D1 through D9 connected in RL1. The relay contacts can be used
out from an active buzzer. OR mode. to switch any alarm device to indicate
Initially, when the power is Immediately after clocking, any of vibration detection. The circuit can
switched on, decade counter IC1 is re¬ the outputs Q1 through Q9 would go be reset by momentarily pressing
set by power-on- reset components C2 high and npn transistor T1 would con¬ switch SI.
and Rl. As a result, QO output (pin 3) duct. Asa result, SCR1 is fired through Zener diodes ZD1 and ZD2 at the
clock input of IC1
D11
1N4001
are used for protec¬
-0 tion against high
D1-M-1N414A 81 +«V
C2 + R3 PUSH TO OFF voltage input. In
Cl
Q.1M-T
1&J
25V
-± VDO
4700
the case of repeated
09
false triggering of


16
11
IC1, add a lOQnF ca¬
WAr
R
9

6
QT_ <X BC546
pacitor in parallel to
the piezoceramic
<W
6
RL1 element.
05 6V.1M
IC1 1 1CARE The pin con¬
CD4017 04 HtO
10 D1D
figuration of SCR
25\f"r 1W4001
MC
BT169 and the
CLK
14 4 02. back view of the
2
Q1_ piezo element are
ZD1
5.1V 3
QQ D1 LED1 1
A shown in Fig. 2. Fig.
tL 13 a NC 3CR1
pzi
PEIZO UJ
ELEH3JT B
2D2
\\& Vsa
0 K
BTin 3 shows suggested
location of the vi¬
5.1V X 230V AC
bration detector for
OQ«> rolling shutters of
L N
banks, shops,
Fig. 1: Circuit of the sensitive vibration detector etc. •

WWW.EFYMAG.COM ELECTRONICS FOR YOU • NOVEMBER 200S • 103


CIRCUIT

AUTOMATIC-OFF TIMER SAN' THEO


FOR CD PLAYERS 1

■ SURESH KUMAR K.B. pins 9 and 10 of IC1, respectively, as During counting, in case the power
follows: fails momentarily, capacitor C2

A
re you in the habit of falling t=2.3RC (1000pF) will provide the necessary
asleep while listening to where 12' is the value of resistor R8 power backup for IC1. That is,
music? If yes, you'll love this and 'C' is the value of capacitor C3. during the period, pin 3 of IC1 is low.
circuit. It will automatically start func¬ When transistor T2 is cut-off, its When output pin 3 of IC1 goes high,
tioning when you switch off your bed¬ collector voltage is high. So pin 12 of the relay is energised through
room light and shall turn your CD IC1 is high and IC1 is in reset condi¬ transistors T3 and T4 and, at the same
player 'off'after a predetermined time tion. time, counting is disabled by the feed¬
In the presence of ambient light, or When light is switched off, the re¬ back from pins 3 through 11 (clock
when you switch on light of the room sistance of LDR1 increases, driving input) of IC1 via signal diode D7.
in the morning, the CD player will transistor T1 into cut-off state. That is, due to the feedback, output
again start playing. Unlike the usual The collector voltage of transistor T1 pin 3 remains high unless another
timers, you don't have to set this timer goes high to light up LED2 (indicat¬ high-to-low pulse is received at its
before sleeping. ing that the timer circuit is reset pin 12.

r
230V
BOH?
ONfflfF

Dli D2 "I
-T0
i
•A .
i|S2
R5 K5 ;
22K

w
J+
I
CJ

RESET
~
os

Ik
u m
-X- 1N4001

™ *10
C3*

FW
R12
eeoQ

LED#]?

i,JS?
r “S5T
RL1

RELAY
NK3

I
R4
Da D4 ieoQ JTL
230V L
RI;
1K<
LED2 ~
»C1
CD406O
-A -L1N414»
or
NIC

L3CMA
N AC IPREIARY
TO
1MmA
«ECOWtARY
“OT. Q3
Q‘2
SOCKET
FOR CD
TRANSFORMER PLAYER
Cl T4 POWER
-I- BC54$ PLUG
QND
«! R7
820fi
R11
ttoa

1 UED3
D1-D4-1N4O01 ■SEE TEXT E5S3 »'.''1:1’ IT-71
L® N
230V AC
SUPPLY

The circuit derives its power di¬ LDR1 Timer LED2 Reset pin 12 Count LED3 After the relay is energised, there
rectly from the bridge rectifiers. When will be no AC power in the socket.
Light Off I Ugh I Off
The glowing of LED5 indicates that
'on'/'off' switch SI is closed, LED1 Dark | On Low Blink
glows to indicate that the circuit is your CD player has been switched off.
powered 'on.' enabled) and transistor T2 starts The desired 'off' time period for
In the presence of light, the resis¬ conducting. As the collector voltage the timer circuit can be set by choos¬
tance of the light-dependent resistor of transistor T2 goes low to around ing proper values of resistor R8 and
(LDR1) is low, so transistor T1 con¬ 0.2V, ground potential becomes avail¬ capacitor C3. If R8 is 680 kilo-ohms
ducts to drive transistor T2 into cut¬ able at reset pin 12 of IC1. The low and C3 is 0.22 pF, the 'off' time period
off state and the timer circuit remains state at pin 12 enables the oscillator is around 45 minutes.
inactive. and it starts counting. LED3 at pin 7 The glowing of LED4 gives the
The collector of transistor T2 is con¬ of IC1 starts blinking. Its blinking fre¬ warning that your CD player is going
nected to reset pin 12 of IC CD4060 quency depends on the R-C compo¬ to be switched off shortly. In case you
(IC1) via signal diode D5. IC CD4060 nents connected between its pins 9 want to extend the timer setting for
is a 14-stage ripple counter with a and 10. another round, just press reset switch
built-in oscillator. The time period of The status of LED2 and LED3 in S2 momentarily. LED4 stops glowing
oscillations (t) is determined by capaci¬ the circuit with light falling and not and counting starts again from the ini¬
tor C3 and resistor R8 connected to falling on LDR1 is given below: tial stage. •
90 • DECEMBER 2005 • ELECTRONICS FOR YOU WWW. EFYMAG .COM
CIRCUIT

VERSATILE WATER-LEVEL
CONTROLLER
■ A. SHAFEEK AHAMED trodes are suspended into the tank When water rises to the overflow
such that they don't touch each other. level L2 and touches electrode E3,

T his simple, economical and ver¬


satile circuit switches on the
motor pump when water in the
overhead tank falls below the lowest
level and turns it 'off' when the tank
Points B, L and U of the water-level
controller circuit are connected to the
respective points of the sensor elec¬
trodes assembly.
point U (pin 2 of IC2) is connected to
already sunken ground electrode E2,
thereby triggering it. IC2 resets to give
a high output at pin 3. This is inverted
When water in the tank is below by transistor T1 to cut off transistor
is full. Moreover, if the pump is run¬ the lowest level LI, all the electrodes T2 and de-energise relay RL1. The mo¬
ning dry due to low voltage, it sounds are electrically separated and hence tor pump now stops to prevent water
an alarm to alert you to switch off the points L and U (pins 6 and 2 of IC2, overflow.
controller circuit (and hence the mo- respectively) are pulled up to the sup- As water is consumed, the water

ON/OFF IC1 OUT

r
81
D1-M-W4M7
1 7812 » RL1
L R1

D1 D2
ion
0.6W COM
C3 -L
Si is 2ÿ1 N/C
LI D.1|i —i—*
23CV R Vcc
AC
50 Hz a SLUM,
RL1-12V,

XI
D4 D3
3 “UhlSi0
6
N S2
IC2
NES55
E
X1-250V
ACPMMARY
TO 0-1BV,
3MmA
SECONDARY
TRANSFORMER
+
=FW
ci
&

83
6*
o h ±+S 25V
GND
R8
1M
< R7
510K
+|
p PZ1
PIEZO¬
BUZZER Ea*
LED1

T5
C8 J+ BC66S T4
BC54S
1M
25V
-r*
AT AT
LiÿEON LAMP
+F-
Fig. 1: Circuit of water-level controller

tor pump) to avoid coil burn and ply voltage through resistors R2 and level comes down leaving electrode E3
power wastage. R3, respectively. Therefore, to reset IC2 isolated from ground electrode E2.
The water-level controller circuit the output of IC2 at pin 3 goes low. Now point U (pin 2 of IC2) is pulled
(see Fig. 1) is built around IC 555 (IC2) As a result, transistor T1 stops con¬ up to the supply voltage. This does
to monitor the water level in the over¬ ducting to drive transistor T2 and re¬ not change the output state of IC2 and
head tank and 'on'/'off' status of the lay RL1 energises. The motor pump the motor remains switched off.
motor through the inverter and driver now starts running to fill the tank with When water level again falls be¬
circuits. The transistor switch circuitry water. Freewheeling diode D5 prevents low electrode E2, IC2 resets to cut off
monitors the flow of water and raises chattering of the relay due to the back transistor Tl. Transistor T2 conducts
an alarm if the pump runs dry. emf produced by the relay coil. to energise relay RL1 and the motor is
Power supply is obtained through When the water level rises to powered to run. This is how the pro¬
step-down transformer XI, diodes D1 bridge the electrodes, because of the cess continues. LED1 glows whenever
thro ugh D4, capac itor C1,ser iescur rent- conductivity of water, pin 6 (El) is the relay energises, indicating that the
limiting resistor Rl, regulator IC1, and pulled down to ground (E2). Thisdoes motor pump is running.
noise-filtering capacitors C2 and C3. not alter the output state of IC2, which As the values of resistors R2 and R3
The set-up for the water-level sens¬ maintains its previous state, and the are very high, corrosion of electrodes is
ing electrodes is shown in Fig. 2. Elec- motor keeps running. very little. Capacitors C2 through C7

WWW.EFYMAG.COM ELECTRONICS FOR YOU • DECEMBER 2005 • 95


CIRCUIT
IDEAS
filter out unwanted noise. Switches S2 JD energised relay in¬
and S3 can be used to manually switch
© dicates 'on' status
on and off the motor pump, respec¬ IE3 of the motor.
L2 B
tively, when water is in between the OVERFLOW 3. Immerse
upper and lower levels. Switch SI is PIPE points A and B in
Fig. 3: Dry pump
used to disable the unit during dry sensor set-up water. The buzzer
pump run or while flushing the tank. stops sounding to
For the sensor electrodes, use a indicate that water is flowing out of
moulded-type AC chord (used for tape FLUSH the pipe to short points A and B. This
recorders) with its pair of wires sleeved L1 OUT confirms no dry run.
at the end and connected together to
WEI = PIPE
4. Immerse points B and L in water,
form the electrode. Other electrodes can Fig. 2: Water-level electrodes set-up for over¬ as would be the case when the
be made similarly. These three AC head tank water level rises. Momentarily touch
chords are suspended inside the tank point U to water. LED1 goes off
from a longitudinally cut PVC pipe sound an alarm indicating dry running and the relay de-energises to turn
(used for electrical wiring). of the pump. the pump 'off/ This would be the
The arrangement for the dry pump The alarm circuit is enabled only case when water touches the overflow
sensor is shown in Fig. 3. A moulded- when transistor T2 conducts, i.e., only limit.
type AC chord with its pair of wires when the motor pump runs. Diode D6 5. Remove points A and B from
sleeved at the end can be attached firmly isolates the relay driver circuitry to water assuming that the flowing wa¬
to the delivery pipe such that water prevent transistor T3 from extending ter that was shorting points A and B
falls onto the plug leads. The sleeved ground to the relay through transistor has stopped. Now, although water is
ends are connected to points A and B of T3 and water being delivered. As soon not flowing, the buzzer does not sound
the water-level controller circuit. as the pump is switched on, the alarm as the relay is already de-energised.
The circuit for dry-run alarm com¬ sounds until water reaches the deliv- 6. Remove points U and B from
prises transistors T3 and T4, ery port. water, assuming that water has fallen
piezobuzzer PZ1, resistors R6 and R7, House the controller circuit (in¬ below the lowest limit because of con¬
and capacitor C7. When points A and cluding the power supply) in a cabi¬ sumption. Two seconds later, LED1
B of the dry-running sensor (see Fig. net. Use a four-core shielded cable for glows and the relay energises.
3) are bridged by water being deliv¬ wiring the tank electrodes to the con¬ Precautions. 1. Make sure that wa¬
ered by the pipe, transistor T3 con¬ troller unit fixed near the motor switch. ter being delivered from the water pipe
ducts to drive transistor T4 into cut¬ To test the circuit, proceed as fol¬ doesn't touch any of the suspended
off state and therefore the DC buzzer lows: water-level sensors.
remains silent. 1. Switch on power to the circuit. 2. Mount the alarm sensor firmly
When the pump runs dry, points 2. LED1 glows and relay RL1 onto the water pipe such that elec¬
A and B are electrically apart causing energises to produce an alarm from trodes A and B are shorted by water
transistor T3 to cut off because of pull- piezobuzzer PZ1, indicating that none flowing out of the pipe.
up resistor R6. Transistor T4 conducts of the circuit points A, B, U and L is 3. Use a properly shielded cable to
due to the emitter drop of transistor shorted through water (i.e., water in carry signals from the tank to the wa¬
T3, which activates the DC buzzer to the tank is below the lowest limit). The •
ter-level controller unit.

96 • DECEMBER 2005 • ELECTRONICS FOR YOU WWW.EFYMAG.COM


CIRCUIT
IDEAS

IR BURGLAR DETERRENT S.C. DW


IVEDI

„ T.K. HAREENDRAN readily-available electronic compo- siren-driver transistor T2. This condi-
nents. LED2 is used for indicating tion is indicated by the glowing of

T
hwart any burglary attempt us- power-‘on.’ LED1. The time-out period can be in-
ing this infrared proximity de- The transmitter section is built creased or decreased by changing the
tector that triggers an alarm around timer 555 (IC1), while the re- value of capacitor C6.

D2
\4 O
+6V
R1 R2 R4 R6 R8 R13 1N4007
1K 22Q
220Q 4.7K 1M C5 1K
C7 +
0.5W 0.1|J R11 100M"
T2
BC547
Vcc X //:
POWER
LED2
220K
— vwv—
16V
X

M
8 4 IR
LED1 16 3
2 7 8 LS1
VR1
4.7K 5
+ C6 8Q
10u 1W

i 2 IC1 T1 IC2 16V


T3
555 BC547I . 2 R5 6 CD4538 1 BC558 IC3 R12

6
5
”XC) IRC
2.2K RX1
3
1.8K
A/WV— < R7
1K
8 4
Q
AA/W
R9
220Q
R10
470Q
UM3561

C337
TSOP 5
D1=1N4148 GND 2
1738 R14
C1 C2
C3 + C4 -L- LED1 4.7Q
47p_ ZD1

2
““
0.01M 0.01M 16V 0.1M -T- 3.3V 0.5W

GND
O
TRANSMITTER SECTION > 4 RECEIVER-CUM-ALARM SECTION >
Fig. 1: Circuit for IR burglar deterrent

TOP VIEW ceiver-cum-alarm section con- Now siren-sound generator IC3 is


sists of IR sensor TSOP1738,
FRONT activated and its output signal is am-
VIEW
dual precision monostable plified by transistor T4 to produce a
SEL2[ 1 8 OSC2 TSOP
1738
multivibrator CD4538 and sound resembling that of police siren.
three-siren sound generator IC Resistor R14 limits the loudspeaker
vss[ 2 7 OSC1 UM3561. Pin configurations of current.
UM3561 UM3561 and TSOP1738 are The output tone of siren-sound
shown in Fig. 2. generator IC3 can be set by connect-
o/p[ 3 6 SEL1 1 2 3
The astable multivibrator ing its pin 6 to either Vcc or GND.
GND OUT
+Vcc (IC1) oscillates at a frequency When you connect pin 6 to Vcc IC3
N/C 4 5 VDD
of around 38 kHz, which is produces the sound of fire-alarm si-
transmitted by the infrared ren, but when you connect it to GND
LED (IR LED1). Resistor R2 it produces the sound of ambulance
Fig. 2: Pin configurations of UM3561 and TSOP1738
limits the current across the IR siren.
LED. Assemble the transmitter and re-
when the rays falling on its sensor are The transmitted IR signal directly ceiver-cum-alarm circuits on two sepa-
interrupted. falls on IR sensor TSOP1738. When- rate general-purpose PCBs and house
The circuit of IR burglar deterrent ever the IR signal is interrupted, its in suitable cabinets. Mount the units
(shown in Fig. 1) comprises transmit- output pin 3 goes low and IC2 is trig- on the opposite sides of the entrance
ter and receiver-cum-alarm sections. It gered at pin 5 through transistor T2. gate such that IR rays from IR LED1
works off 6V DC, 500mA uninter- As a result, its output at pin 7 goes fall directly on the IR receiver module
rupted supply and uses low-cost low (for a preset time) to forward bias (TSOP1738). z

WWW.EFYMAG.COM ELECTRONICS FOR YOU • JANUARY 2006 • 101

CMYK
CIRCUIT
IDEAS

SHADOW ALARM SANI TH


EO

„ D. MOHAN KUMAR The non-inverting input of IC1 gets a and zener diode ZD1 provide 3.1V DC
controlled voltage from potential di- to IC UM3561.

T
his opto-sensitive circuit sounds vider R2 and VR1. The circuit is easy to assemble as
an alarm whenever a shadow In the presence of ambient light, it requires only a few low-cost com-
falls on it. So it can be used at the phototransistor conducts and the ponents. Enclose it in a cabinet with
night by shopkeepers to protect the inverting input (pin 2) of IC1 gets a the photo-sensor inside. Drill a 5mm
valuables in their showrooms. A dim lower voltage than its non-inverting hole on the front panel of the cabinet
lighting in the room is necessary to input (pin 3). This makes the output to let ambient light fall on the photo-
detect the moving shadow. Unlike of IC1 high, which is indicated by the sensor.
opto-interruption alarms based on glowing of LED1. Adjust potmeter VR1 (47k) until
light-dependent resistors (LDRs), it When a shadow falls on the photo- LED2 stops glowing and the buzzer
does not require an aligned light beam sensor, the output of IC1 goes low. stops beeping while LED1 glows. This
to illuminate the photo-sensor. This low pulse triggers the monostable is the position of VR1 to be main-

IC1=OPERATIONAL AMPLIFIER o
R1
100K
R2
10K
R4
10K
R5
4.7K
R6
1M IC2=TIMER
IC3=SIREN SOUND GENERATOR
S1
ON/OFF Y

LIGHT
RAYS

X)
T1
2

3
MA741
+
7
IC1

4
6
4

2
8

IC2
NE555
7

3
R7
at lei I:<=<:ÿ

R8
R9

— ww—
220K
LS1
80
0.5W
w 9V
BATT.
+

6800 470 R10


L14F1 R3 8
5 +

h
1K
VR1
47K
LOG
1000

LED1ÿ\ -L+ Cl, C3


ALARM
LED23ÿ\
PZ1
PIEZO¬
BUZZER
5
IC3
UM3561
Q l_A AAA

T2©
BC548
C2 47|j ZD1 r r*
SETTING 25V 0.01M 25V 3.1V

The circuit is powered by a 9V PP3 (IC2) designed for a delay of 51 sec- tained for that particular
battery and uses the most sensitive onds using R6 and C3. The output of intensity of light. LED1 will continue
photo-sensor L14F1 to detect shadows. IC2 is used to light up LED2 and acti- to glow even when a shadow is
It is portable and can be used at any vate the alarm. detected.
place that is to be monitored. Slide switch S2 is used to select ei- The circuit is now ready to use.
Op-amp µA741 (IC1) is used as a ther the buzzer or siren. When it is To test it, move a paper in front of
voltage comparator. Its inverting in- towards left the buzzer beeps, and the unit. If LED2 glows along with
put is biased by the voltage obtained when it is towards right IC UM3561 the beep of the buzzer, it means that
from the junction of 100k resistor R1 (IC3) activates to give a loud alarm the photo-sensor has detected a
and the collector of phototransistor T1. simulating a police siren. Resistor R8 shadow. z

100 • JANUARY 2006 • ELECTRONICS FOR YOU WWW.EFYMAG.COM

CMYK
CIRCUIT
IDEAS

ULTRASONIC PROXIMITY C r. DW'VEPL


DETECTOR
■ EFY LAB terest in a product comes near an ex¬ spikes of current from IC1 circuit to
hibited product. sustain oscillations and thereby avoids

T
his ultrasonic proximity detec¬ Fig. 1 shows the transmitter circuit. any damage.
tor comprising independent, It comprises CMOS timer IC 7555 (IC1) The receiver front-end (refer
battery-powered transmitter configured as an astable multivibrator, Fig. 2) is designed to provide a very
and receiver sections makes use which may be tuned to the frequency high gain for the reflected faint
of a pair of matched ultrasonic of the ultrasonic piezoceramic ultrasonic frequency signals detected
piezoceramic transducers operating at transmitter's resonant frequency of by the ultrasonic transducer. The am¬
around 40 kHz each. This circuit can around 40 kHz using preset VR1. A plifiers built around N1 and N2, re¬
be used in exhibitions to switch on pre¬ complementary pair of transistors T1 spectively, provide AC voltage gain
recorded audio/video messages auto¬ and 12 is used for driving and buffer¬ of around 80 each. These two stages
matically when a visitor evincing in- ing the transducer while it draws should have a high open-circuit gain,

TX1 -ULTRASONIC PEZO-CERAJIIC


TRANSDUCER TRANSMITTER
+*V
5m.
RESET Vcc R1 C327
3.3K
*3 TRANSDUCER -<8gf S&

+ C2 TRIGGER
IC1 2 VR1
75SS

6
10K
Wv
R3
4.7K R2
3.3K
j TX1

GND

-r- C1
0.001M
BC337

fr
J-
Fig. 4: Installation of transducer pair

product, it signifies his interest.


Switching diode D1 followed by a fil¬
Fig. 1: Transmitter circuit ter comprising capacitor C5 and re-

FRONT FRONT
+9V RX1-ULTRA80NIC PIEZO-CERAMIC _ n . VIEW VIEW
TRANSDUCER RECEIVER

1
R11
4.7M
IC2<N1-N3y=LJI324

D1
IN4148
3 <
0 0
ITT ¥
J1 R1D
270 K .“/1. E BC C B E

R13
eeon
R3
-- R9
IM R7
12K<
: -
Fig. 3: Pin
configurations of
transistors BC327

'f'b L£D1
R12
390K i+°S?u 26V
1M
12K
C3
>R5
<1M
and BC337

GND
DE3EJ 0.001
M~jÿ I_
0.001M sistor R10 is used to meet
_lthis requirement. The fil-
ter also helps to bypass
Fig. 2: Receiver circuit brief bursts of ambient
noise in the ultrasonic
wide bandwidth and very low bias cost. For higher efficiency, you may range. The third stage comprising N3
current apart from being capable of use single op-amps such as CA3130 works as a comparator to provide a
single-supply operation. Quad op-amp or C A3140. triggering pulse when a visitor stops
LM324 is used here due to its low When a visitor pauses before a by. This pulse can be used to trigger

90 • FEBRUARY 2006 • ELECTRONICS FOR YOU WWW.EFYMA6.COM


CIRCUIT
IDEAS
a timer or a monostable, whose out¬ ducer pair, the status LED (LED1) mitted ultrasonic signal is optimally
put may then be used to switch on glows because of the signal reflected received by the receiver after reflec¬
the audio/video message concerning from tire body of the visitor. tion. Fig. 3 shows the pin configura¬
the product for a predetermined pe¬ The circuit can be tion of transistors T1 and T2, while Fig.
riod. assembled on any general-purpose 4 shows installation of the ultrasonic
When somebody comes in front PCB. The transmitter and tire receiver piezoceramic transducer pair operat¬
of the ultrasonic piezoceramic trans- should be aligned such that the trans¬ ing at around 40 kHz. •

WWW.EFYMAG.COM ELECTRONICS FOR YOU • FEBRUARY 2006 • 91


CIRCUIT
IDEAS

VERSATILE POWER SUPPLY S.C. DW


IVEDI

„ SUNIL KUMAR tive regulator capable of providing sistor T1 is forward biased to switch
1.2V to 37 volts at 1.5A current to the resistors R1 and R2 (in series) across

U
sing this circuit, you can ob- load. Adj pin of LM317 and ground to pro-
tain the following voltages Resistor R13 and selected combi- duce 3.3V.
(approx.) at a current limited nations of resistors R1 through R12 Other voltages can be produced in
to one ampere: 3.3V, 5V, 6V, 9V, 12V are used to produce approximately the same way by using rotary switch
and 15V. 3.3V, 5V, 6V, 9V, 12V and 15V at the S1. Capacitor C2 bypasses any ripple
The AC mains is stepped down output. The desired resistors are se- in the output. Diode D5 is used as the
by transformer X1 to deliver the sec- lected by switching into conduction protection diode. Use a heat-sink for
ondary output of 18V AC at a maxi- one of the six pnp transistors T1 dissipation of heat from IC LM317. The
mum current of 1A dependant upon through T6 by grounding the corre- fuse-rated lamp provides protection
the load. The transformer output is sponding transistor base using rotary against short circuit.
rectified by the bridge rectifier com- switch S1. This 1A rated power supply can
prising diodes D1 through D4, filtered For example, to get regulated 3.3V, be used for testing of various circuit
by capacitor C1 and fed to regulator simply rotate the knob of rotary switch ideas as well as construction projects
IC LM317, which is a 3-terminal posi- to 3.3V position. Consequently, tran- published in EFY. z
D5
X1=230V AC D1-D5=IN4007
\4
\\\\\\\\\\\\\\\\ /
PRIMARY TO 18V AC, 1A \\\\y
\ /
SECONDARY TRANSFORMER \\ //

IN b IC1 4 OUT
3 LM317 2
LED1 VOUT
X1 F1
R13 FUSE
D1 ADJ 220Q
D4 1A
R14
230V « 3.3K
CD
AC CD CD
CD R11 R9 R7 R5 R3 R1
50 Hz o CD
CD 2.2K 1.8K 1.2K 820Q 560Q 330Q
O C2
D2 D3
0.1M
C1 R12 R10 R8 R6 R4 R2
1000M 220Q 1200 1800 180 1000 330
a 50V

T6, T5, T4, T3, T2 T1

FRONT VIEW

O
15V 3.3V
LM S1=SINGLE POLE SIX T1-T6=BC558

ADJ
317

VOUT
VlN
THROUGH ROTARY SWITCH
12V
S1 P
r 5V

%ÿ
9V 6V

84 • FEBRUARY 2006 • ELECTRONICS FOR YOU WWW.EFYMAG.COM

CMYK
CIRCUIT
IDEAS

INFRARED BUG S.C. DW


IVEDI

„ T.K. HAREENDRAN cuit, in principle, con-


verts the IR signal pulse GAIN 1 8 GAIN
FRONT FRONT
VIEW VIEW

T
his circuit can be used to de- trains into noticeable au-
tect the presence of modulated ral notes. IN- 2 7 BYPASS BC UM
547 66
infrared signals in its vicinity S1 is used to switch
IN+ 3 6 B+ 3 2
from any electronic source, for in- on/off mains power and 2 3

stance, an IR handheld remote control- LED1 indicates power- GND 4 5 OUT GND O/P
CB E +Vcc
ler. It can also be used for testing IR ‘on.’ Resistor R4 and
TOP VIEW LM386
burglar alarm systems. zener diode ZD2 form
Fig. 1 shows the circuit of the in- a low-current voltage Fig. 2: Pin configurations of LM386, BC547/337 and UM66
frared bug. Besides the power supply stabiliser for providing
(one 9V PP3/6F22 compact battery steady 5.1V DC to the small signal- T2. The amplified signal is fed to the
pack), it consists of an infrared preamplifier circuit. IR LED1 is the melody generator via resistor R5. The
signal detector-cum-preamplifier main sensing element. output of the melody generator is fed
followed by a melody generator The IR signal detected by IR LED1 to LM386 low-power audio amplifier
and a tiny audio amplifier. The cir- is amplified by npn transistors T1 and (IC2) via variable resistor VR1, which
works as the volume control.
O The loudspeaker sounds to in-
R4 S1
SPST
dicate the presence of IR signal
IR ZD2 4700 R6
C3
LED1 5.1V 1K ON/OFF near the circuit.
T 100n SWITCH
ZENER IC LM386 is wired as a
R3
100K POWER ON \\LED1 minimum-parts amplifier with
R1
100Q + a voltage gain of ‘20,’ which is
9V
BATT. T
sufficient for this application.
©T1
BC547

1
' vwv—
R5
2200 Vcc IC1 O/P
3 6
C5
220n
Capacitor C3 is used for
decoupling of the positive rail
25 V
2 UM66 1 IC2 5 + and the R-C combination net-
LM386 work comprising C4 and R7
GND 2
VR1 4 bypasses high frequency to
T2 10K
BC337 LOG ground.

© ZD1
3.3V
ZENER
C4
470|J ~T
LS1
80
The circuit can be easily
wired on a small veroboard or
0.5W any general-purpose PCB. Pin
C1 _l± R2
R7 configurations of IC LM386,
100
10M 4700 transistor BC547 and melody
25V
generator UM66 are shown in
Fig. 2. A miniature metallic
cabinet may be used for enclos-
Fig. 1: Infrared bug ing the gadget. z

100 • MARCH 2006 • ELECTRONICS FOR YOU WWW.EFYMAG.COM

CMYK
CIRCUIT
IDEAS

PICNIC LAMP S.C. DW


IVEDI

„ D. MOHAN KUMAR is a monostable multivibrator built white LED (LED1) through ballast re-
around low-power CMOS timer IC sistor R7.

Y
ou can take this white LED- 7555. Resistor R4 keeps trigger input The circuit can be easily assembled
based night lamp on your pic- pin 2 of the monostable normally high on a perforated board. Make the cir-
nic outings. The lamp has in the absence of the trigger input. cuit assembly as compact as possible
sound trigger and push-to-on facili- Timing elements R6 and C4 give a time to enclose in a small case. Use three
ties and gives ample light dur-
ing a walk at night. It will also
prove useful in locating the VR1 R6
R2 VR2 S2
door of your tent in the dark- 10K R4 1M

ness. A click of the fingers will R1


10K 1M
10K
R5
4.7K
R
8
7
ON/OFF
SWITCH 7
switch on the lamp for three 4.7K
7 4
-VM— | 4.5V +
minutes to help you in a " 2 IC2 6
3x1.5V -E-
C1 IC1 6 T 7555
strange place. 0.22M TL071 -1► 2 CELLS
The circuit uses low-power
ICs to save the battery power.
3
+ 4
1
3
►h
LED1
WHITE
JFET op-amp TL071 (IC1) am- +
plifies the sound picked up by
the condenser microphone. Re-
D COND.
MIC.
R3
10K
S1
H
PUSH TO
0
Q
C2
4.7M
16V
C3 -L

0.01|j |—
C4
47M
16V
R7
1000
sistor R1 and low-value capaci- ON-SWITCH

tor C1 (0.22µF) make the am-


plifier insensitive to very low-
frequency sounds, eliminating
the chance of false triggering.
VR1 is used to adjust the sensitivity of delay of three minutes. Reset pin 4 of 1.5V pen-light cells to power the cir-
the microphone and VR2 adjusts the IC2 is connected to the positive rail cuit. Adjust VR1 and VR2 suitably to
gain of IC1. through R5 and to the negative rail get sufficient sensitivity of IC1. Toggle
The amplified output from IC1 is through C2 to provide power-on-reset switch S1 can be used to switch on the
coupled to trigger pin 2 of IC2, which function. The output of IC2 powers the lamp like a torch. z

WWW.EFYMAG.COM ELECTRONICS FOR YOU • MARCH 2006 • 101

CMYK
CIRCUIT
IDEAS

SIMPLE SHORT-WAVE
TRANSMITTER
■ PRINCE PHILLIPS
R1
+12V v-3
T
his low-cost short-wave trans¬ R5 R6 2

X)HP*
:IOK 1M
mitter is tunable from 10 to 15
MHz with the help of V2] gang
C1
0.1|J
C2 +
470|i ZI
36V
C3
O.lp
k 'Tt*' BD13S i
condenser VC1, which determines
BOMB
the carrier frequency of the r~) CONO.
me a
transmitter in conjunction with S RFC1
inductor LI. The frequency trimming s
can be done with VC2. The carrier VC1 R2
31OP L1 33K
is amplified by transistor T4 !4J GANG
and coupled to RF amplifier transis¬ /room. T4
BD677

Si
tor T1 (BD677) through transformer C5 BC54B
-loop
R3
XI*. 39K
The transmitter does not use any cr -1- *
modulator transformer. The audio out¬ 470P~r
put from condenser MIC is HH*F-
C8 VC2
22P 22P CB " ≤ R4
preamplified by transistor T3 (BC548). 4TOP <ioon
The audio output from T3 is further
amplified by transistor T2 (BD139),
1 GND
©

which modulates the RF amplifier


built around transistor T1 by varying
the current through it in accordance
-- -
RFC1 30 TURNS OF 24 SWG COPPER WIRE ON BUM DIA. AIR CORE
*X1 1S-TURN PR1MARY, 3-TURN SECONDARY USING AN IFT CORE WITH TUNING SLUG.
ALSO REFER TEXT
LI 4 TURNS OF 22SWO COPPER WIRE ON 13MM DIA. AIR CORE
with tire audio signal's amplitude. Fig. 1: Simple shortwave transmitter
RFC1 is used to block the carrier RF
signal from transistor T2 and the transformer
BD139 00677 BCS48 transformer XI, we used a readymade
power supply.

Ww
are given in short-wave antenna coil with
The modulated RF is coupled the figure. tuning slug (Jawahar make),
to the antenna via capacitor C9. EFY Lab. which worked satisfactorily. We tested
For antenna, one can use a 0.5m EC B BCE 1,1
During test-
CB E the transmitter reception up to
long telescopic aerial. Details of ing, in place of
Fig. 2: Pin configurations of 75 metres and found good signal
RF choke, inductor LI and coupling BD139, BD677 3nd BCSÿB c o u p 1 i fl ,:r strength. •

WWW.EFYMAG.COM ELECTRONICS FOR YOU • APRIL 2006 • 95


CIRCUIT
IDEAS

IVEDI
S.C. DW
SOLAR LIGHTING SYSTEM
 ASHISH AHUJA ing occurs moments after the voltage ing and the battery is in the charging
across it falls below 12V. Capacitor C1 mode.

T
he world cannot continue to rely also filters the rectified output if the At night, there will be no genera-
for long on fossil fuels for its battery is charged through AC power. tion of electricity. The relay will not
energy requirements. Fossil fuel The higher the value of the capacitor, energise and charging will not take
reserves are limited. In addition, when the more the delay in switching. The place. The solar energy stored in the
burnt, these add to global warming, switching time is to be properly ad- battery can then be used to light up
air pollution and acid rain. justed because the charging would the lamp. A 3W lamp glows continu-
So solar photovoltaic systems are practically stop in the early evening ously for around 6 hours if the battery
ideal for providing independent elec- while we want the light to be ‘on’ dur- is fully charged. Instead of a 3W lamp,
trical power and lighting in isolated ing late evening. you can also use a parallel array of
rural areas that are far away from the During daytime, relay RL1 serially connected white LEDs and lim-

<Z>
N/O
D11 o
O
SOLAR + 1N4007 o
PANEL -
12V-16V '
<Z2»
N/C BAT. REV.
O- LEV. POL.
RL1
12V, 200Q S2 LED3 LED2
PUSH- 02
S1(a) 10/0
RELAY TO-ON &
X> SWITCH D3

O
D4
R3 R2
/
G S3
ON/OFF
O
230V AC o D5 100Q 100Q SWITCH
50Hz <=> + IC1
o O IN OUT
o CZ5 7808 3

r.l
BR1
2 D1 D6
1A C1 +
2200M ~ COM
o 35V D7
230V
AC PRIMARY LED1 BATT. + LAMP
TO 12V AC CHARGING 6V D8
4.5AH “ 6V, 3W
500mA S1(b)
SECONDARY R1 D9
TRANSFORMER S1=DPDT SWITCH 1K
D10

D1-D10=1N4007

power grid. These systems are non- energises, provided DPDT switch S1 iting resistors to provide sufficient
polluting, don’t deplete the natural re- is towards the solar panel side. Due to light for even longer duration.
sources and are cheap in the long run. energisation of relay RL1, the positive In case the battery is connected in
The aim of this circuit is to demon- terminal of the battery is connected to reverse polarity while charging, IC
strate how we can utilise solar light to the output of regulator IC 7808 (a 3- 7808 will get damaged. The circuit in-
electrify the remote areas, i.e., how we terminal, 1A, 8V regulator) via diode dicates this damage by lighting up
can store the solar energy and then use D1 and normally-open (N/O) contacts LED2, which is connected in reverse
it for small-scale lighting applications. of relay RL1. Here we have used a 6V, with resistor R2. However, the circuit
Solar cells generate direct current, 4.5Ah maintenance-free, lead-acid re- provides only the indication of reverse
so make sure that DPDT switch S1 is chargeable battery. It requires a con- polarity and no measure to protect the
towards the solar panel side. The DC stant voltage of approx. 7.3 volts for IC. A diode can be connected in re-
voltage from the solar panel is used to its proper charging. verse to the common terminal of the
charge the battery and control the re- Even though the output of the so- IC but this would reduce the voltage
lay. lar panel keeps varying with the light available to the battery for charging
Capacitor C1 connected in parallel intensity, IC 7808 (IC1) is used to give by another 0.7 volt.
with a 12V relay coil remains charged a constant output of 8V. Diode D1 There is also a provision for esti-
in daytime until the relay is activated. causes a drop of 0.7V, so we get mating the approximate voltage in the
Capacitor C1 is used to increase the approx. 7.3V to charge the battery. battery. This has been done by connect-
response time of the relay, so switch- LED1 indicates that the circuit is work- ing ten 1N4007 diodes (D2 through D11)

98 • APRIL 2006 • ELECTRONICS FOR YOU WWW.EFYMAG.COM

CMYK
CIRCUIT
IDEAS
in forward bias with the battery. The tery voltage falls due to prolonged op- consecutive days, the battery will not
output is taken by LED3 across diodes eration, LED3 no longer glows as the charge. So a transformer and full-wave
D2, D3, D4 and D5, which is equal to drop across D2, D3, D4 and D5 is not rectifier have been added to charge the
2.8V when the battery is fully charged. enough to light it up. This indicates battery by using DPDT switch S1. This
LED3 lights up at 2.5 volts or above. that the battery has gone weak. Micro- is particularly helpful in those areas
Here it glows with the voltage drop switch S1 has been provided to do this where power supply is irregular; the
across the four diodes, which indicates test whenever you want. battery can be charged whenever
that the battery is charged. If the bat- If the weather is cloudy for some mains power is available. 

WWW.EFYMAG.COM ELECTRONICS FOR YOU • APRIL 2006 • 99

CMYK
CIRCUIT
IDEAS

VISUAL AC MAINS S.C. DW


IVEDI

VOLTAGE INDICATOR
 RAJ K. GORKHALI reaches 160 volts, LED2 glows when built around quad op-amp compara-
the voltage reaches 170 volts and so on. tors IC1 through IC3. The inverting in-

Y
ou should not be surprised if The number of LEDs that glow keeps put of all the comparators is fed with
someone tells you that the increasing with every additional 10 the unregulated DC voltage, which is
mains voltage fluctuation could volts. When the input voltage reaches proportional to mains input, whereas
be anywhere from 160 volts to 270 270 volts, all the LEDs glow. the non-inverting inputs are derived
volts. Although majority of our elec- The circuit basically comprises from regulated output of IC4 through
trical and electronics appliances have three LM339 comparators (IC1, IC2 a series network of precision resistors
some kind of voltage stabilisation in- and IC3) and a 12V regulator (IC4). It to serve as reference DC voltages.
ternally built-in, more than 90 per cent is powered by regulated 12V DC. For Resistors R13 to R25 are chosen
of the faults in these appliances occur power supply, mains 230V AC is such that the reference voltage at
due to these power fluctuations. stepped down to 15V AC by step- points 1 to 12 is 0.93V, 1.87V, 2.80V,
This simple test gadget gives vi- down transformer X1, rectified by a 3.73V, 4.67V, 5.60V, 6.53V, 7.46V,
sual indication of AC mains voltage bridge rectifier comprising diodes D1 8.40V, 9.33V, 10.27V and 11.20V, re-
from 160 volts to 270 volts in steps of through D4, filtered by capacitor C4 spectively. When the input voltage var-
10 volts. and regulated by IC4. The input ies from 160V AC to 270V AC, the DC
There are twelve LEDs numbered voltage of the regulator is also fed to voltage at the anode of ZD1 also var-
LED1 to LED12 to indicate the voltage the inverting inputs of gates N1 ies accordingly. With input voltage
level. For input AC mains voltage of through N12 for controlling the level varying from 160V to 270V, the out-
less than 160 volts, all the LEDs remain of the AC. put across filter capacitors C1 and C2
off. LED1 glows when the voltage The LED-based display circuit is varies from 14.3V to 24.1V approxi-

R28 R29 R30 R31 R32 R33 R34 R35 R36 R37 R38 R39
1K 1K 1K 1K 1K 1K 1K 1K 1K 1K 1K 1K

W\ÿLED1 W\ÿLED2 LED3 WÿLED4 W\ÿLED5 WÿLED6 W\ÿLED7 W\ÿLED8 WÿLED9 LED10 WÿLED11 WÿLED12
< ( »-
2 R40 1 R41 14 R42 13 R43 2 R44 1 R45 14 R46 131 R47 2 R48 1 R49 14 R50 13 R51

AIAt ATAi AiAf A!AtAt A!Af A


4 5
< t
6 7(
k
8 9
i k
10 11
<k
4 5(
k
6 7
11
8 9 10 11
i >-
4 5
<k
6 7
<k
8 9
< k
10 11

R1 R2 R3 R4 R5 R6 R7 R8 R9 R10 R11 R12

R25
R13 R14 R15 R16 R17 R18 R19 R20 R21 R22 R23 R24 8.2K+
10K 10K 10K 10K 10K 10K 10K 10K 10K 10K 10K 10K 390Q
A/VW m A/VW A/VW A/VW A/VW A/VW A/VW A/VW A/VW A/WV-
3 4 5 6 7 8 9 10 11 12

A/VW
R1-R12=100Q

R40-R51=1M

IC1 (N1-N4)
L

S1
ON/OFF
SWITCH
ci/7)
F1
FUSE
0.5A
R27
100K
I ZD1
12V, 0.5W
ZENER

IC2 (N5-N8) =LM339 o D1 D2


IC3 (N9-N12) R26
o CD 39K
160 TO O
CD IC4
PIN3 AND PIN 12 OF LM339 ARE 270V AC CD IN OUT
TO BE CONNECTED TO +12V CD 1 7812 3
50Hz CD
AND GROUND, RESPECTIVELY CD
O
+L ci
C2 COM C3
D1-D4=1N4007 RECTIFIER DIODE D3 100M
D4 0.1M
X1 63V 0.1M
X1=230V AC PRIMARY TO
15V AC, 300mA
SECONDARY TRANSFORMER N

WWW.EFYMAG.COM ELECTRONICS FOR YOU • MAY 2006 • 89

CMYK
CIRCUIT
IDEAS
mately. Zener ZD1 is used to drop purpose PCB such that all the LEDs simply plug the gadget into the mains
fixed 12V and apply proportional volt- make a bargraph. In the bargraph, AC measuring point, press switch S1
ages to all comparator stages (invert- mark LED1 for minimum level of and observe the bargraph built around
ing pins). Whenever the voltage at the 160V, then LED2 for 170V and so on. LEDs. Let’s assume that LED1 through
non-inverting input of the compara- Finally, mark LED12 for maximum LED6 glow. The measured voltage in
tors goes high, the LED connected at level of 270V. this case is 220V. Similarly, if all the
the output glows. Now your test gadget is ready to LEDs glow, it means that the voltage
Assemble the circuit on a general- use. For measuring the AC voltage, is more than 270V. 

90 • MAY 2006 • ELECTRONICS FOR YOU WWW.EFYMAG.COM

CMYK
CIRCUIT
IDEAS

SCHOOL/COLLEGE
QUIZ BUZZER
■ GOVINDA RAJU TEKUMUDI petition. The circuit uses IC 74LS373 section is IC 74LS373, an octal
and a few passive components that are latch that is used to transfer

M
anual buzzers used for quiz readily available in the market. the logic state at data input pins
competitions in schools and The circuit can be divided into two DO through D7 to the corresponding
colleges create a lot of confu¬ sections: power supply and quiz Q0 through Q7 outputs. Data pins DO
sion in identifying the first respondent. buzzer. through D7 are normally pulled low
Although there are circuits using PCs Fig. 1 shows the power supply sec¬ by resistors R1 through R8, respec¬
and discrete ICs, they are either too tion. The regulated 5V power supply tively.
expensive or limited to only a few for tire quiz buzzer section is derived One terminal of push-to-on
number of players. from AC mains. The 230V AC mains switches SI through S8 is connected
The quiz buzzer circuit given here is stepped down to 7.5V AC by trans¬ to +5V, while the other terminal is
can be used for up to eight players, former XT rectified by bridge rectifier connected to the respective data input
which is maximum in any quiz com- BR1, filtered by Cl and regulated pins. The switches are to be extended
by regulator to tire players through cord wire. The
IC1. Capacitor torch bulbs BL1 through BL8 can be
-
BR1-1ABREQE RECTFIBt
IN IC1 OUT

f&llTk
1 7805 3 <1 C2 bypasses housed in boxes with the front side of
BR1 A
1A
COM ripples in the the boxes covered with a white paper
230V AC 5* + rÿulator out¬ having the name or number of the
60Hz C2 -1- put. contestant written over it for easy
0.1p - -
i r»
X1*2WV AC PRIMARY TO 7.SV, *-
560mA SECONDARY TRANSFORMER
+L ci Fig.
shows
■o quiz buzzer
the
2 identification. Place the boxes above
the head level so that these can be
seen by the audience also.
section. At tire When the power is switched on us¬
Fig. 1 : Power supply heart of this ing switch S9 (provided terminals 'A'

O
A + D1-DS-1N4146
PZ1
PIEZO¬ BL1 BL8
BUZZER R11
R9 56K RIOS
T1
BC548
1K 1Kf
D3 D4 D5 D6 D7 D8 SCFtlU

Vac LE _T_BCS40
R12
—oo S1

82
DO
3
20 11
2 Q0 Wkr
R13
D1
o- 4 $ Q1
S3 D2 R14
o e 02 m
S4 D3 R15
O- e IC2 e 03 AWir
SS D4 74L3373 R1G
o 13 12 -vwv-

04
58 □5 R17
, i o o 15 4WV
05
87 D6 R18 AjSCRS
o 17 16
06 V
se ■ D7 R19
■■ ■■
" 4 ■; t T «1 10« Q7
R12-R19-1K
RIJ:R2; ;R3- :R4«:R5« :R6* :R7«:RB< OE GN0
BL1-BLB»TORCH BULB (<V]
GND 8CR1-8CR8»TYNS04rTYN612
9
B 81-S8-TACTILE SWITCH; R1-R6-12K

Fig. 2: Circuit of school/college quiz buzzer

WWW. EFYMAG .COM ELECTRONICS FOR YOU • MAY 2006 • 37


CIRCUIT
o

and 'B' of both the power supply and tarily presses his respective switch, the is tied to ground to latch all the QO
quiz buzzer sections are intercon¬ corresponding output data pin goes through Q7 outputs. This restricts fur¬
nected), the circuit is ready to use. high. This triggers the corresponding ther change in the output state due to
Now all the switches (SI through S8) SCR and the respective bulb glows. At any change in the state of switches SI
are open and QO through Q7 outputs the same time, the piezobuzzer (PZ1) through S8 by any other contestant.
of IC 74LS373 are low. As a result, the sounds as transistor T1 conducts. Only one of the eight torch bulbs
gates of silicon-controlled rectifiers Simultaneously, the base of tran¬ glows until the circuit is reset by on/
SCR1 through SCR8 are also low. sistor T2 becomes high to make it con¬ off switch S9. Note. The complete kit
As soon as a contestant momen¬ duct. Latch-enable (LE) pin 11 of IC2 •
is available at Kits 'n' Spares outlet.

88 • MAY 2006 • ELECTRONICS FOR YOU WWW.EFYMAG.COM


CIRCUIT
IDEAS

MULTI-MELODY GENERATOR SANI TH


EO

WITH INSTRUMENTAL EFFECT


 EFY LAB programmed data. Its inbuilt pream- cuit terminal through which instru-
plifier provides a simple interface to mental effects are produced. The

T
his melody generator can gen- the driver circuit. The IC can be re- preamplifier outputs are available at
erate various English and Hindi placed with other UM348XXX series, pins 10 and 11, which are fed to loud-
tunes as also instrumental ef- WR630173 or WE4822 melody genera- speaker-driver transistors T1 (SK100)
fects. Various modes of melodies can tor ICs. A WR630173 preprogrammed and T2 (SL100), respectively.
When you switch on the circuit by
closing switch S1, LED1 glows. If DIP
R1
C1
+ 0.47M
10V
R2
180K S2 Ih VR1 /
LS1
switches S3 and S5 are closed and S4
-T
rn-- II\
470Q INPUT VOL 8Q open, pressing input switch S2 will
CJ1 E,J2 0.5W
generate a melody tone from the loud-
LED1 :w t T R3
47K
R4 R7
47K 1 K —
C3
T 0.1M speaker. Vary VR1 to adjust its vol-
C4
SL Vcc ume. Pressing S2 again will generate a
POWER 4 2 16 10V
M
R8 new melody tone. If switches S3 and
330K
3 9 S4 are opened while S5 is closed, the
R9

s 31
ON/OFF
RP
5 12
330K
A/WV/— ' T1 same tone keeps repeating for every

o
SWITCH SK100
ENV OUT1 pressing of S2. The positions of DIP
10

CLOSED S5 S4 S3 C5 I switches and the various modes of


melodies are summarised in the table.
MODE
II
OPENED
-BB IC1
UM3481A/
WR630173
.022M -p

C6
When switch S5 is open, it will
generate an instrumental effect from
.022M
I
T2
R5 the loudspeaker. This effect is pro-


+
BATT.
— vwv
R6
100K
56K OSC2

OSC1 15
14 11
OUT2 SL100

O duced by the enveloping circuit con-


sisting of capacitor C1 and resistor R2
“=ÿ
3V — vwv
1 1
connected to pin 7 of IC1. In fact, by
OSC3 13
hit and trial you can choose the val-
8
C2
33P GND
ues of these components as per your
taste by listening to the output sound.
S2 = TACTILE SWITCH
Only C1 or R2 or its parallel combina-
J1, J2=JUMPER S3-S5=DIP SWITCH
tion can be used to generate a distinct
instrument effect. To select any of
as Hindi melody gen- these options, two jumper terminals
Positions of DIP Switches for erator can be used J1 and J2 are provided in the circuit at
Various Modes here. There are 16 C1 and R2, respectively. For example,
S3 S4 S5 Mode of tone output tunes stored in if you want to use only C1, you can
WR630173 including join J1 terminals using hookup wire
Opened Opened Closed The same tone keeps repeating. Press
mera joota hai japani, or jumper cap and keep J2 open. The
S2 for the next tone.
mera naam chin chin repetition of the musical effect de-
Opened Closed Closed Play a new tone for every pressing
of S2. chu, hare rama hare pends on the status of switches S3
Closed Opened Closed Play all the tones one by one and krishna, raghu pati and S4.
then repeat the cycle without S2 input. raghav raja ram and The oscillation frequency is pro-
Closed Closed Closed Play all the tones and stop (no repetition). ramaiya vasta vaiya. duced by the resistor and capacitor
The circuit is pow- connected at pins 14 and 13 of IC1.
be selected through DIP switches. ered by a 3V battery. Switch S2 is the This frequency is used as a time base
Other advantages are high volume and main input-select switch for produc- for the tone, rhythm and tempo gen-
volume control. ing different tones in the loudspeaker. erators. The quality of the melody
IC UM3481A is a 16-pin multi-in- Various modes of operation are se- tones depends on this frequency. Re-
strument melody generator. It is a lected through DIP switches S3, S4 and sistor R6 (100-kilo-ohm) connected to
mask-ROM-programmed IC designed S5 connected to pins 3, 5 and 7 of IC1, pin 15 makes the circuit insensitive to
to play the melody according to the respectively. Pin 7 is the envelope cir- variations in the power supply. 

88 • JUNE 2006 • ELECTRONICS FOR YOU WWW.EFYMAG.COM

CMYK
CIRCUIT
IDEAS

PARROT-SOUNDING TV pvaÿi
AC DOORBELL
■ SAN I THEO former used in the
xi
X1-AUDIO TRANSFORMER experimental setup
s
H ere is a mains-operated door¬
bell that produces parrot-like
sweet voice without requiring
any musical IC. The circuit is cheap
LS!
an
).6W
V|-
J_l—
I
C5
0.047*1
~
are shown in Fig. 2.
The circuit is
powered directly
from 220V AC mains
and easy to construct. The AC mains 04 The operating DC
C1 0.047|i -r
is fed to the circuit without using any voltage obtained at
step-down transformer.
The complete circuit is shown in
Fig. 1. The main components of the
LQ— O O
t 81
i r11-! A
R2 R3
R6 T1
3.9K BC337 the cathode of diode
D1 is about 6V. How¬
ever, if you press
circuit are a resistor-capacitor network,
PU3H-TD-ON
SWITCH
1K
1W
47K ≤ R4 switch SI continu¬
; 22K
transistor BC337 and audio output 230V AC 02 tL ously for a few sec¬
50Hz 1000u_ C3 +JL
transformer XI. The oscillation fre¬

X
25V 330LI onds, the maximum
quency depends on the combination of
resistors R4 and R5 and capacitors C3,
C4 and C5. When switch SI is closed, Fig. 1: Circuit of parrot-sounding doorbell
25V

I voltage developed at
this point may go up
to 20 volts, which
the audio signal generated due to oscil¬ must be avoided to
lations is amplified by transistor BC337 prolong the life of tire
and parrot-like sound is reproduced 21mm [M— 15mm— ►] FRONT VIEW
circuit. R1 limits
from loudspeaker LSI connected across
the secondary of transformer XI.
Here we have used an 8-ohm, 0.5W
loudspeaker. The audio output trans¬
former (XI) is normally used in tran¬
sistor radio. The function of the audio
output transformer is to transform the
FRONT VIEW
T
17mm

7mm
TT
Xi
9mm

SIDE
VIEW
fca E
Fig. 3: Pin
configuration
of BC337
surge current in tire
circuit. The parallel
combination of resis¬
tor R1 and capacitor
Cl limits the circuit
current to a safe level
for circuit operation.
high impedance of tire output ampli¬ Fig. 2: Dimensions of audio transformer R2 across Cl pro¬
fier to match the much lower imped¬ vides DC path for the
ance of the speaker. This is necessary be low output and loss of tone qual- currentaswellasadischargepathwhen
to get an efficient transfer of die audio ity. The audio frequency tone across the circuit is switched off. This is to
signal to the speaker. If a wrong au¬ the speaker terminal is about 3 kHz. prevent a possible shock to the opera-
dio transformer is used, the result can The dimensions of the audio trans- tor by charged capacitor Cl. •

WWW.EFYMAG.COM ELECTRONICS FOR YOU • JUNE 2006 • 87


CIRCUIT
IDEAS

LOW-POWER VOLTAGE DOUBLER


■ M.K. CHANDRA uses only a few components. Yet, the off while transistor T2 is driven into
MOU LEESWAR AN AND output efficiency is 75 to 85 per cent saturation. Now, transistor T2 raises
A.N. VADIVUDAI NAAYAKI along its operating voltage range. The the charge on the negative pole of ca¬
available battery voltage is almost pacitor C4 by another step equal to the

A 11 miniature electronic devices


operate off batteries. Some of
them need higher than the
standard battery voltages to operate
doubled at the output of the circuit.
Here IC1 is wired as an astable
multivibrator to generate rectangular
pulses at around 10 kHz.This frequency
supply voltage. Therefore an equal
amount of charging is built up on ca¬
pacitor C5 via diode D3. This doubling
action increases the total voltage across
capacitor C5 to almost double the in¬
T W* put voltage. If the output of the pulse
ih i&
C1 tl W
□2
1N4007
D3
1 KM 007 generator is maintained with a high
J# 0.5W
►1 ►
J
! R2
PRESET L
4 9
Vcc
1 enough amplitude and frequency, the
output voltage and current remain con¬
1 4.7K stant and cater to the needs of the load.
Even with the half-wave function,
4?»
A
R4
10K N PUT
‘ R3 IC1 OUTPUT 0VDC this circuit is almost free of ripple volt¬
I4.7K NES55 * TO
12V DC
BCS40 Diik
1N4007
age. If the connected load doesn't re¬
05 + quire a high current, the efficiency can
6 be expected in the upper 90 per cent
-1-
GND ranges. Since the input voltage is
C2
doubled, the current drain from the
~|~oain input power supply is also doubled at
GND the input but halved at the output.
One point of caution is that if the
efficiently. If the battery of that spe¬ and duty cycle of the pulses can be multivibrator's frequency is fairly high,
cific voltage is unavailable, we are varied using preset VR1. The pulses the output may suffer with the inter¬
forced to connect additional cells in se¬ are applied to switching transistors T1 ference imposed over the DC voltage.
ries to step up the DC voltage Thus, and T2 for driving the output section, In this case, the frequency must be set
the true meaning of miniaturisation is which is configured as a voltage-dou¬ favourably by trials and actual load
lost. A simple way to overcome this bling circuit. The doubled voltage is connection procedure.
problem is to employ a voltage dou¬ available across capacitor C5. This tiny circuit can be assembled
bler, if the device under consideration During each cycle of the pulse on the general-purpose PCB. If all of
can operate at a small current. oocurance, the high level drives T1 into the components are surface-mount
Here we present a low-power volt¬ its saturation, keeping transistor T2 cut type, the whole module can be genu¬
age doubler circuit that can be readily off. So transistor T1 charges capacitor inely miniaturised.
used with devices that demand higher C4 via the path formed by diodes D2 EFY Lab note. During testing with
voltage than that of a standard bat¬ and D1 to a voltage level slightly lesser input of 8V and 1.25mA load current
tery but low operating current to work than the supply. But during the low the output voltage was found to be
with. The circuit is quite simple as it period of the pulse, transistor T1 is cut around 13V. •

92 • JULY 2006 • ELECTRONICS FOR YOU WWW.EFYMAG.COM


CONSTRUCTION

MICROCONTROLLER-BASED
TRIGGERING CIRCUIT FOR MAR

SCR PHASE CONTROL SUNIL KU

 SUKESH RAO M.
LOAD

C
ontrollable triggering circuits
TRIGPULSE 2
are often needed to control the SCR-BASED
4
ISOLATION
CONVERTER
output voltage of SCR-/triac- 4
TRIGPULSE 1 CIRCUIT

based converters. An SCR-/triac-based


converter can handle DC voltages as
high as 300V, which can be obtained +VE
HALF LED
by direct rectification of the mains ZERO DISPLAY
CROSSING MICRCONTROLLER
AC voltage. The output voltage of DETECTOR >
-VE
such a converter can be controlled by HALF
controlling the phase angle of con-
duction by adjustable delay of the fir- 6
AC
ing/triggering voltage to the SCRs 230 V FIRING ANGLE
CONTROL

PARTS LIST
Fig. 1: Functional block diagram of the microcontroller-based single-phase SCR-based trigger
Semiconductors:
controller
IC1 -
NE556 dual timer
IC2 -
PIC16F84 microcontroller during each half cycle of the input Circuit description
IC3 -
74LS154 4:16 decoder
IC4, IC5 -
MOC3021 opto-isolator mains supply. Fig. 1 shows the functional block dia-
IC6 -
7805 5V regulator In the present circuit, the firing gram of the microcontroller-based
T1-T8 -
BC548 npn transistor angle of SCRs is manually controllable single-phase SCR-based trigger con-
SCR1, SCR2 -
2P4M silicon-controlled
rectifier
through two pushbutton switches, troller. Single-phase AC mains supply
D1- D7 - 1N4007 rectifier diode however the same could be changed is connected to the SCR-based con-
D8, D9 - BY127 rectifier diode to programmable control by making verter and zero-crossing detector
LED1-LED18 - 5mm red LED use of the feedback obtained by blocks. The output pulses correspond-
Resistors (all ¼-watt, ±5% carbon):
R1, R2, R8, R9, sampling the output voltage across ing to zero-crossing points of both the
R28, R29, R32, the load. This would need addition positive and negative half cycles of
R33, R40, R41 - 2.2-kilo-ohm of a sampling-cum-feedback circuit mains 50Hz supply from the zero-
R3, R4, R6, R7 - 22-kilo-ohm and corresponding changes in the crossing detector block are fed to the
R5 - 20-kilo-ohm
RNW1 (R10-R18) software. microcontroller. The delayed triggers
RNW2 from the microcontroller after isolation
(R19-R27) - 220-ohm The principle via the isolation block are provided to
R30, R31 - 330-ohm
R34, R35 - 1.2-kilo-ohm
The phase control of the firing angle the converter block for phase control
R36, R37 - 10-kilo-ohm is referenced to zero-crossing point of of SCRs. The output of the converter
R38, R39 - 1-kilo-ohm each half of the input 50Hz AC mains block is fed to the load. The firing-
Capacitors: waveform. A pulse is generated at angle-control block increases or de-
C1-C3 - 10µF, 16V electrolytic
C4, C5 - 33pF ceramic disk zero-crossing instant of each half cycle. creases the delay in generation of the
C6-C8, C12 - 0.1µF ceramic disk The duration of half cycle for 50Hz triggering levels with respect to a pre-
C9 - 1000µF, 35V electrolytic mains is 10 ms (corresponding to 180o set (middle) position.
C10, C11 - 0.01µF ceramic disk traverse time). By delaying the trigger- The microcontroller additionally
Miscellaneous:
XTAL - 4MHz crystal ing/firing instant of each of the two provides the information relating to
X1 - 230V AC primary to 7.5V- SCRs by a maximum duration of 10 trigger delay for display purposes. The
0-7.5V, 500mA secondary ms with respect to the zero-crossing complete schematic of the
transformer
pulses, we can control the output of microcontroller-based triggering cir-
S1-S3 - Push-to-on switch
the converter as desired. cuit for SCR phase control is shown in

64 • JULY 2006 • ELECTRONICS FOR YOU WWW.EFYMAG.COM

CMYK
CONSTRUCTION
TOP VIEW
vwv
R31
3300
FRONT VIEW

548
I 52
2P4M
0
D9
L BY127
D8
BY127
6 1

A
D 230V
IC5
SCR2 AC SCR1 MOC3021
CB E 2P4M MAINS 2P4M
T3
C AG 4
2
R29
=
T1-T8 BC548 R39 R33 2.2K
=
D1-D5 1N4001 1K 2.2K
07

D1 R41
0.1 M
R35
1.2K
I P2
4

o
X1 <— ►pwlv R37 pi
T6
10K
O
O
o
o
o
O
CD
o
CD
T8 IC4
MOC3021 0T4

! -
O D3 R36

0+5V D2 R40 T7
10K
?3 JT5 6 1
R28
2.2K 2.2K
X1 = 230V AC C6
PRIMARY TO 0.1 |J 1.2K
7.5V-0-7.5V, 500mA R30
SECONDARY 3300
TRANSFORMER R38 R32
1K 2.2K
D1-D7 = 1N4007

T1-T8 = BC548 R10-R27 = 2200


R1 R2 R3 R4
2.2K 2.2K 22K 22K 0.1 M-r- RNW1
LED1

4 10 14
D5
R5
20K
14 11
PB5 PB4
10
24
1
2
w
wfc
fc 2
A/WV-?- -
3 w
a PB2
8 fe
1 o 4 -w
4 PB1 fc
7 5 H
2
17
PAO AO
23
6 -wfcfe 8
PA1 A1
7 W A/Wÿ'

IC1 5
PB0
6
IC2
18 22
IC3 8 wfcfe
NE556 PIC16F84 PA2 A2 74LS154
12 1 21 9 H
&10
2
PA3 A3
20
10 W 1
13 fe 9
9
PB3
9 PB7 E1
11 -HI
fe
6
R6 R7
13 19 wfe 8
A/WV-"
+ C1 + C2 22K 22K 12
PB6 EO
18 14 -ÿ-/VWV-( »
10|J 10|j 8 fe
15 W
16V 16V

H S2l
H9
SllQ
3 7 11 5 15 16
R8
2.2K
R9
2.2K 16
17
-M
fe
fe

w
— VWV-1 »
IAA/Vÿ'
C3 XTAL 12
10M 4MHz fe 3
LU. W
■HO— A/WW
W
-1- 16V
CD C10 C11


CD z
z
< 0.01M “T -“0.01M i-
LU T1 T2
< C/3 C4 I— C5 BC548 BC548 fe 2
d d LU 33P— r 33P H A/WW
LU
Q
a
I RNW1 (R10-R18) = 2200
LED18
RNW2

RNW2 (R19-R27) = 2200


Fig. 2: Circuit of the microcontroller-based single-phase SCR-based trigger controller

Fig. 2. The triggering waveforms for former X1, diodes D1 through D4, tran- goes positive, transistor T8 conducts
SCR1 and SCR2 are shown in Fig. 5. sistors T5 through T8 and a few other and its collector voltage falls. Capaci-
The complete circuit can be divided passive components. While top half of tor C7 charges up towards this low
into zero-crossing detector, microcon- this circuit detects the zero-crossing voltage almost instantly via diode D4
troller, trigger isolation, AC-to-DC con- point of one half of the input signal, the and hence no change is noticed at the
verter and power supply sections. bottom half section detects the zero- base/collector of transistor T6.
Zero-crossing detector section. This crossing point of the other half cycle. Towards the end of the half cycle,
section comprises step-down trans- When the top side of X1 secondary the collector voltage of transistor T8

66 • JULY 2006 • ELECTRONICS FOR YOU WWW.EFYMAG.COM

CMYK
CONSTRUCTION
microcontroller used here is PB0, the ‘incfir’ function (as shown in
IC6 +5V
© M IN
1 7805 3
OUT
o PIC16F84 from Microchip. The the source code of the program) is
D6 4MHz crystal connected across its made to run. Similarly, the ‘decfir’
C9 +
1N4007
1000M „ COM — L C12
-i- 0.1p
pins 15 and 16 provides the clock. function is called when PB1 senses
T
35V
O The pins are used for input/out- logic ‘1.’ After completing either of
GND put as follows: these routines, the microcontroller
D7
1N4007 © 1. PB0, PB3 (input): Used for does the job of indicating the firing
sensing the output from increase angle via LEDs connected at the out-
B
and decrease pushbuttons. put of 4:16 decoder IC3 as explained
Fig. 3: Power supply circuit 2. PB1, PB2 (output): Used for in the succeeding paragraph.
triggering pulses for SCR1 and A 4-bit BCD value is passed through
SCR2 (via the isolating section). lines PA0 through PA3, which is de-
N \INPUT AT P1 AND P3 3. PB4, PB5 (input): From the coded using the 4:16 bit decoder. Since
zero-crossing section. the output of the decoder is active-low,
u uOUTPUT AT P2 AND P4 4. PB6, PB7 (output): Inhibit/
enable signal for the 4:16 decoder
the output pins of the decoder are con-
nected to the cathodes of the respective
Fig. 4: Input at P1 and P3 and output at P2 and P4 and enable/inhibit signal for the LEDs via current-limiting resistors,
phase-angle-indicating LEDs while the anodes are all strapped to Vcc
(LED17 and LED18). (5V) to light up the LED connected to
v 5. PA0, PA1, PA2, PA3 the active output line of the decoder.
AC
(all output): Used as in- As the firing angle difference be-
AC 180° 360° 540° puts for the 4:16 decoder tween the LEDs is ten degrees, we re-
INPUT l for phase-angle-indicating quire 18 LEDs to represent firing angle
l
TRIGGERS l
LEDs (LED1 to LED16). from 0 to 180°. The output of the 4:16
PULSE 1
The microcontroller is decoder is connected to 16 LEDs and
90° 90°
programmed to detect the the rest two LEDs are connected to lines
TRIGGERS zero-crossing instants of PB6 and PB7 of the PIC. When the lat-
PULSE 2 90°
T I
the two halves of the ter LEDs (LED17 or LED 18) glow, the
I I I
I I mains input cycles as well 4:16 decoder is inhibited (disabled) to
as the signals received via avoid glowing of multiple LEDs at the
ACROSS
LOAD pushbuttons labeled as same time for the same angle. Hence
‘Inc Angle’ and ‘Dec E0 and E1 of the 4:16 decoder are con-
Angle.’ After detecting trolled by PB6 and PB7 lines. So when
Fig. 5: Triggering waveforms for SCR1 and SCR2 these signals, the any of these two port lines is high, it
microcontroller outputs deactivates the decoder. Transistor is
rises towards the positive supply rail. properly delayed trigger levels to con- used to augment the signal from PB6
Now diode D4 acts as almost open and trol the triggering/firing angle of the and PB7 lines to light up the additional
the capacitor charges via resistor R37. SCRs via the isolation section. These LEDs (LED17 and LED18).
Thus C7-R37 combination acts as a dif- delayed trigger levels will trigger SCR1 Trigger isolation section. The AC-
ferentiating network to produce about during the first half cycle and SCR2 to-DC converter section comprising the
1ms pulse at the collector of T6 to- during the second half cycle to pro- SCRs and diodes employs mains 230V
wards the end of the half cycle. Simi- vide the desired phase control. AC supply, while the maximum per-
lar pulse is produced at the collector The ‘Inc Angle’ and ‘Dec Angle’ missible voltage levels for the
of transistor T5 towards the end of the buttons make use of NE556 dual timer microcontroller pins are limited to only
next half cycle. configured as dual monostable. Each a few volts. Hence the lines carrying
The positive-going differentiated of the two buttons, when depressed trigger pulses from the microcontroller
pulse at the base of transistors T6 and momentarily, triggers the respective to the converter section must be iso-
negative-going square-wave at their monostable multivibrator associated lated to avoid high voltages reaching
collectors are shown in Fig. 4. These with the depressed button to provide the microcontroller in the event of
zero-crossing pulses are used as refer- a pulse of 1ms duration. The SCRs’ failure. As a simple and effec-
ence for generation of delayed triggers monostables take care of the switch tive isolating device, opto-SCR driver
by the microcontroller. debouncing problems. MOC3021 is used here, whose output
Note that the step-down trans- The output of one of the can directly drive an SCR. Two such
former is common to the zero-cross- monostables is connected to PB0 line isolators are used for the two trigger-
ing detector section and the power of the PIC. Similarly, the output of the ing signals (one for each SCR).
supply section. other mono is connected to PB3 line of AC-to-DC converter section. This
Microcontroller section. The the PIC. If the PIC senses logic ‘1’ at section employs two diodes (BY127)

68 • JULY 2006 • ELECTRONICS FOR YOU WWW.EFYMAG.COM

CMYK
CONSTRUCTION
Q O

®Uf O

ud k ii2_aiWr
O
O

5ÿ
o o
Fig. 6: Actual-size, single-side PCB of the microcontroller-based single-phase SCR-based trigger controller

o uC BASED TRIGGERING CIRCUITFOR SCR PHASE CONTROL


EFY/SUNIL/C0NSTN/JUL06

J2
o
no i yiBV127
Jl
a
BC548 BC548
n CD n i'i m t )
b H N u H is
T6
T2ippcHppQ) PPP PPP BJ HRNU2
2P4M
SCR2
2P4M OH<ho _ED18
H _ED17
SCR1 o
[ocÿl»tY>rÿ RPR4R S* H 8 8 “ 33p 33p

Oc|ÿcoU. 1 W 5' *,
,
ho M H _ED16

m
Bc=,s O LED15
R40
sl|Efia®sÿV) si p -O
H
M LED14

*i
2. 2K
T fi o* Hht -O
O
_ED13
H
_ED12
2.2K M

«“#-r J35
C\l -O _ED11
R1
R32 CM a -o H
tid _ED10
[ s® £ 7s
CO
LL
-O
-o M
F<
W _ED8
LED9
ODD /is) vo o!N R5 6 3- D

(_) ID
KB ho M _ED7
Cll ho IM LED6
rjÿr C1C —
i i Ld
z
aD
IC3 ho M _ED5
KB 74LS154 -O LED4
o+ o O H LED3
-o IM
|D 0. ulOu
C9 C3
\o~ÿ-2ÿ3 Jz IB 0% -o H LED2
TO:C?®H
lOOOu

e s*0
cMo J8
Kl 0-\ -O L- LED1
RNUl

o
X

45
INC S2 S3 Tu
DEC J9
ANGLE RESET

Fig. 7: Component layout for the PCB

and two SCRs (2P4M) arranged as a lier, step-down transformer X1 is com- A single-side, actual-size PCB lay-
rectifier bridge. At any given time (af- mon for zero-crossing and power sup- out of the main circuit, including its
ter firing angle is reached), only one ply sections. It steps down AC mains power supply, is shown in Fig. 6 and
SCR and one diode (in cross forma- to deliver the secondary output of its component layout in Fig. 7.
tion) will conduct to provide the recti- 7.5V-0-7.5V AC. The transformer out-
fied output across the load. put is rectified by the full-wave recti- The software
Power supply section. The regu- fier, filtered by capacitor C9 and regu- The source code for the program
lated 5V supply for the circuit is pro- lated to 5V by regulator 7805. Capaci- (Firing.asm) is appended at the end of
vided by the conventional regulator tor C12 bypasses any ripple in regu- article. The configuration word that de-
circuit shown in Fig. 3. As stated ear- lated output. termines the device configuration is set

WWW.EFYMAG.COM ELECTRONICS FOR YOU • JULY 2006 • 69

CMYK
CONSTRUCTION
to select the low-power (LP) mode for All the port lines (except PA4, pin 3) decrementing the firing angle and takes
the crystal oscillator, power-up timer are fully utilised for different purposes action for incrementing or
is enabled (_PWRTE_ON) to provide as described under the microcontroller decrementing the stored value by a
a 72ms delay at power-on, code-pro- section. value that corresponds to 10° step-size.
tect bits are enabled (_CP_ON) and The program performs the func- The program displays the current fir-
watch-dog timer is disabled tions of sensing the zero-crossing in- ing angle through lines PA0 through
(_WDT_OFF) since its application is stances at PB4 and PB5 lines and de- PA3, PB6 and PB7 via 18 LEDs to ac-
not required in this project. laying the control signals at PB1 and commodate 180°.
Ports are initialised to be input or PB2 for firing of SCR1 and SCR2. It EFY note. The source code of this
output ports as indicated in the de- also checks lines PB0 and PB3 for de- article has been included in this
scription of the microcontroller section. pression for incrementing and month’s EFY-CD.

FIRING.ASM
Include <p16f84A.INC> call delay1 skip1: movwf stk
LIST P=pic16f84A ; Processor type PIC16F84A bcf PORTB,2 back: movlw 0xbb ;DELAY OF 0.55mSEC
btfsc PORTB,0 ;CHECKING THE LOGIC movwf temp
__CONFIG _LP_OSC & _PWRTE_ON & _CP_ON HIGH FOR loop: decfsz temp,1
& _WDT_OFF INCREMRNTING ANGLE goto loop
cblock 0x10 call inctime decfsz stk,1
temp btfsc PORTB,3 ;CHECKING THE LOGIC goto back
store HIGH FOR skip: return
str DECREMRNTING ANGLE
stk call dectime inctime:
endc movf store,0 incf store,1 ;INCREAMENT FIRING
org 0x00 bcf PORTB,6 ANGLE BY 10 DEGREE.
goto start bcf PORTB,7 movlw 0x13
org 0x05 btfsc store,4 movwf str
start: call conv movf store,0
movlw 0x04 movwf PORTA subwf str,1
movwf store goto up decfsz str,1
movlw 0x00 goto next
bsf STATUS,RP0 movlw 0x11 ;KEEPING THE ANGLE SAME
movwf TRISA ;ALL PORTA LINES ARE conv: ;CONTROLLING THE FIRING WHEN IT REACHES 180 DEGREE
MADE OUTPUT ANGLE OF 170 AND 180 DEGREE movwf store
movlw 0x39 bsf PORTB,6 ;DISABLING THE 4:16 DECODER next: return
;PORTB LINES ARE CONFIGURED AS DESCRIBED AND INDICATIONG 170th
movwf TRISB ; IN THE ARICLE DEGREE
bcf STATUS,RP0 btfsc store,0 dectime:
bcf PORTB,1 goto bel movf store,0 ;DECREAMENTING THE ANGLE
bcf PORTB,2 return BY 10 DEGREE.
bcf PORTB,6 bel: bcf PORTB,6 movwf str
bcf PORTB,7 bsf PORTB,7 ; DISABLING THE 4:16 DECODER incfsz str,1
up: nop AND INDICATIONG 180th DEGREE decfsz str,1 ;CONDITION FOR KEEPING
up1: btfsc PORTB,4 ;ZERO CROSSING return ANGLE AT ZERO IF IT STILL
DETECTION OF AC DECREASED
HALF CYCLE goto bb
goto up1 delay1: ;DELAY PROGRAM FOR FIRING goto decs
bsf PORTB,2 ANGLE bb: decf str,0
call delay1 ;FIRING ANGLE DELAY movf store,0 goto dwn
bcf PORTB,1 ;SIGNAL TO OPTCOUPLER incfsz store,1 decs:movlw 0x00
up2: btfsc PORTB,5 ;ZERO CROSSING decfsz store,1 ;TO CHECK WHETHER dwn: movwf store
DETECTION OF ANOTHER AC HALF CYCLE ANGLE IS ZERO OR NOT. return
goto up2 goto skip1
bsf PORTB,1 goto skip end 

Please add 4% tax for local sale in Delhi

AVAILABLE
or 10% for orders from outside Delhi
Forwarding charges Rs 40 per kit

NEW COMPLETE KITS FOR EFY CIRCUITS:


3D SURROUND SOUND SYSTEM (MAY 2006) Rs 550/-*
SCHOOL/COLLEGE QUIZ BUZZER (MAY 2006) Rs 500/-*
LOW COST ENERGY METER Rs 2000/-
VERSATILE POWER SUPPLY (FEBRUARY 2006) Rs 250/- *Price changed
Please send your remittance by DD/MO (not cheque) to:

D Kits‘n’Spares
303, Dohil Chambers, 46 Nehru Place New Delhi 110019; Phone: 26430523, 26449577; E-mail: kits@efyindia.com

70 • JULY 2006 • ELECTRONICS FOR YOU WWW.EFYMAG.COM

CMYK
CIRCUIT
IDEAS

REMOTE-CONTROLLED FAN REGULATOR


 Dr C.H. VITHALANI tor R4. IC1 is wired as a monostable
multivibrator to delay the clock given
IVEDI

U
sing this circuit, you can to decade counter-cum-driver IC S.C. DW
change the speed of the fan CD4017 (IC2).
from your couch or bed. In- Out of the ten outputs of decade
frared receiver module TSOP1738 is counter IC2 (Q0 through Q9), only five
used to receive the infrared signal (Q0 through Q4) are used to control multivibrator IC3 during zero cross-
transmitted by remote control. the fan. Q5 output is not used, while ing. Opto-isolator MOC3021 (IC4)
The circuit is powered by regulated Q6 output is used to reset the counter. drives triac BT136. Resistor R13 (47-
9V. The AC mains is stepped down Another NE555 timer (IC3) is also ohm) and capacitor C7 (0.01µF) com-
by transformer X1 to deliver a second- wired as a monostable multivibrator. bination is used as snubber network
ary output of 12V-0-12V. The trans- Combination of one of the resistors R5 for triac1 (BT136). As the width of the
former output is rectified by full-wave through R9 and capacitor C5 controls pulse decreases, firing angle of the triac
rectifier comprising diodes D1 and D2, the pulse width. The output from IC increases and speed of the fan also in-
filtered by capacitor C9 and regulated CD4017 (IC2) is applied to resistors R5 creases. Thus the speed of the fan in-
by 7809 regulator to provide 9V regu- through R9. If Q0 is high capacitor C5 creases when we press any button on
lated output. is charged through resistor R5, if Q1 is the remote control.
Any button on the remote can be high capacitor C5 is charged through Assemble the circuit on a general-
used for controlling the speed of the resistor R6, and so on. purpose PCB and house it in a small
fan. Pulses from the IR receiver mod- Optocoupler MCT2E (IC5) is wired case such that the infrared sensor can
ule are applied as a trigger signal to as a zero-crossing detector that sup- easily receive the signal from the re-
timer NE555 (IC1) via LED1 and resis- plies trigger pulses to monostable mote transmitter. 

D7-D11 = 1N4148

R1 C1 R3
1K 100K R10
4.7|j R5 470Q
16V Vcc D7 R Vcc
Q6
►!
4 8 Q0 4 8
5 16 3
+ 6 R6
D8 27K
ZD1 R2 R
15 2 — — -VWV —"
47K 3 14 R7 R11
5.1V IC2 D9

-HQ
20K
[— vwv
2 IC1 CLK 02 IC3
CD4017 4 6 3
3 NE555 NE555
C VWV-H 2 D10
R8

!
03 12K BC548
IRX1
R4
330Q LED1 7 ww
TSOP R9
D11

f—
1738 Q4 3.3K

C2 +
5 8 13 10 vwv— 2 1 5
10|j GND GND
16V
±L C3 C4 C5 C6
1M 0.01M 0.22M 0.01M
16V

D1-D6=1N4007 R16 R14


D6

D5
w 5.6K
A/WV
R15
10K
470Q
A/WV

CD
CD
O CD
12V D4
C9
IC5
MCT
4 F
A
N
MT1
N\i
TRIAC1
G 4
IC4
MOC
230V AC O CD 0 D3 470M C8 BT136 6 3021
50V 0.1M 2E 5
50Hz
°CD
CD
CD
CD
CD
12V
D2
+ COM C7
0.01M
R13
47Q
I R12
47D

X1
IC6 3 —| |— vwv
D1 IN 7809 OUT
N6* 230V AC >0L
X1=230V AC PRIMARY TO 12V-0-12V, 250mA SECONDARY TRANSFORMER 50Hz

88 • JULY 2006 • ELECTRONICS FOR YOU WWW.EFYMAG.COM

CMYK
CIRCUIT
IDEAS
DIP package.
Here the IC is MIC$
wired in bridge r\
HEARING AID configuration to
drive the 32-ohm
SOCKETO
rx
genera1-purpose
I
■ T.K. HAREENDRAN sistor R1 biases the internal circuit of monophonic ear¬ LED1 -O-
the low-voltage condenser microphone phone Red LED
POWER

T
his low-cost, general-purpose for proper working. The audio output (LED1) indicates
electronic hearing aid works off from the preamplifier stage is fed to the power sta¬
J. 3V DC (2x1.5V battery).
In this circuit, transistor T1 and as¬
sociated components form the audio
the input of the medium-power am¬
plifier circuit via capacitor C2 and vol¬
ume control VR1.
tus. Resistor R8
limits the operat¬
ing current of
VR1
OFF ©0«
signal preamplifier for the acoustic sig¬ The medium-power amplifier LED1.
nals picked up by the condenser mi¬ section is wired around popular au¬ The audio Fig. 2: Enclosure
crophone and converted into corre¬ dio amplifier IC TDA2822M (not output of this
sponding electrical signals. Resistor R5 TDA2822). This IC, specially designed circuit is 10 to 15 mW and the quies¬
and capacitor C3 decouple the power for portable low-power applications, cent current drain is below 1 mA. The
supply of the preamplifier stage. Re- is readily available in 8-pin mini circuit can be easily assembled on a

FRONT VIEW
3V
■VMr
JLslofl R5
100X2 I
C6 +1
1
> R8
OWOFF
SWITCH
+
BOTTOM
VIEW
1740
c
547
BC

R3 >
680n ?
"P TX fr 220X2

©
JA LED1 COND. ECB CBE
R1 "[33203 MIC
2.2K
Fig. 3: Pin descriptions of cond.

R2
330K<
>
C2
100n

VR1
10K
nt +
04 -~
loti'F
10V
8
IC1
TDA
2822M C8n
0.1M -|- EP1
32X2
mic, C1740 and BC547

veroboard. For easy as¬


sembling and mainte¬
nance, use an 8-pin DIP IC
EARPHONE
5 (MONO)
C1 6 4 socket for TDA2822M.
0.01)1 C1740/ -L C7 Proposed enclosure (with
BCS47
-p 0.1[i

9 COND.
MIC
≤ R4
<33X2

I
C5
0.01(1

1
4.7X2
R6
4.7x2
QND
O
earphone socket) for the
assembled unit is shown
in Fig. 2.
Note. The complete
kit is available at
Fig. 1: Hearing aid circuit Kits'n'Spares. •

96 • AUGUST 2006 • ELECTRONICS FOR YOU WWW.EFYMAG.CO M


CIRCUIT
IDEAS

SPEED CONTROL OF DC MOTOR USING


PULSE-WIDTH MODULATION
UMAR
SUNIL K
 EFY LAB age value is 2.5V, and if the duty cycle
is 75%, the average voltage is 3.75V

P
ulse-width modulation (PWM) and so on. The maximum duty cycle
or duty-cycle variation methods can be 100%, which is equivalent to a storage capacitor to pro-
FRONT
are commonly used in speed DC waveform. Thus by varying the VIEW vide stable voltage to the
control of DC motors. The duty cycle pulse-width, we can vary the average circuit.
is defined as the percentage of digital voltage across a DC motor and hence BC Thus, by varying
337A
‘high’ to digital ‘low’ plus digital ‘high’ its speed. VR1 the duty cycle can
pulse-width during a PWM period. The circuit of a simple speed con- be changed from 0% to
troller for a mini DC motor, such 100% and the speed of
as that used in tape recorders and CB E the motor from ‘stopped’

minimi
+5 VOLTS
toys, is shown in Fig. 2. condition to ‘full speed’
Fig. 3: Pin
0 VOLTS - Here N1 inverting Schmitt trig- configuration in an even and continu-
DUTY CYCLE 0% 50% ger is configured as an astable of BC337A ous way. The diodes ef-
Fig. 1: 5V pulses with 0% through 50% duty cycle multivibrator with constant period fectively provide differ-
but variable duty ent timing resistor values during
cycle. Although the charging and discharging of timing ca-
D1-D3=1N4148
total in-circuit resis- pacitor C1.
D3
6V
(M) tance of VR1 during The pulse or rest period is approxi-
220M_
C2 +
VR1
DC
MOTOR
a complete cycle is mately given by the following equa-
16V 100K 100 kilo-ohms, the tion:
D2
part used during Pulse or Rest period ≈ 0.4 x C1
W positive and negative (Farad) x VR1 (ohm) seconds.
+ periods of each cycle
H BATT. R2 Here, use the in-circuit value of
6V
Jÿo
1
- — N2
22K
AA/W
© T1
can be varied by
changing the posi-
VR1 during pulse or rest period as ap-
plicable.
C1 BC337 tion of its wiper con-
0.1 M ~r The frequency will remain constant
IC1(N1-N2)=CD40106B tact to obtain variable and is given by the equation:
pulse-width. Schmitt Frequency ≈ 2.466/(VR1.C1) ≈ 250
Fig. 2: DC motor speed control using PWM method gate N2 simply acts Hz (for VR1=100 kilo-ohms and C1=0.1
as a buffer/driver to µF)
Fig. 1 shows the 5V pulses with 0% drive transistor T1 during positive in- The recommended value of in-cir-
through 50% duty cycle. cursions at its base. Thus the average cuit resistance should be greater than
The average DC voltage value for amplitude of DC drive pulses or the 50 kilo-ohms but less than 2 mega-
0% duty cycle is zero; with 25% duty speed of motor M is proportional to ohms, while the capacitor value should
cycle the average value is 1.25V (25% the setting of the wiper position of VR1 be greater than 100 pF but less than
of 5V). With 50% duty cycle the aver- potmeter. Capacitor C2 serves as a 1 µF. 

WWW.EFYMAG.COM ELECTRONICS FOR YOU • AUGUST 2006 • 97

CMYK
CIRCUIT
IDEAS

IVEDI
BELL-CUM LIGHT CONTROLLER S.C. DW

 SURESH KUMAR K.B. the inhabitants for activating the transistors T1 and T2.
above-mentioned timer for switching IC1 is a 14-stage binary counter and

T
his bell-cum-light controller on the light for three minutes from in- oscillator IC. In its quiescent state, the
circuit is equipped with four side the house. S2 is meant to be used Q13 output (pin 3) is high, which re-
switches labelled S1 through during darkness with S4 ‘on.’ sults in conduction of transistor T1 to
S4. While S4 is the mains ‘on’/‘off’ Like S1, switch S3 (labelled ‘call- cut off transistor T2. Thus the relay is
toggle switch for powering the timer bell’) is located outside the entry gate. in de-energised state and the bulb is
circuit for lighting up a bulb for a spe- It is meant to be used during day, ‘off.’
cific duration (mainly during night), when mains switch S4 is ‘off.’ When When the master reset is activated
the functions and placement of the switch S3 is pressed, it activates only by pressing of switch S1 and/or S2,
other three switches (which are push the bell circuit for as long as the switch all the output pins of IC1 including
switches) follow. is kept pressed. Since the bell circuit is Q13 output go low. Thus transistor T1
Switch S1 (labelled ‘call-bell and powered by a 3V battery, this circuit is cut off, while T2 conducts to energise
timer-on’) is located at the outer entry can be activated even if mains switch relay RL1 as also the bulb. Once S1
gate of the house for use by a visitor. is off. and S2 are released, the timer starts
This switch activates bell circuit for as With switch S4 ‘on,’ the supply to counting.
long as the switch is kept pressed. On bulb B1 is routed via N/O contacts of Pressing of switch S1 additionally
its release, a timer is initialised, which, relay RL1. Simultaneously, the AC results in forward biasing of transis-
in turn, switches on a bulb to light up mains stepped down by transformer tor T3, which conducts to extend 3V
the path between the outer gate and X1 is rectified by diodes D1 and D2 battery supply to melody generator
the house door for a specific duration followed by filter capacitor C1. The DC UM66 (IC2). The output of the melody
(3 minutes). supply thus becomes available for generator drives transistor T3 to out-
Switch S2 (labelled ‘timer on’) is timer circuit comprising CD4060 (IC1) put the tune via loudspeaker LS1.
situated inside the house for use by and relay driver circuit comprising Thus, when a visitor presses switch

D1

f
1N4001

ON/OFF
L
CD
C1
SWITCH o 1000M
O CD 25 V
230V AC CD CD o 9 R7 B1
50Hz O
CD TIMER R5 10K
o O ON C3 -L- R4 D5 100W
1 1M 220V
O D2 0.1M“T 100K 1N4007
RL1 BULB
1N4001 D6
X1 Vcc 1N4007 N/0
CD
D4 D3
X1 1N4001 1N4001
16 9 10 11 A c.
O
230V AC 50Hz MR CD
i-O 12 Q13 N/C
PRIMARY TO S3 3
12V-0-12V IC1
CALL
250mA R2 R1 RL1=12V, 2000
SECONDARY
BELL
100K
CD4060
330Q 1 C/0 RELAY
TRANSFORMER R6
GND 27K R8
FRONT VIEW 8 5 2.2K
+
C2 Q4
UM
66
BC
548
10M
16V
LED1
— ww—
R3
T1
BC548
T2
BC548

O
1K
LS1
GND 0/P T3 4Q
BC548 0.5W R9
3 2 1 CBE SPEAKER 100K
Vcc 2

+
BATT.
3V
IC2 1
— vwv
UM66 R10 T4
3 1K BC548

WWW.EFYMAG.COM ELECTRONICS FOR YOU • SEPTEMBER 2006 • 95

CMYK
CIRCUIT
IDEAS
S1 at the gate, the calling bell sounds sistor T1 conducts and T2 cuts off. between the gate and the house. It is
and the timer resets. The Q13 output The relay de-energises to turn the light decided by the values of resistor R4
of IC1 goes low to cut off transistor ‘off.’ and capacitor C3 as follows:
T1. Transistor T2 conducts to energise Since diode D5 is connected from ‘On’ period = 300xR4xC3 minutes
the relay and turn the light ‘on.’ Q13 to clock input terminal (pin 11), The light controller circuit will
When switch S1 is released, the the terminal is always high when Q13 work at night, provided mains switch
timer starts counting. After three min- is high, disabling the counting of IC1. S4 is ‘on.’ During night, only switches
utes (determined by resistor R4 (100- So the state is latched until the next S1 and S2 will be used, while switch
kilo-ohm) and capacitor C3 (0.1µF), resetting takes place. ‘On’ time period S3 is used in the day for the calling
the Q13 output goes high, i.e., tran- can be varied according to the distance bell only. 

96 • SEPTEMBER 2006 • ELECTRONICS FOR YOU WWW.EFYMAG.COM

CMYK
CIRCUIT
IDEAS

FRIENDLY CHARGER FOR S.C. DW


IVEDI

MOBILE PHONES
 D. MOHAN KUMAR and the mobile phone. It has features After a power resumption, capaci-
like voltage and current regulation, tor C1 provides delay of a few sec-

M
ost mobile chargers do not over-current protection, and high- and onds to charge to a potential higher
have current/voltage regu- low-voltage cut-off. An added speci- than of inverting pin 2 of CA3130,
lation or short-circuit pro- ality of the circuit is that it incorpo- thus the output of IC1 goes high only
tection. These chargers provide raw rates a short delay of ten seconds to after the delay. In the case of a heavy
6-12V DC for charging the battery switch on when mains resumes fol- power line surge, zener diode ZD1
pack. Most of the mobile phone bat- lowing a power failure. This protects (12V, 1W) will breakdown and short
tery packs have a rating of 3.6V, 650 the mobile phone from instant volt- pin 3 of IC1 to ground and the output
of IC1 drops to ground
level. The output of IC1 is
IC1(N1)=CA3130 fed to the base of npn
R2
1K Darlington transistor
FRONT VIEW
BD677 BD677 (T2) for charging
3 7

IT?
+ the battery. Transistor T2

+0
2
N1
6

€X
BD677
conducts only when the
output of IC1 is high. Dur-

_
4 R3 E C B
12V DC VR1
1K C3 +
ing conduction the emit-
500mA 10K
p PoT R4 1000|j ter voltage of T2 is around
1K 25V
AA/W 10V, which passes
T1
BC547
R6 through R6 to restrict the
R5 16Q.
charging current to
. 3.3K
-'Wfs/-
i
2W
around 180 mA. Zener di-
R1
1K
C1 +

25V
■ ZD1
470M ~ T 12V
1W
R9
LED1
C2 -L4
10m '—
+
R7
220Q 1 .OUTPUT
5.6V
ode ZD2 regulates the
1K ZD2rJ * 0- 180mA charging voltage to
1
5.6V 25V R8
2W LED2//_ 3.3Q around 5.6V.
AA/W When a short-circuit
occurs at the battery ter-
minal, resistor R8 senses
mAh. For increasing the life of the bat- age spikes. the over-current, allowing transistor
tery, slow charging at low current is The circuit is designed for use in T1 to conduct and light up LED1.
advisable. Six to ten hours of charging conjunction with a 12V, 500mA adap- Glowing of LED2 indicates the charg-
at 150-200mA current is a suitable op- tor (battery eliminator). Op-amp IC ing mode, while LED1 indicates short-
tion. This will prevent heating up of CA3130 is used as a voltage compara- circuit or over-current status.
the battery and extend its life. tor. It is a BiMOS operational amplifier The value of resistor R8 is impor-
The circuit described here provides with MOSFET input and CMOS out- tant to get the desired current level
around 180mA current at 5.6V and put. Inbuilt gate-protected p-channel to operate the cut-off. With the
protects the mobile phone from unex- MOSFETs are used in the input to pro- given value of R8 (3.3 ohms), it is
pected voltage fluctuations that de- vide very high input impedance. The 350 mA.
velop on the mains line. So the charger output voltage can swing to either posi- Charging current can also be
can be left ‘on’ over night to replenish tive or negative (here, ground) side. changed by increasing or decreasing
the battery charge. The inverting input (pin 2) of IC1 the value of R7 using the ‘I=V/R’
The circuit protects the mobile is provided with a variable voltage ob- rule.
phone as well as the charger by im- tained through the wiper of potmeter Construct the circuit on a common
mediately disconnecting the output VR1. The non-inverting input (pin 3) PCB and house in a small plastic case.
when it senses a voltage surge or a of IC1 is connected to 12V stabilised Connect the circuit between the out-
short circuit in the battery pack or DC voltage developed across zener put lines of the charger and the input
connector. It can be called a ‘middle ZD1. This makes the output of IC1 pins of the mobile phone with correct
man’ between the existing charger high. polarity. 

WWW.EFYMAG.COM ELECTRONICS FOR YOU • SEPTEMBER 2006 • 97

CMYK
CIRCUIT
IDEAS

FRONT DOOR GUARD S.C. DW


IVEDI

 D. MOHAN KUMAR monostable mode to set and reset IC Normally, with reed switch S1
CD4027 (IC2). The output pulse width closed, transistor T1 is non-conduct-

H
ere is a circuit to thwart the of IC1 depends on the external ing and its emitter current is zero. So
attempt of burglary in your R3-C2 network connected to its pins the monostable remains in the standby
home. When an intruder tries 1, 2 and 3. mode with low output at pin 10. When
to open the door of your house, it Monostable operation is achieved T1 conducts upon opening reed switch
sounds a loud alarm and switches on when IC1 is triggered by low-to-high S1, a positive pulse from the emitter
the porch light. The alarm disables transition of the positive trigger input of T1 triggers the monostable and a
only when the door is closed again or (pin 8). It can be retriggered by an- short positive pulse is available to Q
S2 is switched off. The circuit is other low-to-high transition of pin 8. output of the monostable. It resets
failproof and reliable and, unlike IR- When the master reset input (pin 9) is when T1 is made non-conducting by
or 555 timer-based burglar alarms, high, Q output (pin 10) goes low and closing reed switch S1. The negative
overcomes the problem of false trig- Q output (pin 11) goes high. Here the trigger pin 6 and astable input pin 5
gering. monostable configuration of IC1 has of IC1 are tied to the ground along
The circuit is based on the trigger- R3-C2 network with values of C2 and with ground pin 7.
ing action of the low-power R3 as 0.0047 µF and 470 kilo-ohms, re- The short-duration (one-second)
monostable/astable multivibrator IC spectively. Trigger pin 8 is connected low-to-high output from IC1 is used
CD4047 (IC1). It is wired in the to the emitter of T1. to set and reset IC2. It is a low-power

S1
R2
1K
(®) S2
7
1
REED
SWITCH
N/O
TYPE
__ C2
TRIAC1
BT136 T2
LAMP1
60W
230V IP
230V
AC
ON/OFF

0.0047M T2 9N

K
R3 BC548 LS1
R1 470K 16 8W
MR Q
1.8K 0.5W I
SPEAKER
9 4 14 1 2 3

T1
BC549
© IC1
4047
11

10
Q

Q
S
7

4
IC2
CD4027
1K R4
220Q

R10
7
+o
9V DC
+T R 220K
8 Q
5 6 7 2 R9
ASTABLE -T GND
8 IC3
C1 8 R8 UM3561 3
~ 5
10M 47Q
25V R6
390Q
R7
390Q
<
— vwv
i

6
BC548

//V LED1 2
D1 ZD1
LED2 J L\ÿ J L\ÿ LED3 1N4001 3.1V
YELLOW

Fig. 1: Circuit of front door guard

dual J-K master/slave flip-flop having FRONT VIEW Q output goes triac1 (BT136) and alarm tone genera-
independent J, K, set, reset and clock low and Q out- tor IC3. The triac is used to switch on
inputs. The flip-flops are edge-sensi- BC O put goes high. porch lamp.
548/
tive to the clock input and Q and Q 549 BT This lights up IC3 (IC UM3561) is a tone genera-
outputs change states on the positive- 136 LED3 and tor that produces different tones based
going transition of the clock pulses. drives transistor on its pin connections. Here it is used
IC2 is wired such that its Q output CB E T1 G T2 (BC548). The to generate a fire brigade alarm by con-
T2
turns high when reset pin 4 receives a output from necting its pin 6 to Vcc. Resistor R10
Fig. 2: Pin configuration
high pulse (as indicated by LED2). of BC548/549 and transistor T2 is keeps the oscillation of IC3 to the re-
When set pin 7 receives a high pulse, BT136 used to activate quired level. Zener diode ZD1 and re-

WWW.EFYMAG.COM ELECTRONICS FOR YOU • OCTOBER 2006 • 103

CMYK
L

CIRCUIT
IDEAS
sistor R8 provide 3V DC to IC3. Mount the reed switch on the triac from the remaining parts of the
The circuit can be easily assembled doorframe and the remaining circuit and ensure adequate spacing
on a general-purpose PCB. All circuit on the nearby wall. The mag- between its pins to avoid short cir-
the ICs are commonly available net for controlling the reed cuit.
low-cost versions. A standard 9V, switch should be fixed on the door Warning. Since triac is used in the
500mA adaptor can be used to power so as to close the reed switch circuit, some parts will be at mains po-
the circuit. Reed switch S1 is an im- when the door closes. When the door tential. So exercise utmost care during
portant part of the circuit, and it opens, the contacts of the reed switch testing and installation to avoid lethal
should be normally open type. break to activate the alarm. Isolate the shock. 

104 • OCTOBER 2006 • ELECTRONICS FOR YOU WWW.EFYMAG.COM

CMYK
r
CIRCUIT
IDEAS

TELEPHONE-OPERATED S.C. DW
IVEDI

CALLING SYSTEM
 YOGESH KATARIA (VU3PYF) The circuit can also be used in quiz the telephone connected in parallel to
contests and by visually- or hearing- the circuit.

D
ual-tone multiple-frequency impaired people. It can be used to call 3. Gates N1 and N2 to activate the
(DTMF) receiver IC is com- a maximum of nine different persons. call bell.
monly used in telephone The circuit is built around DTMF Here is how the circuit works: Con-
equipment. One common DTMF receiver IC HT9170, BCD-to-7-segment nect the telephone and the circuit in
receiver is Holtek HT9170 used in decoder/driver 7447, quad 2-input OR parallel to the telephone line. Connect
electronic communication circuits. The gate and common-anode display. 6V to the circuit. When you press
Holtek HT9170 series comprises DTMF Simple melody generator IC UM66 is switch S1, DIS1 shows ‘0.’ Lift the
receivers integrated with digital de- used to produce melody sound in the handset off the cradle and dial a num-
coder and bandsplit filter functions. loudspeaker through Darlington-pair ber, say, ‘1.’ The output of IC1 becomes
All HT9170 series ICs use digital transistors (T1 and T2). A3A2A1A0 = 0001. LED1 glows, the
counting techniques to detect and de- The tone pair DTMF generated by display shows ‘1’ and the call bell
code all the 16 DTMF tone pairs into a pressing the telephone key is con- sounds.
4-bit code output. verted into binary values internally in To stop the call bell, put the re-
This telephone-operated calling cir- the IC. The binary values are indicated ceiver on the cradle and press switch
cuit is very helpful for doctors in call- by the glowing of LEDs at the output S1 momentarily. Now DIS1 shows ‘0’
ing the patients, in banks and in vari- of IC1. and LED1 stops glowing.
ous other situations where persons The output of IC1 is connected to: For calling other numbers, follow
have to be called or signalled. When 1. LEDs connected via resistors R15 the same procedure: Lift the handset
you need to call a person amongst through R18 at pins 11 through 14, re- off the cradle and press the desired
many standing outside your cabin, just spectively. LED1 indicates the LSB and number (0 through 9). The respective
lift the telephone handset off the cradle LED4 indicates the MSB. LED will glow, the number will be dis-
and press the respective number. The 2. BCD-to-7-segment decoder/ played on DIS1 and the call bell will
number of the person called will be driver 7447, whose outputs are con- sound. Now put the handset on the
displayed and a bell will sound to in- nected to the common-anode display cradle and press S1 momentarily to
form the person that it is his turn. for displaying the pressed number on stop the call bell. 

C2
R15-R18=3300
wD1 +6V
o

«
0.1|j 1N4007
LED1-LED4=5mm RED

VDD R4
CCT 330K LS1
3
10 18 16
- <ÿ Vcc 40, 0.5W
SPEAKER
RT/GT 16 R14 3,8
VR1
R1 17 - 3300
100K

o
22K INH 13 7
VWV—|— 1 1— vwv
R3
2 5 O
S1
O— < ■
AO
7
12 -j-VWVÿ-
C1 1 R5
0.1p 10K IC1 4.7K INHIBIT A1 11
HT9170 1 IC2
7447 10 2
ED
U
4
R2
22K
X1
7
11
AO
A1
A2
2 9 fwwA

12 15 rA/WV-
A2 g g
XTAL 13 A3 in
3.578MHz A3 6 14
8 14 R8
LU X2 6 9 8
z 3300 DIS1 LTS 542
O CO GND R15 R18 GND
ILU
0- z LED1 LED4
LU
T1
14 R7 BC548
1
OUT
— 2
IC4
1
IN .1*
2lN1 R6
UM66
T2
3 9

©
4 8 4700 2N2222
COM
6 I N3

I
10
5 1 N2
ZD1
7 ZENER
3.3V
IC3(N1-N3)=7432 0.5W GND
O

100 • OCTOBER 2006 • ELECTRONICS FOR YOU WWW.EFYMAG.COM

CMYK
CIRCUIT
IDEAS

APPLIANCE TIMER-CUM-CLAP SWITCH


 PANKAJ D. CHOUDHURY turn the appliance ‘on’ or ‘off’ with
the clap of your hand, if so desired,
IVEDI
S.C. DW

W
hen planning for a week- without having to touch the unit
end outing to return late in physically.
the evening, we are often The transistor-based timer circuit
in an ambivalence whether to leave the uses readily available components, is
staircase/outside light ‘on’ or ‘off.’ We easy to assemble as well as inexpen- collector potential is very near to the
sometimes miss our favourite TV sive, and can be programmed to emitter potential, i.e., ground, and
programme because we forget to switch on/off a load from one sec- therefore there is no base current to
switch on the TV in time. If we are in ond to 100 hours in advance. To make transistors T7 through R6. Thus, tran-
the habit of taking an afternoon nap, the circuit cost-effective as well as sistor T7 is in cut-off state. The collec-
we either turn on the mosquito repel- simple to construct, a general-purpose tor of T7 is above ground potential and
lent earlier than required or get up be- digital clock is incorporated as the ba- the current flows through resistors R7
ing bitten by mosquitoes. sic timing device. The alarm output and R13 to maintain the base current
The timer-cum-clap switch pre- of the clock is used to toggle the out- of T6. Thus, T6 remains in conduction
sented here can solve all these prob- put power supply for switching an state and T7 in cut-off state indefi-
lems and many more. It is a simple appliance ‘on’ or ‘off.’ nitely.
circuit that can be programmed to turn Transistors T6 and T7 are config- Now, if a voltage pulse is applied
on household appliances like lights, ured as a bistable flip-flop that has two to the base of transistor T7 from some
fans, TV sets, music systems, etc ex- stable states. Transistor T7 will be in external source, a momentary base cur-
actly at a preset time and turn off at cut-off mode corresponding to transis- rent will trigger it into conduction and
another preset time automatically, tor T6 in conduction mode, and vice its collector potential will come down
thereby saving on electricity. You can versa. When transistor T6 conducts, its to near ground potential. Thus, the

S1
ON/OFF L
D6
w D1-D6=1N4007

-i- C3 C5
RL1
12V, 1C/0
RELAY
P
p
L
I
CD 470M R16 A
SWITCH 12V 0.1M RL1 N

I
CD 35V 1K
o CD C
230V AC O CD CD
N/0 E
//1r
50Hz CD CD o
CD
O ov (GND) LED1 D3 CD
CD

1 CD

X1
n 12V
D5
W
LED2

— (ÿ—
R21
1.5K
N/C

I ___
o A I

X1=230V AC PRIMARY TO 12V-0-12V, R12 D4 t


250mA SECONDARY TRANSFORMER 3.3K -=. BATT. 1
◄ T+ 3V
+C

R1 R2 R3 R4 R5
C2
10M "A ZD1
R13
±P*
10M
-~p 35V
R14
22K
D7
1N4007
L
0
C
22K
1.5K 4.7M 330K 22K 1.5K 16V “5.1V K
AI
T6 R17 ALARM
BC548 100K OUT
AM/V— <
' ~WW
1

©
T7 R6 R7 D8
C1 BC548 10K 10K 1N4007
0.1M T8
"-) [— VWV— 41 «ÿvwyH h BC548
T1 T2 T3 C6+ R8 R10 R18
R9
£ 3%
©
3-3K
BC548 BC548 BC548 3.3M 3.3K 10K
220K
25V 25V
T9
AAAAr-"
R11


RESET T4
BC558 10K BC547 R19
+ S3 a3K
D2 T5
COND. BC558
MIC T10

D1
C8
0.1M
X R15
2.2M
BC558
R20
C9
10M
S2

CLAP
I TIMER 1M
AM/V
16V

S2=0N/0FF SWITCH S3=PUSH-T0-0N SWITCH

WWW.EFYMAG.COM ELECTRONICS FOR YOU • NOVEMBER 2006 • 99


CIRCUIT
IDEAS
current flowing through resistor R13 emitter of T5 and the output changes This simple circuit can be as-
will pass through the collector of T7 over. sembled on a general-purpose PCB.
and there will be no current through When clap switch is not required, The clock, battery, switches, relay,
R7, making T6 go into cut-off state S2 can be turned off. S3 is the reset transformer, etc are wired with the
and thereby raising the collector po- switch (push-to-on type), which is PCB (not shown in the circuit). A plas-
tential of T6 to some positive value. used to toggle the output between tic switchboard (available in electrical
This, in turn, will keep T7 conduct- ‘on’ and ‘off’ states. R10-C7 and R8- shops) can be used as the cabinet for
ing. Now the base current of T7 will C6 are parallel paths to R7 and R6 assembling the unit. Holes can be
pass through resistors R14 and R6. for quick switchover of the bistable drilled easily on the plastic cabinet.
This state will sustain until some ex- latch. House the PCB, transformer, relay, etc
ternal voltage is applied to the base Two AA-size batteries supply 3V inside the cabinet. Fix the plug socket,
of T6. DC to the clock and maintain a posi- switches and external connector on the
The external voltage pulse (for tive voltage to the collectors of T6 rear side of the cabinet. Indicator LEDs
switching) is taken from two sources: and T7 through diode D7. This keeps (fixed on LED sockets) on the front
the alarm output of a clock or the the circuit active during power fail- panel show ‘on’ or ‘off’ condition of
sound picked up by condenser micro- ures also. A step-down transformer the output plug.
phone ‘M’ after proper amplification supplies 12V DC to the relay coil and Glue the condenser microphone in-
by transistors T1, T2 and T3. sound amplifier section. Diodes D5 side the front or side wall with small
Since most of the digital clocks and D6 are rectifier diodes and C5 is holes drilled in front of it to receive
give out negative pulses to the buzzer the ripple filter capacitor. Diode D4 external sound. The battery chamber
(whose other end is directly connected prevents the 3V battery from drain- housing two pencil cells can be fixed
to the positive terminal of the bat- ing out into the rest of the circuit. inside the cabinet or on the rear of the
tery), a reverse diode (D8) and a pnp The digital clock is a commonly cabinet as per convenience. The clock
transistor (T10) are used at this stage. available digital calendar with at least is glued on top of the cabinet. Before
The negative pulses are rectified by one alarm setting and one countdown fixing the clock on the cabinet, open it
D8 and filtered by C9 to supply a timer setting. The digital calendar, be- carefully to disconnect its piezoelec-
steady base current of T10. Otherwise, ing cheap, keeps the total cost of the tric buzzer. The terminal that shows
the output will become noisy because project low and allows for precise set- pulsating voltage during an alarm op-
of the pulsating nature of the alarm. tings of the alarm times. The alarm eration (detected with a multimeter)
(If the clock gives out positive pulses, can be set 24 hours in advance, while is connected to the base of T10 through
T10 can be replaced with an npn a second alarm can be selected in the D8 and R19. The internal battery is re-
transistor like BC547. Diode D8 has countdown timer mode, which allows placed and the terminals are connected
to be reversed and R18 has to be con- for setting of the time 100 hours to the external battery chamber with
nected between the base of T10 and (99:59:59 hours to be precise) in ad- proper polarity.
ground.) vance. Availability of more than one The operation of the circuit can be
The external voltage pulse is fed at alarm setting in the clock will give divided into two parts: clap mode and
the common emitter of transistors T4 the added advantage of setting mul- timer mode.
and T5 through capacitor C8. When tiple switching times. The timer can be put in clap mode
the alarm starts (sending negative volt- Instead of the digital calendar, any by turning on the clap switch (S2). The
age pulses), capacitor C9 discharges other digital clock or battery-operated connected appliance can now be
through D8 and, at the same time, quartz clock (with alarm) can also be turned on/off by clapping with an au-
charges through R19, thus triggering used as the basic timing device, dible intensity. The clock timer will
the base current of T10. The emitter though the alarm time setting is less function as usual in this mode.
current of T10 charges capacitor C8, precise in case of the latter. Instead While clapping, leave a gap of a
which passes through the emitter of of one clock, multiple clocks can be few seconds between two successive
either T4 or T5 depending on their wired by connecting diodes parallel claps. Thus, the gadget will show
bias. to D8. better response because it has been
When T6 is conducting, T4 is for- Note that once set in the clock designed to consider two overlapping
ward biased and the voltage pulse is mode, the alarm operates daily at the claps as one, ignoring the second
fed at the base of T7, bringing T7 into same time. But in the countdown one.
conduction and T6 into cut-off mode. mode, it operates only once. So if an For timer mode, switch S2 is turned
This makes T5 forward-biased and T4 appliance is to be turned on and off off. The alarm is set at the time when
reverse-biased. The next voltage pulse, daily at the same time without human switchover is required. The second
either through T10, D1 or D2 corre- intervention, at least two digital clocks switchover time can be set in the
sponding to the clock alarm, clap have to be wired (if the clock does not countdown timer. For that, the time
sound or operation of the reset switch, have two alarm settings apart from the difference between the present time
sends a base current of T6 through the countdown timer). and the time at which switching is re-

100 • NOVEMBER 2006 • ELECTRONICS FOR YOU WWW.EFYMAG.COM


CIRCUIT
IDEAS
quired is calculated and this time is reset switch S3. off) to allow for the first alarm to
set in the countdown timer. When set- While setting the alarm, ensure a subside completely. Otherwise, the
ting is done, set the output plug as delay of at least three minutes be- unit may malfunction (ignore the
‘on’ or ‘off’ (as desired) by pressing tween two successive alarm times (on/ second alarm). 

WWW.EFYMAG.COM ELECTRONICS FOR YOU • NOVEMBER 2006 • 101


CIRCUIT
IDEAS

VARIABLE POWER SUPPLY USING IVEDI


S.C. DW
A FIXED-VOLTAGE REGULATOR IC
 DR MAHESH N. JIVANI AND DR by using a pair of ‘voltage-divider’ re-
NIKESH A. SHAH sistors. It is not possible to obtain a Common Resistor
voltage lower than the stated rating. Combinations for the
7805 Regulator
A
voltage regulator (also called You cannot use a 12V regulator to
a ‘regulator’) with only three make a 5V power supply, but you can Vout (approx.) R1 (ohms) R2 (ohms)
terminals appears to be a use a 5V regulator to make a 12V sup-
5V 470 0
simple device, but it is in fact a very ply.
6V 470 100
complex integrated circuit. It converts Voltage regulators are very robust. 8V 470 220
a varying input voltage into a constant These can withstand over-current 9V 470 330
‘regulated’ output voltage. Voltage draw due to short circuits and also 12V 470 510
regulators are available in a variety of over-heating. In both cases, the regu-
outputs like 5V, 6V, 9V, 12V and 15V. lator will cut off before any damage Because of this constant 13.1mA cur-
The LM78XX series of voltage regu- occurs. The only way to destroy a rent, R2 can now be set to a value that
lators are designed for positive input. regulator is to apply reverse voltage will give constant 7 volts across resis-
For applications requiring negative in- to its input. Reverse polarity destroys tor R2. A resistor value of 533 or 510
put, the LM79XX series is used. Fig. 1 the regulator almost instantly. ohms (standard value) will give the
shows the pin configuration of a 5V Fig. 2 shows the circuit for increas- necessary 7 volts.
7805 regulator. ing the output voltage of a regulator With 5 volts across R1 and 7 volts
The output voltage of a regulator circuit using a pair of voltage-divider across R2, a total of about 12 volts
circuit can be increased resistors. Let’s assume the value of R1 (regulated) will appear across termi-
as 470 ohms, which nal 2 and ground. If a variable resis-
IC1 means that a constant tor is used as R2, the output voltage
IN OUT
o 1 7805 3 O current of 10.6 mA will can be easily fine-tuned to any value
LM VOLTAGE 2 VOLTAGE
7805 IN OUT be available between greater than 5 volts. The standby
COM
, vwv
— — terminals 2 and 3 of current will vary slightly in the
*R1 *C1 7805. This constant cur- regulator 7805, but 2.5 mA will yield
~r 0.1M
*R2 rent plus the regulator good results in the calculations. If an
I/P
COM
O/P
GND
standby current of exact voltage (within 0.3 volt) is
<> ? O about 2.5 mA will flow needed, R2 must be a variable resis-
Fig. 1: Pin ‘REFER TEXT
configuration of
through R2 to ground tor. To make any fixed regulator ad-
7805 regulator Fig. 2: Circuit for increasing the output voltage regardless of its value. justable, use the following formula:
Vfixed
Vout= Vfixed+R2 +Istandby
R1
IN IC1 OUT
7805 3
X1=230V AC PRIMARY TO 0-9V, 500mA/1A where Vout is the desired output
2 R1
SECONDARY TRANSFORMER voltage, Vfixed is the fixed voltage
COM 470Q
C3 of the IC regulator (5 volts) and
L 10M
o

CD
X1
D1 D2
C2
0.27M o F 25V

VOUT
Istandby is the standby current of the
regulator (2.5 mA). For resistor R1,
use any value from 470 ohms to 1
CD 5V TO
CD
230V CD
AC CD CD
CD
O O 12V kilo-ohm for best results. For vari-
CD CD
50 Hz CD able resistor R2, put any value
CD CD

r
CD
D4 D3 R2 R3 R4 R5 from the table given here for de-
100Q 220Q 330Q 510Q
sired voltage operation.
o —+2200M
C1
Fig. 3 shows the circuit of a 6V-
N 25V
12V variable power supply using
a 5V regulator. The 220V AC mains
D1-D4=1 N4002 S1=5-WAY ROTARY SWITCH
voltage is stepped down by trans-
Fig. 3: Circuit of variable power supply using a 5V regulator former X1 to 9 volts, rectified by

96 • NOVEMBER 2006 • ELECTRONICS FOR YOU WWW.EFYMAG.COM


CIRCUIT
IDEAS
the bridge rectifier comprising 1N4007 of current drawn and at least twice a mere 1 mV of ripple in the regu-
diodes D1 through D4, filtered by the input voltage. Wire the 270nF or lated output.
smoothing capacitors C1 and C2, and greater disk (ceramic) capacitor close Attach the 5-way rotary switch to
regulated by IC 7805 (IC1). Capacitors to the input terminal of the IC, and a resistors of different values to get the
C1 and C2 help to maintain a constant 10µF or greater electrolytic capacitor regulated output as shown in the table.
input to the regulator. across the output. The regulator ICs Or, you can use a 1-kilo-ohm potmeter
Capacitor C1 should be rated at a typically give 60 dB of ripple rejec- as a variable resistor to get the regu-
minimum of 1000 µF for each ampere tion, so 1V of input ripple appears as lated 5V-12V output. 

WWW.EFYMAG.COM ELECTRONICS FOR YOU • NOVEMBER 2006 • 97


CIRCUIT
IDEAS
tivity. Transistor T1 amplifies the sig-
nal received from the condenser mic
UMAR through capacitor C1. When transistor
SUNIL K
SECRET BELL T1 conducts, a short negative pulse
triggers the monostable wired around
IC1. The monostable time is decided
by resistor R7
 D. MOHAN KUMAR a switchless musical bell that activates and capacitor
with a single puff of breath. The con- UM BC C5. Reset pin 4
548/

M
66
any people move through denser mic fitted inside the existing 549 of IC1 is made
the corridors and steps in door-bell switch box will trigger the 3 2 1 stable by R6 and
multistoried buildings. As bell on detecting air-pressure changes C3. Resistor R5
GND., 0/P CB E
most of them are strangers for the in- following the breath. As only the mem- Vcc acts as a pull-up
habitants of the flats, it becomes nec- bers of your family know the secret of Fig. 2: Pin configuration resistor for trig-
essary to verify the identity of the visi- the bell and hence puff out before the of UM66 and BC548/549 ger pin 2 of IC1
tor before opening the door as he can hole for the switch box, the door can to keep the trig-
be a burglar. be opened without fear. ger pin high in the standby mode.
This circuit helps you identify the The front end of the circuit is a con- The high output from IC1 is used
members of your family. It is basically denser mic amplifier with fixed sensi- to power IC UM66 (IC2). IC2 gener-
ates a soft melody on receiv-
ing 3 volts at pin 2. Transis-
tor T2 amplifies the music
R2 R4 R5 R6 R7
notes. A zener diode main-

M
390K 10K 4.7K 4.7K 1M
LS1 tains the power for IC2 at a
40
Vcc 1W safer level of 3 volts.
R1
10K 8
T Assemble the circuit on
HC2 2 A i

any general-purpose PCB


+o
C1 0.01M 9V and enclose in a suitable
0.47M IC1 6
DC
cabinet. The condenser mic
€),, BC549
R
4
NE555
3
R8
2200
AA/W 2
IC2
UM66 1
R10
Q
should be connected to the
circuit using a single-core
+ COND. 1 5 BC548
\ MIC
ZD1
R9 shielded wire to reduce
GND 3.1V
2200
0.5W noise interference. Drill a
R3 + C3
C4
+ C5 1mm hole in the cover of the
4.7M 10M
120K 16V 0.01M 16V V\\ LED1 existing bell switch box and
fix the mic inside the box
with adhesive. The front side
of the mic should face the
Fig. 1: Secret bell circuit hole. 

94 • DECEMBER 2006 • ELECTRONICS FOR YOU WWW.EFYMAG.COM


CIRCUIT
IDEAS

ULTRASONIC PROXIMITY DETECTOR


 PRADEEP G. general-purpose PCB as shown in IVEDI
Fig. 3 and connect to identical points S.C. DW

W
e the humans can hear (‘a’ through ‘d’) of the detector circuit
sound of up to 20kHz fre- (Fig. 2) via external wires.
quency only. This proxim- The 40kHz oscillator is built ing CMOS decade counter IC4017 (IC1)
ity detector works at a frequency of 40 around transistors T1 and T2. If there is used at the output of the amplifier.
kHz. It uses two specially made ultra- is a solid object in front of the ultra- IC1 divides the input frequency by ’10,’
sonic transducers: One transducer sonic transmitter module (TX1), some so the 40kHz signal becomes 4 kHz,
emits 40kHz sound, while the other signals will be reflected back and which is within the audible range. The
receives 40kHz sound and converts it sensed by the receiver transducer 4kHz signals are fed to op-amp IC 741
into electrical variation of the same fre- (RX1). The 40kHz ultrasonic signals are (IC2), which is wired as an earphone
quency. converted into 40kHz electric signals amplifier.
Fig. 1 shows the block diagram of by the receiver and then amplified by This circuit can be used as an elec-
the ultrasonic proximity detector and transistors T3 and T4. tronic guard for the blind. Keep it
Fig. 2 shows its circuit. Mount the The amplified signals are still in (along with 9V battery) in their pocket
transducers (transmitter as well as re- the inaudible range, i.e., these can’t be with earphone plugged to their ear.
ceiver) about 5 cm apart on a piece of heard. So a frequency-divider stage us- The transducer modules should be di-
rected to-
5 CM
wards the TX1 RX1
40KHz 40KHz
> FREQUENCY
>
AF
> EAR w a l k i n g ® s.— c
OSCILLATOR AMPLIFIER DIVIDER AMPLIFIER PHONE
path.
any object
If ®?0 0 !
\
EMITTER RECEIVER
TX1 RX1 comes up ULTRASONIC

mm in front or TRANSDUCERS

n e a r b y , Fig. 3: Transducers mounted


Fig. 1: Block diagram of ultrasonic proximity detector they will on the PCB

o
I C1 R5
4_ C5
220p
+9V

0.1M R2 470K 25V R9


6.8K 15K
© R6 C3
0.01M
T4
BC558
R11
47K
1M

R1
470K
' — vwv
1

© Vcc
16
VWV-

-VWV — 1

CLK
— vwv
Oo
R12
10K 2 7
HC4
( V

BC547
T2 © T3
BC549
© R7
10P
R
14

IC1
4017
3
IC2
741
6
lh
1M 15 3 C6
+ 4 22M

T1©
BC547
09
11
13 8
GND
25V

© A i
®— ' *
C2 -p
-I- 0.01M EARPHONE
R3 R4 R8 R10
2.7K 4.7K 4.7K 15K

GND
O

D TX1
I0I RX1
TX1=ULTRASONIC TRANSDUCER TRANSMITTER (40kHz)
RX1=ULTRASONIC TRANSDUCER RECEIVER (40kHz)

u tt
Fig. 2: Circuit of ultrasonic proximity detector

88 • DECEMBER 2006 • ELECTRONICS FOR YOU WWW.EFYMAG.COM


CIRCUIT
IDEAS
hear 4kHz sound through the ear- pets can hear ultrasonic sound, which up and avoid banging against some
phone and can change their path ac- will irritate them and they will bark invisible objects. However, instead of
cordingly. unnecessarily. earphones the sound in this case is
One thing to be noted here is that EFY note. A similar device is used heard through a speaker and there is
while using this device, avoid the com- in some cars, such as Skoda’s Laura also an LCD screen to visually assist
pany of your pets. The reason is that model, to help the drivers in backing the driver. 

WWW.EFYMAG.COM ELECTRONICS FOR YOU • DECEMBER 2006 • 89


Electromagnetic Relay Driver | Detailed Project Available https://electronicsforu.com/electronics-projects/electromagnetic-relay-driver

Electronic Door Key


By T.K. Hareendran
December 5, 2017

This circuit is basically a short range, infrared remote-controlled electromagnetic relay driver. It can be
used to control door motors or solenoid based locks using a compact and handy remote handset.

Electromagnetic relay circuit


The circuit comprises the IR transmitter and the receiver cum relay driver circuits. Fig. 1 shows the tiny
transmitter circuit that works off a 6V (2x3V) battery. Two CR2032 Lithium button cells serve the purpose here. Push-to-on
switch S1 is the trigger key. Resistor R1 and zener diode ZD1 form the traditional shunt regulator circuit. Resistor R3 limits
the operating current of response indicator LED1 .

HI

-ww
QZtl
o
El
PUSH-TO- R3 R5
ON SWITCH G8Q£i ■b£!ii
C2
Vec LEDt
15V A
I i 1 i J (; iJ IHTV

1 of 5 1/25/2018, 1:34 AM
Electromagnetic Relay Driver | Detailed Project Available https://electronicsforu.com/electronics-projects/electromagnetic-relay-driver

■I F I fh

t 1 H" 1 LED1
Cl 0
IDOJJ
1GV Ft2 fW
4.7K

*
C3
»
22011

ih 2
IC1
74HC132 6 — VwW
ri
£)
0.1 [l BC547

+
H 1
- ev
T EATT. 2D1 GNO
5.1V
2ENEB M
“ 0.47ÿ
16V

*
Electromagnetic relay: IR transmitter

Two of the four gates of IC1 are used here. The first gate (with pins 1 and 2 as inputs and pin 3 as output) is a 10kHz
oscillator. Tinning components R2 and C4 determine the frequency of oscillations. The second gate (with pins 4 and 5 as
inputs and pin 6 as output) is used as a buffer. The 1 0kHz signal for the infrared is produced by this oscillator built around

2 of 5 1/25/2018, 1:34 AM
Electromagnetic Relay Driver | Detailed Project Available https://electronicsforu.com/electronics-projects/electromagnetic-relay-driver

the first gate. Transistor T1 is the IR transmitting LED1 driver and resistor R5 limits the current through the infrared LED.
Any general-purpose IR-transmitting LED can be used here. After construction, eQtlose the circuit in a keychain type plastic
cabinet.

Fig. 2 shows the IR receiver-cum-relay driver circuit. It works off 6V regulated power supply. Use a suitable AC mains adapter
(max. 500 mA at 6V) for powering this unit.

Circuit operation

When the IR signal is received, photo-transistor T2 conducts briefly at 10kHz rate and a pulse train with 10kHz frequency
appears across resistor R6. This signal is fed to the input terminal (pin 3) of PLL chip LM567 (IC2) through capacitor C5.
When the amplitude and frequency of the input signal are within the capture range of the PLL decoder, its output pin 8 goes
low. Resistor R8 limits the sinking current.

O B
52 6V
OlM/OFF
< ne RS > 1DK
H9 SWITCH
J10K 10K 02
1N4O01

C5

a
WO
100rt 4 6 4 o
3 a
wc
5

k
RL1
P? RELAY
IC2# 1C3 6V

3 of 5 1/25/2018, 1:34 AM
Electromagnetic Relay Driver | Detailed Project Available https://electronicsforu.com/electronics-projects/electromagnetic-relay-driver

pvn

c)„
LMS67 LM555 1C/0
RELAV
6 a
VR1 RIO
1QK C9 ’ÿ

10K SL100

e> IOQIJ rr
G
16V
a 7 i
T>
L14F1
h}.ICMJK
CS _L Cio
CG C7 + 1 C11 C12
o.oi ~r 0,1jj
— i— 0.01tJ

I
o.oi M 16V
16V
GND
O
*
Electromagnetic relay: IR receiver

As a result, the monostable built around the timer chip (IC3) is triggered and relay RL1 energises for a finite time (1 to 5
seconds) determined by VR2 setting. The relay contacts allow switching of the door motor/lock solenoid.

The initial setting is to be done as follows: Push switch S2 of the IR receiver circuit to 'on' state and activate the transmitter.
Now slowly vary preset VR1 until relay RL1 energises. Lock preset VR1 in this position by applying some sealant such as wax.
Now connect the door motor/lock solenoid to the relay contacts with proper power supply.

The circuit has been designed to work over a very short range (max. 1 0 cm) to prevent its misuse.

The article was first published in December 2006 and has recently been updated.

4 of 5 1/25/2018, 1:34 AM
Electromagnetic Relay Driver | Detailed Project Available https://electronicsforu.com/electronics-projects/electromagnetic-relay-driver

5 of 5 1/25/2018, 1:34 AM
CIRCUIT
IDEAS

ELECTRONIC HORN S.C. DW


IVEDI

 ASHOK K. DOCTOR IC LM3900 (IC1). IC LM3900 has four


independent op-amps (A1 through A4)

H
ere’s a simple circuit of an with a large output voltage swing. It a low-frequency squarewave genera-
electronic horn that is built can work at up to 32V DC. tor. Op-amp A2 works as an integra-
around quadruple op-amp The first op-amp (A1) is wired as tor, while op-amp A3 works as a

o
A1 R12 +9V
Q R3 1M
R4 2.2M A/WV
C2
0.33M
1.5M
A/WV 8
L

M
R5 R14 o
o CD
1M 4.7K CD
2 12 14
+ !>-
A/WV A4 CD
CD
9 CD
R1 A1
4
D1
A2
10
A/WV
13
+ —— C4 CD
O
CD
1N4148 I- 22n
150K R11 LS1
°— VWV— “
3
R2
— vwv R6
11
+
C3
R10
1M C5 -1-
10n ~T
X1 4Q
0.5W
510K 100n

O
30K 1M
(»ÿ
A/WV 72
R9 R13 2N3707
51OK 47K OR
A2 SL100
A/WV
+ C1 R7 1

a
T1 +
4.7M 2N3707 30K
16V R8
OR A3 IC1(A1-A4)=LM3900 QUAD AMPLIFIER
BC548 330K
7
-ÿA/WV-1 X1=AUDI0 OUTPUT TRANSFORMER
LS1=4Q, 0.5W LOUD SPEAKER
GND
O

comparator. A2 and A3 together When power is switched on, a ba- 9V. To generate several different
work as a ‘wandering voltage gen- sic tone is generated by transistor T2 tones, connect its point A1 to pins
erator’ op-amp. Op-amp A4 is wired and transformer X1, which is fre- 1, 3, 4, 5, 8, 9, 10, 11, 12 and 13 of IC1
as a buffer and its output provides quency-modulated by the wandering and point A2 to pins 1, 2, 3, 6, 8, 11
base current to npn transistor T2. npn voltage generator, which, in turn, is and 13.
transistor T2 and audio output trans- influenced by the low-frequency The circuit can be used as an auto-
former X1 form a voltage-controlled squarewave generator. mobile horn by using about 10W au-
oscillator. The circuit works off regulated dio amplifier. 

WWW.EFYMAG.COM ELECTRONICS FOR YOU • JANUARY 2007 • 109


CIRCUIT
IDEAS

IR MUSIC TRANSMITTER AND


RECEIVER
 IVEDI
PRADEEP G. 10 metres. S.C. DW
The circuit can be divided into

U
sing this circuit, audio musi- two parts: IR music transmitter and
cal notes can be generated receiver. The IR music transmitter
and heard up to a distance of works off a 9V battery, while the driver stage (built across the transis-
IR music re- tors T1 and T2) to get the maximum
o ceiver works off range.
FRONT
VIEW
+]_ C2 +9V regulated 9V to Here the red LED (LED1) flickers
UM66 220M R5
12V. according to the musical tones gener-
R1
25V
X LED1
10Q
1W
Fig. 1 shows ated by UM66 IC, indicating modula-
1K
3 2 1
the circuit of tion. IR LED2 and LED3 are infrared

GND O/P TS
+Vcc BD140/
SK100
the IR music transmitting LEDs. For maximum
R4
transmitter. It sound transmission these should be
Vcc
82Q uses popular oriented towards IR phototransistor
T1 IR
+
“ 1M
C1
2 R2 BC547 LED2 melody genera- L14F1 (T3).
4.7K
16V IC1 1 OUT tor IC UM66 The IR music receiver uses popu-
UM66 A/WV
ZD1
(IC1) that can lar op-amp IC µA741 and audio-fre-
R3 IR
3.3V continuously quency amplifier IC LM386 along with
$
GND 22K LED3
VAW
ZENER GND generate musi- phototransistor L14F1 and some dis-
O
MELODY GENERATOR IR DRIVER
cal tones. The crete components (Fig. 2).
output of IC1 is The melody generated by IC UM66
Fig. 1: Transmitter circuit fed to the IR is transmitted through IR LEDs, re-
ceived by phototransistor
A/WV o T3 and fed to pin 2 of

R6 R8
I
C4
220M
R10
680Q C6
10M
+ | C8
220M
+9V
IC µA741 (IC2). Its gain
can be varied using
10K 15K
— vwv
R9
100K
16V
X 25V

+
X 25V
potmeter VR1. The output
of IC µA741 is fed to IC
R7 VR1 8 R11
10K 1M 1K
C10
LM386 (IC3) via capaci-
' — 1 1— vwv
7 6
1
2 3
+ 220M tor C5 and potmeter VR2.
C3 1 25V
0.1M IC2 IC3 5 The melody produced
741 6 LM386 + is heard through the
C5 2
3
+ 4 0.1M 4 R12 receiver’s loudspeaker.

M
T3 10Q
L14F1 7 LS1 Potmeter VR2 is used to
IR PHOTO VR2 8Q
TRANSISTOR 10K 1W control the volume of
R13 C7 C9
15K O.IM ~r o.iM-r loudspeaker LS1 (8-ohm,
GND 1W).
o
Switching off the
power supply stops
Fig. 2: IR audio receiver circuit melody generation. 

108 • JANUARY 2007 • ELECTRONICS FOR YOU WWW.EFYMAG.COM


Low-cost Laser Security System | Full Project Available https://electronicsforu.com/electronics-projects/low-cost-laser-security-system

House Security System


By Malay Banerjee
December 5, 2017

Here's an invisible low-cost laser security system to protect your house from thieves or trespassers.
A laser pointer torch, which is easily available in the market, can be used to operate this device.

A low-cost laser security system


V>a*t£/
The block diagram of the unit shown in Fig.1 depicts the overall arrangement for providing security
to a house. A laser torch powered by 3V power supply is used for generating a laser beam. A combination of plain mirrors
M1 through M6 is used to direct the laser beam around the house to form a net. The laser beam is directed to finally fall on
an LDR that forms part of the receiver unit as shown in Fig.2. Any interruption of the beam by a thief/trespasser will result
into energisation of the alarm. The 3V power-supply circuit is a conventional full-wave rectifier filter circuit. Any alarm unit
that operates on 230V AC can be connected at the output.

m3V
POWER
SUPPLY
FOR
LASER
TORCH
r
LASER BEAM

M3
M6jJ*

s
LDR

I
ALARM /1

RECEIVER
TORCH CIRCUIT
LASER NET

F/G0; Block diagram] HOURF

1 of 4 1/25/2018, 2:18 AM
Low-cost Laser Security System | Full Project Available https://electronicsforu.com/electronics-projects/low-cost-laser-security-system

V-'
of the home security i
i
system V..v l

HERE M1 THROUGH MS ARE MIRRORS

The receiver unit comprises two identical step-down transformers (X1 and X2), two 6V relays (RL1 and RL2), an LDR, a
transistor, and a few other passive components. When switches S1 and S2 are activated, transformer X1, followed by a full-
wave rectifier and smoothing capacitor C1, drives relay RL1 through the laser switch.

r C5 6'
DS

* i
1N4O07
IWQ
<=>
/50 i
OWOFF O
g
4
C2

KJV
<ÿ
r
- 06
1HHOO?
me
SKETCH
GV| lWiOOT RL2
4

X2 ►f 6V, icon 230V AC


TO ALARM
s§ov 230 V AC PRIMARY 1 CJO RELAY
UNIT
50Kz TO 6V-0'6V, 300mA
AC
sec, TRANSFORMER

R1
31 g LV
LDR] :I«MI N/0
ON/OFF O 1NAOQ7 ’O.SW

C1+r - CD3
/ §p loobji T1
IN40C7' L 0

I_r
63V
xi
1N“fT
wx
BC65S RL1
6V, 1000
1 CiO RELAY
AC PRIMARY
TO $V-0-$V. 300mA
SEC. TRANSFORMER FIG. 2: Reefer anil

Circuit operation

The laser beam should be aimed continuously on LDR. As long as the laser beam falls on LDR, transistor T1 remains forward

2 of 4 1/25/2018, 2:18 AM
Low-cost Laser Security System | Full Project Available https://electronicsforu.com/electronics-projects/low-cost-laser-security-system

biased and relay RL1 is thus in de-energised condition. When a person crosses the line of laser beam, relay RL1 turns on
and transformer X2 gets power supply and RL2 energises. In this condition, theQser beam will have no effect on LDR and
the alarm will continue to operate as long as switch S2 is on.

When the torch is switched on, the pointed laser beam is reflected from a definite point place on the periphery of the
house. Making use of a set of properly oriented mirrors one can form an invisible net of laser rays as shown in the block
diagram. The final ray should fall on LDR of the circuit.

S3
ON/OFF 3V
07
O 1N4007
SWITCH <25
CD CD

230V <25 C3 04 +3V


50Hz 100Cÿ + T"0.1p — O
AC
6 D8 16V
3V| 1ÿ007
230V AC PRIMARY FIG. 3; Laser power
TO 3V-0-3V, 100mA
SEC. TRANSFORMER supply

Note:

LDR should be kept in a long pipe to protect it from other sources of light, and its total distance from the source may be
kept limited to 500 meters.

The article was first published in January 2007 and has recently been updated.

3 of 4 1/25/2018, 2:18 AM
Low-cost Laser Security System | Full Project Available https://electronicsforu.com/electronics-projects/low-cost-laser-security-system

4 of 4 1/25/2018, 2:18 AM
CIRCUIT
IDEAS
via switch S1.
IVEDI The circuit works off a 9V bat-
S.C. DW
CLOCK TIMER tery. Assemble it on a general-pur-
pose PCB and enclose in a suitable
cabinet. Provide an AC outlet in the
 D. MOHAN KUMAR set VR1. The inverting and non-invert- cabinet to switch on the appliance us-
ing inputs of LM311 are different from ing the circuit. As mentioned earlier,

W
ith this simple clock- other op-amps and it outputs sink cur- the input signal is obtained from the
controlled timer, you will rent through pin 7 or source current buzzer terminals of the clock. Remove
never again miss your through pin 1. the small buzzer of the clock and con-
favourite TV or radio programme. The When pin 3 of IC1 is at a higher nect point ‘A’ to the positive termi-
TV or radio will switch on automati- voltage than pin 2, its output sinks nal and point ‘B’ to the negative ter-
cally at the time preset by you and as indicated by LED1. This gives a minal of the buzzer. Connect the
will remain ‘on’ until the power sup- short negative pulse to the monostable mains AC terminal outlet to the nor-
ply fails or is disconnected. wired around timer NE555. Resistor mally-opened (N/O) contact of relay
The circuit uses the AC signals gen- R5 keeps trigger pin 2 of IC2 high. RL1. So when the relay energises,
erated at the buzzer terminals of an The short-interval monostable outputs 230V AC operates the connected ap-
alarm clock. The AC signals are am- a high signal for a brief period to the pliance.
plified by transistors T1 and T2 and gate of SCR1 (BT169) and relay RL1 Set the desired time in the clock by
the amplified output from the emitter energises. The latching action of SCR1 adjusting the alarm set-up and switch
of T2 is fed to the inverting input of keeps the relay pulled even when the on the circuit. When the set time
negative-voltage comparator IC LM311 output of the monostable turns low. reaches, the appliance will switch on
(IC1). The non-inverting input of IC1 The relay can be de-energised by dis- automatically. The circuit can also be
gets a presettable voltage through pre- connecting the supply to the circuit connected to digital clocks. 

R4 R5 R6 RL1
R1 2200. 10K 100K
N/0
10K
T2
o
/S1
7 ON/OFF
BC547 LED1 :w
D1
1N4007 o

© R Vcc o A
SWITCH N/C p
8 4 8 P
L
3 I
R2 A
+ T A N
9V 1M 7 2 R7 SCR1 C
T BATT. 220Q G BT169 E
IC1 C3 IC2
C1 LM311 0.1M 7
NE555
3 —0/Pvwv 6I
®
O
+
CLOCK
0.01M

BUZZER
© T1
BC547
VR1
10K
PRESET
F 2

1 4
6

1 5
R8
4.7K
L N
230V AC
50Hz

TERMINAL
GND
R3 C2 C4 + C5 RL1=9V
470K 100M -i- 0.01m
~T~ 0.1M 25V
1C/0 RELAY

96 • FEBRUARY 2007 • ELECTRONICS FOR YOU WWW.EFYMAG.COM


CIRCUIT
IDEAS

FULLY AUTOMATIC EMERGENCY LIGHT


 DR C.H. VITHALANI built around 3-terminal adjustable
regulator LM317. IVEDI
S.C. DW

T
his simple automatic emer- In the inverter section, NE555 is
gency light has the following wired as an astable multivibrator that
advantages over conventional produces a 15kHz squarewave. Out-
emergency lights: put pin 3 of IC 555 is connected to the
1. The charging circuit stops auto- Darlington pair formed by transistors minals of each side of the tubelight
matically when the battery is fully SL100 (T1) and 2N3055 (T2) via resis- and then connect to the secondary of
charged. So you can leave the emer- tor R4. The Darlington pair drives fer- X1. (You can also use a Darlington pair
gency light connected to AC mains rite transformer X1 to light up the of transistors BC547 and 2N6292 for a
overnight without any fear. tubelight. 6W tubelight with the same trans-
2. Emergency light automatically For fabricating inverter transformer former.)
turns on when mains fails. So you X1, use two EE ferrite cores (of When mains power is available, re-
don’t need a torch to locate it. 25×13×8mm size each) along with plas- set pin 4 of IC 555 is grounded via
3. When mains power is available, tic former. Wind 10 turns of 22 SWG transistor T4. Thus, IC1 (NE555) does
emergency light automatically turns on primary and 500 turns of 34 SWG not produce squarewave and emer-
off. wire on secondary using some insula- gency light turns off in the presence
The circuit can be divided into in- tion between the primary and second- of mains supply.
verter and charger sections. The in- ary. When mains fails, transistor T4
verter section is built around timer To connect the tubelight to ferrite does not conduct and reset pin 4 gets
NE555, while the charger section is transformer X1, first short both ter- positive supply though resistor R3. IC1
(NE555) starts producing square
wave and tubelight turns on via
*X1=FERRITE CORE EE
ferrite transformer X1.
R1 R3
(2No.) TRANSFORMER WITH
10 TURNS OF 22 SWG J X1
In the charger section, input
1K 10K
WIRE IN PRIMARY AND
500 TURNS OF 34 SWG CO
«o
cO A AC mains is stepped down by
<=> <0 L TUBE
WIRE ON SECONDARY o so O LIGHT
CO A transformer X2 to deliver 9V-0-
CD 20W
Vcc PRI.C5 <o D 9V AC at 500 mA. Diodes D1
7
8

0/P
T1
SL100 SEC.TJI and D2 rectify the output of the
transformer. Capacitors C3 and
R2 3 AM V C4 act as filters to eliminate
4.7K R4 ripples. The unregulated DC
IC1 100Q
NE555 R HEAT 6v voltage is fed to IC LM317 (IC2).
6 4 SINK 4Ah — By adjusting preset VR1, the
T4 BATT.
output voltage can be adjusted
2

GND
1 5 Q BC547 T2
2N3055/MJE3055 to deliver the charging voltage.
When the battery gets
C1 C2 R5 charged above 6.8V, zener diode
-i- 0.01|J 0.01M -I- 4.7K ZD1 conducts and regulator IC2
stops delivering the charging
D3 voltage.
1N4007
IC2 Assemble the circuit on a
w D1
IN
3 LM3172
1
OUT
w ZD1
general-purpose PCB and en-
1 N4007 ADJ
R6 close in a cabinet with enough
CO 150Q 6.8V,
<o space for the battery and
-
0.5W
230V AC S CO C3 +
6.8|J „ C4 <- < i ZENER
50Hz CO
CO
CO
25V 0.1 M DIODE switches. Connect a 230V AC
o CO
CO D2
VR1
AM/V
power plug to feed charging
1K T3
1 N4007
BC547
R7 voltage to the battery and
1K
make a 20W tube outlet in the
X2=230V AC PRIMARY TO 9V-0-9V, 500mA cabinet to switch on the
SECONDARY TRANSFORMER ‘REFER TEXT
tubelight. 

100 • FEBRUARY 2007 • ELECTRONICS FOR YOU WWW.EFYMAG.COM


Clock Controlled Timer | Detailed Circuit Diagram Available https://electronicsforu.com/electronics-projects/clock-controlled-timer

Clock Controlled Timer Circuit


By D. Mohan Kumar
December 5, 2017

With this simple clock controlled timer, you will never again miss your favourite TV or radio programme. The TV or radio will
switch on automatically at the time preset by you and will remain 'on' until the power supply fails or is disconnected.

Clock controlled timer circuit


The circuit uses the AC signals generated at the buzzer terminals of an alarm clock. The AC signals are amplified by
transistors T1 and T2 and the amplified output from the emitter of T2 is fed to the inverting input of negative-voltage
comparator IC LM31 1 (IC1 ). The non-inverting input of IC1 gets a presettable voltage through preset VR1 . The inverting and
non-inverting inputs of LM31 1 are different from other op-amps and it outputs sink current through pin 7 or source current
through pin 1.

FM fiSS jt R* RL1
≤< 1«t
m ittuj
4
(«5«

Jy
f wo
/4
fowoFF
1 I. i-
LECHlÿ.
O
*ÿ
q
WO I"
I-
0 H
L
i

Jr
rr
0V
MTT.
J IM
7
T
! R7
2200
A
0
hJ

[4
[ K1 ca IC2
T 3
T
0.1 J
(. i LM3-11 HEWS o -ÿ

L M
fa M-

1 of 3 1/25/2018, 12:04 AM
Clock Controlled Timer | Detailed Circuit Diagram Available https://electronicsforu.com/electronics-projects/clock-controlled-timer

vm M- i J»VA C
IDK>
PRESET u*. flO-fc
CUB* -1. 7K
BuEEEft 1 4 (J ft
TFR-VirÿAi
wo
® H3 < CJ C4 41 CS RL1-3V
-r tunu
4.1M
3T 1CJQ PlELAV

Clock controlled timer circuit

Circuit operation

When pin 3 of IC1 is at a higher voltage than pin 2, its output sinks as indicated by LED1. This gives a short negative pulse to
the monostable wired around timer NE555. Resistor R5 keeps trigger pin 2 of IC2 high. The short-interval monostable
outputs a high signal for a brief period to the gate of SCR1 (BT169) and relay RL1 energises. The latching action of SCR1
keeps the relay pulled even when the output of the monostable turns low. The relay can be de-energised by disconnecting
the supply to the circuit via switch S1 .

Construction & testing


The circuit works off a 9V battery. Assemble it on a general-purpose PCB and enclose in a suitable cabinet. Provide an AC
outlet in the cabinet to switch on the appliance using the circuit. As mentioned earlier, the input signal is obtained from the
buzzer terminals of the clock. Remove the small buzzer of the clock and connect point 'A' to the positive terminal and point
'B' to the negative terminal of the buzzer. Connect the mains AC terminal outlet to the normally-opened (N/O) contact of

2 of 3 1/25/2018, 12:04 AM
Clock Controlled Timer | Detailed Circuit Diagram Available https://electronicsforu.com/electronics-projects/clock-controlled-timer

relay RL1 . So when the relay energises, 230V AC operates the connected appliance.
0
Set the desired time in the clock by adjusting the alarm set-up and switch on the circuit. When the set time reaches, the
appliance will switch on automatically. The circuit can also be connected to digital clocks.

The article was first published in February 2007 and has recently been updated.

3 of 3 1/25/2018, 12:04 AM
CIRCUIT
IDEAS

AUTOMATIC EMERGENCY LIGHT S.C. DW


IVEDI

 PRIYANK MUDGAL stepped down by transformer X1, rec- former output is fed to the collector of
tified by a full-wave rectifier compris- transistor T1, which provides a fixed

T
his emergency light has the ing diodes D1 and D2, filtered by ca- bias voltage of 6.8V to charge the bat-
following two advantages: pacitor C1 and fed to relay coil RL1. tery. When the battery is fully charged,
1. It turns on automatically The relay energises to connect the bat- the battery voltage becomes equal to
the breakdown voltage

wD1 T1
R1
ZD1
6.8V
of the zener diode
(ZD1). Zener diode ZD1
1N4001 1000 0.5W
BD139 0.5W conducts to provide an
alternative path for the
230V AC g
50Hz C5
o
C5

X1
CO
CO
CO
D2
1N4001
D3
I
1N4001
o
o
CO
co

CO

RL1
N/O

N/C
O

o AA/W
R2
470

current to ground and
battery charging stops.
When mains fails,
relay RL1 de-energises.
0.5W
9V, 1C/0 The battery now gets
X1=230V AC RELAY + V\\ connected to the white
PRIMARY TO C1 +- 6V LED1 LED2 LED3 LED4 LED5 LED6
9V-0-9V, 500mA 100M BATT. LED array (comprising
SECONDARY
TRANSFORMER
25V
I LED1-LED6=WHITE LED
LED1 through LED6)
through current-limit-
ing resistor R2. The
when the mains power fails, so you tery to the charging circuit through its LEDs glow to light up the room. To
need not search it in the dark. normally-opened (N/O) contacts. Free- increase the brightness in your room,
2. Its battery starts charging as soon wheeling diode D3 acts as a spike you can increase the number of white
as the mains resumes. buster for the relay. LEDs after reducing the value of resis-
Operation of the circuit is quite The charging circuit is built around tor R2 and also use a reflector assem-
straightforward. Mains supply is npn transistor BD139 (T1). The trans- bly. 

114 • MARCH 2007 • ELECTRONICS FOR YOU WWW.EFYMAG.COM


CONSTRUCTION

DESIGN YOUR OWN SUNIL K


UMAR

INFRARED REMOTE
 GP CAPT. (RETD) K.C. BHASIN tual key/command/instruction data
have evolved. Early IR command
LOGICAL "1"

M
ost of the home appliances I BURST codes comprised five or six bits of
like TV sets, stereo systems, information, which was adequate to
CD/DVD players/record- encode a set of 32 or 64 key functions
SPACE
ers, air-conditioners, microwave ovens, as simple binary values. With prolif-
multimedia computers and set-top 560 MS-*j 1690 |JS
eration of the remote-controlled de-
boxes come with an IR remote con- 2.25 ms vices, addition of a device address or
trol. system code made it possible to op-
An infrared remote offers several Fig. 1: Logic 1 format erate multiple devices in the same
advantages: room using the same command/in-
1. It is a cost-effective signaling sys- :
schemes to carry struction encoding scheme. For ex-
LOGICAL "0"
tem. BURST the data content. ample, if we have five address or sys-
2. Unlike radio-frequency-based 3. Although tem bits and six command bits, we
control devices, it is not subject to any SPACE largely immune to can operate 32 devices using 64 com-
stringent regulation and restriction. electrical or mag- mands for each device, which may
3. It is a line-of-sight system with a ■«-560 (JS 560 ns— netic interference, be used for identical or totally differ-
range of 5 to 10 metres, hence its ra- 1.12 ms - ►! the infrared signal ent functions in each specific device.
diation stays confined to a single room Fig. 2: Logic 0 format is somewhat sub- The NEC format features error
in which it is used. It thus prevents control. It is of primary concern to
interference between units operating prevent false operation rather than
in different rooms even when using correct the wrong operation. In its
identical device address and command most basic format, the transmitter re-
code. ■ 9 ms
peats each IR data frame (explained
9 ms 4.5 ms !
4. A relatively broad modulation !
2.25 ms later) some minimum number of
frequency range is available using in- Fig. 3: Leader format Fig. 4: Repeat format times. The receiver compares the de-
expensive ASICs and components.
5. It is generally insensitive to in-
terference from external electrical or
magnetic fields.
6. It offers relatively high energy 58.5 to 76.5 ms
1 I
108 ms 108 ms
efficiency, which enhances the battery
life.

*
7. Infrared emitters and detectors 1001101010011010 01 1 0100001101000
are inexpensive and readily available.
Limitations are:
1. Line-of-sight propagation be- LSB MSB ■ LSB MSB- LSB MSB; LSB MSB
9 ms ADDRESS ADDRESS COMMAND COMMAND
comes a limitation when you need to 4.5 ms (8-BIT) (8-BIT) (8-BIT) (8-BIT)
control a device from another room. 58.5 to 76.5 ms
2. Infrared is subject to mutual in-
terference from multiple sources in the Fig. 5: Typical NEC transmission (above) and expanded view of first frame (below)
same room as most consumer IR trans-
missions use a wavelength of either ject to interference from sunlight and coded data from two or more con-
880 or 940 nm (corresponding to the other infrared sources as also fluores- secutive frames and ignores the sig-
two commonly available IR-emitting cent lights. nal if they are not identical. Sony, for
LED types). This limitation can be tack- example, uses such an approach in
led by using different sub-carrier fre- Encoding methods its standard IR protocol called ‘SIRCS’
quencies to modulate the light signals Multitudes of different methods/for- (short for ‘Sony infrared control sys-
coupled with different encoding mats/protocols for encoding the ac- tem’). This technique is simple to

96 • MARCH 2007 • ELECTRONICS FOR YOU WWW.EFYMAG.COM


CONSTRUCTION
o PARTS LIST
C3 3V (NEC REMOTE)
+— 47M,
10V
\\ IRLED1
C1
100p
l l C2
100p
R1
330Q R3
2.2 Q
Semiconductors:
IC1 - CD6121 remote Tx 20-pin
R2
455KHz
LED1 1K SMT
HDH
XTAL
CERAMIC
RESORATOR
T1
BC547
T1 - BC548 npn transistor
9 8 11 8 5
IR LED1 - LD271 or equivalent IR
LED
X1 X2 LED VDD DOUT
LED1 - Red LED
0
Resistors (all ¼-watt, ±5% carbon):
tcr
1
7
D7
IJPD6121/CD6121/PT2221/HT6221
CO C1 C2 C3 C4 C5 C6
IC1

C7 R0 R1 R2 R3 AIN
VSS
10
R1
R2
- 330-ohm
- 1-kilo-ohm
K1/00 K1/01 K1/02 K1/03 K1/04 K1/05 K1/06 K1/07 K10 K11 K12 K13 CCS R3 - 2.2-ohm, 0.5W
19 18 17 16 15 14 13 12 1 2 3 4 20 R4, R5, R6 - (100-kilo-ohm)
i

i
—— VWV-o
R4
— •
VvVv-o o— -
CH
■* i
Capacitors:
C1, C2 - 220pF ceramic disk
“VWSr-O O— - -< i C3 - 47µF, 10V electrolytic
A/WWO-O-
i

i
—— vWVo o—
VWV-o o—
-
-
Miscellaneous:
K2, K3, K6
O— - K14, K15,
LÿVWSÿo-o-- ADDRESS = 0076H K19, K28 - Tactile switch (10x10mm)
R4-R6=100K XTAL - 455kHz (2-pin) ceramic
K1 [ K5 [ K9 |K13|K17|K21|K25 PsV- C_CODE1=OOH
resonator
K2|lÿrTKToTKT4?K78TK22TK26
K3 } K7 } K11|K15}K19|K23|K27} K31
B- C_CODE2=76H

Shade Key (Used)


BAT. - 2x1.5V=3V
- 2-cell battery holder
COMMAND CODE
K2 = 01H (INGAIN) - PCB, etc
K3 = 02H (VOL_DN)
6 6 K6 = 05 H (SOURCE)
K14 = 0DH )STDBY) manufacturers.
vwv K15 = 0EH (VOL_UP)
K19 = 12H (SEL)
UNUSED D1 D8
RESISTORS -
D1 D8 = 1 N4148 K28 = 1BH (MUT) NEC-format remotes
The actual data frame is sent only once
(Note. Three linked resistors for achieving address ‘0076H’ and shaded keys for the com-
mand codes as shown in Fig. 6 were used for the ‘Digital Audio Processor’ project published in the NEC format, followed by a se-
in EFY Feb. 2005). The software for that digital audio processor has accordingly been modi- ries of abbreviated repeat signals (9ms
fied and is given in this month’s EFY-CD. Parts list and PCB details are given in this article.) burst, followed by 2.25ms space ter-
Fig. 6: A complete schematic of NEC remote employing 32 keys minated with 560µs burst) after every
108 ms for as long as the key remains
pressed. Since the repeat frame signal
C0 C, c2 C3 C4 C5 C6 C Co C, C2 C3 C4 C5 Ce C, Do D, D2 D3 D. D5 D6 D7 D0 D, D2 D3 D4 D5 D6 D7
II ii n II II n II II consists of only a short ‘blip’ instead
Co C, c2 C3 C4 C5 Ce C. of the whole data frame, a key held
or or or or or or or or
Co C, C2 C3 C4 C5 C6 C7 down for a long period uses less en-
4 4 >4 > 4 >4 >
LEADER CODE
LSB MSB LSB MSB LSB MSB LSB MSB ergy than in many other encoding
ADDRESS CODE ADDRESS CODE DATA CODE DATA CODE schemes.
HIGHER 8-BIT LOWER 8-BIT
The advantage of this approach is
Fig. 7: Format of remote modulated output from pin 5 of encoder IC conservation of battery power. How-
ever, if the receiver misses the first
implement and quite reliable. other encoding schemes include built- frame for any reason, no recovery is
Another popular solution is to send in redundancy to facilitate error check- possible as the subsequent signal
both the command value and its in- ing without the use of any added data pulses are devoid of any data. The
verse. The receiver then compares the field. key has to be released and pressed
two halves of the received data and Majority of the Asian manufactur- again before anything happens. Also,
ignores the command if they are not ers such as Pioneer, Onkyo, Akai, error detection in this approach re-
complement of each other. NEC uses Canon, Goldstar, Hitachi, Kenwood, quires use of data field and inverse
such a format. NEC, Teac and Yamaha use NEC data field.
The third method makes use of a format. Exceptions are Sony, Sharp,
checksum, which generally results in Toshiba and Philips. In this article, Features of NEC format
a more compact frame size than send- we shall focus on NEC and Philips 1. 8-bit long addresses and 8-bit long
ing the data and its inverse. This, how- RC5 formats, which are more commands are transmitted twice—
ever, requires a more complex re- commonly used. For both of these however, the second (lower-order) ad-
ceiver-decoding algorithm. This format formats, dedicated encoder chips dress byte is not necessarily an exact
is used by General Instruments. Some are available from a number of complement of the first (higher-or-

98 • MARCH 2007 • ELECTRONICS FOR YOU WWW.EFYMAG.COM


I

CONSTRUCTION
connected to CCS pin 20 via diode),
Soldering the Small SMT Parts the corresponding bit is ‘0.’ If it is con-
To solder small SMT parts such as resistors, capacitors, inductors, transistors and nected to CCS pin 20 via diode, the
ICs, proceed as follows: corresponding bit is ‘1.’
1. Add a small amount of flux to the area and add a small amount of the solder to Lower 8-bit address. Lower eight
one pad.
bits will be the complement of higher
2. Pick up the component using tweezers, ensuring that the component is horizontal.
Alternatively, just move the component until it is close to the final position. eight bits unless the corresponding
3. Whilst holding the component with your tweezers, melt the solder on the pad and line is pulled to Vcc. Else, those par-
put the component into position. ticular bits will have the same logic
4. Remove the iron but continue holding the component until the solder solidifies. value as their higher 8-bit address
Check to see that the component is sitting flat on the PCB. If not, re-melt the counterpart.
solder whilst pushing gently on top of the component with tweezers. Example. Assume that the device
5. Solder the other side of the component. Re-melt the first solder joint and let it address is ‘8435H,’ where ’84H’ is the
solidify. higher 8-bit address and ’35H’ is the
6. Check your work under magnification. The joint should be shining and concave. If lower 8-bit address.
you added too much solder, wick up with a small solder wick and try again.
’84H’ in binary is ‘0010 0001’ (read
it from right to left). It transpires that
der) address byte, while the second The gap is minimum 32 ms and maxi- column lines C7 and C2 (pins 12 and
command byte is a true complement mum 49.5 ms (Fig. 5). 17) need to be made ‘1’ using diodes
of the first command byte. Thus a A number of manufacturers make between these two pins and CCS pin
total of 64k (216) addresses and 256 compatible ASICs for NEC-format 20 (cathodes facing pin 20).
(28) commands are possible. (Note. code transmission (µPD6121, CD6121, Now examine the lower 8-bit ad-
The LSB of the bit pattern is trans- PT2221 and HT6221, all equivalent to dress corresponding to ’35H’ or ‘1010
mitted first, followed by higher-or- each other) by employing minimal ex- 1100’ (read it from right to left). Com-
der bits.) ternal components. These ICs allow se- pare it with the higher eight bits (0010
2. Pulse-distance modulation lection of up to 65,536 device addresses 0001). We observe that bits C0, C4, C5
scheme is employed. (also, called custom-codes) through the and C7 are complementary, while bits
3. To improve noise rejection, use of external diodes and resistors C1, C2, C3 and C6 are identical (not to
the pulses are modulated at a carrier and 32 command codes (expandable be complemented). Hence pull up the
frequency of 38 kHz, so the IR re- to 64 commands through SEL pin). A pins corresponding to bits C1, C2, C3
ceiver module chosen for the recep- complete schematic employing 32 keys and C6 (pins 18, 17, 16 and 13) to Vcc
tion should have an optimum re- is shown in Fig. 6. via 100-kilo-ohm resistors.
sponse frequency of 38 kHz. (The The shaded keys, linked resistors 8-bit command (also called ‘data’).
38kHz modulated pulse is termed here and bold lines indicate the compo- With D7/SEL (pin 7) shorted to Vcc,
as ‘burst.’) nents, keys, etc used for the remote the most significant bit (MSB) of the
4. Logic-’1’ bit time (Fig. 1) is 2.25 of digital audio processor (published command is set to ‘0.’ The command
ms (i.e., burst period of 560µs + space/ in EFY Feb. 2005). These fix the code (and its complement) is automati-
rest period of 1690 µs). address output as ‘0076H,’ while cally generated (along with leader and
5. Logic-’0’ bit time (Fig. 2) is 1.12 command codes used for the project address code, as already set) when a
ms (i.e., burst period of 560µs + space/ are given in the box inside the sche- row (R0 through R3) is momentarily
rest period of 560 µs). matic. shorted to the respective column lines
6. Leader code preceding the ad- Determining the output code. It is C0 through C7 using switches/keys
dress field comprises 9ms burst fol- necessary to configure the circuit to marked K1 through K32.
lowed by 4.5ms space during data output code corresponding to any of The command code is ‘1’ less than
frame as shown in Fig. 3 or a 9ms the possible 65,535 addresses and any the key No., i.e., K1, when pressed,
burst followed by 2.25ms space fol- of the first 32 commands (000000b generates decimal ‘0,’ while K32 will
lowed by 560µs burst during a repeat through 011111b, i.e., decimal ‘0’ generate decimal ‘31’ (11111000b, read
frame as shown in Fig. 4. through ‘31’) or next 32 commands from right to left) or ‘1FH.’ You can
The data frame comprises leader (100000b through 111111, i.e., decimal similarly find out the command/data
code, address, address, command and ‘32’ through ‘63’). code generated by other keys. If you
command bits and an additional 560µs short D7/SEL (pin 7) to ground, add
burst. The data frame length is vari- Fixing the address output decimal ‘128’ (80H) to the code gener-
able between 58.5 and 76.5 ms depend- (refer Fig. 7) ated otherwise.
ing upon the number of logic-0 and Higher 8-bit address. Column lines C0
logic-1 bits contained in a frame and through C7 (pins 19 through 12) de- Circuit description
so also is the gap length between the termine the corresponding bit value. Part of the circuit for generation of ad-
last command bit and repetition frame. If a column line is left open (i.e., not dress and command signals has al-

100 • MARCH 2007 • ELECTRONICS FOR YOU WWW.EFYMAG.COM


CONSTRUCTION
PARTS LIST
o o (PHILIPS RC-5 REMOTE)

m
EFY/MARCH-Q7/NEC-REM0T Semiconductors:
IC1 - SC3010 RC5 encoder
T1 - BC548 npn transistor
IR LED1 - LD271 or equivalent
I Resistors (all ¼-watt, ±5% carbon):
R1 - 1-kilo-ohm
IA O MCI
CD6121 R2 - 2.2-ohm, 0.5W

SjS
R3 - 1-kilo-ohm
Capacitors:
C1 - 47µF, 10V electrolytic
Miscellaneous:
XTAL - 455kHz ceramic
o o resonator
- 2-pin male/female
Fig. 8: Actual-size, single-side PCB layout for remote control digital audio processor
connector for battery
- Two-cell (pencil) holder
- 3-pin SIP connector (M)
EFY/MARCH-07/NEC-REM0T 3U + with shorting link
O MUTE
NOTE. FOR USE UIITH MODIFIED PROGRAM
IC1 < SMT) TO BE SOLDERED ON TRACK SIDE. §5s O - 25×10mm tactile
switches (N/O type)
47U/10U
g-00M\S0-H0flAM\Y13 220P|O 0||0 O 220P - PCB
02 01 +
o oy

---
UOL+ L- o o
03

f■o 1
40
■■
#-
H<3t- -
-O1
L XTAL
455KHz
2. 2E, 0. 5U
R3 TABLE I
| SELECT | 1
1111111111° O T

fI £§3
IK BC548 Systems and Their
IC1 oÿÿ-o
CD6121 LED1 Address Numbers (5-bit)
SOURCE IN-GAIN
a TTTTTTTTTT % System address Equipment
n (in decimal)
S/BY v
S>§ m\ o \o\ o
0 TV set 1
£353 cr< o cr/ CD
1 TV set 2

o o 2
3
Videotext
Expansion for TV 1 and 2
Fig. 9: Component layout of remote control PCB 4 Laser video player
5 Video recorder 1 (VCR 1)
ready been explained in the preceding nent layout in Fig. 9.
6 Video recorder 2 (VCR 2)
paragraphs. IC1 can operate off a 2V-
Philips’ RC5-format remote 7 Reserved
3.3V battery (two cells of 1.5V each).
8 SAT 1
The carrier frequency is determined by The RC5 code (known as ‘biphase’
9 Expansion for VCR 1 or 2
the frequency of the crystal/ceramic code) comprises 14 serial bits as fol-
10 SAT 2
resonator connected across pins 8 and lows: two start bits, one toggle bit
11 Reserved
9. It is one-twelfth of the frequency of (which changes every time a new but-
12 CD video
the crystal/resonator. With a 455kHz ton is pressed on the remote), five ad-
13 Reserved
resonator, the carrier frequency is ap- dress bits as the system/device ad-
14 CD photo
proximately 38 kHz. dress and six command/instruction/
15 Reserved
CCS (pin 20) is custom-code-select data bits for the pressed key. This
16 Audio preamplifier 1
(or device-address-select) input pin. frame of 14 serial bits is repeated only
17 Receiver/tuner
Pin 11 is the lamp/LED output, which once after a time interval of 88.9 ms
goes low when any key is pressed. The (i.e. duration of 50 bits), while a com- 18 Tape/cassete recorder
modulated output is available at mand key on the remote remains 19 Audio preamplifier2
DOUT pin 5, which is used for driv- pressed. 20 CD
ing an IR LED for transmission of the In the biphase modulation tech- 21 Audio rack
modulated output in the form of IR nique, every bit consists of two parts, 22 Audio SAT receiver
signals. which are never the same. So a bit is 23 DCC recorder
An actual-size, single-side PCB lay- always a high-to-low or a low-to-high 24 Reserved
out for remote control of the digital transition (or phase change), which 25 Reserved
audio processor published in EFY Feb. occurs exactly in the middle of the 26 Writable CD
2005 is shown in Fig. 8 and its compo- bit-time. 26-31 Reserved

102 • MARCH 2007 • ELECTRONICS FOR YOU WWW.EFYMAG.COM


CONSTRUCTION
TABLE II
Sumdara PhAps iDatar Wo*iS i r
JiiJK mkui-.n ii 5t#f
E5-3
Commands and Functions ) « B. Wfcm

(6-bit) I r ! D u 11 3 n m
Command Description of function
(in decimal)
0-9 Numeric keys 0-9 I-: J ah A trrvi and
12 Standby
hi
“Sr E ■; J T it

13 Mute > ■ *W -.-4 IB MrtMi* d ■ jktt +- ■i


14 Presets F**ig (FfTrl art net m Ptfr K4tf
16 Volume up ixrrm
I.TTttufl ■ 1 13 7ÿ m&m
bJStht «
17 Volume down
18 Brightness + Sfractw

U'l ■» i.i "I; n n,-,ÿ.

19 Brightness –
20 Colour saturation +
21 Colour saturation –
UMl
DfW ’Q*T
1 I ;i
RulHrtO w™
_
j
can Aciasw Hr f-.jf crfttfti
i

22 Bass up 3* items Cytfa rtnv far ward rapaa r *


23 Bass down
24 Treble +
25 Treble – ►
26 Balance right
27 Balance left *iHrei 3&Mf tamer frequency F«f* «H MJ lifife
48 Pause
50 Fast reverse Fig. 10: The time relationship and typical bit pattern conforming to standard Philips RC5 protocol
52 Fast forward –
53 Play
54 Stop TABLE III
55 Record Pin Signals/Functions of IC SC3010
63 System select
Pin no. Symbol I/O Description Note
71 Dim local display
77 Linear function (+) 1 K17 IP Key-sense input pin
78 Linear function (–) 2 SMS I System-mode-selection input pin
80 Step up 3-6 C0-C3 IP Key-sense input pins
81 Step down 7 MDOUT O Generated output data pin modulated with
82 Menu on 1/12 oscillator frequency at a 25 per cent IP = Input with p-channel
83 Menu off duty factor pull-up transistor
84 Display A/V sys status 8 DOUT O Generated output data pin
85 Step left OD = Output with open
9-13 KO7-KO3 OD Scan driver pins
drain n-channel transistor
86 Step right 14 VSS Power Negative power supply
87 Acknowledge 15-17 KO2-KO0 OD Scan driver pins
88 Pip on/off 18 OSC I Oscillator input pin
89 Pip shift
19 T2 I Test pin 2
90 Pip main swap
20 T1 I Test pin 1
91 Strobe on/off
21-27 KI0-KI6 IP Key-sense input pins
92 Multi strobe
93 Main frozen 28 VDD Power Positve power supply
94 3/9 multi scan
95 Pip select In RC5 code,
ONE CODE
96 Mosaic multi pip h* MSB
> ‘1’ represents a
LSB MSB LSB
97 Picture DNR low-to-high
98 Main stored
99 Pip strobe
4
DEBOUNCE TIME SCAN START

►H ►k>K
SYSTEM BITS
■N4
COMMAND BITS
> transition and ‘0’
represents a
100 Recall main picture (16-BIT TIME) TIME BIT
(2-BIT TIME) CONTROL high-to-low
101 Pip freeze BIT
transition. For all
102 Pip step up
103 Pip step down the bits, the most
FIRST CODE SECOND CODE
significant bit is
118 Sub mode REPETITION TIME
119 Options bus mode
4 > transmitted first.
123 Connect WHERE: DEBOUNCE TIME+SCAN TIME = 18 BIT-TIMES, REPETITION TIME = 4x16 BIT-TIMES The duration of
124 Disconnect Fig. 11: Data output format each bit is 1.778

104 • MARCH 2007 • ELECTRONICS FOR YOU WWW.EFYMAG.COM


CONSTRUCTION
from Philips, SC3010 from Silan
+J- C1 0 3V COMMAND
Semiconductors, PT2210 from
'"T* 47JJ SELECTION Princeton Technology, SL3010
-="10V
SWITCHES
SYSTEM SMS
28
VDD (0 TO 63) from System Logic Semiconduc-
1
R2
SELECTION
SWITCHES
K17
27 56
O 2* tor, etc).
2.2Q (1 TO 32) K16 With five bits used for sys-
10 26
3 i ►
*+- CO K15
// 4 IC1 25 41 tem/address selection, you
IRLED1 C1 K14 — ■ ■
O
5 SC3010 24 32 33 34 36 38 may select/address 32 different
C2 K13 O
30 systems. System addresses

a
R3 6 23
C3 K12 -
1K 16 17
A/WV
7
MDOUT K11
22
IHHI — have been standardised for
8 9 10 12 13 14 15
T1 8 DOUT K10
21
— identifying specific equipment
BC548 9 20 0 1 2 3 4 5 6 7
i >ÿ
K07 TEST2 types (refer Table I). With next
10 19 R1
K06 TEST1 455KHz six bits used for key commands/
11
i > K05 OSC data, it is possible to have a
12 17 XTAL
K04 KOO
13 16 set of 64 different commands
K03 KOI
14 for each of the 32 systems. There
VSS K02 15
is also a possibility of using
up to 128 commands. This is
achieved by assigning the second
start bit a value of ‘0’ (rather
than ‘1’). Thus when the second
bit is ‘0,’ ‘64’ is added to the
Fig. 12: Circuit of RC-5 encoder for selecting 1 of 32 system and 64 commands command value defined by six
command bits.
Typical command values (in deci-
SYSTEM ADDRESS IC1 TABLE IV
I mal) are shown in Table II. Most of
SELECTION SC3010
Remote Command Codes the available RC5 encoder chips can
TV1<— >TV2 3
17 Button Command Function (as used) be used for 64 commands only as both
ADDR0 ADDR1 KOO
o
_ I
CO
K01 I— 0-9 0-9 Number keys
start bits are preprogrammed to a
value of ‘1.’
I ‘—’ 10 10+
As soon as the encoder IC senses
‘Sfx’ 36 20+
depression of a key, key debounce time
Mute 13 Delete task
Fig. 13: Selection of TV1 or TV2 using
(=16-bit duration =28.448 ms) starts.
AC 34 Clear the prog. memory
shorting link This is followed by scan time (=2-bit
PWR 12 Change the password
duration=3.556 ms) and then the
Timer 38 Change the time
ms (with the actual code consisting of 14 bits
Search 30 Change the existing tasks
56 change in starts. On completion of the first code
CH+ 32 See the next task
phase occur- frame of 14 bits, there is a gap of 88.889
ring at 0.889 CH- 33 See the previous task ms and then the 14-bit code repeats.
41
ms), and the RCL 15 Toggle the LCD backlight The data output format is shown in
32 33 34 36 3i PP 14 Enter a new task
total time of Fig. 11.
30 Store 41 Toggle the child lock
a full RC5 Most of the RC5 encoder chips
16117 Volume+ 16 Increase the value
code, i.e., as mentioned above are available
8T 9T101 12T1 3|14|15 frame pe- Volume– 17 Decrease the value in 28-pin surface-mount packages.
0T 1T 2T 3| 4T 5| 6T 7 riod, is TV/AV 56 Confirmation Pin signals/functions are shown in
24.892 ms Table III.
Fig. 14: Command switches
used for RTC-interfaced (14x1.778 bit patterns are shown in Fig. 10. For
multiple device control ms). The neatness, only the envelope is shown, Circuit description
space (rest while the carrier frequency of 36 kHz Fig. 12 shows the circuit of RC-5 en-
period) between the end of the with 50% duty cycle is separately coder for selecting one of 32 system
preceding frame and the start of shown in the right-hand corner at the addresses (using shorting link, rather
the next frame equals the duration botttom. There are 24 pulses of 36 kHz than a tactile switch). For system se-
of 50 bits or 88.9 ms. Repetition pe- during the ‘on’ period (0.889 ms) of lection, scan-driver pins 17, 16, 15, 13,
riod is equal to frame period plus any bit. 12, 11, 10 and 9 for scan lines KO0
space period, which thus equals In the market, you can easily through KO7, respectively) need to be
113.792 ms. find RC5-compatible chips from connected to key-sense inputs C0
The time relationship and typical a number of manufacturers (SAA3010 through C3 (terminating at pins 3

106 • MARCH 2007 • ELECTRONICS FOR YOU WWW.EFYMAG.COM


CONSTRUCTION

o o o
o
© o o o oo

Woiiÿi o o

.Af •“ 1ytl(J1

XES >o e

Fig. 15: PCB layout of RC5 remote for RTC-interfaced microcontroller for multiple device control

EFY/MARCH-07/SUNIL/RC-5 REMOTE
FOR USE UITH RTC INTERFACED
DEUICE CONTROL
O 0
Jii J10 0 J8
J9

4 'vfeS _ O _ _ 9_ _ » o aaÿ ac—i2_o


SPACE FOR

BATTERIES

% lliSill
_ _

CO1
IS)
n
co n
o
J3
©
1.5UX2

1
Q
EJH 9 455KHz9j>nnN-RAT

TU 2
SYS. SELECT 1
tu
3U +
NOTE. SOLDER IC1 ON TRACK-SIDE TUI OR TU2
USE SHORTING JUMPER TO SELECT

Fig. 16: Component layout for the PCB shown in Fig. 15

through 6), respectively (only one at a (decimal) for any specific system (se- 455kHz resonator via a 1-kilo-ohm re-
time). lected as described above) can be se- sistor, while the other end of the reso-
Fig. 13 shows a shorting-link ar- lected by pressing respective push- nator is grounded.
rangement enabling selection of either switches marked ‘0’ through ‘63’ (i.e., System-mode-select (input pin 2)
TV1 (system address ‘0’) or TV2 (sys- command number + 1). is to be held low (connected to
tem address ‘1’). The system address Once a system is selected and a ground) when the encoder is used
(decimal), as shown in Table II, equals command key is momentarily pressed, for combined system operation,
the address represented by each dot 14 bits of the code word modulates a whereas for a single-system selection
in the circuit. 38kHz carrier generated within IC pin 2 is to be connected to Vcc. Fig.
Similarly, for command selection, SC3010 and the modulated output is 12 shows selection of the single-
scan-driver pins 17, 16, 15, 13, 12, 11, available at pin 7 (labeled as system mode.
10 and 9 for scan lines KO0 through ‘MDOUT’). The output signal MDOUT The device will immediately reset
KO7, respectively, need to be momen- transmits the generated information under the following conditions:
tarily connected to key-sense input modulated by one-twelfth of the oscil- 1. A key is released during the
pins 21 through 27 and 1 representing lator frequency with a 50% duty cycle. debounce time.
sense lines KI0 through KI7, respec- This output is used to drive IR LED1 2. A key is released between two
tively, one at a time (for one system). via transistor T1. A single OSC input codes.
Command numbers ‘0’ through ‘63’ pin 18 is used for connecting the 3. During matrix scanning:

108 • MARCH 2007 • ELECTRONICS FOR YOU WWW.EFYMAG.COM


CONSTRUCTION
1. A key is released while one of the driver outputs
is in the low ohmic state (logic 0).
2. A key is released before that key has been de-
tected.

Few of the 3. There is no wired connection in the C-KO matrix


when pin 2 is high.
(Note. Although 36kHz carrier frequency has been
mentioned in the RC-5 format, but for that you have

topics that to use a 432kHz resonator. Since the 432kHz resona-


tor is not commonly available, we have used a 455kHz
resonator to get a carrier frequency of 38 kHz as in the
case of the NEC remote.)

we have Example. Let us design an IR remote for the


‘RTC-interfaced Multiple Device Control’ project
published in Sept. 2006 issue of EFY, which requires
a Philips’ RC5-code compatible remote controller for

already programming the RTC chip DS12887 used in that


project. Command switches used for RTC-interfaced
multiple-device control are separately shown in Fig.

covered...
14 (Note. Three additional command switches for
functions Volume+ (code 16), Volume—(code 17) and
TV/AV (code 56) have been added to enhance its
application for some other projects, which may be
published in EFY in due course). The actual
command No. (decimal) is the same as the switch/
• How to Make Diskless PCs key number. The first 22 command numbers are the
same as used by author as per Table IV of the project.
You can easily correlate command numbers (decimal)
• How to Setup a Web Server of Table IV to switch numbers shown by red dots in
Figs. 12 and 14. That makes designing the circuit
• A Fully-fledged Email Server really easy.
For system selection, simply short pin 17 to
pin 3 as the author has configured the project to
recognise TV1 system commands only. An additional
provision can be made for selection of TV2 system

0 Read
as well.
The system-selection arrangement is shown in Fig.
13, which makes use of a shorting link to select either
TV1 or TV2 system. The identical system-selection ar-

LINUX For You rangement is also shown by using switches marked


‘1’ (address ‘0’ for TV1) and 2 (address ‘1’ for TV2), as
per Table I. These two switch dots are shown in differ-
For more info, log on to: ent colour in Fig. 12. (Note that the system address is

wwwo HBmoow ffiMrWo (stsaw equal to the switch No.–1.)


The PCB designed for the example project shows the
command code as well as the function in the screen
ASIA’S FIRST overlay.
Caution. IC1 is a surface-mount device and it
LINUX is to be mounted on the track-side itself after
MAGAZINE proper alignment of pins. For soldering the surface-

IN’
mount IC, strictly follow the instructions in the box.

UNUXFMYQU This caution applies to the previous PCB of NEC re-


mote as well.
The PCB for the example remote is shown in Fig.
15 and its component layout in Fig. 16. Ready-made
PCBs for both the projects are available with
Kits‘n’Spares. 

110 • MARCH 2007 • ELECTRONICS FOR YOU WWW.EFYMAG.COM


CIRCUIT
IDEAS

DIGITAL THERMOMETER S.C. DW


IVEDI

 RAJ K. GORKHALI a temperature coefficient of about dip the sensor caps such that it is sur-
–2 mV/ºC, i.e., the junction voltage rounded by ice from all the sides.)

H
ere is a simple but attractive reduces by 2 mV for every ºC rise in Now adjust potentiometer VR1 such
digital thermometer that can temperature. The base-collector junc- that the display shows ‘000.0.’
read up to 200ºC. The circuit tion of the transistor has been biased 2. Now dip the sensor transis-

a
1000 +5V 100’S 10’S 1’S
DIS-4 DIS-3 DIS-2 DIS-1
IH
C1
3 a 3 a 3 a 3 0.1n
V+ R3 R2 R4
COM COM COM COM 100K 20K 27K

J f
b

2
d
f
b

2
d
f
b2
4
d
c
b
D1
C1
B1
2
3
1 34 33

40

I.
6 4
b c a A1 39
6 4 5
f F1 R1
9 6 100K
10 6,4 4 10 7 1 9 10 1 9 7 6 5 1 10 IC1 38
c g a e g e f a b dp e g G1 ICL7107 C2
Poi b, c f 7 100p SCALE
E1 ADJ ZERO
8 ADJ

f
D2 REF HI VR2 VR1
9 36 ► 10K 10K
C2
10 REFLO
B2 35
11
A2
12 IN HI
F2 31
13
E2 ANALOGUE
14
G2 COM
25 32
D3
15
B3
16 IN LO
F3 30 <>
17
E3
18
A3
23
26
V- — 5V
G3 SENSOR
22
C3
24
AB4
19
POL INT
20 27 T1 SHIELDED
21 29 28 2N2222/ CABLE
BC548
DIS1-DIS4 = LTS542 COMMON ANODE SEVEN SEGMENT DISPLAY R6 GND A/Z BUFF
330Q
__C3 R5 “C4
GND 47K 0.22ÿ
0.47ÿ
o

is built around a transistor acting as a here through resistor R4. tor in boiling hot water and adjust po-
temperature sensor and a single-chip The voltage drop at the base-emit- tentiometer VR2 such that the display
analogue-to-digital converter (ADC) ter junction of the transistor varies with shows ‘100.0.’
cum 3½-digit LED driver IC L7107. It the increase in temperature. It varies After calibration, the thermometer
can be optimised and calibrated for an as much as 200 mV over the tempera- is ready for temperature measurement.
accuracy of ±0.1ºC, with an operating ture range of 0ºC to 100ºC. This junc- Note. Before adjusting potentiom-
range of –25ºC to 125ºC. tion-voltage variation is converted into eters VR1 and VR2, dip the sensor tran-
At the heart of the circuit is IC a digital display. sistor in ice-cold or boiling water for
L7107 (IC1), which directly drives the After assembling the circuit on a 10 to 20 seconds to stablise the tem-
3½-digit LCD. Transistor 2N2222 (or general-purpose PCB board, enclose it perature reading.
transistor BC548) acts as the tempera- in a cabinet. To calibrate the thermom- Temperature values of 0°C for ice
ture sensor, provided its collector ter- eter, connect the sensor through a and 100°C for boiling water have been
minal is shorted to the base terminal shielded cable and proceeed as follows: arbitrarily chosen to simplify the de-
to make it a two-terminal device. 1. Place the sensor transistor scription. Actual values will depend
The basis for temperature measure- (avoid shorting of the base and the on the atmospheric pressure and tem-
ment is the fact that the base-emitter emitter) in the ice-cold water. (Put four perature of the place where you are
junction voltage of a transistor has or five cubes of ice in a container and calibrating. 

WWW.EFYMAG.COM ELECTRONICS FOR YOU • MARCH 2007 • 113


I I

CIRCUIT
IDEAS

1
5-BAND GRAPHIC EQUALISER
m SOMEN GHOSH bandwidth product greater than 3 plifier. Proper quality factor (Q) needs
MHz. The NE5532 or LM833 used in to be selected to avoid overlap in ad¬

T his equaliser uses low-cost


op-amps. Good-quality op-
amps powered by a single volt¬
age supply are readily available in the
this circuit meets these requirements.
Equaliser circuits typically divide
the audio spectrum into separate fre¬
quency bands and have independent
jacent bands as this introduces
colouration into the audio signal.
We have used the multiple-feed-
back bandpass filter topology shown
market. The op-amp should have a gain control for each band. The out¬ in left-most comer at the bottom of the
noise density of less than 24nV/VHz, put of each band is mixed at IC4(A) figure. This is a circuit for single-chan¬
slew rate of more than 5V/ps and gain- and then fed to an audio power am¬ nel bandpass filter. If the capacitors are

&
+12V
C20 C21 G22 _L
0.1 U 0.1 M 0.1(1
R7
47K
R2B
C3 04 R10 10K
i+
8 R8 10M R9
0.1|J 91K
C6
AAAAr
C1 < R3 100Q 35V 11K
10u
1 2 8 R12 10M VR1
35V 47K
35V < 3 +1 1
100Q

>
C5 R30

±
+ 1C1(A) R11
R1 4 27K 0.1M 100fl
100K IC2(A)
R6
47K 3
AUDIO
INPUT
C7 R13
R2 + m R14 0.1M 22K
C9
100K -T-C2 <47K 2.7K
< -VSAATH -1
6 R16 10M
35V
VR2
100M 7 100Q 4.7K
C19 +
i 6V R5
47K
R15
C8
0.1M 5
1OM
35V
±;
6.3K
1C 2(B)

IC1(A)=LM833
IC2(A+B)=L M833 C10 R17
R18 0.047M 11 K
IC3(A+ B)=L M833 C12
1.5K 2 1°M
IC4(A+ B)=L MB33 R20 VR3
•VAV -1 I 1
100Q 35V 4.7K AUDIO
R19
C11 OUTPUT
3.3K 0.047M +l TO
IC3(A) POWER
AMPLIFIER
C23 o
0.1 M
C13 R21
MULTIPLE-FEEDBACK R22 0.0022M 63K
BANDPASS FILTER C15
7.5K 6 1°M VR4
8 R24
100Q 35V 4.7K
C14 (
C R23 0.0022M T "
Vi
O-AVWÿH
Ra ,C
Rc 18K
fh 1C3(B)

Rb Vo
C16 R25
R26 0.0022M 15K
C18

Ty~
2K 1°M VR5
R28
100£2 35V 47K
C17
R27
43K 0.0022M
C24 -L
0.1 M
GND
O- i

WWW.EFYMAG.COM ELECTRONICS FOR YOU • MAY 2007 • 87

I I
CIRCUIT
IDEAS
Component Values for 5-band Equaliser amplifier with a gain of '2/ The input
signal is divided by '2' by the resistive
Centre C Ra Rb Rc Gain (A) Quality (Q) network comprising R3 and R4. Hence
frequency (pF) (kilo- (kilo- (kilo-
the net gain of this amplifier is unity.
fo (Hr) ohms) ohms) ohms)
Two 100k resistors (R1 and R2) are
60 C4=C5=0.1 R9=11 R11=27 R10=91 4.1 1.7 used as a voltage divider and the junc¬
250 C7=C8=0.1 R14=2.7 R15=6.3 R13=22 4.1 1.7 tion voltage is fed to its
1000 C10=C11=0.047 R18=1.5 R19=3.3 R17=11 3.7 1.6 positive input through R6. This
4000 C13=C14=0.0022 R22=7.5 R23=18 R21=63 4.2 1.7 divider has enough power to feed all
16000 C16=C17=0.0022 R26=2 R27M.3 R25=15 4.2 1.7 other op-amps directly. Resistor Ro
(R8=R12=R16=R20=R24=R28=R30=100£2)
of the same value, the calculations are the octave division, application and has the dual function of noise reduc¬
fairly simple. For calculating the com¬ some degree of manufacturers' prefer¬ tion and resistive isolation of capaci¬
ponent values, use the following for¬ ence, but nearly all share the basic oc¬ tive load. It may be varied between 50
mulae: tave boundaries that are based on a and 150 ohms depending on the noise
Centre frequency (fo) : l/2nCV(Ra I IRb)Rc centre frequency of 1000 Hz. in the circuit.
Bandwidth (B) : 1/jiCRc A balance between the number of The potmeters (VR1 through VR5)
Quality factor (Q) : fo/B = JifoCRc filters and bandwidth need to be ob¬ are in the signal path and hence should
Gain (A) : -Rc/2Ra served. It is possible to use a wider be of the best quality possible. Wrap
These can be combined to give the bandwidth and fewer filters, or nar¬ the body of the pots with bare copper
following formulae: rower bandwidth and more filters. wire and solder the other end of the
Ra = Q/MoAC Anything narrower than 1/3 octave is wire to ground. Since the filters are
Rb = Q/2nfoC (2Q2-A) rare, since the complexity of the filters very sensitive, all resistances should
Rc = Q/iifoC increases for higher values of 'Q/ This be metal-film type and the capacitors
Begin the calculations by choosing can get rather expensive and in reality should be polyester type.
a large value of capacitance (~0.1F) and is of limited use for most applications Each stage of the op-amp needs to
smaller value of resistances. Increasing in audio systems. be capacitively coupled to the next
the capacitance decreases resistances National Semiconductor lists the stage so that the DC does not get
(Ra, Rb and Rc). Care must be taken to following mid-frequencies for a 10- propagated and amplified. For a good
avoid overloading on the input buffer band graphic equaliser: 32, 64, 125, 250, low-frequency response, this coupling
op-amp. Note that stray capacitances 500, lk, 2k, 4k, 8k and 16k. It also rec¬ capacitor should be greater than 1 pF.
on the board reduces the value of 'C.' ommends a 'Q' of 1.7 for equalisers. A lOpF, 16V capacitor is used in each
The bandwidth and gain do not de¬ The table lists the component val¬ stage of the circuit here.
pend on Rb. Hence, Rb can be used to ues for different centre frequencies of The circuit is powered by a 12V
modify the mid-frequency without af¬ the equaliser. We used 'Q' of 1.7 and DC regulated supply. A well-regulated
fecting the bandwidth and gain. gain (A) of 4. supply using 7812 is recommended.
For equalisers, there are standard The circuit for the 5-band equaliser Ground the Vcc pin of each op-amp
mid -frequencies that are normally uses IC1 (A) LM833 as the buffer stage with a 0.1pF ceramic disk capacitor to
used. The exact frequencies depend on for the equaliser. It is a non-inverting bypass the noise. •

88 • MAY 2007 • ELECTRONICS FOR YOU WWW.EFYMAG.COM


CIRCUIT
IDEAS

wired around IC NE555 (IC1).


MAT SWITCH S.C. DW
IVEDI
IC1 outputs a pulse of fifty-seconds
duration with preset values of R4 and
C3. This pulse is applied to the buzzer
through transistor T2. The buzzer
 D. MOHAN KUMAR as the switch. It can be two small sounds a warning beep on
pieces of conductive pads usually used unauthorised entry. The pulse dura-

T
his simple circuit produces a to pack sensitive ICs as antistatic cover. tion can be changed to the desired
warning beep when somebody Alternatively, you can make the switch value by changing the values of R4 and
crosses a protected area in your by coating conducting carbon ink on C 3 .
home or office. The switch, hidden be- two small pieces of a copper-clad Resistor R2 in the circuit makes the
low the floor mat, triggers the alarm board. trigger pin of IC1 high to prevent false
when the person walks over it. When the circuit is in standby triggering.
The circuit uses a conductive foam mode, transistor T1 does not conduct, Assemble the circuit on a general-
since its base is purpose PCB and enclose in a plastic
floating. When case. Use a 9V battery to power the
the person circuit. Connect the touchpad switch
+ walks, the switch with the PCB and hide under the mat
R1 R2 R4 PZ1
1K 10K 1M PIEZO
BUZZER is pressed and at the entrance. The PCB can be
R Vcc
current flows mounted on the nearby wall.
4 8
2 7 9V
+ through R1 and Make the switch carefully using
BATT.” the switch to conducting foam or copper clad coated
IC1 6

TOUCH
© T1
BC548
NE555
3
R5
1K

T2
provide positive
bias to transistor
with conducting ink. Place the two
pieces with their conducting surface
PADS
1 5 BC548 T1. Transistor T1 facing each other. Solder carefully a
GND
conducts and its thin copper electric wire and ensure
C1 R3 C2 + C3 collector voltage that it makes contact when the two
o.i M ~r 47[j
1K O.OIM ~r 25V drops, which plates touch together on pressing. Pro-
acts as a negative vide two 1cm rubber tabs between the
trigger input for plates to avoid touch in the standby
the monostable mode. 

92 • MAY 2007 • ELECTRONICS FOR YOU WWW.EFYMAG.COM


CIRCUIT
IDEAS

ANTI-COLLISION REAR LIGHT S.C. DW


IVEDI

 ASHOK K. DOCTOR NAND schmitt trigger CD4093, 8-stage of LEDs flash one by one.
shift-and-store bus register CD4094 All the LEDs will then glow for

D
uring poor visibility, i.e., and some descrete components. some time and switch off for some
when there is fog, or at dawn An oscillator is built around gate A, time, and the cycle will repeat. Input
or dusk, or when your ve- whose frequency can be varied through pins 12 and 13 of the unused gate D
hicle gets stalled on a lonely stretch of preset VR1 when required. The output must be tied to ground and pin 11 left
a highway, this flashing light will pro- of the oscillator is fed to IC1 and IC3. open. Preset VR1 should be of cermet
vide safety and attract the attention of When the circuit is switched on, the type and used to change the flashing
people to help you out. It uses high- oscillator starts oscillating, the counter rate of each group of LEDs.
brightness yellow LEDs. starts counting through IC1 and the The circuit works off regulated
The circuit uses a dual binary data is shifted on positive-going clock 12V. Assemble it on a general-purpose
counter CD4520, quadruple 2-input through IC3. As a result, the four groups PCB and house suitably. 

SPEED D1
12V
VR1 R1 +_ C2 T1 1N4001
500K 100K 220p BC337 R10
—A/W' — vwv— 25 V
AAA/V
R2
LED1 LED2 LED3 LED4 LED5
220Q

10K GND
14 Vcc Oo LAA/W o
2 R3

+
1

C1
O 7
CP
3
16 4

5
Oi
AAA/V
4.7K
T2
BC337
LED6 LED7 LED8 LED9 LED10 R11
220Q
4.7M EO R4
25V 15
IC3 10K
4094 R5
4.7K
16 2 D
1 T3
2
02 BC337

10ÿ LED11 LED12 LED13 LED14 LED15 R12


4 1
8 7
6 A/WV 220Q
STR R6
IC1 5 GND 03 10K
4520 LAAAA'
10 R7
4.7K
6
8

E>
7 8 9 15 T4
9 BC337 R13
LED16 LED17 LED18 LED19 LED20

A/WV 220Q
R8
10K
UVW\rÿ ’

0> IC2(A-D) = CD4093


R9
4.7K LED1-LED20 = YELLOW LED

WWW.EFYMAG.COM ELECTRONICS FOR YOU • JUNE 2007 • 83


CIRCUIT
IDEAS

LIGHT FENCE S.C. DW


IVEDI
LDR1 and preset VR1 form another
potential divider to provide a variable
voltage input to the non-inverting in-
put (pin 3).
 D. MOHAN KUMAR If VR1 is properly adjusted for the
ent day light or fluorescent electric required light level, the output of IC1

T
he basic problem with most of light. The beep generated from the cir- will be high, which drives pnp tran-
standard light sensors is that cuit will be loud enough to detect the sistor T1 out of conduction. This is due
they require precise alignment entry of a person in the room or the to the high potential at the base of T1.
of light beam to mute the circuit dur- protected area being guarded. The emitter voltage of T1 will be high
in this condition, which inhibits
IC2 from oscillation and LED1
from lighting. IC2 is wired as a
R1 R4 R5 R6 S1 monostable timer. R6 and C2 pro-
10K 1K 470Q 1M
7
ON/OFF
SWITCH
vide a preset time delay.
As a person crosses the pro-
LDR1 V\\LED1 tected area, his shadow will be
R Vcc
+ sensed by LDR1 due to change
4 8 9V
6 BATT. T
3
+
7 2 in the light intensity level
T
1C 6
IC2
7 and the voltage at the non-invert-
pA741 T1 ing input of IC1 will drop mo-
R3
BC557
NE555 3
1K O/P
2 4 mentarily. The output of IC1 sud-
+
PZ1 denly becomes low, allowing T1
1*1
i ►
VR1
50K GND
1 5 PIEZO¬
BUZZER to conduct. This triggers the
monostable (IC2) and the alarm
C1 __ + C2
R2
0.01M 10M sounds.
10K 25V
Assemble the circuit on a
common PCB and house in a
plastic case. Keep LDR1 inside a
black tube to increase its sensi-
tivity. Adjust preset VR1
ing standby mode. The circuit de- The circuit uses a voltage compara- until LED1 turns off at the particular
scribed here is so sensitive that it will tor and a monostable timer to give the light level. Keep LDR1 facing
detect a moving person at a distance warning alarm on detecting a moving the entrance of the room or the area
of few metres in daylight or under person. IC µA741 (IC1) is used as a to be protected. Sensitivity of the cir-
electric lighting without cumbersome voltage comparator with two poten- cuit depends on the proper adjust-
alignment of light beam. It requires vir- tial dividers in its inverting and non- ment of VR1. If VR1 is correctly ad-
tually no set up, and may be simply inverting inputs. Resistors R1 and R2 justed, the circuit can detect a moving
placed within the line-of-sight of al- provide half-supply voltage of 4.5 person from a distance of about three
most any light source including ambi- volts to its inverting input (pin 2). metres. 

84 • JUNE 2007 • ELECTRONICS FOR YOU WWW.EFYMAG.COM


CIRCUIT
IDEAS

AUTOMATIC PHASE CHANGER S.C. DW


IVEDI

 MUHAMMAD AJMAL P. The mains power supply phase R


is stepped down by transformer X1 to

I
n three-phase applications, if low deliver 12V, 300 mA, which is recti- As soon as phase-R voltage goes
voltage is available in any one or fied by diode D1 and filtered by ca- below 200V, the voltage at inverting
two phases, and you want your pacitor C1 to produce the operating pin 2 of IC1 goes below reference volt-
equipment to work on normal voltage, voltage for the operational amplifier age of 5.1V, and its output goes low.
this circuit will solve your problem. (IC1). The voltage at inverting pin 2 of As a result, transistor T1 conducts and
However, a proper-rating fuse needs oprational amplifier IC1 is taken from relay RL1 energises and load L1 is
to be used in the input lines (R, Y and the voltage divider circuit of resistor disconnected from phase ‘R’ and
B) of each phase. The circuit provides R1 and preset resistor VR1. VR1 is used connected to phase ‘Y’ through relay
correct voltage in the same power sup- to set the reference voltage according RL2.
ply lines through relays from the other to the requirement. The reference volt- Similarly, the auto phase-change of
phase where correct voltage is avail- age at non-inverting pin 3 is fixed to the remaining two phases, viz, phase
able. Using it you can operate all your 5.1V through zener diode ZD1. ‘Y’ and phase ‘B,’ can be explained.
equipment even when correct voltage Till the supply voltage available in Switch S1 is mains power ‘on’/’off’
is available on a single phase in the phase R is in the range of 200V-230V, switch.

F1-F3=5A FUSE S1
oR
F2 I
oY N
p
F3
qy~b oB u
T
ON

IQQQQOQQOI IQOQOOOQOI lOOQQOOQQl


X1 X2 — X3

IP .-4W001-,
t
D1
C1
1000(J
D2
W D1-D9=1N4007 D3

+
wool

C2
+
C3
▼D4 D5▼

+l.h
C4
Y D6 IC1-IC3 = 741

RL1-RL3 =12V, 1C/0 RELAY

35V 1000M 1000M 1000M


35V 35V 35V T3
BC557

nOl
BC557 BC557
©1
R1 R2 R3 R4 R5 R6 R7 R8 R9
3.3K 3.3K 10K 3.3K' 3.3K 10K 3.3K' 3.3K 10K
Vcc
7 O N/O N/O 7 o N/O
2 O o 2 O 2 o o

+
IC1 6
iD7§ +
IC2 6
D8
C5
+
IC3 6
D9
o
o>
C3

I- i- I-
VR1 3 4 VR2 3 4. N/C VR3 3 4. N/C
10K GND + RL1
10K + RL2
10K
RL3

5 I I
C5~ C6~ C7_ÿ
ZD1 470M ZD2 470M I b
ZD3 470M
5.1V 35V 5.1V 35V 5.1V 35V

X1-X3 = 230V AC PRIMARY TO 12V-0-12V,


300 mA SECONDARY TRANSFORMER 6L1 L2 L3
4 OUTPUT

building. the voltage at inverting pin 2 of IC1 Use relay contacts of proper rating
The circuit is built around a trans- remains high, i.e., more than reference and fuses should be able to take-on
former, comparator, transistor and re- voltage of 5.1V, and its output pin 6 the load when transferred from other
lay. Three identical sets of this circuit, also remains high. As a result, transis- phases. While wiring, assembly and in-
one each for three phases, are used. tor T1 does not conduct, relay RL1 re- stallation of the circuit, make sure that
Let us now consider the working of mains de-energised and phase ‘R’ sup- you:
the circuit connecting red cable (call it plies power to load L1 via normally- 1. Use good-quality, multi-strand
‘R’ phase). closed (N/C) contact of relay RL1. insulated copper wire suitable for your

WWW.EFYMAG.COM ELECTRONICS FOR YOU • JULY 2007 • 93


CIRCUIT
IDEAS
current requirement. nections from mains. 2. If the input voltage is low in two
2. Use good-quality relays with EFY Note: 1. During testing in the phases, loads L1 and L2 may also be
proper contact and current rating. lab, we used a 12V, 200-ohm, single- connected to the third phase. In that
3. Mount the transformer(s) and re- phase changeover relay with 6A cur- situation, a high-rating fuse will be re-
lays on a suitable cabinet. Use a Tag rent rating. Similarly, ampere-rated quired at the input of the third phase
Block (TB) for incoming/outgoing con- fuses were used. which is taking the total load. 

94 • JULY 2007 • ELECTRONICS FOR YOU WWW.EFYMAG.COM


I

CIRCUIT
IDEAS
current requirement. nections from mains. 2. If the input voltage is low in two
2. Use good-quality relays with EFY Note: 1. During testing in the phases, loads LI and L2 may also be
proper contact and current rating. lab, we used a 12V, 200-ohm, single¬ connected to the third phase. In that
3. Mount the transformer(s) and re¬ phase changeover relay with 6A cur¬ situation, a high-rating fuse will be re¬
lays on a suitable cabinet. Use a Tag rent rating. Similarly, ampere-rated quired at the input of the third phase
Block (TB) for incoming/ outgoing con- fuses were used. which is taking the total load. •

94 • JULY 2007 • ELECTRONICS FOR YOU WWW.EFYMAG.COM

I
I
CIRCUIT
IDEAS

FLYING SAUCER
C3 -L
-X
S1
0.1
IVEDI R1 ON/OFF
S.C. DW 2.2K Vcc R MJ SWITCH
8 4 Vcc
R2 IC1 CL 16 +
2 3 14 9V
47K 555 BATT.1
8 IC2
4 6 13 6
1 5 CD4017
 ASHOK K. DOCTOR 15
GND 3 2 4 7 10 1 5
R10

T
his unidentified flying object C1
~ R3> R4> R5> R6> R7> R8> R9
(UFO) is nothing but an elec- 1M
25V C2

f-
LED15
tronic toy depicting the fantacy. 0.01M LED1 y\\ y\\ y\\ T\\ y\\ y\\
It comprises three separate sections, LED16
viz, rim flasher, dome flasher and
LED2 [\\ W\\ W\\ V\\ y\\ Y\\
sound generator.
The rim flasher is a simple sequen- R3-R10 = 220Q
tial circuit built around timer IC 555
Fig. 1: Rim flasher
(IC1) and decade counter IC CD4017
(IC2) as shown in Fig. 1. IC1 is wired
as an astable multivibrator whose out-
put is fed to clock pin 14 of decade S2
LED17 LED23 LED29
counter IC2. All the eight outputs of & \\ ON/OFF
SWITCH
IC2 are connected with two LEDs each. LED18 LED24 & LED30
These 16 LEDs (LED1 through LED16)
are arranged round the rim of a fly- C4 Vcc LED19 y\\ LED25 J *\\ LED31 y\\
0.1M 16
ing-saucer-like toy. The colour of LEDs 3 4 < >
VR1 MEDIUM +
used may be yellow, pink orange or 47K 9V
10
IC3 5 BATT.2 T
even white to give a good colour ef- CD4060 FAST
fect. 10K ' '
-
The dome flasher circuit is built AA/W 11 12 86
SLOW
R12
around a 14-stage ripple-carry binary 470K GND LED20 y\\ y\\ LED26 LED32 V\\
counter and oscillator IC CD4060 (IC3)
as shown in Fig. 2. Three outputs are LED21 JLÿ LED27 3_\\ LED33

used here. Three groups of LEDs with LED22 LED28 LED34


six LEDs in each are arranged such that 4
each group flashes at a different rate.
Preset VR1 (47-kilo-ohm) is used to
Fig. 2: Dome flasher
vary the flash cycle.
These 18 LEDs (LED17 through
LED34) are arranged around the grove
(disk) of a general-purpose PCB or S3
R13 R17 R19 ON/OFF
veroboard, which is covered by a Vcc R 10K R15 4.7K 10K SWITCH
transparent dome. Use different- C5 8 4 2.7K
8 4
100|J 5 A/WV R18 7
coloured LEDs for each group to cre- 25V 10K R20 D1
IC4 AAA/V— 3 IC5
ate the required light effect. Red, blue, 3
555 R14 555
33KJL 1N4148
100K 6
yellow or green LEDs will create a nice R16
9V
+
68Q 1 2 6 1 5 2
effect. If a transparent dome is not pos- GND
BATT.3 “

sible, drill holes around the top to fix


the LEDs.
LS1
8Q
0.5W C6 T1
BC548
Or BC548 C7
47M
C8
The sound generator is built
around two 555 timers, two transis- I
0.01M
I i 0.01M 25V

tors and some discrete components as


shown in Fig. 3. Timer IC5 is config- Fig. 3: Sound generator

WWW.EFYMAG.COM ELECTRONICS FOR YOU • JULY 2007 • 95


I

CIRCUIT
IDEAS
TOP VIEW ameter each. Make sure
o@o DOME that bowls have rims to
oo o o /LEDS
FLASHER
RIM
facilitate fixing of LEDs
o Q with small screws. For
o o oo o fixing the LEDs, refer to
SCREW /O O />
O O
/TT\ /TT\ li r/~TTN
Fig. 4. Assemble the rim
o°o0o
o BATT.3
flasher, dome flasher
o o Oo°0 o LS1 and sound generator cir-
o
O
OOo° Jo/
o
PCB 3

PCB 2
BATT.2 cuits on separate gen-
o BATT.1 PCB 1
eral-purpose PCBs and
SPACERS mount these on the deep

bowls along with batter-
Fig. 5: Assemble unit of unidentify bird
RIM FLASHER LEDS ies and speaker. PCB1,
pin 5 of timer IC4. The rectangu- PCB2 and PCB3 are for rim flasher,
Fig. 4: Fittings of LEDs on rim
lar-wave output at pin 3 of timer dome flasher and sound generator, re-
ured as an astable multivibrator. The IC5 is fed to transistor BC548 (T1) to spectively.
charge-discharge cycle of capacitor C8 operate timer IC4, which is also an The assembled flying
(47µF) generates a sawtooth waveform asymmetrical multivibrator. If a 75- saucer is shown in Fig. 5. When you
which rises rapidly but falls slowly. ohm-impedance speaker is available, switch on the circuit, rim LEDs and
This waveform is fed to the base of there is no need to use resistor R16 (68 dome LEDs flash, and at the same
transistor T2 (BC327), which is an emit- ohms). time, a sound is generated. This gives
ter follower. Its output is used to con- For assembling the circuit, use two the simulated effect of an unidentified
trol frequency modulation. It is fed to deep, plastic bowls of about 20 cm di- flying object. 

96 • JULY 2007 • ELECTRONICS FOR YOU WWW.EFYMAG.COM


I I

CIRCUIT
IDEAS
TOP VIEW ameter each. Make sure
DOME that bowls have rims to
FLASHER
o o 7 LEDS RIM
facilitate fixing of LEDs
o O with small screws. For
o O
oo o fixing the LEDs, refer to
SCREW /Q °0 0(5/ \o\ SIT\ /TT\ U
Fig. 4. Assemble the rim
o°.°oo? ® BATT.3 flasher, dome flasher

\o\ °o°o0 /0/°!


°\ o OOo° LS1 PCB 3
BATT.Z
and sound generator cir¬
cuits on separate gen¬
o o PCB 2 ]
o BATT.1
1 PCB1
eral-purpose PCBs and
O® SPACERS mount these on the deep
bowls along with batter¬
Fig. 5: Assemble unit ot unidentify bird
RIM FLASHER LEDS ies and speaker. PCB1,
Fig . 4: Fittings of LEDs on rim
— pin 5 of timer IC4. The rectangu¬ PCB2 and PCB3 are for rim flasher,
lar-wave output at pin 3 of timer dome flasher and sound generator, re
ured as an astable multivibrator. The IC5 is fed to transistor BC548 (Tl) to spectively.
charge-discharge cycle of capacitor C8 operate timer IC4, which is also an The assembled flying
(47pF) generates a sawtooth waveform asymmetrical multivibrator. If a 75- saucer is shown in Fig. 5. When you
which rises rapidly but falls slowly. ohm-impedance speaker is available, switch on the circuit, rim LEDs and
This waveform is fed to the base of there is no need to use resistor R16 (68 dome LEDs flash, and at the same
transistor T2 (BC327), which is an emit¬ ohms). time, a sound is generated. This gives
ter follower. Its output is used to con¬ For assembling the circuit, use two the simulated effect of an unidentified
trol frequency modulation. It is fed to deep, plastic bowls of about 20 cm di¬ fly mg object.•

96 • JULY 2007 • ELECTRONICS FOR YOU WWW.EFYMAG.COM

I
DIAC Controlled Flasher | Detailed Circuit Diagram Available https://electronicsforu.com/electronics-projects/diac-controlled-flasher

DIAC Controlled Flasher


By D. Mohan Kumar
December 5, 2017

This simple DIAC controlled flasher finds various industrial applications as a high-voltage indicator or
machine-'on' indicator. It flashes once every second to give a warning indication and is simple to
design. The project can be wired lead-to-lead without using PCB. It is directly powered from 220V AC •ÿc.pwwfcPl
and can be enclosed in the mains box.

DIAC Controlled Flasher Circuit


Mains 230V AC is rectified by D1, which reduces it to a safer level through 33-kilo-ohm resistor R1. Capacitor C1 (470pF,
1 00V) charges through diode D1 and resistor R1, which reduces the flow of current to the diac and hence the triac remains
non-conducting.

B1=100W, 230V BULB


L a
t S1
ON/OFF W
SWITCH
D1
1 N4007
B1

1 of 3 1/25/2018, 1:50 AM
DIAC Controlled Flasher | Detailed Circuit Diagram Available https://electronicsforu.com/electronics-projects/diac-controlled-flasher

I
INPUT R1 xj
MT2
33K
220V AC 1W TRIAC1
50Hz R2 BT136
220Q

C1 +
470ÿ
N
DIAC1
VAV
W Ml

0B3
100V
Na 1
DIAC controlled flasher circuit

After capacitor C1 is fully charged, the voltage across the diac rises and it conducts. This provides gate current to the triac
through R2. The triac fires and completes the circuit of the lamp and it glows.

The triac (BT136) comprises two silicon-controlled rectifiers (SCRs) connected in the reverse parallel configurtion, sharing
the same gate circuit. When the triac fires, both the SCR portions conduct. The gate of the triac is quite complex and it can
be triggered by DC, rectified AC, AC or pulse sources like neon lamps or switching diodes like diacs.

When the diac conducts, capacitor C1 discharges through the diac and R2. This reduces the gate current of the triac and it

2 of 3 1/25/2018, 1:50 AM
DIAC Controlled Flasher | Detailed Circuit Diagram Available https://electronicsforu.com/electronics-projects/diac-controlled-flasher

switches off. The lamp again turns on when C1 charges again. Thus the charging-discharging cycle of capacitor C1
determines the flash rate of the lamp. 0

Construction & testing


Since the circuit uses 220V AC, all the points are at mains lethal potential. Adequate spacing and use of lead sleeving is
required as saftey measures while assembling the circuit. Do not enclose the circuit in a metallic cabinet unless it is made
fully shockproof. Also, do not solder or desolder the components when the circuit is powered.

The article was first published in July 2007 and has recenlty been updated.

3 of 3 1/25/2018, 1:50 AM
CIRCUIT
IDEAS

INFRARED FIRECRACKER IGNITER S.C. DW


IVEDI

 PRADEEP VASUDEVA with the remote control.


In the figure shown here, normally

F
irecrackers are normally ignited the output of IC1 is low and green activates relay RL1 and red LED3
by using a matchstick or a LED2 is ‘on’ and the red LED3 ‘off.’ glows and green LED2 turns off. ‘On’
candle. You have to run away This indicates that the circuit is state of red LED3 indicates that the
quickly after igniting the fuse of the ready for use. When any key on the firecracker is about to burst.
firecracker. This method of igniting remote control is pressed, output pin R7 is a small part of the element of
an electric heater (220V,
1000W), which is kept away
OUT IC2 IN from the electronic circuit
3 7809 1
2 and connected to the relay
R1
1K
R2
1M
R3
100K
R5
1K
_ C6
COM Q7
470M
contacts through a thick
“TO.22M 35V electric cable. The resistance
value of short length of the
7
R Vcc S1
_\\ LED2 ON/OFF
+ C1 4 8 SWITCH heater element (R7) is 3 to
ZD1 ~ÿIOOM 6
5.1V 25 V 3.5 ohms. A current of
ZENER i— D1
1 N4007 around 4 amperes flows

2
7
IC1
NE555
3
O/P
w 12V —
+ through it when connected
to a 12V battery. Flow of 4A
R4
LED1 C5 + BATT. "V
W 470Q 220M N/O
vwv— M
3 O o
C 2 R6 25V
O
current through R7 for 3.5
& 1 5 1K O
o seconds makes it red hot,
IRX1 D2 N/C
TSOP GND 1N4001
RL1 which ignites the fire-
1738 C2 + + C3
C4 R7*
cracker.

£
3.3M 2.2M 0.01M
LED3 3Q
25V 25V
The circuit is powered
RL1 = 6V, 1C/0 RELAY
by a 12V, 7AH battery. IC2
‘REFER TEXT
provides about 9V for the
operation of the circuit. The
firecracker is unsafe, because the dan- 3 of IRX1 (IR receiver module circuit should be housed in a metallic
ger of the firecracker bursting before TSOP1738) goes low. This output is cabinet to prevent it from being dam-
you reach a safe distance is always connected to pin 2 of IC1 via LED1 aged by bursting of the firecracker. The
there. and resistor R4 to trigger the IR receiver and the two LEDs should
The device described here uses re- monostable operation of IC1. be fixed on the front panel of the cabi-
mote control, usually used with TV re- The output of IC1 remains high for net.
ceivers or CD players, to burst the fire- a period equal to 1.1×R2×C2. With the Wiring and relay used in the cir-
cracker. Thus the firecracker can be ig- values of the components given in the cuit should be chosen such that they
nited from a safe distance using the circuit diagram here, the period works are able to carry more than 5 amperes
circuit described below in conjunction out to 3.5 seconds approximately. This of current. 

WWW.EFYMAG.COM ELECTRONICS FOR YOU • AUGUST 2007 • 97


CIRCUIT
IDEAS

PASAMY
MOBILE SHIELD MALAYAP

 D. MOHAN KUMAR greater sensitivity and enables the cir- lates. This produces chirping sound
cuit with hand capacitance effect. Out- from the buzzer and also makes the

P
rotect your mobile phone from put pulses from the oscillator are di- LED1 blink.
unauthorised use or theft using rectly given to trigger pin 2 of the The circuit can also be used as a
this simple circuit. It can gener- monostable. The monostable uses a mobile charger. It provides output of
ate a loud chirping sound when some- low-value capacitor C6, resistors R3 6V at 180 mA through regulator IC
body attempts to take away the mo- and preset VR1 for timing. 7806 (IC4) and resistor R5 for charg-
bile handset. The added feature is that The output frequency of the ing the mobile phone. Diode D3 pro-
the circuit also works as a mobile monostable is adjusted using preset tects the output from polarity rever-
charger. VR1 such that it is slightly less than sal.
The circuit is powered by a that of the astable. This makes the The circuit can be wired on a
step-down transformer X1 with recti- circuit standby, when there is no common PCB. Enclose it in a suitable
fier diodes D1 and D2 and filter ca- hand capacitance present. So in the case with provision for charger out-

IN IC1 OUT IN IC4 OUT


D1 7812 3 7806 3
1 N4007
L R1
GND VR1 GND
C2 1.2M 500K R4 R5
0.1 M 680Q 22Q.
R Vcc +
CD
CD
o CD
IH
C3
4 8 4 8
R3
PZ1
PIEZO¬
2W
INPUT o CD
1M BUZZER
230V AC CD 0.1M
CD D3
50Hz <=>
O CD 1N4007 - -
CD R2 7
IC2 0/P IC3 LED1
100K 3 2
X1 NE555 NE555 3
N 6 TO
D2 CELLPHONE
T
1 N4007 2 6 4I BATT.
X1 1 5 1 5
230V AC
PRIMARY TO
+~ C1
PROTECT
GND
1000M C4 C5 C6
15V-0-15V, 500mA 25V SHIELD
SECONDARY
TRANSFORMER I 0.01M
I 0.01M ~T 0.01M

pacitor C1. Regulator IC 7812 (IC1) standby mode, the astable’s output put leads. Make the protective shield
along with noise filter capacitors C2 will be low. This makes the trigger using 10cm×10cm copper-clad board
and C3 provides regulated power sup- input of monostable low and output or aluminium sheet. Connect it to
ply. high. the circuit using a 15cm plastic wire.
The circuit utilises two NE555 The warning LED1 and buzzer are Leads of all capacitors should be
timer ICs: One as a simple astable connected such that they become ac- short.
multivibrator (IC2) and the second as tive only when the output of the Adjust VR1 slowly using a plastic
a monostable (IC3). The astable monostable sinks current. In the screwdriver until the buzzer stops
multivibrator has timing resistors R1 standby state, the LED1 remains ‘off’ sounding. Bring the hand close to the
and R2 but no timing capacitor as it and the buzzer is silent. As somebody shield and adjust VR1 until the buzzer
works with stray capacitance. Its pins tries to take the mobile phone from sounds. With trial-and-error proce-
6 and 2 are directly connected to a pro- the protecting shield, his hand comes dure, set it for the maximum sensitiv-
tecting shield made up of 10cm×10cm near the shield or makes contact with ity such that as soon the hand comes
copper-clad board. the shield, which introduces hand ca- near the shield, the buzzer starts
The inherent stray capacitance of pacitance in the circuit. As a result, the chirpring and the LED blinks. Instead
the circuit is sufficient to given an out- astable’s frequency changes, which of using the copper cladding for shield,
put frequency of about 25 kHz with makes the trigger pin of the a metallic mobile phone holder can be
R1 and R2. This arrangement provides monostable low and its output oscil- used as the shield. 

92 • AUGUST 2007 • ELECTRONICS FOR YOU WWW.EFYMAG.COM


CIRCUIT
IDEAS

DESKTOP POWER SUPPLY S.C. DW


IVEDI

 T.K. HAREENDRAN top power supply.


Regulator IC LM317T tive load is

U
seful for electronics hobbyists, is arranged in its stan- connected at
this linear workbench power LM dard application. Di- the output. PC
317
supply converts a high input ode D1 guards against Similarly, ca-
2 3
voltage (12V) from the SMPS of a PC polarity reversal and pacitor C3 sup-
□ ° (D
S1 VR1
into low output voltage (1.25 to 9 capacitor C1 is an ad- presses any re-
volts). An adjustable three-pin voltage ADJ VlN ditional buffer. The
VoUT sidual ripple. OUTPUT
regulator chip LM317T (IC1) is used green LED (LED1) in- Connect a Fig. 3: Suggested power
here to provide the required voltages. Fig. 2: Pin dicates the status of the
configuration of standard digi- supply box
The LM317T regulator, in TO-220 pack, LM317 power input. Diode D2 tal voltmeter in
can handle current of up to 1 amp in prevents the output parallel with the output leads to accu-
practice. voltage from rising above the input rately set the desired voltage with the
Fig. 1 shows the circuit of the desk- voltage when a capacitive or induc- help of variable resistor VR1. You can
also use your digital multimeter
if the digital voltmeter is not
D1
S1
o
SPST
w D2
available. Switch on S1 and set
1N5402
ON/OFF
1 N4001 the required voltage through
preset VR1 and read it on the
IC1
C1 3 LM317T 2 O digital voltmeter. Now the
470M ~ 1 power supply is ready for use.
40V C2 -1-
470n ~T R2
D3 The circuit can be wired on
1N4001
2200 a common PCB. Refer Fig. 2 for
YELLOW O/P pin configuration of LM317 be-
cn
CL O A/VW-W— 1.2V
BLACK R1 C3 TO fore soldering it on the PCB. Af-
cn O R3 9V
o 1K LED1 4.7p ter fabrication, enclose the cir-
CL
18K 40V +
a o cuit in a metallic cover as
O
cn
BLACK VR1
10K
| DVM |
LL a o 4 shown in Fig. 3. Then open the
RED (LIN) + C4 -
OUTPUT 10M C5 cabinet of your PC and connect
CONTROL
I i
40V 100n

DVM = DIGITAL VOLTMETER


GND ir the input line of the gadget to a
free (hanging) four-pin drive
power connector of the SMPS
Fig. 1: Circuit of desktop power supply carefully. 

98 • SEPTEMBER 2007 • ELECTRONICS FOR YOU WWW.EFYMAG.COM


CONSTRUCTION

INTERFACING A GRAPHICS LCD


WITH THE MICROCONTROLLER
 ARUN KARKARE The LCD module gets the data or
UMAR
command instructions from the inter- SUNIL K

T
oday, most of the electronics faced microcontroller through data lines
devices come with a liquid D0 through D7. Depending upon the
crystal display (LCD). Even command received, the T6963 finds out
new fridges have it. It is interesting as the data from the internal VRAM and byte is displayed in the second row.
well as useful to know how to use displays it as graphics or text at appro- The graphics image is also sent by
LCDs with any device. Here is how to priate place on the screen. The module the microcontroller byte by byte to the
interface a graphics LCD module with has a 128-character internal character- LCD module. If a bit is set as ‘1’ it will
a microcontroller. generator ROM (CG-ROM) and can con- be displayed in dark, and a ‘0’ bit will
trol up to 64 kB of external video RAM be displayed as a clear pixel. The first
Graphics LCD module (VRAM). A number of character at- byte is displayed in the left corner on
There are various types of graphics LCD tribute functions are also available. the top as shown in Fig. 2. The second
modules available in the market de- For communication from/to the byte is displayed to the right of the
pending on pixel size such as 120×64, connected CPU, the LCD module has first byte and so on. The last byte is
128×128, 240×64 and 240×128. The eight data lines (D0 through D7), write the 30th byte in the line. Thus the 31st
graphics LCD used here has a pixel and read lines, chip-enable line, and a byte is displayed in the second line of
size of 240×128 and is based on T6963 command or data line. pixels.
controller IC. The module type is Resetting the module. As soon as
SS24E12DLNW-E from UTC. the power is switched on, the T6963 Initialisation of the
The 240×128 LCD panel screen has IC must first be hardware reset by pull- LCD module
240 horizontally and 128 vertically ar- ing the reset pin down for at least one The initialisation process is always
ranged pixels. It can be used for graph- millisecond. done at the beginning of the software
ics or for text in any combination, like Font selection. Font size of the LCD program before we start displaying
one area of 240×64 for graphics and module, like 6×8 (which occupies six anything on the screen. It is done by
another area of 240×64 for text. Also, horizontal pixels and eight vertical pix- sending a series of commands through
the entire area of 240×128 can be used els) or 8×8 (which occupies eight hori- data lines from the microcontroller to
either for graphics or text. zontal pixels and eight vertical pixels), the LCD module. Some commands
is selected by pull- may need extra information and there-
TEXT COLUMN 1 2 3
ing the FS pin high fore should be sent with correspond-
or low, respectively. ing data bytes. The C/D pin of the
TEXT
ROW1 fl ] 8 LINE=
1 ROW
Thus if a 6x8 font is
selected, you can
LCD module must be pulled high
when sending the command, and
2
get 240/6=40 col- pulled low when sending the data.
3 umns and 128/8=16 Cursor pointer set. The ‘cursor
text display rows. If pointer set’ command has two data
an 8x8 font is se- bytes associated with it to specify the
lected, you can get position for the cursor. This is the only
TEXT BYTE 21 H SENT FROM CPU LOOKS AS "A"
240/8=30 columns command which will shift or move the
Fig. 1: Text Information Display and 128/8=16 text cursor. The cursor cannot be shifted
display rows. automatically by the data-write com-
The text information is sent mands. Cursor position should be set
1ST BYTE 2ND BYTE
I by the microcontroller byte by within the actual display area.
DO D1 D2 D3 D4 D5 D6 D7 DO D1
byte to the LCD module. The First argument Cursor column position
Line 1 PIXELS
first byte is displayed in the left Second argument Cursor row position
Line 2 PIXELS ‘Cursor pointer’ command (21H)
corner on the top as shown in
I I
31st BYTE
Fig. 1. The second byte is dis- For example, sending data ‘0FH’
EXAMPLE- DATA F8H SENT ON FIRST BYTE played to the right of the first and ‘03H’ and command ‘21H’ will set
byte and so on. The last byte is the cursor position to 15th column in
Fig. 2: Graphic Information Display the 30th byte in the row. The 31st the third line (refer Fig. 3). (Remem-

60 • SEPTEMBER 2007 • ELECTRONICS FOR YOU WWW.EFYMAG.COM


CONSTRUCTION
ber the computer starts counting col- Text home address set (TH). This data stored in the graphics home (GH)
umns from ‘0’ to ‘29’ and rows from command defines the starting address address will be displayed in the first
‘0’ to ’15.’) in the VRAM for text display data. The six or eight bits (without shaded area
Offset register set. The lower five data is stored in the text home (TH). It in Fig. 4) of the top line in the left-
bits of the first data byte should be set is displayed at the top left-hand char- hand side of the LCD screen, depend-
to the upper five bits of the start ad- acter position (the home position). ing on the font size selected. When us-
dress for the character-generator RAM First argument Text home address (TH lower) ing the attribute function, the GH ad-
(CG-RAM) area. The second data byte Second argument Text home address (TH upper) dress indicates the starting address for
‘Text home address’ command (40H)
should be set to ‘0.’ the attribute RAM area.
First argument CG-RAM Address
For example, sending data ‘00H’ First argument Graphic home
Second argument must be (00H) and ‘0FH’ and command ‘40H’ sets the address (GH lower)
Offset register command (22H) Second argument Graphic home
text home address as ‘0F00H’ (shaded- address (GH upper)
Address pointer set. The ‘address area address location) in the VRAM ‘Text home address’ command (42H)
pointer set’ command is used to area. This is shown in Fig. 4. Graphic area set (GA). This com-
specify the starting address for writ- Text area set (TA). This command mand defines the number of columns
ing data to the VRAM or for reading defines the number of columns of text of graphics data for the graphics area
data from the VRAM. The address for the text area of VRAM. The text of VRAM. The graphics area (GA) may
should be set to a location in the ac- area (TA) may be set independently be set independently from the num-
tual display RAM area specified by the from the number of characters per line ber of characters per line set by hard-
memory map. set by hardware settings on the T6963C ware settings on T6963C controller
First argument Address pointer (lower) controller chip. Connecting the FS pin chip. It is usual to set the GA to the
Second argument Address pointer (upper) to supply ground means you have se- same number of characters per line as
‘Address pointer’ command (24H)
lected 8x8 font size, which will allow the LCD module will display.
For example, sending data ‘00H’ up to 30 characters per line. However,
First argument Number of columns (GA)
and ‘00H’ and command ‘24H’ sets the TA can be programmed for even less Second argument (00H)
address pointer to start location ‘0000H’ than 30, but usually it is set to the same ‘Text area’ command (43H)
(shaded area in Fig. 4) in the VRAM. number of characters per line as the
LCD module will display. Description of ‘mode set’
012 29
First argument Number of columns of
commands (command byte
0-
1
2-z
characters (TA) only)
3 Second argument (00H)
4- ‘Text area’ command (41H) This command does not require any
For example, for 240x128 LCD with data byte.
8x8 font size selected, set TA=1EH. The higher four bits (D7 down
Graphic home address set (GH). through D4) of this command are al-
15
This command defines the starting ad- ways ‘1000,’ while lower four bits (D3
FIG. CURSOR POSITION 15, 3
dress in the VRAM for graphics dis- down through D0) decide selection of
Fig. 3: Cursor Pointer play area of VRAM (refer Fig. 4). The CG-ROM or RAM and how the
graphic display is merged with
text display.
LLI
CL
LLI
ADDRESS IN VRAM To use both the 128-charac-
X
CONTENTS OF VRAM
Q
LU
ter on-chip character-generator
TEXT DISPLAY AND ;set graphic home address ;set address pointer
OOOOh FFH
I— 0001h FFH GRAPHIC DISPLAY writedata OOh writedata OOh ROM (CG-ROM) and the 128-
VRAM-DISPLAY SCREEN RELATION writedata OOH writedata OOH
2b 0002h FFH
0003h FFH
writecommand 42H writecommand 24H character external CG-RAM
<o :set graphic area :set text home address function, set D3 to ‘0.’ To use
O 001 dh FFH writedata 1 Eh writedata OOh
Q_
x 001 eh OOH c
writedata OOH writedata OOH only the 256-character CG-RAM
E writecommand 43H writecommand 40H
< LU
user-defined character genera-
X 2C c
=3
o :set text area
°LU OfOOh
Oeffh — i E E
13
o writedata 1Eh
tor, set D3 to ‘1.’
OOH X O O CO
£ writedata OOH
cc 0f01 h OOH LU U o
z writecommand 41 H D0 through D2 set the mode
i 0f02h OOH ■» FIRST LINE
1st r 's L SECOND LINE through which the text area is
Q
LU Row The SUN \M // -THIRD LINE
CL
o 30ÿ merged with the graphics area.
co EIGHTH LINE
< Text attributes can only be
<Q used in the text-only mode as
x
LU
16th V
the attribute data is stored in
128th LINE
VRAM LOCAL
Row DISPLAY SCREEN the graphics area.
columnl
column2 D0 through D2 should be
selected as per the need of
Fig. 4: Address pointer and VRAM storage merging graphics with text.

62 • SEPTEMBER 2007 • ELECTRONICS FOR YOU WWW.EFYMAG.COM


CONSTRUCTION
Internal CG-ROM
↓MSB →
LSB→ 0 1 2 3 4 5 6 7 8 9 A B C D E F
0 Blank ! “ # $ % & ‘ ( ) * + , - . /
1 0 1 2 3 4 5 6 7 8 9 : ; < = > ?
2 @ A B C D E F G H I J K L M N O
3 P Q R S T U V W X Y Z [ \ ] ^ _
4 \ a b c d e f g h i j k l m n o
5 p q r s t u v w x y z { : } ~ blank
6 Ç ü é â ä à å ç ê ë è ï î ì Ä Å
7 É – – ô ö ò û ù ÿ ö ü ¢ £ ¥ – ƒ

PARTS LIST Description of ‘cursor- send the data-read instruction for each
Semiconductors: pattern select’ command data byte being read from the VRAM.
IC1 - 7805 5V regulator (command byte only) The ‘data auto-read’ command should
IC2 - AT89S8252
microcontroller This command does not require any be sent after the ‘address pointer set’
D1-D4 - 1N4007 rectifier diode data byte. command. The address pointer will
D5 - 1N4148 switching diode The higher four bits (D7 through automatically increment by ‘1’ for each
LED1, LED2 - 5mm light-emitting diode
LCD Module - SS24E12DLNW-E graphic D4) of this command are always ‘1010,’ data read. After reading all data, the
LCD module while the lower four bits (D3 through ‘auto mode reset’ command (B2H or
Resistors (all ¼-watt, ±5% carbon): D0) decide cursor pattern. B3H) should be sent to resume normal
R1, R2 - 330-ohm operation. When in the ‘data auto-read’
R3 - 10-kilo-ohm 1 line cursor (A0H)
VR1 - 20-kilo-ohm 2 line cursor (A1H) mode, no commands can be accepted.
RNW1 - 10-kilo-ohm resistor “““““““““
“““““““““ Data Auto Write Set (B0H)
network 7 line cursor (A6H) Data Auto Read Set (B1H)
Capacitors: 8 line cursor (A7H) Auto Mode Reset (B2H or B3H)
C1 - 1000µF, 25V electrolytic
C2, C3 - 0.1µF ceramic disk
C4 - 10µF, 16V electrolytic Description of ‘data auto Description of ‘data-read/
C5,C6 - 22pF ceramic disk read/write’ commands data-write’ commands
Miscellaneous: (command byte only) (command byte only)
X1 - 230V AC primary to 9V,
500mA secondary This command does not require any This command does not require any
transformer data byte. data byte.
XTAL - 12MHz crystal
S1 - On/off switch The higher six bits (D7 through D2) The higher five bits (D7 down
of this command are always ‘101100,’ through D3) of this command are al-
Logically ‘OR’ of text with graphics 000 while the lower two bits (D1 and D0) ways ‘11000,’ while the lower three bits
Logically ‘EXOR’ of text with graphics 001
Logically ‘AND’ of text with graphics 011
decide auto advance mode. (D2 down through D0) decide the
Text only (with attribute data in graphics area) 100 These single-byte commands are pointer-advance mode.
very useful when transferring blocks These commands are used to write
Description of ‘display of data to/from the VRAM. data to or read data from the VRAM.
mode set’ commands After sending a ‘data auto write’ Data-read or data-write commands
(command byte only) (B0H) command, it is not necessary to should be sent after setting an address
This command does not require any send the data-write instruction for each by the ‘pointer set’ command. The ad-
data byte. data byte being written to the VRAM. dress pointer may be automatically
The higher four bits (D7 through The ‘data auto-write’ command should incremented, decremented or left un-
D4) of this command are always ‘1001,’ be sent after the ‘address pointer set’ changed depending on which data
while the lower four bits (D3 through command. The address pointer will read/write command is being sent. A
D0) decide the cursor operation. automatically increment by ‘1’ for each data-write or data-read command is
data written. After sending all data, required for each data byte written to
Display off (90H)
D3- ‘0’ means graphic ‘off,’ the ‘auto mode-reset’ command (B2H or read from the VRAM.
‘1’ means graphics ‘on’ or B3H) should be sent to resume nor- This command should not be con-
D2- ‘0’ means text ‘off,’
‘1’ means text ‘on’ mal operation. When in the ‘data auto- fused with B0H and B1H commands.
D1- ‘0’ means cursor ‘off,’ write’ mode, no commands can be ac-
‘1’ means cursor ‘on’
In the case of B0H or B1H command,
D0- ‘0’ means cursor blinking ‘off,’ cepted, as all the following bytes are you need not send a write or read com-
‘1’ means cursor blinking ‘on’
assumed to be display data bytes. mand between each data-write or data-
After reset, D3 through D0 are re- After sending a ‘data auto-read’ read. But in the case of C0H and C1H
set to zero. (B1H) command, it is not necessary to commands, after every data write or

64 • SEPTEMBER 2007 • ELECTRONICS FOR YOU WWW.EFYMAG.COM


CONSTRUCTION
to set/reset individual bits in the RAM.
The ‘address pointer set’ command de-
S1°""|XI S1 = ON/OFF SWITCH

t
230V AC
50Hz
CD
CD
o
o
CD
CD
CD
CD
CD
9V
D1 D2

IN IC1
7805 3
OUT
cides which byte is to be operated on.
Any one bit in the byte selected can be
set or reset. Multiple bits in a byte can-
CD
CD O 2 R1

i a D4
D3
C1 +_
COM 3300 not be set/reset at the same time. D2
1000M-T- C2 - R2 through D0 specifies the location of the
o :WLEDI
X1=230V AC PRIMARY TO 9V,
500mA SECONDARY TRANSFORMER
D1-D4 = 1N4007 25V 0.1M

C3 1
1.0M ~T
POWER
3300
bit to be set/reset. ‘000’ selects the least
significant bit (LSB) and ‘111’ the most
significant bit (MSB). For resetting the
D5 bit, make D3 as ‘0’ and for setting the
RNW1 = 10KX8 1N4148
Vcc EA/VPP M
bit make D3 as ‘1.’
2 3 4 5 6 7 8 9 PO.O 16V LED2
40 31 Bit Reset (F0H-F7H)
39
P0.1 RST
38 Bit Set (F8H-FFH)
P0.2 9
37
P0.3
36
P0.4
P0.5
35 |C2 1 Circuit description
P0.6 34AT89S8252
33
P0.7
32
18 After having understood the basic op-
-
■ | XTAL R3
P3.3
13 19
-
1 1 12MHz 10K eration of the LCD module, it is fairly
P3.4
14
P3.5
15
simple to interface it with any
P3.6 16 17 20
microcontroller. Fig. 5 shows the cir-
ct.) GND C6
Vcc DO D1 D2 D3 D4 D5 D6 D7 W R CE C/D £[
P3.7
C5 -L
22p cuit for interfacing the graphics LCD
cc
o LU A 3 11 12 13 14 15 16 17 18 5 6 7 810 1
22p -i- with the microcontroller. Atmel’s
cc 5
1 2
LU
Q MODULE LCD AT89S8252 microcontroller (IC2) is
>O K
9 4
19
_L VO VR1 = 20K
FS used to interface the LCD module.
VEE
AA/W- Port P0 (Pins 39 through 32) of the
microcontroller is connected to data
Fig. 5: LCD interface with microcontroller
lines D0 through D7 of the LCD mod-
data read you need to send C0H or Description of ‘screen ule. Port P0 pins are pulled high with
C1H for advancing the pointer. copy’ command (command the 10-kilo-ohm resistor network. This
byte only) data port is used to send and receive
Data Write - Address Pointer Auto Incremented
(C0H) the data between the microcontroller
Data Read - Address Pointer Auto Incremented This command does not require any
and the LCD module. The control lines
(C1H) data byte.
Data Write - Address Pointer Auto Decremented W, R, CE, C/D and RES pins should
(C2H) This single-byte command is used
Data Read - Address Pointer Auto Decremented be connected to port pins P3.3 through
to copy one row of data displayed on
(C3H) P3.7 of the microcontroller, respec-
Data Write - Address Pointer Auto Unchanged the LCD screen to the graphics RAM
(C4H) tively.
Data Read - Address Pointer Auto Unchanged
area specified by the ‘address pointer
EA/VPP pin of the microcontroller
(C5H) set’ command. This ‘screen copy’ com-
is connected to 5 volts to use the inter-
mand cannot be used if the row of dis-
nal flash program memory. The
Description of ‘screen played data contains ‘text attribute’
power-on-reset for microcontroller IC2
peeking’ command data as set by the ‘mode set’ command.
is achieved through capacitor C4 and
(command byte only) The status flag STA6 should be
resistor R3. Diode D5 connected across
checked after each ‘screen copy’ com-
This command does not require any capacitor C4 allows short power sup-
mand. If the address pointer is not set
data byte. ply failures. A 12MHz crystal is used
to the graphics RAM area, the ‘screen
This single-byte command is used for internal oscillator clocks. An LED
copy’ command is ignored and STA6
to transfer one byte of displayed data (LED2) is connected at pin P1 of the
is set to ‘1.’
to the data stack and may be read by microcontroller and acts as the pro-
the microcontroller using a ‘data read’ Screen Copy (E8H) gram-running indicator.
command. It is useful to read the logi- Font-select pin 19 (FS) of the LCD
cal combination of text and graphic data Description of ‘bit-set/ module is grounded to generate 8x8-
on the LCD screen. The status flag STA6 bit-reset’ command character font size.
should be checked after each ‘screen (command byte only) Preset VR1 is used for contrast
peeking’ command. If the address This command does not require any variation of the LCD. Normally –7.8V
pointer is not set to the graphics RAM data byte. will give good contrast. V EE is a
area, the ‘screen peeking’ command is The high-order four bits (D7 negative supply voltage output from
ignored and STA6 is set to ‘1.’ through D4) are always ‘1111.’ the LCD module that outputs around
Screen Peeking (E0H) This single-byte command is used –14 volts.

WWW.EFYMAG.COM ELECTRONICS FOR YOU • SEPTEMBER 2007 • 65


CONSTRUCTION

pv
marks inserted on the lines so you can
o 09009 r easily understand what the program
instructions are really doing.
Starting from the main line, first
the ports are initialised, and then
the LED blinks four times to indicate
that the program and the hardware
BBBOBBOOODB are working. Basically, the LCD
module is first reset and initialised.
After initialisation, the LCD module
is loaded with graphics data and
6666666 then with text data. The graphics data

l{= contains a scene of the Sun in the


background of a tree and hills. The

o EFY/SUNIL/GRAPHI C/SEPT-07 S o
text inserted is ‘The SUN.’ A blinking
cursor is also shown as an example.
At the end, the ‘graphic and text on’
Fig. 6: A single-side, actual-size PCB layout for interfacing the graphics LCD with the microcontroller command is inserted before ending
the program with an infinite wait
loop.
o C0N2 EFY/SUNIL/GRAPHIC/SEPT-07 A K
ooooooooooooo o|o o o o|o] lolol
|n|o
C0N2 IS USED FOR
CONI

INUERTER
o Note that no data or command
should be written to the LCD module

D
UR1
20K
LCD1 CONNECTION

Dl-D4=
1N4007 o
J1 a
9
C3
.lu GND
J2 a m
0/P FOR LCD

-© Ucc
INUERTER
SUPPLY
if the module is busy doing its own
internal operation. As such a subrou-
tine is inserted before every write op-
D2 RNUI1 10K
Inooooooool eration to check whether the LCD
QQQQQQQBQQQQQQBBQBBa module is busy or free. This is done in
the ‘check status’ subroutine where
IC2 both D0 and D1 bits are checked be-
AT89S8252
O— N—04O D3 fore proceeding any further.
pf
Cl
ICl
7805
P2 330F
00000000900000000000 Also note that:
LED2 0-|>hO
C6 22p 1. The LCD module has a built-in
lOOOu
O
□□□
R1
330E'
C4

or
10u, 1N4148

R3 10K
|o o|
C5 22p
lo ol
o
0
XTAL
12MHz
CG-ROM with 128 characters possible.
You can use this address to insert any
C2fo
-
IU 1
o]1
LED1 & o text character. For example, ‘21H’ will
mean ‘A.’
Fig. 7: Component layout for the PCB 2. You can make a graphics ‘.bmp’
file of your choice in ‘paint’ software
The LCD modules have an inbuilt light draws a significant current. Ca- on a 240×128-pixel paper size and use
fluorescent tube as backlight source. pacitor C2 bypasses the ripples present FONTGEN software to convert the
This needs a special inverter that in the output. LED1 acts as the power ‘.bmp’ image into graphics data file as
comes with the LCD module as op- indicator. Resistors R1 and R2 act as required by the LCD module. Copy
tional. It works off 5V supply and gen- the current limiters for LED1 and the graphics data code (generated by
erates 100-200V AC, which is con- LED2, respectively. FONTGEN software) and paste in the
nected to ‘A’ and ‘K’ terminals of the An actual-size, single-side PCB for source program at the indicated place.
LCD module. If you opted for the LED interfacing the graphics LCD with the For downloading the FONTGEN, visit
backlight module, you may not need microcontroller is shown in Fig. 6 and ‘8052.com’ or contact Bahri Okuroglu
this inverter. its component layout in Fig. 7. at ‘bahrio@yahoo.com’.
The 230V, 50Hz AC mains is Note. It is to acknowledge with
stepped down by transformer X1 to Software program thanks the help extended by Bahri
deliver a secondary output of 9V, 500 The software program presented here Okuroglu by providing FONTGEN
mA. The transformer output is recti- (EFY-CD) for the operation of LCD software for generating data code file
fied by a full-wave bridge rectifier module is just an example and you from ‘.bmp’ image for the graphics
comprising diodes D1 through D4, fil- have to re-develop it for your applica- LCD module.
tered by capacitor C1 and regulated tion. The software is written in ANSI EFY note. All the relevant files of
by IC 7805 (IC1). Provide adequate C language and compiled using KEIL this project are included in this
heat-sink for 7805 as the LCD back- compiler. The program has enough re- month’s EFY-CD. 

66 • SEPTEMBER 2007 • ELECTRONICS FOR YOU WWW.EFYMAG.COM


CIRCUIT
IDEAS

SHUTTER GUARD S.C. DW


IVEDI

 D. MOHAN KUMAR to enable reset pin 4 of IC2 so that it


can function freely. Transistor T1 am-

T
his sensitive vibration sensor is plifies the piezo-sensor signal and trig- generates a tone simulating the police
exclusively made for shops to gers monostable IC2. The base of tran- siren with R11 as its oscillation-
protect against burglary. It will sistor T1 is biased using a standard controlling resistor. Zener diode ZD1
detect any mechanical or acoustic vi- piezo element that acts as a small ca- provides stable 3.1V DC for the tone-
bration in its vicinity when somebody pacitor and flexes freely in response generating IC.
tries to break the shutter and immedi- to mechanical vibrations so that the Assemble the circuit on a general-

L1
60W
R5 R6 R7 R8 BULB

M"
C1 1M
1M 10K 10K

r 0-1M
(W) 8Q
C2 0.5W
Vcc Vcc
0.2M MT1
R9 TRIAC1
12
16 9
H 8
100Q BT136
/ MT2 S1
R4 6
C4 A/WV G
6 L ON/OFF
2.2M 0.01|J SWITCH
10 AA/W— < ’ 230V AC
2 R11
7 O N
R1 R3 220K +
100K IC1
CD4060 11 AMA'
10M

IC2
3 |
— —| 12V

i
NE555 o/p

D1 R10 7 8
GND
1N4148 470Q

cx
Q3
7 IC3
15 4 5
UM3561 3 AA/W
Q9 R12
BC548

€>-.
8 1 5 2 100£2

GND + GND
R2 C3 BC547
470Q 2.2[i
25V ZD1
C5
C6 + T 3.1V
PZ1 470M
PIEZO 0.01M -r 25V 0.5W
▼\\ LED1 ELEMENT ZENER

ately switch on a lamp and sound a output of IC2 is high till the prefixed purpose PCB and enclose in a suit-
warning alarm. A 15-minute time de- time period. able, shockproof case. Connect the
lay after switch-on allows sufficient In the standby mode, the alarm cir- piezo element to the circuit by using
time for the shop owner to close the cuit built around IC3 remains dormant a single-core shielded wire. Glue a
shutter. as it does not get current. Timing com- circular rubber washer on the fine
The front end of the circuit has a ponents R8 and C6 make the output side of the piezo element and fix
timer built around the popular binary of IC2 high for a period of three min- it on the shutter frame with the
counter IC CD4060 (IC1) to provide utes. washer facing the frame so that the
15-minute time delay for the remain- When any mechanical vibration piezo element is flexible to sense
ing circuitry to turn on. Resistors R3 (caused by even a slight movement) the vibrations. Fix the lamp and
and R4 and capacitor C2 will make disturbs the piezo element, trigger pin the speaker on the outer side and
Q9 output high after 15 minutes. Di- 2 of IC2 momentarily changes its state the remaining parts inside the case.
ode D1 inhibits the clock input (pin and the output of IC2 goes high. This Since triac is used in the circuit, most
11) to keep the output high till the triggers triac 1 and the alarm circuit points in the PCB will be at mains
power is switched off. Blinking LED1 activates. Triac BT136 completes the lethal potential. So it is advised not
indicates the oscillation of IC1. lamp circuit by activating its gate to touch any part of the circuit while
The high output from IC1 is used through resistor R9. IC UM3561 (IC4) testing. 

WWW.EFYMAG.COM ELECTRONICS FOR YOU • SEPTEMBER 2007 • 97


CIRCUIT
IDEAS

LAPTOP PROTECTOR S.C. DW


IVEDI

 D. MOHAN KUMAR age through a water-activated tilt fectively shorts the contacts, so the out-
switch only when the probes in the put of IC1 remains low. The alarm gen-

P
rotect your valuable laptop tilt switch make contact with water. erator remains silent in the standby
against theft using this minia- When the tilt switch is kept in the hori- mode as trigger pin 5 of IC2 is low.
ture alarm generator. Fixed in- zontal position, the inverting input of When someone tries to take the
side the laptop case, it will sound a IC1 gets a higher voltage than its non- laptop case, the unit takes the vertical
loud alarm when someone tries to take inverting input and the output remains position and the tilt switch breaks the
the laptop. This highly sensitive cir- low. electrical contact between the probes.
cuit uses a homemade tilt switch to IC CD4538 (IC2) is used as a Immediately the output of IC1 be-
activate the alarm through tilting of monostable with timing elements R5 comes high and monostable IC2 is trig-
the laptop case. and C1. With the shown values, the gered. The low output from IC2 trig-
The circuit uses readily available output of IC2 remains low for a pe- gers the pnp transistor (T1) and the
components and can be assembled on riod of three minutes. CD4538 is a pre- buzzer starts beeping.
a small piece of Vero board or a gen- cision monostable multivibrator free Assemble the circuit as compactly
eral-purpose PCB. It is powered by a from false triggering and is more reli- as possible so as to make the unit
12V miniature battery used in remote able than the popular timer IC 555. Its matchbox size. Make the tilt switch us-
control devices. output becomes high when power is ing a small (2.5cm long and 1cm wide)
IC TLO71 (IC1) is used as a volt- switched on and it becomes low when plastic bottle with two stainless pins
age comparator with a potential di- the trigger input (pin 5) gets a low-to- as contacts. Fill two-third of the bottle
vider comprising R2 and R3 provid- high transition pulse. with water such that the contacts never
ing half supply voltage at the non-in- The unit is fixed inside the laptop make electrical path when the tilt
verting input (pin 3) of IC1. The in- case in horizontal position. In this po- switch is in vertical position. Make the
verting input receives a higher volt- sition, water inside the tilt switch ef- bottle leakproof with adhesive or wax.
Fix the tilt switch
inside the enclo-
sure of the circuit
R5 in horizontal posi-
1.5M S1
R1 R2 ON/OFF
1K 10K SWITCH
tion. Fit the unit in-
side the laptop
16 3 case in horizontal
2 12V
3 C1 BATT. T position using ad-
+ 7 R4 __ 47p hesive.
6 100Q 25 V
IC1 IC2
TL071 AAM/ - -5 CD4538
1
T1
Use a minia-
D1 BC558 ture buzzer and a

TILT
SWITCH
2 4 1N4148

8 4
7 A/WV
100Q
R6 O micro switch (S1)
to make the gadget
/ \ R3 +
compact. Keep the
PZ1 laptop case in hori-
10K PIEZO¬
BUZZER zontal position and
switch on the unit.
Your laptop is now
protected. 

122 • OCTOBER 2007 • ELECTRONICS FOR YOU WWW.EFYMAG.COM


CIRCUIT
IDEAS
generation of spark from the spark plug.

MOTORBIKE ALARM S.C. DW


IVEDI Usually, there is a wire running from
the alternator to the ignition coil, which
has to be routed through one of the N/
C1 contacts of relay RL1 as shown in
 T.A. BABU turned on. When you turn ignition off Fig. 1. Fig. 2 shows the pin configura-
using key S2, you have approximately tions of SCR BT169, MOSFET BS170

T
his simple-to-build alarm can 15 seconds to get off the bike; this func- and transistor BC548.
be fitted in bikes to protect tion is performed by resistor R6 to dis- Also, on disconnection of the coil,
them from being stolen. The charge capacitor C3. Thereafter, if any- sound generator IC UM3561 (IC1) gets
tiny circuit can be hidden anywhere, one attempts to get on the bike or move power supply through N/O2 contact
without any complicated wiring. Vir- it, the alarm sounds for approximately of relay RL1. This drives the darlington
tually, it suits all bikes as long as they 15 seconds and also disconnects the pair built around T3 and T4 to pro-
have a battery. It doesn’t drain out the ignition circuit. duce the siren sound through loud-
battery though as the standby current During parking, hidden switch S1 speaker LS1.
is zero. is normally open and does not allow To start the vehicle, both hidden
The hidden switch S1 can be a triggering of MOSFET T1. But when switch S1 and ignition key S2 should
small push-to-on switch, or a reed someone starts the motorbike through be switched on. Otherwise, the alarm
switch with magnet, or any other simi- ignition switch S2, MOSFET T2 trig- will start sounding. Switching on S1
lar simple arrangement. The circuit gers through diode D1 and triggers SCR1, which, in
is designed around a couple of low- resistor R5. Relay RL1 (12V, turn, triggers MOSFET T1.
BT BS BC
voltage MOSFETs configured as 2C/O) energises to activate 169 170 548 MOSFET T1 is configured
monostable timers. Motorbike key S2 the alarm (built around 2 3 2 3 2 3 to disable MOSFET T2
is an ignition switch, while switch S3 IC1) as well as to discon- from functioning. As a re-
is a tilt switch. nect the ignition coil from KG A DGS CBE sult, MOSFET T2 does not
Motorbike key S2 provides power the circuit. Disconnection of Fig. 2: Pin configurations of trigger and relay RL1 re-
supply to the gate of MOSFET T2, when the ignition coil prevents BT169, BS170 and BC548 mains de-energised, alarm

N/O 1
FROM ALTERNATOR
. RELAY RL1
O
* N/C 1
CONTACTS 1
SPARK
PLUG
FROM IGNITION SWITCH (S2)
O N/O 2
* o
RELAY RL1

HIDDEIÿPI
o CONTACTS 2
N/C 2
S3
S1
6 SHOCK/
SWITCH H TILT
Q SWITCH

470Q
R1

A
SCR1
BT169/
MCR100
D1
1N4148
R7
1K R8
220K
AA/W
LS1
4Q
0.5W
SPEAKER K
K
G R5
+ 470Q O
7 8 4 I
12V D2 o
“=ÿ
BATT. R3 1N4007 o IC1 T3
T1 O 5 BC548
220Q BS170 UM3561
D 3
RL1 2
< ► ♦
G S 4.7K

ZD1
R2 R4 + C2 3.3V SL100/
2.2K 1.5M 10M T2
ZENER BEL187
25V
R6
C3 + __BS170
1.5M 10M G

S©D
16V
RL1 = 12V, 2C/0 RELAY
4 >- ♦ ♦ ♦
T1, T2 (BS170) = N-CHANNEL MOSFET

Fig. 1: Cheap motorbike alarm

116 • OCTOBER 2007 • ELECTRONICS FOR YOU WWW.EFYMAG.COM


CIRCUIT
IDEAS
deactivated and ignition coil connected the angle by which the switch must be tacts and tin-plated steel housing. If
to the circuit. Connection to the igni- tilted to ensure the contact operation you find difficulty in getting the tilt
tion coil helps in generation of spark (operating angle), must be approxi- switch, you may replace it with a reed
from the spark plug. Keeping hidden mately 1.5 to 2 times the stated differ- switch (N/O) and a piece of magnet.
switch S1 accessible only to the owner ential angle. The differential angle is The magnet and the reed switch
prevents the bike from pillaging. the measure of the ‘just closed’ posi- should be mounted such that the con-
Tilt switch S3 prevents attempt to tion to the ‘just open’ position. tacts of the switch close when the bike
move the vehicle without starting it. The tilt switch has characteristics stand is lifted up from rest.
Glass- and metal-bodied versions of like contacts make and break with vi- EFY note. Make sure that while
the switch offer bounce-free switching bration, return to the open state at rest, driving, the two internal contacts of
and quick break action even when non-position sensitivity, inert gas and the Tilt switch don’t touch each
tilted slowly. Unless otherwise stated, hermetic sealing for protection of con- other. 

WWW.EFYMAG.COM ELECTRONICS FOR YOU • OCTOBER 2007 • 117


I I

CIRCUIT
IDEAS
deactivated and ignition coil connected the angle by which the switch must be tacts and tin-plated steel housing. If
to the circuit. Connection to the igni¬ tilted to ensure the contact operation you find difficulty in getting the tilt
tion coil helps in generation of spark (operating angle), must be approxi¬ switch, you may replace it with a reed
from the spark plug. Keeping hidden mately 1.5 to 2 times the stated differ¬ switch (N/O) and a piece of magnet.
switch SI accessible only to the owner ential angle. The differential angle is The magnet and the reed switch
prevents the bike from pillaging. the measure of the 'just closed' posi¬ should be mounted such that the con¬
Tilt switch S3 prevents attempt to tion to the 'just open' position. tacts of the switch close when the bike
move the vehicle without starting it. The tilt switch has characteristics stand is lifted up from rest.
Glass- and metal-bodied versions of like contacts make and break with vi¬ EFY note. Make sure that while
the switch offer bounce-free switching bration, return to the open state at rest, driving, the two internal contacts of
and quick break action even when non-position sensitivity, inert gas and the Tilt switch don't touch each
tilted slowly. Unless otherwise stated, hermetic sealing for protection of con¬ other.•

WWW.EFYMAG.COM ELECTRONICS FOR YOU • OCTOBER 2007 • 117

I I
CIRCUIT
IDEAS
DICE WITH 7-SEGMENT DISPLAY
 EFY LAB CD4026, pin 14 (cascading output) is
to be left unused (open), but in case of IVEDI
S.C. DW

A
digital dice circuit can be eas- CD4033, pin 14 serves as lamp test pin
ily realised using an astable and the same is to be grounded.
oscillator circuit followed by The circuit uses only a handful of
a counter, display driver and a dis- components. Its power consumption is
play. also quite low because of use of CMOS astable oscillator configured around
Here we have used a timer NE555 ICs, and hence it is well suited for bat- IC1 as well as capacitor C1 (through
as an astable oscillator with a fre- tery operation. In this circuit two tac- resistor R1), which charges to the bat-
quency of about 100 Hz. Decade tile switches S1 and S2 have been pro- tery voltage. Thus even after switch
counter IC CD4026 or CD4033 (which- vided. While switch S2 is used for ini- S1 is released, the astable circuit
ever available) can be used as counter- tial resetting of the display to ‘0,’ de- around IC1 keeps producing the clock
cum-display driver. When using pression of S1 simulates throwing of until capacitor C1 discharges suffi-
ciently. Thus for du-
ration of depression
START S1 *PIN 14 LEAVE OPEN FOR 4026 OR GROUND IT FOR 4033
of switch S1 and dis-
O O-

R1 R2
10K
14
CK
16 3
DE If
RESET

Q
charge of capacitor
C1 thereafter, clock
pulses are produced
10K
i ►-
CE
2 IC2 R by IC1 and applied to
15
CD4026/4033 clock pin 1 of counter
Vcc R 8
10 12 13 9 11 6 7 IC2, whose count ad-
8 4 D1
7 a b c d e f g vances at a frequency
of 100 Hz until C1
O/P
R3 3 C4 discharges suffi-
10K IC1
0.01M ciently to deactivate
NE555 4 2 9V
+
6 6 9 BATT. T IC1.
+ C1
47M
16V
2
5
GND
1 l R5
When the oscilla-
tions from IC1 stop,
the last (random)
7 10 33K
count in counter IC2
3,8 5
C2 + C3 R4 DIS1 can be viewed on the
COM DEC
0.47M O.OIM ~r 33K LT543 7-segment display.
R6
COMMON CATHODE 220Q. This count would
7-SEGMENT DISPLAY
normally lie between
D1 = 1N4148
0 and 6, since at the
leading edge of every
the dice by a player. 7th clock pulse, the counter is reset to
Decoded Segment Outputs When battery is con- zero. This is achieved as follows.
for Counts 0 through 9 nected to the circuit, the Observe the behavior of ‘b’ seg-
TRUTH TABLE OF 4026 COUNTER AND DISPLAY DRIVER IC
counter and display section ment output in the Table. On reset, at
COUNT a b c d e f 9 h around IC2 (CD4026/4033) count 0 until count 4, the segment ‘b’
0 a is energised and the display output is high. At count 5 it changes
1 would normally show ‘0’, as to low level and remains so during
f b
2 no clock input is available. count 6. However, at start of count 7,
3 Should the display show the output goes from low to high state.
4 any other decimal digit, you A differentiated sharp high pulse
5 d may press re-set switch S2 through C-R combination of C4-R5 is
6 so that display shows ‘0’. To applied to reset pin 15 of IC2 to reset
7-SEGMENT
7 DISPLAY
simulate throwing of dice, the output to ‘0’ for a fraction of a
8
the player has to press pulse period (which is not visible on
9
switch S1, briefly. This ex- the 7-segment display). Thus, if the
• = SEGMENT ON h IS USED TO DRIVE OTHER COUNTERS
tends the supply to the clock stops at seventh count, the dis-

WWW.EFYMAG.COM ELECTRONICS FOR YOU • NOVEMBER 2007 • 97


I

CIRCUIT
IDEAS
play will read zero. There is a prob- other chance until the display is non- the counter by ‘1,’ the same makes the
ability of one chance in seven that dis- zero. circuit somewhat complex and there-
play would show ‘0.’ In such a situa- Note. Although it is quite feasible fore such a modification has not been
tion, the concerned player is given an- to inhibit display of ‘0’ and advance attempted. 

98 • NOVEMBER 2007 • ELECTRONICS FOR YOU WWW.EFYMAG.COM


CIRCUIT
IDEAS

SEISMIC SENSOR S.C. DW


IVEDI

 D. MOHAN KUMAR both its inverting and non-inverting


inputs tied to the negative rail through riod of IC2 is determined by R7 and

T
his circuit simulates a seismic a resistive network comprising R1, R2 C5. With the shown values, it will be
sensor to detect vibrations/ and R3. Under idle conditions (as ad- around two minutes. The high output
sounds. It is very sensitive and justed by VR1), both the inputs receive from IC2 activates T2 and the buzzer

R5 R10 R6 R7 R9
1K 10K 470K 1M 470Q +
PZ1
PIEZO¬
PIEZO BUZZER
ELEMENT
7 8
LED2 V\\
2 7
1 1
R1
100K
R2
10K T1
C2
0.1 M
S1
ON/OFF
SWITCH 7
R4 BC548
A/WV A/WV 2
330Q

A/WV
+ 3
IC1
TL071
6 AA/W
O 4 IC2
NE555
6
R8
1K
R3
100K 3
T2
BC548

h VR1
1M
4 5

+ C1 C6 + __ C3 C5 9V
+
10M IOM zi: LE°i 100M C4 100M BATT. “
25V 25V 25V 0.01M 25V

can detect vibrations caused by the almost equal voltages, which keeps the starts beeping along with red light in-
movement of animals or human be- output low. dication from LED2.
ings. So it can be used to monitor pro- TLO71 is a low-noise JFET input Assemble the circuit on a common
tected areas to restrict entry of un- op-amp with low input bias and off- PCB and enclose in a suitable cabinet.
wanted persons or animals. set current. The BIFET technology pro- Connect the piezo element to the PCB
The circuit uses readily available vides fast slew rates. Capacitor C1 is using single-core shielded wire. En-
components and the design is straight- provided in the circuit to keep the close the piezo element inside a rust-
forward. A standard piezo sensor is differential input of IC1 for better per- proof, small aluminium box. The piezo
used to detect vibrations/sounds due formance. element should be firmly glued to the
to pressure changes. The piezo element When the piezo element is dis- enclosure facing the fine side towards
acts as a small capacitor having a ca- turbed (by even a slight movement), it the case. Fix the sensor assembly on
pacitance of a few nanofarads. Like a discharges the stored charge. This al- the back side of a ceramic tile or gran-
capacitor, it can store charge when a ters the voltage level at the inputs of ite tile with good adhesive. Fix the tile
potential is applied to its terminals. It IC1 and the output momentarily (or bury it in the earth) near the en-
discharges through VR1, when it is dis- swings high as indicated by green trance with the sensor assembly fac-
turbed. LED1. This high output is used to trig- ing downwards. Whenever a pressure
In the circuit, IC TLO71 (IC1) is ger switching transistor T1, which trig- change develops near the sensor, the
wired as a differential amplifier with gers monostable IC2. The timing pe- circuit will be activated. 

WWW.EFYMAG.COM ELECTRONICS FOR YOU • NOVEMBER 2007 • 95


CIRCUIT
IDEAS

CURRENT SENSOR S.C. DW


IVEDI

 D. MOHAN KUMAR transistors in the input to provide very


high input impedance (1.5 T-ohms),

H
igh-wattage appliances like very low input current (10 pA) and by feeding Q9 output to the
electric irons, ovens and heat- high-speed switching performance. piezobuzzer for aural alarm through
ers result in unnecessary The inverting input of IC1 is pre- the intermediate circuitry. Resistors R5
power loss if left ‘on’ for hours unno- set with VR1. In the standby mode, and R6 along with capacitor C1 main-
ticed. Here is a circuit that senses the the primary of the transformer accepts tain the oscillations in IC2 as indicated
flow of current through the appliances e.m.f. from the instrument or sur- by blinking LED1. The high output
and gives audible beeps every fifteen rounding atmosphere, which results in from IC2 is used to activate a simple
minutes to remind you of power-’on’ low-voltage input to IC1. This low oscillator comprising transistors T2
status. voltage at the non-inverting input and T3, resistors R8 and R10, and ca-
This is a non-contact version of cur- keeps the output of IC1 low. Thus tran- pacitor C2.
rent monitor and can sense the flow sistor T1 doesn’t conduct and pin 12 When the Q9 output of IC2 be-
of current in high-current appliances of IC2 goes high to disable IC2. As a comes high, zener diode ZD1 provides
from a distance of up to 30 cm . It uses result, the remaining part of the cir- 3.1 volts to the base of transitor T2.

D1-D4 = 1N4007
R3 R9 S1
D2 1K 2.2K ON/OFF
/
w Vcc
16
R5
10M
SWITCH

MR 11 AA/W R10
12 1.2K

>-H
Q
LU
CO
CO
CO >
D1
10
R6
2.2M
m "— vwv ©„ BC557
<LU £3 «=> cc
Qz co < 3 7 T1 C1
?z
oo w S
s
CO -
+ R2 BC548 IC2 0.2|j
-- cc IC1 100£2
Oo CO

© CD4060
CO D. 6 +
LU
cn i-
O
CO
D3
R1
1.2M CA3140 0/P
m 9
T2 9V
BATT.
z
f A/WV
BC548

X1
VR1
1M
PRESET
2 4 Q3
7
8
GND
15
Q9
m
R7
100Q
AA/W
R8
1M
© C2
22M
16V

R4
230V D4 220£2
AC PRIMARY +
ZD1 PZ1
TO 0-9V
■A
3.1V PIEZO¬
500mA 400mW
LED1 BUZZER
SECONDARY ZENER
TRANSFORMER DIODE

a standard step-down transformer (0- cuit gets inactivated. Since transistor T2 is biased by a high-
9V, 500mA) as the current sensor. Its When a high-current appliance is value resistor (R8), it will not conduct
secondary winding is left open, while switched on, there will be a current immediately. Capacitor C2 slowly
the primary winding ends are used to drain in the primary of the transformer charges and when the voltage at the
detect the current. The primary ends to the negative rail due to an increase base of T2 increases above 0.6 volt, it
of the transformer are connected to a in the e.m.f. caused by the flow of cur- conducts. When T2 conducts, the base
full-wave bridge rectifier comprising rent through the appliance. This results of T3 turns low and it also conducts.
diodes D1 through D4. The rectified in voltage rise at the non-inverting in- The piezobuzzer connected to the col-
output is connected to the non-invert- put and the output of IC1 becomes high. lector of T3 gives a short beep as ca-
ing input of IC CA3140 (IC1). This high output drives transistor T1 pacitor C2 discharges. This sequence
IC CA3140 is a 4.5MHz BIMOS op- into conduction and the reset pin of of IC2 output at Q9 becoming high and
erational amplifier with MOSFET in- IC2 becomes low, which enables IC2. conduction of transistors T2 and T3 re-
put and bipolar transistor output. It IC CD4060 (IC2) is a 14-stage ripple sulting in beep sound repeats at short
has gate-protected MOSFET (PMOS) counter. It is used as a 15-minute timer intervals. 

94 • DECEMBER 2007 • ELECTRONICS FOR YOU WWW.EFYMAG.COM


CIRCUIT
IDEAS

SPEED CONTROLLER IVEDI


S.C. DW
FOR DC MOTOR
 T.K. HAREENDRAN few other discrete components. It is
configured for automobile usage with the master speed controller for the

H
ere is a simple circuit to con- negative terminal of the power supply motor. Components R3, C3 and C4
trol the speed of a DC motor. connected to ground. decouple the DC supply of the oscil-
It can be configured to con- Here IC1 is wired as a low-fre- lator. A blinking-type red LED (LED1)
trol the sweep rate of automobiles’ quency, free-running astable is used for visual indication of power-
’on.’
When the wiper arm of potmeter
LED1 = BLINKING RED LED VR1 is in top position, capacitor C1
R3
10Q
charges through R1, R2 and D1 and
R5
1W 1.5K produces a pulse train at the output of
7 8'
ON/OFF IC1 with long negative and short posi-
SWITCH
C3 1 +L c4
470|J
LED1
POWER
tive pulse widths. Therefore the mo-
tor speed is slow. On the other hand,
R1
1.5K
0.1MT
± 35V
R4
68Q
when the wiper arm of VR1 is at the
bottom position, C1 charges through
R Vcc 2W
A/VW— 1 ' R1, R2 and VR1 and discharges via R2.
VR1 4 8 The resulting pulse train has long posi-
47K 4
POT tive and short negative pulse widths.
T1* Now the motor rotates at a high speed.

R2
1.5K
D1
1N4148
6
IC1
NE555
3
O/P
O BD239

T2*
The output at pin 3 of IC1 is fed to
transistor T1, which, in turn, drives the
BD249 DC motor through high power switch-
i 2 1 5 ing transistor T2 at the selected speed.
+ GND Resistor R4 limits the base current of
12V
T BATT. transitor T2.
+ Diode D2, connected in antiparal-
lel with the DC motor, limits the back
C1 C2 C5“ M1**
0.1 M ““ 0.01M ~r 0.1 M D2 e.m.f. generated by the rotation of the
1N4001
motor. Capacitor C5 suppresses para-
sitic oscillations.
The circuit can be powered by 12V
‘TESTING IS DONE WITH T1 = BC547 AND T2 = SL100
**M1 = SMALL POWER DC MOTOR (12V) IS USED DURING TESTING
DC supply directly from the vehicle’s
battery. For convenience and safety,
enclose it in a small metallic cabinet.
windscreen wiper. multivibrator with pulse-width A medium-size veroboard will do for
The circuit comprises a timer modulation (PWM) controlled output. construction. Use a good-quality DIP
NE555 (IC1), medium-power driver The R-C components like R1, VR1, R2 socket for IC1. Finally, do not forget
transistor BD239 (T1), high-power and C1 determine the frequency of to add a suitable heat-sink for transis-
switching transistor BD249 (T2) and a oscillations. Potmeter VR1 works as tor T2. 

WWW.EFYMAG.COM ELECTRONICS FOR YOU • DECEMBER 2007 • 93


CIRCUIT
IDEAS

LED LIGHTING FOR CHRISTMAS S.C. DW


IVEDI

 RAJ K. GORKHALI T1 and T2 are connected to driver tran- +VE SUPPLY


sistors T3 and T4. These are used to
*
U
sing light effects for decora- light up two rows of LEDs connected <>| ft/
tion on festive occasions is a in parallel with alternate clock pulses.
U
normal practice. Designers are The frequency at which LED1 through CONTROL
kc2

coming up with varieties of electronic LED9, and LED10 through LED18, al- t= CIRCUIT
TT V*.
circuits to fill the imagination of us- ternately light up is about 2 Hz. You \
/ 1ÿ.
ers. can easily change this frequency by / 5=

Here is an easy-to-assemble circuit changing the values of capacitors C2 V

for christmas decoration as shown in and C1. -VE SUPPLY

Fig.1. It comprises four transistors, Resistors R2 and R4 are used to set Fig.2: Christmas Star
eighteen LEDs, a few resistors and two the current through the LEDs. Red
capacitors. Transistors T1 and T2 are (LED1 through LED9) and green LEDs Alternatively, you can design the
configured as an astable multivibrator, (LED10 through LED18) are used for PCB in circular shape with a festive
which means one of the two transis- simulating christmas decoration effects. white lacquer finish on component side
tors is always conducting. Thus the For the brightness variation, you can and conductor tracks on the other. Place
combination produces clock pulses. change the values of resitors R2 and R4. the control circuit at the centre of the
The values of time-constants Take any general-purpose PCB and PCB board, with LEDs mounted along
formed with R6-C2 and R8-C1 pairs cut it into a star shape. Thereafter, as- the outer edge as shown in Fig. 2. Along
have been selected to produce a low- semble the circuit and solder the colour this edge, there are three circular tracks:
frequency clock that is visible to hu- LEDs onto it such that it looks like a The middle one is the positive supply,
man eye. The collectors of transistors christmas star. which goes to the anodes of all LEDs.
The outer track is connected to the cath-
odes of the red LEDs and the inner
//3 //ÿ /yl //ÿ //1'f //ÿ P //3 'V 43 3 P //1[. //3 //3 f_ //3 [.//3
tracks are connected to the cathodes of
the green LEDs.
LED1 LED9 LED10 LED18
To obtain the best effect with the
-
LED1 LED9 = RED LED -
LED10 LED18 = GREEN LED
combination of red and green LEDs,
mount them alternately on the PCB
board. Exercise care so that you do
81 R2 R5 R6 R8 R7 R4 not accidentally connect the red and
7 ON/OFF
SWITCH
22Q
0.5W
470Q

C2
47K 47K

C1
470Q 22Q
0.5W green LEDs in parallel. The forward
R3 47p 47M R1 voltage drops of red and green LEDs
1K 25V 25V 1K
are different.
+
T
— 3V-9V
BATT. T4
2N3904
Q A/WV + + A/WV
T3© The circuit works off a 3V-9V bat-
2N3904
tery. It consumes little current, so two/
O T1
BC547
T2©
BC547
four AA cells or a 9V battery can easily
power the electronic star. You can also
use a stabilised 3V-9V DC mains adap-
Fig.1: LED lighting circuit for Christmas tor in place of the battery. 

92 • DECEMBER 2007 • ELECTRONICS FOR YOU WWW.EFYMAG.COM


CONSTRUCTION

MICROCONTROLLER-BASED
ALARM CLOCK
UMAR
SUNIL K
 PROF. K. PADMANABHAN there is no need to switch on lights
and disturb others to know the time.

D
igital clocks are readily avail- Microcontroller AT89C2051 is at
able in the market. Wall Circuit description the heart of the clock. It is a 20-pin, 8-
clocks, table clocks and desk Fig. 1 shows the circuit of the bit microcontroller with 2 kB of Flash
clocks with pointer or LCD are avail- microcontroller-based alarm clock. programmable and erasable read-only
able at very low cost. Nevertheless, this The clock comprises AT89C2051 memory (PEROM), 128 bytes of RAM,
clock, which can be built within a small microcontroller, ULN2803 octal high- 15 input/output (I/O) lines, two 16-
budget using AT89C2051 microcon- current Darlington transistor arrays, bit timer/counters, a 5-vector two-level
troller chip, has its own advantages. It common-anode 7-segment display, interrupt architecture, a full-duplex se-
can be hung on the wall and time is transistors, other hardware and soft- rial port, a precision analogue com-
visible even in the darkness of night. ware in Assembly language of parator, on-chip oscillator and clock
So when everybody is asleep at night, AT89C2051. circuitry.

O Vcc
I ■ S4
-1 C2 RNW1 = 10k x 8

W
\ LS1 + C1
10p
11 0-1M
16V
1 _X.
3 4 5 6 7 8 9
DIS1 = KLQ564/TWILIGHT 5641 BSR
(4-DIGIT COMMON ANODE 7-SEGMENT DISPLAY)
T5
R6 SK100
20 K 10 5
1 0K 19 18 g

O cc
co
cc
l-
LU
CO
LU
DC
18
17
P1.6
P1.5
P1.4
2
3 CO
o
17
16
10
1
2
e
rf
a

b,
16 4L 4 CM » 15 d
LO
cc
RST
P3.4
1
8
LO
o 15 P1.3
CM
14
P1.2 4 L
5
6
— => 14
13
4
7
c
b
g
'e c,
P3.5
P3.7
9
11
CO
I-
P1.1
13 12
11
3
ad• •dp K

P1.0
< 12 8 11 dp COM COM COM COM
i- 2 P3.0 9
12 9 8 6
LU I— R2 P3.1
CO LU 3
LU CO 10K
5 CO P3.2
DC 5 10
6 T4 T3 T2 T1
< co O P3.3
<
S1 S2
<
u_ CO

S3
GND
4
XTAL
5
7
R7
A/WV © rO r© r-©
HDh R8
vwv

ON/OFF SWITCH
©1 C3
“t O GND
R9
ww
R10
vwv
S2-S4 = PUSH-TO-ON SWITCH XTAL=11.0592MHz

LSI =4Q, 0.5W * REFER TEXT C3, C4 = 22p R7-R10 = 1.2K T1-T4 = B557
LOUDSPEAKER

Fig. 1: Circuit of microcontroller-based alarm clock

Port pins P1.7 down through


P1.0 of IC1 are connected to input
X1
r
t
S5
ON/OFF D1 D2 pins 1 through 8 of IC2, respec-
SWITCH g I 9V
CD D5 tively. These pins are pulled up
CD
IN IC3 OUT Vcc
230V AC CD
o with 10-kilo-ohm resistor network
A
o 7806 3
50Hz CD
CD
R1
CD CD 2 S6 RNW1. Port pins P1.7 down
I
C6 330Q

r T
CD ON/OFF
COM
D4 D3 + SWITCHi T>
• - 0.1m DC
LU
through P1.0 drive all the segments
C5
o 5

I
4.8V (‘g’ down through ‘a’) and decimal
X1 = 230V AC 1000M
25 V NiMH -W o
Q.
D1-D5 = 1N4007 LED1 point (.) of the 7-segment display
PRIMARY TO 9V, 500mA
SECONDARY TRANSFORMER
BATT.
X o
GND with the help of inverting buffer
Fig. 2: Power supply circuit IC2. The display shows the time in

60 • DECEMBER 2007 • ELECTRONICS FOR YOU WWW.EFYMAG.COM


CONSTRUCTION
PARTS LIST up one by one.
Semiconductors:
IC1 - AT89C2051
microcontroller
O
If.
EFY/DEC-07/SUNIL/A-CL0CK o Switch S4 is
used to manually
reset the microc-
IC2
IC3
- ULN2803 current buffer
- 7806, 6V regulator U ontroller, while
T1-T4
T5
D1-D5
LED1
DIS1
- BC557 pnp transistor
- SK100 pnp transistor
- 1N4007 rectifier diode
- 5mm light-emitting diode
- KLQ 564x/TWILIGHT at c the power-on-re-
set signal for the
microcontroller is
derived from the

R2, R6
R3, R4
5641BSR 4-digit, common-
anode, 7-segment display
Resistors (all ¼-watt, ±5% carbon):
R1 - 330-ohm
- 10-kilo-ohm
- 4.7-kilo-ohm
irJ combination of
capacitor C1 and
resistor R2. An
11.0592MHz crys-
tal is used to gen-
R5 - 1-kilo-ohm
R7-R10 - 1.2-kilo-ohm erate the clock fre-
RNW1 - 10-kilo-ohm resistor
network quency for the
Capacitors:
C1
C2, C6
C3, C4
C5
Miscellaneous:
X1
-
-
-
-
10µF, 16V electrolytic
0.1µF ceramic disk
22pF ceramic disk
1000µF, 25V electrolytic

- 230V AC primary to 9V, O


Eg 8
o
microcontroller.
Pin P3.7 provides
the aural indica-
tion signal when
alarm time is
reached. Port pin
500mA secondary
transformer
P3.7 of the microc-
XTAL - 11.0592MHz crystal Fig. 3: A single-side, actual-size PCB layout for microcontroller-based alarm ontoller drives the
S1, S5, S6 - On/off switch clock base pin of tran-
S2-S4 - Push-to-on switch
LS1 - 4-ohm, 0.5W loudspeaker sistor T5 with sink
BATT. - 4.8V rechargeable battery current. The emit-

‘hour.minute,’ where the decimal point


o T4
EFY/DEC-07/SUNIL/A-CL0CK
J1
000000
J2 o ter of transistor T5
drives loud-
(.) indicates the seconds. fbndi speaker LS1 to
There are eight similar light-emit- R7 &vvÿ© DIS1 sound alarm for a
ting diodes (LEDs) in a display: seven
for the seven segments and one for the
f«¥&T3
(J (B U
R80ÿÿ-0
KLQ564x minute.
Port pins 8
000000
decimal point. Anodes of all the eight (QUO)T2 o and 9 are pulled
LEDs are connected to a common pin. U CD U J4 0 T5 O high with resis-
T1-T4=BC557 SKI00 Vo
Thus, it is called the common-anode, 7- R7-R10=1.2K J3 tors R3 and R4,
D1-D5=1N4007
segment display. There are four such o respectively.
C0N?H>ÿ

ss«-
displays with 4 anodes and 8 cathodes T1 000000000
o Switches S2 and

$)43 oooooooo
IC2 R5
connected together. Thus it forms four ULN2803 IK S3, connected at
LSI
digit, 7-segment common anode display.
y0o pins 9 and 8, re-
The selection of the four 7-segment
displays is made by port pins P3.0
JIJ |,L ■■
<LW
°5ÿDH°D3
CS_ÿ , 7806 O R1w
J6
□oooooooo
ojmiiooj51
ICl
AT89C2051
EE SET ALARM
spectively, are
used for fast and
through P3.3 of IC1. Port pins P3.0 R6 10K slow time setting
through P3.3 drive the base pin of pnp TfiT osl o RESET 0000000000 -R4 4.7K
or alarm setting,

y. m
lOOOu IC3 SLOW SET
transistors T4 through T1 with sink
current, respectively. Pin P3.0 of the
microcontoller (IC) goes low and tran-
o BATT+
o
o S6
OXTAIO
11.0592MHz
MM SET
FAST
whichever time
is being dis-
played on DIS1.
sistor T4 is driven into saturation,
which provides supply to common-an-
o 4.8U C6
.lu LEDI °R2vio?ÿ/TR22p 22p
POUIER 1ukqJ5
R3 [®1 C2
"7K[oJ .lu O Switch S1 is
closed only dur-
ode pin 12 of the 4-digit 7-segment dis- Fig. 4: Component layout for the PCB ing alarm setting.
play. Similarly, transistors T3 through Fig. 2 shows
T1 drive the other three pins (pins 9, 8 multiplexed mode for displaying a the circuit of the power supply. 230V,
and 6) of the 4-digit 7-segment display, particular number on the 7-segment 50Hz AC mains is stepped down by
respectively. display. Segment data and display-en- transformer X1 to deliver the second-
Microcontroller IC1 provides the able pulse are refreshed every 5 ms. ary output of 9V, 500mA. The trans-
segment data and display-enable sig- Thus, the display appears to be con- former output is rectified by a full-wave
nals simultaneously in time-division tinuous even though the displays light bridge rectifier comprising diodes D1

62 • DECEMBER 2007 • ELECTRONICS FOR YOU WWW.EFYMAG.COM


I

CONSTRUCTION
through D4, filtered by capacitor C5 microcontroller. Clock setting
and regulated by IC 7806 (IC3). Capaci- The timer is programmed to count As you switch on the power supply,
tor C6 bypasses the ripples present in time in steps of 4 ms at a time. The the microcontroller is reset. If automatic
the regulated output. LED1 acts as the completion of this time starts a reset does not occur, a momentary press
power indicator. Resistor R1 limits the counter, which counts 250 times to on reset switch S4 will show default
current across LED1. A 4.8V recharge- give the basic unit of one second. Fur- time as ‘12:00’ and the alarm time as
able battery is used for power backup. ther division by seconds count accu- ‘6:30.’ These are preprogrammed tim-
An actual-size, single-side PCB for mulation till 60 gives minutes. Again, ings, which can be changed through
the microcontroller-based timer is further division by minutes count ac- the program. But the time can always
shown in Fig. 3 and its component lay- cumulation till 60 gives hours. These be changed using switches S2 and S3
out in Fig. 4. values are counted in direct decimal and alarm time by using switch S1 to-
with the use of instruction DA A (deci- gether with S2 and S3.
Software mal-adjust addition result). The dis- To set the alarm time, close switch
The source code is written in Assem- play routine takes the values of hours, S1. It connects pin 11 of IC1 to ground.
bly language and assembled using minutes and seconds contained in the Then, by using the slow and fast set-
8051 cross-assembler. Source code has internal memory locations and outputs ting switches (S3 and S2), shown in
to be converted into hex code by an them to segments to light up the Fig. 1, the alarm time can be adjusted.
assembler. This hex code is burnt into corresponding number. For example After this, open switch S1, which re-
AT89C2051 microcontroller by a suit- to show ‘1’, outputs to segments ‘b’ moves grounding from pin 11 of IC1
able programmer for AT89C2051. Such and ‘c’ alone are high and the outputs and restores display of clock time on
a programmer was published in to rest of the segments are low. When the display unit.
May 2004 EFY issue. Programmed the time shown matches with the EFY note. Source code of this
microcontroller is available from Kits pre-entered alarm time, the audio out- project is included in this month’s
‘n’ Spares. It is well commented and put fed to loudspeaker LS1 through EFY-CD.
easy to understand. The timing is set pin 11 of IC1 AT89C2051 generates
Prof. K. Padmanabhan retired from Alagappa
by the internal hardware of the sound. College of Technology, Guindy, Chennai

ALARM CLOCK
$mod51 TUAL TIMEAND ISSUES MOV A,#1
ORG 0H ALARM ON PIN11. MOV 41H,A ; IF NOT MAKE IT 1 TO HOURS
AJMP 30H MOV A,44H ZM: MOV A,#0
ORG 0BH ;TIMER 0 INTERRUPT VECTOR CJNE A,41H,R ;HOURS COMPARE MOV 40H,A ; CLEAR MINUTES AFTER HOUR IS
AJMP 220H ;Timer 0 Interrupt service routine MOV A,43H INCREASED
address CJNE A,40H,R ;BOTH COMPARE EQUL ISSUE zm1:
ORG 30H ALARM FOR ONE zm2: acall delay1
MOV SP,#60H ;set stack pointer MINUTE acall disp1
MOV P3,#0FFH ;set all port 3 bits high to enable CALL DISP1 ajmp update
inputs also CPL P3.7 ; A PULSE ON THIS PIN TO SPEAKER RT1: RET
MOV P1,#0 ;set port 1 to all zeros via a transistor ala_update:
MOV TMOD,#01100001B ;TIMER 1 - MODE 2 acall delay1 JB P3.4,Ha ; minUTE SET M KEY pin 8
COUNTER,TIMR-0 R: RET MINSET1:MOV A,R2
TO MODE 1 UPDATE: ADD A,#1
BEG: MOV TH0,#0F0H ;TIMER REG.0 IS SET TO F000, Kk: JB P3.4,H ; MINUTE SET M KEY pin 8 DA A
GIVES 4 ms (12mc XTL) MINSET: MOV A,R2 MOV R2,A
MOV TL0,#0H ; timer low reg. is zero ADD A,#1 CJNE A,#60H,RT1a
MOV R6,#226;INTERRUPT COUNTS 226 times DA A MOV R2,#0
gives 1 second MOV R2,A MOV A,43H ;GET THE MINUTES
(11MHZ xtal) or 244 for 12 MHz crystal CJNE A,#60H,RT1 ADD A,#1
SETB TR0 ;START TIMER 0 MOV R2,#0 DA A ;ADD 1 DECIMALLY AND RE WRITE INTO
SETB ET0 ; ENABLE TIMER 0 INTERRUPT MOV A,40H ;GET THE MINUTES 40H
SETB EA ; ENABLE INTERRUPT GLOBAL ADD A,#1 MOV 43H,A
MOV IP,#01H ; interrupt priority is timer 1 (now DA A ;ADD 1 DECIMALLY AND RE WRITE INTO CJNE A,#60H,RT1a ;HAS 60 GONE?
not reqd., but if later 40H MOV A,#0
external interrupt added, it is needed) MOV 40H,A MOV 43H,A
MOV A,#12H ;’HOURS CJNE A,#60H,RT1 ;HAS 60 GONE? H1a: MOV A,44H
MOV 41H,A ; “12”to start with (HOURS counter) MOV A,#0 ADD A,#1 ;ADD 1 TO HOURS IN 41H INTERNAL
MOV A,#0 MOV 40H,A REGISTER
MOV 40H,A ;MINUTES COUNTER H1: MOV A,41H DA A
MOV R2,#0 ;SECONDS CTR ADD A,#1 ;ADD 1 TO HOURS IN 41H INTERNAL MOV 44H,A
MOV A,#06H REGISTER CJNE A,#13H,RT1a ; HAS 12 EXCEEDED?
MOV 44H,A ;ALARM HOURS DA A MOV A,#1
MOV A,#30H ; let it be 6’O clock MOV 41H,A MOV 44H,A
MOV 43H,A ;ALARM MINUTES CJNE A,#13H,RT1 ; HAS 12 EXCEEDED? AJMP zm1a
CLR TF0 ; timer overflow has to be cleared MOV A,#1 Ha: JB P3.5,RT1a ;hour set - H key pin 9 !
LOOP: jnb p3.7,alaloop ;Is pin 11 low or high? if low, MOV 41H,A MOV A,43H ;GET THE MINUTES
user wants to adjust AJMP zm1 ADD A,#1
alarm time, so go to alaloop H: JB P3.5,RT1 ;hour set - H key pin 9 ! DA A ;ADD 1 DECIMALLY AND RE WRITE INTO
CALL ALAR_COM ;compare if time of clock is MOV A,40H ;GET THE MINUTES 40H
alarmtime & raise ADD A,#1 MOV 43H,A
sound on pin11 it. DA A ;ADD 1 DECIMALLY AND RE WRITE INTO CJNE A,#60H,RT1a ;HAS 60 GONE?
call update ; update program checks for keys 8,9 40H MOV A,#0
pressed low and takes action to MOV 40H,A MOV 43H,A
adjust minutes or hours of time of clock CJNE A,#60H,RT1 ;HAS 60 GONE? MOV A,44H
CALL DISP1 ; disp1 is to show time in MOV A,#0 ADD A,#1 ;ADD 1 TO HOURS IN 41H INTERNAL
hours:minutes MOV 40H,A REGISTER
SJMP LOOP ; repeat by looping MOV A,41H DA A
alaloop: call ala_update ; if pin11 low, then update alarm ADD A,#1 ;ADD 1 TO HOURS IN 41H INTERNAL MOV 44H,A
as user sets via pin 8,9 REGISTER CJNE A,#13H,RT1a ; HAS 12 EXCEEDED?
call aldisp ; show time set for alarm hours:min DA A MOV A,#1
jmp loop MOV 41H,A MOV 44H,A ; IF NOT MAKE IT 1 TO HOURS
ALAR_COM: ;COMPARES ALARMTIME WITH AC- CJNE A,#13H,RT1 ; HAS 12 EXCEEDED? ZMa: MOV A,#0

64 • DECEMBER 2007 • ELECTRONICS FOR YOU WWW.EFYMAG.COM


I

CONSTRUCTION
MOV 43H,A ; CLEAR MINUTES AFTER HOUR IS MOV @R0,A S5: MOV P3,A ; make that LED on
INCREASED INC R0 S4: ACALL DELAY1 ; let it burn for some time
zm1a: MOV A,40H MOV A,#0FFH;extinguish the digit after that time
zm2a: acall delay1 ANL A,#0F0H MOV P3,A ;to prevent shadow
RT1a: setb ea RR A s6: RET
RET RR A ledcode: ;these are code for the numbers 0 to 9 and A to
ALRMCHK: RR A F
ALDISP: MOV A,43H RR A DB 7EH,0CH,0B6H,9EH,0CCH,0DAH,0FAH
MOV R0,#12H ; four digits from 12h to 15h MOV @R0,A DB
ANL A,#0FH INC R0 0EH,0FEH,0CEH,0EEH,0F8H,72H,0BCH,0F6H,0E2H
MOV @R0,A MOV A,41H DELAY1:MOV R5,#0ffH
INC R0 ANL A,#0FH N: NOP
MOV A,43H MOV @R0,A nop
ANL A,#0F0H INC R0 DJNZ R5,N
RR A MOV A,41H RET
RR A ANL A,#0F0H ORG 220H
RR A RR A TIM0ISR: push psw
RR A RR A push acc
MOV @R0,A RR A MOV TH0,#0F0H ;AUTO RELOAD VALUE
INC R0 RR A DJNZ R6,K1A ;r6 WAS FFH, SO 256 TIMES 4 ms
MOV A,44H MOV @R0,A GIVES 1 s
ANL A,#0FH MOV R0,#18H MOV R6,#226 ; 11.05 MHz use 244 for 12 MHz crys-
MOV @R0,A MOV R4,#8 tal
INC R0 mov dptr,#ledcode MOV A,R2
MOV A,44H MOV R7,#3 ADD A,#1 ;ADD 1 TO SECONDS
ANL A,#0F0H PQ2: CALL SEGDISP DA A
RR A INC R0 CPL 0H ;COMPLEMENT DECIMAL POINT BIT
RR A CLR C EVERY
RR A MOV A,R4 SECOND
RR A RRC A MOV R2,A
MOV @R0,A MOV R4,A CJNE R2,#60H,K1A ;<1 MIN SEC >60 ?
MOV R0,#12H JNC PQ2 M1: MOV R2,#0 ;CLEAR SECONDS
MOV R4,#8 PV3: RET MOV A,40H
mov dptr,#ledcode SEGDISP: MOV A,@R0 ADD A,#1 ;ADD TO MIN
MOV R7,#3 ANL A,#0FH DA A
PQ21: CALL SEGDISP cjne a,#00h,k ;LEADING ZERO SUPPRESSION MOV 40H,A ;MINUTES COUNTER
INC R0 k1: mov a,r4 CJNE A,#60H,K1A ;IS MIN >60 ?
CLR C rrc a ; ZERO IS FIRST DIGIT HR: MOV 40H,#0 ;60 made 0
MOV A,R4 jc s6 ; SKIP MOV A,41H ;hour add
RRC A mov a,@r0 ADD A,#1
MOV R4,A anl a,#0fh DA A
JNC PQ21 k: MOVC A,@A+dptr MOV 41H,A
PV31: RET ORL A,#01H CJNE A,#13H,K1A
DISP1: DJNZ R7,S3 ; FOR SECOND DIGIT THE DEC. PT IS MOV A,#1 ; greater than 12, make 1
REFRESH: ;The content of 18 to 1F memory locations AFFECTED MOV 41H,A
are output on LEDs JB 0H,S3 ; IF THE SECONDS TIMER BIT IS NOT SET K1A: pop acc
;only numbers 0 to 9 and A to F are valid data anl a,#0feh pop psw
in these locations S3: MOV P1,A ;#SEGMENT_PORT RETI ;INTERRUPT RETURN INSTRUCTION
MOV A,40H S1: MOV A,R4 END 
MOV R0,#18H ; four digits from 18 to 1Bh CPL A
ANL A,#0FH ORL A,#0B0H ;SET BITS 7,5 AND 4 INPUT KEYS

0 MIRACLE* An ISO 9001:2000 company


No More Waiting !

only hours
Laser Cut Stencil
. _ llllllll _
Pitch Opening
Higher Capacity 1 Phase/
0.25 MM ::: 10 MIL
3 Phase Power Transformers “11111111“ Also:
We are introducing Higher Capacity Single / Three Phase Power
Transformers forvarious Industrial applications like Encoders •Diamond Sieves • Shims
® Isolation ® Charger ® Control •Photo-Plotting •Laser Marking
Transformer Transformer Transformer L

□ Power ® Invertors □Auto


Transformer Transformer Transformer PRISM CIRCUITRONKS PVT. LTD.
precision printed circuit board processes
MIRRCLE ELECTRONIC DEVICES PVT LTD.
No. 65/2, Kamakshipalya Indl Estate, Magadi Main Road, Bangalore : 560 079 (India) 221, Yogi Industrial Estate, Ram Mandir Road,
Tel: +91-80-2348 5149 Fax : +91-80-2348 0882 E-mail : miracle@vsnl.com Goregaon(W), Mumbai-400 104 Tel. 2676 40 59
Fax No. 2676 39 94 Email : prakashj@bom4.vsnl.net.in
www.toroidal.com Visit us at: www.prismstencil.com

66 • DECEMBER 2007 • ELECTRONICS FOR YOU WWW.EFYMAG.COM


CONSTRUCTION

SIMPLE PC-BASED DIGITAL


SOUND-LEVEL METER SANI TH
EO

 R. SUNDARA KUMAR AND ality because of poor processing more advanced functionalities can be
MALAYAPPASAMY power, limited storage and poor dis- implemented in it. This article de-
play. scribes a digital sound-level meter us-

S
ound-level meters measure A PC-based sound-level meter not ing a PC.
sound-pressure level and are only overcomes these limitations but
commonly used in noise pollu- Sound-level measurement
PARTS LIST
tion studies. Most of the sound-level standards
Semiconductor:
meters are hand-held, battery-powered IC1 - LM358 dual op-amp
A basic sound level meter shows the
devices and often limited in function- IC2 - MAX187 12-bit ADC sound-pressure level with different fre-
IC3 - MAX232 dual RS-232 quency weightings (linear, A, B and
TABLE I driver/receiver
C) and with different time integrations
IC4 - LM7805 5V regulator
Noise Levels in Different LED1 - 5mm light-emitting diode (linear, fast, slow and impulsive) that
Environments BR1 - 1A bridge rectifier are used for noise assessment. The
Resistors (all ¼-watt, ±5% carbon): current international standard for
Environment Decibels R1, R3, R4, R5 - 10-kilo-ohm
(dBA) R2, R6 - 1-kilo-ohm sound-level meter mandates the inclu-
VR1 - 1-mega-ohm preset sion of an A-frequency-weighting fil-
Soft whisper-quiet
Capacitors: ter and also describes other frequency
residence-night time 25
C1, C3, C6,
Quiet residence-daytime 35 C11, C13 - 0.1µF ceramic
weightings of ‘C’ and ‘Z’ (zero). In al-
Light traffic at 30 metres 55 C2 - 0.01µF ceramic most all countries, the use of A-fre-
C4, C5 - 4.7µF, 16V electrolytic quency-weighting is mandated for pro-
Vacuum cleaner, conversation 65 C7, C8, C9, C10 - 10µF, 16V electrolytic
C12 - 1000µF, 25V electrolytic tection of workers against noise-in-
Factory, traffic at 10 metres 75
Miscellaneous: duced deafness.
Orchestral concert 85
X1 - 230V AC primary to 9V, The standard sound-level meter is
Lawnmower 95 100mA secondary more correctly called an ‘exponentially
Low-flying jet, close thunder 105 transformer
CON1 - 9-pin D-type serial-port averaging sound-level meter’ as the
Disco/rock concert 115 female connector AC signal from the microphone is con-
Threshold of pain 130 MIC - Condenser microphone
verted into DC by a root-mean-square
(RMS) circuit and
o thus it must have a
+5V
C5 C6
I C11-ÿ
C10
time-constant of inte-
R1
10K
R2
VR1
1MP 16vT °ÿT VDD SHDN
0.1 |J
n~ 10M
16V
gration; today, re-
ferred to as time-
+ 1K 8
—1 1 vwv
2
IC1 1
|—
R5
10K ANAIN
1 3
DOUT
16 2 weighting. The output
of the RMS circuit is
C1
LM358 | VWv 2 6 11 13
COND. 0.1M IC2 cs
MIC 0+5V
3 C2
7 9 8 linear in voltage and
0.01M MAX187
4 SCLK passed through a
8 12 14 cr cn cr
4 5 IC3 co
Q cc a
logarithmic circuit to
R3 1
10K + MAX232 o o o 6 give a linear readout
LL
LU g C7 11 2 3 45 |
C3-r- cr o 10m 3 \66 67 O8 O in decibels. The refer-
0.1M 16V 9/
4 CON1
ence pressure is set
C8
+ 9-PIN D-TYPE by the international
SERIAL PORT
5
R4 C4
16V 6 15 FEMALE agreement to be 20
CONNECTOR
10K 4.7M C9—
micropascals for air-
16V
10M + borne sound. It fol-
GND 16V
a lows that the decibel
is not a unit but sim-
ply a dimensionless
Fig. 1: PC-based digital sound-level meter ratio—in this case, the

68 • DECEMBER 2007 • ELECTRONICS FOR YOU WWW.EFYMAG.COM


CONSTRUCTION
approximation ADC, a fast track/hold
o (1.5 µs), an on-chip clock and a high-
LXJ
BR1 = 1 A BRIDGE RECTIFIER

t
230V AC
50Hz
o
o
o
o Q
BR1 +
IN IC4
7805 3
OUT +5V
O
speed 3-wire serial interface. An ex-
ternal clock accesses data from the in-
terface, which communicates without
O 2 R6 external hardware to most digital sig-
lO r1
C5

C12
1000[J
COM
C13 —i—
0.1 M
1K
O'
LU
5
O
nal processors and microcontrollers.
Power consumption is 7.5 mW and it
25V LED1
X1 = 230V AC has excellent AC characteristics.
PRIMARY TO 9V, 100mA O
GND Ease of use and small package size
SECONDARY TRANSFORMER
make this converter ideal for remote
Fig. 2: Power supply circuit DSP and sensor applications, or for cir-
cuits where power consumption and
OUTPUT CODE meters are usually fitted with a filter space are crucial. With a 12-bit ADC,
FULL-SCALE
TRANSITION whose response to frequency is almost we get maximum sample value in 0 to
11...111 like that of the human ear. If the A- 4095 range. The chip finds use in ap-
11...110- weighting filter is used, the sound- plications ranging from digital sound-
11...101 - ■
pressure level is given in dBA unit. level meters to high-end application
/ The noise levels, taken from Yu Fung- such as input for fast Fourier trans-
FS=+4.096V
FS 20 sound-level meter operating form (FFT) programs, which is used
1LSB =
4096 manual, for various sources in dBA are to convert time domain signals to fre-
00...011 ■■
listed in Table I. quency domain signals.
00...010-- Internal protection. Internal protec-
00...001 ■■
Circuit description tion diodes that clamp the analogue
00...000 LJ I
0 12
1 — --3 K H
— I—
i -
» -

INPUT VOLTAGE (LSBs) FS-3/2LSB


1 ►
FS
The circuit of the PC-based digital
sound-level meter is shown in Fig. 1.
input allow the input to swing from
–0.3V to VDD+0.3V without damage.
It uses MAX187, MAX232 and LM358 However, for accurate conversions
Fig. 3: MAX187/MAX189 unipolar transfer ICs as the main components for con- near full scale, the input must not ex-
function. Full scale=4.096V verting sound into a digital signal. ceed VDD by more than 50 mV, or be
lower than GND by 50 mV. If the ana-
logue input exceeds the supplies by
TABLE II
more than 50 mV beyond the supplies,
Serial Port (RS-232) Interface Pinout and Signals limit the input current to 2 mA, since
9 pin Acronym Full name Direction Meaning larger currents degrade conversion ac-
1 DCD Data Carrier Detect ← Modem connected to another curacy.
2 RxD Receive Data ← Receives bytes into PC Driving the analogue input. The in-
3 TxD Transmit Data → Transmits bytes out of PC
put lines to the analogue input
(ANAIN) and ground (GND) should
4 DTR Data Terminal Ready → I’m ready to communicate
be kept as short as possible to
5 SG Signal Ground — Ground
minimise noise pickup. Shield longer
6 DSR Data Set Ready ← I’m ready to communicate
leads. Because the MAX187 incorpo-
7 RTS Request To Send → RTS/CTS flow control rates a T/H (track/hold), the drive re-
8 CTS Clear To Send ← RTS/CTS flow control quirements of the op-amp driving
9 RI Ring Indicator ← Telephone line ringing ANAIN are less stringent than those
Note. DCD is sometimes labeled CD for a successive-approximation ADC
without a T/H. Typically, the input
ratio of two pressures. The working of this circuit conforms capacitance is 16 pF.
The decibel (dB) is a logarithmic to the noise levels as per Table I. The Internal reference. The MAX187 has
unit used to describe a ratio. The ratio power supply for the circuit is shown an on-chip reference with a buffered
may be power, sound pressure, volt- in Fig. 2. temperature-compensated band-gap
age, intensity, etc. Not all frequencies diode trimmed to +4.096V±0.5%. Its
are equally loud. This is because the MAX187 12-bit ADC output is connected to REF and also
human ear does not respond equally MAX187 is a 12-bit analogue-to-digi- drives the internal DAC. The REF is
to all frequencies. We are much more tal converter (ADC) having a resolu- decoupled with a 4.7µF capacitor. The
sensitive to sounds in the frequency tion of 1/4096 volt. It operates off +5V output can be used as a reference volt-
range of 1 kHz to 4 kHz (1000 to 4000 and accepts a 0V-5V analogue input. age source for other components and
vibrations per second). So sound The chip features an 8.5µs successive- can source up to 0.6 mA. The internal

70 • DECEMBER 2007 • ELECTRONICS FOR YOU WWW.EFYMAG.COM


CONSTRUCTION
o DOO
o or 4.096V/4096.

MAX232 dual RS-232


0 driver/receiver

Snip
The MAX232 is a dual RS-232 driver/
receiver that includes a capacitive volt-
age generator to supply EIA-232 volt-
age levels from a single 5V supply. Each
receiver converts EIA-232 inputs into
5V TTL/CMOS levels. Typically, these
receivers have a threshold of 1.3V and
a hysteresis of 0.5V, and can accept
o O ±30V inputs. Each driver converts TTL/
CMOS input levels into EIA-232 levels.
Fig. 4: Actual-size, single-side PCB for the simple PC-based digital sound-level meter RTS line connected to pin 8 of
MAX232 (IC3) acts as chip-select, DTR
connected to pin 13 of IC3 provides
POWER
fl;ÿOwv\x-© >R4 ©
O
9-PIN con PORT O synchronous clock signal, while DSR

Cl
lOOOu

+o
R6i 6
1K> LED1
10K OK lu
feJC6
IC2
C3f©
5
|@j • o o o o □
o o o o o
o
connected to pin 14 of IC3 is used for
data transfer for MAX 187. Conversion
is initialised by high-to-low transition
BR1 c
cc
-ÿ
□ =i|ÿloo |> LM358 |o “

K
CO
o o o o a a o a oo
on RTS line, while the end of conver-
n>
[\

:UG
r I
X
sion is indicated by active-high state

jfr®? :(D- <33


IZ ■* <r
MAX232 U
IC4 on DSR line. Similarly, sampled
C0N2 aaaaaaaa
9U AC f digitised data is accepted by clocking
o
07 12 serial pulses on DTR line, and at
w Eru
C8

* UR1
COND: . Olu u
the same time, bit value is accepted by
DSR to calculate the sample value.

o TRANSFORMER
XI SECONDARY +03
MIC
C2 EFY/DEC07/SANI
DIGITAL SOUND LEUEL METER o Here, the input sample voltages of the
ADC are between 0V and 4.096V.
Fig. 5: Component layout for the PCB
LM358 dual operational
reference is enabled by pulling the SCLK digital clock inputs. SCLK must amplifier
SHDN pin high. Letting SHDN float be kept inactive during the conversion. LM358 is a dual operational amplifier
disables the internal reference, which An internal register stores the data consisting of two independent, high-
allows the use of an external reference. when conversion is in progress. SCLK gain, internally frequency-compen-
Initialisation and starting a con- clock shifts the data out of this regis- sated operational amplifiers that are
version. When power is first applied, ter any time after the conversion is designed specifically to operate from
it takes the fully discharged 4.7µF ref- complete. DOUT transition occurs on the a single power supply over a wide
erence bypass capacitor up to 20 ms to falling edge of the SCLK clock. The range of voltage. Operation from split
provide adequate charge for specified next falling clock edge produces the power supplies is also possible. Ap-
accuracy. With SHDN pulled up high, MSB of the conversion at DOUT, fol- plications include transducer amplifi-
the MAX187 is now ready to convert. lowed by the remaining bits. ers, DC gain blocks and all the con-
To start a conversion, pull CS pin Since there are 12 data bits and one ventional op-amp circuits.
low. At the falling edge of CS, the T/ leading high bit, at least 13 falling clock Condenser mic is used as an input
H enters its hold mode and a conver- edges are needed to shift out these data device. The sound is converted into elec-
sion is initiated. That is, the T/H stage bits. Raise the CS pin high after the trical signal using condenser mic. This
holds input voltage, the ADC begins LSB of the conversion signal has been signal is then amplified by LM358. The
to convert, and DOUT changes from high read. After the specified minimum audio output is received through pin 2
impedance to a low logic state. After time, CS can be pulled low again to and the feedback is given through VR1.
an internally timed 8.5µs conversion initiate the next conversion. Here, VR1 is used to get an output am-
period, the end of conversion is sig- The data output from the MAX187 plitude level between 0 and 4 volts. This
naled by DOUT with a high logic state. is binary, and Fig. 3 depicts the analogue output is fed to analogue in-
Data can then be shifted out serially nominal transfer function. Code put (ANAIN) pin 2 of MAX187 through
with the external clock. transitions occur halfway between C2 and R5, which converts analogue
Conversion-start and data-read op- successive integer LSB values. If full signal into digital signal and feeds to
erations are controlled by the CS and scale = +4.096V, then 1 LSB = 1.00 mV the computer via MAX232.

WWW.EFYMAG.COM ELECTRONICS FOR YOU • DECEMBER 2007 • 71


I

CONSTRUCTION
98SE machine. The noise captured by
DIGITAL SOUND LEVEL METER the condenser mic is converted into
digital signal through MAX187. This
digital signal can be observed on your
monitor screen through this program.
INSTANTANEOUS
VOLTAGE
|4m Ui
VGltW
The instantaneous voltage, the captured
voltage and sound level in dBA can be
seen simultaneously on your PC screen.
CAPTURE® Ul in
VOLTAGE vol U You can also observe the reference noise
level as per the list given in Table I
soimu jijfi in through this program. The program
LEVEL docIMl
output is shown in the screenshot.

ENVIRONMENT THRESHOLD OF PAIN Operations


(APPROX!
The operation is simple. Only four
wires need to be connected to the
aict TO KNOW THE & LEVEL OF SOUND 9-pin, D-type female connector as
shown in Fig. 1. Plug-in the circuit to
Screenshot of PC-based digital sound-level meter the Com-port (serial port) male con-
nector of your PC. Run the Visual Ba-
Interfacing to a computer is done the port of the PC and the interfacing sic program.
through an RS-232, 9-pin, D-type se- circuit for electrical isolation. The mic should face the noise
rial port connector. The pin details of A single-side, actual-size PCB lay- source. Use of a good-quality con-
this serial port connector are given in out for the circuit is shown in Fig. 4 denser mic is recommended for higher
Table II. DSR (data set ready), DTR and its component layout in Fig. 5. You sensitivity of the instrument. You can
(data terminal ready) and RTS (request can also construct the project on a gen- observe the noise level captured by the
to send) are the pins of UART (uni- eral-purpose PCB. condenser mic on the monitor screen.
versal asynchronous receiver/trans- EFY note. The source code of this
mitter) that are used for communica- Software program project is included in this month’s
tion with MAX187. Use of an The program (sound.frm) is written in EFY-CD and can also be downloaded
optocoupler is recommended between Visual Basic. It was tested on a Win from www.efymagonline.com.

SOUND.FRM
;Source code of Sound Level meter ElseIf (SOUND < 70 = True) Then If (MSComm1.DSRHolding = False) Then
ENVIRONMENT = "VACUUM CLEANER, CON- COUNTER = COUNTER + 2 ^ (11 - b)
Option Explicit VERSATION" End If
Dim i As Double ElseIf (SOUND < 80 = True) Then
Dim a As Double ENVIRONMENT = "FACTORY, TRAFFIC AT 10 SAMPLE = COUNTER
Dim b As Integer METERS" Next
Dim x As Double ElseIf (SOUND < 90 = True) Then End Function
Dim y As Double ENVIRONMENT = "ORCHESTRAL CONCERT"
Dim REF As Double ElseIf (SOUND < 100 = True) Then Public Function PEAK_SAMPLE() As Integer
Dim SOUND As Double ENVIRONMENT = "LAWNMOWER" For a = 1 To 1000 Step 1
Dim VOLTAGE As Integer ElseIf (SOUND < 110 = True) Then TEMP = SAMPLE
Dim FINAL_VOLT As Integer ENVIRONMENT = "LOW-FLYING JET, CLOSE If (REF < TEMP = True) Then
Dim COUNTER As Double THUNDER" REF = TEMP
Dim TEMP As Double ElseIf (SOUND < 120 = True) Then End If
Dim ENVIRONMENT As String ENVIRONMENT = "DISCO/ROCK CONCERT" Next
Else PEAK_SAMPLE = REF
Public Sub Form_Load() ENVIRONMENT = "THRESHOLD OF PAIN" REF = 0
MSComm1.CommPort = 1 End If End Function
MSComm1.PortOpen = True Text4.Text = ENVIRONMENT
Timer1.Interval = 1000 Public Function DELAY() As Integer
End Sub End Sub 'THIS GIVES A DELAY OF 2uSEC
i=0
Public Sub Command1_Click() Public Function SAMPLE() As Integer Do While (i < 10 = True)
FINAL_VOLT = PEAK_SAMPLE 'THIS FUNCTION WILL TAKE 1 SECOND TO EX- i=i+1
VOLTAGE = ((409.6 * FINAL_VOLT) / 4096) ECUTE Loop
Text1.Text = (VOLTAGE / 100) COUNTER = 0 End Function
x = ((4.096 * FINAL_VOLT) / 4096) MSComm1.DTREnable = True
y=x-1 MSComm1.RTSEnable = False Public Function HIGH_DELAY() As Integer
SOUND = ((20 * y) + 60) DELAY 'THIS GIVES A DELAY OF 30uSEC
Text2.Text = SOUND MSComm1.DTREnable = False i=0
'THIS IS TO SELECT THE ENVIRONMENT DELAY Do While (i < 150 = True)
If (SOUND < 45 = True) Then MSComm1.DTREnable = True i=i+1
ENVIRONMENT = "SOFT WHISPER, QUIET RESI- DELAY Loop
DENCE-NIGHTTIME" MSComm1.RTSEnable = True End Function
ElseIf (SOUND < 50 = True) Then HIGH_DELAY
ENVIRONMENT = "QUIET RESIDENCE-DAY- For b = 0 To 11 Step 1 Private Sub Timer1_Timer()
TIME" MSComm1.DTREnable = False Text3.Text = ((4.096 * SAMPLE) / 4096)
ElseIf (SOUND < 60 = True) Then DELAY End Sub
ENVIRONMENT = "LIGHT TRAFFIC AT 30 MSComm1.DTREnable = True 
METERS" DELAY

74 • DECEMBER 2007 • ELECTRONICS FOR YOU WWW.EFYMAG.COM

You might also like