40106 Triangle Waves

Recently I completed a post discussing the 40106 Inverter and a simple square wave oscillator. I wanted to build on that post a little more today and look at how we can modify this same oscillator to output triangle waves along with square. These triangle waves will sound profoundly different than square waves in the audible range, giving our oscillator 2 distinct voices. Additionally, we can use the oscillator at a low frequency to drive a voltage controlled amplifier or filter. We can get much more variance from the rising and falling triangle wave in these applications than we would with the simple switching of a square wave.

So Where Are These Triangles?

40106 Oscillator with Triangle Output

If you read my previous post you may remember that this oscillator works by charging and discharging a capacitor. As the capacitor charges and discharges it allows the voltage to rise and fall at the input. This rise and fall causes the output of the inverter to turn on and off producing the square wave. What we can also do is take an output at the input of the inverter where the voltage is rising and falling to produce a triangle wave!

An Amplitude Problem

If you try building this circuit as is you’ll very quickly notice an issue with the design. Connecting a speaker to the output of the square wave sounds great but the triangle is barely audible! If you look at the two waveforms above you’ll see that the square wave has a peak to peak voltage of 6.32V. The triangle however is only registering a fraction of that at 1.22V. This is because the output of the inverter (where we draw the square) always outputs a full digital signal. Meanwhile the voltage at the input only rises until it reaches a threshold voltage. At that point the inverter changes state and the capacitor begins discharging again. In this case (running the 40106 on 9V) that threshold appears to be 1.22V.

So What Now?

In my next post I’ll be exploring the use of op-amps to buffer these outputs and equalize them to a usable voltage. Once we’ve accomplished this we’ll be able to start using this oscillator in all kinds of awesome projects. See you all soon!