Author Topic: Choosing mcu for custom keyboard  (Read 4147 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: 4989
  • 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.
Man must shape his tools lest they shape him
-- Arthur Miller

Offline Pylon

  • Posts: 851
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.

Offline Winter_Elliott

  • Posts: 1
  • Location: USA
Re: Choosing mcu for custom keyboard
« Reply #4 on: Tue, 20 June 2023, 14:14:11 »
Hey there, congrats on your decision to build a custom keyboard! It's a great project to get familiar with Altium and explore your passion for electronics. As for selecting an MCU (Microcontroller Unit), you have several options. While the popular choices for keyboard designs are the Atmega32 and STM32, it's absolutely possible to use a TI chip.

For compatibility with QMK firmware, you'll want an MCU with certain features. Since you're considering adding RGB and rotary encoders, it's wise to opt for an MCU with a slightly higher pin count. Additionally, you mentioned USB capability, which is essential for keyboard functionality.

Considering your requirements, a TI chip that fits the bill could be the Tiva C Series TM4C123G. It features a Cortex-M4 architecture and offers USB connectivity. It also has a sufficient number of GPIO pins to accommodate RGB and rotary encoders.

Before finalizing your choice, make sure to cross-reference the datasheet of the MCU you select with QMK's hardware compatibility list to ensure seamless integration.
By the way, just wanted to share a quick snippet from my college experience. So, there was this one time when I had a tight deadline for a research paper, but I was struggling to find reliable sources and put my thoughts into words. That's when a friend suggested using an essay writing service called GradesFixer check here: https://gradesfixer.com/. Let me tell you, it was a game-changer! Their expert writers crafted a well-researched and polished paper that not only boosted my grades but also helped me gain a deeper understanding of the topic. The convenience and expertise they provide are invaluable for students like us. If you ever find yourself in need of academic assistance, I highly recommend giving GradesFixer a try.
Good luck with your project, and don't hesitate to ask if you have any further questions!
« Last Edit: Wed, 21 June 2023, 05:38:30 by Winter_Elliott »