Seeed Fusion DIY XIAO Mechanical Keyboard Contest 2023に参加しました

どもども、へりかるです。
今回は、タイトルにもあるSeeed主催のメカニカルキーボードコンテストに参加して、自作キーボードを初設計しました。

完成品紹介

  • Keyboard:MEISHI v1.0 by へりかる
  • MCU:Seeed XIAO RP2040
  • KeySwitch:Alpaca、OTAXトグルスイッチ
  • KeyCaps:遊舎工房 無刻印DSAキーキャップ
もともとは遊舎工房のmeishi2展2022(オンライン)に参加する名目で、名刺サイズのものを作りはじめましたが、meishi2展には間に合いませんでした。
ただ自分が設計したものが形になるというのは、喜びもひとしおです。
今回のコンテストで上位を目指すようなユニークなものではありませんが、自作キーボード設計の第一歩を踏み出すことができました。

設計仕様

今回はキーボードコンテストのサービスを利用して、PCBの作成+部品の実装まで依頼できるPCBAをお願いしました。
今回のコンテスト参加条件として、Seeed XIAOシリーズのマイコンボードを実装する必要があります。
Seeed XIAOシリーズは現在、下記の5種類が販売されています。
  • Seeed XIAO SAMD21
  • Seeed XIAO RP2040
  • Seeed XIAO BLE nRF5284
  • Seeed XIAO BLE nRF5284 Sense
  • Seeed XIAO ESP32C3
MCUの違いによってそれぞれの機能や特性に違いがあり、今回私はSeeed XIAO RP2040を使用しました。
Seeed Studio XIAO RP2040 - Supports Arduino, MicroPython and CircuitPython
NotePins are not included in this product. If you require the pins, please visit the following page to make a purchase. Alternatively, you can select the pins from the 'Also Add' section.Seeed Studio XIAO Series are diminutive development boards, sharing a similar hardware structure, where the size is literally thumb-sized. The code name "XIAO" here represents its half feature "Tiny", and the other half will be "Puissant".Seeed Studio XIAO RP2040 is compatible with the Raspberry Pi RP2040 ecosystem as they share the same RP2040 chip. It supports multiple languages including C / MicroPython / CircuitPython. This will be a great tool for you to get started with MicroPython. FeaturesHigh Performance: Powered by Raspberry Pi 2040 chip, dual-core operating up to 133 MHz, equipped 264KB of SRAM, and 2MB of onboard flash memoryUltra-small Design: 21 x 17.5mm, Seeed Studio XIAO series classic form-factor, suitable for wearable devicesMultiple Development Interfaces: 2x buttons, 11x digital / 4x analog pins, 1x I2C interface, 1x UART port, 1x SPI port, and 1x SWD Bonding pad interfaceMultiple Develop Platform: Support Arduino / Micropython / CircuitPython development, friendly for beginners, satisfied for electronics enthusiastsPerfect for Production: Breadboard-friendly & SMD design, no components on the back  RP2040 is the debut microcontroller from Raspberry Pi. It brings signature values of high performance, low cost, and ease of use to the microcontroller space. Seeed Studio XIAO RP2040 is based on the RP2040 chip and wrapped in a compact size with multiple interfaces like other products from the Seeed Studio XIAO series, and it's compatible with the Seeed Studio XIAO expansion board. In addition to the powerful CPU, the Seeed Studio XIAO RP2040 has 264K SRAM and 2MB of Flash on board. Some PINs have various functions. Moreover, Seeed Studio XIAO RP2040 supports the USB Type-C interface which can supply power and download code. 1 Reset button, 1 BOOT button, 1 user-programmable RGB LED, 1 power LED, 2 status indicators, and 1 user LED are on board, allowing developers to debug their code very easily.The robust performance makes it perfect for machine learning applications, and the tiny size allows it to be used in wearable devices, not just for prototypes but the mass production. Starter Kit with free Course for all Electronics Neophytes and EnthusiastsSeeed Studio has provided the Grove Starter Kit along with free and detailed courses for you quickly get started with microcontrollers and electronics, regarding all the Seeed Studio XIAO boards, promising you a great learning experience.Not only programming but also electronics knowledge is not required, you will be taken step by step, from understanding the basic concepts to exercising the simple projects individually, finally being able to build complex, interesting, wearable projects on your own, owing a practical electronic product prototype from the course.You can access the Seeed Studio Grove ecosystem by connecting it to the compatible Seeed Studio XIAO expansion board. We have developed more than 400 Grove modules, covering a wide range of applications that can fulfill various needs. For example, you can make an IR Remote Control Fan by connecting the Seeed Studio XIAO RP2040 with an expansion board, a Grove IR(Infrared) Receiver, a Grove - Servo, and a Grove - Mini Fan v1.1. Get started and explore the infinite possibilities of the Seeed Studio XIAO series!Furthermore, Seeed Studio XIAO RP2040 is friendly to the communities for its strong software compatibilities, which support Arduino, Micropython, and CircuitPython. Except for the software, flexible I/O allows it to speak to almost any external device. You can also use the Thonny editor to program as if you were using Raspberry Pi Pico. By the way, we've set up a tinyml channel on our Discord server, please click to join for 24/7/365 making, sharing, discussing, and helping each other out.We already have 5 XIAO products based on different solutions in the Xiao family, to help you better understand the differences and choose the most suitable part for your projects, please refer to the Seeed Studio XIAO Series Page.Seeed has rich products and resources based on the RP2040 chip:Raspberry Pi PicoGrove Shield for Pi PicoGrove Starter Kit for Raspberry Pi PicoWio RP2040 ModuleWio RP2040 Mini Dev BoardCANBed RP2040-CAN Bus development boardArduino Nano RP2040Maker Pi RP2040For more details, you can visit our Seeed Studio RP2040 Microcontroller family. SpecificationParameterDescriptionCPUDual-core ARM Cortex M0+ processor, flexible clock running up to 133 MHzStorage264KB of SRAM, and 2MB of onboard Flash memoryI/O PINs11 digital pins, 4 analog pins, 11 PWM PinsInterface1 I2C interface, 1 UART interface, 1 SPI interface, 1 SWD Bonding pad interfacePower supply & Downloading interfaceUSB Type-C interfaceLEDs:1 user LED, 1 power LED, two LEDs for serial port downloading, 1 RGB LEDButton1 RESET button, 1 BOOT buttonPower PadsFor the battery power supplySoftware compatibilitySupport Micropython / Arduino / CircuitPythonCoverProjection cover for protecting the circuitDimensions21x17.5 mmAttentionAll the I/O pins are 3.3V, please do not input more than 3.3V, otherwise, the CPU may be damaged. ApplicationWearable devicesRapid prototyping (directly attached to the expanded PCB as a minimal system)Perfect for all the projects that need mini ArduinoUSB development (USB to multi-channel TTL/USB host mode, etc.)DIY keyboardHardware PinoutPart ListSeeed Studio XIAO RP2040 Microcontrollerx1Check five pieces of 7-pin male header compatible with Seeed Studio XIAO Series Board! FAQDoes the XIAO microcontroller come with a pin header?Currently, all XIAOs don't come with a pin header. You can purchase them through Also add or pin header.
現在、自作キーボードでよく使用されるProMicroやATMEGA32シリーズが、半導体不足のあおりを受けて価格高騰しています。
その代替として、RP2040やラズパイPicoを使用した自作キーボードもよく見かけるようになってきました。
上記も含め、今回の設計仕様としては下記を設定しました。
  • 名刺サイズ(55mm x 91mm)
  • MX Cherryサイズのスイッチを使用する
  • KailhホットスワップコネクタをPCBAで実装してもらう
  • Seeed XIAO RP2040をPCBAで実装してもらう
  • トグルスイッチを使う
  • ロゴやQRを入れる

