Prototyping Hints

From Wiki
Jump to: navigation, search

Prototyping Hints

Notes

Photos need fixing for photos 4, 5, and 6.

Overview

I had someone ask me about how to handbuild a small 8031 CPU card, so I thought I would pass on these prototyping techniques to anyone else that's interested.

I prefer point to point wiring, over wire-wrap. One reason is that if you make a mistake with wire wrap, it seems that the layer you need to unwrap is always on the bottom. For typical wire-wrap sockets, you can get at best 4 layers on them, and that's with the long pins, and using a shorter than industry standard wrap length. I also don't care for wire-wrap because the board is at a minimum an inch tall. Another reason is that unless you've got wrapping down pretty good, it's easy to form a connection that's much more likely to corrode, resulting in erratic operation.

I have played around in the past with other technologies, such as those 3M sockets, that are basically sockets with insulation displacement type pins. They are fast to wire up, but are limited to two connections per pin, and have poor long term reliability. They are also not very rugged, so if you're doing a large project, you have to be really careful handling the board. They're also a tad on the expensive side, and have lower availability compared to wire-wrap or machine tool pin sockets.

Tools

Only a couple of tools are needed to build using point to point wiring, but it's important they be fairly decent quality tools. A pair of small needle nose pliers, a set of wire strippers (I really like the "T-Strippers" by the EMF company. RadioShack.com carries something pretty similiar in the 910-3740 part number), and a pair of small close cutters (again, RS# 910-3735 or 910-3712). Also handy is a small screwdriver, and an Xacto knife (for separating wires, cleaning crud out from between pins, and trimming tape or copper foil).

Once you have the tools to be able to strip wire without breaking it, the most important tool is your soldering iron. There are two types of soldering irons in the world. Metcals, and everything else. A Metcal is the Mercedes Benz of the soldering world, and no other iron you'll ever use will compare. New, these are out of most peoples price range, but they can usually be had on eBay for extremely reasonable prices (as much as you'd pay for good medium of the line Weller). I'm going to go on a sidetrack here, briefly...

Many years ago, I worked at a company in Stone Mountain. This equipment vendor came out to peddle some manufacturing equipment to us, soldering irons among them. Usually, we didn't pay much attention, but truth be told, the assistant was kind of attractive, so all us engineers stood around for the demo. The guy sets up the iron, takes a piece of 2 ounce copper clad board, 5 copper pennies, turns the unit on, and 15 seconds later, soldered the stack of pennies to the copper clad board. He turned off the iron, stuck the tip in the sponge, counted to 10, pulled the tip out, stuck a fine one in, and proceeded to solder a 50 mil pitch IC to a demo board. The tip temperature fluctuates less than 5 degrees, and there is a phenominal number of tips, for heavy work, fine surface mount, removing 84 pin PLCCs (with one tip!), hot knifes, etc. So, I wanted one for years, always talked the people where I worked into buying one, and was a general Metcal advocate. I finally got one of my own for home in mid-2000, and my old Weller WTC-201 hasn't been out of the closet since.

If a Metcal isn't in your future, at least get a good Weller WTC-201, or something similiar. You can often find Wellers at the hamfests for $20-$40, depending on condition, and how hard you want to bargain. Don't waste your money on an adjustable temperature iron. You'll set one temperature, use that, and wonder why you ever paid extra for the adjustment knob. Use a fine tip, with a small flat edge, 700 degrees. Do NOT use an 800 degree tip, otherwise the pad will too easily be delaminated from the glass epoxy. If the tip doesn't fit between the pins on .1" centers, it's too large. Don't use too fine a tip, or you'll not be able to apply enough heat. I can't really stress the importance of a decent soldering iron well enough. If you build much, you'll be spending a lot time with it. Trying to use a 'wood-burner' will make you crazy. The tip temperatures fluctuate too much, the tips are too large, and they aren't comfortable to work with for any length of time.

