torsdag 23 november 2023

Disaster! The Perils of a Cheap ProMicro and How to Save One's Homebuilt Daily Driver

After having used my second Isogherkin prototype as my daily driver at work for over two years, it suddenly happened. As I was packing it into the case one morning after a day of working home to bring it to the office, the USB port on the ProMicro MCU snapped right off, despite having been drenched in hot-gun glue (not enough glue, it seems...)
Despair! What a sinking feeling to the stomache...
Well, not much to do - needed to whip out the soldering iron and desolder it, pin by pin.
Damned little sucker...
OK, but that the USB port on the ProMicros are pretty flimsy is a well-know fact. Luckily, there are other MCUs around that has addesses the issue by instead having a through hole mounted USB port. For example, the Elite-C is one of those and also have the good taste of having an USB C port, more pins, and multiple other advantages over the ProMicro while still being a drop-in replacement for it. It is somewhat more expensive though. Furthermore, I already had an Elite-C at home for another project that I haven't gotten around to do yet, so I quickly settled on soldering it to the Prototype instead.

The three row pins done:

All done:
In theory, I could have soldered each row and column to the same pin as on the ProMicro - then I would have been able to just flash the old image onto the Elite-C and everything should just have worked. Instead, I tried to make a more tidy use of the Elite-C pins - D1 to D3 for the rows and B0 to B7 and F4 to F7 for the rows, but then confused F5 to F7 with the pins on the opposite side of the MCU. Not a big problem, as it is just a matter of updating the pins in the QMK code. Or so I thought. It turns out that QMK have gone through a lot of changes during the last couple of years and I quickly found out that it wasn't trivial to re-create the Isogherkin firmware in the new style in an evening. Alas, my old checkout refused to build with Python errors, probably due to the OS having moved on... It looked like I would have to go the long way and be without my daily driver for weeks, but then I found a checkout on my old Chromebook(!) that still was in a preserved enough eco-system that it still allowed me to compile - so I updated the pins to match the actual ones used on the Elite-C, compiled, exported the image to another laptop that actually could flash, too (Chromebooks generally cannot flash MCUs), flashed the Elite-C and - hey Presto! - I have my daily driver working again! But next step will be to do the homework and modernize my Isogherkin QMK firmware code to match the current QMK standards (then it can start to grow outdated again).