This uses the same firmware as version 1, but instead of cherry switches, it uses micro switces with levers, these are way more tactile than the red cherry switches, while the lever action seems as light, or ligther than the cherries. They also give a very satisfying click when pressed, who needs hitsounds ? video of version 2 in action on youtube.
The case is greatly improved, not only does it print with less warping, it is also large enough that it can be firmly placed on the table, especially if adding some soft rubber feet.
Here is the 3D model: osukey2.scad
I did make one small hack to the swithces, I did not like the rollers... rolling,.. so I put a dab of loctite on them, made all the difference in the world.
The source code for the keyboard controller firmware is a small arduino sketch: osukeys.ino and the OpenSCAD source file for the 3D model: osukey.scad
Bill of materials
- 2x mechanical switches, I used Cherry MX Red
- Arduino Pro Micro
- A bit of wire, a dash of solder
- A case (I used a 3D printed one)
- 2 Keycaps (I used 3D printed ones)
After printing the case and keycaps, glue or tape the Pro Micro board to the side of the case, I used double-sided tape.
Cut lengths of wire and run them from the keys to the arduino. Connect one side of both keys to GND and the other side to A3 and A2 respectively, that's it. See schematic in Arduino firmware.
Press the Cherry switch into the hole and put on a keycap.
The keyboard reads the debounce delay from EEPROM, if it is too low, it wrongly registers multiple keypresses, and if it is set too high, you won't be able to press the same button in quick succession. To begin with, the value is way too high. To set a new value, enter the configuration mode. This is done by holding down both buttons when plugging in the keyboard, and waiting for 3 seconds, then the keyboard will identify itself as a USB serial port. Connect to it with putty or minicom, 9600 baud. There you press "s" for set, and enter a new value, try 100, press enter. Test if it bounces, if not, great, otherwise, repeat with a higher value, try increasing with 50 on each try.
All the steps, in order:
- Flash firmware to arduino pro micro
- Print or otherwise obtain case and keycaps
- Glue or tape or otherwise attach arduino to side of case
- Run wires through hole in case, to arduino
- Solder switches, one side of switch to GND, other side to A3 and A2 respectively.
- Push switches into holes
- Attach keycaps
- Adjust debounce delay, try 100
- - Plug in while holding both keys, wait 3 seconds before letting go
- - Connect to the USB serial port with Putty or Minicom, 9600 baud
- - Press S to set value, type 100 and press enter
- - Test if it works, otherwise try with bigger value