This is only a preview of the August 1990 issue of Silicon Chip. You can view 57 of the 112 pages in the full issue, including the advertisments. For full access, purchase the issue for $10.00 or subscribe for access to the latest issues. Articles in this series:
Items relevant to "Digital Sine/Square Wave Generator; Pt.2":
Articles in this series:
Articles in this series:
Articles in this series:
|
APESKY INSECT
TO ANNOY YOUR FRIENDS
Horace the cricket always chirps back
whenever he hears a noise. If you keep quiet,
so does Horace. Make a noise and he joins in
and flashes his LED eyes at the same time. He
can also be concealed to play his favourite
game of hide and seek.
By JOHN CLARKE
PARTS LIST
You know how crickets can be
quite annoying at night. You can
hear the little beggars chirping
away somewhere under the lawn
but when you go creeping out to
find them, they shut up until you go
away. And so you should, you intolerant humanoid!
But why should crickets be confined to the great outdoors? Why
not have your own pet cricket who
can pester people when you want
him to? So here's Horace, the electronic cricket. He's a 6-legged
beastie, fully house-trained and
under your command.
Horace incessantly chirps away
while there is any noise or talking
going on and he only stops when the
noise ceases. We are sure that our
readers will be very resourceful in
finding uses for Horace.
And Horace is inexpensive. He
only uses a single cheep (sorry
cheap) IC and a few other bits and
pieces all built onto a PC board. The
board itself becomes Horace's body
and the battery his belly. He also
has a couple of LEDs for eyes, a
miniature microphone mouth, a
slider switch tail and six resistors
for legs. He has a certain jaunty
style, aided by the springyness of
his resistor legs.
66
SILICON CHIP
Best of all, Horace is easy to
build. So let's see how he works.
Circuitry
The circuit for Horace uses just
one low power quad op amp IC, an
LM324. It is ideal for this task since
it will operate happily from a single
low voltage supply and has a low
current drain of 3 milliamps or less.
Horace has two modes of operation. The first is the "listen" mode,
whereby Horace listens with its
electret microphone for any noises.
Having detected a noise above the
threshold level, the circuit switches
into its "chirping" mode. Only one
mode is possible at any one time, so
that the circuit can only listen or
chirp - it can't do both at the same
time.
In the listen mode, IClc functions
as a non-inverting amplifier with a
gain of 455, as set by the lMQ and
2.ZkQ resistors connected to pin 9.
The non-inverting (+)input of IClc,
pin 10, is biased to about + 4.5V by
the lO0kQ resistor connected to pin
13 of ICld.
During listen mode, the pin 14
output of ICld normally sits high (ie,
+ 9V). This is because of the way in
which the inputs of ICld are biased.
The lMQ pullup resistor at pin 12
1 PC board, code
SC08106901, 91 x 61 mm
1 electret microphone insert
1 piezo transducer
1 9V battery holder (DSE Cat.
S-61 50 or equivalent)
1 9V 216 battery
1 subminiature DPDT slider
switch
2 PC stakes
Semiconductors
1 LM324 quad op amp (IC1)
1 1 N4148 diode (D1)
2 red LEDs (LED 1, LED 2)
Capacitors
1 1 0µF 16VW PC electrolytic
2 0.22µF RBLL or tantalum
electrolytics (or monolithics)
2 .039µF metallised polyester
Resistors (0.25W, 5%)
3 1MQ
1 4.7kQ
9 1 00kQ
1 2 .2kQ
1 22kQ
1 1 kQ
6 1 0MQ 1W (for legs)
Miscellaneous
Solder, tinned copper wire , 5
screws and nuts for battery
holder and piezo transducer.
and diode Dl holds this input at one
diode voltage drop above the output
voltage of IClc. And the pin 13 inverting input is effectively at the
+9V
10
100k
~,
+
16VW.,._
100 k
s+11, J
+ J
100k
.039
T
9V :
...I...
ELECTRET
MICROPHONE
l
100k
PIEZO
TRANSOUCER
100k
2.2k
22k
.I,;"
C3
...
0.22I 100 k
RBLL
-
.,.
. 0391
1M
10Mi
1W
LEG1
10Mf
1W
LEG 2
10Mf
1W
LEG3
I
I
10M
1Wf
LEG4
10Mf
1W
LEGS
10M'
1W
LEG6
""'~
100k
.,.
LE02 ~
i
HORACE
same voltage as the output of IClc
since IClc itself is biased from pin
13.
This incestuous arrangement
means that pin 12 of ICld is normally above pin 13 and therefore pin 14
is high.
Chirper and LED driver
IClb provides the chirp part of
the circuit. It is an oscillator which
drives the piezo transducer but
while ever pin 14 of ICld is high,
!Cl b can't function; similarly with
ICla, which is the LED driver for
Horace's eyes. We'll come back to
these two op amps later.
Now let's go back to the front of
the circuit to the electret microphone. This is biased from the 9V
supply via a 4. 7kQ resistor while
the input signal is fed to pin 10 of
IClc via Cl, a .039µF capacitor.
With the circuit in the listen
mode, the electret generates a
signal voltage which is amplified by
IClc. For louder sounds, the output
of IClc swings strongly up to the
positive rail and down to the 0V
rail. The negative swings of the
signal pull pin 12 of ICld low and so
pin 14 flicks low too. Once that happens, the whole circuit is in the
chirp mode.
With pin 14 of ICld low, pin 12 is
pulled down low too, via the
associated lO0kQ resistor and this
means that ICld is " latched". It
will stay that way until the
capacitor at pin 13 can discharge
sufficiently for pin 13 to get below
pin 12 (which is at about + 0.BV).
Until that happens, ICl b is
"enabled" as a Schmitt trigger
oscillator with its frequency set by
the 22kQ . resistor and .039µF
capacitor connected to pin 6.
It functions as follows: initially,
pin 6 is high and the output at pin 7
is low. The .039µF capacitor begins
to discharge via the 22kQ resistor
until it reaches the lower threshold
of 3V (set by the lO0kQ resistors
connected to pin 5). Then the output
of IClb [pin 7) goes high and begins
to charge the .039µF capacitor via
the 22kn resistor. This continues
until the upper threshold of 6V is
reached when the output of ICl b
again goes low. This cycle repeats
itself and so ICl b oscillates at
around 1700Hz to drive the piezo
transducer.
While IClb is oscillating, ICla
turns on the two LEDs at its output.
This is because ICla is connected
as an Schmitt inverter. When its
pin 2 input is low, its output at pin 1
Fig.I: the circuit is based on a single
quad op amp IC. IClc is the
microphone amplifier and this
controls Schmitt trigger oscillator
ICld. ICld in turn controls chirp
oscillator IClb, while ICla drives the
LEDs.
is high and this drives the LEDs via
a lkQ resistor. So while ever ICld's
output at pin 14 is low, the LEDs are
alight and the piezo transducer is
sounding.
None of this sound and light la sts
for long though, since the circuit
conditions around IClc and ICld
don't stay constant.
Tone modulation
Recall now that pin 10 of IClc,
the audio amplifier stage, is normally biased to about + 4.5V via
the lO0kn resistor from pin 13 of
ICld. When ICld's output flicks
low, this bias voltage is removed
and so IClc can't function as an
audio stage. Instead, the 0.22µF
capacitor (C2) on pin 9 begins to
discharge from 4.5V via the 2.2kQ
resistor and the lMQ resistor to the
output of IClc. Some discharge current also flows via the pin 9 inverting input but this is small enough to
ignore. The discharge time for CZ is
about 200 milliseconds and during
this time, the 0.22µF capacitor (C3)
AUGUST 1990
67
9V
4.5V "\
IC1c, PIN B
Fig.2: this diagram shows the
waveforms at various points on the
circuit. Notice how the output of IC1d
switches high & low to modulate the
output of IC1b.
at pin 13 is being rapidly charged
and discharged.
C3 charges and discharges
because ICld is now operating as
an oscillator by virtue of the lOOkO
resistor connected between pin 13
and pin 14. So ICld's output doesn't
stay low as we implied. OK, so we
led you astray but you'll get the
whole picture bye and bye.
Thus, ICld's output actually
flicks low and high at about 70
times a second (70Hz) and this frequency switches on and off
(modulates) the tone produced by
ICl b and thus makes it sound
richer.
The voltage at pin 10 of IClc is
essentially the same as that across
C3 except that it is filtered by the
associated lOOkO bias resistor and
Cl. When the voltage at C2 finally
discharges below that at pin 10,
IClc's output goes briefly high
which allows ICld to revert high
again too. This puts the circuit back
into listen mode and the output of
IClc settles back to around + 4.5V.
The waveforms of Fig.2 show the
circuit functions graphically. The
first waveform shows pin 8 of IClc.
It starts off sitting at about + 4.5V
but with noise superimposed. Then
it flicks negative as a strong noise
signal is picked up. This causes Cl,
C2 & C3 to discharge at different
rates, as shown in the second
waveform.
The third waveform shows the
output state of ICld which may be
thought of as controlling the whole
circuit. Finally, the 4th diagram
shows the high frequency waveform which drives the piezo transducer.
Construction
As noted above, Horace is
basically a PC board with a 9V battery slung underneath and the
whole lot suspended on six resistor
legs. The PCB is coded SC 08106901
and measures 91 x 61mm.
Check the board carefully for un-
This view shows how the battery
holder is mounted. You will have to
bend the two leads so that they go
through the holes in the board.
drilled holes or shorted or open circuit tracks. Fix these first before
going further. Assembly can begin
by inserting the two PC stakes used
for terminating the piezo transducer. Now insert the low profile
components such as the links,
resistors, diode and IC. Be careful
with the orientation of the diode
and IC.
The piezo transducer is mounted
using two small screws and nuts
directly onto the PCB. If these have
not been supplied you could use a
Fig.3: this is the full-size PC pattern for Horace.
RESISTORS
D
D
D
D
D
D
D
68
No
3
9
1
1
1
SILICON CHIP
Value
1MO
100k0
22k0
4.7k0
2.2k0
1k0
4-Band Code (5%)
brown black green gold
brown black yellow gold
red red orange gold
yellow violet red gold
red red red gold
brown black red gold
5-Band Code (1%)
brown black black yellow brown
brown black black orange brown
red red black red brown
yellow violet black brown brown
red red black brown brown
brown black black brown brown
ELECTRET
MICROPHONE
Fig.4: here's how to install the parts on the PC board. Take care with
component orientation and note that the battery holder (shown
dotted) mounts on the copper side of the board. You can use any
value 1W resistors down to 10k0 for the legs.
piece of double-sided tape or a spot
of Superglue. The wires from the
transducer are cut short to terminate to the PC stakes. Note that
although the + sign is shown on
this transducer, the polarity is
unimportant.
Next, the capacitors can be installed. Make sure that the electrolytics are oriented correctly. Cl
& C2 must be low leakage
aluminium or tantalum electrolytics
or monolithics. If you use monolithics, you don't have to worry
about the polarity.
The two LEDs are mounted with
long legs which are then bent over,
as shown in the photos. The longer
lead of each LED is the anode.
The miniature slide switch is
mounted directly on the PCB. The
electret microphone is mounted on
Don't stomp on poor Horace if he fails to work first time. Instead, check your
work carefully against the wiring diagram (Fig.4). In particular, check the
polarity of the IC, LEDs and microphone.
two short lengths of 1mm tinned
copper wire so that it stands about
10mm above the PCB. Note that the
electret is polarised and the
negative terminal is the one which
is connected to the microphone
body.
The legs are simply lOMO lW
resistors which are mounted at one
end of their leads. The free end is
folded over for a rounded foot. Actually, you can use resistor values
down to about 10k0 for the legs but
don't go below this.figure otherwise
you risk excessive supply loading if
the unit is placed on a metal
surface.
Before installing the battery
holder, it is best to try out the circuit first since the holder obscures
many of the tracks underneath the
PCB. Use some short leads to temporarily connect power to the circuit. It should operate when switched on - by chirping and switching
on the LEDs whenever you make a
sound.
Troubleshooting
If Horace does not work, don't fling him across the room. Check
your work very carefully against
the wiring diagram. Are all the
component values correct? Is there
any sign of shorts because of solder
splashes underneath the board.
Still no sign of life? Use your
multimeter, switched to a DC volts
range, to check for + 9V betwe.e n
pins 4 & 11 of the IC. If that checks
out, briefly short pin 14 to pin 11.
This should cause the piezo
transducer to sound and the LEDs
to light. If so, the fault lies in the circuit associated with IClc & ICld.
Check the circuit very carefully for
wrong components or components
installed the wrong way around.
Briefly shorting pin 8 to pin 11
should also cause the LEDs to light
and the piezo transducer to sound.
Any deliberate short circuits applied in this way should only be of
brief duration though, otherwise
you run the risk of blowing the IC.
Finally, the battery holder can be
installed. The two leads from it require bending so that they will fit
into the PCB holes. This is done so
that the leads can be soldered easily on the underside of the PCB.
The battery holder is secured to
the PCB using screws and nuts.
A UGU ST
1990
69
|