Skip to content

Latest commit

 

History

History
110 lines (70 loc) · 4.35 KB

README.md

File metadata and controls

110 lines (70 loc) · 4.35 KB

macrokeeb

Simple 10-key Arduino-based macropad with OLED screen and rotary encoder I did for my high school final project.

macrokeeb

Features

  • 10 programmable keys
  • 5 layers/modes (General, Windows, Linux, VSCode, Other) which can be switched by pressing the button on the rotary encoder
  • Rotary encoder knob changes the audio volume
  • OLED screen shows current layer and its predefined macros

Parts

  • 1x Arduino Pro Micro
  • 1x I2C OLED display, 128x64, 0.96 inch
  • 1x Rotary encoder KY-040
  • 10x Mechanical switches, red (any Cherry MX compatible will do)
  • 10x Keycaps (any Cherry MX compatible will do)
  • 10x Standard signal diodes 1N4148
  • 10x LED lights, red, 3mm
  • Wires (reused from old Christmas lights)
  • 3D printed case

Tools

  • 3D printer
  • Soldering iron and solder
  • Wire cutters
  • Hot glue gun
  • Sandpaper

Case

I used the following and modified it a bit (removed the logo, added hex mesh on the side, added hole...): CODEK - Configurable OLED Display Extension Keyboard

case

Tip

Use sandpaper to smoothen rough edges, read more here on how to do it.

Assembly

diagram1

diagram2

Tip

Before putting it all together, test all of your components separately to ensure they all work.

Steps

  1. Slide the OLED display holder into the top plate. Install the switches into the top plate. Both can be a tight fit, but that shouldn't be a problem. In that case, apply more pressure or sand down the tight parts.

step1

  1. For wiring, refer to the diagrams. Basically, you have to wire the keys in a matrix. For soldering, I suggest one the following:
  • cut the wires in smaller ones, long enough to wire up one switch with the next one,
  • use one wire per row/column and remove the coating where needed,
  • use one wire per row/column and solder through the coating

step2

  1. Add signal diodes on all the keys, it will ensure that the microcotroller doesn't read key presses wrong when pressing several keys at once.

step3

  1. Adding LEDs is purely for aesthetics.

step4

  1. Solder wires to the OLED display and rotary encoder too.

step5

  1. Solder everything to the Pro Micro.

step6

  1. Now is the time to load the firmware onto the Pro Micro and test it out and make adjustments as needed before closing the case. I used Arduino IDE 2.0. For additional libraries, drivers and their respective guides for installation, refer to the Links section.

step7

  1. At last, put hot glue on the LEDs, between the base plate and rotary encoder (make sure it will later fit through the hole), between OLED display and OLED display holder, between the Pro Micro and its holder. Basically, put hot glue on every component/piece that you don't want to hear rattling in the case later.

step8

  1. That's it! Now take a step back and admire your work.

step9

Suggestions, improvements, ideas

  • Add layer with keys F13-F22 and map them with a key mapper software like AutoHotKey
  • Add simple games like tetris or pong on the screen and control it with the keys
  • Add "gaming" layer where the keys can be w, a, s, d, space etc. and add multi-key press, key press and hold etc.

Links