Infinity Macro Pad Using Pi Pico

Hello DIY makers and codersā€¦. Today I'm presenting my version of a custom Macropad with a Raspberry Pi Picoā€¦.
I named this as ā€œInfinity Macropad 1.1ā€³ā€¦.the project is based on the adafruit Circuit Python and runs HID functionality onboardā€¦.

This Macropad has

  • 20 individual tactile push buttons
  • 3 Rotary encoders
  • 1 Joystick
  • 1 Ws2812b Status RGB LED
  • Micro usb port
  • Inclined kickstand

I want to make this project completely open source and share the whole setup with everyone free of costā€¦ And for that purpose I need a good amount of help from people who are expert in circuit python programmingā€¦ Pls helpā€¦

. So without wasting anyone time..lets get startedā€¦

Step 1: Understanding the Project and Chossing Right Microcontroller

I wanted to make a macropad.. Which will have enough buttons for almost every programs and applicationsā€¦

Fow which I decided to include 20 buttons, 3 rotary encoder and a joystickā€¦ (these encoders and joystick also have their own push buttonsā€¦)

Now.. For making the projectā€¦ The most powerful but compact microcontroller was the Raspberry Pi Picoā€¦

Step 2: The Parts We Are Gonna Needā€¦

For making the projectā€¦ We will need these parts.


  • 20 tactile switchesā€¦(12*12*12 switches)ā€¦ I could have gone with cherry mx switchesā€¦ But they are much pricer
  • 3 rotary encoder modules
  • 1 XY joystick module
  • 1 ws2812b led module
  • 20 4148 switching diodes
  • Raspberry Pi Pico
  • 10 * 10 cm zero pcb
  • 5 screws (3mm thick)
  • My 3d files or your ownā€¦


  • 3d printer
  • Fusion 360 or any other CAD software
  • PLA or favorite plastic roll
  • Spray paint (optional)
  • Some random tools

Step 3: Preparation of the PCBā€¦

Firstly print my given template for the PCB boardā€¦

Cut it out and carefully allign with the board and stick itā€¦

After that using the guide linesā€¦ Cut the PCB boardā€¦ I used my small coping sawā€¦ You can use whatever availableā€¦

After the cutting is done.. Carefully place the switches in their placesā€¦ And mark their location on the boardā€¦

Step 4: Adding the Push Buttonsā€¦

Now with the previously made markingsā€¦ Place the switches in their corresponding placesā€¦.

Make sure the placements are perfect.. Otherwise it will be very hard to rectify it laterā€¦

Double check their placementsā€¦

Now.. Bend 2 legs of the buttons and solder them on the boardā€¦ You can solder all 4 legs.. But it will increase the confusionā€¦

Step 5: Placing the Matrix Diodesā€¦

We are making a 4*5 button matrixā€¦ And for that purposeā€¦ We also need some diodesā€¦

You can use normal 4007 diodesā€¦ But everyone suggest to use 4148 switching diodesā€¦ So.. I'm going with them alsoā€¦

The circuit would be look like thisā€¦ šŸ‘‡

Make sure of the polarities of the diodes and the directions of themā€¦

In my project.. I places them in two ordersā€¦ But the wiring is sameā€¦ It's just to make them tidyā€¦

Use thin copper wire.. I used 26 gauge wires.. And connected all the columns together..

Then the drain of the switches to the diodeā€¦

The output of the diodes together in seriesā€¦ To form 5 individual rowsā€¦

Use reference pictures for better understandingā€¦

Step 6: Drill the Mounting Holesā€¦

I did this step after the wiring is done.. Because I'm obviously a professional dumbā€¦

You should do this step before the wiringā€¦.

I dodged the bullet in first chance due to my prior thinking and because it's my design.. But it might be devastating for youā€¦

So don't make my mistakesā€¦

I simply drilled the hole with 4 mm drill bitā€¦ And as always I messed up the holesā€¦ They were not in right spot..anf not perfect roundā€¦ So I used my rotary tool with a tungsten carbide bit.. And fixed those issuesā€¦

