This is only a preview of the February 1990 issue of Silicon Chip. You can view 51 of the 104 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:
Articles in this series:
Articles in this series:
Articles in this series:
Articles in this series:
Articles in this series:
Articles in this series:
|
The
incredible
This novel unit will produce the sounds of
two birds singing together in a way which
will intrigue you. They start slowly and then
sing rapidly increasing trills as they compete
with each other for virtuoso supremacy.
By JOHN CLARKE
Do you love the song of birds
around your home but hate the idea
of caging birds? Perhaps you can't
stand the idea of cleaning out the
cage - birds are messy little critters. Or perhaps you can't afford
bird seed.
50
SILICON CHIP
Whatever the reason, you can
now have a pair of electronic birds
to entertain you and your friends
and, most important, you can turn
them off when you don't want to
listen to them.
The idea of producing artificial
birdsong isn't new. There have
been clockwork instruments going
back centuries and in the last
decade or so a number of electronic
birdies have come out of the emporiums of Asia. But it's been a
while since we saw or heard any
and so we thought, ''Why not build
a new circuit?"
We could have been really clever
and built the unit into a fancy gilt
cage complete with ornamental
bird. Instead, we took an easier approach and built the circuit into a
standard zippy box and then sat a
couple of ornamental birds on top
of it.
Using two garden variety ICs and
47k
+9V
+9V
VR1
50k
100k
.,.
+9V
+9V
+
01
1N4148
100
470k
100k
33k
+
68k
+9V
1000..r-
+9V
470k
.,.
CHIRP CONTROL OSCILLATOR (a)
+
471
470k
.,.
Bn
SPEAKER
CHIRP OSCILLATOR (a)
.33k
330pFI
100k
.,.
02
1N4148
TONE OSCILLATOR (a)
47k
.001
MIXED
OUTPUT
+9V
+9V
100k
VR2
50k
+9V
.,.
:r:<o
+9V
100k
POWER
-'I'
9V
1
I
.:;.&..
i
+9V
+
471"
B
+
47k
470+
EOc
VIEWED FROM
BELOW
.,.
CHIRP CONTROL OSCILLATOR (b)
+
47.I:
.,.
.,.
CHIRP OSCILLATOR (b)
270pFI
HOT CANARIES
.,. TONE OSCILLATOR (b)
Fig.I: the circuit uses seven Schmitt trigger oscillators based on LM324 op amps. ICla is the on/off oscillator while the
other six oscillators generate the sounds of the two canaries.
a handful of resistors and capacitors, our "Hot Canaries" generate the sounds of two canaries
happily chirping and trilling away.
The period of trilling, chirping and
pitch of each bird is different,
creating a random effect as the
birds come in and out of chorus.
One of the problems with trying
to reproduce a birdsong circuit is
that so many song parameters have
to be controlled - the pitch. rate of
chirps and trills, and the length for
which trills last. Such a circuit
either tends to be very complicated
or very incestuous, as certain circuit sections have to perform more
than one function.
Our approach was to try and
come up with a good compromise produce a circuit which was not too
complicated but which would also
be reasonably easy to build and
troubleshoot (perish the thought), if
necessary.
PARTS LIST
1 plastic case, 130 x 67 x
43mm
1 PCB, code SC0811 2891 ,
107 x 60mm
1 front panel, 126 x 64mm
1 57mm 80 loudspeaker
1 SPDT toggle switch
1 9V on-board battery holder
(DSE Cat. P-6200)
1 9V 216 battery
Semiconductors
2 LM324 quad op amps
(IC1,IC2)
1 BC328 PNP transistor (01)
2 1 N914, 1 N4148 signal
diodes (D1 ,D2)
Capacitors
1 1 000µ,F 1 6VW PC
electrolytic
1 4 70µ,F 16VW PC electrolytic
1 100µ,F 16VW PC electrolytic
3 4 7 µ,F 1 6VW PC electrolytic
2 .001 µ,F metallised polyester
1 330pF ceramic or
polystyrene
1 270pF ceramic or
polystyrene
Resistors (0.25W, 5%)
5 470k0
2 180k0
5 100k0
7 68k0
4 47k0
5 33kfl
2 15k0
2 10k0
2 3.3k0
1 330
2 50k0 miniature vertical
trimpots
Miscellaneous
Solder, hookup wire, 4 PC stakes
F EBR UARY1990
51
The completed PCB assembly clips neatly into a standard plastic zippy case.
Check to ensure that none of the on-board components are fouled when the lid
is screwed down.
Circuitry
What you need for an electronic
canary circuit is oscillators - quite
a few of them. And you also need to
use CMOS circuitry to keep the battery drain as low as possible and so
the CMOS 74C14 hex Schmitt trigger suggests itself as a device
which will do the job. This is
because you can make a very simple oscillator with a Schmitt trigger
and just two other components: a
resistor and a capacitor.
A circuit using the 74C14 for an
electronic canary was published
quite a few years ago in another
magazine but this device does have
one big drawback. In any Schmitt
trigger oscillator, the operating frequency is very dependent upon the
high and low switching thresholds
of the Schmitt trigger device. This
would not be serious if the 74C14
had closely defined high and low
thesholds but it doesn't.
Consequently , any oscillator
designed around the Schmitt triggers in the 74C14 will have an
operating frequency which can
vary by more than 3:1. For some circuits, the large variation can be acceptable but for a chirping canary
circuit, it ain't.
Clearly then, although we would
52
SILICON CHIP
have liked to use the 74C14, it was
not the ideal device. What we needed was a cheap device with low battery drain which could act as a
Schmitt trigger device with precisely defined high and low thresholds.
Well, we have accomplished that
aim by using the LM324, a quad op
amp package.
It has low current drain and will
operate from a single supply rail.
Each op amp in the package can be
used as a comparator and with the
addition of a resistor connected between the output and the noninverting input ( + ), it can have
precisely defined hysteresis which
is the difference between the upper
and lower thresholds. Thus, it can
be used as an oscillator with a fairly precisely defined operating
frequency.
So let's now have a look at the
complete circuit for the Hot
Canaries which uses two LM324
quad op amp ICs. Essentially, the
circuit consists of 7 oscillators
which are connected to obtain the
sounds of two canaries singing.
First, there is an on/off control
oscillator which switches the
canary sounds off for a short while
after a minute or so of continuous
chirping - it's like a rest break for
live musicians.
The remaining six oscillators are
used to generate two almost identical canaries which are then mixed
together and amplified by a single
transistor which drives a small
speaker.
IC1d, IC1c and IC2c are the three
oscillators for the first canary
while IC1 b, IC2a and IC2b are the
three oscillators for the second
canary. Note that the canary circuits are almost identical apart
from changes to two capacitor
values.
As noted above, each of the
LM324 op amps is connected as a
Schmitt trigger, by virtue of the
resistor between its output (pins 14,
8, 7 or 1) and its non-inverting input
(pins 12, 10, 5 or 3, respectively).
Also necessary to set the upper and
lower threshold of each Schmitt
trigger section is a voltage divider,
consisting of two resistors, with the
centre-point connected to the noninverting input.
To make each of these Schmitt
trigger sections operate as an
oscillator it is necessary to connect
a resistor/capacitor network from
the output to the inverting ( - ) input. Each oscillator then works as
follows. When power is first applied, the capacitor at the inverting
input (eg, at pin 9) will have no
voltage across it and the op amp
output will be high. The capacitor
will then start to charge up via its
associated resistor, until it reaches
the threshold set by the reference
voltage at the non-inverting input.
When that happens, the op amp
output switches low and the
capacitor then starts to discharge.
It will continue to do so until it
reaches the lower threshold
voltage, again as set by the voltage
at the non-inverting input. This
causes the op amp output to switch
high and the cycle begins again.
The result is an oscillator with an
approximate square wave at the
output and a sawtooth waveform at
the inverting input; ie, across the
capacitor. So that describes the
general operation of each of the 7
oscillators in the circuit.
Oscillator interaction
To understand how the oscillators work together to produce the
sounds of canaries, let's go to one of
the oscillators which is last in its
TO S1
TO
SPEAKER
0
~
-- ~ '-
I
Fig.2: check the resistor values with a digital multimeter before
installing them on the board and take care with the polarised
components. You can use sockets for the two ICs if you wish.
chain, IC2b. This is labelled as a
"tone oscillator" and its basic frequency is set at around 2-3kHz. In
fact, if the 180k0 and 470k0
resistors connecting it to other
parts of the circuit were removed,
it would just oscillate continuously
at around 3kHz or so.
Well, that would be all very nice
but it wouldn't sound much like a
canary. They chirp and warble. To
get IC2b to chirp, we modulate it at
a rate which starts at about 1Hz
and then rises until ultimately IC2b
is running continuously. This
"chirp" frequency is generated by
IC2a.
To get · the chirp frequency to
rise, as just mentioned, we control
it with a lower frequency oscillator,
!Cl b. As the voltage across its
470µ.F capacitor increases, the
chirp frequency rises. So we call
ICl b the "chirp control" oscillator.
When the chirp oscillator rises fo
its highest value, which effectively
lets IC2b run continuously, the
series RC network consisting_ of a
180k0 resistor and .001µ.F capacitor between pin 7 and pin 2 causes
the two oscillators to modulate
each other and so the tone
oscillator "warbles" just like a
canary.
You will see that ICld, IClc and
IC2c are virtually identical to ICl b,
IC2a and IC2b. They produce the
second canary. The outputs of IC2c
and IC2b are mixed together via
two 10k0 resistors to drive transistor Ql and the miniature 80
loudspeaker.
This brings us, finally, to the 7th
oscillator, ICla which turns the
duet on and off. It initially has a low
output for about 60 seconds since
the 100µ.F capacitor has to charge
from the full + 9V down to + 2.3V.
From then on, its output goes high
for about 20 seonds, low for 20
seconds and so on. When its output
is low, the canaries sing.
The output of ICla enables the
chirp control oscillators (ICld and
IClb} via diodes Dl and D2.
Construction
We built our Hot Canaries circuit
onto a printed circuit board (PCB)
measuring 107 x 60mm and coded
SC 08112891. This was housed in a
plastic case measuring 130 x 67 x
43mm.
No particular order of assembly
needs to be followed when putting
the components on the board.
However, we suggest you put in the
PC stakes and resistors first. You
can then install the two diodes, the
ICs and the transistor, followed by
the capacitors and trimpots.
The battery holder was obtained
from Dick Smith Electronics (Cat.
P-6200). It is a lot dearer than the
usual battery snap connector but it
neatly solves the problem of mounting the battery securely.
The case lid can now be drilled
for the speaker holes and switch
mounting hole. Secure the switch,
glue the speaker to the rear of the
lid and complete the wiring to the
switch and speaker.
Testing
Now the circuit is ready for
testing. Insert the battery and
switch on. Test that each op amp
has power and listen for the chirping sounds.
Adjustment of VRl and VR2 is
best done by temporarily desoldering each of the 10k0 resistors {Rl &
R2} in turn. Lift Rl first and adjust
VR2 so that chirping starts at a
slow pace and continues up to a
faster rate and then stops before
starting again. If the trimmer is too
far anticlockwise, the canary will
hardly chirp at all and if too far
clockwise, it will not stop chirping.
Once this has been done, reinsert Rl, lift R2 and adjust VRl.
Finally, the PCB can be clipped
into position by pushing it down into
the plastic case.
I§;]
,0)
00
~
,- 0
~
Fig.3: here is an actual size artwork for the PC pattern.
FEBRUARY1990
I
53
|