Theo Verelst Damped Sine Generator page
This is an analog circuit example I roughly remember from
highschool, when I was making analog/digital rythm boxes.
I've included a ascii to wav converter, and I've added some
explanation, both on the circuit and my experience with the
PSPICE based Microsim simulator. Will I one day be able to break the
speed record of building circuitry on breadboards by
semi-building them on the schematic entry program?
At that time a breadboarding robot becomes a valid option.
The Circuit
The sine generator circuit that forms the basis of this circuit
evolves around a 3d order filter, and an inverting
amlifier.
The latter preferably a touch non-linear, so the loop amplification
can be higher than 1.0 for small signals, but smaller for
signals that are getting out of amplitude bounds, so that
the resulting cicuit may oscilate without becoming unstable.
The standard inverting transistor amplifier serves this
purpose just fine, and R9 can be used to adjust its' AC
amplification, at 150 Ohms the circuit oscilates, and when
carefully adjusted, it can generate reasonably accurate sine waves,
with a little tweaking I managed to limit the harmonic
distortion to less than 1 percent (handy, this FFT option in the
'probe' tool). Of course the transistors non-linearity provides
the desired limiting behaviour, and if the amplification is too
high, the collector resistor would hard-limit the output
amplitude, or the transistor would saturate, both at the cost
of high clamping type distortion.
As always with this type of oscilator, the main issue is how to
stabelize unit amplification in a repeatable and temperature and
device parameter spread insensitive way. In practice, I was able
to build well-working oscilators with this type of circuit,
even with adjustable frequency by changing on of the RC circuits
resistor values, at the expense of some distortion.
In this design, I would use a potmeter for R9, and the 220 Ohm
I found by runing the simulator for various values.
To make a damped oscilator, the accuracy requirements are
not so stringent, since then merely the decay time is
affected by the loop amplification. For very long decay
times, again all values become critical.
The normally inactive V2 AC source in the diagram was used to
make a frequency tranfer plot for the non-oscilating but
highly resonating filter mode, giving a narrow 140 Hz or so peak,
as expected. The printer symbol generates a .PRINT statement
in the spice file, which gives a list of equally time spaced sample
values resulting from the transient analysis. I DC decoupled the
the output to give it less of a DC component. In the next section,
the output is shown and discussed.
This circtuit only gives on damped sine output signal when it is
turned on. To make it generate drum sounds on demand, switching
the supply is not the only option: any exitation in the signal path
will lead to a damped sine being output, so for instance a logic
gate output could be coupled similarly as V2 (with a lower
resistor for higher ouput) to control the circuit.
A smoother way would be to have a high off-filter make a
attack curve out of a pulse, and possibly couple this
with a diode.Switching the ground side of C4 is also valid.
I will add some examples as I find time (I have to
digg them up out of memory).
Another issue is using the non-linearity that is exactly the thing
to prevent in sine generator design to beef up the sound. Both
overloading the cicuit with an exitation pule or by temporarily
increasing the loop amplification to higher than 1 and adding
diode-resistor networks may serve that purpose.
Graphical Ouput
The following image is a screen shot from the probe tool
provided by Microsim, and a window of the audio processing
package Wavelab (by Steinberg), showing the output of a
transient analysis of the circuit.
Note that the 'initial transient computation' must be switched off,
otherwise the circuit is stable.
The Wavelab package also has time-frequency analisis options,
and a lot of audio processing facilities (including reverb
and other sound effects, but also high speed waveform windows
and editing facilities) which make it an interesting platform to
play samples from.
Sound output: spice to .wav
I wanted to see if I could make SPICE generate sound samples,
for a multitude of reasons, the main being summed up by
wanting to hear what my synthesiser designs will sound like
before I built them. A 100MHz pentium proves to be sufficient
DSP horsepower to generate audio-lenght samples from
analogly simulated circuits like this, and my
ascii to .wav converter program
seems to do as it promised. The output is clamped, because I
use a direct .1mV per sample step converion criterion, but
with a hard limiter.
Here is the resulting
sound.
I hope to be producing a lot more, after I've tried this one myself
(I can't have zip-drives and soundcards at the same time at the
place I'm working now). Mayby I'll sample it down a bit, it
should have bass-drum potential.
I will produce more analog and digital units, to show that the
designs I did a long time ago actually worked (if there are
still people out there that deny me that), and to have design
feedback on some designs I want to make into a working synthesiser,
or parts of it.