CHAPTER 6

Images
Printed Circuit Board Fabrication

At the end of Chapter 5, we had a finished board layout. We now need to use that to generate the files that can be sent to a PCB fabrication company that will in due course send us back some real PCBs.

The CAM processor is the EAGLE module that converts the layers in the EAGLE PCB design and produces the industry standard files required to fabricate the PCBs. This chapter explains this process and shows you how to produce such files using the example sound meter project developed in Chapters 4 and 5.

Although you can create your own PCBs using photosensitive PCBs and photo etching, it can be a messy and tricky business. It is also relatively expensive because the developer and etchant chemicals do not last. They are also toxic and difficult to dispose off because you cannot simply wash them down the drain. Because you can have a double-sided silk-screened drilled PCB made by a fabrication service for a dollar or two per board, even for runs of 10 or fewer boards, unless you are in a real hurry or just enjoy the process, there is little point in making the boards yourself.

Having said that, later in this chapter we will look at photoetching your own PCBs.

Images

Gerber Files

Although some PCB fabrication services will accept EAGLE design files directly, most require you to produce a set of what are called Gerber files. These files are an industry standard for PCB fabrication. You will normally be required to produce seven files.

Table 6-1 shows the files that you should submit. Each of the files has a different extension that indicates its contents.


TABLE 6-1   Gerber File Types for CAM

Images

Images

Loading a CAM Job

The process of generating the CAM files is extremely configurable. You can essentially use any of the layers as the basis for any of the preceding Gerber files. This flexibility is very powerful but also allows plenty of room for error if you are designing your own CAM configuration from scratch.

By far the easiest way of generating the files is to use a CAM configuration (called a CAM job) that has been designed by someone else. In this book, we will use the excellent CAM job designed by Sparkfun. This is available free of charge from Sparkfun at https://github.com/sparkfun/SparkFun_Eagle_Settings/tree/master/cam.

To install this into EAGLE, download the file sfe-gerb274x.cam, and copy it into the .cam folder in your EAGLE installation directory.

Images

Running a CAM Job

To load the Sparkfun CAM job, select the “CAM Processor” option from the File menu while you have the board you want to create Gerber files for open. This will open the default CAM processor job, as shown in Figure 6-1.

Images


FIGURE 6-1   Default CAM job.

To open the Sparkfun CAM job, select the option “Job…” from the “Open” option of the File menu on the CAM Processor window. Then select sfe-gerb274x.cam from the list, and the Sparkfun CAM Job will open up (Figure 6-2).

Images


FIGURE 6-2   Sparkfun CAM job.

As you can see, the difference between the default CAM job and the Sparkfun one is that the Sparkfun CAM job has a row of tabs, one to generate each of the Gerber files. For example, the one shown in Figure 6-2 is labeled “Top Copper.” As you might expect, this is responsible for generating the top copper Gerber layer (.GTL).

In the “Output” section of the tab, you can see the “Device” field with a dropdown list next to it. This can be set to a number of other types of CAM format. This should be left as GERBER_RS274X.

On the right-hand side of the tab is a list of layers, with some of the layers highlighted. The highlighted layers are the ones that will become copper when the CAM job is processed. The other tabs each work in a similar way.

To generate the Gerber files, all we need to do is to hit the “Process Job” button. The files will be generated and placed in the project folder. Figure 6-3 shows the full set of generated files.

Images


FIGURE 6-3   Generated Gerber files.

Images

Measure Twice, Cut Once

At this point, it is extremely tempting to send the design files off to the fabrication service. However, the old carpentry maxim, “Measure Twice, Cut Once,” is very relevant here. There is nothing worse than submitting a job to be made only to suddenly realize that you had forgotten to check something and you would just have to pay for and await the return of a set of useless boards. Having said that, if the boards are just for a prototype, then a little surgery on incorrect boards is often possible, cutting a track here and soldering a link there.

