sexta-feira, 3 de janeiro de 2014

Configuring gEDA

The following files are my configuration for gEDA. gEDA is a suite for electronic design automation (EDA, unsurprisingly). It is a set of loose tools that are supposed to work together, even if with rough edges, to provide an end-to-end solution to design electronic boards.

It actually does a good job. Most of the complaints on gschem (the schematic editor) are not to blame on the program, but on the symbol libraries, which, despite the good work done there, are ridden with annoying inconsistencies. Unlike any commercial applications with free versions, there are no limits on pin number or board size. Once you get the hang of it, it should be enough for most small or medium hobbyist project.

gEDA tools are configured with Guile. Guile is an implementation of scheme. The language is, I grant it, not the best choice for a scientific or technical program, given the profusion of mathematical libraries in python (scipy, numpy, etc). But it does the job and does it well.

File ~/.gEDA/gafrc

(let ((datadir (user-data-dir)))
(scheme-directory (build-path datadir "scheme")) (source-library (build-path datadir "subcircuits")) (let ((symbols-dir (build-path datadir "symbols"))) (for-each (lambda (info) (component-library (build-path symbols-dir (first info)) (second info))) '(("digital" "Digital logic and chips") ("diode" "Diodes") ("graphical" "Graphical Components") ("microcontroller" "Microcontrollers") ("misc" "Miscellaneous") ("passive" "Passive components") ("power" "Power components") ("relay" "Relays") ("subcircuit" "Subcircuit symbols") ("titleblock" "Title blocks") ("transistor" "Transistors"))))) (scheme-directory "./scheme") (component-library "./symbols" "Project Symbols") (source-library "./subcircuits") ;;;; Local Variables: ;;;; mode: scheme ;;;; End:

What this file does is the following: a set of subdirectories are assigned (if they exist) for my own symbols, subcircuits and scripts, in ~/.gEDA/. There will be directories under the directory gschem was started from, normally the project directory. As these configurations are quite common, I have moved them here. I have found them to be quite comprehensive. I do not usually have per directory configuration files, since they are not needed.

File ~/.gEDA/gschemrc

;;; Light colors.
(load (build-path geda-rc-path "gschem-colormap-lightbg"))
(load (build-path geda-rc-path "print-colormap-lightbg"))

;;; Set the window size.
(window-size 1100 650)

(define default-titleblock "border-A3L.sym")

(paper-size 16.54 11.69) ; A3
(output-color "enabled")
(output-type "extents")
(output-orientation "landscape")

(image-color "enabled")

(load-from-path "auto-uref.scm")
(add-hook! add-component-hook auto-uref)
(add-hook! copy-component-hook auto-uref)

(auto-uref-set-page-offset 100)

;;;; Local Variables:
;;;;   mode: scheme
;;;; End:

The titleblock

I do not fancy the large symbols in gschem libraries. It wastes a lot of paper for nothing. As I cannot reduce the symbols without implementing the whole library, I chose to widen the paper, that is, to enlarge the titleblock and the borders of the paper. Once the schematic is printed, it will be printed under the new units, since I just print it complete without margins on A3 paper.

The symbol files can be found at this Google Drive directory. There is a symbol for a title block (with useful attributes), A3 landscape and A4 portrait borders. The following image is a screenshot of gschem running under Linux with the title block and borders I have provided.

Please provide suggestions to improve these files

Sem comentários:

Enviar um comentário