by Suz Hinton

If you grew up taking things apart to see what was working inside, like I did, you will have seen your fair share of printed circuit boards (PCBs). They’re the brains of all electronic devices you live with: your TV remote control, your car beeper, that USB thumb drive you keep on your keychain for emergencies. Even your humble toaster features one. Commonly rectangular shaped and colored a uniform jade green, these thin slices of fiberglass carry intricate little component layouts, like miniature cityscapes. I enjoy studying certain specimens when I can, to see the personality of the engineer expressed, and the design decisions in squeezing everything onto a small footprint; using just the necessary components to make it all work as expected.

There’s beauty in that, don’t get me wrong. Beyond the blinky status lights though, they’re not exactly exciting to look at once you’ve seen a few of them. In the industrial world of electrical engineering, strict compliance and efficiency requirements can create boards which are mostly function over form.

There’s nothing stopping a little creativity from helping a PCB appeal without needing to be hidden inside a slick shiny housing. What would a more artistically influenced PCB look like? What if the board design was the final housing?

For the purposes of exploring this idea, let’s look at an example. Pictured below is a PCB design called ‘Angie’. Angie is an angler fish, and she has a fully functioning lure which lights up when an ordinary magnet comes into close proximity of her.

Angie is a functioning PCB, cleverly designed to also express the form of an angler fish without the need for any external packaging.

Angie is made up of four components or parts in her circuit, most of them located on the reverse side of the board.

parts

From top to bottom:

  • a resistor to protect her lure from burning out
  • a magnet sensitive switch to activate her lure (a reed switch)
  • a battery retainer to hold a battery to power her lure
  • an LED (light emitting diode, her lure)

The rest is all down to the design of the circuit, and the board itself. Before diving deeper, though, let’s examine what a PCB actually is.

What makes up a printed circuit board?

Lots of layers, essentially! Let’s have a look at each to understand what they do.

Base

The base material of the board itself is made from fiberglass. It can be a range of thicknesses, the most common being either 0.8mm (0.0315″) or 1.6mm (0.063″).

Copper foil

The fiberglass base is coated on both sides with a thin layer of copper. It’s so thin that we refer to it as a copper ‘foil’. We measure the thickness of copper in ounces per square foot. Common thicknesses range from 1-3 ounces per square foot. The copper foil is the layer we use to create the routes or traces where electricity will flow. Components connected to these traces will interact with the electricity. So the copper layer is very important for anything to happen at all!

Solder mask

The copper foil layer can be delicate and susceptible to accidental short-circuiting when placed on a metal surface, touched with fingers and other conductive objects, etc. So this is where our next layer comes in, called the solder mask layer. Solder mask is kind of what it sounds like—a mask to insulate the parts of our circuit what we don’t want exposed. Most of the time, this tends to be all of the skinny traces snaking their way around the surface of the PCB, connecting up all of the components. Most solder masks are liquid, composed of UV curable resin. A coat is brushed over the PCB on top of the copper layer where needed, and a UV light source is then used to cure the resin and harden it fully. Generally places where we wouldn’t want soldermask to be applied would be copper pads for surface mounted components to be soldered to, and copper rings around drilled holes for components which have long metal leads or pins that are threaded through the holes and soldered in place. Exposing these areas allows the molten solder ‘metal glue’ to join components to the board. Solder mask comes in a variety of colors. You’ll see it in black, white, yellow, blue, red, green, and even purple. Nice!

Silkscreen

The last layer is pretty optional but really useful to have. It’s called the ‘silkscreen’ layer. Like silkscreening a t-shirt, we can silkscreen text and designs to PCBs! It’s pretty handy for things such as outlines of components for easy placement, labels for specific component placement locations, text for crediting the engineer of the board design, etc. Most of the time, the silkscreen layer is colored white and stands out well from the color of the solder mask.

A PCB is made up of different layers. How does the design actually come together, then? By using software specially released to design and lay out PCBs.

PCB Software

There are a number of software package options to choose from when laying out a PCB. Some of the most well known are:

  • Cadsoft Eagle
  • KiCad
  • Fritzing
  • Altium Designer
  • Express PCB
  • Autodesk 123D Circuits

For this example, we’re going to work with Fritzing. Fritzing costs nothing to use (download it at fritzing.org), and even has a built-in ordering service to have your boards made up for you when you’re done. We’ll get to that later though! Fritzing is also especially handy for more creative PCBs because it supports vector art in SVG format. This is a fairly rare feature for PCB software. Working with vector art will create higher quality lines in our design.

Next, let’s look at a high-level overview of how a PCB is designed.

Step 1: Draw the schematic

PCB design normally starts with the schematic layout. A schematic is a diagram drawn to communicate what parts are needed for a circuit design, and how those parts connect up to each other. It’s like a very careful ‘join the dots’ exercise.

A good example of a simple circuit is Angie our Angler Fish: a battery, an LED (light emitting diode, or a tiny light!), and a switch. LEDs can’t handle a lot of current at once, though, so we need to add an additional part to our circuit – a resistor. A resistor will reduce the amount of current flowing through the LED at once. This stops Angie’s lure from burning out!

To create a schematic in Fritzing, a drag and drop interface is available, with lots of parts to choose from. While in the ‘Schematic’ view, drag all of the required parts (in this case, four) onto the workspace. Move the parts around until you can connect them up in the right order. Click and drag a line between each component to create a complete circuit.

Here is what a schematic for what Angie’s basic circuit might look like:

schematic

Step 2: Lay out the board

The next step is to start laying out the board itself. This is where we specify:

  • the size and shape of the board
  • where each part will be located
  • what side of the board each part will be soldered to
  • any holes that need to be drilled
  • placement of the traces of copper to connect the parts
  • where we want solder mask to be applied
  • what silkscreen design we want applied

