Thank you! Good explanation and nice pics. The video helped a lot ! I would like to suggest a few edits please. 1- The wiring for the Ultrasound Sensor needs to be corrected. The trigger and Echo pins in the diagram and in the code are inverted. The code has Trigger pin in A4, while the diagram has it in A5. 2- If you have issues with motor not running, may be you want to remove the input MOTOR12_1KHZ from lines 7&8. See updated code below. What I found is that for most of the battery operated motors, the MOTOR12_1KHZ will create an error and a humming noise in the motor. AF_DCMotor motor1(1); // Removed MOTOR12_1KHZ AF_DCMotor motor2(3); // Removed MOTOR12_1KHZ
Hi Nick, I've had the parts for some time but just got around to building it today. Worked first time, with one motor going slightly faster than the other. I should be able to fix this by playing with the motor offset value. Thank you for your work - I have learned a lot from your channel. Kind Regards Alan
This code seemed to work for me. Just change the Trig And Echo pins to math your setup. //including the libraries #include #include #include //defining pins and variables #define TRIG_PIN A5 #define ECHO_PIN A2 #define MAX_DISTANCE 200 #define MAX_SPEED 200 // sets speed of DC motors #define MAX_SPEED_OFFSET 20 //defining motors,servo,sensor NewPing sonar(TRIG_PIN, ECHO_PIN, MAX_DISTANCE); AF_DCMotor motor1(1, MOTOR12_8KHZ); AF_DCMotor motor2(2, MOTOR12_8KHZ); Servo myservo;
//defining global variables boolean goesForward=false; int distance = 100; int speedSet = 0; void setup() { myservo.attach(10); myservo.write(90); delay(2000); distance = readPing(); delay(100); distance = readPing(); delay(100); distance = readPing(); delay(100); distance = readPing(); delay(100); } void loop() { int distanceR = 0; int distanceL = 0; delay(40);
if(distance=distanceL) { turnRight(); moveStop(); } else { turnLeft(); moveStop(); } } else { moveForward(); } //reseting the variable after the operations distance = readPing(); } int lookRight() { myservo.write(180); delay(500); int distance = readPing(); delay(100); myservo.write(90); return distance; } int lookLeft() { myservo.write(0); delay(500); int distance = readPing(); delay(100); myservo.write(90); return distance; delay(100); } int readPing() { delay(70); int cm = sonar.ping_cm(); if(cm==0) { cm = 250; } return cm; } void moveStop() { motor1.run(RELEASE); motor2.run(RELEASE); }
void moveForward() { if(!goesForward) { goesForward=true; motor1.run(FORWARD); motor2.run(FORWARD); for (speedSet = 0; speedSet < MAX_SPEED; speedSet +=2) // slowly bring the speed up to avoid loading down the batteries too quickly { motor1.setSpeed(speedSet); motor2.setSpeed(speedSet+MAX_SPEED_OFFSET); delay(5); } } } void moveBackward() { goesForward=false; motor1.run(BACKWARD); motor2.run(BACKWARD); for (speedSet = 0; speedSet < MAX_SPEED; speedSet +=2) // slowly bring the speed up to avoid loading down the batteries too quickly { motor1.setSpeed(speedSet); motor2.setSpeed(speedSet+MAX_SPEED_OFFSET); delay(5); } } void turnRight() { motor1.run(FORWARD); motor2.run(BACKWARD); delay(300); motor1.run(FORWARD); motor2.run(FORWARD); }
Wow! I have never seen so many people without any knowlegde about Arduino trying to build an Arduino-robot.Please! To all you beginners, try and go to the Arduino site and learn a bit Arduino before making big projects and you will have more fun instead of frustration.(Sorry for bad gramma and spelling)
Use the ultrasonic sensor to warn you with a light and a piezo sound generator. Of course you need to controll it wirelessy so the feature comes in use :) Great video!
I have built this robot and it is fantastic!! The code compiled first time and I had a working robot.Thank you for the project.. One small problem is when the robot comes to a wall at a very shallow angle it does not see the obstacle. How about a right and left sensor so it can move away. I am trying to add sensors with the Ping libary but I can't make it work.. I will keep trying!! This is one fantastc project with lots of options..... THANK YOU!!!
I was quite successful in building it with my custom PVC board. My first success in using the Sonar Sensor. Many thanks from Bangladesh and do please, keep uploading more. Can you please upload a project on Motion/Gesture control Arduino Robot using 433MHz RF module Transmitter and Receiver plus 6-DOY GY521 Gyro Accelerometer
Nice robot my friend!! Why not trying to rotate the sensor 360 degrees, in order to map the surroundings, and then deciding the exit strategy? All you need is some memory, a sampling procedure to determine the distance on each side, and basic trigonometry to determine if you have enough space to pass.
Could you make a video of Obstacle avoiding car with the access to bluetooth .My son loves to make robots with arduino he was triying to find a video at that point he saw this video.He said that he would wish to get this video with bluetooth module.
Hello, can you please help me, the robot works fine but after he passes the first obstacleand goes to the other he just goes backwards and stops, it doesnt go anywhere but the motors do sounds
How can I get this to follow me like a puppy when it senses me in the room? Maybe using an IR camera for that instead of the/ or in addition to sonar? Can you write the code for that? Thanks
hello i am vignesh.......loved ur project....great thing.....i also did the same as you did it...but the motors r perfectly working....but my sensor is not detecting.....pls help me out from this plsss...thanks
A question. The motors I'm using may require a higher voltage than I'm using. I'm assuming that's why I can't get my code to run correctly. The sensor seems to work just fine on a test rig but does nothing on the robot. I copied and pasted the code directly from the website and connected everything correctly as in the video, and it doesn't seem to work. What might I be doing wrong? Thanks for reading. :)
Great video as always. How about some sound, lights and remote control. Would be a fun Christmas present for a small child as an introduction to electronics.
Dear, I'm looking for a smaller ultrason sensor but I cann't find it on the internet. Please smaller then the HC04, the HC04 is to large for my project. Thanks a lot for your video's and tips etc... Hope someone can help me with a link to look at a smaller ultrason sensor.
sir i have an idea, what about the robot follow the direction of the user..the robot follow wherever the user goes..what sensor can be use to make this idea work?
French retired I discover electronics. this tutorial is really great. can we have the sheme of connection of the LCD screen as well as modofications for code Encore thank you
plz help me ive hooked everything up right sensor works like its supposed too but motors dont work at all only if i dc them they will spinn wont work with anything else
Hello, first of all this is a great video. I would like to ask about a problem of mine. For some reason sometimes it does not go straight forward. IT seems that a motors starts some ms before the other motor, Any ideas how to solve this? When i place it to move forward to seems to have a drag left or right...it does go straight.
How can I add a remote control to it? I want to control this via Bluetooth on a smartphone, how do I interface it with the smartphone in order for the smartphone to act as a controller?
Hi, Excellent video. Is it possible to implement the project so that the robot is autonomous and create routes through mapping through a device (laptop, tablet, smartphone....)?.... How would it be? Thank you
As I am mechanical hobby technician, this video was very helpful for me and IP:) (Idiotic Proof), but I would need to connect more powerful el. motors, like for 12 or even 18 V DC for some grass mover, etc. Can you help with some details how to realieze it? Many thanks
Hello, is it possible to install a Bluetooth device in a robot like this, and transmit information from the ultrasonic sensor back to the pc in real time, something like parking sensors in cars, and if can what software do i need for visualization?
what does the booelan goesforward=false is represted to,int distace=...,and #define maxspeed offset=....(need the functionality of these codes )??????? plz help me thanks
hi great project and video how about return to home to charge it's battery. that would make it more useful and self safitiont and be a good base for other projects
my motor is of 150 rpm L shaped dc motor ,i am giving 9 volt to motor sheild and 9 v to arduino ,but dc motor are not working properly it cannot move forward , only it moves slowly ,sir plz tell me what to do?
Sir, My robot turns at a very small angle and only to the left. It takes about 3 minutes for it to avoid the obstacle and move to a free space. plz help.
Well ..I've got a problem with the Super Sonic Sensor. When I run the New Ping Example it would just show me some squares ...or occasionally some letters when i gently press its "eyes". However when i run the code that you gave us in the super sonic sensor tutorial (the one without any library) it works just fine. So I guess the problem would be at the New Ping library ? As the sensor works fine when i'm not using it. The problem is , I guess i will need the New Ping library in order to make this robot work ( for lookright() function and lookleft(function))
The code you used in this project, I see another channel MertArduinoHowToMake before your project. I am sure that u used same code. Do u make same project? Because he added his project before u. I asked u because of I think make as a same project
The motor shield sends only 1,7 V at the right motor and it doesn't work. Meanwhile the left motor receives about 3,2 volts and runs normally. Is it a shields problem or simply there 's not enough power? I put 4x AA new batteries and the multimeter shows 5,9V. The servo and the sensor work just fine.
Hi.. build the same robot, but i didn't with the arduino mega 2560.... I see on the video after connecting the motor shield to the arduino, the motor shield turns on after connecting power to it, but im my case it doesn't turn on (led is off after connecting power to my motor shield.) any one can help me..!
2) the wheels are not spinning properly. left wheel works as it should be but the right wheel only works with the reverse command..i checked the motor it works fine on both directions but when i connect it to the shield only the backwards command works..i reversed the red and black cable on the motor..now the motor spins forward when the command is backwards which means the problem is not with the motor but with the shield or the algorithm..what do you think?
ok just to update on this..the first motor shield was faulty i got one that works but then i had another problem..if the batteries are brand new the robot works correctly but as soon as they start to loose some power the robots behaves weirdly..specifically it stops goes back and looks left and right all the time even without an obstacle in front of it. I have done two things 1) added a second 9V battery to power the arduino seperatelly from the barrel jack. 2) I added two capacitors between 5v and ground on the motor shield next to the pins that feed the ultrasound sensor. I believe that when th epower drops from th batteries, the power to the sensor fluctuates which creates a false signal from the sensor to the arduino. Now with the two capacitors and the seperate power supply for the arduino. everything works much better for longer. DO you agree with me on my diagnosis for the continuous triggering of the sensor or is there a more fondamental error that I missed?
Great video, helped me alot. I made a robot for a school project along with a detailed 'scription' about robots in todays society. Is it okay if i put your video with the sources? Thanks! PS: One question, why did you solder the wires to the motor shield when you could've put them in the arduino first to let you keep using the motor shield?
My servo and motors are not functioning well. The servo keeps rotating and my motors are not moving even I have new batteries. I am using 9 volts of battery. What is the problem? Reply please. Thanks!
i am using 2 new batteries, the batteries are in series connection. My problem is the servo, it keeps rotating. It does not function well. I don't know what is the problem.
ian noble hey im having the same problem.. only my servo motor n sensor is working the motors dont get enough power to function .. did you get any solution??
I hope you find this video useful. If you want to support the channel see how here: educ8s.tv/support-educ8s-tv/
Bro can you publish a video in which we can switch autonomous to manual controlled.
Good job
I m getting error while uploading the code its says faltal error AFmotor.h: no such file or directory
@@shreyaskarsingh1835 i found same error while uploding what i do
i found error while uploding the code the directory not found can i uplod with out files
Thank you! Good explanation and nice pics. The video helped a lot ! I would like to suggest a few edits please.
1- The wiring for the Ultrasound Sensor needs to be corrected. The trigger and Echo pins in the diagram and in the code are inverted. The code has Trigger pin in A4, while the diagram has it in A5.
2- If you have issues with motor not running, may be you want to remove the input MOTOR12_1KHZ from lines 7&8. See updated code below. What I found is that for most of the battery operated motors, the MOTOR12_1KHZ will create an error and a humming noise in the motor.
AF_DCMotor motor1(1); // Removed MOTOR12_1KHZ
AF_DCMotor motor2(3); // Removed MOTOR12_1KHZ
Hi Nick,
I've had the parts for some time but just got around to building it today. Worked first time, with one motor going slightly faster than the other. I should be able to fix this by playing with the motor offset value. Thank you for your work - I have learned a lot from your channel.
Kind Regards
Alan
This code seemed to work for me. Just change the Trig And Echo pins to math your setup.
//including the libraries
#include
#include
#include
//defining pins and variables
#define TRIG_PIN A5
#define ECHO_PIN A2
#define MAX_DISTANCE 200
#define MAX_SPEED 200 // sets speed of DC motors
#define MAX_SPEED_OFFSET 20
//defining motors,servo,sensor
NewPing sonar(TRIG_PIN, ECHO_PIN, MAX_DISTANCE);
AF_DCMotor motor1(1, MOTOR12_8KHZ);
AF_DCMotor motor2(2, MOTOR12_8KHZ);
Servo myservo;
//defining global variables
boolean goesForward=false;
int distance = 100;
int speedSet = 0;
void setup() {
myservo.attach(10);
myservo.write(90);
delay(2000);
distance = readPing();
delay(100);
distance = readPing();
delay(100);
distance = readPing();
delay(100);
distance = readPing();
delay(100);
}
void loop() {
int distanceR = 0;
int distanceL = 0;
delay(40);
if(distance=distanceL)
{
turnRight();
moveStop();
}
else
{
turnLeft();
moveStop();
}
}
else
{
moveForward();
}
//reseting the variable after the operations
distance = readPing();
}
int lookRight()
{
myservo.write(180);
delay(500);
int distance = readPing();
delay(100);
myservo.write(90);
return distance;
}
int lookLeft()
{
myservo.write(0);
delay(500);
int distance = readPing();
delay(100);
myservo.write(90);
return distance;
delay(100);
}
int readPing() {
delay(70);
int cm = sonar.ping_cm();
if(cm==0)
{
cm = 250;
}
return cm;
}
void moveStop() {
motor1.run(RELEASE);
motor2.run(RELEASE);
}
void moveForward() {
if(!goesForward)
{
goesForward=true;
motor1.run(FORWARD);
motor2.run(FORWARD);
for (speedSet = 0; speedSet < MAX_SPEED; speedSet +=2) // slowly bring the speed up to avoid loading down the batteries too quickly
{
motor1.setSpeed(speedSet);
motor2.setSpeed(speedSet+MAX_SPEED_OFFSET);
delay(5);
}
}
}
void moveBackward() {
goesForward=false;
motor1.run(BACKWARD);
motor2.run(BACKWARD);
for (speedSet = 0; speedSet < MAX_SPEED; speedSet +=2) // slowly bring the speed up to avoid loading down the batteries too quickly
{
motor1.setSpeed(speedSet);
motor2.setSpeed(speedSet+MAX_SPEED_OFFSET);
delay(5);
}
}
void turnRight() {
motor1.run(FORWARD);
motor2.run(BACKWARD);
delay(300);
motor1.run(FORWARD);
motor2.run(FORWARD);
}
void turnLeft() {
motor1.run(BACKWARD);
motor2.run(FORWARD);
delay(300);
motor1.run(FORWARD);
motor2.run(FORWARD);
}
Wow! I have never seen so many people without any knowlegde about Arduino trying to build an Arduino-robot.Please! To all you beginners, try and go to the Arduino site and learn a bit Arduino before making big projects and you will have more fun instead of frustration.(Sorry for bad gramma and spelling)
Ευχαριστω, Finally someone explains arduino with simple terms!!!
please keep this great work of yours for it helps people!!!
Use the ultrasonic sensor to warn you with a light and a piezo sound generator. Of course you need to controll it wirelessy so the feature comes in use :) Great video!
I have built this robot and it is fantastic!! The code compiled first time and I had a working robot.Thank you for the project.. One small problem is when the robot comes to a wall at a very shallow angle it does not see the obstacle. How about a right and left sensor so it can move away. I am trying to add sensors with the Ping libary but I can't make it work.. I will keep trying!!
This is one fantastc project with lots of options..... THANK YOU!!!
can u plz tell tat which batteries r u using and how much
I was quite successful in building it with my custom PVC board. My first success in using the Sonar Sensor. Many thanks from Bangladesh and do please, keep uploading more. Can you please upload a project on Motion/Gesture control Arduino Robot using 433MHz RF module Transmitter and Receiver plus 6-DOY GY521 Gyro Accelerometer
I have coded same code but my motor is not working
Please help
Nicely explained.thank you
I want to attach a harrow behind it that will need stepper motor for its angular movement. how can I go about it?
Nice robot my friend!! Why not trying to rotate the sensor 360 degrees, in order to map the surroundings, and then deciding the exit strategy? All you need is some memory, a sampling procedure to determine the distance on each side, and basic trigonometry to determine if you have enough space to pass.
Awesome!!!!!!!!!!!!
Could you make a video of Obstacle avoiding car with the access to bluetooth .My son loves to make robots with arduino he was triying to find a video at that point he saw this video.He said that he would wish to get this video with bluetooth module.
Great project!
One feature that would be great (since winter is coming) is to add a snowplow :) heheh
actually I'm using 3 ultrasonic sensors !
can u help me with the coding plzzz.... ?
Vc Usou Pilhas Recarregáveis nesse Projeto
Hello, can you please help me, the robot works fine but after he passes the first obstacleand goes to the other he just goes backwards and stops, it doesnt go anywhere but the motors do sounds
I use everything as per shown but my L293D produce beeping noise. I am using absolutely new 9V battery . Please help me
How can I get this to follow me like a puppy when it senses me in the room? Maybe using an IR camera for that instead of the/ or in addition to sonar? Can you write the code for that? Thanks
hello i am vignesh.......loved ur project....great thing.....i also did the same as you did it...but the motors r perfectly working....but my sensor is not detecting.....pls help me out from this plsss...thanks
yes more robot vids, connect the small vacuum clean you built, many thanks for these videos.
I have uploaded the Similar code but the sensor senses late ...until it senses the robot collides with the obstacle...
You can change the min distance that will make the robot to stop or update the loop function faster.
Please don't stop doing this videos!
Nice info, thank you for sharing it :)
A question. The motors I'm using may require a higher voltage than I'm using. I'm assuming that's why I can't get my code to run correctly. The sensor seems to work just fine on a test rig but does nothing on the robot. I copied and pasted the code directly from the website and connected everything correctly as in the video, and it doesn't seem to work. What might I be doing wrong? Thanks for reading. :)
can i make it without programing?
You said in the video that we need 330 uf capacitors but in the list you have 100 nf and 300 uf capacitors. I am confused.
How can I change the code to make it chase my cat? I don't want it to hurt him, just chase him around so he gets exercise. Thanks
How to turn left or right on this kind of project?
Great video as always. How about some sound, lights and remote control. Would be a fun Christmas present for a small child as an introduction to electronics.
u dont need such big motor shield just looks more messy expensive . You can use l293d motor driver ic for superb clean finish anyways nice video
Sir I have a doubt what should the board name be given and what serial port did u connect it too
Great work. I loved to build this kind of robot on my channel
Dear, I'm looking for a smaller ultrason sensor but I cann't find it on the internet. Please smaller then the HC04, the HC04 is to large for my project. Thanks a lot for your video's and tips etc... Hope someone can help me with a link to look at a smaller ultrason sensor.
Hi, thanks for the amazing tutorial. After uploading the program, the car isn't moving. Can you please help?
sir i have an idea, what about the robot follow the direction of the user..the robot follow wherever the user goes..what sensor can be use to make this idea work?
French retired I discover electronics. this tutorial is really great.
can we have the sheme of connection of the LCD screen as well as modofications for code Encore thank you
plz help me ive hooked everything up right sensor works like its supposed too but motors dont work at all only if i dc them they will spinn wont work with anything else
How to make a wall following robot
my Motor Driver(L293D) is not working , what i do now ,plzz reply
Sir the robot is not moving its head and only rotating right side only please help me
This project is perfectly working for me👍🏽👍🏽👍🏽. Thank you. 😀😀😀😀
Hello, first of all this is a great video. I would like to ask about a problem of mine. For some reason sometimes it does not go straight forward. IT seems that a motors starts some ms before the other motor, Any ideas how to solve this? When i place it to move forward to seems to have a drag left or right...it does go straight.
Hey i am getting problem . The robot doesnt sense the object around it. Can you help me
How can I add a remote control to it? I want to control this via Bluetooth on a smartphone, how do I interface it with the smartphone in order for the smartphone to act as a controller?
Hi,
Excellent video.
Is it possible to implement the project so that the robot is autonomous and create routes through mapping through a device (laptop, tablet, smartphone....)?.... How would it be?
Thank you
Is it something to do with the codes?
I connected 9v to the motor shield but it's not working.
But when I give supply through serial port it works perfect .
Why is it so???
As I am mechanical hobby technician, this video was very helpful for me and IP:) (Idiotic Proof), but I would need to connect more powerful el. motors, like for 12 or even 18 V DC for some grass mover, etc. Can you help with some details how to realieze it? Many thanks
Hello, is it possible to install a Bluetooth device in a robot like this, and transmit information from the ultrasonic sensor back to the pc in real time, something like parking sensors in cars, and if can what software do i need for visualization?
Bhi I make this but servo can direct rotate why ??????????
what does the booelan goesforward=false is represted to,int distace=...,and #define maxspeed offset=....(need the functionality of these codes )??????? plz help me thanks
hello sir, can you be able to limit the distance of the sensor to let say 30cm then the robot will detect obtacle thus it will move away
why my sensors doesnt works the only things that running only motor on the wheel
could you pls just tell me from where did you got the code which you wrote in the programming
Beautiful proyect and so well explained, thanks
My servo motor isnt rotating. All other are working properly, except the servo motor.
Pls help
A nice project, but when I made it everything was working properly only thing was that one motor was not running Pls help
How did you make the circuit design and what parts did you use?
Thanks in advance and keep the great work!
I need your assistance, when coding, my computer gives me a certain response Newping.h: that file does not exist,, what could be the problem kindly
hi great project and video how about return to home to charge it's battery. that would make it more useful and self safitiont and be a good base for other projects
my motor is of 150 rpm L shaped dc motor ,i am giving 9 volt to motor sheild and 9 v to arduino ,but dc motor are not working properly it cannot move forward , only it moves slowly ,sir plz tell me what to do?
Hey i need help fast im doing everything write but it says declaration of 'loop' as array of void. what does that mean?
where did u get this from
why you put a capacitor in the dc motor?
I have watched several of your vids...they are top notch.
IDEA==>could you take this same platform and make a vid on using a remote control?
Sure, that's coming!
Great sir, one can just sense a lot of humility and knowledge in your voice! ... you are not intimidating.
Sir,
My robot turns at a very small angle and only to the left.
It takes about 3 minutes for it to avoid the obstacle and move to a free space.
plz help.
the sketch is not working for my arduino version
hey can this program be used for maze solving robot ? or just improving it
hello, can i make this with a relay instead of a sheild
I have use same code but my Motor is not working please help me anybody
Sir what are other capacitors that i can use in attaching to the servo?
motor on one side is only moving
plzzzzz help....
Then add capacitor
Well ..I've got a problem with the Super Sonic Sensor.
When I run the New Ping Example it would just show me some squares ...or occasionally some letters when i gently press its "eyes".
However when i run the code that you gave us in the super sonic sensor tutorial (the one without any library) it works just fine. So I guess the problem would be at the New Ping library ? As the sensor works fine when i'm not using it. The problem is , I guess i will need the New Ping library in order to make this robot work ( for lookright() function and lookleft(function))
You are not supposed to touch the tx and the rx... You could damage the sensor touching the grid..
Awesome project! How much weight can this carry?
Please send circuit diagram of this project
The code you used in this project, I see another channel MertArduinoHowToMake before your project. I am sure that u used same code. Do u make same project? Because he added his project before u. I asked u because of I think make as a same project
Nice project!! For future improvements It could be awesome add a IR remote control! Good job
How to solve the reverse polarity problem ?
The motor shield sends only 1,7 V at the right motor and it doesn't work. Meanwhile the left motor receives about 3,2 volts and runs normally. Is it a shields problem or simply there 's not enough power? I put 4x AA new batteries and the multimeter shows 5,9V. The servo and the sensor work just fine.
DemSkittlesDoe You are right! I changed the motor and it works without problems.
i put the capacitor on servo. my servo still won`t function.
sir how many libraries are there
Hi.. build the same robot, but i didn't with the arduino mega 2560.... I see on the video after connecting the motor shield to the arduino, the motor shield turns on after connecting power to it, but im my case it doesn't turn on (led is off after connecting power to my motor shield.) any one can help me..!
my dc motors rbnot working what should i do ?
I,am also making like that but code problems. Are coming please help me.
It is saying that ( return code is not 0 ) what should I do .😥😥😥 please help.
How did you add the capacitor at the end?
How do I use l298n instead of l293d please help its urgent
2) the wheels are not spinning properly. left wheel works as it should be but the right wheel only works with the reverse command..i checked the motor it works fine on both directions but when i connect it to the shield only the backwards command works..i reversed the red and black cable on the motor..now the motor spins forward when the command is backwards which means the problem is not with the motor but with the shield or the algorithm..what do you think?
The code is correct. You probably have a received a faulty motor shield.
ok just to update on this..the first motor shield was faulty i got one that works but then i had another problem..if the batteries are brand new the robot works correctly but as soon as they start to loose some power the robots behaves weirdly..specifically it stops goes back and looks left and right all the time even without an obstacle in front of it. I have done two things 1) added a second 9V battery to power the arduino seperatelly from the barrel jack. 2) I added two capacitors between 5v and ground on the motor shield next to the pins that feed the ultrasound sensor. I believe that when th epower drops from th batteries, the power to the sensor fluctuates which creates a false signal from the sensor to the arduino. Now with the two capacitors and the seperate power supply for the arduino. everything works much better for longer. DO you agree with me on my diagnosis for the continuous triggering of the sensor or is there a more fondamental error that I missed?
I need circuit diagram& how volt battery is required
Great video, helped me alot. I made a robot for a school project along with a detailed 'scription' about robots in todays society.
Is it okay if i put your video with the sources?
Thanks!
PS: One question, why did you solder the wires to the motor shield when you could've put them in the arduino first to let you keep using the motor shield?
I am Coded The Same Code In Arduino In Mobile But It Is Not Working Please help Me I Have To Do For My School Project
How to centering a 9g servo. please help.
Sir my obstacle avoiding robot is stopping in middle
How many capacitor and elco?
My servo and motors are not functioning well. The servo keeps rotating and my motors are not moving even I have new batteries. I am using 9 volts of battery. What is the problem? Reply please. Thanks!
you should change batteries
i am using 2 new batteries, the batteries are in series connection. My problem is the servo, it keeps rotating. It does not function well. I don't know what is the problem.
ian noble hey im having the same problem.. only my servo motor n sensor is working the motors dont get enough power to function .. did you get any solution??
I think the motor shield has a provision to add an external supply. Use a separate 9V battery n motor will have enough motor
@@pritamsalunkhe6319 Did you find a solution for powering the motors?
Where I have to use the 100uf pin
mine does'nt move only servo head spins help plz
great videos!keep up the good work. Also show us your face!
great project....................