Mulailah

Tanpa permulaan, anda tidak akan sampai ke mana-mana.

Semangat

Semangat yang kuat mampu mengatasi apapun cobaan yang datang.

Konsisten

Lumbung emas dalam diri kamu adalah pikiran kamu. Kamu dapat menggalinya sedalam-dalamnya dan sepuas-puas yang kamu inginkan.

Pantang Menyerah

Gagal selepas usaha adalah hikmah, anda akan mendapat sesuatu yang lebih besar daripada apa yang anda sangkakan.

Be The One

Be the one is better than be the best.

Tuesday, January 31, 2012

The Route to PCB

When it comes to turning your design or circuit into a real-life three dimensional object, there is one step that can make a big difference with it being successful. Laying out your PCB is just as important a skill as designing the circuit. In this article, I want to look at some of the key steps and the approach I take when taking the route to PCB.

I currently use a software package called PADs at ebm-papst, which in my view is a great package if you can find someone else to afford and purchase it. However, no matter what package you use, you can still
achieve the same results. So where do we start?

Assuming that I have all the footprints I need and I’m happy with the circuit drawings and components, I will print out the circuit schematics. It is important to have these at hand; you’re going to convert these line drawings into real copper. Next, I import or load up all the component footprints into my layout package.

There are two possible approaches. You can either be an auto-route person or, like me, route the entire board by hand. For designs that do not have large numbers of buses and are primarily embedded micros, hand routing is just as quick as auto-routing. I say this because I would have to check track width rules like, “Is the net set to the correct width to carry the current?” I would also go back and check that signal lines are not next to power rails or noise sources. Therefore, in my head I can do this as I route and get the best layout I want, using my brain as the auto-router and designrule checker.
Figure 1. The Route to PCB




I start by grouping the components into areas around the outside of the board. For instance, let’s say I have a switch mode power supply-all these routes end up in a jumble over on one side. So do not overlap; just place them side-by-side in a grid to get an idea of the board area required. I do this for each block of the circuit, and this is why having the schematic in front of you is useful you can see if the 100nF cap is for the power supply or needs to go next to an IC for decoupling. I move these blocks around until I can see where I want the flow or interfacing edges of each block to go until I’m ready to move on.
Figure 2. Analog

Assuming I have a PCB outline, I will create a physical representation and start placing connectors—the ones that just have to go somewhere. I glue on the connectors so I can’t accidentally move them. It is then important to check PCB size and the location of the connectors to see if they fit in the enclosure.

I then start routing the board in one of two ways. Most of my boards are two or four-layer. Regardless of the number of layers, I think about the board as a 3D object. The circuit layout can be broken down into two types: One type of layout deals more with analog circuits, having short routes between a resistor and an IC or between a few caps and regulators (Figure 2). The other type of layout is for, digital circuit with long runs of two or more routes running between multiple devices. One example would be routing a SPI bus (Figure 3).

Figure 3. Digital
I try and start with the analog circuits and lay out the components and tracks as they appear in the Figure 2: Analog circuit diagram. If you don’t have a lot of overlapping nets in a 2D drawing then it should be easy to do the same on the PCB. I will keep it all to one side of the board if I can, which allows for another circuit to sit on the other side. I have used this technique often with RPM monitoring circuits for fans with the PWM drive circuit on the other side of the board. They both have to feed to and from the microcontroller and device—in this case a fan—so it is good if they run in parallel.

For a digital layout, I will run the lines together as much as possible, but I do not try to only stay to one side of the board. I will, however, use a rule: blue = horizontal, red = vertical. The blue and red refer to the bottom and top sides of the board as it is displayed in the CAD package. By running these lines only horizontal on one side of the board and vertical on the other, it will minimize the number of board layers required.

However, there are no hard rules, and when you have a digital embedded circuit you will have both layout types to deal with. This means that I will layout each block as it fits each layout profile above. Digital and analog lines from the micro will follow a more blue/red rule until they reach the analog-type circuits. This allows me to break out the signals from the micro and keep tight and compact analog circuits ring fenced from each other.
There is, however, one very important part of the circuit I have not talked about yet—the power rails. Now it’s not hard to remember to connect power rails like your +5 or +3.3-volt lines, but people do forget about the ground or 0-volt rail. For each section of circuit or large device, I always check that I run a 0-volt trace out and connect it back. I try and use the “around the outside” rule. OK, not a great sounding rule but this means that I will have a track that runs around the entire outside of the board in a loop and then feeds into these blocks. It’s also good to highlight the whole track and see where it’s running. Can you bridge a gap (Figure 4)? The better your 0-volt connections, the more likely your board will work well!

Once complete, I then tackle the flood plan. Now I know not everyone worries about this but I do a copper flood on top and bottom connected to 0 volts. By maximizing the 0-volt tracks the flood will reach all parts of my board and I will have good connections throughout.

Figure 4. Ground Track
Finally, I will run connection and clearance design rule checks that are built into PADs to flag silly errors before generating a final export to the mechanical engineer. He will, in my case, check that there aren’t any 0603 resistors sitting under an IC when it was meant to be on the back of the board. I only made that mistake once! I then can send off my files for the board to be made. It is a good idea to be certain that all the components will fit on the board. I once worked at a place where we had a PCB mill that could drill and cut the tracks from blank sheets of copper. This was a good way to see if everything fit in the right place before spending money on prototype boards.

There are many hard and fast rules you can add to your design approach, but these simple and basic principles allow me to design a board with minimal errors and reduce my chance of a re-spin.

About the Author
Paul Clarke is a digital electronics engineer with strong software skills in assembly and C for embedded systems. At ebm-papst, he develops embedded electronics for thermal management control solutions for the air movement industry. He is responsible for the entire development cycle, from working with customers on requirement specifications to circuit and PCB design, developing the software, release of drawings, and production support.