Altium
Advance Projects

LED Arcade game using Arduino and WS2812B LED strips

LED Arcade Game, Introduction:

Led Arcade Game

LED Arcade game using Arduino-Hey Readers in this post I will be sharing an amazing project which is called as LED Arcade game, you might or have seen this somewhere else like in malls or other places. Well in this article I will be sharing detailed step by step instructions along with free codes and circuit diagram that will help you all the way to build this amazing project.


How LED arcade game works:

Well there are lots of other variants in the market but I made the classiest one which you must definitely check out, This game works with very simple logic.

The game is controlled by a single toggle button and there are LEDs arranged in circular manner, when we power up this project there is a welcome panel that displays still rainbow color patterns.

Now you can start the game by pressing the toggle button once, now the game automatically resets to level 1 followed by LEDs lights running.

The aim is to stop the running led using toggle button when the running led reaches the target led, if you make it to the target the entire strip glows with green and you can start playing next level that has more speed of running LED’s than the previous version, if you miss the target the LED strip immediately changes to red and the game resets to home position by displaying the default rainbow colors.

Now as I explained the logic of game, we will see what are the required materials for this LED arcade game

  • Arduino Uno or Arduino Nano
  • WS2812B LED strips (one long and one short with 5 LEDS)
  • Few jumper wires or single strand wires
  • Mini breadboard
  • Double side adhesive tape
  • Programming cable and Arduino IDE
  • A circular disc of cardboard and few stripes
  • Hot glue or normal glue



Amazon Links:

Arduino Uno

Arduino Nano

WS2812 Led Strip

Other Tools and Components:

Top Arduino Sensors:

Super Starter kit for Beginners

Digital Oscilloscopes

Variable Supply

Digital Multimeter

Soldering iron kits

PCB small portable drill machines

*Please Note: These are affiliate links. I may make a commission if you buy the components through these links. I would appreciate your support in this way!


Few Things you should know about WS2812B Led strip

Led Arcade Game

These are special type of LED strips unlike conventional LED strip lights that comes with 2 terminals one for + power supply. and one for -ve negative power supply these comes with 3 terminals 2 for positive and negative power supply and one for signal input.

From the macro image shown above you can see clearly the terminals, Di is the additional terminal that separates this from conventional strips, Di means signal input and you can use this terminal to send commands to each LED in a strip.

For Instance if you are having 50 LEDS in a WS2812B led strip, you can set the timing values as for what time it should glow and what colors it should display, Hence these go by the name addressable LED strip.

Even there is no limit for the color that these types of strips can display, hence these are the perfect fit for this project!

In my project I used 39 leds, you can choose your own number of leds, but I recommend you to use at least 30 for good outcomes.

This is the main strip on which LEDs run, now to display the level or called as level indicator we need a strip of 5 leds.

I soldered them with jumper wires so that we can connect them easily.

I have shown the below image for your reference.

Note: When soldering the wires to the strip board make sure to solder in the direction of signal flow, You can check for the direction of arrow that is printed near Di.

Led Arcade Game

Once you prepare these 2 types of strips which play a main role in this project we can start preparing frame that holds these together.


Taking account of length of strip prepare a disc.

I used normal cardboard to cut out the circle and to make the light effect more appealing I wrapped the cardboard with white sheet of paper using paper glue and allowed to dry for some time, You can add strip of thick cardboard around the corner of disc that support the strip.

Led Arcade Game

So most of the led strip comes with dual side adhesive tapes, but you can use them if you are not using this strip anywhere in future because after using the adhesive from back side of strip it becomes non reusable.

Hence I recommend using an additional adhesive tape to couple the strip around these corners.

After adding LEDs around the corners, you will have this.

Also provide small holes at the end of connection wires, and a small space at the front panel to add buttons.

Note: You can place level indicators anywhere; it’s up to your convenience.

Led Arcade Game

Led Arcade Game

After this part we can work on circuit building, just follow the circuit diagram shown below.


Circuit diagram of Arcade LED game:

Led Arcade Game

 

This is the circuit that need to be followed for our project, the connections are very simple and easy to make.

Here is the circuit diagram explanation:

As said earlier WS2812B led strip has 3 terminals out of which 2 are for power input, as we have 2 different set of led strips we connect both of the power input points to power rails on a breadboard.

One end of toggle switch to negative power rail of breadboard.

Now the Main game strip signal pin or called as Di will be connect to D2 pin of Uno.

Level indicator strip signal pin to D6 pin on board.

Toggle switch other terminal to D4 pin of Uno, For the power we will be using 5v and gnd pins of Uno that are connect to power rails of breadboard.

This completes our circuit, one thing that needs to be noted here is if you are planning to connect more than 40 Leds I recommend to use an external power source to power the led as too much LED on a strip draws too much current that might damage the board.

Here is an additional circuit diagram for external power supply

Led Arcade Game


This is our circuit and we can implement the same which can be seen in the image below

Led Arcade Game

To keep everything in place I will be using double side adhesive tape, Just connect the jumpers and our circuit is complete

I added an extra coverings and a detachable type battery connection so that there is no need for a switch

Led Arcade Game



Codes for Arduino LED arcade game:

You can use this code on your Arduino ide.

Before uploading the code to board here are few things which you need to consider in this project.

Led Arcade Game

I have included the comments for some of the main functions of the project

But here are few important changes that you might want to make

  • Num of led, as my number of led is different from yours make sure to add the numbers present on your strip
  • As we have 5 levels you can make this a level 4 game by using only 4 lights on a strip and making the changes in Define SCORE_LEDS 4
  • At the beginning we are calling the fastled library, if you don’t have library you can just download it from the GitHub and install on your Arduino ide
  • Just download the zip files of the library and then check for Sketch option on IDE menu and choose include library and then .zip library and use the downloaded file
  • Now you can upload the code to board
  • Once the upload is complete, disconnect the programming cable and connect power supply from battery
  • LED strip displays rainbow colors which is a staring screen, now you can start the game by pressing toggle button
  • You will start from level one which is easy followed by higher levels
  • Using toggle button try to stop the light when it hits the target light
  • If you do this usefully you will be taken to next level if not game will reset

Led Arcade Game

This completes our project, any additional information will be provided if you want, just let us know in the comments.

Watch Video Tutorial:

 

 

Engr Fahad

My name is Shahzada Fahad and I am an Electrical Engineer. I have been doing Job in UAE as a site engineer in an Electrical Construction Company. Currently, I am running my own YouTube channel "Electronic Clinic", and managing this Website. My Hobbies are * Watching Movies * Music * Martial Arts * Photography * Travelling * Make Sketches and so on...

Leave a Reply

Back to top button
%d bloggers like this: