# Adafruit KB2040

> Arduino Pro Micro-compatible RP2040 keyboard controller with 8 MB flash, 20 GPIO, STEMMA QT, castellated USB pads, NeoPixel, and QMK/KMK/CircuitPython support for custom mechanical keyboards.

## Quick Facts

- **Brand:** Adafruit
- **Board Type:** keyboard-pcb
- **Price:** ~$8.95
- **Product Readiness:** developer
- **CPU:** ARM Cortex-M0+ dual-core @ 125 MHz (RP2040)
- **CPU Architecture:** ARM Cortex-M0+
- **CPU Cores:** 2
- **RAM:** 264 KB SRAM
- **Flash:** 8MB SiP
- **Power:** 5V
- **Operating Voltage:** 3.3V
- **Dimensions:** 35 × 17.8 × 4.9 mm
- **Weight:** 2.8 g

## Open Source

- **Firmware:** Yes
- **Schematics:** Yes
- **PCB Layout:** Yes

## Compatible Firmware

circuitpython, arduino, pico-sdk, KMK, qmk

## Use Cases

- iot

## Components

- **RP2040** (mcu): Raspberry Pi RP2040 dual-core ARM Cortex-M0+ at 125 MHz with 264 KB SRAM, PIO state machines, and native USB for HID keyboard emulation. — [Datasheet](https://openhardware.directory/r?to=https%3A%2F%2Fdatasheets.raspberrypi.com%2Frp2040%2Frp2040-datasheet.pdf&ref=openhardware.directory&product=adafruit-kb2040&source=md-export)
- **WS2812B** (led): Addressable RGB LED for status and user feedback. — [Datasheet](https://openhardware.directory/r?to=https%3A%2F%2Fcdn-shop.adafruit.com%2Fdatasheets%2FWS2812B.pdf&ref=openhardware.directory&product=adafruit-kb2040&source=md-export)

## Protocols

- **I2C**: SDA: GPIO2, SCL: GPIO3
- **SPI**: MOSI: GPIO3, MISO: GPIO4, SCK: GPIO6
- **UART**: TX: GPIO0, RX: GPIO1
- **USB**

## GPIO Map

| Pin | Name | Type | Functions |
|-----|------|------|-----------|
| GPIO0 | TX — UART | UART | digital-input, digital-output, pwm |
| GPIO1 | RX — UART | UART | digital-input, digital-output, pwm |
| GPIO2 | SDA — I2C | I2C | digital-input, digital-output, pwm |
| GPIO3 | SCL — I2C | I2C | digital-input, digital-output, pwm |
| GPIO4 | D4 — GPIO | — | digital-input, digital-output, pwm |
| GPIO6 | D6 — GPIO | — | digital-input, digital-output, pwm |
| GPIO7 | D7 — GPIO | — | digital-input, digital-output, pwm |
| GPIO8 | D8 — GPIO | — | digital-input, digital-output, pwm |
| GPIO9 | D9 — GPIO | — | digital-input, digital-output, pwm |
| GPIO10 | D10 — GPIO | — | digital-input, digital-output, pwm |
| GPIO16 | SDA — I2C (STEMMA QT) | I2C | digital-input, digital-output, pwm |
| GPIO17 | SCL — I2C (STEMMA QT) | I2C | digital-input, digital-output, pwm |
| GPIO18 | SCK — SPI | SPI | digital-input, digital-output, pwm |
| GPIO19 | MOSI — SPI | SPI | digital-input, digital-output, pwm |
| GPIO20 | MISO — SPI | SPI | digital-input, digital-output, pwm |
| GPIO26 | A0 — ADC0 | ADC | analog-input, digital-input, digital-output, pwm |
| GPIO27 | A1 — ADC1 | ADC | analog-input, digital-input, digital-output, pwm |
| GPIO28 | A2 — ADC2 | ADC | analog-input, digital-input, digital-output, pwm |
| GPIO29 | A3 — ADC3 | ADC | analog-input, digital-input, digital-output, pwm |

## Available Software

- **[CircuitPython](https://openhardware.directory/r?to=https%3A%2F%2Fcircuitpython.org%2Fboard%2Fadafruit_kb2040%2F&ref=openhardware.directory&product=adafruit-kb2040&source=md-export)**
- **[QMK Firmware](https://openhardware.directory/r?to=https%3A%2F%2Fqmk.fm%2F&ref=openhardware.directory&product=adafruit-kb2040&source=md-export)**
- **[KMK Firmware](https://openhardware.directory/r?to=https%3A%2F%2Fkmkfw.io%2F&ref=openhardware.directory&product=adafruit-kb2040&source=md-export)**

## Description

## Overview

The Adafruit KB2040 — Kee Boar Driver — is a Pro Micro-footprint development board built around the RP2040 and designed specifically for custom mechanical keyboard builds. It combines the best features of three popular keyboard boards: the Qwiic / STEMMA QT connector from SparkFun's Pro Micro RP2040, the castellated USB D+/D- pads from the Elite-C, and Adafruit's own NeoPixel, 8 MB flash, and BOOT button additions.

The board provides 20 GPIO pins (18 on castellated pads plus 2 on the STEMMA QT connector) with four 12-bit ADC channels, two I2C controllers, two SPI controllers, and two hardware UARTs. A 3.3 V regulator rated at 500 mA peak powers the logic, while a jumper-selectable RAW 5 V output with either a 500 mA polyfuse or a 2 A direct connection allows keyboard matrix power.

For firmware, QMK is the most popular choice for traditional keyboard layouts, while KMK (CircuitPython-based) and CircuitPython's built-in keyboard HID library offer more accessible customisation. The RP2040's native USB means the board is a true HID device without any USB bridge chip. An RGB NeoPixel and a BOOT button serve double duty as a user LED and reset-to-bootloader mechanism.

The Pro Micro footprint ensures the KB2040 is a drop-in replacement in the many open-source keyboard PCB designs that target that pinout, greatly expanding its compatibility with community keyboard projects.

## Where to Buy

- [Adafruit](https://openhardware.directory/r?to=https%3A%2F%2Fwww.adafruit.com%2Fproduct%2F5302&ref=openhardware.directory&product=adafruit-kb2040&source=md-export) — 8.95

## Resources

- [product](https://openhardware.directory/r?to=https%3A%2F%2Fwww.adafruit.com%2Fproduct%2F5302&ref=openhardware.directory&product=adafruit-kb2040&source=md-export)
- [github](https://openhardware.directory/r?to=https%3A%2F%2Fgithub.com%2Fadafruit%2FAdafruit-KB2040-PCB&ref=openhardware.directory&product=adafruit-kb2040&source=md-export)
- [learn guide](https://openhardware.directory/r?to=https%3A%2F%2Flearn.adafruit.com%2Fadafruit-kb2040&ref=openhardware.directory&product=adafruit-kb2040&source=md-export)

## Tags

`rp2040`, `kb2040`, `mechanical-keyboard`, `pro-micro`, `qmk`, `kmk`, `circuitpython`, `stemma-qt`, `usb-c`

## Images

![Adafruit KB2040](https://nbg1.your-objectstorage.com/openhardware-directory/entities/adafruit-kb2040/bcc52e393334.jpg)
![Adafruit KB2040](https://nbg1.your-objectstorage.com/openhardware-directory/entities/adafruit-kb2040/c61f0803f3ca.jpg)
![Adafruit KB2040](https://nbg1.your-objectstorage.com/openhardware-directory/entities/adafruit-kb2040/9ce1f69b22d8.jpg)

---
[View full device page](https://openhardware.directory/devices/adafruit-kb2040)