[sdiy] VCO unstable in Spice, stable in real world
Rutger Vlek
rutgervlek at gmail.com
Wed Feb 2 22:20:06 CET 2011
Dear list,
I've been puzzled (and charmed) lately with the behaviour of a simple saw-core VCO I'm trying to model in B2 Spice. The saw-core is based around a charging capacitor that gets discharged by a switching transistor as soon as the output of a LM311 voltage comparator goes high. That happens when the voltage in the capacitors hits the reference of 10V. So far nothing fancy.
But now the strangeness:
In the real world this oscillator works and sounds like a charm. In Spice however, the LM311 output shows very erratic behaviour. It seems to respond so fast that the when 10V is reached the switching transistor only partly discharges the capacitor after which the 10V is very easily met again. The system hence starts to oscillate around the 10V point very quickly without the capacitor ever being fully discharged again. A minor improvement is achieved when the default B2 Spice capacitor is replaced with a 'real capacitor'. This model takes into account any induction and resistance happening inside a capacitor.
My hypothesis on the difference between Spice and the real world for this scenario currently is that the less-than-perfect conductive properties of the PCB tracks play a crucial role in this VCO. The small inductive and capacitive properties of PCB tracks may provide some type of hysteresis on the output of the LM311, such that the real world VCO generates a stable saw. I'm curious what you think? Is it really that simple and charming? Or is there another explanation?
Regards,
Rutger
More information about the Synth-diy
mailing list