Skip to the content
4 layers85 × 26.5 mmLeyden Jar, the printed circuit board in 3D

A modernized controller PCB for the Brand New Model F and Beam Spring keyboards

Size
85 × 26.5 mm
Copper layers
4
Thickness
1.59 mm
Parts
92
Nets
99
Pads
356
Tracks, vias
1,046, 103
Pours
4
Routed
Yes
KiCad
KiCad 6 (file 20211014)
Created
24 Apr 2023
Updated
7 Nov 2026

Overview

Leyden Jar is an open-source printed circuit board by mymakercorner, from the mymakercorner/Leyden_Jar repository on GitHub, published under the GPL-3.0 licence. It is a 4-layer board of 85 × 26.5 mm with 92 parts on 99 nets, routed with 1,046 tracks and 103 vias.

It is built around the RP2040, W25Q16JVUXIQ and LMV339D, with the ADP122AUJZ-3.3-R7, USBLC6-2SC6 and B3U-1000P among its other parts. Its parts include 50 resistors, 20 capacitors, 8 ICs, 4 connectors and 4 switches. It belongs with the keyboards and input boards and the RP2040 boards of this library.

Main components

8

README

README.md

The Leyden Jar

Leyden Jar render front Leyden Jar render back

The Leyden Jar is a modernized controller PCB for the Brand New Model F and Beam Spring keyboards. The name is taken from the first ever (crude) capacitor ever invented.

Please have a look at the Keebtalk here for more details on the development process. This repository is the central hub of several other repositories and links that may be need to build or dowloand software firmware and tools, see chapter below for more details.

Useful links

Leyden Jar Diagnostic Tool

The Leyden Jar Diagnostic Tool is an application meant to perform troubleshooting and inspection on Leyden Jar controller firmwares.

Github link: https://github.com/mymakercorner/Leyden_Jar_Diagnostic_Tool

Windows binaries are also available from this Leyden Jar Diagnostic Tool Github page.

QMK/VIAL Firmware Source Code

Firmware source code is available in my forked vial-qmk repository in the leyden_jar branch.

Github link: https://github.com/mymakercorner/vial-qmk/tree/leyden_jar

Prebuilt firmwares are also available from this forked vial-qmk Github page.

How the project started

It was in April 2022 when Ellipse of Model F Labs asked in Geekhack and Deskthority forums if someone was up to make a new RP2040 based controller PCB that could replace the Xwhatsit controller that it was using in it's Brand New Model F and Beam Spring keyboards.

I never worked on capacitive sensing technologies and never used RP2040 MCUs before. Also the amound of work looked quite big as a both a new PCB design and firmware code had to be made from the ground up. But this is something that crossed my mind for quite a long time before and was excited to take this challenge.

The Leyden Jar PCB is the result of one year of work trying to fullfill this little dream of mine!

Project status

Several revisions have been designed.

Revision 1 has been used to do a first battle test of the design on real boards. My own Brand New Model F77 keyboard has first been used to validate the PCB design and the firmware.
Later some controllers have been sent to Ellipse for further testing/development on one of it's Brand New Beam Spring Full Size Round 2 keyboards.

Newer revisions modifications are rather minor. But while revision 1 was already working great I wanted to tidy up things a bit and also Ellipse had a few requests that were nice to have implemented.

Note

At the time of this writing the firmware code has been adapted from revision 1 without any validation and the revision 2 PCB is still not manufactured and tested.

Licence

In order to give tribute to Tom Wong-Cornall, the inventor of the IBM Capsense USB keyboard controller, with the exceptions noted below, everything is provided with the same GPLv3 licence he used at the time.

Exception for some 3D models

Two 3D model files, taken from SnapEDA website, that are using the Creative Commons Attribution-ShareAlike 4.0 International License (CC BY-SA) with the Design Exception 1.0 licence:

  • B3U-3000P--3DModel-STEP-56544.STEP
  • TYPE-C-31-M-12--3DModel-STEP-56544.STEP

Use at your own risks

This PCB design and software are provided for free and I am not paid for this work.
Although it worked for my Model F77 and one of Ellipse's Beam Spring keyboard it may not for you or even worse can render your keyboard unusable.
By using this material you agree that I will not be liable for any problems you may have.

