DIY keyboard: How to make Handwired DIY keyboard qmk_firmware Protokey type B

Required materials

keyboard

Keyboard case

keyboard

Key switches

keyboard

Keycaps

keyboard

Promicro

keyboard

Heat-resistant crosslinked vinyl insulated wire / insulated enamel wire

keyboard

Rectifier diode / switching diode

・Soldering iron
・Solder

How to assemble

keyboard

Insert your favorite key switch into the keyboard case

keyboard

Solder the rectifier diode as shown in the image with reference to the drawing.

The direction of the rectifier diode is (-) → (+). Be sure to unify the orientation and solder in the same way as the drawing.

keyboard

keyboard

Solder the vertical lines. It doesn't matter what method or material you use as long as the horizontal black line and the vertical red line are insulated.

This video uses insulated enamel wire. This insulating enamel wire is energized by scraping or burning off the insulating coating.

Use a soldering iron to burn off the connection part of the key switch so that only the key switch part is energized.

keyboard

Completed image

keyboard keyboard

Solder the numbers enclosed in red on the Promicro and the numbers on the design drawing with a cable such as a heat-resistant crosslinked vinyl insulated wire.

keyboard

Completed image

Flashing using qmk_firmware

How to install Arch linux

Write using Arch linux

sudo pacman -Syu

Update entire package

sudo pacman -S git

Install git

python3 -m pip install --upgrade pip

Update pip

git clone --recurse-submodules https://github.com/qmk/qmk_firmware.git

Download qmk_firmware

cd qmk_firmware

Install required files

sudo ./util/qmk_install.sh

./util/new_keyboard.sh

Keyboard Name: pkb
Keyboard Type [avr]: Enter without entering anything
Your Name [Your Name]: prototype

overwrite config.h

micro keyboards/pkb/config.h

/* Copyright 2021 prototype */

#pragma once

#include "config_common.h"

/* USB Device descriptor parameter */
#define VENDOR_ID    0xFEED
#define PRODUCT_ID   0x0000
#define DEVICE_VER   0x0001
#define MANUFACTURER prototype
#define PRODUCT      protokey

/* key matrix size */
#define MATRIX_ROWS 4
#define MATRIX_COLS 12

/*

D3  TXO ┌─■─┐ RAW RAW
D2  RX1 │o o│ GND GND
GND GND │o o│ RST RESET
GND GND │o o│ VCC VCC
D1    2 │o o│ A3   F4
D0    3 │o o│ A2   F5
D4    4 │o o│ A1   F6
C6    5 │o o│ A0   F7
D7    6 │o o│ 15   B1
E6    7 │o o│ 14   B3
B4    8 │o o│ 16   B2
B5    9 │o o│ 10   B6
        └───┘

*/

#define MATRIX_ROW_PINS { F4, F5, F6, F7 }
#define MATRIX_COL_PINS { B1, B3, B2, B6, B5, B4, E6, D7, C6, D4, D0, D1 }
#define UNUSED_PINS 

/* COL2ROW, ROW2COL */
#define DIODE_DIRECTION COL2ROW

/* Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. */
#define SOFT_SERIAL_PIN D0  // or D1, D2, D3, E6

/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCE 5

/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE

/* disable these deprecated features by default */
#define NO_ACTION_MACRO
#define NO_ACTION_FUNCTION

overwrite pkb.h

micro keyboards/pkb/pkb.h

/* Copyright 2021 prototype */

#pragma once

#include "quantum.h"