Fritzing allows you to import an SVG file to define the board shape. Here’s what Angie’s board shape looks like:

angie-outline

This outline will be cut as part of the manufacturing process at the fabrication shop.

Fritzing supports double sided PCB designs, so switching the side of a particular part is quick and easy. The battery retainer, resistor and switch will all be soldered to the back of the board to keep the front looking neater. The LED will be placed on the top side of the board.

The silkscreen layer can be specified by importing another SVG file. The silkscreen on Angie is her pupils and teeth only—spooky! Here’s what it looks like:

angie-silk

In order for Angie to look shiny, the rest of her artwork will be placed on the top copper layer, which is generally not a commonly-done thing with regular PCB designs. Here is what the SVG file looks like for the copper layer artwork:

angie-copper

This copper layer will also feature copper rings where the LED leads will be threaded through and soldered in place. Fritzing automatically creates these for us for all parts we’re using, which is really convenient.

Here is what the final board design looks like in Fritzing, with all layers showing:

pcbview

Step 3: Verify everything

Making mistakes is pretty common when designing PCBs, because even the simplest design can get complex pretty quickly when creatively placing parts and trying to connect them all up correctly. It’s recommended to double- and triple-check that the traces all go exactly where they need to, and that each part is on the intended side of the board.

As a last precaution, printing out the PCB design onto plain white paper can be really helpful to get a feel for the board’s size in the real world, how it fits in your hand, etc. This is also a good opportunity to hold the real parts up (if you have them already) against the paper PCB to see if everything is going to fit as expected.

Step 4: Create a Bill of Materials (BOM)

It’s time to go shopping! A shopping list of parts required for a PCB is called a bill of materials, or BOM for short. Angie’s BOM is the following:

  1. CR927 coin cell battery
  2. 10mm coin cell battery retainer
  3. 3mm diffused LED (blue)
  4. 470ohm carbon film resistor (through-hole)
  5. 10mm reed switch (through-hole)

Once the BOM has been put together, tracking down the correct parts to buy is really important.

Some of the more popular online stores to buy electronic parts are:

  1. Digikey
  2. Mouser Electronics
  3. Sparkfun Electronics
  4. Adafruit
  5. Pololu

Using the chosen website’s search feature to track down exactly what you’re looking for is the best approach. All of these stores feature good product descriptions, and offer datasheets of each product to download and read through.

What is a datasheet?

A datasheet is a formal document that defines specs for a given part. A part can be as simple as a resistor, and as complex as a microchip. A datasheet is generally authored by the part’s manufacturing company, and distributed to retailers selling the part. From the datasheet, we might find information such as:

  1. The physical dimensions of the part
  2. Operating temperature range
  3. Power requirements and limits
  4. External connector ‘pins’ and what they should connect to
  5. List of software communication protocols it supports

Some datasheets are only one page in length, others are hundreds of pages long! Let’s look at a relatively short one, for a coin cell battery retainer by Memory Protection Devices, Inc.

The first thing noticeable on this datasheet is the large top-down drawing of the battery retainer itself, located at top left. It has a handy set of dimensions in both millimetres and inches. Two additional views are also provided (front and side) with similar handy measurement values.

The top right corner features a revision history. Yep, datasheets are commonly revised after the first publication. Pretty interesting!

Just underneath the revision history is a drawing labeled ‘PCB LAYOUT’. This is a rather important diagram. This battery retainer is a surface mount component (SMD for short), meaning that you don’t need to drill holes to attach it to your PCB. Instead, we use a generous dollop of solder to adhere the component to some exposed copper ‘pads’ on top of the board. Solder acts like conductive metal ‘glue’ when melted at high temperatures to fuse everything together. Coming back to our layout diagram, this tells us how to draw the copper pads exactly right when designing our PCB so that the battery retainer will line up just right to be soldered to the board. Pretty helpful, huh!

Other helpful information on the datasheet also includes what material the battery retainer is made from, which battery sizes it fits, and details about the company who manufactures it. Neato!

Once everything has been confirmed as a compatible part to use with the PCB layout and has been purchased, we can move on to ordering the actual PCB!

Step 5: Ordering the PCB

The most exciting bit has arrived. It’s time to request our PCB be fabricated! There are a lot of different services to choose from:

Angie was made by OSH Park. They’re known for their user-friendly ordering interface, and the pretty purple soldering mask used on all boards they produce. OSH Park has a 3 board minimum requirement, which is great because you always have spares in case you mess up the first board, or you can even give them away to friends!

Almost all PCB software can export a PCB design to an industry standard format, called Gerber. The Gerber format splits each layer of the PCB into separate files, which contain machine instructions for the fabrication shop to make your board. A service like OSH Park accepts a zip file containing a PCB’s Gerber files, and even shows you a preview of the board and each layer so you can do one last check that everything looks right.

Once ordered, we’ll need to be patient and wait! Wait times vary with each PCB service. It can range from 2 days to 3 weeks, depending on how much you’re willing to pay. OSH Park have a great value 12 calendar day turnaround option.

Step 6: Soldering the PCB

Once both the parts and PCB have arrived in the mail, arguably the most fun part is soldering it all together, holding your breath that it will all work!

Soldering is a skill that can be picked up from watching video tutorials online, and practicing soldering skills is a good way to pass the time while waiting for the PCB and parts to arrive!

Once soldering is complete, test the board. If all went well, Angie’s lure should light up when a magnet is held near her reed switch!

Resources

Suz Hinton is a software engineer who moonlights as a hardware hacker. She enjoys finding out how things work, and is always looking for places where technology can delight.