So now is the time to check your design once more to make sure that both the electric rule checker (ERC) and the design rule checker (DRC) have been run. Although these will catch a lot of problems, they will not guard against a design that is simply faulty.

To illustrate this with a real problem, in my original design, I had D1 the wrong way around throughout the design, even in the schematic. I didn’t actually catch this problem until the boards came back. However, this was easily remedied by inserting the diode the “wrong” way around on the PCB. I then had to retrace my steps and redo all the PCB designs.

Another problem is that it is often difficult to know if the parts you have picked out of the library have exactly the same package and pin dimensions as the components that you have. If this is the case, then it is well worth making a paper prototype. To do this, simply print out the board layout and try poking the component leads through the holes to make sure that everything fits. This will also highlight any problems with the third dimension (height) that you never see using EAGLE. For example, it may become apparent that one component is sticking up too much. For example, the SMD version of the sound meter project probably could benefit from having all the LEDs on the bottom of the board so that there are no components sticking up above the LEDs, allowing them to be mounted flush against a window on whatever box the board is to be housed in. It’s surprising what a difference it makes having something concrete to handle.

Images

Submitting a Job to a PCB Service

Finally, it’s time to find a PCB service and send off the design files.

PCB services aimed at the maker are an ever-expanding and changing area. Therefore, before selecting a service, do some research. The main things that you need to consider are

       Cost. How much will it cost you for your project. If you are just making a project for yourself, then you may only want one board. Wasteful though it may be, you may find that you can get 10 boards from one supplier for less than the cost of one board from another supplier.

       Speed. How long will it take for the boards to come back after you have sent over the Gerber files? Wherever possible, look for information on the electronic forums about the actual turnaround time.

       Quality. These days you would be unlucky to receive a low-quality board. These things are made by high-quality machines, and there is little practical to go wrong.

       Design rules. Each service will have its own design rules. Sometimes these are available as a download for EAGLE, but I would use a more universal set of design rules such as those of Sparkfun and simply check that your track thicknesses and spacings are greater than those specified for the service. Generally, they will be.

These items tend to be a tradeoff, so if you want the boards fast, they are unlikely to be low cost. The size of the board also often makes a big difference. Some services simply charge by the square inch, and others have certain cutoff sizes, so if you stay within certain dimensions, the boards are much cheaper.

Most of the services you find for prototyping and small-batch numbers will be so-called batch PCB services. These operate by collecting together groups of PCB designs from lots of customers and combining them into a single order. This requires the service to wait until it has a sufficient number of boards to make it worth making a large PCB panel containing all the individual designs that are cut away from each other during manufacture. This means that the delay can be very variable, and you may get your boards really quickly or it may take weeks. Look for maximum and minimum service times. Also look at the bigger services in this area, such as OSH Park, Itead Studio, and Seeed Studio.

Images

Follow the Instructions

Each service will have a detailed set of instructions on how to use their service. Frankly, if they don’t have this, then you probably should steer clear anyway. For example, we will look at the instructions provided by IteadStudio’s Open PCB service. You can find the instructions for the company’s 5- by 5-cm basic green PCB service at http://imall.iteadstudio.com/open-pcb/pcb-prototyping/im120418001.html.

In the section “Requirements on the Design and Gerber Files,” you will find instructions on the dimensions of the board, which can be an unusual shape but must fit within the square specified. It also tells you the Gerber files they require.

Most important, it also tells you the minimum line width and text height for silk screens of 6 and 32 mils, respectively. You would need pretty good eyesight to see text that small.

As for the copper, you will see that instructions specify a recommended width and separation of 8 mils. Because our thinnest tracks are 10 mils, we should be just fine.

It is also worth noting that if you want to make a tiny PCB, it may be a little irksome that because your design is at the minimum board size, it may be tempting to do something called panelizing. This involves putting multiple copies of the board design onto a single PCB design, with a row of very close together holes separating the individual boards so that they can be separated by snapping them off. This is usually not allowed, although if you simply mark a line to cut on the silk-screen layer, the service will not object.