/* This is a shortcut to help you visually see your layout. */
#define LAYOUT( \
    ka1, ka2, ka3, ka4, ka5, ka6, ka7, ka8, ka9, kaa, kab, kac, \
    kb1, kb2, kb3, kb4, kb5, kb6, kb7, kb8, kb9, kba, kbb, kbc, \
    kc1, kc2, kc3, kc4, kc5, kc6, kc7, kc8, kc9, kca, kcb, kcc, \
    kd1, kd2, kd3, kd4, kd5, kd6, kd7, kd8, kd9, kda, kdb, kdc \
) { \
    { ka1, ka2, ka3, ka4, ka5, ka6, ka7, ka8, ka9, kaa, kab, kac }, \
    { KC_NO, kb2, kb3, kb4, kb5, kb6, kb7, kb8, kb9, kba, kbb, kbc }, \
    { KC_NO, kc2, kc3, kc4, kc5, kc6, kc7, kc8, kc9, kca, kcb, kcc }, \
    { kd1, kd2, kd3, kd4, kd5, kd6, kd7, kd8, kd9, kda, kdb, kdc } \
}

overwrite keymap.c

micro keyboards/pkb/keymaps/default/keymap.c

/* Copyright 2021 prototype */
// https://github.com/qmk/qmk_firmware/blob/master/quantum/keymap_extras/keymap_jp.h
// https://beta.docs.qmk.fm/using-qmk/simple-keycodes/keycodes_basic

#include QMK_KEYBOARD_H
#include"keymap_jp.h"

