Christmas is here again, and whether it’s your favorite holiday of the year or it makes you sweat, the decorations are starting to rise. This year, why not use some DIY technology in your jewelry to make it stand out?
In this project, we will build a weatherproof and motion-activated 8 x 8 LED array from scratch for less than $20. It is designed to be placed in the center of a standard Christmas door wreath, although it can be used anywhere in the home. And since it’s battery operated, anywhere away from home too!
For this project you will need:
- I used the Nano for its small size, but you can use almost any Arduino compatible microcontroller.
- 64 x red LEDs.
- 8 x 220 ohm resistors.
- IR motion sensor.
- Lots of Arduino starter kits go with it. I bought a multi-pack from Amazon for $10.
- 1 piece breadboard.
- The one used here was 9 x 7 cm, although you can use any size you want.
- Battery 7-12V.
- A simple rechargeable battery is used here for budgetary reasons, but the mobile bank charger batteries may take even longer.
- Assorted short pieces of wire.
- Tupperware box or similar weatherproof case.
- Make sure it’s big enough to fit all your components inside!
- Christmas wreath.
- Any will do, just make sure the case box will fit in it.
- Soldering iron and solder.
While this is not strictly necessary since you can solder components directly to the Nano, I also found a small breadboard very useful when testing. The hot glue gun also helps to bring all the pieces together.
We’ll start with the Arduino circuit diagram and the wires we’ll be connecting to our IR sensor and LED array.
Inside the Matrix
Now to make our matrix of 8 x 8 LEDs. It’s a good idea to start by creating one row and one column of the matrix to make sure it’s exactly where you want it on the breadboard.
In the photo above, all the LEDs are positioned so that the anodes (the longer positive leg) point towards the top of the board. This is important as we will be creating columns of common anodes by connecting them together and rows of common cathodes (shorter negative branch). Getting it right now will save you a headache later!
We’re going to build a generic cathode matrix of rows, this diagram shows how it’s all connected.
This may seem a bit complicated at first, but it’s a fairly simple configuration. In each row, all cathodes are connected from right to left and then attached to one of our Arduino pins. After that, we do the same for each column of anodes. So, depending on which column we apply power to and which row we connect to ground, we can turn on any individual LED in the array.
Let the soldering begin
Start by placing your first row of LEDs. Make sure all anodes are facing up and turn them over. I found that adding another LED to each corner and attaching another piece of proton on top with an elastic cord helped hold everything in place.
Now, one by one, bend the cathode (short) leg of each LED to the left so that they all overlap each other. It’s easiest to start on the left side and work to the right. If you are using most of the prototype, you can solder them to the board first and connect them together using the pads. Be careful not to connect the cathodes to any of the other lines on the board or to any of the anodes!
Repeat this process for all eight lines, and when you’re done, you should end up with something like this: