Jeroen Bouwens

Ramblings about software engineering, technology, business and everything else

PCB Creation

In my previous post I showed how I got everything working on the breadboard. Next, it was time to move the circuit over to a more permanent medium. While I considered plain old perfboard, I was also interested in the process of designing a custom PCB using a program like EagleCAD and methods for quick and cheap PCB fabrication at home.

Design

So I took the plunge, and started learning EagleCAD. Anyone who has gone through the same process will confirm that Eagle has an pretty steep learning curve. Many things are just a little bit different from how more everyday applications work, such as how to deal with multiple objects. Also, finding the right components in the component libraries is difficult, unless you already know where everything is (this external parts search engine proved invaluable). In the end though, I managed to produce a schematic that represented the mess of wires on my protoboard in a more orderly fashion:

When the schematic was done, it was time to design a PCB layout. This is where a program like Eagle really proves its worth. While the learning curve is again pretty steep, the program keeps track of which things should be connected where, and lets you know of any problems in the layout, such as overlapping tracks. Initially, I wanted to give the autorouter a shot at coming up with a solution. This turned out to be a crappy idea. The best I managed to squeeze out of it eventually was this:

I decided to ditch the autorouter, and start a hand-crafted design from scratch. After many iterations, here’s what I came up with:

Pretty decent, if I may say so. The layout is reasonably compact, with no wide open spaces, there are no sharp angles which can lead to mechanically weak corners in the finished product, and despite limiting myself to a single layer PCB, there is only one air wire (represented by the single track in the top layer, marked in red).

The main things that did not work out so well is that some of the tracks are too close together, which means I had to do some cleaning up after etching, and the placement of one of the components: SW_CONN, which is the pin header for the control buttons, is a bit too close to the atmega’s socket, so I cold not use a nice connector there.

Fabrication

The easiest way to get yourself a high quality PCB is without a doubt to simply send your design off to a PCB manufacturer and have them make it for you. I didn’t want to go this route for cost reasons. These services are not necessarily expensive if you need many copies of the same board, but there are significant setup and overhead costs involved, making this approach uneconomical if you need only one or two boards.

There is an incredible amount of information available online about fabricating your own PCBs. Methods available to the DIY’er to get the design on a copper clad board include:

  1. Hand drawing the layout using a Sharpie
  2. Printing the layout on a transparent sheet and using a UV light box and photosensitive copper board
  3. Hacking a suitable inkjet printer to print etch-resist directly on the board.
  4. A number of toner-transfer methods, where you print the design on suitable paper, and then transfer the design over to the board by ironing it on.

Method 1 only works for very simple designs, with wide tracks. Method 2 requires a significant up front investment of money, which is only worth it if you make a lot of PCB’s, as opposed to the less than 10 I expect to be making each year. Method 3 requires a lot of work converting the printer up front, and from what I see online is still pretty involved, requiring an oven to cure the etch resist.

So this leaves Method 4, toner-transfer.

Since virtually all toner-transfer methods use a laser printer to print the layout, the question then becomes which paper to use. As Jeff Atwood once said, “when it comes to strip-mining an obsession, the Internet delivers”, and so it is with toner transfer methods. There are many articles dedicated to the subject, and everybody seems to have a different favorite type of paper. Initially I tried using the cheap advertisement flyer paper which is recommended by many sources. Now since I do not have a laser printer at home, I used the heavy duty office printer at work. Unfortunately, the paper was too thin for it and got stuck in some impossible to reach spot. Eventually I managed to remove it, but this was clearly not a good approach.

Other people achieved good results using inkjet photo paper, but there is a risk that the glossy layer will melt when used in a laserpinter, resulting in a Very Bad Day for the printer. I simply did not want to risk this with my boss’s printer, but I decided to try special glossy laserprinter photopaper instead. This gave a promising result:

The layout came out incredibly crisp, as expected, and I could actually feel the layer of toner sitting on top of the paper, which made me hopeful about the transfer process.

Here’s what I did to transfer the toner to the blank copper board:

  1. Clean the board using a gritty cleaning pad, water and a little detergent
  2. Clean the board even further using nail polish remover
  3. Heat up the clothing iron to its highest setting
  4. Pre-heat the board by simply letting the iron sit on top of the copper side for a minute or so
  5. Cut the printed layout to size
  6. Gently place the photopaper on top of the board, with the toner against the copper. IMPORTANT: You have only one chance to get this right! The paper sticks to the board immediately, and you cannot move it once it sticks without tearing it apart.
  7. Thorougly iron the paper. Don’t be shy, but apply a lot of pressure and iron until the paper starts turning brown. Use the tip of the iron put increased pressure on a small area.
  8. Drop the PCB/Paper combination in cold water, and let it soak for a while. How long depends on the paper used, but eventually it will come off without applying any force. It will almost slide off by itself, leaving the toner layout on the copper.

After going through this procedure it looked like this:

Now the PCB is ready for etching. You can use any etchant, but my personal choice is ammonia-persulphate. It’s not as nasty as, for example, ferrous oxide, and etches pretty quickly. After etching and trimming the PCB back to size (in the process of which I messed up one of the tracks), this was the result:

And after cleaning off the toner using nail polish remover, I was left with the following:

Not bad at all for a first attempt!

Next time, I’ll go into the details of populating the PCB and wiring everything up.

Comments