A quick side note on soldering iron maintainence. It's important to keep the tip clean. Most soldering stations have a place for a damp sponge. Use it. There are several myths pertaining to 'tinning' the tip. This is the practice of melting some solder on to the tip. Most joints will flow better with a minute bit of solder on the tip. Too much solder on the tip will make a poor joint, since all that solder is going to transfer to the board. If you're using the iron every 5-10 minutes, wipe the tip on the sponge before the next joint. Some people will tell you need to constantly tin the tip, and you should never let it set in the stand untinned. During normal use, this is completely unnecessary. If the iron isn't going to be used for 30 minutes or more, turn it off. Although you should wipe the tip off, there is no need to tin the tip before turning it off. The only point of tinning the tip when not using the iron is if you intend to let it sit turned on for any length of time. This is to prevent oxidation on the tip, which will eventually (read years) erode the tip. I've had the same tips in my irons for years at a time. Most of the damage is a result of the tip scraping against a pin while soldering, and eventually scraping the plating off. This is why tips are designed to be replaced. If you're replacing tips every month, you're doing something wrong. And remember, iron tips are NOT prybars. Don't use it as a lever to straighten pins, etc. If the tip is bent, the plating will crack, and the tip will die a rapid death.

Occasionally you may come across a new tip that won't solder well. I don't know why this is, but it's a real life fact. I expect it's because the tip has a cold spot of some sort, caused by an imperfection in the manufacturing process. You may find one side of the tip works better than the other. Life is too short to put up with a bad tip, so either save it for burning out holes in plastic cases, or throw it away. Being eternally frusterated because of a $3 tip is silly.

Protoboard

There are a number of options for this. The Radio Shack single sided phenolic copper boards are basically garbage. Even with careful soldering, it's too easy to delaminate the pads from the board. They're also very limited in sizes, and if you want to cut the board board, it's difficult to do without shattering the phenolic. I prefer to buy a sheet of the Vector 8006 prototype card, which is about 5" x 13.25". This has plated through holes, and is glass epoxy. It has no ground plane (I've come across some board material that has two types of ground plane, one is filled, the other is a thin grid. I don't know where they came from, tho), and no power busses. Pre-laid power busses *can* make some wiring easier, but frequently interferes with chip placement. Plus, it's easy enough to build your own. This stuff is a little expensive, at $30 a sheet, but using a paper cutting shear, it can be cut down to the size needed, and waste minimized.

I won't address building RF circuits, because I've built so few. There are a several techniques for that. One is to use copper clad board, and use a Dremel tool to remove copper to form the traces. This is one of the best routes if you're building a switching power supply, but time consuming as allgetout for anything with more than a few traces. Copper tape (like the stained glass people use) on phenolic or glass epoxy is a neat way to do this. You can also go "multilayer", by putting a small piece of Kapton tape between crossings, to insulate "layers". Another technique is something called 'Manhattan' construction. Here's a link to a fairly comprehensive page on it.

Wire

I use 30 gauge wire wrap wire for almost everything on the board. There are sometimes power components that I used solid 18 or 24 gauge wire to connect together (like from the power connector to the input of the regulator). From a power pin on a chip to the power buss 1/4" or less away, 30 gauge is plenty. Kynar coated wire is nice, and it has a fairly decent heat resistance (although you can melt through the insulation). Teflon covered is best, but is not cheap. The Kynar covered wire also comes in a host of pretty colors. Some people find that using different colors for different signal functions (red for power, black for ground, green for control, white for address busses, etc) works well for them. I've just about always used one color.

Although it's less common, 28 gauge wire wrap is available. In spite of the tiny difference in diameter, I have found 28 AWG to be much harder to work with. Also avoid using vinyl covered wire. This stuff will melt as fast as you can apply heat, leaving far too much bare wire exposed, and risks contaminating the solder joint with burnt vinyl.

Sockets

