Arduino LED Dimmer: Part 4

PCB Production

PCB manufacture really does operate on an industrial scale. Most PCB fabrication houses will want big orders, or will just charge you an arm and a leg to do a small run simply because it’s inconvenient. In order to make your board they first have to make tools specific to your design and that’s very costly if you’re only making a handful.

Thankfully for the likes of me there are companies who specialise in low-quantity prototype PCB manufacture. They take all the individual customer’s designs, repeat them as many times as required, combine them with other customers designs until they’ve got a full panel that they can run through their machines. The company I’ll be using is PCBTrain. Originally I was going to go with BatchPCB, but PCBTrain are local to the UK, and the shipping from BatchPCB was going to double the cost of my order! Not to mention BatchPCB’s lead times are significantly longer than PCBTrain’s.

Time to get a grip on PCB design and more specifically, Design For Manufacture. The best resource I found for that was the EEVBlog. Dave has done a number of excellent videos on the topic of Design for Manufacture, and I recommend watching those. There are also some good tutorials on schematic design and PCB layout using Eagle on the Sparkfun website.

When it comes to Eagle, one thing that helped considerably was finding the Design Rules and CAM Job files for PCBTrain. There are a lot of settings to be entered and checked, such as minimum trace width, spacing between traces, drill bit sizes just to name a few. A lot of opportunities for a newbie to get it wrong. I was so glad to find those!

The libraries in Eagle can be a little hard to navigate, so I also recommend bookmarking this list of common components and where to find them in the eagle libraries, which was very helpful with getting a hang of the naming convention of all the different components and packages.

PCB Layout

Now comes the fun part, this is where we start getting creative. Start off by placing all the parts in such a way that as few of the airwires are crossing as possible. The airwires are the yellow guide lines and are there to help you visualise what connections need to be made and in what general direction your traces will have to go. Begin by clustering the components from each sub-circuit together. On this board you can see the voltage regulator circuit on the far left, the bare-bones Arduino along the top and the TLC5940 with output terminals along the bottom.

Final component layout (just to illustrate the thin yellow airwires)

Now that the parts are laid out, the Route tool is used lay down the traces in the copper layers of the board between the pads of the components. This part of the process I found to be very enjoyable and somewhat therapeutic. I’d hate to think just how much time I spent fiddling with the layout and traces.

Traces on the top side


Traces on the bottom side (seen through the board as it were)


Dimmer PCB Layout
Both layers including ground pour

The image above shows the traces for both sides including the ground pour. A ground pour is where all the remaining space between the traces is filled in and connected to ground. This means that all your ground pins will have a good low-resistance connection. If I’m honest, I don’t know if it’s of much importance on this board, I think I might need to brush up on the fundamentals! The impression I got was that it was generally recommended and couldn’t hurt, we’ll see if it paid off.

Now we arrive at that dreaded moment, to commit to the design and hope that there’s nothing wrong with it that you may have overlooked! More on that later.

First, run a Design Rule Check (DRC) and make sure that the design is within the capabilities of the manufacturer.  That’s what the Design Rules and CAM Job files are for. This process looks to those files to determine exactly what your fabricator is capable of producing, and checking your design against those specs to ensure that there’s nothing in your design that they can’t do. The main error I got was just having traces too close to pads or other traces, just tweak the design until the errors go away.

Now it’s time to generate the CAM files. In this case I have six Gerber files, one for each layer of the board. One is the Dimensions, just the outline of the board. Then there are two copper layers and soldermask layers, one for top and one for bottom, that’s four more. Lastly there’s the top silkscreen layer. I could have had silkscreen on the bottom too, but I got everything I wanted on the top so there was no need. The last file to be generated is an Excellon Drill file, which contains information on what size drill holes are required where.

Finally it’s time to upload the files to the manufacturer and wait patiently for the boards to arrive. That really depends on who your manufacturer is, but PCBTrain was pretty straightforward.

Stay tuned for part five! No idea when that’ll be, but I do actually have the boards now and there’s certainly more to tell.