3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Electronic Tribble, "Fuzzy Logic" Type

Step 2Theory (such as it is) - electronics

Theory (such as it is) - electronics

Figure 1 is the schematic diagram of the circuit that will do the creation and multiplying of the waveforms shown above.

How does the circuit above function? Take a look at the first oscillator section, the one with NAND1, R1, and C1. The first thing to note about this section is that the NAND1 gate has its inputs joined together making it act as a simple Schmitt Trigger inverter. When the circuit is turned on by closing switch S1 the output of NAND1 goes high. This charges the capacitor C1 through the resistor R1. When the voltage on C1 gets up to the "logic high" trigger threshold of NAND1's inputs then NAND1 switches to a low output. The capacitor C1 then discharges back through the resistor R1 until the voltage on C1 goes below NAND1's "logic low" input threshold, which causes NAND1 to switch back to having a high output. The cycle then repeats.

The following two oscillator stages (NAND2 and NAND3) have a similar operation except that their inputs are not joined together to make them into inverters. Instead one of the inputs on each NAND is used as an "enable" line with a signal coming from the first stage. When the "enable" inputs of NAND2 and NAND3 are held high then NAND2 and NAND3 are allowed to oscillate just like the NAND1 stage does (but with different time constants). But when the "enable" inputs of NAND2 and NAND3 are held low then their outputs are forced to be high since the only way their outputs could go low would be for both inputs to be high. The NAND truth table below spells it all out.

Figure 2 shows the NAND truth table.

The final stage, NAND4, simply takes the second and third stages and multiplies them together. The result is a modulated signal (from the "tone" and "modulation" oscillator circuits) that cycles on and off as if the Tribble were breathing. This signal is then passed, through resistor R4, to a simple emitter follower amplifier that drives a speaker (yeah yeah, I know there is supposed to be a diode in parallel with that inductive load ... but the circuit works just fine without it).

The last aspect of the circuit is the variable capacitor C4 in the third oscillator stage. This capacitor is added in parallel with C3 and is constructed of two sheets of copper foil with a compressible spacer between them. The purpose of C4 is to add a bit of "character" to the sound made by the toy. When the foil plates are squeezed together the gap between them is decreased which will increase the capacitance of C4 (capacitance is proportional to plate area and inversely proportional to plate separation). Increasing the combined capacitance of C3 and C4 lowers the frequency of the third stage "tone" oscillator a bit. The effect is small but noticeable.

The use of Schmitt Triggered logic is necessary because our oscillators require the built in hysteresis that it has in order to have the required phase delay in the feedback loop. The hysteresis is in the form of a separation between the voltage levels required for logical low and high states. Ordinary CMOS logic has transition from low to high logic at about the midpoint of the difference between supply and ground voltages. When an input is above half the supply voltage then it is interpreted as high. When an input is below half the supply voltage then it is interpreted as low. Schmitt Triggers, on the other hand, interpret inputs differently. In order for an input to be considered high it must go above the voltage midpoint plus half of the built in hysteresis voltage. And for an input to be considered low it must go below the voltage midpoint minus half of the built in hysteresis voltage. It is the hysteresis "dead zone" that allows oscillation.

An oscillator stage like one of the three described above that was made of ordinary CMOS logic would simply settle down to the voltage midpoint and not oscillate properly (but it would still draw current). Whereas one made of Schmitt Triggers will oscillate as required. Ordinary CMOS logic (inverters, for instance) can be made to oscillate as used here but additional inverters/buffers are required to compensate for the lack of internal voltage hysteresis. These additional gates would increase our gate count beyond what is available on a single 4xxx series IC. So we won't do things that way, we'll use Schmitt Trigger gates instead.
« Previous StepDownload PDFView All StepsNext Step »
1 comment
May 8, 2008. 5:10 AMfearless_fool says:
David: Cool stuff! (Nostalgic comments w.r.t. 40xx-series CMOS elided...). Have you tried making a variable "squashable" resistor out of black conductive foam? (You would eliminate C4 and put the foam in series with R3.) As often as not, you get the foam for free with the CMOS part, which is in keeping with the elegantly minimalist approach of your design. - ff

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
1
Followers
1
Author:davidwoolsey