You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

87 lines
3.5 KiB

  1. # D48
  2. ![Proton C based handwired 40% keyboard](https://i.imgur.com/2wCYuno.jpg)
  3. A Proton C based handwired 48 key keyboard with 2 rotary encoders, I2C OLED, WS2812 strip, buzzer & clock!
  4. - Keyboard Maintainer: Andrew Dunai
  5. - Hardware Supported: Proton C handwired
  6. Make example for this keyboard (after setting up your build environment):
  7. make handwired/d48:default
  8. ## Details
  9. - Proton C based handwired keyboard
  10. - 2x custom 1.25mm stainless steel plates
  11. - Kailh Choc White (clicky)
  12. - 2x rotary encoders
  13. - 0.91" 128x32 I<sup>2</sup>C OLED
  14. - Small buzzer mounted inside (still waiting for the AST1109MLTRQ boys)
  15. - WS2812 strip (14 LEDs)
  16. - DS1307 I<sup>2</sup>C module real-time clock
  17. Build process: [album](https://imgur.com/gallery/zZZGdDw)
  18. ## Pinout
  19. ![D48 pinout](https://imgur.com/QoStCvD.jpg)
  20. ## Challenges
  21. I'm very happy with the result, but at some point Proton C was driving me nuts.
  22. I did a lot of trial and error during assembly & programming.
  23. There were a lot of *yet* undocumented caveats,
  24. so I'll outline them here so that you guys can avoid the same issues I had.
  25. ## Matrix & encoders
  26. Although this is a 48-key board with a 12-col & 4-row matrix, I've decided to add an extra row above the first one
  27. to make my matrix 12x5 and wire encoders' push buttons as 2 extra keys, thus making it a total of 50 (12x4 + 2 encoders).
  28. I used 2 columns (9 & 12) for those buttons.
  29. So, a first row actually has 2 buttons on columns 9 & 12 (because encoders are located near those columns).
  30. Encoders' push buttons are also configured via QMK's keymap.
  31. Check out the `d48.h` & `config.h` for pins used & keymap macro definition.
  32. ## I<sup>2</sup>C/OLED
  33. Most of the stuff worked out of the box, except me choosing the right pins for my OLED.
  34. On the Proton C pinout, there are 3 labels for I<sup>2</sup>C and for some reason
  35. there are 2 pairs of SDA/SCL for I<sup>2</sup>C<sup>1</sup> channel: `B8`/`B9` (rear left side) and `B6`/`B7` (rear right side).
  36. I'm not sure if this is a mistake or if I was doing something wrong. So initially I picked `B8`/`B9`
  37. which were not working. When I switched to B6/B7, things worked like a charm.
  38. Later I used B9 for matrix row. No issues so far.
  39. Oh, and by the way, while using `B8`/`B9`, keyboard was sometimes *swallowing* quick keypresses.
  40. I believe this was due to I(2)C timeouts (because incorrect pins were used for OLED).
  41. ## Buzzer
  42. It turns out once you switch on `AUDIO_ENABLE`, you cannot use A4 & A5 because they interfere with the buzzer.
  43. My guess is that buzzer uses DAC channels (not sure why both).
  44. I couldn't find this in documentation. Honestly, Proton C has almost zero documentation and this was
  45. the biggest challenge. Anyway, apart from almost going crazy from those challenges, I really liked it!
  46. ## RGB
  47. I used pin `A15` for my WS28128 RGB strip.
  48. ## D1307 real-time clock
  49. Connecting DS1307 RTC was a piece of cake: same I<sup>2</sup> pins as OLED (SDA/SCL), GND to GND and power to Proton C VUSB pin (5v).
  50. ## Other issues
  51. - `B5` could not be used for matrix.
  52. - `TAP_CODE_DELAY` had to be increased to 10 to fix `tap_code(KC_VOLU/KC_VOLD)` calls being swallowed in encoder callback.
  53. - Be extremely attentive about the pinout: keep in mind that **the official Proton C pinout displays the rear of the board, not the front.** Being used to front pinouts, I ended up soldering entire matrix to the wrong side, so I had to desolder every wire and connect it to the opposite side.
  54. ## Conclusion
  55. I had a lot of fun. The layout was inspired by the Planck THK. Feel free to ask any questions!