Control Large Gearmotors with PWM & Arduino

Тәжірибелік нұсқаулар және стиль

Pulse Width Modulation (PWM) is the ideal method of controlling large DC gearmotors, but driving these motors can often be challenging and expensive. Today I will show you an inexpensive and efficient H-Bridge motor controller - the Cytron MD10C.
I’ll also show you how raising the PWM frequency can make your motor controller design far more efficient.
Article with code:dronebotworkshop.com/dc-gearm...
More articles and tutorials: dronebotworkshop.com
Join the conversation on the forum: forum.dronebotworkshop.com
Subscribe to the newsletter and stay in touch:dronebotworkshop.com/subscribe/
We have used PWM to control small DC motors many times but what happens when you need to control a bigger motor? The L298N is the usual “go-to” motor controller but it doesn’t have the current capability to handle anything that draws over 3.5 amperes., so it won’t work with large motors.
Most large H-Bridge controllers are expensive, many cost as much or even more than the motor they are driving. But there are a few inexpensive options, and I’ve got a great one for you today.
The Cytron MD10C is a single-motor H-Bridge controller that can support motors that draw up to 13 amperes continuous, with peaks of up to 30 amperes! Amazingly this device is not only cheap, it also is so efficient that it doesn’t even require a heatsink to source those impressive current levels.
It is a very easy controller to use with an Arduino. I’ll show you how to hook it up as well as how to code for it. But it doesn’t stop there.
We’ll put our motor controller to the test and observe its performance. I will then “fine-tune” it to run a LOT more efficiently, and I’ll demonstrate its capabilities by driving a 10 Kg (22 lb) weight around the room!
We’ll then look at an improved Arduino design to control our DC gearmotors.
Here what we will cover in today's video:
00:00 - Introduction
03:04 - H-Bridge Design
04:57 - Cytron MD10C
08:03 - Arduino PWM Sketch
13:57 - Arduino PWM Test
18:25 - High Frequency PWM Test
23:11 - First Load Test
26:13 - Arduino High Frequency PWM Sketch & Test
If you haven’t subscribed to the KZread channel please do it so that you won’t miss anything.
Hope you enjoy the video!

