Introduction: 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.
- Arduino Micro
- 16 tactile buttons
- Soldering Iron
- Micro Usb Cable
- Lot of Legos
- Button Holder*
- Base Plate *
- Arduino Micro Lego Holder*
*Requires 3d printer
Step 1: Print the Parts
You need to 3d print the parts and prep them for the build.
Step 2: Place the Buttons
Place the tactile buttons on the Bottom baseboard and solder them into place.
Step 3: 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.
Step 4: 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.
Step 5: 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.
Step 6: Drop in the 2x2 Bricks
The 2x2 bricks act as the actual buttons and fit perfectly over the tactile buttons.
Step 7: Writing the Code
Step 8: 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.