Control DC Motors with Arduino and Joystick - Step-by-Step Guide

Поделиться
HTML-код
  • Опубликовано: 27 ноя 2024

Комментарии • 46

  • @bikingcat-l2f
    @bikingcat-l2f 3 дня назад

    One of the absolute best Arduino tutorial creators out there. So engaging and clear. Thank you for explaining so well. I'm glad I came across your channel randomly.

  • @mianfazlerazik3636
    @mianfazlerazik3636 4 месяца назад +5

    This woman deserves all the appreciation there is out there

  • @Reach41
    @Reach41 4 месяца назад +3

    Hi Rachel! I use those motors and wheels for small mobile robot projects, and they’re pretty hard to beat without spending a whole lot more money. For a few dollars more, these motors can be purchased with Hall effect encoders, and the Arduino Uno has interrupt pins to read them. Having encoders opens up the possibility of very accurate (in Arduino terms) closed-loop position and speed control of the motors, but at the expense of more hair-pulling in software development.
    I have just a couple comments on the hardware in this video. First of all, the motors can be run at higher than the rated voltage. I run mine at 9.6 volts, and have run them at 12 volts DC. The trick is to limit the maximum PWM signal, reducing the 0-255 in your code down to something like 0-120. This is relatively advanced stuff where the builder has to ensure that the stall current of the motors doesn’t exceed the current rating of the motor driver board. I mention it only because finding information on the topic can be a challenge of its own. So this is just to say, “Yes, you can do it.”
    The wheels that come with the motors are designed to be pushed onto the motor shafts, and are retained by the interference fit. Over time, the hubs of the wheels will crack, though, and no amount of gluing will provide a permanent repair. What has worked for me is a healthy tie wrap snugged down on each hub before using them for the first time. I haven’t had a failure since using the method.
    Next point concerns the joystick used. Those things can be purchased from a lot of different sources, but regardless of brand name I suspect that most are made by the same company. They are inexpensive, making them very valuable to the hobbyist, but they shouldn’t be considered to be precision devices - they aren’t. Knowing that going in can save the user some headaches in trying to figure out why his or her robot doesn’t behave very well under joystick control. There are better ones that are both a lot larger and a lot more expensive, but the cheap ones can be made to work well enough (and precisely when using encoders). Writing software that accommodates noisy and/or inaccurate sensors is what separates roboticists from garden variety programmers anyway, and it’s probably the biggest challenge.

  • @danielrizzi1153
    @danielrizzi1153 2 дня назад

    Def put the joy back in the stick. Thank you for the lesson

  • @Reach41
    @Reach41 4 месяца назад

    I forgot to say what a great video this was! So much information, and all in one place. Thank you for the effort in producing it.

  • @damianbutterworth2434
    @damianbutterworth2434 4 месяца назад +2

    WOW Rachel I`ve just made a Arduino Smart Alternator tester using 2 variable switches going from 0-1023. It makes a 12 volt square wave to tell the alternator whether to charge or not. Low duty cycle means less voltage output and a full duty cycle means full voltage. 12.5 to 15.5 volts I found. I used to work in a factory to fixed Alternators and they paid £200 for the same bit of kit.

  • @boltvalley3076
    @boltvalley3076 4 месяца назад +1

    I hope you had a nice sleep. Thank you for sharing it. At first this chip H-brige was a nightmare, over time you were a live saver whole been in tech worlds. What are recommendations to have the best grasp to have sense of humour and fun like you did.
    Lastly, what frame of minds helped you to have great mentors whom solve all your questions when you so what improved everyday.
    Level of support you got from your own neat workshop that make you be pretty wise and expressive of joy to teach make you smile in camera.

  • @banglarif
    @banglarif 4 месяца назад

    Just marvelous. I just love your tutorials. Specially millis().

  • @shannonwilliams9744
    @shannonwilliams9744 4 месяца назад

    LOve your channel and very pretty instructor plus I started watching cause your hands show you do actual work

    • @RachelDeBarrosLive
      @RachelDeBarrosLive  4 месяца назад

      Very true! No aspirations to become a hand model any time soon 🤣

  • @eliyahumedia
    @eliyahumedia 2 месяца назад

    Love you videos! Thank you! Would it be possible to do a lesson on OLED screens? And maybe include how to control a menu using a joystick and button? So far, I haven't been able to find a good resource for that.

  • @Programming-Fun-With-Hima
    @Programming-Fun-With-Hima 3 месяца назад

    You're doing a great job ❤

  • @RemyAngelle
    @RemyAngelle Час назад

    Hello! I am using this code for an underwater ROV project. So i watched the video and used those same motors just for testing. The only difference is that i am using a MEGA because i need to add another motor to control depth. I'm gonna change the motors to 12V and run 12V into the motor controller, but right now I am testing code. My issue is i hear the motors humming, but they are not moving. I already checked code and wiring and i cant seem to find an issue troubleshooting? would you mind giving me some advice on what you think is going on? Thanks!

  • @rickard486
    @rickard486 День назад

    Thank you!!!

  • @christiane321
    @christiane321 4 месяца назад

    Really Really GOOD tutorial! Mahalo 💮

  • @PK-mb5kp
    @PK-mb5kp Месяц назад

    can the circuit in this episode be used in some way to create a proportional control for 120v winch. Thanks for your great videos

  • @MichaelHagberg
    @MichaelHagberg 4 месяца назад

    I do like your videos. Just a suggestion on variable names. INApin to MOTAenable, IN1pin to MOTAcw or MOTAforward etc.

  • @jesseservice7828
    @jesseservice7828 4 месяца назад

    Muito bom ! Ótimo projeto.

  • @strandum67
    @strandum67 4 месяца назад

    Sweet 😍love that code :)

    • @RachelDeBarrosLive
      @RachelDeBarrosLive  4 месяца назад +1

      I'll have it up on my website shortly. I'll post the link in the description.

  • @sergioojendiz9311
    @sergioojendiz9311 Месяц назад

    great video. I wonder if u can help me to write a code for 5 dc motor for my old arm robot that has 5 dc motor, I will probably use 3 l298n and 3 joystick. thank you and have a great day

  • @sampamnl.8964
    @sampamnl.8964 4 месяца назад

    ขอบคุณมากครับ❤❤❤

  • @noisytech13
    @noisytech13 2 месяца назад

    Where can I get the program 😢

  • @Perfectflight-i3f
    @Perfectflight-i3f 4 месяца назад

    So cool ❤

    • @RachelDeBarrosLive
      @RachelDeBarrosLive  4 месяца назад

      Thanks! Let me know if there's any topic you'd like to see me cover.

  • @TIMETRAVELSF2AND3
    @TIMETRAVELSF2AND3 3 месяца назад

    Are u from Bangladesh..😮??

  • @meiowalot7570
    @meiowalot7570 4 месяца назад

    Yes!!!!

  • @siddhantpanjikar5541
    @siddhantpanjikar5541 Месяц назад

    i tried this code, the x & y values are fetched from joystick but after if statement motors are not driving, i checked all the connections, 12v battery supply for motor driver, changed 3 motor driver, tried on arduino nano plus nano shield and then on uno. but still not working. can you please help me

  • @donaldspade975
    @donaldspade975 3 месяца назад

    Is there a place to download the code for this project?

  • @chadzulu4328
    @chadzulu4328 4 месяца назад

    "There's trickery afoot" 🤣🤣🤣

  • @umerkhan7595
    @umerkhan7595 Месяц назад

    Hi. Where i get code file? Please write code in description.

  • @ALBINOxRHINO713
    @ALBINOxRHINO713 3 месяца назад

    i need a woman like this in my life

  • @dr.saurabhipatkar5441
    @dr.saurabhipatkar5441 3 месяца назад

    Exactly what version of the arduino software is this

  • @moneytosh
    @moneytosh 2 месяца назад

    can you please share the code of this?

  • @EngRMP
    @EngRMP 4 месяца назад

    Hmmmm.... I wonder how you get the car to turn slightly WHILE it's going forward. I don't think your code will do that, will it?

    • @RachelDeBarrosLive
      @RachelDeBarrosLive  4 месяца назад +1

      It won't do it as written, but it could be modified so that while the joystick is within a range of 505-700 along the X axis (turning left), the right wheel could turn more quickly than the left. This would cause a more gentle left turn.
      An interesting idea for me to try out next time!

  • @srinivasreddypabbathireddy8489
    @srinivasreddypabbathireddy8489 9 дней назад

    Is it i possible to pin the code in the comment

  • @naeemhaq3504
    @naeemhaq3504 4 месяца назад

    Nice way of teaching but improvement is required

  • @gl8512
    @gl8512 4 месяца назад

    70 is the new 0

    • @RachelDeBarrosLive
      @RachelDeBarrosLive  4 месяца назад

      So true! In my first attempt I used 0 but the wheels were too sluggish.

  • @DBB-KE5DUO
    @DBB-KE5DUO 4 месяца назад

    You covered the evil genie code... but where's the fast & furious wheelie popping and bridge jumping code? 😂😂😂😂 🎉🎉