a

Rockstars Macropad

Let's build a keeb

Subhi Dweik. Chapter Eindhoven '22 X Cloud & Devops tribe
a

QR Code

qr code

https://slides.dweik.xyz/rockstars_macropad.html

a
a

Index

  • How keyboards work
  • Soldering
  • Build guide
a

How keyboards work

  • A microcontroller that supports USB HID is connected to a computer
  • Essentially, you press a button, this closes a circuit, the microcontroller knows which button is pressed
  • Microcontroller looks up which keycode matches the button
  • Microcontroller sends button (e.g. A) to PC
a

Keyboard matrices

  • Most keyboards use a matrix divided in rows and columns
  • One column is pulled to high at a time, then the row is read
  • This way you can get rows*columns buttons (100 with 10x10 = 20 pins)
a

Matrix animation

matrix animation

This setup requires diodes, otherwise you get ghosting. Direct pin doesn't

a

A note on switches

Broadly 3 types

  • Linear - Red - No feedback, silent
  • Tactile - Brown - 'Bump' when pressed. Silent-ish
  • Clicky - Blue - Sharp 'bump'. Loud click
a

Soldering

  • We're not working with very fine components, it doesn't need to be perfect
  • Watch out, the iron is HOT :)
  • Touch the tip to BOTH the pad and the pin you're soldering
    • In other words, heat everything you're trying to connect
  • Poke it all with some solder and let it melt into place
a

Solder joints

solder joints

a

RSMP

a

Broad build guide

  • Solder header pins to microcontroller
  • Solder microcontroller to board
  • Solder switches to board
  • Install spacers and screw the board sides together
  • Add bumpy rubbery things
a

Tips

  • If you've never soldered before, start with a few switches to get a feel for it.
    • If you do, don't solder the switches closest to the microcontroller. They might get in the way
  • Use poster-tack to keep stuff in place while soldering
  • Don't overheat pins. Move to something else if it's giving you trouble
a

Solder the microcontroller

Maybe put the longer side of the header pins at the top, haven't tried it ;)

a

Solder the bottom

a

Check for shorts

a
  • Setup software/firmware
    • See firmware slide
  • Test keys before soldering switches
a

Add switches

a

Solder switches

a

Add spacers and screws

Also, clip the microcontroller header pins

a

Add bumpy things

a

Firmware setup

  • Get the Firmware/Software bundle
  • Plug the controller in while holding the boot button
  • Drop the .uf2 file in the root of the storage device
  • Once it has restarted, drop the files in firmware in the root of the Circuitpy device
  • Remove the code.py file
  • Replug the controller
a

Mapping keys

  • We use KMK for the firmware
  • You make can the keys do almost anything you want
  • The key mapping is in main.py
  • If you change the file, it should reload and apply immediately
a

Done :)

Enjoy your macropad