January 2008

You are currently browsing the monthly archive for January 2008.

Last entry was about designing the mainboard, using Eagle. The result is a layout diagram, which will be the starting point of the next step: building the PCB.

The layout diagram is saved as a postscript file (print into file) to get 1:1 scaled  picture. It’s then lay down on a copper board, using adhesive.

Using something sharp, like a screw, each hole is marked. This is used to localize the holes once the paper is removed (…), and will later help to guide the drill bit.

Once done, the paper is removed. Using a special PCB pen, each hole is marked, according to the layout.

About the pen, it appears other pens also work, though I’ve tested these with details. Particularly, pens used to write on CD-ROM work nice. The thing is to spread a thin layer which will protect the copper from the ferric perchloride.

Start drawing the tracks. This step is very important and delicate. Tracks mustn’t be in contact, the drawing must be regular.
The reproduction of the layout is done. Double-check the tracks. Now it’s time to cut the board.
Use adhesive on both sides of the board. It’ll make the manipulation in the ferric perchloride bath easier.
Put the board into the ferric perchloride bath, and fix it on the sides using adhesive. Be careful, the ferric perchloride is very toxic and dangerous (acid). Use gloves, protect your eyes and your clothes.

Depending on how “new” is your bath and the temperature, the required time to “burn” the board may vary.

About 30min later, the copper starts to disappear. One this step reached, smoothly shake the board into the bath, until all the copper is gone (and the tracks still there…).
About 5 to 10 min later, the board is ready. Get off the bath and rinse with water. The tracks are black due to the pen. It’s time to clean it.
Polish the board to remove the pen layer, with a Dremel or the like. Do not damage the board with the drill. Also watch closely to the tracks to identify potential problems…
… like these ! One track has disappeared, another has several cuts on it. Fortunately, these can be fixed using some wires and an soldering iron.
Start drill the holes. This step is very delicate and could permanently damage your board: while drilling, the drill bit can slide and cut tracks. The best is to use a drill press. Depending on how you’ve marked the holes, things can be easy.

I prefer to drill first with a 0.6mm drill bit, then use a 0.8mm one. Some components required a bigger drill, like the power supply jack, trigger and 7805.

Then solder the components. Start with the straps, as they may be hardly reachable once every components are on the board.
Here’s the final result. Quite nice, even if things could be far better…
Point-to-point wiring, using pre-drilled boards is too time-consuming, hard to reproduce and ugly… More, producing a picture like this one, representing the actual board, costs a lot (since no  software can provide this, AFAIK). It’s time to switch to a better environment.


So the idea is to produce PCB boards. But, before, I need to design the board. Eagle is a great software, available under Linux. It’s free for non-profit applications. It can be used to draw schematics, using a huge library of components. When done, Eagle is able to produce the PCB layout (using autorouting). Drawback is it’s quite tough to learn.Sparkfun has great tutorials which helps me a lot: drawing the schematics, building the PCB layout, and evencreating new parts.


First step is to draw the schematic. I’ve started from the previous mainboard and added modified it, according tothis ticket. Power supply is now provided by several connectors. They provides either +5V, either the unregulated power supply (used as input to 7805). The big 2×13 HE-10 connector is not splitted into two smaller 2×5 HE-10, one for PORTA, one for PORTB. +5V and ground are also available for convenience. Xtal quartz is now connected as a small board, so 16F88 can be configured to run with its internal oscillator (more, using different Xtal frequencies involves different caps, so Xtal and caps are dependent). Finally, a push button on MCLR can be used to reset the PIC without switching the power supply off (a little straight, but it works…).

The schematic is ready, it’s time to get the board. Eagle is able to build the board from this schematic… but it needs to be configured. The actual board will be built using special PCB pen and a copper board, so tracks and space between them shouldn’t be too narrow. After several tries, it appears 32mil is a good value (in “Design Rules”, “Clearance” tab and “Sizes” tab, “minimum width”). While configure “Autorouting”, I disabled the “top” layer, since this is a single side copper board. Autorouting the PCB gave 79% done, the last must be done manually. I define straps on the top side, with vias. I don’t if this is the best method in Eagle… Here the final result:

Once done, I print the layout in a postscript file (so scale is 1:1, whatever the resolution is), checking “Mirror” and “Upside down” options. The layout is ready to be reproduced on the copper side. Here’s a link to the postscript file.


Known bugs:

  • pin RA6 is not connected the PORTA HE-10 connector: (bottom right pin in the connector is a orphan)… Can’t really know why, since it’s connected in the schematic. Probably weird problems while connecting nets together. It’s not that important, since this pin is reserved for Xtal (when used), thus can’t be used in any daugther board.
  • the power supply polarity is inverted: ground is in center, + is around, while it’s often the invert. I’ve been fooled by the schematic of the power supply jack. Note a diode will prevent any polarity problems if not connected correctly. If the LED won’t light, the problem may come from this.
Once we have the PCB layout, it’s time to actually build the PCB. To be continued…