Arduino Robot Car with Speed Sensors - Using Arduino Interrupts

Поділитися
Вставка
  • Опубліковано 15 січ 2025

КОМЕНТАРІ • 265

  • @ashr
    @ashr 4 роки тому +11

    I learned more about Arduino programming from this video in 40 minutes, then I did in almost 1 semester of my college classes that teaches us to work with the Arduino Uno.

    • @kyrofromgahool2009
      @kyrofromgahool2009 2 роки тому +1

      Mb you should have stopped making part times and start following the course((?

  • @CountryNerd639
    @CountryNerd639 2 роки тому +10

    I really like watching your videos. You explain the project in a way that I can understand. Most tutorials fly through the steps that some of the information is missing, or glossed over. That is why I appreciate your style of teaching.

  • @msignal2000
    @msignal2000 4 роки тому +3

    Decided to spend the corona lock down learning Arduino. So very glad I found your channel.

  • @charlesbrown5057
    @charlesbrown5057 3 роки тому

    For some reason, I volunteered to enter a robotics competition for my senior project... extremely thankful for this video

  • @tegekgast
    @tegekgast 7 років тому +19

    Excellent timing! Just got into this thing and wondered how the heck the speedometer things work, the Chinese instructions aren't much help and you are a hero doing this series in your calm and structured way, much appreciated!

    • @Dronebotworkshop
      @Dronebotworkshop  7 років тому +9

      Glad that my timing worked out so well for you, let me know if you have any additional questions.
      The stuff we can get now from China is of incredible value but it does tend to lack a lot of useful instructions, which Is one of the reasons I made the video. Happy to hear you found it useful.

  • @timrobinson7152
    @timrobinson7152 3 роки тому +2

    Just a few short comments. First, please note that 25.4 cm is NOT "about a foot." It actually is 10 inches.
    Second, while I enjoyed your video, as I always do, I came here looking for a way to control SPEED of two motors so they track accurately together. After all, the encoder disk is referred to as a "speed sensor". The motors you used, quite visibly, do NOT both turn at the same rpm, as the car drifted to one side when it moved. That was also obvious during your first demonstration showing rpm on the Serial Monitor. The two numbers were not in sync. If you do not have a video that addresses this issue, please consider making one.
    Thank you for your time and efforts producing these videos. I enjoy them and have learned a lot from you. Keep it up.
    Finally, to those who comment on your (and others') videos with lines like "I have a project due Monday, how can I do..." These drive me mad, as it seems they want YOU to do the work and let tham take credit for it to get their diploma/degree. Instead, I recommend those people actually invest in LEARNING something, instead of poaching others' work. Grrrr...

    • @citratune7830
      @citratune7830 10 місяців тому

      Hi Tim,
      Have you heard of PID control? Theres a video on MATLAB that allows you to use this output speed to determine how to adjust it.
      Also, about a foot is close enough to 10 inches. I think he rounded it.

  • @1DR31N
    @1DR31N 4 роки тому +2

    It cannot be better. What a great video. Words aren't enough to praise your job. Congratulations, you deserve the best.

  • @premprasad3511
    @premprasad3511 3 роки тому

    THE BEST SET OF TUTORIALS ON ARDUINO.

  • @carlosl1895
    @carlosl1895 4 роки тому +1

    I’m starting with arduino. Still don’t know how to program it. Thank you for such a great explanation. To me is the best video I have seen. Keep up with it

  • @andreaszervas7546
    @andreaszervas7546 6 років тому +4

    Excellent work! You are a great teacher. I found you last week and learn from you things I m looking for months before. Thank you and keep uploading!

  • @Luis3alsa
    @Luis3alsa 3 роки тому +1

    This is by far the best channel to learn arduino! Thanks a lot 👍

  • @johnhaythorpe206
    @johnhaythorpe206 7 років тому

    Brilliant Demo, with excellent explanations. The only suggestion would be (at 33:37) show the negative from the 9 volts goes to the outside (chassis) of the 2.1 mm power socket (centre is positive). I am jealous of how neat, tidy and well laid out your workshop appears.

    • @Dronebotworkshop
      @Dronebotworkshop  7 років тому

      Good eye John, I should have spotted that connection error but didn't until I read your comment. Hopefully most users will just use a 9-volt to 2.1mm connector and won't reverse the polarity. Thanks for pointing that out!

  • @hayttom
    @hayttom 4 роки тому +1

    Thank you very much! I mainly came here to begin to understand interrupts. I'm on my way!

  • @peterbaker6597
    @peterbaker6597 6 років тому

    I am teaching myself Arduino and to a smaller extent robotics. I have followed your excellent tutorials about the robot car and every detail is clearly explained and easy to follow. The instructions on Interrupts (and the link to Nick Gammon) made my project jump ahead in leaps and bounds. I did find that the last code would not run until I put a few pinMode(??, OUTPUT) instructions in the setup to define the Arduino to L298N driver pins. Once they were set, away we went. Thanks again and I'm looking forward to your continued additions to the car.

  • @VerifiedUser-DE
    @VerifiedUser-DE 6 років тому +5

    The way you explain everything is amazing ..which let me stick till last...waiting for more material ..mostly excited about IOT

  • @preetamsingh147
    @preetamsingh147 4 роки тому +1

    You really are a hardworking man. Keep it up!

  • @andur63
    @andur63 6 років тому +33

    This video is worth every minute watching, you made such a fine job, Thank you!

  • @d3bbi339
    @d3bbi339 6 років тому +1

    You should make a video on building a drone with a camera attached. Just a thought! You just explain things so well it would make things so much easier for my brain to crunch on.

  • @bluehornet6752
    @bluehornet6752 6 років тому +2

    Great video.
    Your > is "greater than" not less than... You said it correctly towards the end, but it was confusing when you said it incorrectly while explaining the logic of your functions. Excellent demonstration though on the use of optical sensors, comparators and interrupts. Great stuff!

  • @eclecticlife
    @eclecticlife 2 роки тому +1

    Excellent instructional video! Your videos are clear, easy to understand, and to the point. Thank you for all the effort and for sharing your knowledge.

  • @joerinaldi5
    @joerinaldi5 5 років тому +1

    Excellent Presentation. Clearly explained with complete details of project without any missing steps. Very easy to follow...thanks

  • @bennedhedegaard4971
    @bennedhedegaard4971 4 роки тому +6

    This is an incredibly valuable resource, thank you for your work!

  • @duylekhac6044
    @duylekhac6044 5 років тому +2

    You deserve so much more than 93K sub. Love your videos!

  • @Aegir1001
    @Aegir1001 6 років тому +3

    A big thank you for a nice and informative tutorial. I was pondering whether to start to learn Arduino and found your channel after a short search. Very interesting - now I'm hooked!

  • @marcosalmeida9465
    @marcosalmeida9465 7 років тому

    Say hi to Brazil!
    I still do not speak your language very well, but I'm studying!
    Thank you for the explanation. I searched for something very much, but without much success, I had to appeal and look in another language ... Thank you! Nós amamos vocês!

    • @Dronebotworkshop
      @Dronebotworkshop  7 років тому

      Hi to Brazil from Canada Marcos! You do much better in English than I ever would in Portuguese. I'm glad you were able to understand enough to make it useful for you.

  • @PG-qz6mg
    @PG-qz6mg 2 роки тому

    Thank you very much for your videos. I'm french but i understand very well your english !

  • @airesearch0844
    @airesearch0844 4 роки тому

    Thanks for the wonderful video. I am dding these comments *again* even though you have replied to similar comments. But I was looking for some *errata* in the text or in the video about that. After 3 years, it will take some digging to get to those comments, hence to help the late comers like me. Advance apologies.
    39:00 - Adding 0.5 to the float value and casting to (int) will automatically do a upward rounding.
    44:40 - 25.4 cm is 10 inches, not 1 foot. One foot is 2.54 x 12 = 30.48 cm

  • @ishansmith549
    @ishansmith549 6 років тому

    Thumbs up. Very good, informative video. Blows all the other videos ive seen on these robots so far out of the game. Really appreciate the video.

  • @Webendowed
    @Webendowed 5 років тому +10

    I'm new to the group and I must say this is great. I'm learning so much and having thought provoking ideas as well. Thank you for these great videos DroneBot Workshop

  • @andreaszervas7546
    @andreaszervas7546 6 років тому +4

    hi and thank you for this work, it's a great start for me.
    Some improvements I did in the move routines code:
    1. if you use "II" instead "&&" in "while", then the movement finish when both motors end at the same number of steps.
    2. instead of "steps > counter_A" I use "counter_B >= counter_A" and instead of "steps > counter_B" i use "counter_A >= counter_B".. in this case each motor waits the other to complete same number of steps, so the movement is straight.

  • @cemox007
    @cemox007 4 роки тому +2

    Just a little note. Any variable that will be changed by interrupts should be defined as "volatile". So, counter1 and counter2 should be defined as volatile.

  • @claudecastets4271
    @claudecastets4271 6 років тому

    very clear instructor efficient and going in details for all functions

  • @anubhavkalita675
    @anubhavkalita675 4 роки тому

    I understood everything whatever you explained.
    Love from India 🇮🇳

  • @123kkambiz
    @123kkambiz 6 років тому +1

    Your tutorials are excellent.Thank you very much for uploading the video with excellent camera positioning and video editing.

  • @pardhunadella2524
    @pardhunadella2524 4 роки тому

    This video just drove me crazy.....Such a great explanation......

  • @sugarstool1602
    @sugarstool1602 7 років тому

    This is sooo crystal clear. I code more on Python instead. Go through Pyserial to response each other between Arduino IDE and Python. very much like this episode.

  • @pastrana2000
    @pastrana2000 5 років тому +5

    Outstanding video! You really explained things here in layman's terms which helped tremendously.

  • @julenlaskibar5409
    @julenlaskibar5409 6 років тому +3

    My compliments and applause. Simply amazed by such a well structured lesson.

  • @amjad2000in
    @amjad2000in 6 років тому

    Simply Superb .... No words . .. This is the best tutorial video I have ever seen in my life in youtube yet. And your lab, its awsome. Wish I could work with you. You have explained everything in such a way that even a beginner will understand it. I am also building a Robo car with same chasis but controller and functionalties will be different. Just came here while searching the working of speed encoders. I got what I need. I am from India and wish I could meet you in person ever and visit your lab. Keep going sir ...

  • @toilaxuannam
    @toilaxuannam Рік тому +1

    Absolutely amazing video for beginners like me. Really appreciate it🎉

  • @danielmartel6424
    @danielmartel6424 4 роки тому +2

    very well done, congratulation. I love the details and the clarity of your explanation. Keep up the good work

  • @wolfrobots118
    @wolfrobots118 4 роки тому

    You are simply the best. I love your videos. They have helped me multiple time.

  • @cliffordhallam3270
    @cliffordhallam3270 7 років тому

    Excellent video, very easy to follow. Looking forward to the radio control video because that’s where I’m currently at with my own arduino robot project. Thank you for taking the time to make this.

    • @Dronebotworkshop
      @Dronebotworkshop  7 років тому

      Glad you liked it, stay tuned as the remote control will be coming very soon.

  • @zobayarriad668
    @zobayarriad668 5 років тому

    You are really awesome guy who really understand robotics

  • @pantuflip
    @pantuflip 6 років тому +1

    Un gran aporte, sobre todo en la parte del código de las interrucciones.
    Nice contribution, Very good information about interruptions.

  • @nejim1232
    @nejim1232 2 роки тому

    Thank you my dear for your clear and complyt lesson may god help you wish you all the best

  • @roniosteicoechea9190
    @roniosteicoechea9190 6 років тому +5

    This am amaizing channel! Really you are doing a beautiful job!

  • @grape142
    @grape142 7 років тому

    Excellent video, glad to see back. I'm looking forward to your development of this robot. I like the explanation of the use of interupts.

    • @Dronebotworkshop
      @Dronebotworkshop  7 років тому

      Glad you enjoyed it and I'm glad to be back. I'll definitely have more on the evolution of this robot very soon!

  • @MrHristoB
    @MrHristoB 7 років тому

    Excellent tutorial!!! Well done. I'm really enjoying your videos, pure information without the drama other guys trow out. I did a couple of projects but I used 6 cell holder for rechargeable batteries for 7.2V for the arduino and 8 cell for the H bridge. Keep them coming mate!! Regards

    • @Dronebotworkshop
      @Dronebotworkshop  7 років тому

      Glad you liked it, thanks for the nice comment! Next video is on Friday.

  • @OdTronics
    @OdTronics 3 роки тому

    Thank you, teacher! 2022 and still a great and relevant lesson!

  • @neurosp
    @neurosp 4 роки тому +1

    Another way I found to make it go straight is using a compass and following a heading , so if something interferes with the robot it wil autocorrect and using encoders too he can know the distance .

  • @dr.psprojects9591
    @dr.psprojects9591 4 роки тому +5

    Is there an amazon link for this introductory kit? I can't seem to find it on the website.

  • @MrEerilybasic
    @MrEerilybasic 10 місяців тому

    Thanks Bill. Much fun!

  • @DevineIshaq107
    @DevineIshaq107 6 років тому

    What a neat Workshop , unlike the mess that I have in here, HOW do you manage it , OR you will be messy after the presentation is done, Or you have a an assistant .need a tutorial for being organised .

  • @jainlibra
    @jainlibra 6 років тому +2

    Your videos are awesome!!really helpful

  • @ibrahimshareef4743
    @ibrahimshareef4743 6 років тому

    Sir! You are the best in your field.
    Thank you for such great video.

  • @thilinawijebandara3232
    @thilinawijebandara3232 4 роки тому

    Great Explanation .Thank you very much 👍

  • @GaryParkin
    @GaryParkin 7 місяців тому

    I love watching your content. Thank you so much. I was looking on Amazon for the chassis and there are a few. Any reason why you chose a 2 wheeled over the 4 wheeled one? I'm looking forward to ordering the parts and making stuff.

  • @damithsm1980
    @damithsm1980 7 років тому

    Great Work... Your presentation was simple and amazing...Thank You very much. I love the way you arrange your tools too.

  • @bikefarmtaiwan1800
    @bikefarmtaiwan1800 7 років тому

    Nice and clear-please keep up with this great resource! Thanks for your effort.

  • @dafeifeng3902
    @dafeifeng3902 2 роки тому

    Thank you for this tutorial!

  • @bibekghimire8619
    @bibekghimire8619 7 років тому

    The way you demonstrate is really amazing... I look forward for your others tutorials and can you make some videos on IOT...

    • @Dronebotworkshop
      @Dronebotworkshop  7 років тому

      Glad you enjoyed it. I have several IoT videos and articles planned, they will be out very soon.

  • @karalekasgeorge1252
    @karalekasgeorge1252 6 років тому +1

    Bravo from Greece..

  • @naboulsikhalid7763
    @naboulsikhalid7763 6 років тому +1

    A good teacher. thank you again

  • @ArduinoBasicsBlogspot
    @ArduinoBasicsBlogspot 5 років тому

    A great video explanation - very thorough and easy to understand. Awesome !!

  • @spwim
    @spwim 6 років тому +2

    My remark : if you hope to get your car running perfectly forward and make perfect 90 degree turns with this setup, dont get your hopes up.
    The quality of those plastic gearboxes is, with my experience, just too low to achieve that goal.
    The problem is the relation PWM to speed is not linear and the motors dont break free at the same moment.
    So you have motor 1 already started while motor 2 is still stalling, leading it to make a turn.
    I have tried to compensate for these shortcomings in many many ways, but none seem to work in a satisfying way.
    Things i have tried : determining the breakfreepoint, linearise motor speed, use just one fixed speed and try to determine best PWM setting to obtain this, start with a short boost of 200/55PWM to break free and lower to desired speed after, adapt the motor speed while running forward. (if the difference in the counts is too great, make the faster motor slow down).
    I tried switching out gearboxes, i have many of those here. All of it didn't lead me to the stable predictable behavior i was looking for....
    I am going to switch to stepper motors for my requirement and/or do some tests with metal gearboxes later, i have hunch the main culprit are those plastic gearboxes, the tolerances on those just are not high enough for stable performance.
    PS.: if you use the change interrupt instead of the rising one you can double your resolution at no cost

    • @YvanR0Y
      @YvanR0Y 6 років тому +2

      Great info, thanks for the insights from your experimenting.

    • @spwim
      @spwim 6 років тому +1

      @@YvanR0Y np! Good luck on your project?

    • @48Harmonica
      @48Harmonica 5 років тому +1

      @@spwim Hi. How can i contact with you? I need some help and i have some questions. halilsen.h@gmail.com

  • @ricklarson8459
    @ricklarson8459 3 роки тому

    Thanks. Still helpful in 2021!

  • @rhjiv4
    @rhjiv4 6 років тому +1

    Great tutorial - one of the best I have ever seen. In it you show a picture of several opto interruptors. The third one (on the right) looks like an ITR9606. Can you recommend this one or not? Are there others that you would recommend more highly?

  • @davidkennard2614
    @davidkennard2614 6 років тому

    Thank you very much. Robotics is fascinating and provides a vehicle for learning lots of different processes.I plan to automate my greenhouse to some extent and include remote monitoring of the parameters.

  • @kboo918077
    @kboo918077 6 років тому +3

    Thank you for the very good videos you make, they are very clear, very good work. I have a question, could you do a video that show an example of PID controller maybe with this kit? It could be very interesting to make a speed and another with a position controller. Thank you very much

  • @jlucasound
    @jlucasound 4 роки тому

    The opto-isolator can also be used with a "flag" (a single piece of metal or opaque plastic) as a "home" sensor.

  • @marwanshwaiki777
    @marwanshwaiki777 4 роки тому

    This is a great tutorial. thanks alot for your excellent way of presenting.

  • @ahmedabdulsamir932
    @ahmedabdulsamir932 4 роки тому

    I just watched this video and went ahead to download more. I'm planning to build something big with this as soon as Corona virus is over and shipping resumes. Thank you so much. I would love if you can put me through whenever I get hooked up on the way.

  • @BTSARMY-zi6ph
    @BTSARMY-zi6ph 3 роки тому

    Wow, that is so smart! Thank you for all the tips for my robot!

  • @theeasywayoutcampers6550
    @theeasywayoutcampers6550 4 роки тому

    Your a great teacher.

  • @jrareas
    @jrareas 4 роки тому

    you are incredible good at this. Thank you very much

  • @abd-elrahmanmohamed9839
    @abd-elrahmanmohamed9839 6 років тому

    Really great and full explained . Thanks a lot !

  • @Mystic0Dreamer
    @Mystic0Dreamer 6 років тому

    Absolutely fantastic instruction video. Very clear, to the point, with no unnecessary baloney. I'm definitely a fan. I'll be building one of these robots via these instructions to be sure. I eventually hope to build a far larger robot using the same basic principles. But building this little one to gain the experience is definitely the way to go. Thank you very much for making these video courses.

  • @pradeepsahoo7243
    @pradeepsahoo7243 7 років тому

    Really nice video! Having bought a similar chassis last month, I made a Mobile controlled robot car using a bluetooth HC-05 module, but I kept wondering what to do about those speed encoders to control the distance they travel or speed of the motors. Well, thanks to you, now I know. The explanation about the Interrupts was exceptionally good and will help me in building some more ambitious projects. I will surely check out your website as well.

    • @Dronebotworkshop
      @Dronebotworkshop  7 років тому +1

      Thank you for the nice comment, so glad I was able to help!

  • @mattjohnson2848
    @mattjohnson2848 7 років тому

    Awesome! This is the first time it's actually made sense to me. Thank you.

    • @Dronebotworkshop
      @Dronebotworkshop  7 років тому

      Glad I could help it make sense, you're welcome Matt. :)

  • @gersonfer
    @gersonfer 5 років тому

    very important basic concepts . Thank you

  • @ukwerna
    @ukwerna 5 років тому

    Thanks alot for all your videos! Seriously good stuff!

  • @stonynotdusty
    @stonynotdusty 4 роки тому

    Why do you use TimerOne library here but not when the motors are regulated in the final sketch?

  • @skronosp
    @skronosp 7 років тому

    That's awesome, looking forward to new projects! Thanks for your videos

  • @VolthausLabElectronics
    @VolthausLabElectronics 7 років тому

    Very good work sir. I've been wanting to learn this information for some time. Thank you very much.

  • @colinpowers5381
    @colinpowers5381 3 роки тому +1

    love your theme song!

  • @khajamohiddien9163
    @khajamohiddien9163 4 роки тому

    Great work sir, Loved it alot

  • @janu203
    @janu203 4 роки тому

    fantastic video!!
    Can u tell me a way to track speed/distance of my car in x-y direction on ground without using GPS or internet? Is there any sensor available to do that?

  • @johnmallet9928
    @johnmallet9928 2 роки тому

    Hi Bill
    I have found your lesson very helpful.
    Question - is there a way to display the RPM and Speed values on a OLED Display? John

  • @jothamlee6316
    @jothamlee6316 4 роки тому

    Such an informative video! Great. As for the basic optocoupler without any circuit boards; Can it still be used in the same way? I have those on hand and would prefer if i did not need to add an additional pulldown resistor.

  • @vacm1700
    @vacm1700 7 років тому

    Great project!
    Nice project to build in this season.

    • @Dronebotworkshop
      @Dronebotworkshop  7 років тому

      Glad you enjoyed it, let me know how your build turns out. Remember that you can get all the code on the website at dbot.ws/rbtcar

  • @message2prateek
    @message2prateek 6 років тому

    Nice video! How do you create these nice animations to explain concepts?

  • @UzunKamis
    @UzunKamis 3 роки тому

    Great video! I have learned alot today. Thank you.

  • @tharnaturalhistoryfossilmu5920
    @tharnaturalhistoryfossilmu5920 3 роки тому

    So nice lam learning so much love ❤️

  • @uciaok
    @uciaok 6 років тому +1

    I was thinking at the end when you demonstrate the control of 1 step. How much would’ve the wheel actually turn after the power’s being cut and how do we measure it and encounter the accuracy problem (if there’s any)?

  • @NielsLinneberg
    @NielsLinneberg 4 роки тому

    truly amazing and usefull video, thank you very much, enjoyed it all to then end! ... definitely worth a subcribe!

  • @viswanath7168
    @viswanath7168 4 роки тому

    Sir put video based on how to control the motor with pid with using of encoders

  • @dougmyers9522
    @dougmyers9522 2 роки тому

    Hello, I really like your videos, you do a great job. I have a question about the Speed Sensor. I set the sketch and hardware up just as you instructed running motor on 5 volts, it seemed to work fine until I changed the voltage to 3.3 volts to slow the motor down. The sketch RPM reads faster on 3.3 volts then on 5 volts. What are your thoughts? Keep up the great work!

  • @ShadowTodem
    @ShadowTodem 2 роки тому

    Thank you very much all the step by step explanation as a beginner I find them to be very useful. Nevertheless, when I first come into contact with the related subject I had the question of getting both motors to turn at the same speed so the car would go on a straight line. I did notice the demoed moves made the car goes the the left as your motor A has a slightly higher speed. But this can be significant if it is to run on some distance. Do you have ways to achieve the same speed for both motors to run on, since there are so many read outs?

  • @christosmal4653
    @christosmal4653 8 місяців тому

    Hi Bill . Could u mabe give me some guidelines to combine this project with ultrasonic sensor. I have try doing it but some how get stuck in code.