Motherboard is complete!

A project log for Kerbal Spaceship Potato

This is an input focused control panel for Kerbal Space Program.

matthew-peverillMatthew Peverill 07/27/2020 at 14:530 Comments

Ok, at long last, I can successfully register every button on the matrix, control every led, read from every analog device, and talk to every i2c device. This took some doing. Once the dead short was resolved, testing revealed a number of issues. Two of the rows and two of the columns were switched in the output. A number of the button switches didn't register, and button presses on c5 and c6 seemed to produce somewhat random button presses elsewhere on the matrix. The analog inputs from the 74HC4051 didn't work at all, and 3 of the LED outputs from LED bank a didn't drive. I inspected the thing in the microscope and it looked like a lot of my pins were lifted on U1 and U2, so I replaced them. This took care of the analog issues. I also replaced the diodes in the switch matrix for buttons that weren't working. The issue with c5 was with the pull up resistor: it was soldered fine, but I think the trace was broken somewhere (probably at a via - this is most likely because I've worked on the board so much there may be some delamination). I repaired this with a wire. The led issues were resolved by resoldering the relevant diodes and pins on the i/o expander (pro-tip: make sure you check both of these separately: I replaced one diode like 4 times before I realized it wasn't the issue, and had to put in a wire bridge because the pad lifted).

So now the board works and I can actually assemble this sucker! My big lesson on board assembly is that you should take NO SHORTCUTS when pasting and reflowing the board. I didn't check all my footprints to my devices on paper (which also means I didn't check I had everything I needed), I didn't buy new paste, and I used a plastic rather than steel stencil. This saved me $30 on parts and 2-3 hours in assembly, and cost me more than that in replacements and dozens of hours troubleshooting. If I had a time machine I'd go back and do it right at the paste stage so I didn't have to do so much with the soldering iron.

There are also a few design issues on the board that I'll fix in v3 (which I won't build, but just in case anyone else needs to):

  1. Pin A7 can't be used to drive a PWM LED (as it is currently laid out to do). I should be able to fix this by putting in a transistor hooked up to the dimmer circuit.
  2. I made each part of the board as tightly grouped as possible. There are a few places (especially the diodes by the ULN chips and microswitches and the components around the matrix chip) where I could space out the components a bit more to ease hand soldering if it were necessary. I'd use a different diode footprint if possible, but I'm not sure there's anything better). I'd love to have bigger ICs, but I don't think there is room on the board for them. 
  3. Two rows and two columns are switched in the schematic relative to the I/O expanders registers, which makes the output less predictable. This is an easy fix on the schematic and switching the wiring by the IC. 

Panel assembly is 80% done: stay tuned for good pictures with that update!