Blueprint

MEGAPAD

A macropad with 2 encoders, an IO expander, an LED Matrix and 16 keys

Created by pui4 pui4

Hackpad

5 views

0 followers

CAN CAN ⚡🚀 approved MEGAPAD ago

Tickets awarded: 130 tickets

Tier: 4

Awesome project!

samliu samliu ⚡🚀 submitted MEGAPAD for ship review ago

cubit010 cubit010 ⚡ requested changes for MEGAPAD ago

fixing paglu perma reject!
you should be good to resubmit now!

Tier: 4

pui4 pui4 submitted MEGAPAD for ship review ago

pui4 pui4 added to the journal ago

Just finished building it

ITS DONE!!!

The boards arrived, the case was printed and the components were soldered.
20260330_224914

THE PCB

20260330_224150
20260330_224144
I ordered the PCBs from JLC and they arrived in a reasonable amount of time. I wasn't expecting them to work properly first time and they didn't (I'll get to that later). I managed to lose the original MCP23017 that I was going to use and so I had to order a new one. Once that arrived I soldered on the XIAO RP2040 and the LEDs (which were a complete pain in the ass to solder and I regret putting them so close together) and the diodes. I hadn't soldered anything else yet as I need the plate to solder the switches and there was some issues with the clearance with the plate. I then began to test the board that I had already assembled.

That is when I encountered my first issue with the board - the unpredictable IO expander. When I fixed the firmware and uploaded it to the board, the IO expander wasn't being detected properly. I then uploaded an I2C scanner onto the board and saw that the address kept changing. I then realized that I had forgotten to ground the address select pins on the MCP23017 meaning that it's address kept changing whenever it felt like. So I shorted the 3 pins to ground and it worked 50% of the time.

That brings us to the second issue - the ghostly IO expander. There was a 3 in 10 chance that the board would power on and work with no issues. Until after a while it would just stop seeing the IO expander. I was pulling my hair out trying to solve this. I read that it might have been the fact that I didn't have pull up resistors on the I2C bus (even though the XIAO is supposed to have them built in). I then realized that I hadn't connected the reset pin on the MCP23017 meaning that it would just reset randomly and drop off the I2C bus. With that fixed the IO expander issues were solved.

That brings us to the third and final issue - the reversed encoders. This isn't as big of an issue as the others but it still deserves being talked about. Instead of wiring the encoders so that the switch was on the matrix and the A and B pins were connected directly to the micro controller. I managed to reverse it resulting in the A and B pins being on the matrix and the switch pins being directly wired up to the micro controller. It's not a massive issue as the encoders will still work but they will be weird in the firmware and it may miss some inputs as I can't tie them to hardware interrupts.

THE CASE

20260330_224815
20260330_224202
After many reversions the case works. However, I would like to list some issues that required a design review.

Issue one - keypad alignment. When I designed the plate I used an online keyboard plate generator. Then I tried to align the design to the STEP file (which didn't have the silkscreen so I couldn't align it properly) it didn't go well. It was like 8 millimeters off from where it was supposed to be. So after aligning it properly (now that I had the PCBs) it was good to go.

Then there was issue two - the tall IO expander. The evil IO expander was rearing it's head again. When I went to solder the switches on (attached to the plate) I noticed that the plate wouldn't sit down properly. It was the height of the IO expander. So I went searching for a model, nothing. At this point I was done so I just cut a hole in the top plate and called it a day. Whilst I was there I added a gap to see the LED on the XIAO and access the buttons, which would become very useful later.

FIRMWARE

I had stated before that I wanted to write the firmware from scratch in C++. I started with a library for the MCP23017 and got frustrated at it not working (even though it was a PCB issue as I mentioned earlier). So I switched back to KMK with circuit python. Also as I stated earlier, I didn't wire the encoders up properly and currently they do not work in the firmware (easily fixable though). Also I chose to use KMK over others like QMK as it was the only keyboard firmware that supported all of the things on this macropad.

CONCLUSION

There is still a long way to go on the firmware side but the hardware "works". I have yet to update the PCB and the firmware on the GitHub repo. However the CAD designs are up to date. For a first PCB I think it went well. I mean 50% of the components worked and 50% is a pass so that is good enough for me. Thank you for reading and good luck with your projects!

m0.hid m0.hid ⚡ approved MEGAPAD ago

Nice work!! I really love this hackpad, and the case looks really cool as well!

pui4 pui4 submitted MEGAPAD for ship review ago

m0.hid m0.hid ⚡ requested changes for MEGAPAD ago

Hey! This looks like a really cool hackpad, I love the pcb design of it! Can you just upload your gerber files to the repo please since we need those in order for your project to be fully shipped! Otherwise it looks really awesome!!

pui4 pui4 submitted MEGAPAD for ship review ago

Shadow Shadow requested changes for MEGAPAD ago

Hey! Very cool hackpad but I see that you are using an IO expander which isn't provided in the kit. Will you be sourcing it?
Although your PCB is very cool , it exceeds the limit of 100 by 100 mm! Could you please keep it under that?
You also need to have an assembled model ( with the PCB and the case ) and need to upload the source files for your CAD
Thanks

pui4 pui4 submitted MEGAPAD for ship review ago

pui4 pui4 started MEGAPAD ago

3/31/2026 - Just finished building it

ITS DONE!!!

The boards arrived, the case was printed and the components were soldered.
20260330_224914

THE PCB

20260330_224150
20260330_224144
I ordered the PCBs from JLC and they arrived in a reasonable amount of time. I wasn't expecting them to work properly first time and they didn't (I'll get to that later). I managed to lose the original MCP23017 that I was going to use and so I had to order a new one. Once that arrived I soldered on the XIAO RP2040 and the LEDs (which were a complete pain in the ass to solder and I regret putting them so close together) and the diodes. I hadn't soldered anything else yet as I need the plate to solder the switches and there was some issues with the clearance with the plate. I then began to test the board that I had already assembled.

That is when I encountered my first issue with the board - the unpredictable IO expander. When I fixed the firmware and uploaded it to the board, the IO expander wasn't being detected properly. I then uploaded an I2C scanner onto the board and saw that the address kept changing. I then realized that I had forgotten to ground the address select pins on the MCP23017 meaning that it's address kept changing whenever it felt like. So I shorted the 3 pins to ground and it worked 50% of the time.

That brings us to the second issue - the ghostly IO expander. There was a 3 in 10 chance that the board would power on and work with no issues. Until after a while it would just stop seeing the IO expander. I was pulling my hair out trying to solve this. I read that it might have been the fact that I didn't have pull up resistors on the I2C bus (even though the XIAO is supposed to have them built in). I then realized that I hadn't connected the reset pin on the MCP23017 meaning that it would just reset randomly and drop off the I2C bus. With that fixed the IO expander issues were solved.

That brings us to the third and final issue - the reversed encoders. This isn't as big of an issue as the others but it still deserves being talked about. Instead of wiring the encoders so that the switch was on the matrix and the A and B pins were connected directly to the micro controller. I managed to reverse it resulting in the A and B pins being on the matrix and the switch pins being directly wired up to the micro controller. It's not a massive issue as the encoders will still work but they will be weird in the firmware and it may miss some inputs as I can't tie them to hardware interrupts.

THE CASE

20260330_224815
20260330_224202
After many reversions the case works. However, I would like to list some issues that required a design review.

Issue one - keypad alignment. When I designed the plate I used an online keyboard plate generator. Then I tried to align the design to the STEP file (which didn't have the silkscreen so I couldn't align it properly) it didn't go well. It was like 8 millimeters off from where it was supposed to be. So after aligning it properly (now that I had the PCBs) it was good to go.

Then there was issue two - the tall IO expander. The evil IO expander was rearing it's head again. When I went to solder the switches on (attached to the plate) I noticed that the plate wouldn't sit down properly. It was the height of the IO expander. So I went searching for a model, nothing. At this point I was done so I just cut a hole in the top plate and called it a day. Whilst I was there I added a gap to see the LED on the XIAO and access the buttons, which would become very useful later.

FIRMWARE

I had stated before that I wanted to write the firmware from scratch in C++. I started with a library for the MCP23017 and got frustrated at it not working (even though it was a PCB issue as I mentioned earlier). So I switched back to KMK with circuit python. Also as I stated earlier, I didn't wire the encoders up properly and currently they do not work in the firmware (easily fixable though). Also I chose to use KMK over others like QMK as it was the only keyboard firmware that supported all of the things on this macropad.

CONCLUSION

There is still a long way to go on the firmware side but the hardware "works". I have yet to update the PCB and the firmware on the GitHub repo. However the CAD designs are up to date. For a first PCB I think it went well. I mean 50% of the components worked and 50% is a pass so that is good enough for me. Thank you for reading and good luck with your projects!