Introduction: LED Matrix Dessert Tray
Everyone loves desserts like cake. But you can make them even better by adding LEDs. By setting up an LED matrix under your dessert, you can make it light up and play animations. In this project, I am going to show you how to make a dessert tray with a built-in LED matrix that you can control with an Arduino.
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Watch the Video
Here is a video walkthrough of the project.
Step 2: Materials
Here are the materials and tools that you will need for this project.
5 x TIP31A NPN Power Transistor
5 x TIP42C PNP Power Transistor
10 x 1 kohm Resistors
5 x 100 ohm Resistor
Heat Shrink Tubing
Sheet of Clear Plastic (such as Plexiglas)
Cardstock or Poster Board
Soldering Iron and Solder
Needle Nose Pliers
Hot Glue Gun
Step 3: Mark Out a Grid for the LED Matrix
Take a large piece of white poster board or card stock and cut out a square that is 10 inches by 10 inches. Then use a ruler to mark out a grid of smaller squares that are each 2 inches by 2 inches. This should give you a total of 25 smaller squares in five rows and five columns. Each square will be one location in the LED Matrix.
I will be using two LEDs in each square. To center them, I made two lines connecting opposite corners of the square. This marks the center of the square. I then just marked two locations evenly spaced from the center point.
Step 4: Insert LEDs Into the Card Stock
Mark the locations of each LED. Then use a pin to poke holes for each of the leads.
Insert the leads of the LEDs through the holes. Be careful to keep all the LEDs in the same orientation. You want all the cathode going in the same direction and all the anode going in the same direction. The easiest way to check this is to make sure that the flat edge is on the same side of each LED.
Step 5: Connect Each Pair of LEDs in Parallel
You want the LEDs in the same square to turn on and off together. So you need to wire them together so that they are connected in parallel. There are a lot of ways that you can do this. I bent all the cathodes in one direction and all the anodes in the opposite direction. Then I used small pieces of heat shrink tubing to bind them together.
Step 6: Connect the Anodes of Each Row Together
Now we need to connect the individual squares together into rows and columns. First we will connect the anodes in each row together. Start by bending the ends of the anode wires so that they are running parallel with the row. Then take a long bare wire and using small pieces of heat shrink tubing attach this wire to the anodes. After attaching the wire to the anode leads, place a long strip of tape over each row to help insulate it.
Step 7: Connect the Cathodes of Each Column Together
Now you need to connect the cathodes of each column together. Bend each of the cathode leads so that they are parallel with the columns. Then take a long bare wire and using small pieces of heat shrink tubing attach this wire to the cathodes. After attaching the wire to the cathode leads, place a long strip of tape over each column to help insulate it.
Step 8: Test the LED Matrix
Now that you have assembled the LED matrix, you need to test it to make sure that all the LEDs are properly connected. The easiest way to do this is with a 3V battery pack. Connect the positive wire of the battery pack to one of the anode rows. Then connect the negative wire of the battery pack to one of the cathode columns. This will connect power to the LEDs that are in the square that is at the intersection of this row and this column. If the wires are connected properly, these LEDs should light up. Repeat this test with every row and every column in sequence until you have tested all 25 squares.
Step 9: Add Paper Dividers Between Each Squar
In order to keep the light from each square from diffusing over into the adjacent squares, I added paper divider between each set of lights. This was just a simple folded piece of white paper that I taped in place.
Step 10: Construct the Plexiglas Cover
Now you need to construct the plastic cover plate. This will serve as a surface for the dessert to be displayed on and it will protect the electronics.
I started with a 16 inch by 16 inch sheet of Plexiglas. Then I cut several pieces of 1/8 inch foam board to make the sides of the stand. I cut four pieces that were 3 inches by 16 inches and four pieces that were 3 inches by 10 inches. I used hot glue to attach these in two layers around the outside of the plastic. Try to keep the hot glue as close to the edge as possible. That way it isn't as visible.
Step 11: Construct a Transistor Switching Circuit to Control the LED Matrix
The simplest way to control the LEDs would be to connect them directly to the digital pins. You would activate each LED by sending a HIGH signal to the anode (rows) and a low signal to the cathode (columns). This would turn on the corresponding LED.
However, each digital pin can only output a maximum of 40mA. This was not enough to power the LEDs that I am using. So I made a transistor switching circuit that could handle much more current.
In this transistor circuit there is an NPN power transistor connected to each set of cathodes and a PNP power transistor connected to each set of anodes. In this configuration you would activate an LED by sending a HIGH signal to the base of the NPN transistor and a LOW signal to the base of the PNP transistor. 1 kohm resistors are attached to the base of each transistor to limit the base current. Series resistors are also added to each LED to bring the 5V signal from the digital pin down to the voltage of the LEDs.
Step 12: Upload Code to the Arduino
Now all that is left is to connect the transistor circuit to your Arduino and upload some code.
I have attached some examples of different kinds of patterns that you can try out. Many of these use a process called multiplexing. This is where a series of individual LEDs are turned on and off in sequence so rapidly that they appear to all be on at the same time. This necessary because of the way that the LEDs are addressed by the row and column.
Step 13: Finished LED Matrix Dessert Tray
Now your LED matrix dessert tray is complete. All you need to do is add your favorite dessert. You want to use a dessert that lets a lot of light pass through it. For instance, white cakes such as angel food cake work very well. If you want to use frosting, stick to light colored frosting and keep the frosting thin. You can also use things like Rice Crispy Treats.
This light-up dessert tray is a great way to add some fun to parties or any event where food is served.
Participated in the
Participated in the
Summer Fun Contest
Participated in the