[sdiy] VCO unstable in Spice, stable in real world

Magnus Danielson magnus at rubidium.dyndns.org
Sat Feb 5 13:09:00 CET 2011


On 02/02/11 22:20, Rutger Vlek wrote:
> 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?

You need a capacitor in there to get stable properties, to keep the 
LM311 conducting for the full period. I've had this problem with my 
ASM-1 VCO and fixed it by adding additional capacitance. See the ASM-1 
VCO schematic on my site. You might also want to read that section on 
the ASM-1 webpage.

Cheers,
MAgnus



More information about the Synth-diy mailing list