How to Make Arduino Obstacle Avoiding Robot with L298N H-Bridge Motor Driver

Sdílet
Vložit
  • čas přidán 2. 03. 2017
  • In this Arduino project tutorial we will learn how to make obstacle avoiding robot using L298N h-bridge motor driver. Also we will use for this project HC SR04 ultrasonic distance sensor and we will use NewPing library in the arduino code.
    Required Hardware:
    Arduino Uno R3
    goo.gl/Rqc5w2
    amzn.to/2LZr6t4
    L298N H-bridge
    goo.gl/Ucvx6J
    amzn.to/3diatT1
    HC SR04 Sensor
    goo.gl/F0m7hN
    amzn.to/3avwe1N
    SG90 Servo
    goo.gl/iywd5p
    amzn.to/3avwe1N
    DC Motor Wheel
    goo.gl/iDy7ep
    amzn.to/3djj9Zp
    Chassis
    goo.gl/Y8Ch7A
    amzn.to/3u7BOyk
    HC SR04 Bracket
    goo.gl/dknful
    amzn.to/3rxpeXm
    Front Wheel
    goo.gl/HLLKpc
    amzn.to/3sAKInF
    Breadboard
    goo.gl/08nnr1
    amzn.to/3qxLxwm
    F to F Jumper
    goo.gl/TdGrkk
    amzn.to/3dhwVM5
    M to M Jumper
    goo.gl/VRzUN4
    amzn.to/3dhwVM5
    9V Battery
    goo.gl/3EIJcf
    amzn.to/2O4h5vK
    Battery Clip
    goo.gl/iAEgPl
    amzn.to/2QHL3qi
    Power Cable
    goo.gl/aBKusM
    Recommended Items:
    Use Your Muscles in Project - amzn.to/3wdL45C
    37 Sensor & Module Packages - amzn.to/3m66WeQ
    Try this Robot Arm - amzn.to/3fq8DCl
    Best Resin 3D Printer - amzn.to/39tY8KB
    Arduino Compatible Kits - bit.ly/2J2AFF7
    Banggood Spring Sale - bit.ly/3slMbOn
    NewPing Library - goo.gl/Qe6XU6
    Download Source Code: create.arduino.cc/editor/mert...
    Social Media:
    / mertarduino
    / mertarduino
  • Věda a technologie