Step 7: Remove the Header Pinsā€¦ and Paint the Caseā€¦

It's the time.. When you should remove the male headers from the rotary encoder modules and the joystick modulesā€¦

Also it's a good time to add wires to themā€¦ So you don't have to do them laterā€¦

After the wiring is doneā€¦ It's time for painting the macropad bodyā€¦

Though it's a optional stepā€¦ You can directly print in your desired colourā€¦ Butā€¦ I did it anywayā€¦

Firstly I painted the body with spray paint.. And then finished with clear coatsā€¦ (I later printed the main body againā€¦ Due to some design issueā€¦so then I changes the colour.. From black to gold)ā€¦

Step 8: Assembling the Partsā€¦

  • Firstly start the assembling with the led coverā€¦ It's designed to be just friction fitā€¦ But I later used some E7000 glue for better fixingā€¦
  • Add the rotary encodersā€¦ One thing I want to mention hereā€¦ The rotary encoders have small notch type thingsā€¦ We need to either bend them flatā€¦ Or cut them offā€¦ Fix them with the provided washer and nutsā€¦
  • Now add the joystick module.. In it's place.. And secure with the 3 screw holes providedā€¦ I again used some E7000 for better fixingā€¦
  • Place the button matrix in it's placeā€¦ And secure with the screws and some washersā€¦
  • Add the Raspberry Pi Pico.. And fix it with some E7000 glueā€¦ It's very important here.. Because.. Due to my design limitationsā€¦ I done have space for mountaing it properlyā€¦ Thoughā€¦ I have plenty support structures in many placesā€¦ (find them outā€¦)

One thing I want to say here.. Thatā€¦ You have to trim the excess solder joints from the modules and cover thm with glueā€¦ For makeing sure that nothing sorts with the Pi picoā€¦ And it sits flushā€¦

Step 9: Reprint the Whole Main Bodyā€¦

I made some boo boosā€¦. In my designsā€¦ And also accidtly melted the previous body with slight tough of my soldring ironā€¦ So I had to print another pieceā€¦

Nowā€¦ I painted it with gold paintā€¦ And it looks way better than previous oneā€¦ I am telling youā€¦ This rustic gold colour is way beautiful than the previous black colourā€¦.

Step 10: Wiring Timeā€¦!!!

I again assembled every parts in their intended places againā€¦ And it's time for the wiringā€¦

One thing you should notice before starting the wiringā€¦

Pi Pico has many io pins.. And in thoseā€¦ Only 26 gpio pins are usable(still way much than arduino boardsā€¦)

Alsoā€¦ Pico has ground pins on every 5th pinsā€¦ With square padsā€¦ So mind those one alsoā€¦


Wiring timeā€¦.

  • I connected all coloums to the GP 0, GP1, GP2, GP3 pinsā€¦
  • All rows to GP4, GP5, GP6, GP7 & GP8 pinsā€¦
  • The first rotary encoder to GP9, GP10 & GP 11ā€¦
  • Others two encoders to GP 12,13, 14,15,16 & 17ā€¦
  • The joystick module to GP 18,19 & 20ā€¦.
  • And the Ws2812b led To GP21 pinā€¦

*follow my wiring diagramā€¦

Also all the grounds to ground pinsā€¦ And the 5 volt pins to GP40 (Vbus) pinā€¦ (5.volt output pin)

Step 11: Add the Knobs.. Closing the Project..

It's the best timeā€¦ Of this whole projectā€¦

Simply place the rotary encoder knobs and joystick module stickā€¦

