A Robot That Will Hit Your Teeth OUT

by vinvout-io in Circuits > Robots

177 Views, 1 Favorites, 0 Comments

A Robot That Will Hit Your Teeth OUT

please.jpg
Game on

This is just a fun project. This was my first somewhat big project at the beginning. So I got this idea when I was playing a board game called carroms(In this game we hit something like a coin into a hole to gain points). So what it basically does is that this robot will strike things into a specific area, like a hole (in the case of the game). So for detecting the position of the hole I just placed a torchlight at the back of the hole, which means we can use an LDR to know from where the light is coming. This robot has two motors, one for always rotating and looking for the light, and another one for striking the object.

Supplies

  • BO Motor x 2
  • BO Wheel
  • LDR(light dependent resistor)
  • L298N Motor driver
  • Arduino UNO (or any other Arduino board )
  • 9v battery
  • Jumper wires
  • Cardboard
  • Steel rod/ any hard thin material

Let's Get Started

Screenshot_with_the_base_2021-11-09_19-34-12-removebg-preview.png
  • Make a box using cardboard and
  • Then stick a motor with the wheel attached and, on top of that motor we have to fix another one(I know it is very confusing, sorry, please look at the image).
  • OK, that's done now we need to place the striker, the metal rod, so we need an extension for the shaft, for that, I used a pen's body (It can be easily plugged into the shaft), and then you just have to tie up the rod to our extension.
  • place the LDR in such a way that it comes on top of the top motor.

Now It's Time to Wire Up Things

striker_schematic.drawio.png

Just wire it up as shown in the schematic

Placing Things

Now place the Arduino and motor driver to each side of the cardboard box and make sure the striker won't hit them and mess everything up.

Problem

full set.png

But here comes a problem. When connecting the top motor to the Arduino, when the motor spins the wires will get tangled. So for solving that problem I took a thin aluminum rod and bend it to a 'c' shape and put the wires through the rod and to the top of the motor to connect them, this time the wires won't get tangled.

How It Woks

How it Works

From this video, you will get a clear-cut idea of how this thing works.

Progrmming Part

void setup (void) {                                                    


  pinMode(2, OUTPUT);  // top motor
  pinMode(3, OUTPUT);   //top motor opposite direction
  pinMode(4, OUTPUT);   //bottom motor
  pinMode(5, OUTPUT);   //bottomm motor opposite direction
  pinMode(A0, INPUT);                  // LDR
  pinMode(9, OUTPUT); //ENB  top motor
  pinMode(10, OUTPUT); // ENA bottom motor
  analogWrite(10, 255);  // speed bottom motor
  analogWrite(9, 255);






 while(true){
if(analogRead(A0)<=900){
   
            //top motor
    digitalWrite(2,LOW);
    digitalWrite(3,LOW);
   
   
    digitalWrite(4,HIGH);   //bottom motor
    digitalWrite(5,LOW);
    delay(700);
   
}if(analogRead(A0)>=900){
  //checking analogRead at some intervals so it perfectly works
    digitalWrite(4,LOW);      
    digitalWrite(5,LOW);
 ;
    digitalWrite(2,HIGH);
    digitalWrite(3,LOW);
       delay(1);
    digitalWrite(2,LOW);
    digitalWrite(3,LOW);// top motor  
    }
 
 


if(analogRead(A0)<=900){
   
 
    digitalWrite(4,LOW);              //checking analogRead at some intervals so it perfectly works
    digitalWrite(5,HIGH);
    delay(700);      
    /*   for not tangling */  
    digitalWrite(4,LOW);
    digitalWrite(5,LOW);
    
}else{
    digitalWrite(4,LOW);
    digitalWrite(5,LOW);
    digitalWrite(2,HIGH);
    digitalWrite(3,LOW);
    delay(10);
    // top motor  
    digitalWrite(2,LOW);
    digitalWrite(3,LOW);
}
}

}
void loop(void) {

}

Open your Arduino ide and upload the code.

Warning!

everset.png
It's useful sometimes!!!

Finally, be careful while playing with this thing or you will end up looking like this. And of course, this robot is not always that accurate, but it's a lot of FUN!!!