This "How to design a PCB" article was originally going to be part of the “How to make a printed circuit board step by step” article but due to the size that it grew to, it became apparent that it was going to be too big and splitting it into two parts between designing a PCB and making one seems the best divide.
There are a couple of ways of designing a PCB layout. The first traditional way is to do it by hand utilising graph paper and pencil. You need to know the actual footprints of the components or have them to hand and you need lots of patience and a decent eraser!
The second way is to use a PCB design program. This way has loads of advantages over the traditional method. You can move things around to your hearts content. You can easily make changes and updates and the design can be linked to the circuit diagram.
I think it’s pretty fair to say that once someone has ingratiated themselves to a PC design package they don’t usually return to graph paper and pencils!
What’s even better now to someone going down the PC design route is that a lot of the software is free. When PC design packages started to become available they could easily cost as much as three thousand pounds, that’s right, it’s not a misprint, that’s what he first one I saw at the university cost.
What’s more the ones available for free now are a lot more sophisticated and feature intensive than anything from those years. Most of those features have grown from necessity and once you’ve used them you won’t want to be without them.
They are also a lot friendlier than they used to be. The first ones I encountered lead me to believe that I’d need an electronics degree just to be able to use them.
Although they are obviously not all the same there are a lot of similarities and once you’ve learned the basics on one, you’ll have picked up a lot of things that will enable you to move to another without too much difficulty. So if you don’t pick the right program for you first time all is not lost.
I’m going to show you what you can do with the excellent and free DesignSpark package and from that you’ll see what the world of circuit board design on a PC is all about.
It’s also probably worth mentioning that although I’m using DesignSpark here, a lot of the techniques and terms will be very similar to some of the other available PC design packages.
Once you’ve installed DesignSpark the first thing you have to do to design a printed circuit layout is to draw the circuit diagram into the program. This may seem a bit of a chore but if you’ve been experimenting with a circuit and made plenty of changes it might be the first time you actually have a proper layout of the circuit that’s not scribbled onto bits of scrap paper.
Of course once it exists as a circuit in DesignSpark you’ve got it to back up, edit and print hard copies off as well making it a lot easy to find and read than those scraps of paper.
So how do you start to draw a circuit in design spark? At first opening you may have some demo circuits and layouts. Have a look at these by all means but to keep things simple I find when I’m starting out its best to close all the screens and go to “new” and start a new schematic design.
Click on the “add component” icon or press F3 and then select the component from the library, move it to where you want it and click with the mouse. You can rotate and flip the component to get it to look how you want.
It’s easier if you do each component type first as they are sequentially selected. So for instance if you select a resistor it becomes R1 and the next R2. So if you have 31 resistors in your circuit diagram, it takes less work to keep putting them roughly in place one by one. You can move them to position them more precisely and there is a snap to grid function to get everything to line up nicely.
Them you can move on to capacitors and do the same. Different types of capacitors can be selected such as polarise d or non-polarised and different sizes can also be selected.
There are a huge variety of components in the library and it does take some time to find them at first but once you get used to where the common ones are its surprising how quick you can build your diagram. With a bit of practice and experience you can honestly draw circuits much quicker than with a pencil and paper. You don’t tend to deliberate as much as it’s so easy to click ad move things around.
I start off with the IC’s first and in this instance it’s a TL074 which is a four op amp device. On each mouse click each op amp is positioned on the diagram. You can flip them over as I’ve done in the picture below for U2b.
Any component can be flipped or rotated which you will need to do. This also works with transistors which didn’t always used to be the case and I can remember having to try to work around it. No problems here though.
Two transistors, one being flipped.
When you start you might find it easier to add components where they are going to end up. Now I’m used to the software I just add components and then move them around after. It seems quicker just to drop twenty or thirty resistors all at once.
Some more components added.
Once you have the components in place you join them up with the “Add Schematic Connection” icon. You just click where you want the components joined and the links are all done pretty intuitively. You can delete connections and components and highlight and move them, even highlighting sections and moving the whole lot. Each component can have its number like R17 altered and the values can also be edited. Text can also be moved or edited and its really quite easy to draw a finished circuit in fact it’s as good at producing a circuit diagram as some drafting programs that are specifically for drawing circuits and that alone.
The software is very flexible about how you want to work. You can draw bits of the circuit and add and change bits as it suits you. You can zoom right in and out quickly to see what you are doing close up and still get an overall picture.
The completed circuit diagram.
Pictured above is the finished circuit diagram. It’s worth bearing in mind that you are drawing it with a view to coming up with a printed circuit board so bear that in mind with the components you use to draw your circuit with. Capacitors vary in size and you don’t want to end up with a space on the board that’s too small to physically fit a component in.
As you can see I’ve also used terminations in the diagram as I wanted to have pads on the edges of the board to the other connections for panel mounted components.
Double check your completed circuit diagram for wrong connections and wrongly numbered parts. You can change things later but once you’ve moved to the PCB stage you’ll realise it wold have been better to have got things right on the circuit diagram first.
Once you have your completed diagram select “translate to PCB” from the tools menu.
Here I select a single sided board.
I Ieave everything else to its default value and “arrange components outside the board”.
This is my personal preference as I like to put the components where I want them to go. You can just let the computer auto route everything. This used to be the Holy Grail when PC design packages came out. The thought of the computer doing all the hard work! In reality though you end up with things in the wrong places and I just find it easier to do it myself but I do know some people do use, and wouldn’t be without auto route.
You can see from the above picture that all the components are shown as their physical shape now and with all connections between them shown in yellow and a green outlined board below.
The first thing I do is to increase the size of the board outline, which you do just by clicking on them and dragging. You get the option to set the board size in the questions before but it’s easier to do it this way. You can always move them by doing this, making the board smaller or larger as you need.
I then drag the IC over and put it somewhere in the middle. You can see which components are directly connected to each pin so I drag them and position them rotating them if necessary.
In the picture above you can see R20 and the pins it connects to. You can either put all the components in place and then put the pcbs track connections in or you can do it as you go along.
You can right click on the yellow “net” connection which will then show white and select auto route, which just auto routes this one highlighted connection or you can just draw it in yourself using “add track” from the menu if it doesn’t go where you want it to.
I tend to use a combination of auto and manually drawing tracks, whatever suits you. I also use a combination of putting components in place first and doing them as I go along. It all depends on how you want to do it as the software will let you do it exactly how you want.
Once you have all your components and tracks in place you can shrink the outline of the board. It’s worth noting at this stage the sizes that PCB manufacturers use if you are going to get it made for you. One of the boards I was working on recently was just over 5cm wide and I was able to get it to under 5cm just by moving a couple of components. This then got it down to the lower price bracket!
The final completed PCB design.
You may not be able to get all the connections made using a single sided board so in that case you will have to route it using a wire link. Sometimes that’s just the easiest way to do it.
For this board I’m going to try the overseas board manufacturers that are cropping up. I’ve heard particularly good reports from seed studio so they are the ones I’m going to use.
You will have to provide different files for manufacturers to use. As you can guess standards were set a while ago so you need to go along with this.
The files are called “Gerber”, fortunately DesignSpark makes creating these quite easy. Select “output” from the menu and then “manufacturing plots” and then tick and select the “plots” and “layers” that you require. As this is the first time I have done this I figures the ones I’m not sure about I’ll just include them anyway as it’s better to send them and they can just use what they need rather than them be missing an important file.
I went on to the seed studio website and selected the board up to 10 cm by 10cm option after measuring my PCB design and went for the ten off option.
After you select “run” from the DesignSpark menu all the Gerber files are written to the same folder as your other designs. I just selected them and zipped them all together.
Each manufacture has their own rules in terms of how they can produce the boards. There are limits as to how close tracks and pads can be. These are known as the PCB design rules, you can run a check after you have finished designing and it will tell you of any issues so you can make the necessary adjustments.
These were the files that were generated and I just zipped them up together. All the files are very small and so was the finished zip file. This is uploaded on the seed studio website along with the order and payment. Now all I have to do I wait.