Pacman/Ghost LED Matrix

by monsely in Circuits > Arduino

4770 Views, 59 Favorites, 0 Comments

Pacman/Ghost LED Matrix

Screen Shot 2022-07-08 at 5.14.08 PM.png
Screen Shot 2022-07-08 at 5.14.33 PM.png

We created a LED matrix that shows a Pacman and a Ghost. The figure changes by pressing a button. Also, the ghost takes the color according to the external temperature. It means, if it is cold, the figure turn blue, but if it is warm outside it will change to red.

Supplies

  • 71 leds (led strip)
  • 1 push button
  • 1 Arduino Uno
  • 1 Temperature sensor BME280
  • Cardboard
  • Translucid paper
  • Jumpers
  • Power supply 5V

​Shape

Captura de Pantalla 2022-07-02 a la(s) 12.18.40.png
Captura de Pantalla 2022-07-02 a la(s) 12.18.49.png

To start with the project, we built-up the idea on paper in order to know how many LEDs we could assign and how to place and connect them.

With the same structure for the ghost, we set it for the Pacman shape.

Connect Wires

Captura de Pantalla 2022-07-02 a la(s) 12.22.54.png
Captura de Pantalla 2022-07-02 a la(s) 12.22.34.png
Captura de Pantalla 2022-07-02 a la(s) 12.22.48.png

Now, we already know how to place and connect the leds for the different shapes. Then we cut and solder the led strip, in a way to make easy at the moment to set the leds.

Place the Led Strip on the Platform

Captura de Pantalla 2022-07-07 a la(s) 16.50.10.png
Captura de Pantalla 2022-07-02 a la(s) 12.22.21.png
Captura de Pantalla 2022-07-02 a la(s) 12.22.15.png
Captura de Pantalla 2022-07-07 a la(s) 16.39.05.png

Then, we design a platform where we are going to place the LED strip. Here is the design. Once it is cut by the laser cut, we placed the LED strip.

Connect the Arduino

Captura de Pantalla 2022-07-07 a la(s) 16.40.58.png

Once all the wires are connected and placed, we connect everything to the Arduino. The sensor is located on pin A4. The push btton is located on pin 4. And the LEDs are connected to pin 7.

Grid Creation

Captura de Pantalla 2022-07-07 a la(s) 16.53.33.png
Captura de Pantalla 2022-07-02 a la(s) 12.22.28.png
Captura de Pantalla 2022-07-07 a la(s) 16.41.18.png

Next, we design the grid structure. This structure will help us to create squares for each LED, also it allows the LEDs to glow more. Then we set the translucent paper so the lights can stand out.

Box Creation

Captura de Pantalla 2022-07-07 a la(s) 16.56.08.png

Afterwards, we created a box to place the whole project, where we can “hide” the Arduino. For this, we use an A-Box template.

Build-up the Project

PXL_20220708_141049052.jpeg
Screen Shot 2022-07-08 at 5.15.56 PM.png
Screen Shot 2022-07-08 at 5.14.33 PM.png
Screen Shot 2022-07-08 at 5.15.06 PM.png
Screen Shot 2022-07-08 at 5.14.08 PM.png

We put together all the structure built before. The Arduino and the power supply are placed inside the box, allowing the LED grid to stand out externally. The pushbutton is located in one of the walls of the box and once you press on it, the Pacman animation starts. When you press again, the ghost animation starts. This last animation may vary depending on the ambient temperature. When the temperature sensor detects a cool weather, the ghost turns blue, while when there's a warm weather it turns red.

Code

Here you can find the Arduino code for this project.

Authors

Monserrath Velasco

Santiago Guerra