Komentáře • 350

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

    Source Code: create.arduino.cc/editor/mertarduinotech/4aeaf653-2755-4d8b-96ca-c65e9eff8927/preview
    Recommended Items:
    Use Your Muscles in Project - amzn.to/3wdL45C​
    37 Sensor & Module Packages - amzn.to/3m66WeQ​
    Try this Robot Arm - amzn.to/3fq8DCl​
    Best Resin 3D Printer - amzn.to/39tY8KB​
    Arduino Compatible Kits - bit.ly/2J2AFF7​
    Banggood Spring Sale - bit.ly/3slMbOn

    • @jamistv3708
      @jamistv3708 Před 3 lety

      how about L298P motor., did you try., i try but it's not work., please help me

    • @manishdhakal9379
      @manishdhakal9379 Před 2 lety

      Awsome!!!

    • @dakshtaank1237
      @dakshtaank1237 Před rokem

      bro there is a problem i did every thing same as you but its no working please help me i wasted 2 arduino on this but it is not working please help me

  • @HeatDemon-yb1zo
    @HeatDemon-yb1zo Před 4 dny +2

    I tired this and it worked on God's level
    Hands off
    Love from🇮🇳🇮🇳🇮🇳🇮🇳🇮🇳🇮🇳🇮🇳🇮🇳

  • @MrHristoB
    @MrHristoB Před 6 lety +3

    Thank you very much for sharing. I've been following you for a while and really helped me getting into the Arduino world. You certainly love your glue gun :-)

  • @Ak-mb7wj
    @Ak-mb7wj Před 5 lety +4

    thanks bro.. it really helped me a lot.. i made it.. love from INDIA

  • @IncredibleHulkz
    @IncredibleHulkz Před 6 lety +7

    Awesome! It works perfectly!!! If you have problems with the sensor, you must switch the two cables that are connected from the sensor to the Arduino board. Thank you very much Mert! You are the best.

    • @deepakgupta6856
      @deepakgupta6856 Před 5 lety

      Hello sir i have downloaded the new ping library but it does not contain any thing

    • @kotreshb3968
      @kotreshb3968 Před 5 lety

      U got output Anonymous replay fast

    • @harithshirzad8351
      @harithshirzad8351 Před 5 lety

      @@deepakgupta6856 when downloading it above the place where you download should be open with unrar and rar click it then put the file you have downloaded then you get the code

  • @TheGoldAppleTGA
    @TheGoldAppleTGA Před 7 lety +5

    thanks for making video every week.

  • @HuubMons65
    @HuubMons65 Před 6 lety +4

    Thank you for the video and script! A good start for building this robot.
    The basic script can be improved, because the variable lookRight is never used. So at this moment the robot will only check the left side for distance.
    Maybe it's a small bug, easy to solve: change line 64 into:
    if (distanceRight >= distanceLeft){
    And it's possible to run the complete robot with 1 set of 4 AA batteries (the 4 AA battery holder is provided in some of the robot kits).

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

    Thx for making this vedio my project is working perfectly

  • @jassi071727
    @jassi071727 Před 5 lety

    It's wonderful!!This video helped me to make it.If I want anything Arduino , you are the best creator!!

  • @gia4anto
    @gia4anto Před 5 lety

    Thank you very much it works just fine! For my expectations at least cause i'm kinda new in robotics. Thanks man

  • @shashankprakash9967
    @shashankprakash9967 Před 7 lety +7

    awesome project I tried it It works perfectly thanks Mert Arduino and Tech

    • @chetansai1478
      @chetansai1478 Před 6 lety +2

      shashank how can we open the program in arduino after saving in library

  • @ankan1994
    @ankan1994 Před 7 lety

    kamal kar diya boss...thanks for indirectly helping in my iot project

  • @ransikahettiarachchi975
    @ransikahettiarachchi975 Před 6 lety +1

    bro ,I like your videos because they are very interesting .Congratulations********

  • @amazingchannel4114
    @amazingchannel4114 Před 7 lety

    Hi... Your projects are very good
    And it is very easy to make

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

    Hi! I'm tryning to understand why did you use the boolean variable "goesForward" and the "if" bucle inside readping () function, which initialize distance=250? I hope you can help me. Thanks for the video!

  • @vasylpavlus
    @vasylpavlus Před 7 lety

    Exactly what I was looking for! Thanks!

  • @sultanfouzi
    @sultanfouzi Před 6 lety

    Thanks it works. U deserve a medal

  • @tendzo
    @tendzo Před 5 lety +2

    AWESOME PROJECT BRO...
    IF YOU HAVE PROBLEM WITH SENSOR ULTRASONIC, YOU MUST CHANGE CABEL TRIG AND ECHO TO ARDUINO A1 AND A2

  • @NiteshKumar-hh2tk
    @NiteshKumar-hh2tk Před 7 lety +1

    bro you are awesome...
    i really like your tutorials ... thanks

  • @GamingBeastR4W
    @GamingBeastR4W Před 6 lety +1

    Thanks bro you helped me First it was not working but then i put it to Com port 3 then it started to work

  • @abhaysharma5155
    @abhaysharma5155 Před 6 lety

    thank you for making this video it helped me a lot

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

    Thank you so much for that nice projects , could you please do a wireless charger using arduino ?

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

    This is great and thanks for the code. Small typo in line 61: change 'distance' to 'distanceRight.'

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

      Bro i cannot find the code... Can u help me? Please?

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

    in the code, the if statement states that "if(distance

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

    Nice work, thank you very much for sharing. Why not use the speed function offered by the L298 bridge to reduce the speed of the robot? my greetings

  • @allrounders9619
    @allrounders9619 Před 6 lety +3

    can i use a motor shield l293d

  • @nexxostube
    @nexxostube Před 6 lety +1

    Congrats for the channel. I love it ! :)
    Please tell me, is it possible to combine the remote control with the HC SR04 Sensor? i have already tried but with no success. couldn't resolve the conflict with the timers... :/
    Any help will be appreciated .
    Keep going with the awesome work !

  • @danishcreations5575
    @danishcreations5575 Před 7 lety +1

    Superb Thank you for a Great video ;)

  • @sunshino969
    @sunshino969 Před 5 lety +1

    Thanks for your step by step show.

  • @unglaubichuberlieber8048

    well done, especially the last part how you planned to put what+where, one question:
    why did you connect the HC SR04 to analog and not digital pins???

  • @kingsaim6398
    @kingsaim6398 Před rokem

    Thanks you bro very very very very very very much to giving me newpin lab. No other youtuber give lablari

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

    sir please tell me that i can use L293D moter driver

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

    super.thank you so much .awesome project bro

  • @senukarathnayake324
    @senukarathnayake324 Před 5 lety +1

    Thank You sooooo much worked perfectly I had a big problem with the code, this video helped me solve, again a very big thank you

  • @amvnerds5879
    @amvnerds5879 Před 7 lety

    great work....waiting for the quad

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

    Can we use L293d moter module instead of L298N module .will it be the same program
    Need an reply sir

  • @daastronautandrobotanteneh9383

    OK bro my question is the connection of the mini bred board in the first tutorial means on the computer screen and connection of your on making it is not same it is d/t in the ultrasonic connection so can I go with computer tutorial or your making right on the robot?

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

    Thankyou very much working well

  • @jupiterpaintingllc1431

    Nice project !!! Congratulation !!!

  • @fishbake7
    @fishbake7 Před 6 lety

    Great project. Is there a picture somewhere of the circuit diagram? or is it just in the video?

  • @PocketBroker
    @PocketBroker Před 7 lety

    obrigado por fazer vídeo a cada semana.❤️❤️

  • @one_shot_kills1378
    @one_shot_kills1378 Před 7 lety

    its been 30 days since i order an arduino starter kit from aliexpress and it isnt arrive yet , i cant wait any more, god.

  • @tiziofrizzio4488
    @tiziofrizzio4488 Před 7 lety

    why do you manage the ultrasouds sensor with analog ports?

  • @Tch.SouravExperiment
    @Tch.SouravExperiment Před 2 hodinami

    Great content as always! The project is creative and your guidance was incredibly helpful. I learned a lot and enjoyed the process. Looking forward to more!”

  • @Juanruizsalamanca
    @Juanruizsalamanca Před 7 lety

    muy bueno amigo

  • @prakashsonkusare3741
    @prakashsonkusare3741 Před 5 lety

    we tried the same as you have shown in the video but inspite of everything correct the dc motors are not rotating as per the command sent by the sensor
    we have used normal 9v battery and not duracell so is that he issue

  • @antonyderek327
    @antonyderek327 Před 5 lety

    It would have been much easier if you had just sent the link for connections as well. Just writing down the list of things I need to buy for this project hope I do it just like you did. Fingers crossed 🤞

  • @rivenrivenn111
    @rivenrivenn111 Před 6 lety

    How while I know which wire from the motor should be connected to the l298n? pls help asap

  • @mariooppio9617
    @mariooppio9617 Před 3 lety

    love you! Thanks for the code !!!

  • @maba52
    @maba52 Před 7 lety

    thank you for this great projekt !!!
    Is It possible to chang the motor speed on the left / right motor ? due the motors have some speed different
    Thank You
    MABA

  • @spacerock5095
    @spacerock5095 Před 6 lety

    I am done almost making my first autonomous car but will it work if I give it one Lipo 3S battery instead of two 9V batteries ?

  • @vidhatrisamadhiya4599
    @vidhatrisamadhiya4599 Před 7 lety

    Which material you use for chassis

  • @pablo2960
    @pablo2960 Před 7 lety

    Great work.I have a problem with the direction of the program circuit of Fritzing, I am not to see it.I have downloaded Fritzing.Thanks

  • @kvlpnd
    @kvlpnd Před 7 lety

    A good video once again. Pease make something innovative project with Arduino. This is project is great but its a bit traditional of obstacle avoiding robot. Or you can start a new video series for advanced viewers. Thanks a lot.

  • @shubhodeepmandal1499
    @shubhodeepmandal1499 Před 6 lety +2

    bro can u join the line follwer and this project. please make video of it.

  • @enriquemartin9094
    @enriquemartin9094 Před 6 lety

    Can u please tell me which libraries to include and how?

  • @hengsionglim2855
    @hengsionglim2855 Před 6 lety

    where did you bought the ultrasonic sensor stand ?

  • @jeman1044
    @jeman1044 Před 6 lety +6

    Great project! I built it but only the left side of my wheel works. I have been trouble shooting it for days. The connections were done right but the right wheel won't move.

  • @ahmedsaman3070
    @ahmedsaman3070 Před 7 lety

    Amazing ❤️❤️😍😍😍😍😍😍😍😍😍😍😍😍 goood work

  • @ozairshahid667
    @ozairshahid667 Před 7 lety

    and plzz tell wat software you used in this prlject to make circuit diagrams

  • @Prompt24
    @Prompt24 Před 7 lety

    If I useArduino Pro or Nano should I use the same pins?

  • @rabbegmouhib1779
    @rabbegmouhib1779 Před 7 lety

    u are the best

  • @AnujaNisal
    @AnujaNisal Před 6 lety +1

    nice work broo..................................................

  • @renubharuntia1318
    @renubharuntia1318 Před 5 lety +9

    Please help
    How to dowaload the source code please help,😫😫😭

  • @AbdullahEditz
    @AbdullahEditz Před 3 lety

    Can I connect a 4 volt battery to l298 module?
    Because i have a 3 volt dc motor that can't run on 9v battery.

  • @promitchaudhuri9785
    @promitchaudhuri9785 Před 6 lety

    do I need to add a servo library?

  • @juankhosy1854
    @juankhosy1854 Před 3 lety

    what program did you use to make the schematics?

  • @rickcheljohnb.rebueno5599

    what simulator is that your using to plan out your arduino projects?Thank you

  • @murtuzaali8658
    @murtuzaali8658 Před 6 lety

    i have made this but only servo is running when obstacle comes in front of the ultrasonic sensor i have used 9v battery for motor driver. plz give some suggestion in my motor driver at vcc terminal how much voltage supply can i give.

  • @tarundhiman1140
    @tarundhiman1140 Před 6 lety

    Hello please tell me which battery should I buy

  • @technoworld2223
    @technoworld2223 Před 5 lety

    Which software you use for give connection process?

  • @user-xw8sf6tf3l
    @user-xw8sf6tf3l Před 9 měsíci

    спасибо заработало сразу. указал все библиотеки. только пришлось контакты на моторы переставлять.

  • @ajtheinventor3998
    @ajtheinventor3998 Před 7 lety

    could you please try using l293d module please using servo

  • @user-gf7je6hk9n
    @user-gf7je6hk9n Před 2 lety

    kindly tell about the web or software u used for showing connections?

  • @gtechmaker966
    @gtechmaker966 Před 6 lety

    hi merit what is the roll of news ping library

  • @multitrends5225
    @multitrends5225 Před 6 lety

    make a video of obstacle running robot with the use of arduino genuino uno and motar module L293D and including the use of seervo motar SG90 for head movement

  • @s.376virajjain6
    @s.376virajjain6 Před 8 měsíci

    On which software did you make the circuit diagram?

  • @valerievigneau4361
    @valerievigneau4361 Před 3 lety

    Is it possible to use an elegoo card instead but use the same program?

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

    thanks you
    and what is arduino simulator used in the video?

  • @cesarbaratas5612
    @cesarbaratas5612 Před 4 lety

    @mert arduino can i use a different motor driver?

  • @takalvert
    @takalvert Před 2 lety

    Really nice 👌

  • @GamingBeastR4W
    @GamingBeastR4W Před 6 lety

    Yoy xan connect the motors to any terminal?

  • @danyrodriguez9332
    @danyrodriguez9332 Před 6 lety

    Puedo usar el puente h de Arduino para hacer este proyecto

  • @archanashukla2756
    @archanashukla2756 Před 6 lety

    How can we change the pins if the motor is moving in different directions

  • @walterramirez4155
    @walterramirez4155 Před 2 lety

    Se puede reducir la velocidad de los motores en esta programación ??

  • @MRMaxim266
    @MRMaxim266 Před 6 lety

    very good man

  • @phillycheesesteak7066
    @phillycheesesteak7066 Před 7 lety

    PLEASE HELP! So i followed the instructions, download the code and did everything right according to the video, but when i tested it the Micro Servo just wouldn't turn. After several trials, i managed to make the servo turn but the turn was to small that you could barely even see it. And great video by the way!

  • @MrVishal27011991
    @MrVishal27011991 Před 6 lety

    hi!
    in program as u given boolean expression is not necessary. Isn't it.

  • @sksecrets5246
    @sksecrets5246 Před 5 lety

    which software you use to design this

  • @khansufyan1049
    @khansufyan1049 Před 7 lety

    great work

  • @emadabuhagag222
    @emadabuhagag222 Před 2 lety

    thank you

  • @jishabenny9183
    @jishabenny9183 Před 2 lety

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

  • @apix_photrix
    @apix_photrix Před 6 lety

    I connected as per your circuit but while working the servo and sensor are working but the motors are not rotating can u help me please

  • @zzzzzz...9902
    @zzzzzz...9902 Před 7 lety

    Can you do a more advanced video project like a 3d printer, robotic spider, drone, battle bot, ect. Like one of the ones I listed would be fine.

  • @vinayaksoni6767
    @vinayaksoni6767 Před 3 lety

    Thanks bro!!!!!!!!!!!!!!!!!!

  • @raunakbanerjee4801
    @raunakbanerjee4801 Před 5 lety

    That red board a breadbord right?

  • @harshilahalpara3444
    @harshilahalpara3444 Před 5 lety

    Thanks for making us winner ...

  • @dheeran2881
    @dheeran2881 Před 4 lety

    In which app did u design the circuit.....plz say

  • @mobilerobot1484
    @mobilerobot1484 Před 3 lety

    i have question , for make a wiring diagram use application, what is you application to make a wiring diagram on your video?

  • @OzgurUrhan
    @OzgurUrhan Před 7 lety

    Aynı projeyi aynı malzemeler ile yaptım. Servo ve ultrasonic çalışıyor ama tekerlekler dönmüyor sizce ne olabilir?