Пікірлер: 303

  • @jlucasound
    @jlucasound4 жыл бұрын

    Love your videos. This particular one is close to my heart. Arduino, Robots, and the motor controller I just learned of. I think one of the best parts of your videos is your wiring diagrams. So easy to follow. Thank You, Sir! Interesting is the effect of different frequencies and that the Arduino can actually deliver them. What a difference in current draw. Batteries will last MUCH longer. Nice.

  • @joshuamadden2442
    @joshuamadden24423 жыл бұрын

    This video was so incredibly helpful. I especially liked those camera switches very professional. Thanks for all the effort you put into this will be watching and learning from all your videos.

  • @Inventor101
    @Inventor1015 жыл бұрын

    Amazing video and nice channel👍

  • @fabiolus2007
    @fabiolus20073 жыл бұрын

    I can't express enough how much I admire how well you explain details that are necessary to know.

  • @anthonyskilton8634

    @anthonyskilton8634

    3 жыл бұрын

    I agree, they're wonderful.

  • @hadireg
    @hadireg5 жыл бұрын

    Excellent ! I'm grateful to all the folks sharing so kindly their knowledge and on top of that with this high quality! Thank you sir!

  • @boxingfan5742
    @boxingfan57423 жыл бұрын

    I'm so glad I found you on KZread. I'm in my 50's and had to put my programming and robotics interests on the back burner for too many years to be able to recollect the technique specifics. You're a life saver; particularly as I'm trying to pivot in my career. Your tone, pace and thoroughness are perfect. I just can't overemphasize how grateful I am to find your channel and for what an outstanding job you do. ✌

  • @lucasrem1870

    @lucasrem1870

    2 жыл бұрын

    All he says is use mosfet transistors, they are faster. Programming these logic control board, i do suggest, use LEGO mindstorms first, before you start coding these. If your good enough, use his scripts!

  • @churnejii57

    @churnejii57

    Жыл бұрын

    anybody kno2 that motor spec ?

  • @tinkerpertao8383

    @tinkerpertao8383

    Жыл бұрын

    i think i found workbotshop about 2years ago. I would like to second your comment. Busy working & time goes by fast. I'm over half a century yrs old and still learning. Last, I would like to thank Mr. WorkBotShop a lot too.

  • @wishicouldarduino8880
    @wishicouldarduino88805 жыл бұрын

    I found a DC to pwm kit I also got the cytron I can't wait to see how they work cytron seems really neat

  • @harleywang
    @harleywang4 жыл бұрын

    Excellent course. That's the course I needed for motor driving. Thanks a lot!

  • @Tri_3st
    @Tri_3st5 жыл бұрын

    Thats awesome, i am looking forward too see your upcoming content! Really well produced video as always :)

  • @rusticagenerica
    @rusticagenerica5 жыл бұрын

    Your work area is of a medicaly cleanliness. Stunning job.

  • @kinsgabil5004
    @kinsgabil50044 жыл бұрын

    Love to watch and learn from you. I like the style you explain with demos and pics. Thank you

  • @newburypi
    @newburypi5 жыл бұрын

    Thanks DB. I'm looking forward to the robot series, and hoping it gives me the insentive to get my fellow rolling.

  • @MattyEngland
    @MattyEngland5 жыл бұрын

    Thks for all the hard work making these videos, it's really appreciated.

  • @infinytower3317
    @infinytower33175 жыл бұрын

    Super great news! I am just beginning to watch the video, but it must contain tons of great contents, as always! Thank you so much!

  • @alicegabriel1909
    @alicegabriel19094 жыл бұрын

    Great video ! I always learn something new any time I watch your video ,keep it up .

  • @antonetrinh8662
    @antonetrinh86624 жыл бұрын

    Sir, You are a wonderful teacher. Thank you.

  • @ThiefKingBakuraX
    @ThiefKingBakuraX5 жыл бұрын

    Quality content always

  • @noeviracochea431

    @noeviracochea431

    3 жыл бұрын

    where can i get the md10c (i'm from bolivia)

  • @patricioantonio4189
    @patricioantonio41895 жыл бұрын

    Excelente tutorial (como siempre). Felicitaciones y muchas gracias por sus enseñanzas.

  • @phil4110
    @phil41105 жыл бұрын

    Using a ramp with a change in slope by measured degrees would be a more accurate way to determine efficient torque versus frequency distortion. You'd need to secure that load and use higher traction wheels though. Great video and in depth knowledge. I'm completely new to this and I appreciate your simplified and detailed tutorials.

  • @victorinborsciov6817
    @victorinborsciov68174 жыл бұрын

    At last I found someone knowing what he is saying. Just for kicks I measured my Hitachi battery powered hand drill, starting current with no load reached peaks in the range10-15A, when loaded 30-35A. Good job!

  • @duncanmcgregor4973
    @duncanmcgregor49734 жыл бұрын

    Realy good video. And covering exactly what I wanted to know. Thanks.

  • @acadman4322
    @acadman43225 жыл бұрын

    AWESOME! This is great information. Thanks. And I have subscribed to the DBWS!

  • @lucamyot8443
    @lucamyot84434 жыл бұрын

    Thank you, I wish I could learn from everyone like I can learn from you. God bless you.

  • @VeryMuchBlessed
    @VeryMuchBlessed4 жыл бұрын

    Excellent! The comparison with the different frequencies was very cool. Thanks much. New subscriber here!

  • @sritamroy4430
    @sritamroy44304 жыл бұрын

    Great video ,a lot of information to know. Excellent teaching technique.Looking for more.Thank you Sir!

  • @ProGamer-kr5tn
    @ProGamer-kr5tn5 жыл бұрын

    I love your work setup!!

  • @caveratward6218
    @caveratward62185 жыл бұрын

    GREAT VIDEO. For a beginner myself I'am learning a lot. Thankyou

  • @TuanTran-xi4vs
    @TuanTran-xi4vs2 жыл бұрын

    Your lectures are so easy to understand. Thank you very much.

  • @pjwlk
    @pjwlk4 жыл бұрын

    Excellent video. I learned a few things - THANKS!

  • @sambarakat2
    @sambarakat24 жыл бұрын

    Hi, I just want to say thank you for this well-done video I build my watch kinetic charger using your setup,it works just fine and I'm really happy with it .thank you looking forward to build my next project, I love to share a video of my kinetic charger.

  • @MrManta2012
    @MrManta20124 жыл бұрын

    Your graphics really help your message, Thanks

  • @hfe1833
    @hfe18335 жыл бұрын

    Just in time , for my project, so inspiring

  • @toprudder1
    @toprudder13 жыл бұрын

    Excellent! Good illustrations, great video work, excellent information.

  • @dule1635
    @dule16353 жыл бұрын

    Thank you for your great lesson, Sir!

  • @calvinlee7915
    @calvinlee791511 ай бұрын

    Very nice workshop. Thanks so much for sharing!

  • @rjimene1
    @rjimene14 жыл бұрын

    excellent video, premium content, Thank you so much.

  • @ozgemmo3445
    @ozgemmo34454 жыл бұрын

    Hi Bill - simply brilliant video with excellent graphics etc! You have now prompted me to get into this very interesting area of controlling large gear-motors through an Arduino and will now duplicate your project! Just as an additional thought I think you could produce a graph for each motor (or pairs of) showing motor efficiency compared to PWM vs frequency and current draw. - would be very interesting to see graphically; please let me know what you think? Cheers & thanks from Down Under. PS: just signed up for your News Letter as well.

  • @ovidiurosu6632
    @ovidiurosu66325 жыл бұрын

    this is so good; thank you for this great video

  • @heinrichhelmbold419
    @heinrichhelmbold4194 жыл бұрын

    Your videos are absolutely incredible and really informative.... Thank you!! Any chance you could do this tutorial on the ESP 32 board still using the Cytron MD10C?

  • @crushboss
    @crushboss5 жыл бұрын

    Great video mate, keep up the good work.

  • @stalebreivik5945
    @stalebreivik59454 жыл бұрын

    Thanks for great videos, I'm in smart house mode at the moment, I would like to see some standalone zigbee or z-wave projects.

  • @kioapsytrance5594
    @kioapsytrance55943 жыл бұрын

    This was a really good video. Very interesting. Thank you :) You really have good videos :)

  • @scamper_van8470
    @scamper_van84703 жыл бұрын

    Well i'll bookmark that specific video and thank you for sharing both video and code.

  • @capistor1
    @capistor15 жыл бұрын

    Cant wait for the new videos. Love your videos

  • @edmondedwards6729
    @edmondedwards67294 жыл бұрын

    I need microsecond control of the pwm pins, so am glad to see this tutorial as I was thinking it was too slow, with the fastest speed of 1 millisecond. With this proposed modification, what is now the fastest switching time of the pwm pins in microseconds? Thanks for a great tutorial on the subject...

  • @jomango1929
    @jomango19295 жыл бұрын

    You are the best professor on KZread !

  • @NoahPeeters
    @NoahPeeters5 жыл бұрын

    Amazing informative video! Could you maybe make a video about the esp 32 module? I'm trying to figure out how it's Bluetooth and wifi work and how it can be connected to a smartphone. I would really appreciate it if you could make a video about it. Keep up the great work!

  • @LuisRivera-jk8jc
    @LuisRivera-jk8jc4 жыл бұрын

    All of your videos are excellent

  • @pecilijevelicanstveni4973
    @pecilijevelicanstveni49735 жыл бұрын

    Thank you sir! What a great job! I immediately subscribe to your list waiting fo new excited projects. Thank you again! I learned a lot from you. But, allow me to ask: in what application you made those wonderfull animations? I am planning to make some lessons and those animations are very, very usefull. Greetings!

  • @catchulater7483
    @catchulater7483 Жыл бұрын

    I know this video is over three years old. I keep referring back to it (thanks YT library) to remind me of the importance of clocking, for frequency. Thank you.

  • @guyd6
    @guyd64 жыл бұрын

    It's very interessting. Nice job. Bill.

  • @Yosemite_Sam
    @Yosemite_Sam2 жыл бұрын

    Interesting. 10 minute videos are an excellent idea to supplement your others. Cheers from OZ.

  • @OsoPolarClone
    @OsoPolarClone5 жыл бұрын

    I am a relatively new viewer to your channel. I am enjoying your teaching style, the articles, and your very informative web site. I am staying current with all of your new videos while going back and looking at older ones. Will you be combining the google ai voice hat with the robot? I noted the hat has the ability to control servos and immediately thought of the recent robot videos. Thanks for your efforts at producing excellent educational videos.

  • @PhG1961
    @PhG19615 жыл бұрын

    Waw more video ! Great ! Hmmm, building a robot for over 40 years... this sounds so familiar ! I go to sleep and wake up with it !

  • @Tamingshih
    @Tamingshih Жыл бұрын

    Great job! I am just in need of this solution.

  • @opalprestonshirley1700
    @opalprestonshirley17005 жыл бұрын

    Very nicely done. Most all of this I follow no problem. I would like to know how you determined the proper motor to use. Thanks for your hard work.

  • @AstrofishGames
    @AstrofishGames2 жыл бұрын

    Really great stuff! Would you say the reason for motor efficiency going down with frequency increase is due to the rise/fall time of the motors (inductive loads?) I guess you get to a point where your frequency starts capping off the amplitude due to BEMF etc.

  • @donaldwright2426
    @donaldwright24264 жыл бұрын

    Thanks, quite instructive!

  • @marctalcott5613
    @marctalcott56132 жыл бұрын

    Another awesome video. Thank you.

  • @808GT
    @808GT5 жыл бұрын

    EXCELLENT NEWS! MORE DRONEBOT WEEKLY!!!

  • @abualis1178
    @abualis11784 жыл бұрын

    Hello DroneBot, thank you for sharing all the knowledge and experiences with us, your classes are fantastic and well prepared and delivered. I have a question for you or the community if anyone can help with some advise, I want manage the direction of a 2 phase 220v motor with and Arduino, the motor has been removed from a winch, what kind of driver should I be using. Many thanks

  • @luisfernandomoncayomarulan1208
    @luisfernandomoncayomarulan12084 жыл бұрын

    I loved the camara changing at 1:12

  • @derekschwontz9072
    @derekschwontz90725 жыл бұрын

    Great tutorial

  • @unglaubichuberlieber8048
    @unglaubichuberlieber80483 жыл бұрын

    thanks for this very helpful+informative tutorial

  • @cecilialinck7778
    @cecilialinck77785 жыл бұрын

    Nice tutorial, could you post a schematic diagram of your final setup including the breadboard and how the shield connects to the lcd screen and Arduino? Maybe it's supposed to be self explanatory but I'm very new with electronics and am trying to test out a gearmotor hooked up to a power tool battery pack

  • @szmuchen
    @szmuchen5 жыл бұрын

    First of all, thank you so much for making this video. I was facing almost the exact same problem with the same motors. Could you please tell me what adapters you used for the bullet connectors on the motors? Thanks.

  • @T2D.SteveArcs
    @T2D.SteveArcs4 жыл бұрын

    just to let you know your sig gen can put out DC you could have used ch2 to generate 5V direction signal also there is a frequency counter built into the scope.. and should be a counter built into sig gen aswel

  • @myduffly
    @myduffly5 жыл бұрын

    Very nice stuff sir!

  • @soumitradey8208
    @soumitradey82085 жыл бұрын

    Thanks sir. This is great. Can you also see the BTS7960B Motor Driver 43A H-Bridge Drive PWM For Arduino

  • @omego23
    @omego235 жыл бұрын

    Great learning video sir. could you please make a video of h bridge operating two large motors. I am working on making controller for electric wheelchair for disabled. your suggestions about that will be warmly welcom. Thanks

  • @ukwerna
    @ukwerna5 жыл бұрын

    brilliant! The more the better..thanks

  • @600lester
    @600lester2 жыл бұрын

    Hi great video, love to see it with an encoder and PID

  • @walidoulondon8107
    @walidoulondon81075 жыл бұрын

    Great youtube channel I learned a lot from u Mr

  • @OsoPolarClone
    @OsoPolarClone5 жыл бұрын

    Great video!

  • @rolandramie5606
    @rolandramie56064 жыл бұрын

    nice job keep up the good work

  • @albertolostaunau9567
    @albertolostaunau95674 жыл бұрын

    AWESOME JOB!!!! Thanks!

  • @mohamedabd-alqawy6979
    @mohamedabd-alqawy69795 жыл бұрын

    Sir , again and continuously I am amazed by your demonstration . where I am from ! when A master teach some thing as your doing we have to kiss his hand for it. and with your case this is not enough case i knew how hard to put this videos together and the content it self thank you is not enough but my English fails me to give a proper word for you thank you Sir

  • @OsoPolarClone
    @OsoPolarClone5 жыл бұрын

    I am really looking forward to the robot series of videos as it’s an interest of mine. Where did you get the perforated angle?

  • @eldy938
    @eldy9385 жыл бұрын

    Subscribed, looking forward to seeing you build 3CPO...:) I'm doing a commercial design/build for a project, would you recommend the IMC413 over the Cytron 13A? I'm looking smooth low end torque with top speed comparable to fast paced walks, should I go with the 5201 or 5202 Motor serie ?

  • @drmosfet
    @drmosfet4 жыл бұрын

    Thanks great video, does increasing on the PWM frequency also increase RF noise from the circuit?

  • @kamauwainaina5782
    @kamauwainaina57823 жыл бұрын

    LOVE your work

  • @duriezalable
    @duriezalable2 жыл бұрын

    Superb Video, thank you so much. I like the fact that you’re working with an oscilloscope and the other equipment. I do have a question. Would motors or/and the HBridge Cytron would tolerate a change in direction at a rate of 100 ms for instance. I’m working on a self-balance robot and I’d like to know if it would be feasible with that kind of equipment. Once again, wow, great video and thanks. Ad

  • @peterashley6042
    @peterashley60425 жыл бұрын

    Excellent, again.

  • @electronic7979
    @electronic79795 жыл бұрын

    Useful video 👍

  • @rickhunt3183
    @rickhunt31835 жыл бұрын

    I would strongly consider using a preset 555 timer for duty cycle and frequency and a programmable frequency devider to drive the input of an h-bridge. This would of course be beyond the scope of just one video. I would suggest a series of videos carefully planned out with the just the information required to stay on the objective lasting only 10 or 12 minutes each. This would allow noobs the oppertunity to absorb the information without getting intimidated or overwhelmed by the magnitude of the information. It’s easer to remember 12 minutes of information than 35, and sitting through a 10 minute video 3 times is a lot more appealing than a 35 minute video 3 times. If someone is going to leave a dislike or a negative comment. They should at the very least be willing to offer a solution.

  • @mrbourdet
    @mrbourdet5 жыл бұрын

    Excellent! Thanks.

  • @eemhisolutions9287
    @eemhisolutions92874 жыл бұрын

    Great work

  • @ZookeeperJohnG
    @ZookeeperJohnG4 жыл бұрын

    Very clearly communicated :)

  • @MicheleHjorleifsson
    @MicheleHjorleifsson5 жыл бұрын

    Great stuff thank you

  • @bcarr3116
    @bcarr31163 жыл бұрын

    Great Video. ! But can substitute the motors for Stepper motors? Thank you so much for this channel.

  • @kvaliantis
    @kvaliantis3 жыл бұрын

    Thanks for the video. Can you please list all the test equipment you are using?

  • @DennisMurphey
    @DennisMurphey2 жыл бұрын

    Sounds like something i need to explore for my Model Train, I keep burning up diodes or drivers now with MOSFETs seems there is hope. Can we get them at the 20VDC range in smaller sizes? I am sharing with my team. Our Control Lead is from S.A. so it takes us some rotations of earth to close our knowledge loop. Thank You So Very Much, Dennis

  • @lamiae7430
    @lamiae74303 жыл бұрын

    Great job

  • @startcherif
    @startcherif3 жыл бұрын

    very nice video

  • @David_E-88
    @David_E-884 жыл бұрын

    Thank you. A very good and useful video. Could please tell me what is manufacturer number of the DC motor you used in the video?

  • @ntang4922
    @ntang4922 Жыл бұрын

    Great video! Do you also happen to have a video on the control of AC motors?

  • @erickduffis
    @erickduffis4 жыл бұрын

    Nice Job

  • @IgnacioAOlivar
    @IgnacioAOlivar4 жыл бұрын

    Great video! Question, it's nice to have a code to change the freq of pwm signals with arduino ide but you said that it can change, in no desirable way, functions like delay or tone, so, it´s possible to adjust the output frequency connecting a module or some components in pwm pin that we use? I'm thinking in a module similar to step down/step up dc to dc converters. Thanks a lot!!!!

  • @legpetruchka2124
    @legpetruchka21243 жыл бұрын

    Merci beaucoup pour cette vidéo et pour faire connaître le MD10C. Juste une question sir, As -t-on le même résultat avec des moteurs de 24 V dc à forts ampérages?

  • @T2D.SteveArcs
    @T2D.SteveArcs4 жыл бұрын

    You should check if the fluctuations are real and if they are maybe you should build a low pass PI filter for the power supply, The PWM looks to be interfering with the feedback of the power supply? good work thanks for vids they are very good

Келесі