Random thoughts about software, hardware and electronics. And other things too...
maanantai 21. maaliskuuta 2016
PCB design fails - and rules to avoid them
Even with experience mistakes happen. Some time ago I ordered a new tester board; nothing really fancy, a fairly simple and quick two-layer design that I needed only a few boards total. And of course I somehow completely forgot to add few signal lines. Not route, that would have been visible with airwires; signals weren't connected at all on schematic level.
There was no point making new boards, so I just added jumper wires. Processor has 0.5mm pin pitch, chip at other end (a common mux/demux) 0.65mm. Not greatest solder job but good enough for now. And dab of glue will keep wires at place.
At the lower right of the MCU there is a fix for in-system programming header. Somehow I got two signals mixed up and had to fix that with wires, too.
Obviously I have fixed schematic and layout too, in case I actually do order new batch at some point, however unlikely that actually is.
With this kind of screw ups I've make a mental list of some rules for PCB design to avoid this kind of issues.
Rule #1: Take your time.
After board is "done" I still open it for quick review few times during a week or so. Although you are done with the board, your brain is still working on it, subconsciously, and may suddenly remember some things that you have missed. Similarly looking at the board after few days allows you to note some stupid mistakes you might have made.
This of course applies also to schematic phase. Your mind will be working on it even if your body is out taking a walk or whatever, but since schematic is done before layout, so you can return to schematic while working with layout, so it is less critical at that point.
Even in middle of design it can help to take a break and not actively even think of it. Take a break, really, you will return to work refreshed and with added energy later on.
Of course you might not always have time to spare, but that is another issue completely.
Rule #2: Use ERC.
This I might have said already, but the design check tools in your CAD package are there for a reason. When you first run it, it might look frustrating when you get tens or hundreds of errors, but they are there for a reason.
On schematic side the tool is ERC, or Electric Rule Check. It will allow you to note stupid errors like this where one of the supposed ground pins actually isn't connected to ground. The other error is stupid; when I designed connector I for some stupid reason or another defined to have value. It shouldn't, and in schematic I haven't defined value (value typically meaning resistor's resistance: 1k [Ohm] for example) so it complains. But when you down to errors you know you can ignore, all is good.
Rule #3: Use DRC.
On layout side counterpart for ERC is Design Rule Scheck, or DRC. Running it costs almost no time but allows you to fix errors immediately. Later, after you have routed dozen signals at the same area it will become a lot more difficult. So use it early and use it often.
Another stupid issue, but there is plenty to space to fix this. There two examples here are actually artificial (aside the value issue with connector); I created them on finished board as an example. But trust me, there were plenty of real similar issues before I got to this point.
You might notice that the partially visible via is close to red track. There is no error there, as DRC indicates; that via on between layers 1-2, but red track (and its via) is on layer 15. So no error there. (four-layer board with layer names being 1-2-15-16, don't ask.)
Rule #4: Show me the signals!
I adapted this rule because the very first error I showed at top of this post. When board is completely done it is a good idea to issue "show signal" commands (in Eagle, your CAD package might have different command for that) for each and every signal there is. ERC should catch this too but I guess I got lazy there. Violation of rule #1 too. Lesson learned.
This can of course be run earlier too, but it is less useful before board is "finished".
This is the result after "show out1" command. Only one pad on MCU is highlighted, nothing else on board (note that there is no airwire; I cropped out rest to allow focusing on this point here). There is obviously some problem here, either "OUT2" was mistyped at other end or never connected to anywhere. Either way it won't work very well like this.
In addition of noticing things like this you may note that things like analog signal being routed through a noisy part of the board, or high-frequency signal (like auxiliary clocks) taking a way too long and complex (read: slow and potentially noisy) route around the board.
Rule #5: Take your time!
No, really. This is worth repeating, and applies to all engineering (and other fields too). Take a break now, both you and the design will thank you later.
Tilaa:
Lähetä kommentteja (Atom)
Ei kommentteja:
Lähetä kommentti