how to make a Obstacle Avoiding Robot using Arduino uno and L293d with HC sr04 Sensor

Sdílet
Vložit
  • čas přidán 3. 02. 2020
  • how to make a Obstacle Avoiding Robot using Arduino uno and L293d with HC sr04 Sensor
    Code and Schematics :- marobotic.com/2023/11/12/obst...
    This information is processed by the Arduino, L293D motor control shield and ultrasonic sensor hc-sr04. If the distance between the robot and the obstacle is less than 20cm, the Robot stops and scans in left and right directions for new distance using Servo Motor and Ultrasonic Sensor. If the distance towards the left side is more than that of the right side, the robot will prepare for a left turn. But first, it backs up a little bit and then activates the Left Wheel Motor in reversed in direction.
    Components Details () {
    Arduino Uno:- marobotic.com/product/arduino...
    4 wheel robot car kit:- marobotic.com/product/4-wheel...
    sg90 servo motor:- marobotic.com/product/mini-se...
    L293D motor control shield:- marobotic.com/product/arduino...
    Ultrasonic Sensor Holder:- marobotic.com/product/ultraso...
    ultrasonic sensor hc-sr04:- marobotic.com/product/ultraso...
    Female to Female jumper Wires:- marobotic.com/product/40-pin-...
    18650 Battery Holder - 2 Cell:- marobotic.com/product/18650-b...
    18650 Battery Cell 3.7V x 2:- marobotic.com/product/18650-b...
    }
    We regularly uploads exciting videos like this
    Suscribe us For More Videos
    Muhammad Ansar
    +923378655465
    Visit My Website:- marobotic.com/projects/
  • Jak na to + styl

