gEDA

繁體中文版

Drawing schematic capture of electronics circuit was a joy during the old days of DOS. I used OrCad's draft to do this and it was just a joy to work with. It was so simple and the result was so nice. Since moving to Windows, I tried OrCad Windows' version and found it was not very intuitive and rather difficult to use. I tried others, like Protel, and did not find the simplicity that I found in DOS OrCad. In Linux, I have tried other schematic programs, e.g., Oregano, Kicad, Eagle,  etc., but found them wanting something. Until I installed and started playing with gEDA. I got the same feeling like when I was using OrCad's draft in the DOS environment. gEDA is really so easy to use.

Although gEDA is a complete suite of tools, i.e., "electronics design, including schematic capture, attribute management, bill of materials (BOM) generation, netlisting into over 20 netlist formats, analog and digital simulation, and printed circuit board (PCB) layout", in this article I will just talk about schematic capture.

Installation

Ubuntu Linux

Just use synaptic to install gEDA. I just installed geda-gschem-1.6.2-3 and synaptic will manage and install all dependent files. I then updated through ppa and got the newest version 1.9.0.

To update using ppa just append the following lines to your /etc/apt/sources.list

   deb http://ppa.launchpad.net/mehanik/geda-unstable/ubuntu precise main
   deb-src http://ppa.launchpad.net/mehanik/geda-unstable/ubuntu precise main

Windows

After searching for a Windows version of gEDA for weeks, I finally found one. I have installed it in Windows XP and found it very nice.

You may download the file at: http://bibo.iqo.uni-hannover.de/dokuwiki/doku.php?id=english:geda_for_ms-windows. I also made the file available in my own ftp server: ftp://cc2.savs.hcc.edu.tw/windows/schematic/gEDA/. Just unzipped and install.

Things To Do After Installation

Note: I will be using chuavv as my username.

Ubuntu Linux

You have to execute gEDA first and it will create .gEDA (notice the dot) directory below your home directory. cd to .gEDA and create a file named gschemrc with the following content:

; Define local library path
; This is the path to the directory where you place the symbols you have created. This will be included when you execute gEDA.
; I have created a directory gEDA (no dot) where I put all my schematic capture files.
; And below this, I created a sub-directory MySymbols where I put all the symbols I have created.
(component-library "/home/chuavv/gEDA/MySymbols")
; disable status window on startup
(log-window "later")
; Disable color image for png/jpeg/... output.
(image-color "disabled")
; Load your own colormap
(load (build-path (getenv "HOME") ".gEDA" "gschem-colormap-darkbg"))

When you run gEDA, the grid lines are so light that it is almost impossible to see. So I copied gschem-colormap-darkbg and gschem-colormap-lightbg from /etc/gEDA to .gEDA (with a dot) and changed the following:

gschem-colormap-darkbg:

(mesh-grid-major "#1e1e1e") ==> (mesh-grid-major "#2e2e2e")
(mesh-grid-minor "#171717") ==> (mesh-grid-minor "#1f1f1f")

gschem-colormap-lightbg:

(background "#f0f0f0") ==> (background "#ffffff")
(mesh-grid-major "#e1e1e1") ==> (mesh-grid-major "#d8d8d8")
(mesh-grid-minor "#e8e8e8") ==> (mesh-grid-minor "#eaeaea")

Now when I execute gEDA, the grid lines are so much clearer.

Windows

After insllation, gEDA will create the following directories:

C:\Documents and Settings\chuavv\.gEDA and gEDA (note the first has a dot while the second has none). The one without the dot if you do not need it just delete the whole directory.

Go to C:\Documents and Settings\chuavv\.gEDA (the one with a dot):

Rename gschemrc to gschemrc.orig and gafrc to gafrc.orig. If you really do not need these 2 files, you may also just delete them. Next create a new file gschemrc with the following content:

; Define local library path
; This is the path to the directory where you place the symbols you have created. This will be included when you execute gEDA.
; I have created a directory gEDA (no dot) where I put all my schematic capture files.
; And below this, I created a sub-directory MySymbols where I put all the symbols I have created.
(component-library "D:\\MyDocuments\\Schematic\\gEDA\\MySymbols")  ; Notice the double backslash
; Disable color image for png/jpeg/... output.
(image-color "disabled")
; Disable status window popping up on startup.
(log-window "later")

