What is a crystal oscillator?
Accord to wikipedia, "A crystal oscillator is an electronic circuit that uses the mechanical resonance of a vibrating crystal of piezoelectric material to create an electrical signal with a very precise frequency."
What is a crystal oscillator intended to do?
Crystal oscillators provide a steady unchanging frequency. Originally they were used for stabilizing high frequency circuits such as radio transmitters or sonar, but today they are most commonly used for clocking digital circuits/computers.
How do I find one? What are their secrets?
Crystal oscillators come in mysterious little metal boxes about the same size as your typical integrated circuit. It is best to buy them in assorted bundles. Not only is it cheaper (sometimes the cost ends being under 25 cents per oscillator), but you also get assorted frequencies. I've come across frequencies ranging from 4 Mhz to over 200 Mhz. This means the lowest frequency oscillator is actually over 200 times higher than the upper end of human hearing! Oh, they look like this by the way...
What can we do with them?
Many things! So many that I will probably keep coming back to write about these little lovelies again and again. The easiest way for us to use these is to exploit a phenomenon called heterodyning. Wikipedia says... "heterodyning is the generation of new frequencies by mixing, or multiplying, two oscillating waveforms." Heterodyning allows us to create audible tones from the supersonic frequencies generated by the oscillators. The theremin actually uses a heterodyning technique to generate sound too. The theremin has two supersonic frequencies one at a set frequency and one which changes frequency according to the proximity of your hand (inductance, capacitance, and magic are all involved). The tone you hear is the difference between the two higher frequencies. Since our crystal oscillators are always at a set frequency, different sounds are achieved by changing the amplitude levels of the oscillators or adding/subtracting new oscillators. First, lets get a steady sound....
WARNING: crystal oscillators expect a supply voltage of 5V. I have been powering these with a 9V battery. I have let the circuit sit powered for hours and nothing blew up or got smokey, but as crystals are made by approximately 97657 different manufacturers I cannot guarantee you will have the same experience. Whenever you are hacking anything please follow all the safety guidelines outlined in Nic Collins' book Handmade Electronic Music - The Art of Hardware Hacking.
Now that that is out of the way... you can see how easy the circuit is. You will probably want to use more than three crystals and you will definitely want a means to control them. The easiest control is to have an on-off switch for some of the oscillators. You can do this by using a SPST switch to disconnect the crystal from ground. A variable resistor between the power supply and the power pins on the crystals lowers the current available to the crystals and makes them "fight" for power. The crystals can also be mixed together through (variable) resistors. Throw some diodes in series with the output of each crystal for some dirtier sounds. Have fun and go crazy. Also note that a DC blocking capacitor isn't a bad idea.
Above is my friend's rendition of this circuit. It has a variable resistor in series with the power and a DIP-switch that can turn each crystal on and off. His box has no other components besides what is mounted on the front: no resistors, capacitors, diodes, etc. Below is a prototype I blindly put together after I tested things out a little bit and knew it would definitely produce sound. I don't recommend using many controls like I first tried doing. The circuit can drift and shift a bit without you flipping switches or turning knobs so limiting your controls can be useful.
Here are some sample sounds to demonstrate what you can do with this basic circuit. Yes, it is pretty much a one trick pony at this stage. Later I'll follow up with some articles on more complex uses such as interfacing crystals with CMOS circuits and control voltage generation for modular synthesizers.
what is microhacking?
- Most circuitbending and hacking involves perverting a complete circuit. Microhacking is a simple (and possibly cheesy) term I'll be using for taking individual electronic components or concepts and giving them new uses.
ATTENTION: this blog focuses on creative misuse of electronics so be careful and note that I am not responsible for anything.