FusionPCBでのPCBA作成

設計内容はこの記事では省略しますが、KiCadを使用してデータを作成しました。
そして今回はコンテストのサービスを利用し、FusionPCBで基板作成と部品実装を依頼しました。
このコンテスト用には、PCBとPCBA2枚までが無料になるクーポンが発行されました、太っ腹なサービスです。
ガーバー作成などはFusionPCBの公式Webサイトをはじめ多数情報がありましたので、スムーズに発注まで進めました。
発注後にデータを確認してもらい、一部設計の不備がありましたが、下記のように丁寧な内容でコメントをいただきました。
スルーホールの穴径を小さくしてしまっており、Seeed XIAO RP2040を実装するためのピンヘッダが入らないという内容でした
ガーバーデータの再提出後は順調に後工程へ進み、3週間ほどで発送連絡がありました。

ビルド

ということでPCBとPCBA(2枚分)が到着しました。
PCBAは予定通り2枚分、PCBは6枚届きました
発注から実際に到着するまでは下記のとおりでした。
  • 9/6:発注
  • 9/7:データ不備の連絡をいただき再度ガーバーアップデート
  • 9/8:データ審査完了
  • 9/15:PCB製造、部品調達完了
  • 9/23:PCBA実装完了
  • 9/25:発送
  • 10/1:受け取り
黄色レジストを指定、綺麗な発色です
ロゴのHelicalの文字はマスクして銅箔が見えるように、うまくいきました
表側は銅レイヤーをいれていなかったため、表裏でレジストの見え方が違ってしまいました、残念。
今回の基板でやりたかったこととして、トグルスイッチを使うという仕様があります。
これは単純にトグルスイッチの感触が好きなのと、秋月のセールで購入したものがいっぱいあるので消化したいという目的です。
小型のトグルスイッチで、XIAO RP2040やキーキャップともサイズ感がマッチしていい感じです。
今回はPCBAでマイコンもソケットも実装されているので、ものの数分で組み上がりました。
自分で設計したものが組み上がるのは感動します。
マイコンへのファームウェアは、Kermiteを利用しました。
こちらはブラウザ上でファームウェア書き込みやキーマップ変更が完結、そして何よりRP2040やラズパイ、そして今回のSeed XIAO RP2040にも対応したサービスです。
ファームウェア作成は自作キーボードの大きなハードルの1つですが、こういったサービスによってはじめの第一歩を踏み出す人が増えるのは素晴らしいことです。
トグルスイッチを使って、2進法で4レイヤーを切り替えられるようにしてみました(上の動画参照)

初の基板発注ということで、基板設計からの流れを一通り体験して経験値UPできました。
次回はさらに自分の理想が設計に反映できるよう、色々試していきたいと思います。
ではでは~