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

Поділитися
Вставка
  • Опубліковано 25 лис 2024

КОМЕНТАРІ •

  • @bikingcat-l2f
    @bikingcat-l2f День тому

    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 3 місяці тому +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.

  • @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 3 місяці тому +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.

  • @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 🤣

  • @banglarif
    @banglarif 3 місяці тому

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

  • @eliyahumedia
    @eliyahumedia Місяць тому

    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 ❤

  • @christiane321
    @christiane321 3 місяці тому

    Really Really GOOD tutorial! Mahalo 💮

  • @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 3 місяці тому

    Muito bom ! Ótimo projeto.

  • @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

  • @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.

  • @sampamnl.8964
    @sampamnl.8964 4 місяці тому

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

  • @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

  • @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..😮??

  • @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

  • @noisytech13
    @noisytech13 Місяць тому

    Where can I get the program 😢

  • @meiowalot7570
    @meiowalot7570 4 місяці тому

    Yes!!!!

  • @donaldspade975
    @donaldspade975 3 місяці тому

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

  • @umerkhan7595
    @umerkhan7595 Місяць тому

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

  • @moneytosh
    @moneytosh 2 місяці тому

    can you please share the code of this?

  • @dr.saurabhipatkar5441
    @dr.saurabhipatkar5441 3 місяці тому

    Exactly what version of the arduino software is this

  • @chadzulu4328
    @chadzulu4328 4 місяці тому

    "There's trickery afoot" 🤣🤣🤣

  • @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!

  • @ALBINOxRHINO713
    @ALBINOxRHINO713 3 місяці тому

    i need a woman like this in my life

  • @srinivasreddypabbathireddy8489
    @srinivasreddypabbathireddy8489 6 днів тому

    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? 😂😂😂😂 🎉🎉