HackerBox 0083: Macropad

by HackerBoxes in Circuits > Microcontrollers

4088 Views, 13 Favorites, 0 Comments

HackerBox 0083: Macropad

HB0083 Whole Box.png

Welcome to HackerBox 0083 where we will explore mechanical key switches, Arduino Pro Micro microcontrollers, and macropad input devices. Configure the Arduino integrated development environment for programming the Pro Micro ATmega32U4 microcontroller module. Understand different types of mechanical keyswitches and keycaps. Assemble the Stealth Edition Macropad Kit. Program the assembled macropad using the Quantum Mechanical Keyboard Firmware (QMK). Assemble the mechanical MX switch keychain kit with an internal LED light.

HackerBox is the original monthly subscription box for electronics, computer technology, and hacker culture. Each HackerBox is a discovery box, which means all members await and enjoy a new surprise each month. Tech, toys, knowledge, and fun. It's like having a hacker convention, your birthday, and the first day of school - every month - right in your mailbox.

There is a wealth of information for current and prospective members in the HackerBoxes FAQ. Almost all of the non-technical support emails that we receive are already answered there, so we'd really appreciate it if you can take a few minutes to read the FAQ.

Supplies

This Instructable contains information for getting started with HackerBox 0083. The full box contents are listed on the product page for HackerBox 0083 where the box is also available for purchase while supplies last. If you would like to automatically receive a HackerBox like this right in your mailbox each month, you can subscribe at HackerBoxes.com and join the party! Subscribers save at least $15 every month and get each new HackerBox shipped immediately off of the production line.

A soldering iron, solder, and basic assembly tools are generally needed to work on the monthly HackerBox. A computer for running software tools is also required. Have a look at the HackerBox Workshops for basic tools and a wide array of introductory activities and experiments.

The most import thing you will need is a sense of adventure, hacker spirit, patience, and curiosity. Building and experimenting with electronics, while very rewarding, can be tricky, challenging, and even frustrating at times. The goal is progress, not perfection. When you persist and enjoy the adventure, a great deal of satisfaction can be derived from this hobby. Take each step slowly, mind the details, and don't be afraid to ask for help.

WEAR SAFETY GLASSES WHEN SOLDERING, WHEN TRIMMING WIRE LEADS, OR WHEN CUTTING, DRILLING, ETC.

Arduino Pro Micro ATmega32U4

Pro Micro.png

This ATmega32U4 Pro Micro Module features a USB-C interface and can be programmed through the Arduino IDE. If you don't have the Arduino IDE, download it now. As always, we strongly suggest that you configure the IDE and run some test code on the Pro Micro before soldering anything.

The built-in support for the "Arduino Micro" should also work for the "Arduino Pro Micro".

Select:

Tools > Board > Arduino AVR Boards > Arduino Micro

Tools > Port > [USB COM port associated with the Pro Micro]

As usual, we now open up the blink example:

File > Examples > Basics > Blink

Unlike usual, we have a little problem. There is no LED_BUILTIN on the Pro Micro. Luckily there two LEDs for showing the status of the serial TX and RX lines. We can just borrow these.

In the Blink sketch, change LED_BUILTIN to 17 in three places. Compile and upload.

During the upload, both of the serial port LEDs will flicker on the Pro Micro. Once the upload is complete, one of the LEDs will continue slowly blinking forever. This is the blink sketch at work. On our current Pro Micros, the LED on pin 17 is red, but it might had a different color LED depending upon the Pro Micro batch being used.

For fun, let's repeat this exercise changing pin 17 to 30 (in all three locations). Compile and upload. Once the upload is complete, the other serial LED will continue slowly blinking forever. On our current Pro Micros, the LED on pin 30 is red, but again, your mileage may vary.

Mechanical Keyboard Switches

Mech Switches.png

What Is a Mechanical Key Switch?

A key switch doesn't refer to the actual tops of the keys you see when you look at a keyboard on your desk (those bits are generally called "keycaps"), but rather the actual physical mechanism underlying each key. A vast array of switch types pepper today's keyboards, but the most advanced ones are found in gaming and high-end productivity models. Known collectively as "mechanical switches," they deliver satisfying sounds, tactile finger feedback, or smooth operation, or some combination of the three.