// Defines names for use in layer keycodes and the keymap
enum layer_names {
    _QWE,
    _PRO,
    _LEF,
    _E1,
    _E2,
    _E3,
    _L1,
    _L2
};

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
    /* _QWE
    ┌──────┬──────┬──────┬──────┬──────┬──────┼──────┬──────┬──────┬──────┬──────┬──────┐
    │ Tab  │   Q  │   W  │   E  │   R  │   T  │   Y  │   U  │   I  │   O  │   P  │  -=  │
    ├──────┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴──────┤
    │ Ctrl     │   A  │   S  │   D  │   F  │   G  │   H  │   J  │   K  │   L  │  Enter  │
    ├──────────┴──┬───┴──┬───┴──┬───┴──┬───┴──┬───┴──┬───┴──┬───┴──┬───┴──┬───┴──┬──────┤
    │ Shift       │   Z  │   X  │   C  │   V  │   B  │   N  │   M  │   ,  │   .  │  /?  │
    ├──────┬──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
    │ Esc  │ Alt  │ GUI  │ EX1  │EX2/Mu│  BS  │Space │EX3/He│ Left │ Down │  Up  │Right │
    └──────┴──────┴──────┴──────┴──────┴──────┼──────┴──────┴──────┴──────┴──────┴──────┘
    */
    [_QWE] = LAYOUT( \
    KC_TAB,           KC_Q,    KC_W,    KC_E,    KC_R,             KC_T,      KC_Y,    KC_U,             KC_I,    KC_O,    KC_P,    KC_MINS, \
    _______,          KC_LCTL, KC_A,    KC_S,    KC_D,             KC_F,      KC_G,    KC_H,             KC_J,    KC_K,    KC_L,    KC_ENT,\
    _______,          KC_LSFT, KC_Z,    KC_X,    KC_C,             KC_V,      KC_B,    KC_N,             KC_M,    KC_COMM, KC_DOT,  KC_SLSH,\
    LT(_L1, KC_ESC),  KC_LALT, KC_LGUI, MO(_E1), LT(_E2, KC_MHEN), KC_BSPC,   KC_SPC,  LT(_E3, KC_HENK), KC_LEFT, KC_DOWN, KC_UP,   KC_RGHT
    ),
    /* _PROTO KEY
    ┌──────┬──────┬──────┬──────┬──────┬──────┼──────┬──────┬──────┬──────┬──────┬──────┐
    │ Tab  │   Q  │   W  │   D  │   F  │   -  │   /  │   L  │   G  │   K  │   P  │ Enter│
    ├──────┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴──────┤
    │ Ctrl     │   U  │   E  │   A  │   O  │   I  │   R  │   S  │   N  │   T  │   H     │
    ├──────────┴──┬───┴──┬───┴──┬───┴──┬───┴──┬───┴──┬───┴──┬───┴──┬───┴──┬───┴──┬──────┤
    │ Shift       │   Z  │   X  │   C  │   V  │  ,<  │  .>  │   M  │   B  │   Y  │   J  │
    ├──────┬──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
    │L1/Esc│ Alt  │ GUI  │  E1  │E2/Mu │  BS  │Space │E3/He │ Left │ Down │  Up  │Right │
    └──────┴──────┴──────┴──────┴──────┴──────┼──────┴──────┴──────┴──────┴──────┴──────┘
    */
    [_PRO] = LAYOUT( \
    _______, KC_Q,    KC_W,    KC_D,    KC_F,    KC_MINS,  KC_SLSH, KC_L,    KC_G,    KC_K,    KC_P,    KC_ENT,\
    _______, KC_LCTL, KC_U,    KC_E,    KC_A,    KC_O,     KC_I,    KC_R,    KC_S,    KC_N,    KC_T,    KC_H,\
    _______, KC_LSFT, KC_Z,    KC_X,    KC_C,    KC_V,     KC_COMM, KC_DOT,  KC_M,    KC_B,    KC_Y,    KC_J,\
    _______, _______, _______, _______, _______, _______,  _______, _______, _______, _______, _______, _______
    ),
    /* _E1
    ┌──────┬──────┬──────┬──────┬──────┬──────┼──────┬──────┬──────┬──────┬──────┬──────┐
    │   |  │  ;+  │  :*  │  ↑   │  -=  │  /?  │      │      │      │      │      │      │
    ├──────┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴──────┤
    │     "    │  [   │  ←   │  ↓   │  →   │  ]   │Vol-DW│Vol-UP│Bli-DW│Bli-UP│         │
    ├──────────┴──┬───┴──┬───┴──┬───┴──┬───┴──┬───┴──┬───┴──┬───┴──┬───┴──┬───┴──┬──────┤
    │             │  \_  │  ^~  │  @`  │  ,<  │  .>  │      │      │      │      │      │
    ├──────┬──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
    │      │      │      │■■■■■■│      │      │  Del │      │ Home │ PgDw │ PgUP │ End  │
    └──────┴──────┴──────┴──────┴──────┴──────┼──────┴──────┴──────┴──────┴──────┴──────┘
    */
    [_E1] = LAYOUT(
    JP_PIPE, JP_SCLN, JP_COLN, KC_UP,   KC_MINS, KC_SLSH, _______, _______, _______, _______, _______, _______, \
    _______, JP_DQUO, JP_LBRC, KC_LEFT, KC_DOWN, KC_RGHT, JP_RBRC, KC_VOLD, KC_VOLU, KC_BRID, KC_BRIU, _______, \
    _______, _______, JP_BSLS, JP_CIRC, JP_AT,   KC_COMM, KC_DOT,  _______, _______, _______, _______, _______, \
    _______, _______, _______, _______, _______, _______, KC_DEL,  _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END \
    ),
    /* _E2
    ┌──────┬──────┬──────┬──────┬──────┬──────┼──────┬──────┬──────┬──────┬──────┬──────┐
    │   ,  │   .  │  7   │  8   │  9   │   '  │  F1  │  F2  │  F3  │  F4  │  F5  │  F6  │
    ├──────┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴──────┤
    │          │   :  │  4   │  5   │  6   │  F7  │  F8  │  F9  │  F10 │  F11 │    F12  │
    ├──────────┴──┬───┴──┬───┴──┬───┴──┬───┴──┬───┴──┬───┴──┬───┴──┬───┴──┬───┴──┬──────┤
    │             │  0   │  1   │  2   │  3   │ CAPS │半/全│無変換│ 変換 │ かな │PrintS│
    ├──────┬──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
    │      │      │      │      │■■■■■■│      │  Del │      │ Home │ PgDw │ PgUP │ End  │
    └──────┴──────┴──────┴──────┴──────┴──────┼──────┴──────┴──────┴──────┴──────┴──────┘
    */
    [_E2] = LAYOUT(
    KC_COMM, KC_DOT,  KC_7,    KC_8,    KC_9,    JP_QUOT, KC_F1,   KC_F2,    KC_F3,   KC_F4,   KC_F5,   KC_F6, \
    _______, _______, JP_COLN, KC_4,    KC_5,    KC_6,    KC_F7,   KC_F8,    KC_F9,   KC_F10,  KC_F11,  KC_F12, \
    _______, _______, KC_0,    KC_1,    KC_2,    KC_3,    JP_CAPS, KC_LANG5, KC_MHEN, KC_HENK, KC_KANA, KC_PSCR, \
    _______, _______, _______, _______, _______, _______, KC_DEL,  _______,  KC_HOME, KC_PGDN, KC_PGUP, KC_END \
    ),
    /* _E3
    ┌──────┬──────┬──────┬──────┬──────┬──────┼──────┬──────┬──────┬──────┬──────┬──────┐
    │  .   │  ,   │  &   │  ~   │  =   │  _   │  ?   │  (   │  )   │  '   │  "   │  @   │
    ├──────┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴──────┤
    │      `   │  $   │  %   │  ^   │  %   │  #   │  [   │  ]   │  :   │  ;   │     |   │
    ├──────────┴──┬───┴──┬───┴──┬───┴──┬───┴──┬───┴──┬───┴──┬───┴──┬───┴──┬───┴──┬──────┤
    │             │  !   │  @   │  #   │  <   │  >   │  {   │  }   │  +   │  *   │  \   │
    ├──────┬──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
    │      │      │      │      │      │      │  Del │■■■■■■│ Home │ PgDw │ PgUP │ End  │
    └──────┴──────┴──────┴──────┴──────┴──────┼──────┴──────┴──────┴──────┴──────┴──────┘
    */
    [_E3] = LAYOUT(
    KC_DOT,  KC_COMM, JP_AMPR, JP_TILD, JP_EQL,  JP_UNDS, KC_QUES, JP_LPRN, JP_RPRN, JP_QUOT, JP_DQUO, JP_AT, \
    _______, JP_GRV,  JP_DLR,  JP_PERC, JP_CIRC, JP_PERC, JP_HASH, JP_LBRC, JP_RBRC, JP_COLN, JP_SCLN, JP_PIPE, \
    _______, _______, KC_EXLM, JP_AT,   JP_HASH, JP_LABK, JP_RABK, JP_LCBR, JP_RCBR, JP_PLUS, JP_ASTR, JP_BSLS, \
    _______, _______, _______, _______, _______, _______, KC_DEL,  _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END \
    ),
    /* _LEF
    ┌──────┬──────┬──────┬──────┬──────┬──────┼──────┬──────┬──────┬──────┬──────┬──────┐
    │ Tab  │   Q  │   W  │   D  │   F  │  BS  │      │      │      │      │      │      │
    ├──────┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴──────┤
    │ Ctrl     │   U  │   E  │   A  │   O  │   I  │      │      │      │      │         │
    ├──────────┴──┬───┴──┬───┴──┬───┴──┬───┴──┬───┴──┬───┴──┬───┴──┬───┴──┬───┴──┬──────┤
    │ Shift       │   Z  │   X  │   C  │   V  │Space │      │      │      │      │      │
    ├──────┬──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
    │L1/Esc│Alt/半│ GUI  │  E1  │E2/Muh│L2/Hen│      │      │      │      │      │      │
    └──────┴──────┴──────┴──────┴──────┴──────┼──────┴──────┴──────┴──────┴──────┴──────┘
    */
    [_LEF] = LAYOUT(
    _______, KC_Q,    KC_W,    KC_D,             KC_F,    KC_BSPC,          _______, _______, _______, _______, _______, _______,\
    _______, _______, KC_U,    KC_E,             KC_A,    KC_O,             KC_I,    _______, _______, _______, _______, _______,\
    _______, _______, KC_Z,    KC_X,             KC_C,    KC_V,             KC_SPC,  _______, _______, _______, _______, _______,\
    _______, _______, _______, LT(_E1, KC_HENK), _______, LT(_L2, KC_HENK), _______, _______, _______, _______, _______, _______
    ),
    /* _L1
    ┌──────┬──────┬──────┬──────┬──────┬──────┼──────┬──────┬──────┬──────┬──────┬──────┐
    │  F1  │  F2  │  F3  │  F4  │  F5  │  F6  │      │      │      │      │      │      │
    ├──────┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴──────┤
    │      F7  │  F8  │  F9  │  F10 │  F11 │  F12 │      │      │      │      │         │
    ├──────────┴──┬───┴──┬───┴──┬───┴──┬───┴──┬───┴──┬───┴──┬───┴──┬───┴──┬───┴──┬──────┤
    │   PROTOKEY  │QWERTY│ LEFT │Insert│PrintS│      │      │      │      │      │      │
    ├──────┬──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
    │■■■■■■│      │      │      │      │      │      │      │      │      │      │      │
    └──────┴──────┴──────┴──────┴──────┴──────┼──────┴──────┴──────┴──────┴──────┴──────┘
    */
    [_L1] = LAYOUT(
    KC_F1,   KC_F2,    KC_F3,    KC_F4,    KC_F5,   KC_F6,   _______, _______, _______, _______, _______, _______, \
    _______, KC_F7,    KC_F8,    KC_F9,    KC_F10,  KC_F11,  KC_F12,  _______, _______, _______, _______, _______, \
    _______, DF(_PRO), DF(_QWE), DF(_LEF), KC_INS,  KC_PSCR, _______, _______, _______, _______, _______, _______, \
    _______, _______,  _______,  _______,  _______, _______, _______, _______, _______, _______, _______, _______ \
    ),
    /* _L2
    ┌──────┬──────┬──────┬──────┬──────┬──────┼──────┬──────┬──────┬──────┬──────┬──────┐
    │ Tab  │   P  │   K  │   G  │   L  │  DEL │      │      │      │      │      │      │
    ├──────┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴───┬──┴──────┤
    │ Ctrl     │   H  │   T  │   N  │   S  │   R  │      │      │      │      │         │
    ├──────────┴──┬───┴──┬───┴──┬───┴──┬───┴──┬───┴──┬───┴──┬───┴──┬───┴──┬───┴──┬──────┤
    │ Shift       │   J  │   Y  │   B  │   M  │Enter │      │      │      │      │      │
    ├──────┬──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
    │      │      │      │      │      │■■■■■■│      │      │      │      │      │      │
    └──────┴──────┴──────┴──────┴──────┴──────┼──────┴──────┴──────┴──────┴──────┴──────┘
    */
    [_L2] = LAYOUT(
    _______, KC_P,    KC_K,    KC_G,    KC_L,    KC_DEL,  _______, _______, _______, _______, _______, _______,\
    _______, KC_LCTL, KC_H,    KC_T,    KC_N,    KC_S,    KC_R,    _______, _______, _______, _______, _______,\
    _______, KC_LSFT, KC_J,    KC_Y,    KC_B,    KC_M,    KC_ENT,  _______, _______, _______, _______, _______,\
    _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
    )
};

Flash promicro

keyboard

Connect Promicro and Arch linux with a USB cable

sudo make pkb:default:avrdude

Flash

keyboard

For reset your computer ...

keyboard keyboard

Short the RST and GRD of promicro with something that energizes such as tweezers

keyboard

The screen changes like the image

Writing is finished

Key maps

keyboard

Qwerty placement

keyboard

protokey placement

keyboard

Left placement

Protokeyboard type-B created this time for sale

Sales site

We sell the same products as the one created this time at Booth.

thank you

Thank you for watching until the end. I'm glad if you can use it as a reference.

Thank you for Helping

Give money to us for Amazon gift

We will continue to update useful information. I am delighted to jump to your help. Thank you very much.