Author Topic: KC64 Mod - Blue Pill QMK  (Read 2186 times)

0 Members and 1 Guest are viewing this topic.

Offline Xydane

  • Thread Starter
  • Posts: 2
KC64 Mod - Blue Pill QMK
« on: Sat, 13 January 2018, 17:21:59 »
Background
The KC64 keyboard is a 60% keyboard that comes in a variety of mechanical switch flavors. Furthermore, the keyboard has backlighting and PBT keycaps. Unfortunately, the first version of the keyboard was plagued by usability issues typically experienced as missing keystrokes if one typed too quickly, this issue was widely reported by users on https://www.massdrop.com/buy/kc64-mechanical-keyboard/talk. Although the EFM8UB2 microcontroller that the keyboard came with is potentially re-flashable, at the time of this writing no open-source keyboard firmware exists targeting this particular microcontroller.

Modding the Keyboard
A relatively low cost solution is to remove the EFM8UB2 microcontroller and instead use a microcontroller that is supported by the popular QMK Firmware. For this project I decided to use the popular "Blue Pill" Board that contains an STM32F103C8T6 microcontroller due to it's low cost and ready availability. The next step was to trace the key switches, diodes, and led control to their pads on the EFM8UB2 microcontroller, my results are documented in https://github.com/Xydane/qmk_firmware/blob/master/KC64/pins_kc64.txt. I attached the blue pill board to the back of keyboard using hot glue while being careful to avoid contact between any pins of the keyboard and the blue pill. I also chose a location that would allow the board to re-assemble into it's housing without modification. The following step was to solder the connections between the keyboard and the blue pill board using 32 AWG enamled copper wire, it is important that the insulation be of solderable polyurethane; I used Elektrisola PN155 32 AWG wire. The point to point connections are listed in https://github.com/Xydane/qmk_firmware/blob/master/KC64/bluepill_kc64.txt. I then modified the chibios_test keyboard to work with the pin configuration. The keymap reflects my personal preference, the function keys in particular do not correspond with the original KC64 configuration. Also I have shuffled around the right CTRL, PN, and FN keys. I flashed the firmware using an STLINK from a nucleo board.

Github Repo
Here is the github with the customized QMK firmware: https://github.com/Xydane/qmk_firmware

Offline Mr_Space_Ranger

  • Posts: 1
Re: KC64 Mod - Blue Pill QMK
« Reply #1 on: Sat, 10 March 2018, 16:44:29 »
Hi,

I too have a KC64 however very displeased with the typing experience, do you think I would be able to just swap the PCB with a GH60 and still be able to use the existing case, switches, key caps etcs?

I've spent a considerable amount of money on this Mechanical Keyboard obsession 

A standard GH60 keyboard is about $35USD

Offline fpazos

  • Posts: 29
Re: KC64 Mod - Blue Pill QMK
« Reply #2 on: Thu, 26 April 2018, 02:06:36 »
. For this project I decided to use the popular "Blue Pill" Board that contains an STM32F103C8T6 microcontroller due to it's low cost and ready availability

Github Repo
Here is the github with the customized QMK firmware: https://github.com/Xydane/qmk_firmware

Hi! I'm trying to create an 84 handwired keyboard that uses a blue pill as controller, indeed you are the only one all across the Internet that has used blue pill with qmk. I'm sure you know far more than me.
I tried the chibios_test without results (I haven't put too much hours yet) and I was thinking to use JM60 as a source to modify (uses same family and it's quite well documented) or maybe yours KC64.
I made the 1.8k resistor usb fix, I can compile and burn and little more.
Do you have uncompiled files on github? Any advice to someone that knows something about programming but almost nothing about electronic?? Resources, starting points, words of encouragement, give up an stupid idea or whatever you can say me is welcome.
« Last Edit: Thu, 26 April 2018, 02:24:18 by fpazos »

Offline Xydane

  • Thread Starter
  • Posts: 2
Re: KC64 Mod - Blue Pill QMK
« Reply #3 on: Thu, 26 April 2018, 18:32:05 »
. For this project I decided to use the popular "Blue Pill" Board that contains an STM32F103C8T6 microcontroller due to it's low cost and ready availability

Github Repo
Here is the github with the customized QMK firmware: https://github.com/Xydane/qmk_firmware

Hi! I'm trying to create an 84 handwired keyboard that uses a blue pill as controller, indeed you are the only one all across the Internet that has used blue pill with qmk. I'm sure you know far more than me.
I tried the chibios_test without results (I haven't put too much hours yet) and I was thinking to use JM60 as a source to modify (uses same family and it's quite well documented) or maybe yours KC64.
I made the 1.8k resistor usb fix, I can compile and burn and little more.
Do you have uncompiled files on github? Any advice to someone that knows something about programming but almost nothing about electronic?? Resources, starting points, words of encouragement, give up an stupid idea or whatever you can say me is welcome.

My advice would be to look at the changes made to the https://github.com/Xydane/qmk_firmware/tree/master/keyboards/chibios_test directory and compare to the original unmodifed version. Once you can compile, flash, and get your OS to detect the QMK keyboard then you can worry about wiring the board to the switches. I didn't need to do the resistor mod to my blue pill board, although from my understanding that depends on how tolerant your motherboard's USB controller is. The one issue I had throughout the process was figuring out that the default config expects the blue pill to have the stm32duino bootloader; I modified my config to not require the stm32duino bootloader, see: https://github.com/Xydane/qmk_firmware/blob/master/keyboards/chibios_test/stm32_f103_onekey/rules.mk

Hopefully that helps...

Offline fpazos

  • Posts: 29
Re: KC64 Mod - Blue Pill QMK
« Reply #4 on: Sat, 28 April 2018, 17:06:31 »
Thanks so much Xydane. I hope that's everything I need. Indeed I already had the stm32duino bootloader burnt but I found the issue that the Arduino IDE didn't recognized the bootloader, sure you have read about the perpetual bootloader fix and this, but it was a minor problem. You don't know how grateful I feel right now. When I have something I'm coming back with my progress and share it with the community.