Wheel of Doom

by 820321 in Circuits > Arduino

30 Views, 1 Favorites, 0 Comments

Wheel of Doom

unnamed.png
Screenshot 2026-01-21 182508.png

Hi, my name is Shayan Usman, and today I will be showcasing my final project. For this project, I have created "The Wheel of Doom".

The objective of this game is to spin a wheel (Servo Motor), using an IR remote and make it stop at a random position. The servo spins 180 degree not a full 360, once the wheel stops, it will give you a designated task that you must complete within 9 seconds, an example is spelling your name backwards. To indicate that you have successfully completed the task, you press a completion button located to the right side. If the task is not completed in time, a red light will indicate that you have failed.

This is how you play the game: "You begin playing the game, and the wheel, which is connected to a servo motor, rotates constantly. When you press the IR remote control button, the wheel freezes. This is where a challenge appears, for example, 'Spell your name backwards.' You have 9 seconds to complete the challenge. The LED lights indicate whether you passed or failed."


Now that you have a grasp of what this is about, we can take a look at what you will need to complete this project.

Supplies

  1. Arduino Uno x1
  2. Seven Segment Display x1
  3. LEDs (Red and Green) x2
  4. Push Button x1
  5. Servo Motor x1
  6. Resistors x5 (three 330 Ω and one 10 kΩ)
  7. IR Receiver & Remote x1
  8. Breadboard x1

How I Discovered This Project

pwtt1224bk.ra6_preview (1).jpg

As part of my final Technology exam project, my teacher gave us a task to make something using electronics and some websites to visit for inspiration. While browsing through some of the websites my teacher gave offered to the class, I noticed many projects involving servo motors, which I found very interesting because they can control the movement of an object precisely.


I was looking for a project, and I came across one called “Spin the Wheel.” I thought the use of the servo motor for spinning the wheel was a great idea and the idea looked pretty simple but smart, and I thought of a similar idea for my own project. I decided that instead of spinning for a prize, the wheel should spin for a task, and I added a 9-second countdown timer, along with the use of LEDs for indicating the success of the task.


This project in particular really caught my interest, as it gave me the opportunity to combine my creativity with electronics, and I was able to take an idea from the Internet and turn it into something unique for my final project.

How to Wire?

Screenshot 2026-01-21 172503.png
Screenshot 2026-01-21 172605.png
Screenshot 2026-01-21 172627.png

wiring the Project


In regard to the wiring component of my project, I have included a diagram from TinkerCad to demonstrate how components are interconnected. This is how I have interconnected my components using my own pins:


1. Connecting Power


The first thing I did was to ensure that each component received both power and ground connections. I directly linked the 5V and GND pins from the Arduino to each component that requires this connection, which consists of the servo motor, the IR receiver, the LEDs, and the seven-segment display. This ensures that each component functions correctly and that additional wiring is unnecessary because each component will be receiving its necessary connections from the Arduino board.


2. Seven-Segment Display


Next, I created the seven-segment display, which displays the numbers ranging from 9 down to 0 in the countdown sequence. I connected the Arduino pins to the segments in the following way:


int a = 11;

int b = 10;

int c = 9;

int d = 8;

int e = 7;

int f = 12;

int g = 13;


Each segment is linked to a 330 Ω resistor to avoid the LEDs from burning out. The Arduino will light the corresponding segments to display the numbers during the countdown to allow the players to read how much time they have to perform the task.


3. Servo Motor


The servo motor is one of the key components of my project. It consists of three wires:


Orange → control pin 3 on the Arduino


Red → 5V power


Black → GND


When turned on, the servo turns the wheel in a motion that goes back and forth until it is stopped by the IR remote. This makes the game interactive and fun.


4. IR Receiver


The IR receiver also has three ports: power, ground, and signal. I connected it as follows:



int RECV_PIN = 5;


When the IR remote sends a signal, it is received by the IR receiver, which sends it to the Arduino. The signal controls when the servo motor starts and stops, which activates the countdown. The IR receiver can be tested with the serial monitor to ensure that it can receive signals from the remote.


5. LEDs


Finally, I added two LEDs that indicate whether the task was successfully completed or not:



int greenLed = A4; // lights up when the task is completed


int redLed = A5; // lights up if countdown reaches zero



Each LED is connected to a 330 Ω resistor to ground. When the push button is pressed during the countdown, the green LED lights up immediately. If the player does not press the button before the countdown reaches zero, the red LED lights up to show that the task was not completed.


This wiring setup ensures that all the components — seven-segment display, servo motor, IR receiver, push button, and LEDs — work together correctly. Using my own pins and direct connections keeps the circuit organized, functional, and ready for the game.

Coding Part 1

Screenshot 2026-01-21 183921.png

The first part of the coding is the setup of variables. This is where I define what pins the different components are being controlled by, such as the seven-segment display, the LEDs, the push button, the servo, and the IR receiver. This is one of the most crucial parts of the coding, or the project will not work.


In my seven-segment display, I connected the segments to these pins:


int a = 11;

int b = 10;

int c = 9;

int d = 8;

int e = 7;

int f = 12;

int g = 13;



The LEDs and push button employ:


int greenLed = A4; int redLed = A5; int completeBtn = 2;



And the servo and IR receiver are connected in the following way:


Servo myServo; int RECV_PIN = 5; #define VOL_UP

Setup-Code

Screenshot 2026-01-21 184618.png

Once I've established all my variables, the next crucial thing that follows is the setup function. This is where I inform my Arduino which pins are input and which are output so that it understands how to use them.


LEDs → output (so that they can be turned on and off by the Arduino)


Push-button -> input (so that it can be detected when it’s pressed)


Seven segment display pins → Output (to illuminate the correct numbers)


Servo Motor → attached to a pin to control movements


IR receiver → ready to receive signals from remote control


I also set the initial state of the LEDs to be off, connected the servo to its pin at the middle position, enabled the IR receiver, and opened the serial monitor to read the signals.

Voids-Code

Screenshot 2026-01-21 185415.png
Screenshot 2026-01-21 185425.png
Screenshot 2026-01-21 185441.png

In my design, I employed the use of various void functions. For instance, from void zero to void nine, which are responsible for controlling the seven-segment display to display the correct number in the countdown. There is also a spinWheel function that controls the servo motor, which spins the wheel back and forth until it stops in the middle. Lastly, the countdown function is responsible for the 9-second timer that lights up the green LED button or the red LED.”

Loop Function-Code

Screenshot 2026-01-21 185917.png

The void loop runs over and over so all the parts of my project can work together.

In my loop, the servo moves when triggered. I also set it so that if the push button is pressed (HIGH), the green LED turns on, and if it’s not pressed (LOW), the red LED turns on. This shows when the task is complete.

The loop also checks the IR remote. If the Volume Up button is pressed, the servo stops.

Once the servo stops, the countdown starts on the 7-segment display. This setup makes my game run smoothly without any problems.