Obstacle Avoiding Robot Car Using An Arduino

แชร์
ฝัง
  • เผยแพร่เมื่อ 10 พ.ค. 2024
  • In this video, I’ll be showing you how to build your own Arduino based obstacle avoiding robot car. The car uses a servo mounted ultrasonic sensor to detect objects in front of and on either side of the car and an L293D DC motor driver shield to drive four geared motors, one on each wheel. An Arduino Uno underneath the shield controls the motor shield, ultrasonic sensor, and the servo.
    The car drives itself forward until an object comes within the range of the sensor. The car then monitors the object until it is within the minimum distance and then stops moving. The servo is then used to turn the ultrasonic sensor left and the right, taking distance measurements in each direction. The car then decides which direction to turn based on which side has more distance available to move, then turns and continues on until the next object is detected. If both sides are blocked, the car will turn around and drive back out the way it came.
    Full step by step written guide along with print files & code - www.the-diy-life.com/arduino-...
    Components Required & Purchase Links
    • Arduino Uno - amzn.to/2OgoMvv
    • L293D Motor Driver Shield- amzn.to/3fpTzld
    • Micro Servo - amzn.to/380rddp
    • Ultrasonic Sensor Module - amzn.to/2ZktM8G
    • 4 x Geared DC Motors & Wheels - amzn.to/3dAZghI
    • 9-12V Battery Pack
    • 8 x M3 x 15mm Socket Head Screws - amzn.to/2V7vaZ5
    • Ribbon Cable - amzn.to/340xB3B
    • Header Pins - amzn.to/2wY3k9g
    If you've got any suggestions for future Arduino or electronics projects, let me know in the comments section.
  • แนวปฏิบัติและการใช้ชีวิต