Komentáře • 210

  • @user-mi6ht9lm1n
    @user-mi6ht9lm1n Před 4 lety +3

    بارك الله فيك عمل جيد👍👍👍

  • @ronee505
    @ronee505 Před 4 lety +2

    splendor of lasting success

  • @wikumrathnayake7142
    @wikumrathnayake7142 Před 2 lety +7

    Great, Your code is working well. I already completed my University project with this rover using your code. Thank You very much friend from Sri Lanka. Good Luck 🙏

  • @muhammadarifqureshi9128
    @muhammadarifqureshi9128 Před 3 lety +1

    ماشاء اللہ جیتے رہو اباد رہو اپ ائیندہ نسل کے لئے بہت کچھ کر رہے ہو اللہ اپ کو اس کا اجر دے آمین

  • @mustafasucu4927
    @mustafasucu4927 Před 4 lety +3

    you are doing very good work, congratulations brother from pakistan.

  • @frazfahad85
    @frazfahad85 Před 3 lety +5

    Sir, Is it possible that I can make the connection to the lcd module between line follower robot project as well as in the circuit diagram and the coding of the Arduino IDE software?

  • @yldztechnology7294
    @yldztechnology7294 Před rokem +1

    hello is there a way to use this l293d shield together with the nrf24l01 module. because the shift register integrated on the shield uses miso mosi sck pins.

  • @FarahN-xg7vt
    @FarahN-xg7vt Před 5 měsíci

    Heyy great work, how can I make the same object avoider but with 3 ultrasonic sensors instead of the servo motor? What changes should be in the code?

  • @rodelalfonsobautista3729
    @rodelalfonsobautista3729 Před 2 lety +1

    Hello, do you have obstacle avoiding robot using l298N? Thanks

  • @muhammadzaid532
    @muhammadzaid532 Před 4 lety +2

    nice work !! subscribed

  • @MerkSteeZe
    @MerkSteeZe Před 3 lety

    Can I add a Bluetooth control code to this code and have it switch back and forth between manual Bluetooth App mode and sonar obstacle avoidance mode? How would I switch?

  • @randyraaj21041987
    @randyraaj21041987 Před 3 lety

    Sir in this program, this robot in corner floor its turn right side and left continues. Not come out. Its move right and left same place

  • @kapilkumawatyou
    @kapilkumawatyou Před rokem +1

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

  • @thusharaweerasinghe7893
    @thusharaweerasinghe7893 Před 3 lety +1

    Wow amazing video

  • @lowchenkhang680
    @lowchenkhang680 Před rokem

    Hi Sir, I am not sure why, but when I put the same batteries as yours, the L293D motor driver just blow up. Any reasons for this?

  • @ANURAGMISHRA-fg3vc
    @ANURAGMISHRA-fg3vc Před 2 lety

    if use batter with lover power is it work or not

  • @swaritvaishnav6844
    @swaritvaishnav6844 Před 11 měsíci

    i made this project yesterday as per to your video but the motor was not working was this because of the power issue?
    is 1200 mah and 3.7 v battery okay ?

  • @ashishcuber3277
    @ashishcuber3277 Před 3 lety +1

    Very very nice robot

  • @achalarodrigo433
    @achalarodrigo433 Před 3 lety

    It’s worked but my car is s first smash and the turn how to slow this

  • @CG.221
    @CG.221 Před 7 měsíci

    Thank you so much sir ji 🙏

    • @MuhammadAnsar
      @MuhammadAnsar  Před 7 měsíci

      welcome

    • @MuhammadAnsar
      @MuhammadAnsar  Před 7 měsíci

      welcome

    • @CG.221
      @CG.221 Před 7 měsíci

      ❤️

    • @CG.221
      @CG.221 Před 7 měsíci

      और नए नए प्रोजेक्ट बनाते रहिए सर जी

  • @frazfahad85
    @frazfahad85 Před 3 lety +3

    Love the project sir. Sir, can you make a video about how to make a lcd obstacle avoiding robot with a servo motor attached to it and upload it to the youtube ?

  • @evounknown3133
    @evounknown3133 Před 2 lety +1

    I have done the same but here servo seems to rotating and uncontrolled and the gear motors don't move kindly help me to sort out this problem 😭🙏 I've bought all materials for school project but car is not working

  • @fahim.nisar01
    @fahim.nisar01 Před 4 lety +3

    👌

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

    It is okay without servo?

  • @omotokeokeyemi8979
    @omotokeokeyemi8979 Před 2 lety

    Hello, my robot is working fine but instead of avoiding obstacles, it is running into obstacles. Please hep

  • @krishanggohel7568
    @krishanggohel7568 Před 3 lety

    'motor1' was not declared in this scope' I AM GETTING THIS ERROR. CAN YOU HELP ME OUT

  • @b3llairemindset586
    @b3llairemindset586 Před rokem

    Bahi mere motor driver ke sath wo Gnd,5v wale spikes nahi ha me kia karo.

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

    How is their pins in L293d motorshield board for inserting and connecting to ultrasonic sensor where I had holes only .

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

      You have to solder pins in the holes;
      that's what i had done

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

      I still got a problem in the code tho

  • @bablugaonkar666
    @bablugaonkar666 Před 6 měsíci +1

    bhai very nice vedio but one confusion is with code AF_DCMOTOR motor1(MOTOR_1, MOTOR12_64KHZ) HERE inside the bracket we motor_1 is the port number and motor12 is the channel with frequency of 64khz .Are all the ports to which motors are connected is it channel1 and 2 or motors connected to port3 and 4 are in channel 3 and 4 plz clarify the doubt be

  • @NguyenNguyen-ig2yk
    @NguyenNguyen-ig2yk Před 7 měsíci

    Chỉ cách lắp mô đun cảm biến hồng ngoại cho mô đun l293d đi

  • @thusharaweerasinghe7893
    @thusharaweerasinghe7893 Před 3 lety +1

    Keep it up . Bro

  • @ishansharma5731
    @ishansharma5731 Před 2 lety

    Bhai aapne yeh car remote control based kaise bnayi

  • @muhartehnik9197
    @muhartehnik9197 Před rokem

    👍👍👍

  • @haseebahsun8809
    @haseebahsun8809 Před 4 lety +1

    Can u tell me which colour wire is negative and which is positive in the gear motors when you connected it with the motor driver??plz reply asap

    • @MuhammadAnsar
      @MuhammadAnsar  Před 4 lety +2

      red positive and black negative

    • @haseebahsun8809
      @haseebahsun8809 Před 4 lety +1

      @@MuhammadAnsar ansar bhai woh jo gear motors ke sath wires hain un me orange colour positive ha ya negative, plz reply , thank you

  • @frazfahad85
    @frazfahad85 Před 3 lety +1

    Sir, can you tell me which area do you live in Islamabad, I want to meet you.

  • @M.Ammmar-or4ut
    @M.Ammmar-or4ut Před měsícem

    please gave servo labri

  • @TheCodingBus
    @TheCodingBus Před 3 lety +4

    I'll make this project...

  • @sunita6534
    @sunita6534 Před rokem

    The ultrasonic sensor is not working and the car is changing its direction on its own

  • @asiarizwan00
    @asiarizwan00 Před 3 lety

    yar bhai motor right and left sahi sa nhi morti thora sa murti hain, speed max kar ka bhi da khi phir bhi wahi ha, pls help.

  • @sunan123...7
    @sunan123...7 Před 2 lety

    How to copy the code in a mobile and upload the code in a ARDUINO

  • @SoumenMishraKansbahal
    @SoumenMishraKansbahal Před 3 lety +1

    Bhai need your help, obstacle robot mera kaam nahi kar raha hai, bas ek jagah ghum raha hai aur servo idhar udhar ghum raha hai, pls help

  • @khaqanabbas8055
    @khaqanabbas8055 Před 11 měsíci

    Brother I am making this project but I am facing various problems please help me

  • @marcosdasilva7409
    @marcosdasilva7409 Před rokem

    🇧🇷👏😁...SHOW

  • @jishabenny9183
    @jishabenny9183 Před 2 lety +2

    Can I use Arduino UNO R3 SMD Atmega328P Board - Clone Compatible Model ,plz reply

  • @nandanakumara9945
    @nandanakumara9945 Před 4 lety +2

    Sir i can use a play wood for this.plz reply me soon

  • @sadshivi9766
    @sadshivi9766 Před 3 lety

    bro mera se yh upload nhi ho rha adrino mai

  • @ftthtechnology9033
    @ftthtechnology9033 Před rokem +1

    Nice

  • @HarshGArt
    @HarshGArt Před 3 lety +3

    Bhi code apply kar raha hu to error kyu bata raha hai please help me🙏😭

  • @tiresink1978
    @tiresink1978 Před 3 lety +1

    Sir please tell me... Code line 14 while initializing motor what is 64 kHz and why we use it?

    • @tiresink1978
      @tiresink1978 Před 3 lety +1

      Can we initialize set variable set=20
      More than 20?

    • @tiresink1978
      @tiresink1978 Před 3 lety +1

      In data function why only 40 kHz frequency transmit to trigger pin and receive from echo pin?

    • @MuhammadAnsar
      @MuhammadAnsar  Před 3 lety +1

      Define motor 64KHz pwm

  • @VoiceofPalestine157
    @VoiceofPalestine157 Před 7 měsíci

    Server not working brother solve it plz ASAP

  • @letschill7284
    @letschill7284 Před 3 lety +2

    Bro can i use the same code for 2 will motor instead of using the 4 motor??

  • @riteshgedam593
    @riteshgedam593 Před rokem +1

    If i use more voltage battery then it will work..??

  • @shaikfiroz7873
    @shaikfiroz7873 Před rokem

    Bro am iot student i had done a 5 projects.....my next project this one.....soo pleace send the code to me heart fully requesting

  • @jishabenny9183
    @jishabenny9183 Před 2 lety +2

    My Moter driver Is Not Working But Servo Moter is working only 4 moters Is Not Working, Plzz Reply

  • @sowunmikorede3109
    @sowunmikorede3109 Před 2 lety +1

    I successfully uploaded the code on my Arduino uno board and i noticed that the tires are moving in two different directions. The two front tires are moving clockwise while, the two back tires are moving anit-clockwise. please what could be the problem?

  • @aanukayode7130
    @aanukayode7130 Před rokem

    How did u connect the ultrasonic sensor to the motor driver. It seems what u did here is different from the schematic diagram u released

  • @rizwansaeed3899
    @rizwansaeed3899 Před 3 lety +1

    assalam o alaikum
    mere paas jo l293d driver ha us men ultra sonic sensor connect karne k liye connectors nai lage
    sirf khaali jaga ha
    mere paas female jumper k liye extra connectors pare han kia wo lag jayen ge
    please reply de den
    agar kisi aur ko bhi pata ha to wo bhi guide karen thankyou in advance

  • @frazfahad85
    @frazfahad85 Před 3 lety +2

    Sir, can you make a obstacle avoiding robot without adding the l293d motor driver, just add motor driver and Arduino. Thanks 😊.

  • @takeone_do
    @takeone_do Před 3 lety +3

    if possible could you do one with IR sensors?

    • @MuhammadAnsar
      @MuhammadAnsar  Před 3 lety +1

      yes

    • @takeone_do
      @takeone_do Před 3 lety

      @@MuhammadAnsar oh my god thank you so much!!! For the quick response too hahaha

    • @MuhammadAnsar
      @MuhammadAnsar  Před 3 lety +1

      @@takeone_do Welcome but send your email for use ir sensors code

    • @muhammadajwad4408
      @muhammadajwad4408 Před 3 lety +1

      can i get this code ir sensor too..I really need it please help me !!!!!!!

    • @takeone_do
      @takeone_do Před 3 lety +1

      @@MuhammadAnsar limmelvyn888@gmail.com sorry for the late response

  • @CG.221
    @CG.221 Před 6 měsíci

    Sir ji इस में AF Motor h ऐसा कोई फाइल या निर्देशिका नही

  • @nurnajibahhjr6649
    @nurnajibahhjr6649 Před 3 lety +1

    can you make code of line follower robot with obstacle avoidance using L293d motor control shiled?

  • @fahim.nisar01
    @fahim.nisar01 Před 4 lety +5

    Can i control mini car with my Android phone??

  • @mdaravee
    @mdaravee Před 3 lety +3

    Hie how are you :-)..thanks for sharing i am doing a same project like yours i am using 1 dc brushed motor ,1 servo for steering front wheels. and 5 ultrasonic sensors.when i upload the code i dont get errors done successfullf but here is my problem .. the robot can wont move .no thing comes o the motors would be gratefull if i could send the code you look at it ..
    thanks in advance

    • @MuhammadAnsar
      @MuhammadAnsar  Před 3 lety +2

      ok send the code embedded.lab786@gmail.com

    • @narendrashiva9360
      @narendrashiva9360 Před 3 lety +2

      @@MuhammadAnsar how can I download the code. Can u plz help me

  • @justinnamuco9096
    @justinnamuco9096 Před rokem

    Please indicate the language in the title.

  • @a35sandeshjangale64
    @a35sandeshjangale64 Před rokem

    Hello sir is it possible to use 4 12v DC mottor, 4 ultrasonic sensor an 1 Bluetooth ?

  • @mohamedsabri2075
    @mohamedsabri2075 Před 3 lety +1

    is it possible with a 9v battery ?

  • @nabeelnasir3758
    @nabeelnasir3758 Před 4 lety +1

    Yeh code mjhe error de rha ha " redefinition of void loop or void setup ka

  • @sunan123...7
    @sunan123...7 Před 2 lety

    Make a video please please 🙏🙏

  • @shubhisingh5619
    @shubhisingh5619 Před 4 lety +1

    Hello sir,
    Mene apki ek purani video dekhi thi line follower Or obstacle avoidance vali me usko dekh ke bna rhi thi but mere pass Arduino uno, l298n motor driver , mini breadboard, us sensor nd ir sensor.
    Me bna ni paa rhi kuki Arduino uno kaise use kru kuki uss video me yhi use kia tha. Help me

    • @MuhammadAnsar
      @MuhammadAnsar  Před 4 lety +1

      same wohi pinon py lgna hy jase k ir agr A0 or A1 hy tu un ko arduino uno ki bhi A0 or A1 py hi lgna hy

    • @shubhisingh5619
      @shubhisingh5619 Před 4 lety +1

      @@MuhammadAnsar or sir agar same pin pe jaise A0 pe hi us sensor ki bhi pin ayai toh kaise kro breadboad use ni hoga kya Arduino uno me

    • @shubhisingh5619
      @shubhisingh5619 Před 4 lety +1

      @@MuhammadAnsar thank you soo much sir for responding and helping me

    • @MuhammadAnsar
      @MuhammadAnsar  Před 4 lety

      @@shubhisingh5619 ni uno kliy breadboad use krny ki zarort ni hy

    • @MuhammadAnsar
      @MuhammadAnsar  Před 4 lety +1

      @@shubhisingh5619 welcome

  • @nabeelnasir3758
    @nabeelnasir3758 Před 4 lety +2

    Project kay code kay liye mjhe koi software download krna paray ga?

  • @kareemyaghi3359
    @kareemyaghi3359 Před 4 lety +1

    great project , i have a question the servo motor is it 180 degree or 360 ?

    • @MuhammadAnsar
      @MuhammadAnsar  Před 4 lety +3

      180 degree

    • @kareemyaghi3359
      @kareemyaghi3359 Před 4 lety +1

      @@MuhammadAnsar thanks man, if I want to merg to codes together the voice controlled and the the obstacle avoiding. Does it requires new codes or just merg it?

  • @muhartehnik9197
    @muhartehnik9197 Před rokem

    bos bisa mintak cara program ya

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

    your website is deactivated please activate it again

  • @hanscai8480
    @hanscai8480 Před 3 lety +1

    Can I use 2motors?

  • @VishalSharma-ek7ww
    @VishalSharma-ek7ww Před 2 lety

    Sir how much voltage required for this .

  • @naveenn5903
    @naveenn5903 Před 3 lety

    Brother how to add header files. In aurdino software.

    • @naveenn5903
      @naveenn5903 Před 3 lety

      i am in trouble. I need to submit my project work. So.

  • @frazfahad85
    @frazfahad85 Před 3 lety +1

    Sir, wo app ka aik video mein app nay kaisay Arduino IDE ko black theme kaisay lay kar sir app laiy Hain. Sir, mujay bhi Arduino IDE ko black theme mein lay kar jana hay.

    • @MuhammadAnsar
      @MuhammadAnsar  Před 3 lety +1

      google se arduino dark theme 2020 search kr ly or add krny ka trka bhi dekh ly

    • @frazfahad85
      @frazfahad85 Před 3 lety +1

      Thank you, sir.

  • @doel_2473
    @doel_2473 Před 3 lety +4

    I'am like you because you say bismillah.. you are my brother 👍

  • @ArjunKumar-mg1mi
    @ArjunKumar-mg1mi Před 2 lety +1

    #Sir iske code ka ek video bana dijiye please sir ek video bana dijiye shamjhakar.

  • @nabeelnasir3758
    @nabeelnasir3758 Před 4 lety +1

    Ansar bhai. Isko banany mein cost kia aye gi?

  • @syedmuqtasidalibscs0434
    @syedmuqtasidalibscs0434 Před 2 lety +1

    sir jb my board select krny jata hu tools my then mujhy just arduino UNO show hota hy apky pas arduino genuino show horha hy and my project is also not working sb chz thk sy lgae hy

  • @motivationwithmanish2182

    Sir ye project kaise milega bna banaya

  • @laibakhan3577
    @laibakhan3577 Před rokem

    Please help me how's the code run??

  • @santoshisantoshi6808
    @santoshisantoshi6808 Před rokem

    Sir please provide me code in mobile

  • @nethilascube6959
    @nethilascube6959 Před 3 lety +3

    Do we had to upload all the codes or only " obstacles ovoiding robot"??

    • @MuhammadAnsar
      @MuhammadAnsar  Před 3 lety

      upload only "obstacles ovoiding robot" code file

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

    I need a sketch of arduino car to move

  • @QuangNguyen-jn6lk
    @QuangNguyen-jn6lk Před 9 měsíci +1

    What software did you use to draw the schematic?

  • @HuzaifiMH
    @HuzaifiMH Před 3 lety

    where you design this sir? 0:45

  • @feeltherythm9410
    @feeltherythm9410 Před 3 lety +1

    Sir i need help in this project.
    Plz help

    • @MuhammadAnsar
      @MuhammadAnsar  Před 3 lety

      Tell me what I can do to help you

    • @feeltherythm9410
      @feeltherythm9410 Před 3 lety

      @@MuhammadAnsar
      Sir i make this project
      I connect the all wires as same as you
      My servomotor and ultrasonic sensor work but it can't move any where(forward, backward,left,right).

    • @arsenaeka535
      @arsenaeka535 Před rokem

      take batterai 3,7 v

    • @arsenaeka535
      @arsenaeka535 Před rokem

      ​@@feeltherythm9410 take baterai 3,7 v

  • @sunan123...7
    @sunan123...7 Před 2 lety +1

    How to write the car code

  • @CG.221
    @CG.221 Před 6 měsíci

    बता रहा है तो क्या करू

  • @swaritvaishnav6844
    @swaritvaishnav6844 Před 11 měsíci

    how much rpm motor is required

    • @MuhammadAnsar
      @MuhammadAnsar  Před 11 měsíci +1

      300 RPM

    • @swaritvaishnav6844
      @swaritvaishnav6844 Před 11 měsíci

      @@MuhammadAnsar is 1200 mah and 3.7 v battery okay ?

    • @swaritvaishnav6844
      @swaritvaishnav6844 Před 11 měsíci

      @@MuhammadAnsar i made this project yesterday as per to your video but the motor was not working was this because of the power issue

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

      Same problem please respond

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

      Bro help

  • @ranjanabandale2316
    @ranjanabandale2316 Před 2 lety +1

    Code doesn't open

  • @shubhamzinjurde2332
    @shubhamzinjurde2332 Před 3 lety +1

    Hello sir
    Maine bhi ye project kiya hai lekin isme code konsa hai

  • @mkhollywoodmovies1079
    @mkhollywoodmovies1079 Před 3 lety +1

    Sir please btayiyega ki ye saman ke naam saare plz plz plzplzpzlzpzlz 🥺

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

    give me a code

  • @AbdulMajeed-xj7tz
    @AbdulMajeed-xj7tz Před 3 lety +1

    Assalam alaikum bhai app ne koi additional file nahe downlod ki

    • @AbdulMajeed-xj7tz
      @AbdulMajeed-xj7tz Před 3 lety +1

      Aur plz app ka contact number de na

    • @MuhammadAnsar
      @MuhammadAnsar  Před 3 lety

      وَعَلَيْكُمُ ٱلسَّلَامُ وَرَحْمَةُ ٱللَّٰهِ وَبَرَكَاتُهُ
      haaan g bhai koi bhi Extra file use ni ki hoi

    • @MuhammadAnsar
      @MuhammadAnsar  Před 3 lety

      +923378655465

    • @AbdulMajeed-xj7tz
      @AbdulMajeed-xj7tz Před 3 lety

      App ka phone number plz

    • @AbdulMajeed-xj7tz
      @AbdulMajeed-xj7tz Před 3 lety

      @@MuhammadAnsar ye number ko call kar re to wrong num bol raha hai

  • @abdulmajeedsyedsyed8863
    @abdulmajeedsyedsyed8863 Před 3 lety +1

    assalam alikum appcontact numberf chai ye kam se jaruri kam hai

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

    are you pakistani?

  • @muhammadajwad4408
    @muhammadajwad4408 Před 3 lety

    helloo can you help me doing this project but add on with bluetooth module please ...i really really need your help as soon as possible
    thank you