Це відео не доступне.
Перепрошуємо.
How to make Edge Detecting Robot || Edge avoidance robot that never falls off the table !!!
Вставка
- Опубліковано 14 сер 2024
- Hello friends,
In todays video, we will learn how to make an edge detecting or edge avoidance robot. This robot detects the edges of table and avoids falling down. The project is done using arduino uno and ultrasonic sensor HR- SR04 as the main components.
The edge detection is done using the 2 ultrasonic sensors. When both the sensors are on the top of table, the robot continues to move forward. When at least one sensor is outside the table, the robot takes a reverse and changes direction. The response time of the ardino and ultrasonic sensor is very less and edge detection is done very quickly by the ultrasonic sensor.
The links for purchasing the items are given below.
1. Arduino uno board : amzn.to/3RPzXw8
2. L298N motor driver : amzn.to/3RO0F8k
3. HC-SR04 Ultrasonic Sensor : amzn.to/3XFNCd4
4. Motors with wheels : amzn.to/3W5EYTW
5. 18650 battery pack :amzn.to/3ziAm3N
6. Jumper wires : amzn.to/3xG4FB0
Link to download code : drive.google.c...
Please do watch the video .Thank you...
Please share the video if you like it.
🎵 Song: 'Markvard - Dreams' is under a creative commons license license.
www.youtube.co...
🎶 Music promoted by BreakingCopyright:
• 🛀 Soothing & Chill Out...
❤❤❤~~PLEASE SUBSCRIBE TO THE CHANNEL TO SEE MORE SUCH INTERESTING VIDEOS & MAKE LEARING SCIENCE FUN~~❤❤❤
#edgedetectingrobot #arduinoproject #scienceproject
I did everything and it made my robot go in circles
Hi friend. I guess one motor is rotating forward and other motor is rotating backwards, which is causing the robot to go in circles. So just interchange the +ve and -ve wire connection of the motor that is rotating backward, to the motor driver board. That should solve the problem..
Me too
Can you give code....
Hi friend. The code is already available for download from the link given in the description box..
@@Science_4U_ but that format not support to our phone...
@@JaiphulaBarik yes same problem...
@@JaiphulaBarik YOu need to install arduinodroid app in phone to open the code. You can open the code also in PC or laptop by installing IDE software.
I will paste the code here also..
#define trigPin1 4 // Trig Pin Of HC-SR04
#define echoPin1 5 // Echo Pin Of HC-SR04
#define trigPin2 6 // Trig Pin Of HC-SR04
#define echoPin2 7 // Echo Pin Of HC-SR04
#define MLa 8 //left motor 1st pin
#define MLb 9 //left motor 2nd pin
#define MRa 10 //right motor 1st pin
#define MRb 11 //right motor 2nd pin
long duration1, distance1, duration2, distance2 ;
void setup() {
Serial.begin(9600);
pinMode(MLa, OUTPUT); // Set Motor Pins As O/P
pinMode(MLb, OUTPUT);
pinMode(MRa, OUTPUT);
pinMode(MRb, OUTPUT);
pinMode(trigPin1, OUTPUT); // Set Trig Pin As O/P To Transmit Waves
pinMode(echoPin1, INPUT); //Set Echo Pin As I/P To Receive Reflected Waves
pinMode(trigPin2, OUTPUT); // Set Trig Pin As O/P To Transmit Waves
pinMode(echoPin2, INPUT); //Set Echo Pin As I/P To Receive Reflected Waves
}
void loop()
{
Serial.begin(9600);
digitalWrite(trigPin1, LOW);
delayMicroseconds(2);
digitalWrite(trigPin1, HIGH); // Transmit Waves For 10us
delayMicroseconds(10);
duration1 = pulseIn(echoPin1, HIGH); // Receive Reflected Waves
distance1 = duration1 / 58.2; // Get Distance
Serial.println(distance1);
delay(5);
if (distance1 < 10 ) // Condition For Absence Of Obstacle
{
digitalWrite(MRb, HIGH); // Move Forward
digitalWrite(MRa, LOW);
digitalWrite(MLb, HIGH);
digitalWrite(MLa, LOW);
}
else if (distance1>15) // Condition For Presence Of Obstacle
{
digitalWrite(MRb, LOW); //Stop
digitalWrite(MRa, LOW);
digitalWrite(MLb, LOW);
digitalWrite(MLa, LOW);
delay(5);
digitalWrite(MRb, LOW); // Move Backward
digitalWrite(MRa, HIGH);
digitalWrite(MLb, LOW);
digitalWrite(MLa, HIGH);
delay(500);
digitalWrite(MRb, LOW); //Stop
digitalWrite(MRa, LOW);
digitalWrite(MLb, LOW);
digitalWrite(MLa, LOW);
delay(100);
digitalWrite(MRb, HIGH); // Move Left
digitalWrite(MRa, LOW);
digitalWrite(MLa, LOW);
digitalWrite(MLb, LOW);
delay(500);
}
digitalWrite(trigPin2, LOW);
delayMicroseconds(2);
digitalWrite(trigPin2, HIGH); // Transmit Waves For 10us
delayMicroseconds(10);
duration2 = pulseIn(echoPin2, HIGH); // Receive Reflected Waves
distance2 = duration2 / 58.2; // Get Distance
Serial.println(distance2);
delay(5);
if (distance2 < 10 ) // Condition For Absence Of Obstacle
{
digitalWrite(MRb, HIGH); // Move Forward
digitalWrite(MRa, LOW);
digitalWrite(MLb, HIGH);
digitalWrite(MLa, LOW);
}
else if (distance2>15 ) // Condition For Presence Of Obstacle
{
digitalWrite(MRb, LOW); //Stop
digitalWrite(MRa, LOW);
digitalWrite(MLb, LOW);
digitalWrite(MLa, LOW);
delay(10);
digitalWrite(MRb, LOW); // Move Backward
digitalWrite(MRa, HIGH);
digitalWrite(MLb, LOW);
digitalWrite(MLa, HIGH);
delay(500);
digitalWrite(MRb, LOW); //Stop
digitalWrite(MRa, LOW);
digitalWrite(MLb, LOW);
digitalWrite(MLa, LOW);
delay(100);
digitalWrite(MRb, HIGH); // Move Left
digitalWrite(MRa, LOW);
digitalWrite(MLa, LOW);
digitalWrite(MLb, LOW);
delay(500);
}
}
@@JaiphulaBarik You need to install arduinodroid app in phone to open the code..
Bro my robot is vey fast so what can i do about it or how to reduce the speed
Hi friend. The easiest way to reduce speed is to reduce the battery voltage. There are actually 3 speeds of geared motor available, 60 rpm, 100 rpm and 300 rpm. Most probably you may be having 300 rpm motor. That is why the speed is very high. you have to purchase a lower speed motor to reduce the speed. Decreasing the voltage will also reduce the speed. But it cannot reduce the speed beyond some limit.
Hi! How did you turn on and off the robot? Did you put a switch?
Hi friend. The battery pack that I am using is already having a small builtin switch kept on its side. So I did not have to put a separate switch.
am doing it for my science exhibition :))
Okay dear friend. Very happy to know that.🙂.. Please ask here if you face some problems. I can help..
Bro do u live in mohali??
@user-jm1vs1gh2e No friend. I live in Kerala..🙂
Im sorry but I wasn't asking u😊😊
@@user-jm1vs1gh2e ooh..okay..I am sorry..🙂
Nice😊👌👌
Thank you..🙂
Is It can be work in nyt times without lighting
Yes friend. It will work in night also because it is using ultrasonic sensors which use sound waves for detecting obstacles..
is the code can be suitable for 1
ultrasonic sensor
No friend. we need 2 ultrasonic sensors for the robot to work correctly.
❤
Thank you dear friend..❤️
Total program is correct or not
Program is correct only friend. I check the working of the code by making the project and then only upload. So there will not be any mistake in code.
Bro can u tell the code
Hi friend. The code can be downloaded from the link given in the description box below each video. I am giving the download link below also.
drive.google.com/file/d/1FTYE0JngzcoMwBVFDXzRzNuYSw6rDzNd/view?usp=share_link
why it is not working for me
Hi dear friend. What us the problem that you are facing?. Is the robot not detecting edges? Or is it not moving at all?
It's not detecting edges my friend. It always move forward. But, if I remove the ultrasonic pin, it moves backward like it detects edges
@@enjay9723 Hm..okay friend. It is a problem with your ultrasonic sensor. I think it is faulty. Can you just bring your hand near to the ultrasonic senzor while everything is switched on?. The motor should change direction of rotation. Is it happening like that?
Please list components
Hi friend. The component list and its purchase links are already given in the description box.🙂
I will give the list below also..
The links for purchasing the items are given below.
1. Arduino uno board : amzn.eu/d/iH03OHj
2. L298N motor driver : amzn.eu/d/bzrLeMA
3. HC-SR04 Ultrasonic Sensor : amzn.eu/d/i5OkXM7
4. Motors with wheels : amzn.eu/d/gGczeza
5. 18650 battery pack :amzn.eu/d/gtI4BlO
6. Jumper wires : amzn.eu/d/hQ1P7Mi
can i get the circuit diagram
Yes.. I will make the circuit diagram and share. Meanwhile you can watch the video and try to make this project. In the video, I am showing step by step how to make this project ..
@@Science_4U_ hello l'ami même en réduisant la vitesse on ne comprend pas les branchements dommage qu'il n'y ait pas de diagramme merci quand même.
@@pietrodilucca1712 Je suis vraiment désolé pour cet ami. Je créerai et téléchargerai un schéma de circuit pour toutes mes vidéos. Merci pour votre suggestion.
Robot is not atleast moving
Okay friend..Why it is not even moving could be due to poor batteries or a faulty motor driver board..
It doesnt work. all it does is just turn left and right then go back and forth regardless of the presence of edge.
Hi friend. That is because the ultrasonic sensor is not detecting properly. The ultrasonic sensors keep on measuring the distance below. If the distance below is less, that means that there is table underneath and it starts moving forward. But if it suddenly detects that distance is more, it means the edge is detected and it reverses and changes direction, to avoid falling down. In your case either one or both the ultrasonic sensors are not working. So it always measures higher distance though there is table underneath. So it keeps on reversing, change direction and moves forward.
Please use tested working ultrasonic sensors and it will solve the problem, for sure..
Robot is not working
Hi friend. Can you tell what is the exact problem?.
Can I get circuit diagram
Yes sure friend...I will have to draw the cicuit diagram..will do it tomorrow and share with you..🙂
Thx
Hi please share circuit diagram it's important
Plz share the circuit diagram and abstract for this project
robot is not working
Hello friend. Can you please tell what is the problem?. I will help you.It will definitely work if connections are given correctly and all components and sensors are working properly.
Is the robot atleast moving? Or is the edge detection only is the problem?. Please tell. I will help you to solve the issue.
Edge detection not detecting correctly
Can you explain the problem friend?. I will help you to solve it.
It was going right left not moving straightly
And also fastly moving
Hmm..okay friend. It is definitely because either one of the ultrasonic sensor or both the ultrasonic sensor are not working properly..You have to replace them with good one..
@telugumusicworld2786 If it is mpving very fast, the easiest way to reduce speed is to use battery with lower voltage..