[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gEDA: newbie question
Hi,
>
>(Sorry for this question here, but I have not found any geda-user
>list.)
Since there isn't another list, then this is the right place
for any sort of geda questions. Speaking of which, I got a request
for an announce only mailing list for geda and all other associate
projects. Should I look into getting such a list? maybe a geda-user
list as well? Anybody have any comments?
>
>We at Technical Uni of Budapest got our first Electronics homework:
>AC/DC analyse of a circuit with a "circuit-simulator" (I don't know the
>right english expression). The teacher provides the program Trtr, but
>I want to use (/learn!/) ACS/Spice3 and other free linux programs,
>such as the gEDA project/gschema.
Grand!
>
>First, I have to make a spice netlist, I begin to draw the circuit
>with gschem, I think it has a very intuitive interface, really
>good. But I stuck, I don't know how to add values of resistors
>condensators etc...
All you need to do is attached attributes called: value=9k
value=16k etc... to each of the components. Which btw is not mentioned
in the attributes.txt document, oops, better add it.
>
>Which attribute should I use? Can I use mega/kilo/nano prefixes? (For
>example R = 8k, C = 1.2n?)
Sure, gnetlist views whatever the value as a value and does no
other translation on it. Now as far as what your simulator wants, well
that's up to the simulator.
>
>My circuit is _very_ simple (the sch file is 1.3kB -- there are 12
>elements), would you be so kind as to look at it and help me to make
>my first netlist/schema perfect?
Also, you need to change all the name= attributes to uref=
attributes. name= is not used to name components (with R1, R3 etc...),
that function is for uref=. Also you had a label=Rc1 which should be
uref=Rc1
Next thing to watch out for is the naming of GND etc... Usually
in spice simulators ground is given a reference node of 0. gnetlist
in it's default mode will give this node a name of GND which is not spice
correct. So you need to create a: ~/.gEDA/gnetlistrc and in it put:
(net-naming-priority "label")
which tells gnetlist to always use the user supplied name of a net as the one
to use (if gnetlist creates a net with two names), since you cannot
have a net with two names (GND creates a ground net). Then you need to
attach a label=0 to a net which is connected to ground. Also if you
want gnetlist to use a particular netname for a net, attach a label=
attribute to that net.
Now having said all that, gnetlist seems to generate a mostly
correct spice netlist from this schematic (I ran:
gnetlist -g spice -v homework.sch). However there are things in there
like "+12V" which I don't think spice will like and you probably need
to handle that very differently, ie it's probably simulator dependant.
Please don't expect the output from gnetlist to be 100% correct;
it's just a starting point and you will have to edit it to correct
mistakes and take care of simulator differences. I also need to iterate
that gschem/gnetlist is alpha software so expect screw ups; ie check and
double check all netlists.
Here's the netlist which was generated (after my cleanup):
* Spice netlister for gnetlist
* Spice backend written by Bas Gieltjes
T2 3 3 0 BC 182
T1 5 3 0 BC 182
Cc 5 4 8.8n
Cb 1 3 1.2n
Rc1 5 +12V 9k
Rt 0 4 16k
Rc2 3 +12V 9k
Rg 2 1 75k
.END
If you can't replicate this, let me know.
-Ales