Wheel That Turns by Itself (the Game of Life)

by N0body_Tai in Circuits > Arduino

263 Views, 3 Favorites, 0 Comments

Wheel That Turns by Itself (the Game of Life)

Afbeelding1.jpg
Afbeelding7.jpg
Afbeelding6.jpg
Arduino Hack opdracht IPO

The game of life is a game where you have to turn a wheel, I made the wheel turn using a DC motor and linked it to a motion sensor. So that the wheel turns automatically when you wave your hand over it.

Supplies

image.png
IMG_7156.jpg
  • breadboard
  • cable
  • DC motor
  • jumper wire (Male-Female)
  • sensor PIR
  • UNO R3
  • L293D
  • jumper wire
  • gameboard (game of life)
  • cardboard
  • hot glue gun
  • pliers

Make the Circuit

Afbeelding8.png
Afbeelding1.jpg
Afbeelding3.jpg

Create this circuit from the picture above. I made this from 2 different circuits that I got from the internet and combined them together.

Add the Code

image (1).png

Then open arduino and add the code:


const int motorPin = 6; //motor bevind zich op pin 6

const int sensorPin = 3;// PIR sensor bevind zich op pin 3

void setup()

{

 pinMode(motorPin, OUTPUT);

 pinMode(sensorPin, INPUT);

}

void loop()

{

 int sensorValue;

 

 sensorValue = digitalRead(sensorPin);

 

 if (sensorValue == HIGH) // als beweging wordt gedetecteerd

 { 

   digitalWrite(motorPin, LOW);// laat de motor draaien

   delay (2000); // laat de motor 2 seconden draaien

 } else {

   

   digitalWrite(motorPin, HIGH); // de motor draait niet

 }

}

Adjust the Wheel and Board

image (2).png
image (3).png
IMG_7158.jpg

In order for the wheel to turn by the dc motor, the wheel must be adjusted so that the dc motor fits in it. For this I used pliers and a hot needle, this hot needle melts in the wheel a hole in which the rod of the dc motor fits.

Test the wheel first if it will turn with the dc motor, if it is too heavy it will not turn.

Also cut holes from the board game where the DC motor and motion sensor should be.

I decided to put the motion sensor in the middle.

Solder the Circuit

Afbeelding4.png
Afbeelding2.jpg

The circuit that was made in step 1 is now finalized by soldering it together, I used a printed circuit board for the L293D.

Glue Everything in Place on the Board Game

Afbeelding5.jpg

The soldered circuit is now glued to the bottom of the board game.

Make a Bottom for the Board Game

IMG_7156.jpg
IMG_7157.jpg

Now that the circuit is glued to the board game it can't go back in its original box and also because it is unstable on the floor I made a bottom. This can be done very simply by measuring the dimensions of the board game and using it. I also cut out the bottom of the original box and glued it to the new bottom to keep something of the original box. Along the corners of the bottom I also added elevations for the board game to lean on.

Put the Board Game in Place

Afbeelding11.jpg
Afbeelding10.jpg
Afbeelding9.jpg

Now you place the board game in the bottom and you're done, I also built a wall around the motion sensor as an extra to have a smaller degree angle.