[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: simulation advice



On Monday 02 April 2007 21:54, Patrick Doyle wrote:
> OK, now that I have the slightest inkling of an idea of what
> I'm doing, I thought I would ask for some direction...
>
> I want to model a fairly simple circuit consisting of a
> handful of R's and C's, a transistor, a diode, a couple of
> microphones (which I'm planning on modeling as current
> sinks), and a couple of switches.  I want to measure the
> simulated voltages at a couple of points in the circuit as a
> function of how the switches are set.  If I could see the
> range of voltages over temperature and tolerances of the
> parts, that would be icing on the cake.

With gnucap you can use "fault", "modify", "param" to 
interactively change component values.  You can also sweep them 
with the "DC" command.  Spice can sweep sources.  Gnucap can 
sweep any single value.

How about .. "R1 (2 4) foo"

param foo=10k
op
param foo=47l
op

or ...
"dc R1 100 1000k dec 5"

> It's the "couple of switches" part that I'm not too sure
> about (as well as the "over temperature and tolerances"). 
> From what I've learned, I think I might want to perform an OP
> analysis, but I'm not sure. 

"op" in gnucap takes arguments .. it can sweep temperature.

R's and C's (and most other components) can have temperature 
coefficients in gnucap, easily.  There is a way to do it in 
ngspice, but it is harder.

> I can figure out how to model 
> one of the switches as a PULSE current source or two
> (switching between the current draw of one microphone, zero,
> and the other microphone), but I'm not sure how to model an
> on/off switch.  I think if I go that route, I would want to
> perform a TRAN analysis instead of an OP.  Does that sound
> right?

I don't understand the question.
Use tran when you want a time domain response.  

> Is this where I might want to use Gnucap over ngspice?  Does
> it offer scripting capabilities that I might want to use?

Both offer some, but they are different.  

> How do folks use the simulation tools in real life?  Do you
> do things like this?  Am I (as is somewhat typical of me)
> trying to use a tool meant to be a power saw as if it were a
> hammer?

What you are doing is really simple compared to what advanced 
users do.


_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user