How to make Obstacle Avoiding Robot using Arduino !!

Sdílet
Vložit
  • čas přidán 14. 01. 2023
  • In this video I have shown how to build an obstacle avoiding robot using Arduino Uno microcontroller. If an object comes ahead of it the robot stops, move back a little bit, look left/right and then it turns that side which has greater distance.
    ---------------------------------------
    Components required
    1)Arduino uno board - amzn.to/3QGhzpm
    2)Ultra sonic sensor - amzn.to/40j5OIG
    3)Servo motor - amzn.to/3sgHcUo
    4)motor shield module - amzn.to/47bzHgi
    5)jumper wires - amzn.to/49fJdkm
    6)battery - amzn.to/3seT7SK
    7)chassis(4 X dc motor ) - amzn.to/3FEgsA6
    Video gear
    camera : amzn.to/3Tb5EBR
    camera stand : amzn.to/3RcwWGy
    mic: amzn.to/3sNOEGY
    ----------------------------------------
    if you liked the video then don't forget to subscribe my channel for more such content.
    Code and circuit diagram is uploaded on the telegram channel :- (t.me/robo301)
    #diyprojects #robot #electronic #smartcars
  • Věda a technologie

Komentáře • 162

  • @prateekverma22
    @prateekverma22  Před rokem +20

    //Code
    #include // libraray for motor shield
    #include // libraray for servo motor
    #include // libraray for ultrasonic sensor
    const int Trig_Pin =A0;
    const int Echo_Pin =A1;
    const int Max_Speed =200;
    const int Max_Dist = 250;
    NewPing ultra_sonic(Trig_Pin, Echo_Pin, Max_Dist);
    AF_DCMotor motor1(1,MOTOR12_1KHZ);
    AF_DCMotor motor2(2,MOTOR12_1KHZ);
    AF_DCMotor motor3(3,MOTOR34_1KHZ);
    AF_DCMotor motor4(4,MOTOR34_1KHZ);
    Servo myservo;
    int distance=250;
    int speedSet=0;
    boolean goesForward=false;
    void setup() {

    myservo.attach(10);
    myservo.write(0);
    delay(2000);
    distance=readDistance();
    delay(100);
    moveForward();
    }
    void loop() {
    int dist_R = 0;
    int dist_L = 0;
    delay(100);

    if(distance

  • @kodey4211
    @kodey4211 Před rokem

    Aree aree Engineer sahab great 🔥🔥🔥

  • @kartikeysingh8032
    @kartikeysingh8032 Před rokem

    Literally saved my degree bro thanks a lot

  • @AlejandroTortolini
    @AlejandroTortolini Před 9 měsíci

    Excelent video, thanks for sharing it!!

  • @shehababido8741
    @shehababido8741 Před rokem

    Awesome project from awesome person🤩👌

  • @knknella
    @knknella Před rokem +1

    Wow.. Nice 😊

  • @Kalpesh.gothwal25
    @Kalpesh.gothwal25 Před rokem

    Great 👌 becoming more innovative day by day 🔥

  • @tapankarangiya
    @tapankarangiya Před rokem

    Well done bro 👌

  • @VSCROx
    @VSCROx Před rokem +1

    Amazing project🤩 keep it up bro🔥🔥

  • @rameshkarthikeyan
    @rameshkarthikeyan Před rokem +2

    Great work, Can you share an online link to buy all the components? Thanks, COuld not find a few of the exact items.

  • @ranweersingh5672
    @ranweersingh5672 Před rokem

    Great bro

  • @kunaljaiswal9608
    @kunaljaiswal9608 Před rokem

    thanks for sharing

  • @tribhuwansingh
    @tribhuwansingh Před rokem

    Mast bhaiya

  • @rdtv-dz3eo
    @rdtv-dz3eo Před rokem

    Superb

  • @AmitKumar-ol5ky
    @AmitKumar-ol5ky Před rokem

    Awesome project... What's the budget?

  • @shkelqim6
    @shkelqim6 Před rokem

    good job

  • @AliNooh-vy5hj
    @AliNooh-vy5hj Před 7 měsíci +1

    Good

  • @srajansaxena7448
    @srajansaxena7448 Před rokem

    Soo amazing🔥🔥

  • @LaribiRayen
    @LaribiRayen Před 2 měsíci

    I want to use a H bridge instead of the arduino shield and an esp32 instead of using arduino. Will the code be the same after i changes the libraries?

  • @im_snehil157
    @im_snehil157 Před rokem

    Amazing bro🔥🔥🔥🌟✨

  • @VikashJatav-fr2nb
    @VikashJatav-fr2nb Před rokem

    M apka Ahsan Kabhi nhi bhulunga please sir 🙏🙏

  • @abhisheknakade2031
    @abhisheknakade2031 Před rokem

    Can u describe more about that

  • @deepanshuiitr
    @deepanshuiitr Před rokem

    🔥🔥💯❤️

  • @abhijeetpurohit6294
    @abhijeetpurohit6294 Před 4 měsíci

    Can i run it in wifi also

  • @usmanbello7451
    @usmanbello7451 Před 5 měsíci

    Can I purchase the whole implementation from you ?

  • @christiangeraghty
    @christiangeraghty Před rokem

    what is the sticky stuff called you use to keep your micro servo and sensor in place?

  • @harishs2822
    @harishs2822 Před rokem

    Please anybody share what is the problem statement for this project..

  • @aashututorial6057
    @aashututorial6057 Před 4 měsíci

    Why our motor driver got sparked when we connect to 7 volt bettery plzzz help

    • @prateekverma22
      @prateekverma22  Před 4 měsíci

      You could have shorted gnd and Vcc.
      And remember one thing whenever you do connection remove the battery first or turn off the switch

    • @aashututorial6057
      @aashututorial6057 Před 4 měsíci

      @@prateekverma22 yes we try it.. But it sparked and smoke coming

  • @GaneshYadav-zf3sf
    @GaneshYadav-zf3sf Před rokem

    I have required this instrument please, I am from Nepal ,saptari

  • @mikestrivia
    @mikestrivia Před rokem +4

    This is good, but you could have made this much better if you had shown each detail and connection. A little more time would have made this go from watching someone throw parts together to a follow each step with me and learn how and why I'm doing this. And lower the awful background music.

  • @jacksonkitts2938
    @jacksonkitts2938 Před rokem

    What makes it so expensive?

  • @Dancer5001
    @Dancer5001 Před rokem +1

    Hi bro preetik

  • @VikashJatav-fr2nb
    @VikashJatav-fr2nb Před rokem

    Please sir kaise bna sakte hai

  • @jashanjotsingh742
    @jashanjotsingh742 Před rokem

    Robot dodging obstacles like prateek dodging defenders

  • @samartha2980
    @samartha2980 Před rokem

    In which language program is written?

  • @itz_mahto_jii
    @itz_mahto_jii Před rokem

    do you have project report file of this project

  • @kapilkumawatyou
    @kapilkumawatyou Před rokem +1

    How can we supply 12V supply to driver and 9v to Arduino separately

    • @prateekverma22
      @prateekverma22  Před rokem +1

      To supply power separately you need to remove the jumper from the motor shield and then give the power to the arduino using it's DC jack and To motor shield use EXT_PWR terminals.

  • @knightk7222
    @knightk7222 Před 5 měsíci

    Hi bro
    Everything is fine I'm using 2 ×3.7 v cells but sensor is working but motor is not working please help

  • @amansayyed5774
    @amansayyed5774 Před 6 měsíci

    while coding the battery is connected or not ?

  • @boiani
    @boiani Před 9 měsíci

    How much time took to upload code please tell

  • @GaneshShinde-rq4pl
    @GaneshShinde-rq4pl Před rokem

    Can I use this for node mcu esp8266

  • @yoobi6150
    @yoobi6150 Před rokem

    link in description is not working

  • @izadazmir1070
    @izadazmir1070 Před rokem +1

    Hello bro,what the controller you use tu control the vahicle?

  • @kamleshjaiswal4276
    @kamleshjaiswal4276 Před 9 měsíci

    Bhai laptop ma kya kiya ho

  • @cloudie8302
    @cloudie8302 Před 9 měsíci +1

    your trig pin is placed wrong

  • @user-cq2ik9ss6r
    @user-cq2ik9ss6r Před 6 měsíci

    amazing bot bro, i have L298 motor driver board how to give connection for this bot?

    • @prateekverma22
      @prateekverma22  Před 6 měsíci

      Follow this link -forum.arduino.cc/t/4wd-obstacle-avoiding-smart-car-using-l298n-motor-driver-module-hc-sr-04-ultrasonic-sensor-and-sg90-micro-servo-motor/1159254

  • @shaikfiroz7873
    @shaikfiroz7873 Před rokem

    bro plzzz send the code....this code was not copying to phone

  • @Nsathish1979
    @Nsathish1979 Před rokem

    Please send the code of this

  • @VikashJatav-fr2nb
    @VikashJatav-fr2nb Před rokem

    Sir mera 1date ko practical hai

  • @lakshimalrashmika3901

    Mekata keeyak viyadam unada

  • @kunalkalaskar299
    @kunalkalaskar299 Před 10 měsíci +1

    Can we use 9v battery ... please reply

  • @Nitin-Yadav54
    @Nitin-Yadav54 Před rokem

    Total kitne rupaye lagte is banane mein Bhai😊

  • @bilalpatel9529
    @bilalpatel9529 Před rokem

    i am making this project but servo motor us not working and all four motor are rotating for only one second it get stop.What should i do

  • @Ajjubhai-eb8gl
    @Ajjubhai-eb8gl Před 8 měsíci

    WE HAVE TO USE UNO OR UNO R3?????

  • @lakshimalrashmika3901

    Code tika gahanne kohomada aiye

  • @mayankshakkerwal5257
    @mayankshakkerwal5257 Před 3 měsíci

    code not working.

  • @abrishirfan6797
    @abrishirfan6797 Před rokem

    Is the code that you showed the complete one on camera? Sorry I’m just starting out so I’m not really educated on this 😅

    • @prateekverma22
      @prateekverma22  Před rokem

      yes it is complete

    • @abrishirfan6797
      @abrishirfan6797 Před rokem +1

      @@prateekverma22hi I’m making this myself and it would really make my life easy if you could give me the code so I can just easily copy paste it (if it’s too much trouble pls tell me anyway cuz otherwise I’ll be left hanging)

    • @prateekverma22
      @prateekverma22  Před rokem +1

      @@abrishirfan6797 check description box

    • @abrishirfan6797
      @abrishirfan6797 Před rokem

      @@prateekverma22the links not working in my area

    • @abrishirfan6797
      @abrishirfan6797 Před rokem

      Ok never mind I used a proxy--- could you tell me the app you used to compile?

  • @arts_and_crafts398
    @arts_and_crafts398 Před rokem +1

    bro is this project is suitable for mechanical students

  • @samartha2980
    @samartha2980 Před rokem

    Can you explain in which app you run the program?

    • @prateekverma22
      @prateekverma22  Před rokem

      Arduino IDE, it has its own language which is very much similar to c/c++

    • @samartha2980
      @samartha2980 Před rokem

      @@prateekverma22 Thank you so much

  • @pankajhkmn
    @pankajhkmn Před rokem

    hi

  • @umeshchoudhary788
    @umeshchoudhary788 Před rokem +1

    Bro can you share that Coding part because me and my group are trying to do that project so plz...... Share it bro....

    • @shaikfiroz7873
      @shaikfiroz7873 Před rokem

      brohh if u get the code plzz share me Also request

  • @Milly-ww5rx
    @Milly-ww5rx Před rokem

    How many jumper wires do we need to buy?

  • @Karshvarth211
    @Karshvarth211 Před rokem +1

    Code bro

  • @MaterialisticXII
    @MaterialisticXII Před 9 měsíci

    Will it move automatically if we add voice control also?

    • @prateekverma22
      @prateekverma22  Před 9 měsíci

      Yes, based on the command given to it

    • @MaterialisticXII
      @MaterialisticXII Před 9 měsíci

      @@prateekverma22 😊 thank you for your help. Can I add Bluetooth speaker and Bluetooth module? Will it work?

  • @hasilhasil4213
    @hasilhasil4213 Před rokem

    bro one doubt can u reply asap , i have done this and i got error : AF MOTOR H NO SUCH FILE OR DICTIONARY

    • @prateekverma22
      @prateekverma22  Před rokem

      You need to first install the AFMotor library for arduino

    • @hasilhasil4213
      @hasilhasil4213 Před rokem

      @@prateekverma22 SIR HOWS ITS DONE? , I INSTALLED EVERY THING AND THE CODING ONLY LEFT

    • @prateekverma22
      @prateekverma22  Před rokem

      ​@@hasilhasil4213 you can check out my code , see in the description box

    • @humnashafique193
      @humnashafique193 Před rokem

      Please give the code ....link in description is not working

  • @aymericgermonpre5824
    @aymericgermonpre5824 Před rokem

    Hello, would it be possible to transfer me the Arduino file please. Good day to you

  • @mayankshakkerwal5257
    @mayankshakkerwal5257 Před 3 měsíci

    i have done all process but still code is not working

    • @prateekverma22
      @prateekverma22  Před 3 měsíci

      What problem are you facing exactly? is the code not uploading ?

  • @GaneshYadav-zf3sf
    @GaneshYadav-zf3sf Před rokem

    Brother how much price of instrument used in this

  • @VikashJatav-fr2nb
    @VikashJatav-fr2nb Před rokem

    Mujhe banani hai sir

  • @Dancer5001
    @Dancer5001 Před rokem +2

    App active raha na

  • @piyushsamanta4761
    @piyushsamanta4761 Před 10 měsíci

    Is this remote control

    • @prateekverma22
      @prateekverma22  Před 10 měsíci

      No , it senses the obstacle by its own and takes the path free from obstacle

  • @trisnaabyan3967
    @trisnaabyan3967 Před rokem

    What this library ?

    • @prateekverma22
      @prateekverma22  Před rokem

      I've used three library-
      1. ( for motor shield)
      2. (for ultrasonic sensor)
      3. (for servo motor)

  • @keerthanbt5193
    @keerthanbt5193 Před rokem

    Is this mechanical engineering project

  • @anandaseal2004
    @anandaseal2004 Před 9 měsíci

    There are showing an error " AFMotor such file or directory not found

    • @prateekverma22
      @prateekverma22  Před 9 měsíci

      You need install 'Adafruit Motor Shield library' go to tools >manage libraries>

  • @anu34501
    @anu34501 Před 8 měsíci

    How to start and disconnect this robot is there any application or just Arduino coding

  • @sarangaming4817
    @sarangaming4817 Před 9 měsíci

    Code name bro

  • @asggaming5390
    @asggaming5390 Před rokem

    bhai please yaar code to daal de

  • @Robots._.
    @Robots._. Před rokem +2

    I have uploaded the code but my car is not working,, all the connection are correct and battery is also charged

  • @ldharsh
    @ldharsh Před rokem

    How to insert code in it?? Plz someone help me out

    • @prateekverma22
      @prateekverma22  Před rokem

      Watch this video-czcams.com/video/1DAK19FPJXo/video.html

  • @VikashJatav-fr2nb
    @VikashJatav-fr2nb Před rokem

    Apke hath jodta hu bhai

  • @VikashJatav-fr2nb
    @VikashJatav-fr2nb Před rokem

    Bhai m Maruti Suzuki me job karta hu Bhai please

  • @megaknight3705
    @megaknight3705 Před rokem +1

    Very old project

  • @ChandanKumar-sc9lx
    @ChandanKumar-sc9lx Před rokem

    Arduino Uno ka peaches Link bhejo na Bhai

    • @prateekverma22
      @prateekverma22  Před rokem

      quartzcomponents.com/products/arduino-uno?variant=31898093846663¤cy=INR&?FreeListings&gclid=Cj0KCQjwj_ajBhCqARIsAA37s0wyUwCgVcaQiaqY93a98kC0rRTWOMkfgJ1Pb6RwnpUMCudCpKC9GvgaApzTEALw_wcB

  • @user-cf3zb1zn5s
    @user-cf3zb1zn5s Před rokem

    give me a code

  • @mayankshakkerwal5257
    @mayankshakkerwal5257 Před 3 měsíci

    😭 fake code not working.

  • @asggaming5390
    @asggaming5390 Před rokem

    please give the code
    bro

  • @shrinivvashuddar4720
    @shrinivvashuddar4720 Před rokem

    no use, as no code given

  • @himanshu_27tt
    @himanshu_27tt Před rokem +11

    How much money is required to make this?

    • @gamerboyredyt
      @gamerboyredyt Před rokem

      To much

    • @prateekverma22
      @prateekverma22  Před rokem +5

      around 2.5k (INR)

    • @himanshu_27tt
      @himanshu_27tt Před rokem +1

      @@prateekverma22 thanks

    • @himanshu_27tt
      @himanshu_27tt Před rokem +2

      @@jacksonkitts2938 he is talking about rupees, not dollars

    • @Codykratt
      @Codykratt Před rokem +4

      I built this using some scrap from an old project and some lego, probably cost around $30-50

  • @Dancer5001
    @Dancer5001 Před rokem +1

    Mein project bana raha Hun fir koi problem aaye to telegram PE DM kar duga ok ?? Please reply

  • @sumanpoddar927
    @sumanpoddar927 Před 6 měsíci

    I'm facing problem, My project is not working on battery, it works perfectly when plugged into the laptop. can you help me. December 22 last date of submission.
    @prateekvarma

    • @prateekverma22
      @prateekverma22  Před 6 měsíci

      1)Check the battery holder connection
      2)check whether switch is working properly or not.
      2)Make sure that the battery is not discharge or use new battery

  • @Nitin-Yadav54
    @Nitin-Yadav54 Před rokem

    Total kitne rupaye lagte is banane mein Bhai😊