Re: CircuitMaker Step Time puzzle
From: Terry Pinnell (terrypinDELETE_at_THESEdial.pipex.com)
Date: 11/30/04
- Next message: Tony Williams: "Re: Basic queries on using LT Spice"
- Previous message: Terry Pinnell: "Basic queries on using LT Spice"
- Next in thread: Fred Bloggs: "Re: CircuitMaker Step Time puzzle"
- Maybe reply: Fred Bloggs: "Re: CircuitMaker Step Time puzzle"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 30 Nov 2004 10:25:17 +0000
John Larkin <jjlarkin@highSNIPlandTHIStechPLEASEnology.com> wrote:
>On Mon, 29 Nov 2004 20:39:37 +0000, Terry Pinnell
><terrypinDELETE@THESEdial.pipex.com> wrote:
>
>>Any CircuitMaker users have any thoughts on this puzzle please?
>>I've been running the simple CMOS astable at
>>http://www.terrypin.dial.pipex.com/Images/TestCursors.CKT
>>
>>I know the 1k resistor is far too low (330k would be good), but that's
>>not the point of my post.
>>
>>At certain settings of Step Time (= Max Step), the waveform is not
>>identical from one cycle to the next.
>>
>>One such critical value is 1 ms. With that chosen, successive Lows
>>differ significantly in length. I've illustrated the 1 ms result here:
>>http://www.terrypin.dial.pipex.com/Images/CM-StepTimePuzzle1.gif
>>
>>You can clearly see the variation in successive cycles. I measured
>>about 4.3 ms versus 5.4 ms, while the Highs remain identical at 5.0
>>ms.
>>
>>So, depending on which choice of cycle I happen to make, I get a
>>different frequency: 97 Hz versus 104 Hz. Yet at 990 us (i.e. only a
>>tiny difference), I get a *consistent* waveform and hence a consistent
>>frequency measurement (97 Hz). But at Step = 100 us, I also get a
>>consistent frequency, but now it's 114 Hz.
>>
>>Any insights appreciated please.
>
>Consistant isn't the same as accurate.
Yes, that was one of the points I was making. Obviously 97 and 114
can't both be accurate!
>Timesteps are usually set to a small fraction of the time any circuit
>event is expected to take, like 1/100 or 1/1000 or something. You
>can't expect to accurately simulate a 5 ms period when time is
>quantized to 1 ms. Try 1 us maybe.
This is an astable running at about 100 Hz, i.e a period of 10 ms.
Strangely, if I let CM use defaults, it sets Stop Time = 5.000uS and
Step Time = 20.00nS. Not a useful display! BTW, it always uses that
same ratio of 50:1. When I set manually, as I did in these tests, I
usually choose 500 or 1000. Your reply seems to reinforce my intuition
that 'shorter is better', So why does CM (and several other Spice
programs I've used) default to 50? And any idea why it comes up with
such an absurd default setting for a circuit with an RC of 33k/82nF?
Thanks, I agree 1 ms was too crude. I think I must have been
'comfortable' with it on the grounds that at 1000, the ratio 1s/1ms
was so much higher than CM's 50! And lost sight of the underlying
circuit. Using 1us prompted me to revise the Stop Time down from 1s to
50ms. (It was as high as 1s only because that astable was originally
part of a 4020/4060 counting circuit.) With Step Time = 1us the plot
looked consistent (which, unlike consistant, is accurate <g>), and
gave f ~ 115 Hz.
>My rule is to make the time step as small as possible consistant with
>simulation time. When in doubt, change the step time maybe 2:1 in
>either direction; if the sim changes visibly, your steps are too
>coarse by 10:1 at least.
I'd previously followed similar practice. Thanks for prompting me to
realise I'd lapsed, fro reasons above.
>What's a bummer is to have a circuit with a very high Q or widely
>varying time constants; small dt and slow elements make for hour-long
>transient runs.
Do you think there's something of that sort happening here, and
causing CM to come up with a Stop time of 5us?
-- Terry Pinnell Hobbyist, West Sussex, UK
- Next message: Tony Williams: "Re: Basic queries on using LT Spice"
- Previous message: Terry Pinnell: "Basic queries on using LT Spice"
- Next in thread: Fred Bloggs: "Re: CircuitMaker Step Time puzzle"
- Maybe reply: Fred Bloggs: "Re: CircuitMaker Step Time puzzle"
- Messages sorted by: [ date ] [ thread ]