Features

Hardware

  • 4 layers PCB designed using Kicad 6.x.
  • RP2040 MCU.
  • 2MB external QSPI XIP flash memory.
  • USB C receptacle.
  • ESD protection of both VBUS and D+/D- lines,
  • Overcurrent protection with a resettable fuse.
  • EMI shielding using a ferrite bead.
  • All matrix IO pins rugged with 1K current limit resistors.
  • Status leds driven by an I2C IO expander chip.
  • 3X2 header for:
    • Solenoid driver.
    • Future PS2 AT daugherboard.
  • 3x2 header for:
    • SWD debugging.
    • External I2C connection.

Software

  • QMK VIAL firmware (VIA compatible by providing vial.json file).
  • Solenoid support.
  • 3 QMK layers support (can be much more if user want, we have little to no memory constraints).
  • Custom USB raw HID protocol support for basic monitoring/debugging using an external tool.
  • Early support for following keyboards:
    • Brand New Model F77 (tested on my own F77).
    • Brand New Model F62 (untested).
    • Brand New Beam Spring Full Size Round 2 (tested by Ellipse).
    • Brand New Beam Spring SSK (untested, matrix definition may be totally wrong).

Repository content

pcb/leyden_jar_controller

Contains Kicad 6.x project files.

production_files/leyden_jar_controller/bom

Contains an HTML interactive BOM, very handy for people wanting to solder the components themselves.

production_files/leyden_jar_controller/jlcpcb

Contains everything needed to manufacture and assemble the controller at JLCPCB.
The 4 buttons and 2 3x2 headers are not listed in the BOM.

images

Images content, mostly for this repository documentation.

Revision History

Revision 1

First version, not available in this repository.

Revision 2

  • Added support for 2 additional columns.
  • Now uses only one I2C bus.
  • Removed external I2C EEPROM chip (keyboard state is saved in QSPI flash memory).
  • Solenoid now driven by RP2040 IO pins (was done through I2C IO expander before).
  • Added early future support to PS/2 daughterboard using existing solenoid connector.
  • Routing improvements.

Revision 3

  • Last free pin of the solenoid connector now outputs 3.3V.
  • Top left connector rework:
    • Now a 3X2 connector.
    • Left 3 pins are ground and SWD pins.
    • Right 3 pins are 3.3V and I2C pins (to drive potential future I2C devices).
  • Run/Bootsel buttons rework:
    • added 2 additional buttoms on the bottom of the PCB.
    • footprints reworked to easily short pads with a flat screwdriver.
    • buttons not populated by default.
    • B3U-1000P variants (top press version) listed in project.
    • still comatible with B3U-3000P variants (side press version).
  • Routing improvements.

Comparison with existing controllers

To my knowledge all existing controllers we see nowadays in our Model F or Beam Spring keyboards are derivatives of 2014 Tom Wong-Cornall work for the Xwhatsit controller PCB.
As a result they share the same capacitive detection principle and the Leyden Jar controller is no different in that regard. Tom Wong-Cornall explained it in great details in this link.

