Back to Latest News Executive SummaryOkay, so you carefully built your prototype, and - breathless anticipation - the moment comes when you must test it. WTF!?!?! It doesn't work! What kind of shit design is this! OMG! OMG! (sound of head exploding).![]() The special piechart above explains your position. The green vomit colour represents the various and manifold ways that the prototype might be WRONG. There are a lot of ways it might be wrong. Imagine that you listed all the pins and tracks on your prototypes, and then imagine what the list of every possible WRONG combination of opens and shorts between those pins would look like. It would contain more entries than there are atoms in the universe for a nontrivial design. So you can see that the white line, representing the ONE way that your prototype can be put together right, is being pretty generous with its multipixel width. The odds are against you. Its not just a matter of buying the parts and following instructions. Lets just say that again.
And if you have not yet found The One True Way, my son, read on. Why things aren't that badAlright, things aren't that bad. In fact only a tiny number of the 'wrong' scenarios are likely. Generally, with shorts for example, only next-door pins or tracks that are next to each other on the PCB can realistically be shorted together. So that improves the odds by several trillion trillion already, leaving only several zillion ways to go wrong.With care, readily visible errors will be spotted and corrected. So that is another large population of potential errors that can be resolved with just time and care (including the absolute worst case, which is that every pin on your PCB is shorted together... you would probably notice that I hope). However, that still leaves thousands of credible faults for even a small PCB like Milksop. Things that lead to errorsWe will be looking at how to avoid or fix these problems in the next section.InexperienceComponent misorientationSo, it doesn't matter which way around a resistor goes, or a nonpolarized capacitor. But it does matter which way around a diode and an electrolitic capacitor goes (you may get an exploding capacitor if you do that wrong). And you probably figured that it matters which way around the ICs go, right? Did you check?How about resistor packs? On some respacks it does matter, but the ones I have used on these pages do not care. MiswiringInexperience leads to a feeling of being out of your depth and the suspicion that it is all IMPOSSIBLE. That leads to people taking shortcuts with their brain when they really out to stop and bring up Google. This includes an unnamed chap on XBOXHACKER who did not check the pinout of his PLCC device and just assumed that pin one was in a corner. Which corner? We do not know, it was his favourite corner. In fact PLCC packaged devices have pin one in the top middle (there is a small dent to show where) and count around anticlockwise.The point is not that he ''made a mistake'', but that he blithely assumed that he would just be right with his choice, that ''it will all work out''. This is a dangerous frame of mind it is easy to fall into when you are fatigued and really quite worried you aren't going to make it, you try to pretend there wasn't a choice there at all. What? It needs power?Inexperience causes problems when more experienced people leave out ''the obvious''. It IS obvious to more experienced people because they do it every day and don't even think about it any more. But for newbies, it is not obvious, for example, that external power has to be applied to a CPLD when attempting to program it over JTAG. It seems perfectly possible that the PC might provide 100mA out of its printer port to a newbie, after all, everything else seems to work by some magic.Solder shortsInvisible bridgingSolder is quite capable to make ''thinner than hairline'' bridging which is not visible to the naked eye.Pin bridges that are not easy to seeStrands of molten solder which bridge two pins are often visible to the eye. However, if they are at the point where the pin enters the package, or on the underside of the pins, or on the corner bend of pins, this may not be so apparent.Under-package shortsIf you have been over-generous with your solder, it can form islands under the IC package which cannot be reached by solder braid (because the heat from the iron cannot reach the solder).Shunted pinsIf you do not take care of the pins on your devices, they may become laterally pushed together, causing shorts. This is simple carelessness not to have noticed.Misaligned pinsIf you do not align pins with care, especially if the package is slightly rotated from normal, on fine pitch ICs the pins will gradually get more and more out of alignment as you go along a row, until they start to short to the wrong pads.PCB shortsPCB Manufacturing defects - bridgesYou can't trust your PCB. Hair or dust may fall on the board during manufacturing - depending on which manufacturing process step this happens on it could cause opens too - leading to arbitrary shorts in your tracks.''Solder resist was too expensive''Oh boy. Put solder resist on all your PCBs. Otherwise solder you are using to solder surface mount or through-hole pads will bridge on to nearby tracks. That is a miserable situation, the thin tracks cannot stand direct rework and will lift off the fibregalss substrate of the PCB, leaving you with an interesting new coaster for hot coffee, and an unusual configuration of bruises on your forhead where you tried to stick your head through the office wall.ChaffSee the Bare Board Test section.OpensSMT conformanceSMT chips have a figure for pin conformance in their package data. This is a tolerance - usually stupendously tiny - for how much higher or lower the bottom of all the pins are from each other. If you have not taken care with your device, and some pins have been bent, they may no longer touch the pad on the PCB, while all the other pins are seated firmly, or the bent pin may be lifting all of the other pins up off their pads slightly.Levitating pinsMuch harder to see is the feared failure mode where the solder flux gets under a pin and boils while you are doing the ''flood the pins with solder'' thing. The boiling action stops any solder from entering under the pin. You end up with a pin that looks like it is perfectly soldered, when it is sitting on an insulating layer of solidified flux and no solder even got near it.Levitating balls on PTHThe related failure mode for PTH pins (Plated Through Hole, or pins that go through the board) is to solder a flattened sphere of solder which again looks perfectly credible as a well-soldered joint. However the dreaded boiling flux of doom has been a-dancing on your pad, sniggering behind its lacy handkerchief, and there is in fact no connection.PCB OpensPCB Manufacturing defects - opensYou can't trust your PCB. Hair or dust may fall on the board during manufacturing - depending on which manufacturing process step this happens on it could cause shorts too - leading to arbitrary opens in your tracks.Excessive track currents, or ''the wisp of foul smoke''This one happens when you begin testing. A careless moment with a scope probe, a pre-existing solderblob between 0V and Vcc, and your PCB becomes an unusual and exciting low ohm resistor hooked up to your power supply. An inch of 6 thou track presents around 0.15R DC resistance. Where that inch is accidentally hooked between 0V and 5V we are therefore attempting the amazing feat of passing ~30A through an inch of track not much thicker than a hair. It reacts to this honour in the following way. First, it heats up. Then a few milliseconds later it gets really very hot, white hot. The solder reisst above the track chars into carcenogenic flakes, releasing what would other under circumstances be a beautiful curl of thick grey smoke, which rises into the air gracefully and steadily, driven by the heat. This curl is of very defined size - because a few hundred mS later the track burns out and the fault area begins to cool. If you happen to be leaning over the PCB, breathing heavily with anticipation and fear, this toxic plume will gladly be drawn fully and directly into your tender lungs, where it will sear them, and as you stumble from the room cursing, retching and choking, take up residence until it will later kill you from lung cancer.OvervoltageThe mosfets used in modern silicon have a breakdown voltage that is not a million miles away from their operating voltage. If a pin, or the Vcc rail comes into contact with a voltage that is double the rated maximum, it will almost certainly have proved fatal.Overcurrent/HeatIts actually fairly hard to kill devices by overcurrent if no excessive voltage is involved. However, shorts can cause large currents to flow in output stages, a 74HC pin shorted to 5V but driving low will pass considerable current (>100mA), over time this heating will cause fatal trouble.Static DischargeI have never had a problem I could say was down to static discharge. However, I live in England, which is not known for its dry atmospheric conditions.Mysterious problems caused by protection diodesEvery pin on a CMOS device has a pair of protection diodes. There perform the function of providing a low resistance path for volatges below ~ -0.5V to 0V, and for voltages abover Vcc+0.5V to Vcc. The unforseen consequence of this protection is that low current devices can ''sort of operate'' even if there is no 0V or Vcc connection to them. In the case of no Vcc, consider that any high signals will be shunted on to the Vcc rail by its protection diode, raising Vcc to around the High level - 0.5V. But then the Vcc level is dependent on the amount of high signals coming to the chip! If you have truly bizarre operation, this should be checked for.Avoiding avoidable errorsOkay, that was almost all the depressing stuff. Now you understand the difficulty. What can be done about it? How does anyone build anything that works?Fully avoidable problems
Largely avoidable problems
Working with unavoidable errorsYou WILL have unintended shorts and opens on your prototype. Get used to it. You aren't as perfect as your Mum thinks you are. You need tools and strategies for dealing with the inevitable.Tools
Strategies
ConclusionThis is only a sampling of the problems and solutions you need to build a modern prototype. It is not an easy job. I hope this advice will be of some help. |