1
0
Fork 0
forked from forks/qmk_firmware
qmk_firmware/keyboards/handwired/d48
Ryan 023d644bb6
Move RGBLight animations to data driven (#21635)
* Move RGBLight animations to data driven, 0-9

* Move RGBLight animations to data driven, A

* Move RGBLight animations to data driven, B

* Move RGBLight animations to data driven, C

* Move RGBLight animations to data driven, D

* Move RGBLight animations to data driven, E

* Move RGBLight animations to data driven, F

* Move RGBLight animations to data driven, G

* Move RGBLight animations to data driven, H

* Move RGBLight animations to data driven, handwired

* Move RGBLight animations to data driven, I

* Move RGBLight animations to data driven, J

* Move RGBLight animations to data driven, K

* Move RGBLight animations to data driven, L

* Move RGBLight animations to data driven, M

* Move RGBLight animations to data driven, N

* Move RGBLight animations to data driven, O

* Move RGBLight animations to data driven, P

* Move RGBLight animations to data driven, Q

* Move RGBLight animations to data driven, R

* Move RGBLight animations to data driven, S

* Move RGBLight animations to data driven, T

* Move RGBLight animations to data driven, U

* Move RGBLight animations to data driven, V

* Move RGBLight animations to data driven, W

* Move RGBLight animations to data driven, X

* Move RGBLight animations to data driven, Y

* Move RGBLight animations to data driven, Z

* Fix incorrect placement

* Fix build failures and mismatches
2023-08-23 22:11:39 +01:00
..
keymaps Remove useless line continuations (#19399) 2022-12-30 11:48:05 +11:00
config.h Move RGBLight animations to data driven (#21635) 2023-08-23 22:11:39 +01:00
ds1307.c
ds1307.h
glcdfont_d48.c
info.json Move RGBLight animations to data driven (#21635) 2023-08-23 22:11:39 +01:00
readme.md
rules.mk OLED: driver naming cleanups (#21710) 2023-08-15 10:30:34 +01:00
taphold.c
taphold.h Fix some more missing #pragma onces (#20241) 2023-03-23 17:21:37 +00:00

D48

Proton C based handwired 40% keyboard

A Proton C based handwired 48 key keyboard with 2 rotary encoders, I2C OLED, WS2812 strip, buzzer & clock!

  • Keyboard Maintainer: Andrew Dunai
  • Hardware Supported: Proton C handwired

Make example for this keyboard (after setting up your build environment):

make handwired/d48:default

Details

  • Proton C based handwired keyboard
  • 2x custom 1.25mm stainless steel plates
  • Kailh Choc White (clicky)
  • 2x rotary encoders
  • 0.91" 128x32 I2C OLED
  • Small buzzer mounted inside (still waiting for the AST1109MLTRQ boys)
  • WS2812 strip (14 LEDs)
  • DS1307 I2C module real-time clock

Build process: album

Pinout

D48 pinout

Challenges

I'm very happy with the result, but at some point Proton C was driving me nuts.

I did a lot of trial and error during assembly & programming. There were a lot of yet undocumented caveats, so I'll outline them here so that you guys can avoid the same issues I had.

Matrix & encoders

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 to make my matrix 12x5 and wire encoders' push buttons as 2 extra keys, thus making it a total of 50 (12x4 + 2 encoders). I used 2 columns (9 & 12) for those buttons.

So, a first row actually has 2 buttons on columns 9 & 12 (because encoders are located near those columns). Encoders' push buttons are also configured via QMK's keymap.

Check out the d48.h & config.h for pins used & keymap macro definition.

I2C/OLED

Most of the stuff worked out of the box, except me choosing the right pins for my OLED.

On the Proton C pinout, there are 3 labels for I2C and for some reason there are 2 pairs of SDA/SCL for I2C1 channel: B8/B9 (rear left side) and B6/B7 (rear right side). I'm not sure if this is a mistake or if I was doing something wrong. So initially I picked B8/B9 which were not working. When I switched to B6/B7, things worked like a charm. Later I used B9 for matrix row. No issues so far.

Oh, and by the way, while using B8/B9, keyboard was sometimes swallowing quick keypresses. I believe this was due to I(2)C timeouts (because incorrect pins were used for OLED).

Buzzer

It turns out once you switch on AUDIO_ENABLE, you cannot use A4 & A5 because they interfere with the buzzer. My guess is that buzzer uses DAC channels (not sure why both).

I couldn't find this in documentation. Honestly, Proton C has almost zero documentation and this was the biggest challenge. Anyway, apart from almost going crazy from those challenges, I really liked it!

RGB

I used pin A15 for my WS28128 RGB strip.

D1307 real-time clock

Connecting DS1307 RTC was a piece of cake: same I2 pins as OLED (SDA/SCL), GND to GND and power to Proton C VUSB pin (5v).

Other issues

  • B5 could not be used for matrix.
  • TAP_CODE_DELAY had to be increased to 10 to fix tap_code(KC_VOLU/KC_VOLD) calls being swallowed in encoder callback.
  • 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.

Conclusion

I had a lot of fun. The layout was inspired by the Planck THK. Feel free to ask any questions!