xample Circuits

build one !  DOCTRONICS electronics construction kit available build one !

4. Chuckles

Designing an electronic circuit which makes a silly noise ...

Schmitt trigger NAND gate astables:

A pulse generator, or astable, is a subsystem which produces pulses. One easy to build astable circuit uses a special kind of NAND gate called a Schmitt trigger NAND gate. Compare the normal NAND gate and Schmitt trigger NAND gate symbols:

A 4093 CMOS integrated circuit contains four Schmitt trigger NAND gates, as follows:

The special property of a Schmitt NAND is that there are two different input logic thresholds. The input voltage level which causes a positive-going change from LOW (logic 0) to HIGH (logic 1) at the output of the gate is not the same as the input voltage level which causes a negative-going change from HIGH to LOW.

This difference in thresholds can be exploited to make an extremely simple astable circuit:

The capacitor charges up until the upper (output HIGH to LOW) threshold is reached. The output of the NAND gate suddenly becomes LOW and the capacitor empties.. When the lower (output LOW to HIGH) threshold is reached, the output of the gate snaps HIGH and the capacitor starts to fill once more.. The capacitor charges and discharges over and over again and the output of the circuit is a regular pulse signal. The frequency of the pulses depends on the exact values of the two threshold voltages and varies with the power supply voltage and other factors. An approximate idea of the frequency you can expect is given by 1/RC. For instance, if R=1 MW and C=1 F, the output frequency will be in the region of 1 Hz, possibly a little faster.

Schmitt trigger NAND gate astables don't produce extremely accurate frequencies. However, if you want to produce an audible alarm, extreme accuracy is not needed.

Using a light dependent resistor (LDR) in place of R gives a frequency which will change according to illumination:

A gated astable can be made as follows:

The control input can be used to switch the pulses ON and OFF. When the control input is HIGH, pulses appear at the output, but when the control output is LOW, pulses stop.

Interesting things start to happen when a SLOW astable is used to control a FAST astable:

What difference between the two astables explains the difference in output frequency?

Driving a sounder:

Some sounders require more current that the output of a a NAND gate can provide. To make them work a power amplifier subsystem is needed. This is made using a transistor:

In this circuit, the 10 F capacitor is a DC blocking capacitor, that is, it prevents the transfer of DC signals, but allows changing AC signals to pass. The 3.3 kW resistor limits the base current of the transistor. The 1N 4148 diode prevents signals at the base from going negative compared to 0 V by more than 0.6-0.7 V. The transistor provides current/power gain, and the piezo transducer delivers the audible output. A 1 kW resistor should be connected in parallel when a piezo transducer is used, but can be omitted if you use an electromechanical sounder. A circuit like this will not drive a loudspeaker directly.

Driving an LED:

The current required is less so a NAND gate can be used, as follows:

To illuminate a typical LED, around 10 mA of current is needed. The forward voltage of an LED is usually around 2 V. For this application, the voltage across the resistor is 9-2=7 V. The resistor value you need can be calculated from R=V/I, that is, R=7/10 mA=0.7 kW, or 700 W. The nearest E12 value is 680 W. This value will allow a little more than 10 mA of current to flow, but the LED will not be damaged. (Typical LEDs can survive up to 20 mA).

Complete circuit diagram:

You will see that all four gates in the 4093 integrated circuit are used. A 47 F capacitor is connected across the power supply to provide what is called decoupling. The effect of this is to prevent the transfer of 'glitches' and transient signals along the power supply rails. It is good practice to include decoupling capacitors in circuits which use CMOS ICs.

Printed circuit board:

chuckles_02.gif (12190 bytes)

You can buy a DOCTRONICS electronics construction kit for this project. The kit includes the printed circuit board and all the electronic components required.

Top ... Example Circuits ... Home ...