Is CircuitPython Suitable for Mechanical Keyboards?

Is CircuitPython suitable for mechanical keyboards? Yes, absolutely!  KMK firmware for mechanical keyboards is writen in CircuitPython and we use it of ANAVI Macro Pad 10 and Knobs.

ANAVI Knob 1, ANAVI Knobs 3 and ANAVI Macro Pad 10

1991 was a remarkable year for computer science and the open source movement. On February 20th, Guido van Rossum released the first version of Python and then, several months later on August 25th, then 21-year old Linus Torvalds announced the first version of what would become Linux. Now, 31 years later, both projects are more popular than ever!

ANAVI Knob 1, ANAVI Macro Pad 10 and ANAVI Knobs 3

Python is a general-purpose programming language. It supports both object-oriented programming and structured programming which makes Python suitable for a broad range of tasks. MicroPython and CircuitPython are Python 3 variants optimized for constrained devices, primarily microcontrollers. MicroPython appeared in 2014. Three years later, in July 2017, MicroPython was forked into another open source project called CircuitPython. There are some differences, most notably that each of them supports a different set of hardware devices.

CircuitPython is very simple to use. The idea is for it to be accessible to students and beginners. Its development is supported by Adafruit Industries. CircuitPython runs on Raspberry Pi RP2040 microcontrollers and, as you know from our previous update, ANAVI Macro Pad 10, ANAVI Knobs 3 and ANAVI Knob 1 all rely on the XIAO module from Seeed Studio with RP2040.

ANAVI Macro Pad 10

A classical mechanical keyboard consists of keys (mechanical switches with keycaps) wired to a microcontoller. There are a huge variety of models, variants, and manufacturers of mechanical switches. For example, the ANAVI Macro Pad 10 comes with Gateron red mechanical switches, but the hot-swap sockets allow you to actually use any other kind of Cherry MX compatible switch. Firmware on the microcontroller maps the keys to specific characters.

Hot-swap mechanical switches on ANAVI Macro Pad 10

In general, a microcontoller has a limited number of GPIO (general-purpose input/output) pins, so the keys are most commonly organized in a matrix. For example, ANAVI Macro Pad 10 is designed with a three-by-three matrix which only requires six GPIO pins instead of nine. The role of the firmware is to detect when a key is pressed and then send a specific character or sequence of characters (i.e., a macro) to the computer.

Front and back of ANAVI Macro Pad 10

Ease of use combined with the power of the RP2040 makes CircuitPython a very good programming framework for implementing mechanical keyboard firmware. Of course CircuitPython is not as fast as C. However this is not a problem for the RP2040 because it is a dual-core Arm Cortex-M0+ processor with a clock running up to 133 MHz. Furthermore RP2040 has 264kB on-chip SRAM – more than enough for keyboard firmware. Thanks to the powerful microcontoller, it is easy to get started and customize keyboard behavior directly by altering the CircuitPython source code. There is no need to install complex toolchains or to cross-compile the source code. With KMK, it is easy to edit the source code in CircuitPython on pretty much any operating system, no matter if you are a Microsoft Windows, MacOS or a GNU/Linux user.

Of course, since ANAVI Macro Pad 10, ANAVI Knobs 3 and ANAVI Knob 1 are entirely open source projects, you have the freedom to replace the default firmware with whatever you like, no matter if it is KMK, QMK or anything else!

You may also like

ANAVI Macro Pad 10 and Knobs are Here!

One, two, three new products! After several months of development we are happy to present you 3 new open source hardware mini mechanical keyboards and knobs. The crowdfunding campaign started on Monday!

ANAVI Knob 1, ANAVI Knobs 3 and ANAVI Macro Pad 10

ANAVI Macro Pad 10, ANAVI Knobs 3 and ANAVI Knob 1 all come with gold-plated black printed circuit boards, Raspberry Pi RP2040 microcontrollers, USB-C connector and clickable rotary encoders. The popular open source KMK firmware allows you to easily program and configure custom keyboard layouts and macros using CircuitPython.

ANAVI Knobs 3

Once again we rely on Crowd Supply for the crowdfunding. The campaign has a very modest goal of just $1 and it has been already funded. Our plan is to make the keyboards in Plovdiv, Bulgaria, EU thanks to the trusted supply chain we have established throughout the years. We hope you will jump in and help us bring these entirely open source mechanical keyboards to life!

ANAVI Knob 1, ANAVI Macro Pad 10 and ANAVI Knobs 3

You may also like

ANAVI Macro Pad 10 and Knobs Coming Soon

With Crowd Supply we are preparing a new crowdfunding campaign for 3 open source hardware mechanical keyboards: ANAVI Macro Pad 10, ANAVI Knobs 3 and ANAVI Knob 1.

ANAVI Macro Pad 10, ANAVI Knobs 3 and ANAVI Knob 1

There are many common things between these 3 mini mechanical keyboards:

  • Seeed XIAO RP2040 – a power module with USB-C and Raspberry Pi RP2040 MCU from Seeed Studio
  • Rotary encoders
  • KMK – an open source firmware for mechanical keyboards written in CircuitPython
  • Open source hardware designed with the free and open source software KiCad

Subscribe at our pre-launch page at Crowd Supply to be the first to know when we launch the crowdfunding campaign!

You may also like