Skip to content

Latest commit

 

History

History
273 lines (200 loc) · 12.1 KB

README.md

File metadata and controls

273 lines (200 loc) · 12.1 KB

Leopold FC980C Replacement Controller

This PCB replaces the controller of the Leopold FC980C keyboard to allow running alternate firmware, especially open source firmware such as QMK. This project relies heavily on the prior reverse engineering work done by hasu (aka tmk) and collaborators.

This is the first PCB I have designed and as such I suspect this will have many areas that can be improved. I am very much looking forward to hearing feedback about this design, if you think something can be improved please open an issue and let me know. I will list my reasons for various design choices below, as well as an errata section to list shortcomings of the current design that I am aware of.

FC980C controller photo (the resistor hand-soldered to the connector is due to a flaw of the revision 1 design, which has been fixed in revision 2)

Specs:

  • STM32F401 MCU as found on the Blackpill boards
  • Open Hardware licensed under CERN OHL-S v2
  • designed to be assembled by JLCPCB (can of course be manufactured elsewhere, but board component selection has been optimized for JLC's component library)

Why would anyone want a replacement keyboard controller for the FC980C? In case the original controller gets fried, the lack of controller replacement from the manufacturer would otherwise mean tossing the whole (expensive) keyboard. This board enables the usage of Free and Open Source firmware to replace the proprietary stock firmware. Running alternate firmware allows enabling hardware features not accessible through the original controller such as actuation point adjustments, not to mention the plethora of software features enabled by QMK for example.

Getting started

If you have received this controller fully assembled, your next step will be firmware setup. Check the firmware/ directory in this repository.

In case you still have to solder on the connectors, see the assembly section below.

Assembly

This PCB is intended to be manufactured and assembled by JLCPCB, except for the connectors and a button on the back of the board, which most likely have to be soldered on the PCB by hand.

The button (labled BOOT0) is through-hole and easily soldered by hand. Make sure to place it on the bottom side, i.e. opposite side of the MCU, where the DIP switches are on the original controller board.

The connector for the USB board (USB) is though-hole and can be hand-soldered.

The SWD header is optional and can be left unsoldered.

The connector labeled KEYBOARD is only available for surface mounting and unfortunately not available at JLC for assembly (at least at the time of design). Hand-soldering is a bit more challenging for this connector. Make sure to use a healthy dose of flux and fine gauge solder wire.

Production

While the PCB itself can be manufactured by a number of PCB houses, component selection and SMD assembly is made with JLCPCB in mind. The jlcpcb/production_files folder for each revision should include the necessary BOM and CPL files in addition to the Gerbers. The board parameters are specified in the PCB design file (the main parameters being a board thickness of 1.6mm and 2 copper layers). For the option "Remove Order Number", you can select "Specify a location".

This board is compatible with JLC's "Economic PCBA" option. For option "Assembly Side", choose "Top Side" and under "Tooling holes" you can specify "Added by Customer".

The EEPROM (U4) and accompanying decoupling capacitor (C6) are optional. The board should work without those populated.

Design review

The specific component selection is tailored to what was available at JLCPCB at the time of design. While things like the capacitors and resistors can be easily substituted, Larger ICs such as the USB protection, fuse, 3.3V regulator, and MCU have not been evaluated for alternative parts.

The USB and KEYBOARD connectors interface with the existing connectors used in the FC980C and cannot be substituted.

I don't intend to sell this controller PCB by myself and as such everyone who is interested in the design is meant to order this directly from JLC for themselves. As such, I've tried to minimize cost for low quantity production runs. JLC has the concept of extended and basic parts where the former incurs a one-time setup fee per production rund per component as those components require additional labor for setting up the pick and place machines with the respective components. I've tried to keep the number of extended components as low as possible.

MCU

The main requirements for the microcontroller were 5V tolerance and good compatibility with QMK. I also tried to take pricing and availability for the foreseeable future into account. My choice fell on the STM32F401 that is used in the cheap "Blackpill" development boards. It is well supported by QMK and is also used in another Topre controller board project that replaces the PCB of the Realforce R1 TKL keyboards.

Protection circuitry

The 5V fuse and USB protection components have been carried forward from the original RP2040-based design (revision 1) and have been taken from this RP2040 design guide.

USB traces

USB trace width has been calculated using the KiCad built-in calculator following a guide on the Digikey blog. The wide traces are caused by the board design having two layers and a thickness of 1.6mm. This is most likely overkill as the bandwidth requirements are very low for a keyboard. Reviewing a number of other boards, none were using USB-specific trace widths.

Errata

Revision 2

None found thus far.

Revision 1

The SWD header is unusable since SWDIO has been routed to the wrong pin on the MCU (PA15 instead of PA13). This has no impact on the actual controller functionality. Fixed in revision 2.

Unfortunately, the KEY_STATE pin is missing a 5V pull-up resistor. A manual fix (such as soldering a 10k resistor between the KEY_STATE [pin 14] and 5V pins on the KEYBOARD connector) is necessary. Fixed in revision 2.

Revisions

Revision 2

rev2 PCB

Updates SWD pinout to correctly use PA13 on the MCU for SWDIO instead of PA15.

Minor position adjustments to drill holes.

Adds 5V pull-up resistor to KEY_STATE line.

Removes I2C level shifter to simplify BOM.

Sample tested and working: not yet—it is recommended to enable the options "Confirm Production file" and "Confirm Parts Placement" when ordering from JLC

Revision 1

rev1 PCB

First design that has a chance to actually work in the FC980C. Switch to a STM32F401 microcontroller. This MCU allows saving a couple of components compared to the RP2040, such as USB termination resistors and external flash.

One notable addition compared to the previous revision is an optional 64Kb EEPROM.

Sample tested and working: tested and issues identified (see Errata section), working with the suggested manual fixes

Revision 0

rev0 PCB

The first version of this PCB uses a RP2040 controller. Unfortunately, the FC980C electronics rely on the MCU being 5V tolerant. I have noticed this only while triple checking the design just before submitting it for manufacturing. The RP2040 is not 5V tolerant and would require level shifters on many I/O lines. Because of that I decided to scrap the design and start anew, but since the board design was pretty much complete, I'm including it in this repository for posterity.

Sample tested and working: no

Acknowledgements

This replacement controller relies heavily on the prior reverse engineering work of the keyboard community, including uncovering schematics for the similar Leopold FC660C that were submitted to the FCC that helped me figure out the I/O voltage requirements. In particular, I want to thank hasu (aka tmk) who created a FC980C replacement controller based on the ATmega32u4 MCU, publishing schematics and an open source firmware implementation for tmk that has been ported to QMK.

Thanks to Toocanzs#5098 from the QMK Discord for helping me with the crystal load capacitor calculation.

The PCB has been designed using KiCad 6 and production files have been exported using Bouni's JLCPCB tools plugin.

Resources

These are various resources, that helped me designing my first PCB:

This helped with the software matrix scanning implementation:

This helped me immensensly in figuring out the FC980C-specific hardware requirements for the FC980C controller:

License

Copyright © 2022 Wilhelm Schuster

This PCB design is licensed under the CERN-OHL-S v2. See the LICENSE file in each of the revision folders for the license text. This license is strongly reciprocal and is similar in spirit to the GPL, but specifically focuses on hardware.

The firmware portion of this project is licensed under GPL-2-or-later in accordance with the QMK project. See the LICENSE file in the firmware folder for the license text.