Skip to the content
2 layers48.3 × 17.8 mmAdb usb converter, the printed circuit board in 3D

Adb usb converter

Wout-M/QMK-ADB-to-USB14

A centralized place for resources related to making & configuring a ADB to USB converter for vintage Apple keyboards

Size
48.3 × 17.8 mm
Copper layers
2
Thickness
1.6 mm
Parts
4
Nets
23
Pads
37
Tracks, vias
26, 0
Pours
2
Routed
Yes
KiCad
KiCad 7 (file 20221018)
Created
20 Jan 2024
Updated
21 Jan 2024

Overview

Adb usb converter is an open-source printed circuit board by Wout-M, from the Wout-M/QMK-ADB-to-USB repository on GitHub. It is a 2-layer board of 48.3 × 17.8 mm with 4 parts on 23 nets, routed with 26 tracks and 0 vias.

Its parts include 2 connectors, 1 resistor and 1 IC. It belongs with the keyboards and input boards and the AVR (ATmega, ATtiny) boards of this library.

README

README.md

QMK ADB to USB Converter

A custom ADB to USB Converter with an OLED screen, made with QMK, for my vintage Apple Standard Keyboard

Special thanks to tzarc for making the firmware of the converter & ronangaillard for making the PCB.

About the project

This all started when I wanted to try out vintage mechanical keyboards and found an Apple Standard Keyboard on a second hand site for cheap. Documentation & resources about converters that I found was very spread out or old so I decided to centralize my findings on here for if other people would try the same.

Goals

  • Being able to connect the keyboard with USB, preferably USB-C
  • Fully programmable with multiple layers with QMK
  • Display info about the current layer and capslock & numlock on an OLED screen

Firmware

Using QMK was a must for me to have the keyboard be easily programmable (and already having a little experience with it helped too). Luckily, someone else also made a converter on the QMK repository that I needed to customize for use with an OLED screen and the Apple Standard Keyboard (it was made mainly for the Apple Extended Keyboard).

Wiring

For wiring the ADB socket to the Arduino, only 3 wires are necessary for conversion (the power SW pin is not used):

text
  ,--_--.
 / o4 3o \      1: DATA
| o2   1o |     2: Power SW
 -  ===  -      3: VCC
  `-___-'       4: GND


Keyboard       Converter
               ,------.
VCC-----+------|5V    |
        |      |      |
       [R]     |      |
        |      |      |
DATA----+------|PD0   |
               |      |
GND------------|GND   |
               `------'
R: 1K Ohm resistor

I'll be using an Arduino Pro Micro for this, where pin PD0 is pin 3 (D0 on the image).

Sadly, this pin is also for I2C communication (which I will need for the OLED screen), but luckily the pin for the converter can be customized by changing the value for ADB_DATA_BIT in config.h where 0 stands for pin PD0 so changing it to 2 will make it use pin PD2 (pin 0 on the Pro Micro).

For the OLED screen I'll be using pins 2 (SDA) and 3 (SCL) for the I2C communication. This also requires adding a few things in the firmware files:

  • rules.mk: Add OLED_ENABLE = yes
  • config.h: If any changes need to be made to QMK's default OLED configuration, they should be made here. I added #define OLED_TIMEOUT 0 to have the screen always on
  • keymap.c: In your keymap file you'll need to add the necessary functions to display what you want on the screen.
    c
    #ifdef OLED_ENABLE
    
    bool oled_task_user(void) {
        // Host Keyboard Layer Status
        // oled_write_P(PSTR("Layer: "), false);
    
        switch (get_highest_layer(layer_state)) {
            case 0:
                oled_write_ln_P(PSTR("DEFAULT\n"), false);
                break;
            case 1:
                oled_write_ln_P(PSTR("FUNCTION\n"), false);
                break;
            default:
                // Or use the write_ln shortcut over adding '\n' to the end of your string
                oled_write_ln_P(PSTR("Undefined"), false);
        }
    
        // Host Keyboard LED Status
        led_t led_state = host_keyboard_led_state();
        oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR("    "), false);
        oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR("    "), false);
        oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR("    "), false);
        

Layers

Since the Apple Standard Keyboard doesn't have a function row and the extra buttons of a full sized keyboard (home, end, pg up/down, ...) that I use while developing, I wanted to have atleast 2 layers.

One with the normal keys shown on the keycaps

And one with all the special keys

Building the firmware

In the QMK docs you can find plenty of information on what you'll need to be able to build the firmware and how to flash it, but in short you'll need:

  • QMK MSYS: For building the firmware.
    • Use qmk setup for setting up the qmk_firmware folder where all keyboards, keymaps & logic is contained. By default it's installed under your user folder.
    • For the converter code, you'll find it at keyboards/converter/adb_usb (and replace the files with those from this repo if you want to use my code)
    • I've used the following command to build the firmware: qmk compile -kb converter/adb_usb/rev1 -km default
  • QMK Toolbox: For flashing the firmware onto the Arduino
  • Some IDE or text editor for customizing the firmware, I've used Visual Studio Code