Now with 5 simple 3 mm screwsā€¦ Simply close the projectā€¦. (you should only close once.. Because the coding part is still not done yetā€¦

Step 12: Add Finishing Touchesā€¦

I used some yellow glass paint.. And added some in the holes in the knobsā€¦ It's totally esthetics' purposeā€¦ And not a mandatory stepā€¦

You can customize each button with custom colors or decalsā€¦ though I wanted to add multiple layouts for different apps and software.. I didn't specify any keysā€¦

Step 13: Installing Firmware on the Microcontroller

The Raspberry Pi Pico runs on the Programming Language called ā€œCircuit Pythonā€ā€¦ and CircuitPython is a programming language designed to simplify experimenting and learning to code on low-cost microcontroller boardsā€¦

The for installing the circuit python on Pi Picoā€¦ we have to go through a simple processā€¦

1stā€¦Ā Firstly download the ā€˜.UF2' file from the official website of Adafruitā€¦Ā Link

2ndā€¦Ā Press and hold theĀ BOOTSELĀ button of the Pico..connect a Micro Usb Cable with it.. and while pressing the button.. connect the USB cable with your PCā€¦ the pico will show as a USB storage device (RPI-RP2) in the computerā€¦

3rdā€¦Ā Drag and drop the previously downloaded file in the Drive.. and then the pico with restart by itself. and then it will appear asĀ CircuitpyĀ driveā€¦

4thā€¦Ā You are now Good to goā€¦ now download

These are the Circuit Python supported IDE software that will be used for writing and editing your codesā€¦

You can watch this video for a better understandingā€¦Ā hereĀ orĀ here

Step 14: Preparing the Code

And this is the place.. where I messed things upā€¦

firstly I want to clarify one thingā€¦ I'm not an electrical engineer and I have zero skills in codingā€¦ I have tried one project with Arduino in past.. and that barely survivedā€¦ and this is Circuit python.. completely new for me and the source materials or supportive documentation are very low and hard to findā€¦ there is almost no guide for the problems I faced while creating this projectā€¦

Which resulted in a monstrosity of codeā€¦ I messed up the codeā€¦.and it's not working how I anticipatedā€¦

the buttons and the rotary encoders and the joystick module with the led.. all these are working. But I can't put the whole code togetherā€¦

By the wayā€¦ If you know how to write codes.. thenā€¦ just download the important libraries from the adafruit websiteā€¦ I have collected someā€¦ but I'm not sure which are important and which are needed for this projectā€¦

I want someone or many of you who know coding better than me to put together the messed-up codeā€¦ and pls help me to create an open-source Micro pad for every Creators..who deals with video editing, photoshop, 3d CAD softwareā€¦ The Price of these professional keypads is easily gone over 150 $ price pointā€¦ So If I get proper help from other creatorsā€¦ I can make this project completely open-sourceā€¦which will lower the cost of this particular cost by under 15$.

Step 15: Scope for Future Upgradation and Improvementsā€¦

For the projectā€¦

  • I added 20 push buttons which will be addressed individually for different actions in different softwareā€¦
  • The top right encoder will be used for selecting the modes
  • The top left endoder will be dedicated to media control and other functions. like screen brightness, track changes, and many more(which are possible) and the integrated push button will be used for changing different modesā€¦
  • Ā The Big wheel will be used especially for editing and another purpose like ā€” scrolling in the timeline, zooming in the timeline, selecting different options in photoshops, scrolling up-down, and left-right in text editors, and many more.
  • The joystick is still dedicated for Rotating the viewfinder in Fusion 360 & blender with simple page un down or left-right in browsers or text editorsā€¦
  • Lastly, the RGB led for Indicating the Different modes(In which software its currently selected by showing dedicated app logo color with custom hex color codesā€¦) and some status indicators like error showing.. or increase or decrease of volume with brightnessā€¦ Or even a custom Startup animation and so onā€¦

This project might be a very versatile project which will not be a game-changer for DIY World.. But also for the Maker community..Pls, help me to get to that pointā€¦I am extremely excited to collab with willing persons for this projectā€¦I have done to my capabilities..and now I need some helpā€¦

Anyone who wants to help me to build firmware for this projectā€¦ will get a warm-hearted welcomeā€¦pls email me or message meā€¦so that I will be able to continue this projectā€¦

Source: Infinity Macro Pad Using Pi Pico

About The Author

Muhammad Bilal

I am highly skilled and motivated individual with a Master's degree in Computer Science. I have extensive experience in technical writing and a deep understanding of SEO practices.

Scroll to Top