Author Topic: Choosing mcu for custom keyboard  (Read 10664 times)

0 Members and 1 Guest are viewing this topic.

Offline Azam385

  • Thread Starter
  • Posts: 1
Choosing mcu for custom keyboard
« on: Sat, 17 July 2021, 12:00:22 »
Hi everyone I’ve decided to take on building a custom keyboard including designing the pcb. I’m a new college grad and my new job requires knowing how to use Altium so I think this is a good project to help me get familiar.   


I’m starting by selecting the mcu that I’ll use for the design and plan on using QMK. I’ll say I’ve never built a keyboard just own a ducky so I’m trying to figure out what features the mcu needs. I see most people using the atmega32 or stm32 but I’d really like to use a TI chip in the design.   


Can anyone help point me to the correct device that TI offers or just the features the mcu needs to be compatible with QMK. I’m thinking cortex-M4 architecture with usb capability will work but don’t know what else I should look for. I also plan on adding rgb and rotary encoders so I need a slightly higher pin count.   


Thanks for any help and let me know what you guys think!

Offline Tom_Kazansky

  • Posts: 409
  • Location: Vietnam
  • Oblivion Knight
Re: Choosing mcu for custom keyboard
« Reply #1 on: Sat, 17 July 2021, 22:55:26 »
you're new to PCB design?
this tutorial https://github.com/ruiqimao/keyboard-pcb-guide helped me getting started, you should check it out.

about the MCU, I have only worked with ATmega32u4 so I can't say about orthers.

Offline Findecanor

  • Posts: 5036
  • Location: Koriko
Re: Choosing mcu for custom keyboard
« Reply #2 on: Sun, 18 July 2021, 07:20:37 »
For ARM-based microcontrtollers, QMK depends on the realtime OS "ChibiOS". ZMK depends on "Zephyr".
If the realtime OS has support for the USB device on the microcontroller, it should be supported by the firmware.

You will have to do some C programming, but hopefully not that much.
It should consist mostly connecting the GPIO pins to the columns and rows in the keyboard matrix the firmware uses.
The convention here is that a "column" pin gets strobed by shorting it to GND, and that "row" pins have pull-up resistors (usually internal) and are read.
QMK has support for several LED controllers over I²C, and most µC need to use special pins for that. Each rotary encoder needs two GPIO pins.

Offline Pylon

  • Posts: 852
Re: Choosing mcu for custom keyboard
« Reply #3 on: Sun, 18 July 2021, 13:44:43 »
https://beta.docs.qmk.fm/developing-qmk/c-development/compatible_microcontrollers

As far as I'm aware no TI processors are currently supported in ChibiOS or QMK. Not sure what the situation is with ZMK.

Vast majority of custom keyboards are on Atmega32u4, though it has its limitations in terms of flash space and number of GPIO pins (it really doesn't work for larger than a TKL). A few larger boards use AT90USB, which has much more available flash, EEPROM, and GPIO. On the ARM side STM32F072 and STM32F303 are popular, with some boards also using F103 and F411.