Arduino autonomous Robot Project: A DIY obstacle avoiding robot using an SG90 servo

แชร์
ฝัง
  • เผยแพร่เมื่อ 16 พ.ค. 2024
  • In this Arduino Robot project video, we are going to build an autonomous Arduino Robot that can avoid obstacles. It is a fun project and a great learning experience, so without any further delay, let's get started!
    The robot that we are going to build today is moving around and it can detect obstacles and avoid them. It uses a supersonic distance sensor to measure the distance from its front side. When it detects an obstacle, it stops, goes backward for a few cms, looks around and then it turns to the direction with the more space available. As you are going to find out, building this impressive little robot is extremely easy and fun. It will not take you more than a couple of hours from start to finish. Then you can use my code, modify it and implement your own robot behavior easily. It is a great learning experience and a great introduction to robotics for kids and adults. Let's build it!
    💻 Code & Parts: educ8s.tv/arduino-robot-easy-d...
    Want to learn to code?
    👨‍💻 Check my new TH-cam channel: bit.ly/3tku2n0
    🎮 My Android Game: bit.ly/QuizOfKnowledge
  • วิทยาศาสตร์และเทคโนโลยี

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

  • @Educ8s
    @Educ8s  5 ปีที่แล้ว +14

    I hope you find this video useful. If you want to support the channel see how here: educ8s.tv/support-educ8s-tv/

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

      Bro can you publish a video in which we can switch autonomous to manual controlled.

    • @DhadamRobotics
      @DhadamRobotics 5 ปีที่แล้ว

      Good job

    • @shreyaskarsingh1835
      @shreyaskarsingh1835 5 ปีที่แล้ว

      I m getting error while uploading the code its says faltal error AFmotor.h: no such file or directory

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

      @@shreyaskarsingh1835 i found same error while uploding what i do

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

      i found error while uploding the code the directory not found can i uplod with out files

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

    Ευχαριστω, Finally someone explains arduino with simple terms!!!
    please keep this great work of yours for it helps people!!!

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

    Hi Nick,
    I've had the parts for some time but just got around to building it today. Worked first time, with one motor going slightly faster than the other. I should be able to fix this by playing with the motor offset value. Thank you for your work - I have learned a lot from your channel.
    Kind Regards
    Alan

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

    Great project!
    One feature that would be great (since winter is coming) is to add a snowplow :) heheh

  • @satrah101
    @satrah101 7 ปีที่แล้ว

    yes more robot vids, connect the small vacuum clean you built, many thanks for these videos.

  • @mariocontreras82
    @mariocontreras82 6 ปีที่แล้ว

    Beautiful proyect and so well explained, thanks

  • @senthilkumarraju2187
    @senthilkumarraju2187 5 ปีที่แล้ว

    This project is perfectly working for me👍🏽👍🏽👍🏽. Thank you. 😀😀😀😀

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

    Use the ultrasonic sensor to warn you with a light and a piezo sound generator. Of course you need to controll it wirelessy so the feature comes in use :) Great video!

  • @danielkonat8535
    @danielkonat8535 5 ปีที่แล้ว

    Thank you! Good explanation and nice pics. The video helped a lot ! I would like to suggest a few edits please.
    1- The wiring for the Ultrasound Sensor needs to be corrected. The trigger and Echo pins in the diagram and in the code are inverted. The code has Trigger pin in A4, while the diagram has it in A5.
    2- If you have issues with motor not running, may be you want to remove the input MOTOR12_1KHZ from lines 7&8. See updated code below. What I found is that for most of the battery operated motors, the MOTOR12_1KHZ will create an error and a humming noise in the motor.
    AF_DCMotor motor1(1); // Removed MOTOR12_1KHZ
    AF_DCMotor motor2(3); // Removed MOTOR12_1KHZ

  • @MaxBrainDevices
    @MaxBrainDevices 7 ปีที่แล้ว

    Great work. I loved to build this kind of robot on my channel

  • @royal6439
    @royal6439 4 ปีที่แล้ว

    How did you make the circuit design and what parts did you use?
    Thanks in advance and keep the great work!

  • @nikhil4dtiwari
    @nikhil4dtiwari 5 ปีที่แล้ว

    Great Work sir... Thank you

  • @SuperSpuddo
    @SuperSpuddo 7 ปีที่แล้ว

    Great video as always. How about some sound, lights and remote control. Would be a fun Christmas present for a small child as an introduction to electronics.

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

    Nicely explained.thank you

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

    I was quite successful in building it with my custom PVC board. My first success in using the Sonar Sensor. Many thanks from Bangladesh and do please, keep uploading more. Can you please upload a project on Motion/Gesture control Arduino Robot using 433MHz RF module Transmitter and Receiver plus 6-DOY GY521 Gyro Accelerometer

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

      I have coded same code but my motor is not working

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

      Please help

  • @robobillgr
    @robobillgr 6 ปีที่แล้ว

    Hello, first of all this is a great video. I would like to ask about a problem of mine. For some reason sometimes it does not go straight forward. IT seems that a motors starts some ms before the other motor, Any ideas how to solve this? When i place it to move forward to seems to have a drag left or right...it does go straight.

  • @alimaster5292
    @alimaster5292 7 ปีที่แล้ว

    hey can this program be used for maze solving robot ? or just improving it

  • @FranciscoRodriguezCasal
    @FranciscoRodriguezCasal 7 ปีที่แล้ว

    Please don't stop doing this videos!

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

    Nice info, thank you for sharing it :)

  • @KnewLight
    @KnewLight 6 ปีที่แล้ว

    Great sir, one can just sense a lot of humility and knowledge in your voice! ... you are not intimidating.

  • @DaveLynks
    @DaveLynks 4 ปีที่แล้ว

    Hi,
    Excellent video.
    Is it possible to implement the project so that the robot is autonomous and create routes through mapping through a device (laptop, tablet, smartphone....)?.... How would it be?
    Thank you

  • @AliAbbas-vn1qh
    @AliAbbas-vn1qh 3 ปีที่แล้ว

    Hi, thanks for the amazing tutorial. After uploading the program, the car isn't moving. Can you please help?

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

    Nice project!! For future improvements It could be awesome add a IR remote control! Good job

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

    Wow! I have never seen so many people without any knowlegde about Arduino trying to build an Arduino-robot.Please! To all you beginners, try and go to the Arduino site and learn a bit Arduino before making big projects and you will have more fun instead of frustration.(Sorry for bad gramma and spelling)

  • @BigerBoy
    @BigerBoy 7 ปีที่แล้ว

    How did you add the capacitor at the end?

  • @victorkimnaquila4174
    @victorkimnaquila4174 7 ปีที่แล้ว

    Sir what are other capacitors that i can use in attaching to the servo?

  • @prateekrana1387
    @prateekrana1387 7 ปีที่แล้ว

    could you pls just tell me from where did you got the code which you wrote in the programming

  • @BruGaleen
    @BruGaleen 6 ปีที่แล้ว

    A question. The motors I'm using may require a higher voltage than I'm using. I'm assuming that's why I can't get my code to run correctly. The sensor seems to work just fine on a test rig but does nothing on the robot. I copied and pasted the code directly from the website and connected everything correctly as in the video, and it doesn't seem to work. What might I be doing wrong? Thanks for reading. :)

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

    Awesome!!!!!!!!!!!!

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

    GOOD!!!! THANK YOU FOR THE IDEA
    ΥΟU HAVE MAKE SUBSCRIBE

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

    I want to attach a harrow behind it that will need stepper motor for its angular movement. how can I go about it?

  • @zabi4142
    @zabi4142 6 ปีที่แล้ว

    great project....................

  • @mog99lie
    @mog99lie 7 ปีที่แล้ว

    I have built this robot and it is fantastic!! The code compiled first time and I had a working robot.Thank you for the project.. One small problem is when the robot comes to a wall at a very shallow angle it does not see the obstacle. How about a right and left sensor so it can move away. I am trying to add sensors with the Ping libary but I can't make it work.. I will keep trying!!
    This is one fantastc project with lots of options..... THANK YOU!!!

    • @shivajibhardwaj8636
      @shivajibhardwaj8636 7 ปีที่แล้ว

      can u plz tell tat which batteries r u using and how much

  • @swikaradhikari1623
    @swikaradhikari1623 7 ปีที่แล้ว

    u dont need such big motor shield just looks more messy expensive . You can use l293d motor driver ic for superb clean finish anyways nice video

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

    Awesome

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

    Vc Usou Pilhas Recarregáveis nesse Projeto

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

    بارك الله فيك😍❤

  • @trians95
    @trians95 6 ปีที่แล้ว

    this really help me so much
    thank you sir

    • @Educ8s
      @Educ8s  6 ปีที่แล้ว

      You are welcome!

  • @elve44
    @elve44 6 ปีที่แล้ว

    French retired I discover electronics. this tutorial is really great.
    can we have the sheme of connection of the LCD screen as well as modofications for code Encore thank you

  • @storrho
    @storrho 6 ปีที่แล้ว

    Great video, helped me alot. I made a robot for a school project along with a detailed 'scription' about robots in todays society.
    Is it okay if i put your video with the sources?
    Thanks!
    PS: One question, why did you solder the wires to the motor shield when you could've put them in the arduino first to let you keep using the motor shield?

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

      I am Coded The Same Code In Arduino In Mobile But It Is Not Working Please help Me I Have To Do For My School Project

  • @HX2003
    @HX2003 7 ปีที่แล้ว

    Awesome project! How much weight can this carry?

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

    Sir I have a doubt what should the board name be given and what serial port did u connect it too

  • @paulsharpe7740
    @paulsharpe7740 7 ปีที่แล้ว

    hi great project and video how about return to home to charge it's battery. that would make it more useful and self safitiont and be a good base for other projects

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

    Obstakool ❤️

  • @petrcaha6214
    @petrcaha6214 6 ปีที่แล้ว

    As I am mechanical hobby technician, this video was very helpful for me and IP:) (Idiotic Proof), but I would need to connect more powerful el. motors, like for 12 or even 18 V DC for some grass mover, etc. Can you help with some details how to realieze it? Many thanks

  • @faizmohd9708
    @faizmohd9708 6 ปีที่แล้ว

    Ultimate

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

    Hey i need help fast im doing everything write but it says declaration of 'loop' as array of void. what does that mean?

  • @MrKosxrem
    @MrKosxrem 7 ปีที่แล้ว

    Nice robot my friend!! Why not trying to rotate the sensor 360 degrees, in order to map the surroundings, and then deciding the exit strategy? All you need is some memory, a sampling procedure to determine the distance on each side, and basic trigonometry to determine if you have enough space to pass.

  • @jackmanjls
    @jackmanjls 6 ปีที่แล้ว

    I have watched several of your vids...they are top notch.
    IDEA==>could you take this same platform and make a vid on using a remote control?

    • @Educ8s
      @Educ8s  6 ปีที่แล้ว

      Sure, that's coming!

  • @IdeaLab1
    @IdeaLab1 7 ปีที่แล้ว

    very good work i like it

  • @Mohamed-rj8gt
    @Mohamed-rj8gt 7 ปีที่แล้ว

    why you put a capacitor in the dc motor?

  • @WARHERO388
    @WARHERO388 7 ปีที่แล้ว

    plz help me ive hooked everything up right sensor works like its supposed too but motors dont work at all only if i dc them they will spinn wont work with anything else

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

    How can I add a remote control to it? I want to control this via Bluetooth on a smartphone, how do I interface it with the smartphone in order for the smartphone to act as a controller?

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

    can i make it without programing?

  • @muhammadasri1093
    @muhammadasri1093 7 ปีที่แล้ว

    sir i have an idea, what about the robot follow the direction of the user..the robot follow wherever the user goes..what sensor can be use to make this idea work?

  • @uditpandit3244
    @uditpandit3244 4 ปีที่แล้ว

    I connected 9v to the motor shield but it's not working.
    But when I give supply through serial port it works perfect .
    Why is it so???

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

    I use everything as per shown but my L293D produce beeping noise. I am using absolutely new 9V battery . Please help me

  • @bsdprojects7445
    @bsdprojects7445 5 ปีที่แล้ว

    hey can we leave the capacitors??

  • @marcuscatchpole5389
    @marcuscatchpole5389 7 ปีที่แล้ว

    Good video

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

    hello, can i make this with a relay instead of a sheild

  • @sirtessai
    @sirtessai 7 ปีที่แล้ว

    I have a question about connecting the wires to the external power (EXT_PWR) on the motor shield. This may seem like a silly question, but how do I get the wires to stay connected? This is my first project using the external power block, and I can't figure out how to get the wires to stay. It doesn't seem right that I should solder them, so am I missing something obvious or is my shield maybe just broken? It doesn't seem like they're in there very tightly, and my LED doesn't turn on when I flip my switch.

    • @Educ8s
      @Educ8s  7 ปีที่แล้ว

      +Tessa Beebe You need a screwdriver to attach the wires to the connector.

    • @sirtessai
      @sirtessai 7 ปีที่แล้ว

      Oooh, I see now. Thank you so much! It's working now.

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

      I have one more quick question! My robot is working, mostly. It functions properly when plugged into the computer, but when I turn it on it won't actually move. The servo motor will rotate, but the wheels never actually move. Any idea why this might be? Thanks a million!

    • @Educ8s
      @Educ8s  7 ปีที่แล้ว

      You probably need better batteries

    • @shivajibhardwaj8636
      @shivajibhardwaj8636 7 ปีที่แล้ว

      battery name plz n specification

  • @claud.8676
    @claud.8676 5 ปีที่แล้ว

    hello sir, can you be able to limit the distance of the sensor to let say 30cm then the robot will detect obtacle thus it will move away

  • @KnaufL
    @KnaufL 7 ปีที่แล้ว

    great videos!keep up the good work. Also show us your face!

  • @harshvardhankumar9403
    @harshvardhankumar9403 7 ปีที่แล้ว

    You said in the video that we need 330 uf capacitors but in the list you have 100 nf and 300 uf capacitors. I am confused.

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

    Hello, is it possible to install a Bluetooth device in a robot like this, and transmit information from the ultrasonic sensor back to the pc in real time, something like parking sensors in cars, and if can what software do i need for visualization?

  • @tomherd4179
    @tomherd4179 6 ปีที่แล้ว

    Being new to this I have a question about the code. Once uploaded to the UNO will the UNO store and hold the code. I am confused about the power connection. The USB cable provides the power and the code transfer - so how once power is removed does your robot remember the code??

    • @jesperkleemann1333
      @jesperkleemann1333 6 ปีที่แล้ว

      Hi! Please go to the Arduino site and learn to use Arduino before you make bigger projects.

  • @sunithashetty7431
    @sunithashetty7431 5 ปีที่แล้ว

    I need circuit diagram& how volt battery is required

  • @xpertgamer1286
    @xpertgamer1286 6 ปีที่แล้ว

    Where I have to use the 100uf pin

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

    nice

  • @pinsonrobotics8711
    @pinsonrobotics8711 5 ปีที่แล้ว

    Nice

  • @Roscovanul2
    @Roscovanul2 5 ปีที่แล้ว

    Well ..I've got a problem with the Super Sonic Sensor.
    When I run the New Ping Example it would just show me some squares ...or occasionally some letters when i gently press its "eyes".
    However when i run the code that you gave us in the super sonic sensor tutorial (the one without any library) it works just fine. So I guess the problem would be at the New Ping library ? As the sensor works fine when i'm not using it. The problem is , I guess i will need the New Ping library in order to make this robot work ( for lookright() function and lookleft(function))

    • @geekfpv374
      @geekfpv374 5 ปีที่แล้ว

      You are not supposed to touch the tx and the rx... You could damage the sensor touching the grid..

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

    sir can you make more robot videos

  • @ignacevandevelde2733
    @ignacevandevelde2733 4 ปีที่แล้ว

    Dear, I'm looking for a smaller ultrason sensor but I cann't find it on the internet. Please smaller then the HC04, the HC04 is to large for my project. Thanks a lot for your video's and tips etc... Hope someone can help me with a link to look at a smaller ultrason sensor.

  • @ehan1780
    @ehan1780 5 ปีที่แล้ว

    How many capacitor and elco?

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

    How to turn left or right on this kind of project?

  • @hnbee730
    @hnbee730 7 ปีที่แล้ว

    what does the booelan goesforward=false is represted to,int distace=...,and #define maxspeed offset=....(need the functionality of these codes )??????? plz help me thanks

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

    Is it something to do with the codes?

  • @rifkykhaerul1202
    @rifkykhaerul1202 6 ปีที่แล้ว

    why my sensors doesnt works the only things that running only motor on the wheel

  • @athngeo
    @athngeo 6 ปีที่แล้ว

    The motor shield sends only 1,7 V at the right motor and it doesn't work. Meanwhile the left motor receives about 3,2 volts and runs normally. Is it a shields problem or simply there 's not enough power? I put 4x AA new batteries and the multimeter shows 5,9V. The servo and the sensor work just fine.

    • @athngeo
      @athngeo 6 ปีที่แล้ว

      DemSkittlesDoe You are right! I changed the motor and it works without problems.

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

    How can I get this to follow me like a puppy when it senses me in the room? Maybe using an IR camera for that instead of the/ or in addition to sonar? Can you write the code for that? Thanks

  • @Mohamed-rj8gt
    @Mohamed-rj8gt 7 ปีที่แล้ว

    Hi can you make a vidéo to robot with arduino but without a shield. thank's.

  • @BigerBoy
    @BigerBoy 7 ปีที่แล้ว

    How to solve the reverse polarity problem ?

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

    hello i am vignesh.......loved ur project....great thing.....i also did the same as you did it...but the motors r perfectly working....but my sensor is not detecting.....pls help me out from this plsss...thanks

  • @chemgreec
    @chemgreec 7 ปีที่แล้ว

    thanks for all the links etc it is nice to have everything in one place. I am starting now with robotics and this is my first kit, i hope it works out well

    • @Educ8s
      @Educ8s  7 ปีที่แล้ว

      Great! It is a very nice project to start with! If you have any problems don't hesitate to ask... Cheers!

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

    cool

  • @parameswaraniyer8114
    @parameswaraniyer8114 6 ปีที่แล้ว

    Sir,
    My robot turns at a very small angle and only to the left.
    It takes about 3 minutes for it to avoid the obstacle and move to a free space.
    plz help.

  • @devendrachowdary3424
    @devendrachowdary3424 7 ปีที่แล้ว

    add graphical output of utrasonic sensor like radar.

  • @hamzahassan7730
    @hamzahassan7730 7 ปีที่แล้ว

    For the 330 capacitor you said "330 capacitor or similar". Can a 220 work?

    • @Educ8s
      @Educ8s  7 ปีที่แล้ว

      Yes, it might work. I haven't tried it though. Try it and if it does not work, use a larger capacitor.

  • @satheeshaj8239
    @satheeshaj8239 6 ปีที่แล้ว

    A nice project, but when I made it everything was working properly only thing was that one motor was not running Pls help

  • @EngineeringNibbles
    @EngineeringNibbles 7 ปีที่แล้ว

    Don't you need a diode for motors or are these small enough for it to not be a problem ?

    • @mekiteu
      @mekiteu 7 ปีที่แล้ว

      Diode for what purpose? Do you mean as a safety measure like used on relais? (In that case: The motors get their polarity switched by the motor shield in order to go backwards and forwards.)
      If you didn't mean this never mind me ;)

    • @EngineeringNibbles
      @EngineeringNibbles 7 ปีที่แล้ว

      mekiteu w I meant for inductive spiking
      But I hadn't though about the fact that that would prevent reverse gear, so a diode isn't an option

  • @FFGAMER-cp5vd
    @FFGAMER-cp5vd 5 ปีที่แล้ว +1

    Bhi I make this but servo can direct rotate why ??????????

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

    How to make a wall following robot

  • @haziqhamza
    @haziqhamza 7 ปีที่แล้ว

    whats the other kit than uno r3

  • @pablor123
    @pablor123 6 ปีที่แล้ว

    One question, how u correct the desviation caused by the aling error of the motor.

    • @dsmith5167
      @dsmith5167 6 ปีที่แล้ว

      Create a sloL and sloR variable. Then in the forward void subtract the sloL or R variable from the speed variable. Not perfect but will keep the bot relatively straight for short distances. See my code here. www.gertweb.com/SmartCar.html

  • @shivajibhardwaj8636
    @shivajibhardwaj8636 7 ปีที่แล้ว

    my dc motors rbnot working what should i do ?

  • @nirajchauhan6878
    @nirajchauhan6878 7 ปีที่แล้ว

    How do I use l298n instead of l293d please help its urgent

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

    where did u get this from

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

    Hello, can you please help me, the robot works fine but after he passes the first obstacleand goes to the other he just goes backwards and stops, it doesnt go anywhere but the motors do sounds

  • @aktarhossain3261
    @aktarhossain3261 5 ปีที่แล้ว

    can i programing it on android phone?

  • @dev9545
    @dev9545 7 ปีที่แล้ว

    my motor is of 150 rpm L shaped dc motor ,i am giving 9 volt to motor sheild and 9 v to arduino ,but dc motor are not working properly it cannot move forward , only it moves slowly ,sir plz tell me what to do?