[sdiy] VCO unstable in Spice, stable in real world
Ian Fritz
ijfritz at comcast.net
Wed Feb 2 22:50:53 CET 2011
Rutger --
You don't say what your circuit is exactly, but in the real world it is
usually necessary to put in some hysteresis around the comparator so that
it will stay high long enough to discharge the cap. For example C4 in this
version:
http://home.comcast.net/~ijfritz/sy_cir2.htm
If your circuit is oscillating OK (check the zero) then you might have some
stray capacitance in the circuit, or something else providing a lag. We
would have to see the actual circuit to get a better idea.
Ian
At 02:20 PM 2/2/2011, 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?
>
>Regards,
>
>Rutger
>_______________________________________________
>Synth-diy mailing list
>Synth-diy at dropmix.xs4all.nl
>http://dropmix.xs4all.nl/mailman/listinfo/synth-diy
More information about the Synth-diy
mailing list