# Creating an oscillating circuit to sound an alarm using a speaker

I have been given the task to make a speaker sound an alarm. As part of a project at school.

I was given this circuit:

• NAND gate SN74HCT00N
• Resistor R28 100kΩ
• Resistor R27 1kΩ
• Capacitor C8 100nF
• Polarized capacitor C7 10µF
• Speaker ABS-209-RC (16C)

I am having difficulty getting a wave form out of this circuit and definitely not getting a frequency between 500Hz and 20kHz, as this speaker requires to make an audible sound.

We are using a 5V DC power supply. And need to obviously generate a wave out of this DC in order to make the alarm sound.

Any ideas?

• Richie - You've got good pointers in an answer already. Just to confirm: (a) The speaker p/n seems to be a 32Ω model - have you checked yours and measured its value? (b) What components have you tested / measured, or know to be definitely working from use in other circuits? (c) Do you have an oscilloscope or logic probe, to perform measurements? If so, what measurements have you done and what results did you get? (d) What troubleshooting of any kind, have you done so far, and with what results? (e) Please supply a photo of your physical circuit. – SamGibson Oct 19 '16 at 22:55
• I actually thought those RC values would result in 100 Hz. 1 / (100e3 * 100e-9) = 100Hz – vicatcu Oct 21 '16 at 3:53
• @Richie You have shown a self bias DC amplifier, not an oscillator. It MUST BE a Schmitt trigger to become an ASTABLE or oscillator. Get a CD4093 and replace CD4000 and see my answer for louder volume. – Sunnyskyguy EE75 Oct 21 '16 at 21:46

First: Enable Alarm has to be connected to 5V to make the circuit work.

Second: Use a 32–50Ω speaker, as your current is limited to a few mA.

Note: when you use a CMOS chip as the 74HCT00, make sure the unused input pins are connected to GND or +5V, otherwise they will float and make the other gates oscillate, drawing lots of power and creating MHz noise.

• Thanks, yip I connect the enable alarm to 5V and I have tried grounding the spare gates on the circuit so that they do not float and when I checked the specs of the speaker. It is a 32ohm resistor. So not sure why it isnt working? – Richie Oct 19 '16 at 22:55
• Mixed up the 1k and the 100k resistor? There's not much more what could go wrong. Even mixing up the capacitors would still make it go click-click. – Janka Oct 19 '16 at 23:07
• Sorry Janka, the HC00 will not oscillate here. Also due to high output Z, or low current it will not create lots of noise. – Sunnyskyguy EE75 Oct 21 '16 at 21:48
• Yes. I wrongly remembered a good old 4011 oscillator from my school days. Now I remember correctly, it needed two gates. The circuit above needs a 4093 or 74HC14, as it has schmitt trigger inputs. These will work with one gate only. – Janka Oct 21 '16 at 22:21

Replace R27 with the three leftover gates of the the 7400 wired in parallel

## EDIT:

Bad idea if the oscillator won't even run. Try the following circuit instead.

The oscillator is from Fairchild's AN118.

If, for some reason, you can't access that document, it's also available here

I've built a bunch of them and they always work.

U4 is the last gate in the package and is used as an inverting buffer to keep Q1 off when ENABLE is low, and to drive Q1 without loading the oscillator when ENABLE is high.

D1 is a flyback diode for LS1's inductive coil, and better safe than sorry...

• Friggin' ON Semi is adding an obnoxious Ad page to old Fairchild App Notes with the result that they no longer open in all PDF readers. Marketing scum, leave the application notes alone! – Sredni Vashtar Oct 20 '16 at 21:12
• @SredniVashtar: I've added a cherry link to my post, so how about an upvote to get me to zero? – EM Fields Oct 21 '16 at 3:08

The reason your invalid design fails is that the CMOS gate with a negative feedback loop is actually a linear amplifier just like a poor man's Op Amp according to feedback ratio's The 74HC00 has a linear gain of 1000 minimum.

Whereas if you used the CD4093 Schmitt NAND, it has 33% hysteresis, it would work. guaranteed. Now the negative feedback keeps the average input bias at mid-scale but due to the hysteresis oscillates due to the slew rate of the RC value.

Sadly, it won't be very loud as the High voltage CMOS or 74HCxx types or CD 4xxx series have very high output impedance of 1k @5V to 300 Ohms at 15V so driving an 8 Ohm speaker which has a DCR < 4 Ohms results in a reduction of 40 dB or so @ 5V, Now your load resistor of 1K in series may be too small and affects the triangle wave input signal from reaching 2/3 Vcc.