Any development project is going to hit bumps in the road as it progresses, there are going to be all sorts of things that need consideration and prioritisation when working on such a project, just as you do in any corporate change programme. The various types of change this project is going to encounter will include:
- Design problems - things that are wrong in the current design
- Design changes - new requirements, ideas and changes to scope
- The day-to-day activities, what works, what doesn't work, where we have got to, since this is a part-time, fun project, not the daily 9-5 day job.
So, how to record all of these ?
My preferred way of handling such change is to keep a journal, in a word document, recording all the things I've been doing, my thinking and progress, this is better for me than keeping a log book, as that would be in the way on the bench and I can search for things quicker in an electronic document.
I also keep a spreadsheet of all the problems I've found (a defect tracker), their cause, resolution and any workaround that may be possible. This also has a change log for each printed circuit board (PCB) that I've created, so that when I come to make another one, I know what modifications I need to make to it, to bring it to the current working version.
There is also the challenge of the circuit design and board layout, which will evolve over time. The best way I've found of working through these is to have the major version (i.e. v1.0) as the design that covers that boards that were actually manufactured. Since this is the second iteration of the design, the PCB's are v2.0, or v2, rev 1. The workarounds made to the current boards (also known in the industry as bodge wires) then form the next minor version, so v2.1 or v2, rev 2. Any design updates that can't be made to the current board and require a respin of the board are then the next version up, so v2.2, or v2, rev 3.
This means that I can look at what I had manufactured, what I'm currently working with on the bench and what I plan to make next when I send for the next board version. This is easier than trying to remember the context and detail of each issue, at some point in the future.
The source code also takes a similar approach. The current release of code is what works against the v2.1 / v2 rev 2 boards, but I'll add into the code comments TODO_NEXTBOARD or #ifdef TODO_NEXTBOARD with information about what needs to change to support the next code version, this can be pin layout changes, new functionality that needs adding, etc. It all just helps aid memory when you need it.
You may also note when you look at the pictures of the PCB's, each of them has their function and a numerical suffix, so FP2, front Panel, board 2, PS1 is Power Sense board 1. This ensures that if anything happens to a specific board, it can be recorded in the log, in case that causes problems at a point in the future, its also handy for recording if one board is a little ahead of others when modifications are being made. In professionally made boards, it is quite common to have a couple of pads on the board that allow for both a visual reference and electronically readable version ID, so that any firmware can know which hardware it has and which functionality is available / not available, ensuring that the board is used in the optimal manner. The simpler way is simply to have some markings on the silk screen and these are marked with an indelible marker. This works when its for visual checking only and where there is no processor capability on the board.,
Fixing the first board problems
Returning back to the previous point of the Pi's power problem, this is not defect number 1 in the log, since I found and recorded some defects during assembly of the boards, such as pin 1 not being present on the connectors, and the polarity of the polarised capacitors is not present and supply problems of obtaining all the Analogue to Digital Converter (ADC) chips I needed, due to the ongoing semiconductor shortages after COVID 19.
In general, the solution to working around defects in the boards is to think creatively about how you can fix it, can you cut a track using a scalpel to make a couple of mm gap, but not going deep enough to cut into the next layer inside the board, which is really close to your current layer. Consider that there are 6 layers in the 1.6mm board thickness, so less than 0.4mm below where you need to cut. This is also why many people put the signal layers on the top and bottom of the board, leaving power planes internal. Professional boards will have many more layers and many of them will include signal traces inside the board. At that point, the likelihood of fixing a problem with a bodge wire / cut trace is much lower vs needing to re-spinning a board.
It is possible with surface mount (and through hole components) to solder another component on top of an existing, since they share the same 0603 footprint. This is handy to adjust resistor values, or to put a decoupling capacitor over a voltage sensing resistor divider. Older leaded components can also be used to bridge across the board when things are not adjacent, they just look a little out of place, but working beats broken when prototyping.
In some of the photos of the boards, you may see blue, yellow and white "bodge wires" on the boards, these are 30awg wires (0.254mm diameter), with a single solid core and a heat resistant outer insulation. Mine happens to be Tefzel wire or wire-wrap wire. Even with such a small diameter, soldering these onto a leg on some surface mount IC can be quite challenging, due to the very fine pitch of the pins on smaller footprint devices.
The way that works for me is to tin the wire, tin the leg, then put it on top, apply heat and come off, inspecting the joint then repeating the heat / position process where necessary. Routing of the wire is then done in straight lines with 90 degree bends and the wire is held down with little dabs of cyanoacrylate glue (super glue) to stop it from getting caught and coming off. It also looks a lot more professional. In some cases, small holes may be needed through boards to get to the opposite side, but great care is necessary to figure out where to put those holes so that you don't hit any important trace inside the board on its inner layers. Traces are generally best cut in open areas, where they are easier to put back together later on if needed, so don't burn any bridges when modifying the board. Also think laterally about where joints can be made sensibly, since sometimes its easier to move the joint and get a far simpler / shorter cut trace and replacement bodge wire.
In this case, due to the differing footprints, a bit of creative thinking by flipping the new transistor over, bending its legs a little and soldering a bodge wire to one of the three pins allowed me to get the replacement component in place. The log was updated with the process, the circuit diagrams were updated on the as-is v2.1 version and the next v2.2 version, ready for next time has the correct transistor, in the correct footprint and orientation.
The reset problem was solved by a carefully placed wire link across the top of the ULN2003 transistor array and some carefully placed surface mount resistors down to the pins that needed pulling up. Its not pretty, but it works. This is recorded in the tracker and the boards have been updated to include the additional footprints.
Now the Pi's power can be controlled properly and things can leave reset mode and power up, so its on to the next problem