For point to point (PtP) wiring, I prefer to use machine tool pin sockets. These are only good for 50-100 insertions before they get "raped" (you may find this term less than ideal, however it's an industry wide term), but have much better holding strength than wipe-type sockets. And unlike many lower quality wipe-type sockets, solder wicking up into the pins can't occur. If the open frame type machine tool pin sockets are used, you can frequently get the decoupling capacitor on the top side of the board, inside the socket.

One of the other major advantages of machine tool pin sockets is that resistors and caps can be stuffed into them. Wipe-type sockets do not hold resistors worth a darn.

If you do have a component that you expect to change multiple times (say, a program ROM), you can plug one 32 pin socket into another, and use the top socket until it gets worn out. Once it no longer holds the ROM tightly, replace it with a new one. Then you're good for another 100 insertions or so. If you *really* plan to change it a lot, consider getting a "ZIF" (Zero Insertion Force) socket. This has a little lever that allows the "jaws" on the socket to be opened, the part is replaced, and the "jaws" closed. No wear and tear, and bent pins are very unlikely. Many EPROM programmers use these, so take a look at one of them if you're not familiar with it. Textool is the most common brand I've seen.

Prepping the protoboard

If you have glass epoxy proto card, it can be cut with a paper shear. Rather than trying to line it up and do a fast shear, instead, line it up, and cut slowly. With a little downward force on the board, you can prevent it from shifting. Cut through a row of holes, rather than between. Use a half round medium file, file the edges down until you're halfway between the two rows of holes. Chamfer the top and bottom edges of all sides, then round the corners. Unless the board is relatively new, either use fine steel wool to lightly buff the board and wash the board in warm water, or, use a Scotchbrite pad (one of those coarse plastic ones), and wash the board in warm water. Now you'll have a more professional looking board, with no sharp edges. I've found this can make all the difference in repeatedly flipping the board and not hurting yourself...

This is the best time to drill any mounting holes, if you need them. Few of my projects end up in a cabinet, but the ones that do often use 4/40 screws and a stack of nuts as standoffs. If you have the cabinet, drilling the holes now allows using the holes drilled in the protoboard as a template, and you can be sure they'll line up. Much easier than trying to put a board on the drill press with a bunch of wires on the bottom. If you don't have a cabinet, but want to mount the board, consider using a sheet of 1/8" Plexiglas from Home Depot. You can score and break it to the dimensions you need, it drills and machines pretty well, and it can show off your snazzy work. Here's a photo (photo 1) of such a board.

With a little Plexiglas glue and a set of right angle clamps, you can even form a complete cabinet (I did this for some prototypes for IBM, and it went over extremely well. It allowed it to be in a box with rough dimensions, but didn't generate any preconcieved notions about what the packaging would look like). Here's a photo (photo 2) of this type of cabinet.

If you have odd parts, like the DIMM sockets in this photo (photo 3), you use a Dremel tool and route out glass epoxy to allow the pins or other obstructions to clear. The DIMM sockes are held in with hot-melt glue. Two part epoxies also work well for this, although you may find an occasional plastic the epoxy will attack. Be sure to try a small area first, before ruining the part you only have one of.

Component placement

This is something that needs at least a few minutes of consideration before soldering down all the sockets, and running power busses. Bad placement can lead to wiring nightmares. It's typically best to try to orient components in the same plane, where ever possible. This means putting pin 1 of the parts all facing towards the same "lower left" of the board. Orienting components haphazardly will lead to confusion when the board is flipped over for wiring. You'll also want to try to place components to ease wiring. Here's a photo (photo 3) where the layout greatly simplified the wiring. Here's a photo (photo 4) of an example of what not to do. I added the chips on the LEFT as an after thought, and was trying to keep the maximum board space available for any future additions. However, I planned poorly, and wiring could have "flowed" much better had I reversed the xxx and yyy chips.

If you have several chips that all share many of the same signals (RAM and EPROM chips are a good example of this. They typically share the same address lines and data bus lnes), placing them adjacent to each other can simplify wiring.

Power and ground busses: Except for routing really high speed signals, this is probably the most important aspect of the board. A poorly done power and ground system will cause ground bounce, voltage sensitive chips to "drop out", power monitor chips to trigger, etc. Ideally, the voltage regulator should be on the board. If you're supplying the exact voltage you need from off the board (from a power supply, whatever), make sure that you're not trying to pass 6 amps through 30 gauge wire. Be sure to provide adequate bulk capacitance and bypass capacitance, and remember to allow for the voltage drop if the wires are more than a foot or so long.

For really small boards, wire each component straight to the power connections. For boards with more than 4-5 components, create two short power busses out of 18 or 20 gauge solid wire. Assuming the use of .1" spaced holes on something like the Vector 8006, cut a piece of wire about 1/8" longer than the distance needed. Using needle nose pliers, bend each of the last 1/16" inch 90 degrees, so it's a long flat "U" shape. Lay this down as your power bus, and liberally solder the entire piece of wire to all the pads it touches. For larger boards, consider running longer busses. Put a large cap (500uf or larger) at the end of the buss furthest from the power connector or regulator. In this photo (photo 1), you can see where I used 20 gauge solid wire to form a buss all over the board.

Another method that I've had really good success with is to use 3/16" or 1/4" copper foil tape (like the stained glass people use). There seem to be two grades of this, the really thin junk, and the thicker stuff, made by 3M. Go for the thicker stuff. Lay down the busses, trying to optimize the placement to bring them as close to the respective chip pins as possible. If busses need to cross, you can use Kapton tape (polyimide film) as an insulator between the copper tape layers. I have several rolls of this scabbed from manufacturing. You can get this from DigiKey, and although it's a little expensive at $22 for 108 feet, it'll last a long time, and it's good for well above 700 degrees (it's designed to cover things like PC board pins during the soldering process, so it's temperature resistant enough to withstand direct submersion in a wave solder machine). Anywhere the buss crosses itself, solder it. Ideally, you would form a grid.

I generally wire all the power and grounds first, where ever possible. If the board has more than a couple of components, use a 4.7uf or 10uf cap for every 4 or 5 chips. Try to keep the leads as short as possible to the power and ground planes. In my book, *every* chip gets a .1 uf capacitor. I have this immense roll of .1 uf radial lead Kemet brand caps that I use for decoupling. As a friend of mine used to say "put a cap, banjo-tight, on each chip". If you're looking at the bottom of the board, this means lay the cap so it goes straight from pin 14 to pin 7 (on a typical 14 pin TTL type part). I usually bend the end of the leads so the go into the hole adjacent to the power or ground pin, then use a piece of wire wrap wire to go from the cap, to the power pin, to the power plane. In this photo (photo 5), you can see the capacitor running diagonally on several of the chips.

Unless you have a ground plane running near the power pin on the chip, I don't advocate putting the cap at the "front" of the chip, like you see on many board layouts. The point of the cap is to suppress high frequency noise into the chip, and the best way to do that between the power and ground pins on that chip, not the power pin on this chip, and the ground pin of a different chip (or so I'm told by someone I consider one of the best analog engineers around). For really high frequency circuits, you may consider adding a .047uf cap also. The reason that it's done that way on layouts is because "through-hole" designs don't have components on the bottom. And if it's a 4 layer board, where the inner two planes are power and ground, it will still have the desired decoupling effect.

If you need a small area of ground plane on a board (for a switching power supply, say), you can use several strips of copper foil tape. Better yet, you can buy a 12" x 12" square of adhesive backed copper foil sheet (for something like $3), and cut the exact size and shape ground plane you need.

If you're using copperclad board, or copper tape, a friend of mine recommends a product called Cool-Amp. If the material being used is old, or you come back to a project a while later, oxidation can make soldering difficult. While it's possible to use an eraser to remove it, this solution is far more elegant. Cool-Amp is rubbed on to the board, effectively silver plating it. The primary application for Cool-Amp is to plate copper high amperage buss bars to guard against high resistance causing either significant voltage drop or joint heating. He also uses it on any copper junction that needs to have good low contact resistance (like the solder gun tips at their attachment point).

General things

Often, I'll place resistors or capacitors in a socket. This is particularly true of circuits where I think I may have cause to change these values. For certain things, like larger capacitors, and resistor networks, I'll place them directly on the board. For a couple of pullup resistors, I'll socket them. Sometimes it's so I can change the values, but also because I find it's easiest to attach wires to the socket pins, instead of component leads. Socket pins have the advantage of having the socket carrier to hold the pin in place, so it's far less likely to shift or fallout than a single two-legged component on the board. Transistors are almost always socketted, because I tend to blow things like that up. Especially FETs.

Socket/connector placement. Often, connectors are really what dictate where everything else on the board will be placed. After you've arranged the connectors to your satisfaction, place the sockets. Solder tack opposite corners of the sockets, making sure they're fully seated. By tacking only corners, it's easy to settle sockets all the way on the board by heating one pin then the other. Unless it's just not possible, position sockets so the all have a common orientation. This will help reduce confusion when you flip the board over for soldering. It often helps to use a small bit of sticky label (cut down diskette labels, file folder tabs, whatever) to indicate pin 1, and the reference designator for the part. Finally, solder ALL the pins on the sockets and connectors. It's far easier to reflow the connection and insert the wire than trying to hold the wire, hold the solder, and hold the soldering iron.

Next, start laying out the power and ground planes, using whatever technique you choose. Install all the bypass and bulk capactors, and wire the power and ground on the chips to the respective power planes. Any pins on ICs that need to be grounded should be done next. Once you're done with this, it's a good time to apply power to the board, and check that all the expected voltages are on the pins. Doing this now allows plenty of time to fix the board if you've miscounted pins, or have the power and ground pins or planes reversed (you only make this mistake once...)

One of the advantages of PtP is that wires can go directly from one point to another. With wire-wrap, signals often have to be "channelized" to run around sockets. Running data and address busses in this fashion can lead to problems, since the wires are all running parallel to each other. In an ideal world, signals would always cross each other at right angles to avoid capacitive coupling. In the real world, this is next to impossible. Connections should be as short as possible, but should have *just* enough slack to allow shifting the wire slightly, so that a pin the wire might run near can be soldered to.

My typical technique for a single connection is to strip and solder one end, then measure to where the other connection is to be, use a pair of needle nose pliers to hold the wire, strip the end, then solder. For strippers, I've had the best luck with the "T-strippers" by The EMF Company. If a single device is driving a signal, it may be better to "fan out" from the driver, rather than connecting everything in series. Of course, all this is very circuit dependent, and for slower speed projects, which ever way is easier to wire may be the one to use.

One of the disadvanges of PtP is that it can be difficult to solder more than one or two connections to a pin. One solution to this is the following: Strip about 1/8" of insulation off the end of the wire. Position the wire as if you were going to solder it, placing the insulation up next to the pin at one end. Using a fine tip indelible marker ("Sharpie" #35000), mark the insulation at the other end (some people can do this visually, without making the wire. I am not one of them). Using strippers, cut and slide the insulation at the mark so that about 1/16" of bare wire is showing. Solder the end of the wire to one pin, solder the center bare wire to the next pin, then measure the distance to the next pin, then cut, strip, and solder.

For more than 3 pins, you'll need to strip off addition lengths of 1/16" of insulation from the far end, so can all be shifted down. However, more than 3 pins can be difficult to keep measured, and at some point, you may just have to solder two or even three wires to a pin.

If you have a schematic for your project, use a yellow or green highlighter to mark off connections as you go. This has the added psychological advantage of making you feel like you're really making progress. Periodically, go back and check what you've done. Then do it again a little while later. While soldering a few hundred wires isn't mentally taxing (usually), it's tiring. Sometimes you end up mis-counting socket or connector pins. It's easier to go back with only a dozen or two wires to be reworked, rather than the entire chip. I've caught myself along the way more times than I care to admit, even using a schematic and highlighter.

Many of the more interesting parts are only available in 44, 68, and 84 pin PLCCs. There are sockets to convert from PLCC to through-hole on .1" centers, and they're readily available. However, it can get a little confusing wiring on the PLCC sockets. I've created templates as I need them. Here's a link to a 68 pin PLCC socket view. (I'll post 44 and 84 pin views soon).

Some projects have the joy of working the first time, with no changes (I once had a resistor and LED that worked like that...). Other times, you may need to dig out the voltmeter or oscilloscope, and start probing. In that case, it's very helpful to have a few ground lugs scattered around the board. Take a resistor, and cut about 3/4" of an inch from one leg. Using that lead clipping, and bend it into a "U" shape, with .1" between the ends of the "U". Install from the component side of the board, and attach one or both ends to the ground plane. If you prefer to debug from the bottom side of the board, consider making it shorter. The fewer "tall" parts on the bottom of the board, the better.

Avoid having wires come off the board. Use connectors where ever possible. It can very annoying to be building or fixing a board, and having a wire flop around with an LED on the end. And, before too long, it'll probably break off. When you use connectors, try to use polarized connectors, or clearly mark pin 1. If you have multiple connectors, try using connectors with different pin counts or different sexes, to avoid plugging the wrong connectors on to each other. http://www.radioshack.com/ RadioShack.com] has a nice selection, in the 910-1468 to 910-1496 part number range. Another solution is to use a "pin blank" that fills the hole on the female connector, so that it can't be plugged on to a male connector that doesn't have the pin removed ("bobbitted"). You most frequently see this on IDE and floppy connectors on PCs.

Finishing Up

When you're done with your project, it's generally safe to hit it with a defluxer to clean it up. I've used 60/40 rosin core solder for years, and this works well. I've also started using the so-called "No Clean" solders. This is a complete and total misnomer. There is still "goop" on the board with you're done, and it still looks pretty bad. If you've used a water soluble solder, you can use very warm water and a toothbrush to clean the board up. I still prefer defluxer, since it doesn't stress any connections by running a stuff bristle toothbrush across them. Shake the board dry, then blot with a paper towel, then let sit for a few hours to dry out. Almost all components made these days were designed to go through a CFC based cleaning bath. There may be a few types of plastic the defluxer will attack, but I have yet to run across any. I imagine really soft plastics might be more susceptible, so you can always test the defluxer on a spare component.

Miscellaneous Do's and Don'ts

Don't use the soldering iron to strip the wires. This will contaminate the tip, and yield poor quality joints. Solder can be "overworked" and will get plastic-y. Use braid or a solder sucker, clean the joint, and redo it. If you have a flux pen, you can put a touch of flux on the joint, which sometimes helps. Trying to work with overworked solder will give a cold solder joint, look nasty, and clearly won't have flowed properly. Double check your work frequently. If you make ad-hoc changes, be sure to update your drawing. If you make a mistake, or a bad looking joint, etc, fix it. If you don't, it's probably going to bite you later. When buying components, if they're cheap, buy a couple extra. You can always build your junkbox this way. If you break a pin on a socket, lose a part, etc, you really don't want to have to make a run to the part stores because you bought *exactly* 10 330 ohm resistors, and not 12. Being frugal is good, being cheap is bad. Be sure to ventilate the work area, rosin fumes are toxic. Good even lighting is important. Bright spot lights can be helpful, but are often awkward to work under. Take pictures of your board, so you can use it as an example and a reminder, and because once it's in the box, no one will ever see it. Write the date on your board, and perhaps what it is (I have projects from 10 years ago I forgot why I built them...) Don't let the dog sniff the soldering iron.

I've built quite a few projects over the years, and have found these techniques work well for me. However, there are a number of variations on these techniques. Use copper foil tape with a little precision, and you can lay down surface mount parts (particularly true for those funny shaped power transistors. Doesn't work so well for ICs). Some surface mount parts, particularly PLCCs, have sockets that are on .1" centers. For odder shapes, like SOICS, they can be coerced onto a wire wrap socket using a little superglue, and wiring from the pin on the IC to the socket pin. Plug it into the socket on the board (this is another advantage of using machine tool pin sockets. They plug into each other), and you've got a surface mount adapter. Other components can be super glued or hotmelt glued onto the board, and wired directly to. For parts like DB-25 and DB-9s, use a 2x13 or 2x5 header, and put the DB-25 or DB-9 at the end of a cable (In case you didn't know, PC board mount DB-25s and DB-9s have pins on .1" centers on the same row, but the rows are skewed by .05", so they don't go down on .1" center board very well).

If you have components that you're concerned about bending or breaking pins on (it's always the expensive one), install it into a socket, and plug that socket into the socket on the protoboard. This way, if you bend a pin, you'll most likely be bending it on the carrier socket, which can be replaced.

I think this about covers all the things I can think of. Nuts & Volts sometimes has articles on project construction, and has some good hints. You tend to develop your own style after a while, but can still pick up good ideas from other people. Have fun!

Sources

Vector 8006 board can be had from Digikey, and R.S. Electronics. R.S. Electronics has a fairly decent tool collection, and are the only people I've noticed that carry T-Strippers in stock. http://www.radioshack.com/ RadioShack.com] has lots of parts, and the best deal on resistors (100 for $1). Machine tool pin sockets are at Austin Electronics, and also has a decent tool collection. They used to carry Vector board, but I unless Floyd has gotten back to stocking it, they don't carry it any more. They also have a nice selection of DB-37/DB-25/DB-15/DB-9s in various mounting configurations, and hoods. Jameco also has a pretty good selection and pricing on many components.