You also may be given the choice of different board thicknesses and finishes. Very small boards can be thin: 1 mm typically would be fine for a board smaller than 50 mm2. For bigger boards, 1.6 mm is a common thickness. There also may be options for being lead-free hot-air solder leveling (HASL) and restriction of hazardous substances (RoHS). HASL will make the boards easier to solder but is by no means essential. RoHS is a European Union directive intended to improve the environmental impact of electronic manufacture. If you plan to sell your PCBs in Europe, you should conform to this option.

Depending on the service, you will either need to upload the files, possibly enclosed in a zip file, or separate and associate with an order number, which may require you to rename the files to include your order code. Follow the instructions carefully.

The next step is that the files will undergo automated checks and will then be prepared for fabrication. If you want to manufacture the boards yourself, at home, then photoetching is the way to go.

Images

Photoetching

Photoetching requires an ultraviolet (UV) light box, presensitized copper-clad board, developer, and etchant. This is quite practical for single-sided boards but requires more care for double-sided boards, where you need to align both sides accurately.


WARNING Photoetching uses noxious chemicals as well as ultraviolet light, which, while not seeming bright, can do all sorts of damage to your eyes. Always observe the safety precautions specified on the equipment and chemicals that you use.

Photoetching uses a transparency with an image of the PCB to be created printed onto transparency film that is then placed over copper-clad board that has been presensitized. These boards are not much more expensive than plain boards. The board is then exposed to UV light through the transparency film.

The board is then put into a tray of developer, and the image of the PCB tracks will become visible on the board just like an old-fashioned photograph being developed. Next, the board is etched in a chemical that dissolves the copper except where it is protected by the photographic image of the PCB tracks. Figure 6-4 shows the author’s home-made setup for photoetching.

Images


FIGURE 6-4   Homemade photoetching kit.

Rather than run the CAM processor, because there will be no solder mask, silk screen, or other refinements, you can set the layers to just display “Bottom” and then print the board, selecting the options for “Solid” and “Black.” This is then printed onto transparency film (Figure 6-5).

Images


FIGURE 6-5   Printing the layout.

The protective film is then peeled off the copper-clad board, and I use a clip frame designed for photographs to press the transparency against the board while it is exposed in the UV light box.

Having been exposed, the board then needs to be put in developer, at which point the pattern on the board will start to appear. When development has finished, the board is placed in etchant (usually ferric chloride) that dissolves away the copper not protected by the developed image.

Your etchant will last longer the less copper is dissolved from the board, so use ground planes wherever possible.

When the board is finished, it will need to be drilled (if you are using a through-hole design), for which you will need a very fine drill bit. A diameter of 0.8 mm is ideal.

Images

Milling PCBs

Low-cost desktop computer numerical control (CNC) routers offer a chemical-free method of producing PCBs by using a normal copper-clad PCB but then using a computer-controlled CNC router to cut away the unwanted copper (Figure 6-6).

Images


FIGURE 6-6   CNC router cutting a PCB.

The process is similar to the photoetching method. Once the PCB artwork is done, the copper layer is dispatched to the router as if it were a printer. It suffers from the same disadvantage that double-sided boards are tricky. Because the copper has to be milled off the board where it is not required, this is another technique that benefits from a ground plane.

Images

Toner Transfer

Another approach to homemade PCB manufacture is toner transfer. In this approach, the PCB layout is printed onto glossy paper in a laser printer. It is then ironed onto the copper-clad board using a clothes iron (turn off the steam setting).

The toner then provides sufficient protection to the board to allow it to be etched in the same way as photoetching.

Images

Summary

I still get excited when a bubble-wrap package arrives with a set of shiny PCBs ready for me to use. Chapter 7 will look at the next step of soldering the conventional through-hole designs, hand soldering SMD PCBs, and cooking your PCBs in an oven.