# More Fun with the CD4093 IC as Schmitt Trigger Oscillator. Any practical difference between circuit version with "Enable" pin and Without?

I built two Schmitt trigger oscillator circuits using the CD4093BE IC from Texas Instruments. The CD4093 is a quad NAND gate with Schmitt trigger inputs.

You can find the datasheet here: http://www.ti.com/lit/ds/symlink/cd4093b.pdf

This question arises from experiments I performed with the CD4093 in this StackExchange question: Using CD4093 as Schmitt trigger oscillator. How to measure high and low trigger thresholds?

One way to build a Schmitt trigger oscillator using a CD4093 is to connect one input pin of one gate to a capacitor while connecting the same pin to a resistor that connects to the output of the same gate. You then connect the other side of the capacitor to Vss.

The resistor and capacitor form an RC network that sets the frequency of the output.

See page 4 of the datasheet.

The other pin of the gate connects to a "control signal" or Vdd. See page 4 of the datasheet.

Let's say you are using the first gate on the CD4093. The inputs are pins 1 and 2 and the output is pin 3. You could connect pin 1 to Vdd or to a "control signal" to make the Schmitt trigger oscillator output its square wave.

I built that circuit. I connected pin 1 to Vdd to make the circuit oscillate. Here is the schematic of the circuit:

If you connect the "enable pin" of the gate (pin 1 in this case) to Vss (ground or zero volts in my case), the output of the gate is held high (near Vdd).

Another way to create a Schmitt trigger oscillator using the CD4093 is to simply tie both input pins of a gate together. You then connect the two tied-together pins to the junction of the resistor and the capacitor (the RC network). For this version of the circuit, all you do is apply power to the IC (pin 14) and the circuit starts oscillating as soon as power is applied. If power is disconnected to the circuit, there is no output at all.

I built that version of the CD4093 Schmitt trigger oscillator, too. See this schematic:

When you tie both inputs of a CD4093 gate together, you are forcing the Schmitt trigger NAND gate to act like a simple Schmitt trigger inverter. Since both inputs are the same, the output will simply be the opposite of the input - an inverter (a Schmitt trigger "NOT" gate).

I measured the output, the triangle wave of the capacitor charge/discharge cycle, the high and low trigger threshold voltages of the schmitt inputs, and the hysterisis voltage of both circuits. Both circuits measured the same for all of these characteristics.

My measurements:

Vdd = 9V

Frequency = 1000 Hz

Output voltage (peak-to-peak): 8.8 volts

Schmitt trigger HIGH threshold voltage: about 5.8 volts

Schmitt trigger Low threshold voltage: about 3.2 volts

Hysterisis voltage: about 2.3 volts or so (hard to read on old, analog oscilloscope)

SO, after much introduction, my question is this: In what situation would it be preferable to use the "enable pin" version of the circuit versus the "inputs tied together" version of the circuit?

I am an electronics hobbyist, not an electronics engineer, and my primary use for the CD4093 Schmitt trigger oscillator is to generate an audio frequency square wave to feed to amplifiers and other projects.

For me, the second version of the circuit, with the inputs tied together, seems to work fine. In addition, since I don't want a steady "HIGH" output when the circuit is not oscillating, the second version of the circuit seems preferable.

I guess I could add a second inverter to the "enable pin" version of the circuit to make it output a steady "LOW" output when the enable pin is not "enabled", but that seems like unnecessary extra complexity.

I have not built circuits using microcontrollers, so I don't have experience sending a "control" signal to the "enable pin" version of the circuit. Couldn't one just send a control signal from a microcontroller that turns on power to the circuit at pin 14? I guess you would need to use a transistor or something else as a switch. Maybe that is the advantage of the "enable pin" version of the circuit: You can make it output a square wave, or not, without having to create another, intermediary circuit, to turn the power on and off?

Any advice on which circuit is preferable to use in different situations is appreciated!

* Update of March 17, 2019 *

Oops! The previous version of the schematic (for the "inputs tied together" version of the circuit) had a typo. The +9V power supply connection was Labeled Vss. It should have been labeled Vdd. Here is the schematic with the typographical error corrected:

• Using hex Schmitt inverters and LM324 opamps you can do "most things". Well, OK, many things. I have for many decades used a 74C14/74HC14 / 40106 / .... for many many many different tasks. Where precision is adequate it can be used for oscillators, delays, retriggerable and non retriggerable monostables, ADPCM modulator, analog amplifier (now, there's a trick)(feed it AC coupled audio and DC bias it at mid point, adjust input level and see what happens - scope on output. Add RC output filter and ! :-) ). And more. Note that most have the same hysteresis range but one (CD40106?) is lower. Mar 17, 2019 at 22:54
• Hand drawn diagrams on SE.EE are USUALLY a jumbled mess. Properly drawn and labelled, as yours are, they do a good job. Mar 17, 2019 at 22:57

Indeed. The enable input provides a low-energy way to start and stop the oscillator. so you can connect it to another gate on the same chip, or a similar same chip or to the output from a microcontroller.

If you don't need the enable input it can be connected to the positive supply, or you could build the other circuit.

As a switched oscillator both circuits are functionally similar.

However, the second circuit is not a "preferred " way to use any logic IC (or one used in a semi analog mode) as you are switching the power supply to the whole IC in order to control one section. This means that all other gates in the IC are on or off at the same time as the oscillator, which is rather more "wasteful" than using another gate for gating.

Also, the power supply current for the IC must be provided by the gating signal. In most cases this is not a problem as many logic level outputs have enough power and voltage to drive the IC - but if you were using the oscillator in a way that gave a current draw near the upper allowed limit then some IC pins could not supply it.

If you want to gate an inverter oscillator you can do so using a diode from V_control_in to oscillator IC input. When the diode conducts it swamps the feedback via VR1. If a low current enable line is required such that VR1 is too much of a load, drive another gate section and then use that gate to drive a diode disabler. Using a diode allows you to have a high or low disable line as desired - reverse diode polarity to change control polarity.

____________________________________

I do like the "Forrest Mims"-style diagrams .

• This is great! Thank you. Since I only needed one gate for the oscillator, it didn't occur to me that I was wasting the value of the other three gates on this 14 pin DIP by using the "power on/power off" version of the circuit. I will try the circuit variations you mention. As for the Forrest Mims style schematics - thank you for the kind words! I have to admit that Mr. Mims is a hero of mine. I find that hand drawing a schematic helps me learn a circuit's principles better than creating the schematic on a computer. Not sure why. Mar 17, 2019 at 18:10