Main Content

The parts you need to make the keyboard macro box are:

Arduino Uno or an Arduino Leonardo

Momentary push buttons (I used 15 in my design)…

Jumper Wires, one for each button, power and ground pins.…

A Resistor (I used a Red, Red, Brown also known as a 220 ohm resistor)
Strip board/Breadboard
Soldering iron and solder.
Optional Electronics:

LED (External box power LED)
A Resistor (I used a 180 ohm resistor)
Housing Box:

6mm MDF (minimum 32cm x 24cm)
Handsaw/Jigsaw for cutting the pieces.
Wood Glue.
Varnish and a brush. (I used antique pine and gave my box two coats.
5mm drill bit to drill a LED hole.
10mm drill bit to drill wire hole.
16mm drill bit to drill button holes.
Double cut file. (Half-round and Rat tail)
Sand paper (120 grit)

You can make a cardboard housing if you are not good with tools, or for a starting prototype box. I am not the best with tools, but I am going to make a wooden box soon anyway, so this was good practice for that next project.

If you decide to make a wooden housing like I did, you will need tools. I glued my box together, so I eliminated the need for nails or screws.


The image above has the dimension for the box size I made, all numbers are centimeters. The larger pieces are the bottom and the top, the piece with the grid on is the top, I used a grid to figure out the center of each button placement.

The left and right pieces are the two slanted pieces, the back piece is the taller of the two remaining pieces, leaving the front piece as the remaining piece on the board.

The wood can be cut with a hand saw, jigsaw or a band saw if you have one at hand. I did it with a hand saw. Sand any cut or sharp edges after you have cut all the pieces. Also sand after drilling.


Then I used the 16mm drill bit to drill the hole for the buttons, try to keep the drill perfectly straight if you don’t have a drill press to guide the drill perfectly.

I don’t have a drill press so I had to do it by hand, a couple were not straight but a a half-round file was big enough, to fit in and smooth the inside out. I did the same file method once I varnished the top as varnish inside the button holes will stop them from sitting properly.

With the button holes drilled, I place the buttons in to see how it would look, if the buttons don’t fit, don’t force them in, file the hole with the half-round file then try and fit it in again. My wood was too thick to use the screws on the buttons, so I hot glued mine in place once the circuit was constructed, but more on that in the electronic section.

On my design I used a 5mm drill bit to drill a LED hole into the right side, the LED does not go all the way through because of the thickness of the wood, but it is bright enough that you can tell it is on without looking directly at it. Then on the left I made a 10mm hole then extended it with a rat tail file, to make way for the arduino power cable. If you are using the Leonardo, you should be able to make this hole smaller as the Leonardo uses a micro USB for power where as the Uno uses a USB type B. Just test the wire in between filing so you can get the wire through and back without too much force.

My Uno came with a plastic support tray that I use to hold my board inside the box, to figure out where this will go inside the box, I marked a line the thickness of the wood on the bottom of the box, so for my box it was 6mm from the back. I put the arduino tray against this line centered, then pencil marked dots where the plastic tray holes are. Then hammer some small nails in to hold the tray in place inside.

I used nails from cable clips, you want them long enough to go through the wood and be a pin for the board support tray to hold onto, but not too long that they will stab you or short out your circuit, the nail heads under the board might make the box not sit flat on your desk, some small rubber feet will help stabilize the box, I didn’t add these to my box as my box sits on some papers and they stabilize it enough for me.


With all the holes drilled, it is time to start gluing the box together, on the back of the top I measured in the thickness of the wood, so for my box it was 6mm on each side and drew a box, then using this box I glued three off cut pieces inside the box I drew, one on either side and one of the bottom, this is to hold the lid of the box in place, once all the wires are in. This can be seen on the internal picture that looks at the button wiring. Make sure there is no dust or sawdust on the wood before you glue, as it can effect the strength of the glue once dry.

Do a dry run to make sure all the piece of the bottom half fit together correctly first.

With the lid supports drying to one side, I applied a thin layer of wood glue on each joining piece of wood. starting with the back piece, gluing it to the bottom panel, I then did the two side panels, to the back piece and bottom and finally the front to the bottom and the two side pieces, with the glue still wet you can move them around to get them perfectly placed. If you are new to wood gluing you can glue one piece at a time to make sure they are positioned perfectly, but I prefer to do it all in one so I know they will all be in place relative to each other. The glue will take about 20-30 minutes to dry.

Once the glue has dried, place the lid on to see if it fits, my inside off cuts that hold the lid in place, were a bit too far over, so I filed the outer edges of them till the box fit on perfectly. You can also see if the board support tray will fit inside, if your nails are out of place, you can tap them back through and move them over, you can either leave the holes as they wont be seen, or you can fill in the hole with wood filler and sand it smooth once the filler is dry.


Once the glue has dried, you can move onto varnishing. Before varnishing the wood, give all parts you are going to paint a quick sanding. I used 120 grit sand paper. Make sure all saw dust is off the wood, before you apply the varnish, to make sure the varnish will stick. I varnished my box all in the same direction, to give it an even coat. I also gave the inside of the box one coat which is not necessary as it wont be seen. If the bottom wont be seen that also does not need a coat.

Varnish will dry at different rates, but I left mine for a couple of hours to make sure it was fully dry. Once the varnish is fully dry, you will want to sand down all varnished surfaces, then give it another coat. You can repeat this step again to give it a third coat, the more coats the darker the varnish will look when dries. I stuck to two coats as it looked good enough to me.

You will need to wipe any varnish out of the LED hole, cable hole and button holes as the varnish can block the hole up. If you can’t get it all out, you can just file the holes again once the varnish is dry. Varnish inside the box can also stop the lid from sitting nicely, so you will need to file away any varnish that has dripped down into the box as well.

With the box glued and varnished, I put the buttons back in and put it to one side to work on the electronics.”

Link to article

Related Content