The first obvious difference is the use of a modern RP2040 MCU instead of the old good Atmega 32U2.
It is a cheap MCU and still widely available during the current component shortage period.
But it is the features that it was giving that resulted in a significantly different way to implement the well known capacitive detection principle.

  1. PIO feature
    The timing of pulsing the matrix colums and reading the rows are crutial to have consistent/reliable results.
    On Xwhatsit accurate timings are ensured by writing all this critical code part in Atmega assembler.
    With the Leyden Jar PIO is used instead with no CPU intervention during the whole matrix scanning process.
    We can safely manage much tighter timings using PIO than using the CPU, this allowed me to have significantly more aggressive/shorter timings and reduce the time it takes to make a full matrix scan: it takes 40us to strobe a single column for a total of 640us to scan 16 columns.

  2. Available memory
    There is 264KB of RAM available on RP2040 vs 1KB on Atmega32U2.
    External flash is usually 2MB vs 32KB.
    No more need to count how many memory bytes you have left when you're coding the firmware, you'll always have memory available when you'll need it; this makes firmware programming significantly easier and opens up new possibilities.

  3. Available GPIOs
    There are 30 available on RP2040 vs 22 on Atmega32U2.
    As a result we have enough IO pins to directly drive the matrix scanning system, removing the need of the IO expander chips we find in existing controllers.
    The Leyden Jar can drive up to 18 columns instead of 16 on current controllers, making big keyboards designs like F122 less of a challenge.
    All 30 GPIO pins are used in this design, nothing is lost ;)

  4. Working voltage
    It is 3.3V on RP2040 vs 5V on Atmega32U2.
    Old controllers like Atmegas were very often working at 5V to give them good noise immunity.
    On moderm ARM controllers working at lower voltages, noise becomes a problem that needs to be taken care off. If you add the fact that pulsing columns at 3.3V will give smaller voltage spikes than doing that with 5V, minimizing noise is even more important for this particular case.
    This is why the Leyden Jar PCB is a 4 layers design, with all critical traces all on the top layer with no vias, a solid ground place on the layer just below and the last 2 layers containing the power planes and non critical traces.
    Traces are also curved. While it aestetically pleasing it is also done to limit reflection problems when pulsing the columns (curved traces are often used in high frequency applications PCBs).

  5. I2C usage
    This protocol is used instead of SPI to minimize IO pin usage, only 2 GPIO pins are used to drive both a DAC chip (for the voltage reference) and a IO expander chip (mostly used for driving the 3 LEDs).

PS2 AT to USB daughterboard PCB

PS2 AT Daughterboard front PS2 AT Daughterboard back

This new sister project is a daughterboard that connects into the IO expander of the Leyden Jar controller.
This extension aims in the future to provide PS2 AT compatibility.
As the same IO expander port is also used for the solenoid connector you will not be able to use both solenoid and PS2 AT extensions at the same time.

pcb/ps2_at_daughterboard

Contains Kicad 6.x project files.

production_files/ps2_at_daughterboard

Contains everything needed to manufacture and assemble the board at JLCPCB.

WARNING!!!
This project is in it's very early stage.
We have yet to manufacture PCBs, test them and write software for them.

Special thanks

If people as still able nowadays to type on a Model F or Beam Spring keyboard, either old good or brand new, it is thanks to the hard work and dedication of several people of this great keyboard community.

Tom Wong-Cornall

The first who designed a controller replacement for the IBM Model F and Beam Spring keyboards, the IBM capsense USB controller (Xwhatsit). Most if not all existing controllers are based on it's original design.

Ellipse of Model F Labs

He manufactured the Brand New Model F and Beam Spring keyboards, it is always a great pleasure to type on my Model F77 board.

Wcass

He made many variants of the original XWhatsit controller and a lot of switch plate PCB designs for Ellipse.

Pandrew

He also made variants of the XWhatsit and Solenoid controllers and worked on the QMK/VIA port of original Tom Wong-Cornall firmware, improved it and maintained it for all those years.

For all those people and many I forgot to mention, thank you!

Parts