Note: (logging "disabled") does not work. Everytime you execute gEDA, a log file is created. I suggest that you delete these files once in a while.

Schematic Capture Demo

I will be using 555 astable circuit to demonstrate how to do schematic capture in gEDA. I will need 555 IC, 3 resistors, 2 capacitors and an led.

First click on the AND gate icon to get the symbol 555.

Note: gEDA calls this as symbol, but OrCad call this as parts.

And since I know the name of the symbol I want, I just type 555 in the Filter to get the symbol faster. If you do not know the name of the symbol you want, you need to browse the symbols library. I recommend that you do familiarize yourself on the symbols available in the library.

Drag the symbol out of the "Select Component" window and left-click your mouse to place the symbol into the sheet. Right-click the mouse to cancel. Click on close. Click on the the symbol 555 and drag to the center of the sheet.

Next I will add 3 resistors. As I already know the name of the symbol, so I just use the filter again.

Left-click the mouse to place the resistor into the sheet. Move the mouse cursor nearby and left-click the mouse again to place the second resistor and the third.

In the same way get 2 capacitors, 1 LED, vcc and gnd:

Now we have the needed parts in the sheet. We will try to move the parts to their appropriate locations. Some parts need to be rotated, so click on the symbol to select it and type er (Edit Rotate). If you find the symbols to be rather small just press z a few times to zoom in. Press Shift+z to zoom out.

Now that parts are in their proper locations, we will put the wires (gEDA call this Add Nets). So click the Add Nets icon to connect the wires:

Left click on the starting point, drag the wire to the next location left-click to connect, drag to the next location, etc. Right click to cancel. Then move to the next starting point, left click to start, drag the wire to the next location, left click to connect, etc. Click the arrow Icon when you're finished.

Now it is time to change the values of each components. Just click on a symbol to select it. Right click and choose edit:

 

We need to add the value attribute (1uF) for this capacitor. Should be visible but only the value. The refdes (reference designator) should be changed from C? to C1. Then click on Add.

Click to select value name 1uF and drag to a proper place. You may turn off the "snap to grid" function, (press os (Option Toggle Snap On/Off) until you see at the bottom-right of the screen "Snap Off - Select Mode") for better placement.

Then click on C1 to select, press er (Edit Rotate) and then place in an appropriate location. Do not forget to restore "Snap to grid" function afterwards. Press os until you see at the bottom-right of the screen only "Select Mode".

You do this procedure with the other symbols. And the finished circuit should look like this:

Create your own symbol

Creating symbols in gEDA is really simple. In fact, the content of a schematic file (filetype sch) and a symbol file (filetype sym) are the same. You use the Add box, circle, arc, pin, etc. to create your own symbol:

But before you save a sym file, you need to Edit Translate (et):

Now you save the file as filename.sym to your symbol directory.

Next, I will demonstrate how to edit an already existing symbol file. Did you notice anything wrong with the 555 astable circuit above? Well, with the astable circuit, pins 2, 6 and 7 are closely related. But in the 555 symbol above, pin 2 is on the left side while pins 6 and 7 are on the right side. We will edit this and put pins 6 and 7 on the left side. We just copy the file lm555-1.sym:

and rename the file to lm555-1.sch

Open this file in gEDA and it looks like this:

Now we will start moving pins 6 and 7 to the left, move pin 1 to the bottom, pin 3 to the center at the right, etc. You may need to rotate (er) the pin after moving. It should now look like this:

Edit Translate (et) and save to your symbol directory as lm555.sym

Now the 555 astable circuit should look like this:

Which looks much better than the previous one.

Printing

Before printing directly to the printer (File --> Print) or exporting to an image file (File --> Write image), you need to change the background color to white (View --> BW color scheme).

If you have any problem or question, the gEDA FAQ is a good reference: http://wiki.geda-project.org/geda:faq-gschem

Hope you'll enjoy creating schematic capture using gEDA.

Fr. Visminlu Vicente L. Chua, S.J.
2013/09/01