How do I make sure my stuff works.
This section is about designing and implementing electronic hardware in general, using as an example design of BMVCU for Audi in particular. The is no magic why everything I design actually work - aside general knowledge and accumulated experience, it's certain habits I developed dealing with electronic circuits that come down to prototyping, testing and then more testing. If someone asks me to suggest tips how to do a good job designing electronics, I'd summarize them as follows:
So, you settled on the concept of your circuit, hardware platform and defined how you want your gadget to work. You captured proposed electrical schematic as a first stab. Now what?
There are two types of circuit designs I usually faced with - either based on a central processing unit and a lot of periphery and glue logic (usually digital or mixed signal), or regular "distributed" type (as most analog designs) with input on one side processing in the middle and output/indication on the right side.
My usual sequence of prototype assembly:
In case of analog design, sequence is not critical, but it makes sense to start with the circuit stages that can be tested without anything else, and add to them. I often start with the "end" circuits such as LCD indication or a line driver. You will need some type of signal generator to feed such circuit. If it is not practical, start from the front end - sensor processing circuits or some input conditioning circuits. The key is to add one active component at the time if possible (IC, transistor), confirm it functions as expected and only then move on. Point is, it is trivial to determine where the problem is if previous stage worked fine but the new one doesn't. If you assemble whole thing that has never been designed before, chances it will work right away are about the same as chances that the software code you wrote won't need any debugging. And you may not have good idea where to look for the problem. Imagine wiring up entire circuit, similar to receiving a populated untested PCB from the assembly house. You turn on the power for the first time and if nothing works (provided, no smoke get out...) you don't know where to begin troubleshooting. However, if, say, only CPU and serial UART is wired up first, you test it and it doesn't work, there is nothing else on the board to interfere yet, so you know exactly where to look for the problem. Once UART stage is debugged, you wire up next one. If that does not work you know it can no longer be UART, so no time wasted looking there. Moreover, use now working UART to output diagnostic info to the PC via simple serial connection. Fixing the problem is almost always trivial, the hardest part is locating it. Thus ability to debug one stage at the time is great time saver. IN case of CPI granted you will need keep writing supporting code to at least toggle everything on the board.
For individual stages and prove of concept nothing beats traditional quick prototyping board. These are good for frequencies from DC to a few hundred kHz and quite limited as you can only place one row of ICs or other components between power rails. You cannot test layout sensitive designs such as switching power supplies or for instance some Op Amp circuits where capacitance of board's connecting strips messes up feedback parameters. Nevertheless, these boards prove indispensible for quick verification of parts specs, or if something is functional on DC or low frequency level. Many modern semiconductor components these days come only in SMT packages with their leads having increasingly small pitch. So in order to prototype with them I mount them on a small adapter PCBs essentially converting them to DIP packages. As a habit for a long time now, I add to all my PCB layout designs these small break-away adapter boards - as many as will fit without increasing total PCB area. As a result, over the years I've accumulated quite a few of them for many common SMT packages such as SOT23, SOIC or TQFP. These adapters are handy not only to test SMTs on quick prototyping boards, but they can be used on wire wrapping boards as well.
I'm always amazed when younger tinkerers stare at me when I mention wire wrapping - turns out this unfortunately becoming lost art few people remember, let alone using it. Creating circuits on wire wrapping boards is so great that it was used in the past not only for prototyping of real complex circuits but in final products. Countless main frame computers with large back plane boards with edge connectors used wire wrapped boards, which proved to be highly flexible and reliable - so much so that electronics in early satellites was assembled that way. There is still a lot info on the web about the subject of micro-welds formed between wrapping wire and square gold plated posts with sharp edges, so there is no need to repeat all this here. I just wanted to mention that in my pro engineering design work flow wire wrapping is the second and last stage of prototyping of complete systems before final circuit is settled and PCB artwork gets developed1. The choice between wire wrap boards or perforated point to point soldering boards, depends on the final circuit complexity and amount of anticipated changes. On wire wrap boards it is trivial to make changes - unwrap wrong connections. This can be done "in the field", away from quality solder stations. (Toys like cordless solder irons do not count). Here are few photos of how it all comes together. Also wire wrap boards are simpler to re-use - de-mounting al the components is not as messy as for solder boards and does not require any cleanup.
This section is not meant to serve as tutorial how things should be done. Everyone has own preferences, tools and habits. I just describe how I do it. This workflow was evolved over many years and since it has never failed me, I see no reason to invent anything new. Here are few photos illustrating all above.
An example of point to point soldered prototype board - front view.
You can use it for relative simple spread out designs.
Same board - back side. This type of prototyping would be too messy for a BMVCU project - not because of complexity of it, but amount of anticipated re-soldering and changes. The insulation of standard Kynar wire wrap wire is not very tolerant of the high temp and usually re-soldered 3-4 times gets damaged so the wire needs to be replaced. Also when you get to more than two layers of crossing wires, it is very hard to unsolder a wire from the first layer without damaging its insulation. With wire wrapping it is not an issue.
Example - final prototype of EVision gadget on a wire wrap board. This must be circa 2001. Large proto area allowed for multi-processor prototyping. This type of prototyping will be used for BMVCU.
Same board - back side. Very simple to make - somewhat tedious process requiring a lot of patience and attention, but very straight forward one.
Complete modules mounted on DIP adapter - carrier board. This photo shows a GPS module on top of the SMT-DIP adapter designed for TQFP IC packages. PCB traces and SMT pads are actually not used here.
Mounting tiny IC packages. This is about the smallest pitch IC I can handle - DFN leadless package with 0.5 mm pitch and pads size 0.4 mm x 0.25 mm. soldering wires to such a pad by hand is a challenge. You cannot use typical AWG 30 wire wrap wire for this, it is too stiff and will break away the IC solder pad if you bend the wire. On this photo the IC body is secured in a blob of hot glue and the lead wires are not soldered to the adapter PCB yet. Avoid QFN packages if you can!
These are standard DIP adapter PCB with fork type gold plated pins specifically made for wire wrapping proto boards. They accommodate components whose leads cannot be inserted into the board directly.
The SMT adapters as break away boards I mentioned above. Loose pins and completed PCB example with SOIC package soldered on it.
The main CPU for this project (as mentioned above, the Microchip PIC32MX795F512L) mounted on the special "Schmart Board" I happen to have. It is very useful, so I'll make sure to add a few of such adapters to my next PCB run.
This handy gadget allows to identify discrete semiconductor components - loose parts or while in circuit. Very handy for reverse engineering and understanding/reconstructing schematics. You can read more about some techniques doing in already mentioned blog here.
Completed LCD display enclosure -3D printed. It is good enough to be placed on dash of the vehicle. The BMVCU enclosure will likely to be made the same way and fit in the same spot in Audi where original VCU was mounted. This is natural location for it since all the original interfacing comes to that, such as the pedal TPS'es I need access to.
Beginning of the construction on the wire wrapping board. The CPU placed vertically in the middle of the wire wrapping board to have access to the adapter board from both sides. Electrically the wire wrap board is divided in two halves - 3.3V powered section and 5V powered section. There are pre-routed PCB traces delivering power as well as ground connection to the specific pins, so this is was convenient arrangement.
Photo from the top. I'll add more photos here as I move along.
1 A notable exception to this is switching power supplies - these are highly sensitive to the layout and often rely on large copper areas to function properly. Usually I still manage to implement them on the wire wrapping boards if they use one control IC, but if I have complex isolated supply with multiple outputs on custom wound transformer, I resort to tiny PCBs that can be made cheap. If in doubt about optimal layout, I order step-and-repeat array with variations I can choose from.