Introduction: DIY $8 Mechanical Numpad (with Arduino Compatible Firmware!)

About: Master student in Computer Science & Information Engineering, one of the developer of ArOZ Online Project. I love making something no one has thought of. If you like making things that seems not possible, send…

A few months ago, I developed and open source the 4xMacropad, a $3 macropad made using CH552G. After seeing much of the feedback from the internet, I notice I can better utilize this chip to make a keyboard with more keys. That is why I am trying to make a numpad in order to use 100% potential of this particular chip.

There are lots of good looking mechanical numpad out there with cool designs. But most of them falls into the 40 - 50 USD range (for DIY kits). That is why when I am deciding this numpad, my goal is to make it as cheap as possible, while maintain the good features from the previous builds:

  • Arduino Programmable
  • Cheap and easy to make
  • Little to no change in BOM list

While improving some designs that was most commented agaist

  • Swap out the mini USB port

After a few weeks of trial and error, I finally get a numpad made with the identical BOM list (actually this numpad has less SMT parts than the pervious 4xMacropad build) and successfully make it cost under $10 USD.

In this instructable, I will quickly walk you through my process of designing this numpad and how you can make yours for $8 USD as well (Disclaimer: Shipping not included)

Supplies

Circuit Related Items

  • 0805 LED x 2 (2 different color of your choice)
  • 0805 0.1uF x 2
  • 0805 10kΩ x 7
  • Micro-USB port x 1
  • SMT Button
  • SOP-16 CH552G x 1
  • PCB

The parts that related to the circuitary add up to less than 2.2 USD

Switches Related Items

  • Cherry MX switches x 17 (or 20 if you are using macro-numpad layout)
  • Key-caps x 17 (or 20)

And these are where the remaining costs are spent

Step 1: Send the PCB to Print

The PCB is the main component of the build. So the first thing you want to do is send the PCB to print. Some manufacturer provide free printing services of 1 board per month. If you have a chance to get such promotion discount, you can get a PCB for nearly free of charge.

You can get the PCB Gerber file here

https://github.com/tobychui/4xMacropad/tree/main/4x5Macro-Numpad/PCB

I am printing mine in white just to match my 3D printing filament and keycaps.

Step 2: 3D Printing the Body

The numpad base is compose of two parts. The first part is the part that cover the back of the PCB. The other part is the tilting platform that the base plate is mounted on. You can edit this part to adjust to fit your primary keyboard tilting angle or just not using it at all if you prefer your numpad to lie completely flat on your tabletop.

You can get the 3D model files here or with the links below.

https://github.com/tobychui/4xMacropad/tree/main/4x5Macro-Numpad/3D%20Model

The two pieces are held together using 4 M2x5 screws.

If you are planning to use the standard numpad arrangement, remember to print the switch stabilizer as well. It help keeps the 2U switches (enter, 0 and +) stable and not moving when you press the switch down.

Step 3: Populate the PCB

After the parts that can be out sourced to factories, now it is the hand crafting parts. Follow the diagram above to solder the parts in place. This will allow the MCU to perform a grid scanning on all the switches by activating each row (LOW activated) and read from each column (when the read is LOW, means that active row's reading column button is pressed).

The last diagram showcase the simplified circuit diagram of the PCB, in which the rows are low activated instead of the normal high activated. This design can save 1 10K SMT resistors compare to HIGH activated design, and therefore making the BOM list identical as the previous macropad design.

Step 4: Soldering the Switches

This numpad can be used as a macro-numpad if you populate all the 20 switches, or as a standard numpad if you only solder the 17 switches. Of course, you can always pick any number of switches in between like having one "0" and one "00".


Step 5: Installing Switch Stabilizer (Optional)

If you are using the standard numpad layout and solder only 17 switches, you might want to add the stablilizer parts to make the switch not wiggling around when pressed on the edge of the keycaps.

You can screw the stabilizer pieces in place using 2 M3 x 5 screws using the unused hole for the switches itself.

Step 6: Modify Firmware and Upload

You can find the firmware in the link below.

https://github.com/tobychui/4xMacropad/tree/main/4x5Macro-Numpad/firmware

By default, it act as a standard numpad or numpad + media controller (i.e. with the previous 4x macropad mode A default code integrated). However, if you decided to change the code to fit your need, you can edit the actions.ino. Each keys with col and row id are commented in code, which corresponding to the silk screen printing on the PCB. Each keys has its dedicated keydown (activate when the key is just pressed) and keyup (activate when the key is just released) function. You can feel free to modify the code to make any key press event you want!

If this is the first time you are programming a CH552G device, be sure to install the board manager for this MCU from the Github link below and follows its driver installation steps.

https://github.com/DeqingSun/ch55xduino

To upload the firmware to the numpad, follow the steps below (timing is important!!!)

  1. Press and hold the PROG button
  2. Click "Upload" in your Arduino IDE.
  3. When the sketch has finished compiled and ready to upload, insert the USB cable into your numpad and release the PROG button (Timing is important)
  4. Wait for the firmware to finish upload
  5. Unplug the numpad and plug it back after a few seconds for it to reset
  6. Test if the numpad is working by pressing random keys on the numpad


Step 7: Assemble the Numpad

There are 4 (or 3) screws hole where you can attach the PCB to the case. Screw in a few M2 x 5 screws into the hole onto the PCB into the base plate and secure the whole unit in place. You can also stick some foam tape to the bottom of the case to make it less slippery on your table.

Step 8: Your $8 Mechanical (macro) Numpad Is Completed!

Now you got yourself a $8 cool little numpad that you can play around!

All of the materials, design files and 3D model can be found on my Github repo over here:

https://github.com/tobychui/4xMacropad

Feel free to build one and share it with me :)