92
QtyValueFootprintReferences
241000Resistor_SMD:R_0402_1005MetricR10, R11, R14, R15, R16, R18, R20, R21, R22, R23, R24, R26, R28, R29, R30, R31 +8
14100nCapacitor_SMD:C_0402_1005MetricC1, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C19, C20, C21
1110kResistor_SMD:R_0402_1005MetricR1, R6, R8, R12, R17, R25, R33, R36, R38, R40, R41
947kResistor_SMD:R_0402_1005MetricR7, R9, R13, R19, R27, R35, R37, R39, R50
4B3U-1000PLeyden_Jar:SPST_B3U-1000PSW1, SW2, SW3, SW4
21uCapacitor_SMD:C_0402_1005MetricC2, C3
227Resistor_SMD:R_0402_1005MetricR2, R3
230pCapacitor_SMD:C_0402_1005MetricC14, C15
24.7uCapacitor_SMD:C_0805_2012MetricC16, C17
25.1kResistor_SMD:R_0402_1005MetricR43, R44
2LMV339Leyden_Jar:TSSOP-14_4.4x5mm_P0.65mmU2, U6
112MHzrico_footprints:Crystal_SMD_3225-4Pin_3.2x2.5mmY1
14.7kResistor_SMD:R_0402_1005MetricR42
17.5kResistor_SMD:R_0402_1005MetricR45
1ADP122AUJZ-3.3-R7 Leyden_Jar:TSOT-23-5U4
1CBW201209U121TResistor_SMD:R_0805_2012MetricFB1
1Ext ConnLeyden_Jar:PinHeader_2x03_P2.54mm_HorizontalJ4
1MCP4716A0T-E/CHLeyden_Jar:SOT-23-6U10
1PCA9557PW,118Leyden_Jar:TSSOP-16_4.4x5mm_P0.65mmU8
1RP2040Leyden_Jar:QFN-56-RP2040U5
1Rico_LogoLeyden_Jar:Rico_LogoH3
1SWD/I2CLeyden_Jar:PinHeader_2x03_P2.54mm_HorizontalJ3
1Switch matrix connectorLeyden_Jar:Switch_Matrix-ConnectorJ2
1TopLeftLeyden_Jar:Mounting_HoleH1
1TopRightLeyden_Jar:Mounting_HoleH2
1USBLC6-2SC6Leyden_Jar:SOT-23-6U3
1USB_C_Receptacle_USB2.0Leyden_Jar:USB_C_Receptacle_HRO_TYPE-C-31-M-12J1
1W25Q16JVUXIQLeyden_Jar:USON8_3x2mmU1
1mSMD110-16VFuse:Fuse_1210_3225MetricF1

More from mymakercorner/Leyden_Jar

1
  • 2 layers35 × 26.5 mmPs2 pcb, the printed circuit board in 3D

    Ps2 pcb

    mymakercorner/Leyden_Jar

    A modernized controller PCB for the Brand New Model F and Beam Spring keyboards

    19 parts17GPL-3.0

Similar boards

  • 4 layers128 × 55 mmCluster2HDMI, the printed circuit board in 3D

    Cluster2HDMI

    vkar9898/Cluster2HDMI

    A project dedicated to utilising a 7 inch LCD panel as a standalone monitor via a HDMI-parallel RGB converter and a Pico 2 fitted on a custom PCB

    96 parts2MIT
  • 4 layers100 × 100.1 mmMaster-4layers, the printed circuit board in 3D

    Master-4layers

    DepBo/AquaCare

    AquaCare là hệ thống theo dõi và quản lý nuôi trồng thủy sản, gồm ứng dụng web, ứng dụng di động và backend kết nối dữ liệu cảm biến với thiết bị trong ao/bể.

    135 parts1
  • 2 layers161.1 × 95 mmLibre MIG, the printed circuit board in 3D

    Libre MIG

    JustEnoughDucks/LibreMiG-S

    Open Source Joystick/Open Source Flightstick that combines the Olukelu Gimbal with a MiG-31 inspired Flightstick designed for Star Citizen or space simulators

    279 parts24
  • 4 layers134.4 × 58 mmICE40-Board, the printed circuit board in 3D

    ICE40-Board

    SyedAnasAlam/Ice-Board

    A PCB for the Lattice ICE40 FPGA

    83 parts1
  • 2 layers120 × 115 mmEnergy meter, the printed circuit board in 3D

    Energy meter

    Ru0110/EE344

    Auto-dialling Alarm System for Temperature and Humidity Monitoring

    150 parts
  • 2 layers34 × 107.5 mmEnvOpenMouse, the printed circuit board in 3D

    EnvOpenMouse

    Envious-Data/EnvOpenMouse

    An Open-source mouse for the UK market.

    74 parts6MIT

Questions

How big is the Leyden Jar PCB?

It measures 85 × 26.5 mm and has 4 copper layers, 1.59 mm thick.

What parts does the Leyden Jar use?

92 parts, built around the RP2040, W25Q16JVUXIQ, LMV339D and ADP122AUJZ-3.3-R7. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Leyden Jar KiCad files?

From the mymakercorner/Leyden_Jar repository on GitHub, at the commit this page was made from: the board is pcb/leyden_jar_controller/Leyden_Jar.kicad_pcb and its schematic pcb/leyden_jar_controller/Leyden_Jar.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Leyden Jar design in my own project?

Its repository publishes it under the GPL-3.0 licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).