ความคิดเห็น • 396

  • @GelFireQueensland
    @GelFireQueensland 3 ปีที่แล้ว +3

    Great project! Thankyou for your work on this. Just changed a few speed settings for mine, works great.

    • @MichaelKlements
      @MichaelKlements  3 ปีที่แล้ว +2

      That's great to hear!

    • @GelFireQueensland
      @GelFireQueensland 3 ปีที่แล้ว

      @@MichaelKlements Hi! I've since noticed it only ever turns one direction, regardless of obstacles location.
      I can reverse the turn direction by changing AF_DCMotor assignments Left to Right, but I can't get it to decide to best turn direction, it only goes same way each time. The servo was incorrectly looking right first, but fixing that didn't fix the problem. I downloaded your Code again in case I accidently changed something that matters, no go. Also played around with the 'int checkDirection()' in curiosity.. Anyway maybe you can suggest an answer if you have time. Thanks from QLD Australia.

  • @heninmuneer8436
    @heninmuneer8436 ปีที่แล้ว +7

    Thank you so much Michael! I'm really grateful ❤❤ Especially when you linked the again products,, you've got my respect man! Not only are you an amazing electronic device maker but also you're an amazing guy for helping us rookies so much 💗

    • @MichaelKlements
      @MichaelKlements  ปีที่แล้ว +1

      Thanks for the feedback and support Henin!

  • @Sop7anaAllah
    @Sop7anaAllah ปีที่แล้ว

    Amazing tutorial Michail! short, precise, complete and simply explained.
    Thank you very much
    keep up the good work.

  • @shaneferdz82
    @shaneferdz82 ปีที่แล้ว +1

    This is simply wow! So well explained

  • @ChrisHerrera-kb4lq
    @ChrisHerrera-kb4lq ปีที่แล้ว +1

    thank you so much , i just learned about the part when you can put a max wait int the pulseIn() function.
    appreciate it :)

  • @9b21karankunbi2
    @9b21karankunbi2 2 ปีที่แล้ว +2

    bro loved the project thank you so much

  • @lilianseverinodasilva94
    @lilianseverinodasilva94 7 หลายเดือนก่อน

    How did you solder on pin 13? I’m struggling with this one!

  • @Berghiker
    @Berghiker 2 ปีที่แล้ว

    That's an awesome car dude. Sounds like you from GP.

  • @a.w.aardiansyah9211
    @a.w.aardiansyah9211 2 ปีที่แล้ว +5

    Amazing project !
    Just Additional Information...
    Ask permission Mr. Michael Klements
    for those of you who are new to assembling, then there is a problem with the speed of the motor.. the solution is:
    1. Change the byte value of motorSpeed
    2. check the condition of the battery, is it still good or not
    3. check the state of the gear motors (dynamo)
    Thank you for your attention
    Greetings from Ponorogo, East Java, Indonesia

  • @himanshumuley5857
    @himanshumuley5857 11 หลายเดือนก่อน +4

    Hey Michael , Loved how you made it look so easy but I need help I'm facing a problem..
    I have my trig and echo pin connected to A1 and A0 respectively and I replaced the no. in your code to A1 A0, and when I turn on the car the motors dont run and servo motor is also not moving..
    please help me out here:(

  • @justanimation
    @justanimation 8 หลายเดือนก่อน

    thanks man
    it helped in my school project

  • @kanshikuljotsingh5788
    @kanshikuljotsingh5788 ปีที่แล้ว +1

    HI Michael Klements , you are very great .

  • @sylvesterdunggat2326
    @sylvesterdunggat2326 ปีที่แล้ว

    Hello sir, can you suggest the connection when arduino combine with ultrasonic sensor? Basically my project is about 2 mode toy car control by ultrasonic sensor & bluetooth connection

  • @balajigoud249
    @balajigoud249 7 หลายเดือนก่อน

    Please couldn you provide circuit diagram

  • @YellowBlox7777
    @YellowBlox7777 ปีที่แล้ว

    tysm bro video was too good with nice explaination

  • @sairamreddy6642
    @sairamreddy6642 2 ปีที่แล้ว +1

    Hey, this video was amazing. Actually, I wanted to know how you fit the pins on thr motor driver shield? Thanks!

    • @MichaelKlements
      @MichaelKlements  2 ปีที่แล้ว +2

      I just soldered them onto the board myself.

    • @abhishekrathore9470
      @abhishekrathore9470 2 ปีที่แล้ว

      Bro aapka project work kr rha hai?

    • @jimmyjummy5132
      @jimmyjummy5132 ปีที่แล้ว

      @@abhishekrathore9470 yea man fully agree

  • @bernicesasu1166
    @bernicesasu1166 6 หลายเดือนก่อน

    What are the library you installed for the code

  • @johnwilsong
    @johnwilsong 8 หลายเดือนก่อน

    Hola, estoy haciendo un automóvil Arduino para un proyecto escolar sigue todos los pasos en el video pero el carro no camina / tengo tarjeta R3 Wifi MCU ATmega 328p / Wifi ESP8266 / Usb ch320g - se tiene que hacer alguna configuración diferente ?

  • @anugrahambilad9577
    @anugrahambilad9577 ปีที่แล้ว

    Can i do this with my old toy
    Car which can turn right and left with the help of gear motor
    How can plug that may also in the Motordrive shield

  • @jyoti9388
    @jyoti9388 7 หลายเดือนก่อน

    Is there any batery

  • @kerriehoward5549
    @kerriehoward5549 2 ปีที่แล้ว +2

    Hi Michael, great project. i am relatively new to Arduino and understand most of the sketch. However I would like to understand the difference between calling a function following a void command such as "void stopMove() and the call to distance=getDistance() where the getDistance code starts with the statement "int getDistance()" why isn't getDistance also a void statement? cheers.

    • @MichaelKlements
      @MichaelKlements  2 ปีที่แล้ว +6

      Hi Kerrie,
      There are two different types of functions, ones starting with void just carry out the code in the function and ones that start with int (or String, char, Boolean etc.) are functions that return an a variable or “answer” of that type.
      void stopMove just tells the motors to stop.
      Where
      int getDistance returns the distance measured to the object as an int variable type.
      Hope that helps make it clear

  • @yasmeenalaataima1429
    @yasmeenalaataima1429 ปีที่แล้ว +3

    Great!.. the circuit diagram please 🥺

  • @tahamoiz1210
    @tahamoiz1210 2 ปีที่แล้ว

    How did you attach the wires to geared DC motors? And did you solder or just inserted the pin heads on pin no. 2 and 13?
    Thanks

    • @MichaelKlements
      @MichaelKlements  ปีที่แล้ว

      They're soldered to the motors, the headers are also soldered to pins 2 and 13.

  • @bencardamone7121
    @bencardamone7121 3 ปีที่แล้ว

    So I'm a little confused. In the description, you list header pins as a part, but I am unable to find where they are actually used. Could you describe where they are used and also why they are needed.

    • @MichaelKlements
      @MichaelKlements  3 ปีที่แล้ว +1

      You need the header pins to solder to the motor driver shield so that you can plug the ultrasonic sensor into it. These pins aren't installed on the board when you buy it. You'll also need female pins to make up the cable to the sensor.

    • @minroiwijayarathne1965
      @minroiwijayarathne1965 3 ปีที่แล้ว

      @@MichaelKlements do you have a link from which I could buy header pins?

  • @ChineduEmmanuel-en7qj
    @ChineduEmmanuel-en7qj ปีที่แล้ว

    Thank you very much for this

  • @mashmesh-hd1eh
    @mashmesh-hd1eh ปีที่แล้ว

    Hi i need help i want to add gsm module and pir sensor on this project can you help me where to insert the codes

  • @mqtt9294
    @mqtt9294 ปีที่แล้ว

    this is so cool!!!

  • @Andeman-kf6kv
    @Andeman-kf6kv ปีที่แล้ว +1

    thank you so much for the help, it was very intresting and emosjonell. this expirience was life changeing. I have many of these robots now wich roams my grochery stores. i'am now a proffesional robot maker. i build robots, hand made. im rich now.

  • @ggplayer2162
    @ggplayer2162 3 ปีที่แล้ว

    i dont have the 13 slot on my board so where can i put it

  • @MartyrInside08
    @MartyrInside08 2 ปีที่แล้ว

    Does anyone have the circuit simulation of this arduino in proteus 8?

  • @k-popjiminaaaaaa
    @k-popjiminaaaaaa ปีที่แล้ว

    Where are these parts available?

  • @vidaddicts7273
    @vidaddicts7273 3 ปีที่แล้ว +4

    Hello, great project! I've run into a few problems and by modifying the code a little I managed to find the solutions. Although there is one problem that I can't find a way to fix. The ultrasonic module only detects a wall once, it stops after the 2nd wall, but the engines still continue forward into the wall. Could you help me, please? (My modifications did not cause this problem since when I used the original code it didn't work either)

    • @ggplayer2162
      @ggplayer2162 3 ปีที่แล้ว +1

      can u copy and paste ur code plz need help

  • @aarthierusayee1164
    @aarthierusayee1164 ปีที่แล้ว

    Thanks it is most helpful for me

  • @fahmidhaque2494
    @fahmidhaque2494 7 หลายเดือนก่อน

    Oh my god, How can I ever thank you???? My car worked soo well, there's just one thing. The speed is too low, but other than that, everything is working great.

    • @fahmidhaque2494
      @fahmidhaque2494 7 หลายเดือนก่อน

      Can you help me with the Speed issue?

    • @MichaelKlements
      @MichaelKlements  7 หลายเดือนก่อน

      The only way to increase the speed is to use a higher supply voltage - but still stay under the maximum voltage that the driver shield can handle.

    • @fahmidhaque2494
      @fahmidhaque2494 7 หลายเดือนก่อน

      @@MichaelKlements Oh okay Thanks for the information.

  • @user-mg3gk8ck2b
    @user-mg3gk8ck2b ปีที่แล้ว

    Can you please share tinkercard link of project and bottom part?

  • @PlexusSkIllz
    @PlexusSkIllz ปีที่แล้ว

    Hi Michael, it would be a great help if you tell me what I'm doing wrong here. Even though I copied your code the robot doesn't function correctly. when infront of a wall when activated it checks for spaces to move and once it finds a way it moves and doesn't stop again when it encounters any obstacles. I've seen some other people have the same problem as I. I made sure that my connections are correct so what might be the problem. Thank you very much.

    • @PlexusSkIllz
      @PlexusSkIllz ปีที่แล้ว +4

      For anybody wondering. I fixed this problem by adding return; after moveForward() in the if statement that's in the void loop

  • @techysoham
    @techysoham 3 วันที่ผ่านมา

    Hi Michael, thanks for the project! I did everything and made some changes on my own and the car works good! Just one issue, the servo motor is spinning too fast, so fast that it removes the wiring sometimes. Do you have any idea on how to fix this, like how to slow down the servo?

    • @MichaelKlements
      @MichaelKlements  3 วันที่ผ่านมา

      Hi Techysoham, thats great to hear. There are some Arduino libraries that offer servo speed control, the other option would be to create a functional that moves the servo in single single-degree increments with a small delay between each step.

  • @tanbirhossain9370
    @tanbirhossain9370 ปีที่แล้ว

    Thanks a lot brother ❤️❤️

  • @artigupta7852
    @artigupta7852 3 ปีที่แล้ว

    You can make a video on how to make sensor lights using Arduino Uno and ultrasonic sensor.

    • @MichaelKlements
      @MichaelKlements  3 ปีที่แล้ว

      Thanks for the suggestion, I'll have a look at this.

    • @artigupta7852
      @artigupta7852 3 ปีที่แล้ว

      @@MichaelKlements Can you give me the website on which you created the 3d model

    • @MichaelKlements
      @MichaelKlements  3 ปีที่แล้ว

      @@artigupta7852 it was drawn in Tinkercad

  • @diptanshude2525
    @diptanshude2525 2 ปีที่แล้ว +1

    How long does your car keep moving if u don't disconnect the power at all ?

    • @MichaelKlements
      @MichaelKlements  2 ปีที่แล้ว

      Around 5-10 minutes depending on how fast it is driving and how many turns it is making.

  • @luisalbertotorrescarrillo3915
    @luisalbertotorrescarrillo3915 3 ปีที่แล้ว +1

    Hola profe. felicitaciones por su trabajo el único problema que tengo es que no hace los giros, o solo avanza o solo retrocede, gracias por la respuesta saludos de Lima _Perú

  • @alexkovachev6765
    @alexkovachev6765 ปีที่แล้ว

    Greetings Michael,
    I have a question regarding the rover. From halt it propagates forward and then at specific stopdistance(which i believe is set to be in cm), and then stops. THe servo moves from 0 to 90 to 180. Then the rover goes backwards till specific distance. But it never turn around. It always goes forwards and backwards. I have used your ocde and modified the tie daelys for some lines but it doesnt seem to turn at all. And yes I have tested the rover in spaces whereleft is more than space on the right etc.. What can I do ? I would really appreciate the help. All the rover turn setting are as such. If Turn left... right motors turn FORWARD, Left motors turn backward...vice versa for Turn Right. I do not know what to do. Please help me.

    • @MichaelKlements
      @MichaelKlements  ปีที่แล้ว

      There is not steering mechanism on the car, so to turn left the right wheels run forward and the left wheels run backwards, if the motor speeds are set correctly then the car will rotate on the spot (it shouldn't move forwards or backwards while turning). It sounds like your motor speeds have been adjusted incorrectly, so one side is probably overpowering the other side.

    • @niranjanremesh6992
      @niranjanremesh6992 ปีที่แล้ว

      @@MichaelKlements hi michael could u reply to my query pls

  • @Ayush-90
    @Ayush-90 ปีที่แล้ว +1

    Hi Michael Kelements,
    Can we use a 9volts battery in this

    • @MichaelKlements
      @MichaelKlements  ปีที่แล้ว

      9V block batteries aren't able to supply enough current to drive 4 motors.

  • @bpSdigiMeter
    @bpSdigiMeter ปีที่แล้ว

    what software did you use for the making of the model in 3D?

  • @revantpandey8893
    @revantpandey8893 ปีที่แล้ว

    Hello Micheal, Great video! I did want to ask what voltage are you using to supply the car? I am using 6V. Is that fine?

    • @MichaelKlements
      @MichaelKlements  ปีที่แล้ว

      I use either a 2cell or 3 cell lipo, so 7.6V or 11.4V. It's not so much the voltage that is the issue, you need a battery pack than can provide enough current for four motors to run. 6V would probably be fine if the pack can supply each motor an amp or so on startup.

    • @revantpandey8893
      @revantpandey8893 ปีที่แล้ว

      @@MichaelKlements Can 4AA rehargable batteries supply an amp to each motor? Thank you for the reply!

    • @MichaelKlements
      @MichaelKlements  ปีที่แล้ว

      Probably not unless they're really good quality ones. I'd suggest using a lithium ion battery pack or a holder for two or three 18650 cells.

    • @revantpandey8893
      @revantpandey8893 ปีที่แล้ว

      @@MichaelKlements Thank you so much! That's probably the reason why my car is not working!

    • @revantpandey8893
      @revantpandey8893 ปีที่แล้ว

      @@MichaelKlements Hello Michael! I am using a 12V adapter currently to power my car but I want it to be wireless. Could you please recommend a LIPO battery? Either send a link or just tell me here? That would be great help thank you!!!!

  • @diye.28
    @diye.28 ปีที่แล้ว

    Bro, Is there a way where i can see the other side of the motor driver shield? i want to see how it was soldered on the other side because as i am lacking of pins to connect lots of sensor given that this ln293d occupies the whole arduino pins... Your video has brought me some hope.

    • @MichaelKlements
      @MichaelKlements  ปีที่แล้ว

      There is some more information in my blog post linked in the video description. I haven't done anything on the bottom of the shield, I only added pins to the top.

    • @diye.28
      @diye.28 ปีที่แล้ว

      I will take a look right now. So, only 2 and 13 can be soldered? It’s a pity that this board takes all the pins of arduino. I’ve got lots of sensors to connect but sadly the board takes them all. I have another question, is there a way we can connect the l293d and the board sensor shield v5.0? So I can have more pinouts for sensors, leds, buzzers and the like. Thank you 😊

    • @MichaelKlements
      @MichaelKlements  ปีที่แล้ว +1

      The two drivers unfortunately require that many pins to control them. If the driver is using the pins then you won't be able to connect an IO expansion board at the same time. You'd be best off finding an I2C motor driver then and that'll free up all of the digital pins for your sensors.

    • @diye.28
      @diye.28 ปีที่แล้ว

      Thank you for you kindly answer. I’m a beginner at this and I have to use mblock which is more code friendly, that being said, I have no idea how can I connect two arduinos together so I can use one for the ln293d and control the motors and the other arduino with the sensor shield v5 and have a wide range of digital pin outs. I would kindly be grateful if you have any idea how 🥹

  • @GG-sd2dr
    @GG-sd2dr ปีที่แล้ว +1

    Thanks for the video, why didn't you just solder the wire to the board directly on pin 13 instead of using a pinhead?

    • @MichaelKlements
      @MichaelKlements  ปีที่แล้ว +1

      Only so that it can be removed if required

    • @GG-sd2dr
      @GG-sd2dr ปีที่แล้ว +1

      @@MichaelKlements oh, ok thanks!

  • @avinashgupta4581
    @avinashgupta4581 5 หลายเดือนก่อน

    where is the servo library link

  • @andrewtorino2320
    @andrewtorino2320 25 วันที่ผ่านมา

    How to change the code to adjust the speed of motors?

  • @elizacrescini9444
    @elizacrescini9444 2 ปีที่แล้ว

    Hi, I would like to know how did the wheels turn left and right if you did not use servo motor on the wheels?

    • @MichaelKlements
      @MichaelKlements  2 ปีที่แล้ว

      The wheels don't physically steer left or right. The difference in motor speed between the left and right side turns the car.

    • @elizacrescini9444
      @elizacrescini9444 2 ปีที่แล้ว

      @@MichaelKlements thank you so much!

  • @charlesmanginsay9230
    @charlesmanginsay9230 หลายเดือนก่อน

    hello Mr. Klements, I tried putting a 3 x 3.7V rechargeable battery with a total of 11.1V but when I added 5V to it giving a total of whopping 16.1V, the Arduino Mega 2560 stopped working. Did I supply too much current? is the 11.1V enough for the 4 motors?

    • @MichaelKlements
      @MichaelKlements  หลายเดือนก่อน

      I'm not sure how or why you added 5V to it, 11.1V is enough to supply both the motor shield and the Arduino. That said, 16.1V also should not have damaged the Arduino Mega since these can typically handle a supply voltage of up to 20V.

  • @mohamedsabri2075
    @mohamedsabri2075 3 ปีที่แล้ว

    The servo and the ultra sonic sensor work perfectly. but only 1 motor is working and the others are not !! is it because am using 9v battery ?
    and i have attach headers pin on A0 - A1 for the echo and trig instead the pins you are using , what changes i can do in order to use your code but with my current pins ?
    Thanks alot Mr Micheal

    • @MichaelKlements
      @MichaelKlements  3 ปีที่แล้ว

      It might be related to the 9V battery, these generally aren't able to provide enough current for four motors.

    • @laxmikantreddy6567
      @laxmikantreddy6567 2 ปีที่แล้ว

      bro. will it work if we change header pin to A0 and A1

  • @fpkgoon2561
    @fpkgoon2561 6 หลายเดือนก่อน

    hey could we plug the power supply into the Arduino Uno instead of the driver shield?

    • @MichaelKlements
      @MichaelKlements  6 หลายเดือนก่อน

      The motor driver pulls too much current to power it through the Arduino, you should power the driver and allow the driver to power the Arduino.

  • @ZVEKOfficial
    @ZVEKOfficial 3 หลายเดือนก่อน

    Mate what batteries do you use to power this thing ? I thing that's the most important aspect of this project (you skipped the part where you install the batteries) since many of us who're trying to get this to run use 9V batteries and that simply isn't the optimal power source

    • @MichaelKlements
      @MichaelKlements  3 หลายเดือนก่อน

      Either use 4 x AA batteries in a pack or use a 2 or 3 cell LiPo battery (that's what I've used).

    • @ZVEKOfficial
      @ZVEKOfficial 3 หลายเดือนก่อน

      @@MichaelKlements Yeah well I bought a 4 pack and a 6 pack AA holder. The 4 pack doesn't have enough voltage (1.5 x 4) as the L293D driver has a voltage drop of around 1.8V so the motors spin reaaaallly slowly. Nevermind turning left/right.
      The 6 pack is also meh to be honest. I think I need to buy a high voltage high capacity LiPo battery like you mentioned to run this at its full potential.
      Or maybe 2x 18650 Li Ion battery

  • @sakthidharann7026
    @sakthidharann7026 2 ปีที่แล้ว +1

    What type of battery and it's power you used in this

  • @ahmedshalaby948
    @ahmedshalaby948 2 หลายเดือนก่อน

    I have a question about the yellow-capped component labeled "PW" on the motor shield. Additionally, I've developed a car using the same procedure and utilizing two 3.7V batteries each. However, I've encountered two problems:
    1- When I unplug the USB, the car stops working.
    2- The batteries seem unable to power all four motors to move the car.
    Initially, the setup worked fine during testing, but these issues arose later on. Could you please provide assistance on how to address these problems?
    and what specific Batteries and how many of them I need and what volatge.Thanks In adavnce

    • @MichaelKlements
      @MichaelKlements  2 หลายเดือนก่อน +1

      I assume you're talking about the jumper labelled "PWR" - mine is black not yellow. This is jumper that either allows the shield to supply power to the Arduino or disables this feature if the voltage is outside of the Arduino's range. If you're supplying power to the shield only then you need to have a jumper on here to power the Arduino as well.
      Using 3.7V batteries, you would need them to be connected in series and ensure that they can supply enough current to drive the motors.

    • @ahmedshalaby948
      @ahmedshalaby948 2 หลายเดือนก่อน

      @@MichaelKlements
      Thank you for your response. Yeah Man , you got me correctly. I was referring to the yellow PWR in my case 😂. From your comment, I gather that I need two batteries, providing approximately 7.2V and 1200mA. In this scenario, I simply keep the PWR turned off as it's. COZ I'm afraid of messing things up

    • @MichaelKlements
      @MichaelKlements  หลายเดือนก่อน +1

      You need a supply voltage of at least 4.5V, so either one 7.4V battery or two 3.7V batteries in series would work. If the jumper isn't on then you need to provide the Arduino with it's own power source as well.

  • @devinenimanimanvith4240
    @devinenimanimanvith4240 2 ปีที่แล้ว

    Could you help me out here! I am using a 9v battery as power supply, though it is powering up the arduino board and motor driver it is not helping to drive the motors and servo motor, but when i connect to my laptop to upload the code it is poweringup enough to drive the motors and servo.

    • @MichaelKlements
      @MichaelKlements  2 ปีที่แล้ว

      A 9V battery isn't able to provide enough current to drive four motors. It works when powered by USB as well as it is supplementing the shortfall. You need to use a better battery pack.

  • @3LGang2L
    @3LGang2L หลายเดือนก่อน

    Hi Michael, I understand this project is 3 years old however do you believe with some adjustments to the code an analog servo motor can be used instead?

    • @MichaelKlements
      @MichaelKlements  หลายเดือนก่อน

      Like and analog RC servo motor or one that requires a different driver?

  • @ganesanudayakumar4628
    @ganesanudayakumar4628 10 หลายเดือนก่อน

    where can I find the wiring diagram?

  • @rohitsoni4901
    @rohitsoni4901 3 ปีที่แล้ว

    How many pins of Arduino are remains usable after connecting L293D shield means which are those pins which are not connected to shield

  • @Chartered_Edu
    @Chartered_Edu 2 ปีที่แล้ว

    Can I make it 2 wheeled ???

  • @sachusachi3228
    @sachusachi3228 6 หลายเดือนก่อน

    Hey man where to put the battery

  • @Lepo69
    @Lepo69 ปีที่แล้ว

    Hi, so I don't quiet understand what did you do to the 12v battery, do you just put it in the middle section and wire it to the board or to the motors?

    • @MichaelKlements
      @MichaelKlements  ปีที่แล้ว

      It is connected to the motor shield's power input, the shield then powers the Arduino

    • @Lepo69
      @Lepo69 ปีที่แล้ว

      @@MichaelKlements Do you suggest any batterypacks that workf or this rc car or no?

  • @suvendu286
    @suvendu286 2 ปีที่แล้ว

    Hello brother, I am unable to understand how you connected the female header pin to pin 13. Can you please explain?

    • @MichaelKlements
      @MichaelKlements  2 ปีที่แล้ว

      I had to solder additional header pins onto my shield in order to plug it in - alternately you could just solder the wire directly onto the shield.

  • @fortamer4064
    @fortamer4064 10 หลายเดือนก่อน

    Where can we get the 3D print file for chesse

  • @evounknown3133
    @evounknown3133 ปีที่แล้ว

    can i use hw battries

  • @luisalbertotorrescarrillo3915
    @luisalbertotorrescarrillo3915 3 ปีที่แล้ว

    Profesor otra cosita el robot usa una batería o 2 baterías siempre uso 2 pero ahora no esta claro como usar o 1 bat o 2 bat. por favor quería una respuesta gracias.

  • @kapilkantkamal9824
    @kapilkantkamal9824 2 ปีที่แล้ว

    Hello
    I am new to Arduino
    And servo motor and ultrasonic sensor are working good
    But when it's time to move motors their
    Speed is very low and sometimes not even moving
    If it is the matter of battery pls suggest
    Which to use
    Or some different problem.

    • @MichaelKlements
      @MichaelKlements  2 ปีที่แล้ว +1

      Hi Kapil,
      You can adjust the motor speed in the code by increasing the motorSpeed variable. If that doesn't help then your batteries are probably underpowered, I usually use lithium-ion or lithium-polymer batteries for these projects.

  • @jishabenny9183
    @jishabenny9183 2 ปีที่แล้ว +1

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

    • @MichaelKlements
      @MichaelKlements  2 ปีที่แล้ว +1

      Yes you can use an Uno clone board, as long as it has the same pinout as the original Uno it should work with the motor driver shield.

  • @lestertang2102
    @lestertang2102 3 ปีที่แล้ว

    Hey, really cool video. I have tried it on my 4wheel Arduino car, but the car only moves back not forward. Do you know why is that?

    • @lestertang2102
      @lestertang2102 3 ปีที่แล้ว

      By the way, the Arduino car kit I got do not allow me to swap the wires on terminal. Is there other way to fix it? and in your code, the rightback 1, is the number of the pin?

    • @MichaelKlements
      @MichaelKlements  3 ปีที่แล้ว +1

      Thanks Lester.
      Are you using the same motor driver shield? Try stripping the code down to just run forward and then backward and see if it works, that'll point out if it is a code problem or hardware problem.
      No, the numbers after rightback and leftback etc. refer to the motor output numbers, not pin numbers. These tell the code which motor output is driving which wheel location.

    • @lestertang2102
      @lestertang2102 3 ปีที่แล้ว

      @@MichaelKlements Thank you! Do you think we can make a drift car based on this kit?

    • @MichaelKlements
      @MichaelKlements  3 ปีที่แล้ว

      These motors aren't really "high performance" motors, so probably wouldn't produce enough torque to get the car to drift. I think you'd be better off using brushless motors and some brushless PWM drivers which you could drive from an Arduino if you'd like.

  • @octorepublic8612
    @octorepublic8612 ปีที่แล้ว

    Great video! But how did you upload your code to the robot?

    • @blidzy_
      @blidzy_ ปีที่แล้ว

      yep same question

    • @divyadeenu1686
      @divyadeenu1686 ปีที่แล้ว

      By connecting the cable to the uno. After that copy paste the code or open the .zip file he left for us to download. Then simply click upload. You must do this in the Arduino IDE software. The latest version is 2.0.3

  • @StephanoCardoso
    @StephanoCardoso ปีที่แล้ว

    did you use a switch to turn it on?

  • @vandanthakrar
    @vandanthakrar 3 ปีที่แล้ว

    Can you provide a link for buying robot chassis ???

    • @MichaelKlements
      @MichaelKlements  3 ปีที่แล้ว

      The chassis is just 3D printed, the parts are downloadable through the link in the video description

  • @bigpapa8805
    @bigpapa8805 2 ปีที่แล้ว

    Hi. I want to ask. Did you used 3 cells of 18650 battery? If i use 2 cells is it enough? Thanks..

    • @MichaelKlements
      @MichaelKlements  2 ปีที่แล้ว

      I used a 3 cell LiPo battery, not 18650 cells. Two 18650 cells would probably be sufficient.

    • @bigpapa8805
      @bigpapa8805 2 ปีที่แล้ว

      @@MichaelKlements ah i misunderstood. I will try this project soon. Thanks for your amazing tutorial!

  • @travelwithgishan6666
    @travelwithgishan6666 3 ปีที่แล้ว

    I also make a car but it is not working can you help me to make it

  • @cosmicauz1
    @cosmicauz1 ปีที่แล้ว

    Hey, how can i find codes for it?

  • @anivarthreddy
    @anivarthreddy 11 หลายเดือนก่อน

    man do u have any ppt for this

  • @HavocNavenGaming
    @HavocNavenGaming 2 ปีที่แล้ว

    How to customise how near can the distance of the robot be with the obstacle before turning away. I want my robot to be about 10cm distance from the obstacle

    • @MichaelKlements
      @MichaelKlements  2 ปีที่แล้ว

      Just change the parameter stopDist in the code to 10

  • @juniordaniel1158
    @juniordaniel1158 2 ปีที่แล้ว

    will it stop at the stairs or will it drive down until it flips?

    • @MichaelKlements
      @MichaelKlements  2 ปีที่แล้ว

      This doesn't detect edges, only obstacles in front of the car.

  • @abhishekrathore9470
    @abhishekrathore9470 2 ปีที่แล้ว

    can we use L298n instead of L293D?

    • @MichaelKlements
      @MichaelKlements  2 ปีที่แล้ว

      Yes you could use a different shield if you want to.

  • @blueoceans4366
    @blueoceans4366 3 ปีที่แล้ว

    Hi, I did everything exactly the same as in the video, but it doesn't move at all. I tested all of the parts seperately and everything worked perfect, but when I run your code nothing happens. I think it's because of the powerbank I use. What kind of power source do you use? I think it's batteries but I'm not sure what kind and how many

    • @MichaelKlements
      @MichaelKlements  3 ปีที่แล้ว +2

      If the car isn't doing anything then the code is likely getting stuck somewhere, most likely when the ultrasonic sensor is used. Try checking your connections to the sensor again.
      How did you test the part separately? Try commenting out sections of the code to get the car to do the basics and then slowly add lines back in until you identify the issue.

    • @harikeeshan
      @harikeeshan 2 ปีที่แล้ว

      I'm having the same issue.
      Did you fix it ?

    • @blueoceans4366
      @blueoceans4366 2 ปีที่แล้ว +1

      @@harikeeshan Nope, eventually I just switched to an ESP8266 and a single L923D bridge instead of the whole motor driver. Worked perfectly with a power bank

    • @harikeeshan
      @harikeeshan 2 ปีที่แล้ว

      @@blueoceans4366 if you don't mind can you send me some details on your work

    • @blueoceans4366
      @blueoceans4366 2 ปีที่แล้ว +1

      @@harikeeshan Sure I have some documentation left. How should I share it with you?

  • @joaquimamaro1412
    @joaquimamaro1412 ปีที่แล้ว

    Could you modify the program for me?, I'm a beginner in robotics and I don't know how to program, I have the same project but I don't have a servo motor, could you modify?

  • @niranjanremesh6992
    @niranjanremesh6992 ปีที่แล้ว

    Heyy thanks a lot for this tutorial now i can finally start making this myself, although one doubt.. while executing your code it shows 'servoLook' was not declared in this scope as the error message... could you help me pls

    • @divyadeenu1686
      @divyadeenu1686 ปีที่แล้ว

      Are you sure you have the library?

    • @sumitpandey-tw7rm
      @sumitpandey-tw7rm ปีที่แล้ว

      @@divyadeenu1686 kyu bana raha hea line 5 or 6 mea jaha bytes declare kiya hea vaha pe dekho servo servolock likha hea ki mit gaya. Tumhara sevo ka object nahi bana hea. Servo library. Nahi hone pe vo #include pe error deta.

  • @manishdhakal9379
    @manishdhakal9379 2 ปีที่แล้ว

    Which software are your using for 3d printing?

    • @MichaelKlements
      @MichaelKlements  2 ปีที่แล้ว

      For this project I used Tinkercad for the design and Creailty Slicer for the 3D printing slicing.

    • @manishdhakal9379
      @manishdhakal9379 2 ปีที่แล้ว

      @@MichaelKlements Thank You vey much. Make more intresting videos related to Arduino or Rassberry pi. I love your videos. I just found your channel yesterday and fell in love with it. Great job man!!!

    • @MichaelKlements
      @MichaelKlements  2 ปีที่แล้ว +1

      Thanks for the support Manish!

    • @manishdhakal9379
      @manishdhakal9379 2 ปีที่แล้ว

      @@MichaelKlements You are welcome!!!

  • @siddhantpant462
    @siddhantpant462 2 ปีที่แล้ว

    Hi sir can you share Arduino circuit please....

  • @iqbal5796
    @iqbal5796 2 ปีที่แล้ว

    please help me master...
    i want to install a buzzer to on the smart car, so that it sounds when sensor reads an object, please help me make the coding.
    Thank you in advance

  • @belas0019
    @belas0019 ปีที่แล้ว

    Hello, I'm a bit confused about the wiring of the motors. What wiring is that, and where do we get them? Does that have to do with the battery. I'm looking at about the 2:05 mark.

    • @MichaelKlements
      @MichaelKlements  ปีที่แล้ว

      It's just 22 AWG ribbon cable wire that I have soldered to the motor terminals and also soldered to male header pins. The battery lead is a separate lead connected to the motor shield. Have a look at the written guide linked in the video description.

    • @belas0019
      @belas0019 ปีที่แล้ว

      @@MichaelKlements But how would you use the ribbon cable to connect the motors into the motor shield? Is it ok to screw in the regular wire
      pins included in the Arduino kit instead?

  • @vishnu5763
    @vishnu5763 ปีที่แล้ว +1

    hey please anyone tell this work..? please🙏

  • @kevinrony1530
    @kevinrony1530 ปีที่แล้ว

    Is there any other cheaper option other than the arduino uno

    • @MichaelKlements
      @MichaelKlements  ปีที่แล้ว

      Not that's compatable with the motor shield, you can get clone Arduinos for a few dollars on Aliexpress

  • @reegeecajes9343
    @reegeecajes9343 2 ปีที่แล้ว

    what component that this robot use to make such left right turns?

    • @MichaelKlements
      @MichaelKlements  2 ปีที่แล้ว

      Just the speed difference between the wheels on the left and right

    • @reegeecajes9343
      @reegeecajes9343 2 ปีที่แล้ว

      @@MichaelKlements oh okay. So no component? Only the program of the wheels? Am i right?

    • @MichaelKlements
      @MichaelKlements  2 ปีที่แล้ว +1

      Yes that's correct

  • @user-el1zr1sw1h
    @user-el1zr1sw1h 3 ปีที่แล้ว

    Where I connected the sensor wire in ardino

    • @MichaelKlements
      @MichaelKlements  3 ปีที่แล้ว

      To the motor controller, it’s explained in the guide linked in the video description

  • @ggplayer2162
    @ggplayer2162 3 ปีที่แล้ว

    i have done everything shown in the vid but when i upload the code it doesn't move at all can anyone help plzzz

  • @potatogaming5551
    @potatogaming5551 ปีที่แล้ว

    Hey my car is not moving what shall I do

  • @nurbanu1283
    @nurbanu1283 2 ปีที่แล้ว

    Appreciate the project. I've been trying to implelement this on my project and i noticed something in the code can you enlighten me?
    if(distance >= stopDist)
    {
    moveForward();
    }
    while(distance >= stopDist)
    {
    distance = getDistance();
    delay(250);
    }
    stopMove();
    int turnDir = checkDirection();
    Serial.print(turnDir);
    shouldn't there be an "else" above the stopMove(); function? Since we defined an if argument? I don't get using while loop after "if" without the else statement. Thanks in advance.

    • @MichaelKlements
      @MichaelKlements  2 ปีที่แล้ว +1

      I think you're misunderstanding what is happening in each function.
      The if statement checks if there is enough space infront of the car to move. If there is then it tells the car to move.
      Since nothing then tells the car to stop, the car will carry on moving until it is told to stop.
      The while loop then continuously checks that there is still space in front of the car and will carry on running as long as there is still space.
      As soon as there isn't space in front of the car, the while loop stops running and the code runs the stopMove command which then stops the car.

    • @nurbanu1283
      @nurbanu1283 2 ปีที่แล้ว

      @@MichaelKlements Oh, i got it now it makes perfect sense. Thank you for your response!

  • @erican6708
    @erican6708 2 ปีที่แล้ว

    Where is the switch and battery? And how is it wired in relation to all the components. Sorry I am new to circuits.

    • @MichaelKlements
      @MichaelKlements  2 ปีที่แล้ว +1

      There is a blog post linked in the video description that has some more detail on the wiring and components used.

  • @ayushthakur7566
    @ayushthakur7566 11 หลายเดือนก่อน

    Can you provide me circuit connection

  • @bivintechtamil1072
    @bivintechtamil1072 ปีที่แล้ว

    Hello Bro Can You Please Say Me How To Decrease the speed of motors and if reduced the turning speed also decreases

    • @MichaelKlements
      @MichaelKlements  ปีที่แล้ว

      Just adjust the motor speed variables at the begining of the code, the turning speed is scaled from these so will also reduce

  • @mrword4337
    @mrword4337 2 ปีที่แล้ว

    We can do the coting in mobile

  • @blidzy_
    @blidzy_ ปีที่แล้ว

    Can you tell what language did you use to code

  • @bheeshampunshi2976
    @bheeshampunshi2976 ปีที่แล้ว

    Can any body help, from where to download the code?