Sei sulla pagina 1di 6

6281' $&7,9$7(' 6:,7&+

E\ %$57 75(3$.
Showing how a logic gate can be used as an audio interference, require a positive
amplifier and a voltage switch. and negative supply, which is
not often available in logic cir-
Sound activated switches are meet their own requirements. cuits.
useful in many circumstances, This circuit overcomes the
especially when “hands free” op- CONSIDERATIONS difficulties encountered in using
eration of a piece of equipment is Most circuits of this type opamps and provides a variety
required. They are often used, for published over the years use a of outputs for virtually any appli-
example, to automatically switch microphone signal, which is am- cation. The component count is
on a tape recorder (or a digital plified to a suitable level by an very low  only 17 low cost
solid state equivalent) to record a opamp. The signal is then recti- components are required (and
sound or conversation without fied and fed to a comparator, that includes the microphone).
“wasting” tape during quiet peri- which switches when the signal The circuit will operate
ods. exceeds a certain level. This is down to about 3V, drawing a
Many inexpensive cassette then used to switch a relay or current of less than 0 5mA. At
¬

recorders have a remote switch other device, which in turn con- 5V, the supply current is around
input to enable the recorder to be trols an appliance. 1mA and even at 9V is only
switched on from the microphone The problem with using around 5mA, which compares
and a circuit of this type can eas- opamps with digital logic is that quite favorably with an opamp
ily be connected to it to start the the output of most opamps does design. The circuit can be used
recording automatically. not switch fully between the at up to 15V, although the cur-
As well as this, sound acti- supply rails. Thus, with a 5V rent drain is then a bit exces-
vated switches can be useful in supply for instance, the output sive.
applications such as intercoms, will typically switch between
baby alarms, security alarms or 0 5V and 3V. This is not too
photographic work, and there are
¬

much of a problem if a relay


LOGICAL AMPLIFIER
no doubt many others. driver transistor is to be con- Since a logic level output is
This circuit arose from a re- nected to the output, but it may required and we are not after hi-
quirement for a basic microphone not work satisfactorily with a fi standards, a logic gate is used
interface to logic circuits without logic circuit unless extra inter-
having to build one from scratch face components are used.
each time. Since it was not built Many of the low-cost
for any specific application, a opamps (e.g. 741) also require S
number of outputs were provided, a supply voltage greater than
including an amplified version of that at which most logic circuits ,1387 287387
the sound waveform. With a few operate. This means that a sep-
additional components, however, arate supply would need to be
the circuit can easily be used as a used, together with level shifting
sound-operated switch with other components to bring the output Q

equipment. swing within logic levels.


It is suited to being supplied As well as this, differential
by a 9V PP3 battery. The choice inputs, although improving per-
of case has been left to users, to formance as regard to hum or Fig.1. Basic CMOS
4069 inverter.
Copyright © 1999 Wimborne Publishing Ltd and EPE Online, August 1999 - www.epemag.com - 803
Maxfield & Montrose Interactive Inc
287387 287387
&RQVWUXFWLRQDO 3URMHFW
 
a minute leakage At higher voltages, the output
9 6833/< 9 6833/<
current. impedance is lower, giving an in-
This will also creased bandwidth. It is also not
9 6833/< be the case if the the last word in hi-fi from the
input voltage is point of view of distortion or noise
 

9 6833/<
increased slowly but, despite this, the sensitivity of
until (typically) the unit is sufficient to enable it to
the mid-point is respond to a sound at normal
approached, conversation level within one or
  
when the p- 
two meters.
D % &026 ,19(57(5 E 8% &026 ,19(57(5 channel device The electret microphone used
Fig.2. Comparison of switching slopes for will begin to turn also has a built-in amplifier to re-
buffered (a) and unbuffered (b) CMOS off and the n- duce its output impedance and
channel device noise pick-up, and this no doubt
inverters. helps. A problem is that, because
turn on. The sup-
as the input amplifier. The cir- ply current will the gain tends to be somewhat
cuit uses two of the six inverters also begin to rise because both higher at low voltages, the sensi-
inside a 4069 CMOS chip to transistors are now conducting. tivity of the unit is higher with a
amplify the signal, which is The device will now operate as 5V supply than at 9V. This can
picked up by a small electret a linear amplifier and as the in- also be seen from Fig.2b, which
microphone. The 4069 is one of put voltage is further increased, shows the transfer characteristic
the cheapest devices in the the output will continue to fall. for the 4069UB at 5V and 10V.
CMOS range, and with the addi-
tion of a single feedback resis- SLOPING OFF CIRCUIT DIAGRAM
tor (which effectively biases the
output to mid-supply voltage) it Because a buffered device has The circuit diagram of the
makes a very useful amplifier. a fairly high gain (especially if two Sound Activated Switch is shown
such devices are cascaded) a small in Fig.3. The microphone is bi-
The internal circuit of one increase in the input voltage will ased by resistor R1 and the AC
CMOS 4069 inverter (excluding cause such a large output swing signal coupled to the input of the
the input protection compo- that the output will switch com- first inverter, IC1a, which is bi-
nents) is shown in Fig.1 and pletely, with the n-channel device ased into its linear mode by resis-
consists of two transistors: a p- hard on and the p-channel transis- tor R2.
channel and an n-channel tor hard off (see Fig.2a) and the
MOSFET. The output of this stage con-
circuit drawing a microamp or less. sists of an amplified version of
It must be noted, however, With the UB device, this ac- the sound signal and this is fed to
that most devices in the 4000 tion is more gentle (as shown in a similar stage built around an-
CMOS series contain a buffer Fig.2b) and a situation can easily other inverter (IC1b), which am-
following the logic function, uti- be arranged where both transis- plifies it further. The output signal
lizing two cascaded inverters of tors are conducting and the de- from IC1b can be tapped at test
the type shown to achieve vice functions as a stable linear point TP1, from where it may be
sharper input-output voltage amplifier, with the output at about used to feed a suitable power am-
characteristics and reduced the mid-supply voltage. Since plifier, depending on the applica-
switching times. They are la- both transistors will be conducting tion.
beled “B’’ for buffered (e.g. in this state, the current flow will
4049B), whereas the unbuffered As mentioned earlier, this sig-
be in the low milliamps range and nal is not by any means in the hi-
types are labeled “UB’’ (e.g. will depend on the supply voltage.
4069UB). fi category. It will be about 1V
The major limitation of this peak-to-peak for normal conver-
In normal operation, if the circuit as an amplifier is that its sation levels. Louder sounds will
input is held at 0V, the output of gain also depends to a large ex- obviously result in a larger output
a logic inverter will be at the tent on the supply voltage, as (with increasing distortion) limited
positive supply rail with the p- does its relatively high output by the supply voltage.
channel transistor conducting impedance, which, together with
and the n-channel device cut Interestingly, while distortion
any load capacitance, determines obviously increases as the output
off, with the device drawing only the bandwidth.
Copyright © 1999 Wimborne Publishing Ltd and EPE Online, August 1999 - www.epemag.com - 804
Maxfield & Montrose Interactive Inc
&RQVWUXFWLRQDO 3URMHFW
age is exceeded, the output of
73
this stage will switch to a low
level. This is illustrated in Fig.4,
which shows the waveforms at
different points in the circuit.
73

Inverter IC1c, therefore, pro-


vides faster switching, with its
73D
output pulses coinciding with the
peaks of the sound picked up by
the microphone.
73 This may be useful in some
applications where, for example,
the frequency of the sound needs
73 to be measured, but could not be
used to switch on a tape recorder,
Fig.4. Waveforms at the circuit test points. for which a steady “on” signal is
required. This condition is
approaches the upper and lower age) to another inverter would
achieved by using the negative-
supply limits, this amplifier pro- result in the output of this stage
going output of IC1c to charge up
gressively “rounds off” the sig- oscillating between the two supply
capacitor C4 via diode D1.
nal peaks in a manner more rails, due to stray noise (both au-
reminiscent of a valve amplifier, dio and electrical) reaching the The diode prevents the capaci-
rather than clipping them, as input. tor from discharging when the out-
would occur in an opamp. put goes high again. When a sound
By placing a potential divider
is picked up by the microphone, the
(R4/R5) at the output of amplifier
voltage on this capacitor will there-
OUTPUTS IC1b, the input of the next stage,
fore fall to the negative supply,
IC1c, will be held slightly below
CMOS inverters, even the causing the output of inverter IC1d
its threshold voltage and the out-
UB types, have a relatively to go high.
put of this stage will remain at the
steep input logic transfer char- positive supply (logic 1 level) When the sound ceases, ca-
acteristic. With a 5V supply, an when there is no sound reaching pacitor C4 discharges via resistor
input change of less than 1V the microphone. R6, until the voltage at the input
produces an output swing of of IC1d eventually rises above
nearly the full supply. With a When a sound is picked up
the logic threshold, causing the
10V supply, an input change of by the microphone, the output of
output of IC1d to switch low
around 3V is required to do this. the amplifier stage will swing be-
again. By varying the value of R6
tween the logic levels in sympa-
Since the transition occurs and/or C4, the length of time for
thy with the signal and, since the
at around the mid-supply volt- which the output of IC1d stays
threshold of the next inverter,
age, connecting the output of high after the sound has ceased
IC1c, is at around half the supply
the amplifier stage (which is bi- can be varied to suit the applica-
rail voltage, each time this volt-
ased to the mid-supply rail volt- tion.
9
& &
S S

73 73

& 5
5
N
5
0 Q 0 5
N
5
N

&
,&D
8% &
,&E
8% ,&F '
,&G
8%
,&H
8%
,&I
8% &
5  8% 5
Q Q N 1 N  µ
      N D 73D       73

 73

0,& 5

N
6(( 7(;7

9

Fig.3. Complete circuit diagram for the Sound Activated Switch.


Copyright © 1999 Wimborne Publishing Ltd and EPE Online, August 1999 - www.epemag.com - 805
Maxfield & Montrose Interactive Inc
&RQVWUXFWLRQDO 3URMHFW
The relatively gentle nature case, the positive terminal
APPLICATIONS should be connected to the pos-
of the input/output characteris-
tics of the unbuffered 4069 in- Depending on the applica- itive supply line.
verter, coupled with the slow tion, the outputs of the unit can
discharge of C4 via R6, means be connected to a variety of de-
that the output of IC1d tends to vices. PHONE TRIGGERED
switch uncleanly. With the in- Output TP1 provides the A useful application for this
verter now spending more time amplified, but otherwise unmod- circuit would be to switch on a
in the linear region while C4 dis- ified, microphone signal from lamp to signal that the telephone
charges, intermittent oscillation IC1b. is ringing. This would be helpful in
can occur and its output is not a noisy office or workshop, or per-
Output TP2 provides a
suitable for connecting to other haps at home for someone who is
roughly rectangular waveform
logic circuits. The two final in- hard of hearing.
having the frequency of the
verters, IC1e and IC1f are original signal. Since it switches For this sort of application
therefore combined with resis- between 0V and the positive to be successful, it is important
tors R7 and R8 to form a supply rail, it may be used as an to ensure that there are no
Schmitt Trigger circuit, which output to other logic circuits for “false alarms”. Frequent trips to
uses positive feedback to further processing, such as fre- the telephone, only to find that
sharpen the response. quency measurement. the lamp has been triggered by
a passing car or some other
Outputs TP3 and TP4 pro-
CONSTRUCTION noise and not the phone, will not
vide logic low and logic high
endear you to your granny!
Component and track layout levels for as long as the sound
persists. Output TP4 can be Place the microphone close
details of the printed circuit
used directly for interfacing with to the telephone and reduce the
board are shown in Fig.5. This
other logic circuits or, for exam- circuit’s sensitivity so that only
board is available from the EPE
ple, to the relay driver shown in the telephone can make a loud
Online Store (code 7000240) at
Fig.6. enough sound. This can be
www.epemag.com
done by decreasing the value of
Assemble the components The relay can be used to
R5, using trial and error or by
in order of size, and use a switch on any appliance, e.g.
fitting a preset. The maximum
socket for IC1. Remember that tape recorder, lamp etc., de-
value should not exceed 470k
the IC is a CMOS device and pending on its ratings.
(with R4 as specified) as values
should be handled accordingly, To prevent the relay from greater than this may prevent
discharging static electricity switching on and off during the circuit from operating prop-
from yourself before handling it. short periods of silence, the erly.
Two short pieces of tinned value of resistor R6 or capacitor
Performance could be further
copper wire, such as discarded C4 may need to be increased.
improved by choosing a value for
resistor leads, need to be sol- This should be done by trial and
R6 to keep output TP4 high only
dered carefully to the two pads error: too small a value will
for the duration of each ring
cause the relay to keep switch-
on the back of the microphone
ing on and off very often, while (around 2·2M: with C4 at
capsule. Although it is not ap- 100nF). This will cause the lamp
parent from the circuit symbol, too high a value will result in the
relay staying on for a long pe- to flash in the characteristic UK
electret microphones have a telephone ringing pattern, making
built in amplifier and must riod after the sound has ceased.
it not only more noticeable, but
therefore be connected to the For applications where a easier to recognize in the event of
circuit with the correct polarity. longer delay is required, and triggering due to other noises,
The 0V terminal is the one con- where the device may be trig- which would cause the lamp to
nected to the metal body of the gered by a loud initial sound flash in a different way.
capsule. which then dies away, the value
Use terminal pins for off- of C4 may be increased to allow
board wiring connections to lower values of R6 to be used. It BABY MINDER
other circuitry, as required by is possible to use electrolytic Another application would
the application. capacitors here and, in this be as a baby alarm, as in Fig.7.

Copyright © 1999 Wimborne Publishing Ltd and EPE Online, August 1999 - www.epemag.com - 806
Maxfield & Montrose Interactive Inc
&RQVWUXFWLRQDO 3URMHFW
Here, output TP4 would be used 0,&
to control the output of an audio COMPONENTS
amplifier switching it (or the 5 9 Resistors
loudspeaker) on when a sound 5  R1 10k
&
& &
is detected. & 5 & R2, R4, R7 47k (3 off)
 R3 1M
5
The actual sound (from out- R5 330k (see text)
5
put TP1) would be fed to the 73 5 R6 4M7 (see text)
5  & 5
amplifier input allowing the baby R8 470k
73 All 0.25W 5% carbon film
sitter to hear if the baby was N D 9
'
crying or simply stirring and 73 73 Capacitors
thus determine whether or not it C1, C3, C4 100n ceramic (3 off)
C2, C5 100p ceramic (2 off)
needed attention. C6 10u radial electrolytic, 16V
Semiconductors
PA CONTROL D1 1N4148 signal diode
IC1 4069UB hex inverter
A similar application could
Miscellaneous
be devised where, for example, MIC1 electret microphone,
public announcements need to 2-terminal
be made during which the nor-
mal background music has to Printed circuit board available
from the EPE Online Store , code
be interrupted. It should be ap- Fig.5. PCB component lay- 7000240 (www.epemag.com);
preciated, however, that al- out and (approximately) full- terminal pins; 14-pin DIL socket;
though the circuit is fast, it still size copper foil master connecting wire, solder, etc.
takes time to operate, especially track pattern.
if a relay is used for the switch- See also the
ing. It could be found that the SHOP TALK Page!
beginning of any announcement
is not transmitted. Approx. Cost
In such applications, the Guidance Only $15
use of a transmission gate such would, of course, have to be de-
as the 4066 quad analog multi- coupled to ensure that there
plexer is recommended to were no sudden thumps when
switch the signal. A possible the speaker or the inputs were
scheme is shown in Fig.8. Here switched. The values of R6 and/
the four gates within the 4066 or C4 may also need to be ad-
are used in pairs and controlled and announcement signals can
therefore be set as required. justed for best results.
by outputs TP3 and TP4.
Note that neither of these In this application, the per-
Since TP3 is normally high, son making the announcement
the signal at the music input will circuits take into account any
DC offset voltages which may would, no doubt, be very close
be transmitted to the volume to the microphone and so the
control, while its lower end will exist in the signal path. These
be held at 0V by the other trans-

$8',2

mission gate connected to out- 9 72 68,7 5(/$<


$03

put TP3. Whenever an an- 73

nouncement is made, these two ),*


&,5&8,7
73

73

gates will switch off and output N


5/$
73

TP4 will go high switching on 1

D
 5/$


the other two gates. 5(/$<
'5,9(5

The audio signal from the 72 23 


N
%& F

E
microphone will then be applied 63($.(5

to one end of the volume con- H

trol potentiometer, while its


other end will be grounded. The 9
Fig.7. Baby alarm
relative volume of the music Fig.6. Interfacing to a relay. application.
Copyright © 1999 Wimborne Publishing Ltd and EPE Online, August 1999 - www.epemag.com - 807
Maxfield & Montrose Interactive Inc
086,& 
&RQVWUXFWLRQDO 3URMHFW
sensitivity would need to be ,1387
$8',2
$03
and operating the flash. The op-
suitably reduced by using a ),*
eration must, of course, be car-
lower value for R5. &,5&8,7
ried out in a darkened room with
 the camera shutter open so that

the film is only exposed when
FLASH TRIGGER 9


63($.(5
the flash operates.
Finally, the circuit could However, since such uses
also be used as a sound- 9
were not the author’s primary
operated flash trigger to photo- reason for building the circuit,
Fig.8. Suggestion for
graph such things as bursting the above applications are only
balloons, breaking glass etc. PA control. given as “design ideas” and
Most flash guns operate by have not been built or tested.
placing a short circuit on an in- Other uses for the circuit will no
put and, as in this case the 07 doubt occur to readers.
&'
speed of operation is important,
73 N J
a thyristor is a better device to 07
72 &$0(5$
use than a relay. )/$6+

As shown in Fig.9, The N


thyristor can be connected to
output TP4, which will take the
9
gate positive (via a resistor of,
say, 1k:) when a sound is de- Fig.9. Application as a cam-
tected, triggering the thyristor era flash trigger.

Copyright © 1999 Wimborne Publishing Ltd and EPE Online, August 1999 - www.epemag.com - 808
Maxfield & Montrose Interactive Inc

Potrebbero piacerti anche