(from PC Magazine, Click Clack: Your Ultimate Guide to Mechanical Key Switches)

See also:

Switch Guide

Evolution of Mechanical Key Switches


Stealth Edition Macropad Kit

Macropad Kit.png

A macropad is a small keyboard used to supplement a computer's primary keyboard. They're often programmed with shortcuts, media controls, macros, and more.

The HackerBox 0083 macropad kit is based on the the combo_oled variant of the popular open source dumbpad project.

We call this kit the stealth edition, because everything is black - an esthetic referred to in the automotive world as "murdered out" or in the hacker world as Tuesday or any other day.

Follow this suggested order of steps to assemble the kit components:

MacroPad Printed Circuit Board

Everything gets built upon the awesome PCB created by KEEBD.

Diodes

Start by soldering in the seventeen 1N4148 axial diodes. They are polarized, so be sure to match the black band on each diode to the band marking one side of the white PCB silkscreen.

Arduino Pro Micro

Orient the microcontroller module such that the USB connector extends off the edge of the PCB. To maintain a tight, low-profile look, you can slide the plastic insulators off of the headers once one side is soldered.

Four Pin Tactile Button

Solder in the single four-pin tactile switch that serves as the reset button.

OLED Display

The OLED display is only 0.91 inches in size but features a resolution of 128x32. Solder the four pins such that the display module lies level resting on the back side of the UCB-C connector.

Key Switches

The kit includes sixteen MX Style BLUE Keyboard Switches. Solder the sixteen switches onto the PCB. The switches can float around a bit within their PCB mounts, so you can align each switch as desired before setting with solder.

Rotary Encoder

Insert and solder the EC11 Rotary Encoder in the space below the Pro Micro module. The larger mounting tabs on the side of the encoder fit very snuggly. It can help to squash the taps a bit with some small pliers prior to insertion.

Rubber Feet

Apply the five self-adhesive rubber feet to the underside of the PCB. Place one in each corner of the board and one in the center.

Rotary Encoder Knob

Slide the knurled aluminum knob onto the rotary encoder.

Keycaps

The kit includes sixteen "blank black" DSA-Formfactor Keycaps. Press a keycap onto each of the Key Switches.

Get With the Program

dumbpads.png

Instructions on the dumbpad github repo (combo_oled variant) detail how to configure and flash the Quantum Mechanical Keyboard Firmware (QMK).

Keyboard Switch Keychain Kit

Krychain Kit.png

This fun little keychain kit supports an actual mechanical key switch. It can be used for testing out different key switches and also as a clickety-clackety stress release fidget toy.

Each kit contents:

  • MX-Style BLUE Keyboard Switch (with LED support)
  • 3mm LED
  • CR1220 Lithium Coin Cell
  • Molded Plastic Base for Switch and Battery Cell
  • Translucent Key Cap
  • Black String Keychain Attachment

Assemble the Keychain Kit

Assemble Kit.png

No solder is needed to assemble to keychain. These assembly pointers may be useful:

  • Note that the LED has a long pin (aka: positive, anode) and a short pin (aka: negative, cathode).
  • The long pin is marked A in the diagram.
  • The short pin is marked B in the diagram.
  • Insert the LED accordingly.
  • Note that one of the terminals of the switch is closer to the center alignment peg. This is marked C.
  • The other terminal of the switch is further from the center peg. This is marked D.
  • Bend "short pin" B down against the center peg and then bend "far terminal" D over it.
  • Place the coin cell into the plastic base with the positive (+) side down.
  • Orient the switch so that the LED is opposite the string attachment loop.
  • Slide the "long pin" A under the coin cell while snapping the switch into the base.
  • Connect the key cap the string of the keychain attachment.
  • While(True) {Click();}

Hack the Planet

outro.png

We hope you are enjoying this month's HackerBox adventure into electronics, computer technology, and hacker culture. Reach out and share your success in the comments below or other social media. Also, remember that you can email support@hackerboxes.com anytime if you have a question or need some help.

What's Next? Join the party and live the HackLife. Get a cool box of hackable gear delivered right to your mailbox each month and enjoy a generous member discount. Surf over to HackerBoxes.com right now and sign up for your monthly subscription to HackerBox or the new HackBox Byte Size.