ANYDECK-Macropad

by Anis-awl in Circuits > Microcontrollers

989 Views, 16 Favorites, 0 Comments

ANYDECK-Macropad

UIOO.PNG
Capture.PNG
et45.PNG
rgr.PNG
YYM.PNG

ANYDECK is a 6-key mechanical macropad I designed to be simple and useful. It uses a XIAO RP2040 controller and features two rotary encoders, a small OLED screen, and RGB lighting.

The goal was to make a sturdy desktop tool that is easy to build for managing shortcuts or volume.

Where Is PI "π"?

Hey everyone! Someone asked me a cool question: is the number π actually used in the ANYDECK?

The answer is yes, even if you don't see it! Since I used Fusion 360 to design the case, π is everywhere in the project:

  1. Fusion 360 Geometry: To create those smooth rounded corners and perfect circular holes for the knobs, Fusion 360 uses π in the background for every calculation.
  2. Rotary Encoders: When you turn the knobs, the whole mechanism relies on dividing a circle (2π radians). Without π, you can't have precise rotation for volume or zooming.
  3. 3D Printing: When the printer traces the circles I designed in Fusion, it calculates the nozzle's path using the formula C=2*π*r

Basically, even in a small keyboard project, math is working behind the scenes to make sure everything fits perfectly!

Preparation and Parts

Gemini_Generated_Image_5gly8d5gly8d5gly.png

Make sure you have all your components ready. You will need the XIAO RP2040, 6 switches, 2 encoders, the OLED screen, diodes, and LEDs. Also, prepare your soldering iron and solder wire.


PCB and Case Fabrication

PCB: Get your circuit board manufactured (or etch it yourself).

3D Printing: Print the two parts of the case (Top and Base). Using PLA or PETG plastic is best.

for the file : https://github.com/ANYplays77/ANYDECK-Macropad

Soldering the Components

come_saladare.jpg

Follow this order to make soldering easier:

  1. Diodes: Solder the 8 diodes first. Important: The black line on the diode must match the mark on the PCB.
  2. RGB LEDs: Solder the Neopixel LEDs for the backlight.
  3. Controller: Solder the XIAO RP2040 onto the board.
  4. Interface: Solder the OLED screen and the two rotary encoders.


Mechanical Assembly

UIOO.PNG

Take the Top Case and click the 6 switches into the holes.

Place the PCB onto the pins of the switches.

Solder the switch pins to the PCB.

Screw or snap the Base onto the top part to close the device.

Add your keycaps and the knobs for the encoders.

Programming (Firmware)

Connect the ANYDECK to your computer using a USB-C cable.

Install CircuitPython or KMK firmware (usually by dragging and dropping a file onto the device).

The macropad will appear as a USB drive. Open the file named code.py.

Type your shortcuts (like Ctrl+C, Ctrl+V, Volume+, etc.) in this file and save it.

for the firmware : https://github.com/ANYplays77/ANYDECK-Macropad

Final Test

Press the keys and turn the encoders. Check if the OLED screen shows the actions and if your computer responds correctly.