Lego 4x4 Keypad Matrix
While I have been stuck in the house for the last few weeks, I have finally gotten around to finishing up some projects that have been swirling around in my head. I have been using Lego as the foundation for most of my projects in the last few weeks. I finally put my Google AIY kit together with legos, I also built a custom Apple Pencil holder using custom lego pieces. So it was time to move on to something a bit more challenging. I really wanted to use pieces that I have in the house and the legos were perfect. The only thing I had to order for the build was an Arduino Micro. I tried with other boards but this is honestly the best solution. It is plug and play. It was worth waiting a couple of days.
This week I tackled one of the projects I have been thinking about for a while. A 4x4 keypad matrix to script shortcuts for my computer. I have been also doing some work in photoshop and I wanted the be able to navigate back and forth a little easier. So I broke out the tools and got to work. I am going to disassemble this later to order bricks to make it a uniform color. But for now, here we go.
Supplies
- Arduino Micro
- 16 tactile buttons
- Solder
- Soldering Iron
- Flux
- Micro Usb Cable
- Lot of Legos
- Button Holder*
- Base Plate *
- Arduino Micro Lego Holder*
*Requires 3d printer
Print the Parts
You need to 3d print the parts and prep them for the build.
Place the Buttons
Place the tactile buttons on the Bottom baseboard and solder them into place.
Solder the Buttons in Place
Using the matrix diagram I soldered the buttons into place using a zigzag pattern for the rows. The goal was to just connect the rows across and the columns down.
Solder the Rows and Columns
I started by soldering the 4 red wires and 4 black wires to the Arduino Micro. Then soldered each of the wires to the columns and rows paying close attention to going in the right direction. The Arduino Micro was hot glued to the custom 3d printed Lego part.
Build Up Housing
I used a variety of 1x bricks to build up the housing. There are no bricks under the keypad. It attaches to the perimeter. Bricks are placed on top and in the center just to provide more stability.
Drop in the 2x2 Bricks
The 2x2 bricks act as the actual buttons and fit perfectly over the tactile buttons.
Writing the Code
Enjoy
I am super excited about creating art now with this keyboard because I can use the shortcuts I have created. I am thinking about how I am going to script each of the 14 keys.
I am excited about posting an update after I order a consistent color scheme of bricks.