Converter

I couldn't just leave an Arduino, a port, a resistors and some wires dangling between my keyboard and my pc (even though that's what I did for a while), so I went looking into making a PCB design.

PCB

Luckily, once again, somebody else made almost what I needed. A PCB for the Arduino Pro Micro and the ADB port, but without the OLED screen connection.

With some slight modifications to the wiring for using a different pin for the conversion and adding the connections for the OLED screen, it looks like this:

Parts

Part namePrice
Arduino Pro Micro clone€3,71
Mini-Din 4-pin connector (same shape as an ADB port)€3,60
OLED screen€2,11
Resistor€1,58
Custom PCB (ordered from JLCPCB)€1,83

The list is excluding shipping cost and prices may change over time. Some parts (like the resistors) were purchased more than what I need so I would have some spares/stock.

Housing

I wanted the converter to be easily clipped on to the keyboard so it wouldn't get anywhere while using it while also not modifying the keyboard itself. The housing consists of 3 parts: the clip, the converter housing that slots into the clip and the OLED housing that slots into the converter housing. Everything was made with OnShape.

Build Log

5 September 2023

The keyboard was acquired and the idea was born.

Some inspection to see if the board itself still looks good:

11 November 2023

After a small hiatus & many evenings of research and trying out different things, the keyboard finally works.

For now, the converter is held together with wires and tape, but the initial PCB (without OLED) is on it's way.

Now the deep cleaning of the keyboard can start (30 years worth of dust and grime isn't going to come off by itself). I can highly recommend this video for tips on how to clean vintage keyboards.

I've used lots of Q-tips & isopropyl alcohol for the keyboard itself and a soap bath of a couple days for the keycaps. One of the keycaps on the numpad was sadly severely damaged on the inside (the pin was glued on with hot glue) so I decided to leave it off since I won't use it anyways.

4 December 2023

After a long wait, and some problems with delivery, the PCB with the OLED connector is here.

I recommend using some male & female pin headers for the OLED screen. This way you can just slide the screen in the top housing and easily put it on or take it off without worrying about breaking connections.

8 December 2023

Thanks to my Ender 3 and some evenings on OnShape, the full housing is now finished to and I can actually properly use my keyboard instead of having a taped together wire & bare electronics mess.

I've been using this keyboard every day at work ever since.

Parts

4
QtyValueFootprintReferences
1Conn_01x04_SocketConnector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_VerticalJ2
1Conn_01x05_Femalekicad-footprints-perso:adb_connectorJ1
1ProMicropromicro:ProMicro-NoSilkU1
1RResistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P7.62mm_HorizontalR1

Similar boards

  • 2 layers18.5 × 26 mm24g2usb rp2350zero, the printed circuit board in 3D

    24g2usb rp2350zero

    joypad-ai/joypad-os

    Universal controller firmware for building adapters, dongles, and custom controllers.

    4 parts1.7kApache-2.0
  • 2 layers116 × 33 mm966595-1 and 963356-1, the printed circuit board in 3D

    966595-1 and 963356-1

    rusefi/rusefi

    rusefi - GPL internal combustion engine control unit

    4 parts1.2k
  • 2 layers19 × 18 mmDaughter board, the printed circuit board in 3D

    Daughter board

    hackclub/OnBoard

    💡 Join 1,000 teenagers and make your first PCB with a $100 grant!

    4 parts915
  • 2 layers24.8 × 24.8 mmNrf24 breakout, the printed circuit board in 3D

    Nrf24 breakout

    tardate/LittleArduinoProjects

    a collection of "Little Electronic & Arduino Projects", most involving electronics or an Arduino in one way or another!

    4 parts803MIT
  • 2 layers26 × 20 mmCap chain, the printed circuit board in 3D

    Cap chain

    drandyhaas/KiCadRoutingTools

    A set of Python/Rust tools to aid routing in KiCad

    4 parts744MIT
  • 2 layers34.7 × 20 mmXG Station Power MSI, the printed circuit board in 3D

    XG Station Power MSI

    osy/XG_Mobile_Station

    Open source eGPU dock for ROG Ally and ROG Flow

    4 parts712CC-BY-4.0
  • 2 layers20.3 × 24.5 mmJack power input, the printed circuit board in 3D

    Jack power input

    Luos-io/luos_engine

    Open-source and real-time orchestrator for cyber-physical-systems, to easily design, test and deploy embedded applications and digital twins.

    4 parts546MIT

Questions

How big is the Adb usb converter PCB?

It measures 48.3 × 17.8 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Adb usb converter use?

4 parts. 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 Adb usb converter KiCad files?

From the Wout-M/QMK-ADB-to-USB repository on GitHub, at the commit this page was made from: the board is pcb/adb-usb-converter.kicad_pcb and its schematic pcb/adb-usb-converter.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Adb usb converter design in my own project?

Its repository states no licence, so its author keeps all rights: ask Wout-M before reusing the design.