This is mostly fixing the mistakes from version 2: the holes are now tight enough to hold the switches firmly, the routing is fixed so the microcontroller and USB socket can be on the top of the right half, as intended, a few diode footprints that were reversed have been fixed too (but still all the diodes are reversed, so you need that flag in software that flips the rows and columns). There are also some changes: the halves are now connected with two magnetic connectors, so they can be easily broken up for transport. However, to do that, I had to limit the number of lines going to the other half to 10 (4 rows and 6 columns), so I had to remove some keys in the weirder positions — I never used them anyways.
I will post an update with the design files, parts and code for this later.
Since I have to make one more version of this, because version two had so many mistakes, I thought I will look a little bit at what connectors could be used, and I found this:
It's basically pogo pins and magnets. This particular one has five pins and is mounted at a right angle, so it seems perfect for my needs if I used two pairs of them. So I fixed the problems with the previous PCB, and made this:
I had to remove two keys on each half in order to get down to only 10 lines between the halves (4 rows, 6 columns), but otherwise it's very similar to version two. I'm not entirely sure about the dimensions of those connectors, so I left ample room around them — we will see how they work once they arrive. I'm probably not going to use an actual pink PCB, though.
I also broke out six of unused microcontroller pins (and the power), so I might try doing some modules again.
The sockets arrived, and I assembled the keyboard. I used a double-row female header to bind together the two parts, in a way that lets me disconnect them for transport — it was an experiment, and I don't like it very much. The mechanical connection is pretty wobbly and feels fragile, and it doesn't look great. But it's workable, so I went ahead with the rest.
I spent several hours trying to flash the chip and failing, only to finally discover that I soldered the two capacitors rotated by 90° — serves me right to put them so close together. Fortunately that was an easy fix.
A worse problem is the fact that the holes for the plastic parts of the switches are too loose. It wasn't a problem when I soldered the switches to the board, but when using the sockets, the mechanical stability of the switches suffers. I already amended the footprint I used, and the next version will not have this problem. And there will have to be a next version, because of one more mistake...
When I went to program this board, I couldn't get a reading from any of the keys. The program works fine, but no key presses would ever register. I went through the schematic many times to verify it, I went through the physical board to check the connections. Turns out I made a tiny little mistake when I moved the diodes to the back of the board — I swapped which columns are connected directly to the microcontroller on the same half, and which go through the connector. Of course the solution is simple: just solder the chip on the other half, on the bottom of the board, and that is exactly what I did to get it finally all working. However, that also makes the USB port go on the bottom side of the board, and there is not enough clearance for the USB plug to not hit the desk. I have one USB cable where I whittled down the plug a bit to make it fit in such situations, so I could use it like that, but it's not a good solution.
Oh, and of course there were some diodes soldered the wrong way, but that's so normal that I don't even mention it.
So due to the above mistakes, I won't be publishing version two of this project, and will go straight to version three.
The PCB for the second version of this keyboard arrived:
This time I'm using switch sockets, so I decided to add an extra row and extra column to each side, to have more room with experimenting with different arrangements of keys. I also put the connector in the middle a little bit closer to the edge, so I can solder pin headers in there, and have a sort of a "clip" made of a double-row header, to connect the halves together, and still be able to disconnect them for transport. Oh, and since the sockets add a few millimetres to the bottom anyways, I moved the diodes to the bottom too.
Right now I ran out of the sockets, so the PCB is waiting for more to arrive.
I really started this to have an excuse to try the new version of KiCad, but after half an hour I gave up and switched back to Fritzing. Just like in the #Kleks Keyboard, the PCB is reversible and constitutes a half of the keyboard, the other half is a second copy of the same PCB, but flipped over.