Hi all,

Hopefully the following hints & suggestions will make it easier
for you to build your PCB's.

Stuff I figured out the hard way
================================
Firstly the unit of measurment of pcb-1.6.3 is a mil
whichis a thousand'th of an inch.
I defined a m4 UM_TO_MIL ( micrometer to mil ) 
macro to ease entering metric components.

The main purpose of a soldermask/component mask is to insulate
the tracks & prevent bad soldering joining tracks
or pads together unintensionally.
For this reason I made the soldermask size adjustable
it was 15 mils which was simply too big for PCI boards.


To get good at designing new components is pretty
painful they are written in a macro language called
m4 & this is used extensively, this saved coding
which otherwise would be needed in the parser of the
gnu pcb files, a gui editor would be better provided
it used text files which is a blessing in gnu pcb. 


i.e. 2 passes of m4 are run by the CreateLibrary.sh
& CreateLibraryContents.sh scripts & a final pass
is run internally by the Expandfilename function.

The most useful hotkey in gnu pcb is the c key this recentres
the board at the current mouse cursor position which
is extremely useful for moving around boards larger than the
screensize.


invoke like
m4 -dV 
for verbose debugging info.

The large m4 files
pcblib & pcblib.contents in
/usr/X11R6/lib/X11/pcb
are created by running scripts like
CreateLibrary.sh ../pcblib m4/common.m4 m4/*.m4
CreateLibraryContents.sh m4/common.m4 m4/*.list > pcblib.contents


To get a single component parsed which might give you some
ideas on debugging do something like.
../CreateLibrary.sh ../pcblib common.m4 *.m4
../CreateLibraryContents.sh common.m4 *.list >../pcblib.contents
/usr/X11R6/lib/X11/pcb/QueryLibrary.sh '/usr/X11R6/lib/X11/pcb' 'pcblib' 'XCS40_PQ208' 'XCS40' 'COMPACTQFP' 


To find out about m4 type 'info m4' if you have m4
documentation installed in your distro.

The central place where these m4 files are loaded is
the popen call in misc.c ExpandFilename function the parseing
functions in parse_l.l parse_y.y are called from here
If you get parse errors get gdb involved * do some debugging.

It is also very useful to edit the saved pcb files by hand
as you can do a lot this way which might not be possible from
within the package.


For building boards I recommend www.pcbpool.com  ( this is not
a plug ) however they have managed to build my boards which is pretty
unbelievable they are very cost effective & much less painful than 
explaining ruined carpets etc. with chemicals if you plan to do it yourself.


For soldering SMT QFP's with .5 mil between the pins it was suggested
by a more experienced hardware engineer to use solder paste & a stensil,
rather than soldering the pins ( I wasted quite a few components by trying
to solder them the normal way ), if somebody can make a stensil with an inkjet printer
please let me know how you do it.

For practicing soldering dummy components are also a good idea,
see



They have a free package online called GCPrevue which runs
under windows ( & possibly wine too ) which is the file format
they expect to receive the files, the gerber files from gnu pcb can be 
imported to this transparently the only thing which causes a little fun is
the drill sizes which need to be entered by hand.


What can be improved
====================

It is so much easier to suggest what could be improved than spending
the few man months required to do it.

It would be an ideal final year project for some electronic engineer or
computer science guy ( Talk to your teacher ).


The code is okay but needs a cleanup the objects should
be inherited from a single base & flags like solder side & component side
shouldn't be used insead the code should have layer numbers.

The objects should be a proper linked list tree ( i.e with parent child sibling ) rather than
current 3 level Board, Element, Pad etc as it currently is.
& it should be possible to select everything from a single
pad to the whole board with the same code & based on a single base class
( to use a C++ ism, this can be done in C ).

e.g. 
There is distinct code for handling lines & elementlines, arcs & elementarcs.
I tried adding an outline layer for the PCI m4 components I added however
the fact that an elementline has to belong to the same layer as its parent
element & would require extensive coding & testing to verify it was okay
prevented me.
So for now you have to move the PCI board outline I set up by hand in the file to
the appropriate layer.

The polygon tool ( which is commonly needed for ground planes is absolutely awful ),
it took me as long to put down ground planes as it did the rest of my board.
This should be like a paint tool in common paint packages & automatically fill
using the tracks & pads as an outline.

A kde front end would be nice.

Auto routing, there is apparently a freeware algorithm for this available,
I am sure this would be very difficult to add till the code is cleaned up,
it possibly can be found on www.opencollector.org.


Have Fun,
D.J.
dj_barrow@ariasoft.ie








