<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Embedded on The Mind of Ignacy Kajdan</title>
    <link>https://kajdan.pm/tags/embedded/</link>
    <description>Recent content in Embedded on The Mind of Ignacy Kajdan</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Mon, 30 Nov 2026 23:19:03 +0100</lastBuildDate>
    <atom:link href="https://kajdan.pm/tags/embedded/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Katia: A PCB Redesign of the Corne Keyboard</title>
      <link>https://kajdan.pm/posts/katia-keyboard-design/</link>
      <pubDate>Mon, 30 Nov 2026 00:00:00 +0000</pubDate>
      <guid>https://kajdan.pm/posts/katia-keyboard-design/</guid>
      <description>Katia is my open-source redesign of the Corne split keyboard PCB. It keeps the original mechanical layout while adding a four-layer stackup, more deliberate USB and power routing, and interface protection.</description>
      <content:encoded><![CDATA[<p><a href="https://github.com/ikajdan/katia">Katia</a> is an open-source split mechanical keyboard featuring a four-layer PCB designed in KiCad, hot-swappable Cherry MX switches, individually addressable RGB backlighting, and QMK firmware support.</p>
<p>The project originated from the popular <a href="https://github.com/foostan/crkbd">Corne (Crkbd)</a> keyboard. While the original layout works well for me, there have also been <a href="https://github.com/foostan/crkbd/issues/265">reports of EMI-related issues</a>.</p>
<p>Over successive hardware revisions, the Corne PCB changed to accommodate different microcontrollers, introducing some design compromises. Earlier revisions used a removable Pro Micro controller module, while later versions integrated an RP2040 directly onto the PCB. This made the design more compact, but also meant routing the USB differential pair directly on the keyboard PCB rather than relying on the controller module&rsquo;s USB interface.</p>
<p>This brought additional signal-integrity and EMC considerations, particularly with a two-layer PCB stackup. With only two copper layers, maintaining a continuous ground reference plane becomes difficult when both layers are needed for signal routing and component interconnections. Interruptions in the reference plane can disrupt high-frequency return-current paths, increase loop areas, and introduce impedance discontinuities. This is especially relevant to USB differential pairs, where differential impedance, pair symmetry, and a continuous reference plane matter for signal integrity and electromagnetic emissions.</p>
<figure class="align-center"><img src="/images/katia/setup.webp" alt="The fully assembled Katia split keyboard powered on with its backlighting illuminated" loading="lazy">
</figure>

<p>Katia uses a four-layer PCB stackup, with dedicated internal ground and power distribution layers and most signal routing on the outer layers. This gives signals more predictable return paths and is intended to improve signal integrity and reduce electromagnetic interference without changing the keyboard&rsquo;s compact form factor.</p>
<h2 id="mechanical-compatibility-with-corne">Mechanical compatibility with Corne</h2>
<p>The layout has six columns and three rows on each half, with three additional thumb keys per side and two optional keys per side that can be replaced with an OLED screen. That makes up to 46 keys across the complete keyboard.</p>
<figure class="align-center"><img src="/images/katia/mechanical/case.webp" alt="One half of the Katia PCB fitted inside a black case with its switch plate installed" loading="lazy">
</figure>

<p>I wanted to keep the mechanical layout the same so that existing cases and plates could still be used. There was no reason to change those parts just because the electronics were different.</p>
<p>The focus was on redesigning the electronics while keeping the original layout and ergonomics.</p>
<h2 id="electrical-design-considerations">Electrical design considerations</h2>
<p>A keyboard can be electrically straightforward and still raise interesting PCB design questions. In this project, there is a USB interface, a microcontroller, an external flash memory chip, a chain of LEDs, and a cable connecting two separate boards. There are also exposed connectors that a user will handle repeatedly.</p>
<p>Many hobby projects focus on keeping costs low, making assembly simple, and getting something that works. Once the board is functional, things like ESD protection and testability can be easy to overlook.</p>
<p>With Katia, I wanted to take a more thorough approach, similar to what I would use in a commercial embedded design. This included paying more attention to signal return paths, power distribution, and interface protection, as well as making sure the board could be sourced, assembled, and maintained by someone else.</p>
<p>These are the same considerations that matter when designing embedded hardware that needs to be reliable, easy to manufacture, and maintainable.</p>
<h2 id="four-layer-pcb-stackup-and-grounding">Four-layer PCB stackup and grounding</h2>
<p>The main change was moving to a four-layer stackup:</p>
<div class="content-table" role="region" aria-label="Scrollable table" tabindex="0">
    <table>
        <thead>
            <tr>
                <th scope="col">Layer</th>
                <th scope="col">Main purpose</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>Top</td>
                <td>Signal routing and component placement</td>
            </tr>
            <tr>
                <td>Inner 1</td>
                <td>Ground plane</td>
            </tr>
            <tr>
                <td>Inner 2</td>
                <td>Power distribution</td>
            </tr>
            <tr>
                <td>Bottom</td>
                <td>Signal routing</td>
            </tr>
        </tbody>
    </table>
</div>
<p>The dedicated ground plane provides a reference for signals and helps keep their return paths continuous. Ground stitching vias connect the ground regions, while local pours and routing aim to limit loop areas and unnecessary coupling.</p>
<p>I also rerouted signals to avoid long parallel runs where possible. The intent was to make good return paths part of the design, rather than something left over after all the signals had been connected.</p>
<link rel="stylesheet" href="/components/pcb-inspector/style.min.2a1fc65e18054e999910c2a5ef16d8ba050762bd97503d3eaf06ea2adbeb1165.css" integrity="sha256-Kh/GXhgFTpmZEMKl7xbYugUHYr2XUD0+rwbqKtvrEWU=" crossorigin="anonymous">
  <script src="/components/pcb-inspector/script.min.464ac68b4f3cb175861c5580c88b9ece5e50a6ecf8ed58208fe3f22d8c38ff9d.js" integrity="sha256-RkrGi088sXWGHFWAyIuezl5Qpuz47Vggj+PyLYw4/50=" crossorigin="anonymous" defer></script><div class="pcb-inspector">

  <div class="pcb-inspector-stage" tabindex="0" role="img" aria-label="PCB inspection. Hover or touch to reveal routing; focus to reveal the full routing layer.">
    <img class="pcb-inspector-front" src="/images/katia/xray/front.webp" alt="" loading="lazy" role="presentation">
    <img class="pcb-inspector-back" src="/images/katia/xray/back.webp" alt="" loading="lazy" role="presentation">
    <img class="pcb-inspector-reveal pcb-inspector-reveal-front" src="/images/katia/xray/layout-front.webp" alt="" loading="lazy" role="presentation">
    <img class="pcb-inspector-reveal pcb-inspector-reveal-back" src="/images/katia/xray/layout-back.webp" alt="" loading="lazy" role="presentation">
  </div>
  <div class="pcb-inspector-footer">
  <fieldset class="pcb-inspector-controls" aria-label="Board side">
    <label><input type="radio" name="pcb-inspector-2" value="front" checked><span>Front</span></label>
    <label><input type="radio" name="pcb-inspector-2" value="back"><span>Back</span></label>
  </fieldset>
  </div>
</div>

<h2 id="usb-differential-pair-routing">USB differential pair routing</h2>
<p>USB <code>D+</code> and <code>D−</code> are routed as a differential pair, with trace width and spacing chosen to target 90 Ω differential impedance and a continuous ground reference beneath them. The routing also considers clearance from nearby copper to limit unwanted coupling.</p>
<figure class="align-center"><img src="/images/katia/pcb/differential-pair.webp" alt="PCB layout showing the USB differential pair routing" loading="lazy">
</figure>

<p>This was one of the more important changes in addressing the issues that motivated the redesign. With USB routed directly on the main PCB, I wanted the pair to have a proper reference plane and a more consistent impedance, rather than relying on a layout that happened to work. It does not guarantee EMC compliance on its own, but it addresses one of the main layout weaknesses I wanted to fix.</p>
<h2 id="power-distribution-and-decoupling">Power distribution and decoupling</h2>
<p>Individually addressable LEDs make the power network more interesting than the key matrix alone. Their changing current draw makes local decoupling and noise on the power rails worth paying attention to.</p>
<p>Katia places decoupling capacitors close to IC power pins, including those in the flash and LED circuitry. Ferrite beads provide high-frequency filtering on the power rails. The MCU&rsquo;s RUN pin is also pulled up to <code>IOVDD</code>.</p>
<p>A decoupling capacitor needs a short connection to the device and its ground return. The four-layer stackup makes those connections easier to route.</p>
<p>Additional bulk capacitors on the power rails help reduce voltage fluctuations caused by sudden changes in load current, particularly when the LED states change.</p>
<figure class="align-center"><img src="/images/katia/schematic/power-section.webp" alt="USB-C power input schematic with fuse, ferrite bead, and 3.3 V regulator" loading="lazy">
</figure>

<h2 id="esd-and-overcurrent-protection">ESD and overcurrent protection</h2>
<p>The protection changes include resettable PTC fuses on the 5 V supply rails and TVS diodes on the TRS interconnect lines. The aim is to give exposed interfaces more deliberate protection against faults and transients.</p>
<figure class="align-center"><img src="/images/katia/schematic/tvs.webp" alt="TRS interconnect schematic showing the TVS diode and the warning against connecting the cable while powered" loading="lazy" width="500">
</figure>

<p>While these components provide some protection, the TRS connection is still not intended for hot-plugging. USB power must be disconnected before inserting or removing the cable between the halves.</p>
<p>This limitation comes from the mechanical construction of TRS connectors. During insertion or removal, the plug&rsquo;s tip and ring contacts slide across the socket contacts, temporarily connecting conductors that are normally isolated.</p>
<h2 id="reinforcing-the-trs-connector-pads">Reinforcing the TRS connector pads</h2>
<p>The TRS connector also needs to withstand mechanical stress. Plugging and unplugging the cable puts force on the connector and its surface-mount solder joints, especially when the cable is pulled at an angle or handled roughly. This can cause the SMD pads to peel away from the PCB, potentially detaching the connector and making the board difficult to repair.</p>
<p>To reduce this risk, I added vias to the connector pads to help anchor them more securely to the PCB. This provides additional mechanical support and reduces the chance of the pads peeling off the board during repeated plugging and unplugging or rough handling.</p>
<figure class="align-center"><img src="/images/katia/pcb/vias.webp" alt="PCB layout showing reinforcing vias at the TRS connector pads" loading="lazy" width="500">
</figure>

<h2 id="led-logic-level-shifting">LED logic-level shifting</h2>
<p>For the LEDs, I replaced the workaround of lowering the supply voltage with a dedicated level shifter for the data signal.</p>
<figure class="align-center"><img src="/images/katia/schematic/level-shifter.webp" alt="LED interface schematic showing the dedicated level shifter, series resistor, and LED chain" loading="lazy" width="500">
</figure>

<p>This adds a little to the BOM cost, but avoids relying on a voltage drop to make the logic interface work. The result is a more predictable interface between the controller and the lighting.</p>
<figure class="align-center"><img src="/images/katia/leds.webp" alt="Katia PCB connected to USB with its red LEDs illuminated" loading="lazy" width="500">
</figure>

<h2 id="manufacturing-and-documentation">Manufacturing and documentation</h2>
<p>I also wanted the board to be easy to manufacture and debug. Test points provide access to critical signals, while a Tag-Connect footprint allows programming and debugging without a permanently mounted header. I added teardrops and included manufacturer part numbers in the BOM to make assembly and component sourcing easier. These are relatively small details, but they can save considerable time when bringing up a new board or troubleshooting a problem.</p>
<p>Finally, Katia is released under the CERN Open Hardware Licence. I wanted people to be able to use the design, modify it, and build on it, including for commercial projects, without unnecessary restrictions.</p>
<p>The <a href="https://github.com/ikajdan/katia">repository</a> contains the KiCad design files. If you want to build your own board or make changes to the design, the latest revision is available on the <a href="https://github.com/ikajdan/katia/releases/latest">releases</a> page.</p>
<h2 id="testing-and-validation">Testing and validation</h2>
<p>After assembling the boards, I tested USB communication, key scanning, RGB backlighting, and communication between the two halves. I also checked the power rails and made sure everything worked correctly with QMK firmware.</p>
<p>The keyboard has been working reliably in everyday use, with no noticeable USB or communication issues. I haven&rsquo;t done any formal EMC testing, but the improved grounding and USB routing should help address the issues that motivated the redesign in the first place.</p>
<h2 id="final-thoughts">Final thoughts</h2>
<p>The existing keyboard layout already worked well for me, so I focused on the electronics rather than changing the mechanical design. I&rsquo;ve made the project available in the hope that others might find it useful, whether to build their own keyboard, reuse parts of the design, or develop it further.</p>
<figure class="align-center"><img src="/images/katia/plant-double.webp" alt="The fully assembled Katia split keyboard" loading="lazy" width="500">
  <figcaption><div class="figure-caption">Happy typing! :)</div>
  </figcaption>
</figure>

]]></content:encoded>
    </item>
  </channel>
</rss>
