Arduino Projects

Edge detection robot | Smart Robot | Arduino Robot

Hey, guys welcome back to Techatronic. Today we will go to upload a very interesting and new project. Edge detection Arduino robot is a very popular project on the internet nowadays. If you want to make that robot on your own you have to just follow the instructions. We have given all the required steps and details over there. We share the code, circuit, and making instructions. If you really want to make this awesome bot you need a basic overview of Arduino, programming, and some basic electronics. We already uploaded a very brief tutorial on Arduino and other electronics. So, if you really want to learn the concepts you can read the other article also you can bookmark our website. So, now let’s get started without any delay. 

edge detection robot
Edge detection Robot

Introduction:- 

Edge avoiding robot is a kind of very simple robot that simply detect the edges by some sensor. Do you guys have any idea about the sensor which sensor we are going to use in this robot? So, this is the IR sensor. As we have discussed before the IR sensor and its Interfacing with Arduino. We will connect the IR sensor with the Arduino and the Motor driver which will operate the motor. If you have any problem with the IR sensor interfacing with the Arduino you can our existing article on that. Also, we have shared the Interfacing of Motor with Arduino with the motor driver. 

HTML Image as link
Qries

What is edge avoiding robot?

The edge-avoiding smart robot works like when any sensor detects the edge the robot will turn according to the sensor direction. It means if the right side sensor comes near the edge then the Arduino robot will make a turn in the opposite direction which is the left side 7 vice-versa. Otherwise, if there is no edge the robot will move forward continuously, and there is no instruction for backward moving direction. Can you guess the application of this robot?

We have made this robot for fun and learning purposes only. Also. you can learn a lot of things from this robot such as programming, connection, and Sensor working. The main purpose to make this robot is to learn the working and basic concepts. So, if you want to learn more you can see a lot of articles and projects on our website homepage.

Edge detection Arduino robot Working 

Working with this edge detection robot is very simple. there is some sensor we are using in this robot that senses the edge. and transfer this information to the microcontroller which is working as a brain in this Arduino robot this microcontroller will decide what will be the next step according to the inputs from the sensor. Basically, we are using the IR sensors in this robot. two IR sensors we are using in this edge detection robot. front two corners select for the sensor location and the attach the sensor in the downward direction the face of the sensor is downward so that the sensor can sense the edge before the robot. so that theh robot never fall. if there is edge at any sensor the robot will turn accordingly.

HTML Image as link
Qries

The motor associated with the sensor like if there is an edge at the left sensor then the robot will move a little back and move in left or right in any direction. that can be avoid the edge and arduino robot never fall down. this is the way the robot will work to avoid the edges. that’s why it is known as the edge avoiding robot. Now, if you know the workng of the robot you can easily make the robot.

Now, we will discuss about how to do the construction of this robot. so, the first step is the requirement.

Components Required for edge avoiding robot.

  • Arduino Uno
  • IR sensor
  • BO Motors
  • Wheels
  • Chassis
  • Jumper wires

Edge avoiding robot Circuit diagram

Edge avoiding robot Code

The code for this robot is very simple here only we are reading two sensors at the digital input pins. and according to this data, we code the motors of the Arduino robot. like if the left sensor gets different values then it means there are edges and the robot motors should rotate in another direction. let’s discuss more the working of this robot.

void setup() { 

  
  //left sensor output to arduno input 

  pinMode(7,INPUT); 

  //Right Sensor output to arduino input 

  pinMode(6,INPUT); 

  //output from audrino to motor drive 

  //Right motor audrino to motor Drive 

  pinMode(0,OUTPUT); 

  pinMode(1,OUTPUT); 

  //left Motor Arduino motor Drive 

  pinMode(2,OUTPUT); 

  pinMode(3,OUTPUT); 

} 

  void loop() { 

    //left sensor input 

    int l1=digitalRead(7); 

    //Right Sensor Input 

    int r1=digitalRead(6); 

    if((l1==HIGH)&&(r1==HIGH)) 

    { 

       //Stay still

      digitalWrite(0,LOW); 

      digitalWrite(1,LOW); 

      digitalWrite(2,LOW); 

      digitalWrite(3,LOW); 

    } else if((l1==LOW)&&(r1==HIGH)) {

        //turns right 

        digitalWrite(0,HIGH); 

        digitalWrite(1,LOW); 

        digitalWrite(2,LOW); 

        digitalWrite(3,HIGH); 

    } else if((l1==HIGH)&&(r1==LOW)) {

          //turns left 

          digitalWrite(0,LOW); 

          digitalWrite(1,HIGH); 

          digitalWrite(2,HIGH); 

          digitalWrite(3,LOW); 

    } else if((l1==LOW)&&(r1==LOW)) {

          //Stop the Boot

         digitalWrite(0,LOW);

         digitalWrite(1,HIGH); 

         digitalWrite(2,LOW); 

         digitalWrite(3,HIGH);

    }

 }

Working of Edge avoiding Robot

the working of this robot is very simple it simply detects the edges and avoids them. so, the robot can automatically balance itself and not fall down from any table or surface which can avoid damage. if there is an edge where the robot can fall then from there the robot will. there are two sensors we are using one sensor at each front corner. the same sensor we have used in many other Arduino robots like a human following robot if the robot will move in a forwarding direction then both sensors will work. and if any of the sensors find the edge then it will move according to the direction.

So, there are we are using two IR sensors. which sense the edges of both the sensors attached facing down the ground. so they can easily find the edge in the edge-avoiding robot. Ir sensors transmit the infrared light and also received the same. so in this case the IR sensor transmits the light and also received the same.

PCBWay PCB Prototyping Services

I have assembled the whole circuit on a breadboard. As you know breadboard assembly is not effective for this type of project. So, PCBWay offers Rapid PCB Prototyping for Your Research Work. I personally, recommend PCBWay because you can get your first-try boards right in 24 hours!

PCBWay website

The prototyping stage is the most critical period of time for engineers, students, and hobbyists. PCBWay not only makes your boards quick but also makes your job right as well as cost-effective. This greatly reduces your cost and shortens the time for developing your electronic

PCBWay can provide 2 Layer PCBs to highly advanced HDI and flex boards. Even though the PCBs they produce differ a lot regarding functionality and areas of use. I am impressed with the quality of the boards, the delivery time, and the cost-effectiveness

Arduino Top 5 Robot

SPY Robot Using Arduino With Bluetooth Controls | Arduino robot

Human Following Robot Using Arduino | Best Arduino Robot

line following robot Arduino Tutorial

How to Make Self balancing Robot

Obstacle Avoiding robot using Arduino

Happy Learning!

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button