Driving DC Motors with Microcontrollers

  Рет қаралды 595,183

DroneBot Workshop

DroneBot Workshop

Күн бұрын

How to use 7 different motor driver modules with an Arduino or any microcontroller. Hookup, code & demonstrations with motors big and small.
Article with code: dronebotworkshop.com/dc-motor...
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/
Today we will be working with lots of motor drivers and lots of motors!
You’ll see how there are actually three methods used among all of these drivers for controlling speed and direction. Because of this, it’s pretty easy to swap drivers and use a sketch for small motors to be used with much larger ones (or vice-versa).
I’ll be driving everything with a simple Arduino Uno today, but you could use any microcontroller to work with these motor drivers.
The code for all these motors is pretty simple, I’ll show it to you, and I’ll also introduce you to a few libraries that make coding for these motor drivers a breeze. We’ll also check out a motor driver library from Cytron that is a hidden gem, as it can be used with ANY of these drivers!
Here is the Table of Contents for today's video:
00:00 - Introduction
01:17 - DC Motor Driver Basics
08:05 - L298N Dual H-Bridge
16:13 - TB6612FNG Dual H-Bridge
25:24 - DRV8871 Single H-Bridge
31:08 - MX1508 Dual H-Bridge
38:54 - DBH-12 Dual H-Bridge
46:27 - IBT-2 Single H-Bridge
51:17 - MD25HV Single H-Bridge & Controller
1:02:27 - Conclusion
Hope you enjoy this, remember that the article on the DroneBot Workshop website has all the code I used today.

Пікірлер: 273
@Dronebotworkshop
@Dronebotworkshop 4 ай бұрын
Hi everyone - It's come to my attention that there has been someone masquerading as myself, responding to some comments here with a link to a Telegram chat to win a prize from me. THIS IS A SCAM, I am not holding a contest, nor do I have a Telegram account. PLEASE DO NOT RESPOND TO THESE MESSAGES!! It's happening on a lot of my videos, I'm taking steps to remove them manually, but as I have 162 videos, it will take some time. If you do run across a suspicious comment, I would appreciate you letting me know at info@dronebotworkshop.com. Thanks! Bill (The real one!)
@alejandroaguirre2355
@alejandroaguirre2355 2 ай бұрын
@Bill I was wondering if you have any info or videos on how to connect NEMA 23 steppers with Arduino Mega or Giga even a Uno. I have a few raspberry pies and I wanted to make a CNC controller but I can even install LinuxCNC so I thought I would try out Arduino excellent video by the way take care Bill
@mecanoman
@mecanoman Жыл бұрын
Just so you know the quality of the content here. This is waaaay better than the Automatization lab on my university at the Engineering faculty. Regards!
@dragon.fromindia3235
@dragon.fromindia3235 Жыл бұрын
Elon musk should start Google like companies
@alchemy1
@alchemy1 Жыл бұрын
That is because to these folks, it is a work of love. It is not a job they go to.
@ApteraEV2024
@ApteraEV2024 7 ай бұрын
​@@dragon.fromindia3235like, software?
@MrOnlineCoder
@MrOnlineCoder Жыл бұрын
That's exactly the video I needed. As always, highest quality. Thank you!
@AllTheNamesWereInUse
@AllTheNamesWereInUse Жыл бұрын
Great video! You can always expect the quality and information to be excellent when a new video pops up. Thanks for all the time and effort you put into these.
@TediumGenius
@TediumGenius Жыл бұрын
This is a FANTASTIC treatise in motor control options!!! With some excellent tips and the 98% speed warning!!! I can't get enough of your instruction! Well done as always!!!
@pixelsquarelight
@pixelsquarelight Жыл бұрын
Although I have watched many of your videos I rarely but I wanted to stop and thank you for the excellent content that you provide. I am highly appreciative of your presentational style you're calm demeanor and your thorough and useful explanations. There have been multiple times where your videos have helped me understand concepts well enough to implement them in my experiments and projects and this has enriched the quality of my life. I sincerely appreciate your efforts. Thank you
@tukituki127
@tukituki127 7 ай бұрын
I am currently a junior majoring in Computer Engineering. I can spend hours looking for specific information out there, and it drives me crazy. You bring all the essential knowledge in one video and with excellent structure and explanations. I cannot thank you enough for these kind of videos!
@xzs6ba0
@xzs6ba0 Жыл бұрын
Thank you very much... you have helped an 80 year Old Man to understand how his CNC motors work. Very much appreciated. Have a Great and Safe Day.
@p.g.pg38
@p.g.pg38 Жыл бұрын
Grand merci pour cet énorme travail de synthèse sur les drivers!
@alwedtechnology8589
@alwedtechnology8589 Жыл бұрын
I am Edgar from Kenya, Africa.. I don't have the words to thank you for turning my dreams into reality. May God Bless you Abundantly
@jasenchen3731
@jasenchen3731 Ай бұрын
good luck on your amazing journey
@sinjhguddu4974
@sinjhguddu4974 Жыл бұрын
Once more, thank you for this beautiful masterclass on controlling DC motors. Thoroughly enjoyed it. Do stay well.
@kajitis_1
@kajitis_1 Жыл бұрын
Fantastic introduction to the world of controling motors. Your vids are brilliant. Keep up the good work 👏
@braddixon3338
@braddixon3338 Жыл бұрын
Kind of a long video, but a ton of info was presented, all in a very detailed format as usual. Thanks for taking the time to put these together, folks really appreciate your efforts!
@JonathanDeWitt1988
@JonathanDeWitt1988 Жыл бұрын
Bill, I have watched many of your videos over the years. I have seen some of these motor drivers in those videos. But it is wonderful to have them all in one place compared to one another. It took me a few days to make it through this video. It is a great reference video that I am sure I will use over the years. Thank you for taking so much effort to create it. The quality is amazing. I really like those cytron boards. I especially liked the feature of it testing a motor without the microcontroller.
@dustyfisk1887
@dustyfisk1887 Жыл бұрын
This video and tutorial is absolutely amazing! Thank you so much for putting together this clear, concise, tutorial. So much easier to understand! Looking forward to watching all of your other videos!
@absinthe4breakfast299
@absinthe4breakfast299 Жыл бұрын
Fantastic video, it's just what I've been looking for. I've been building a 3d printed tank and I got stuck trying to figure out the electronics side of things, this video has been incredibly helpful and should allow me to move forward with the project.
@lorisrobots
@lorisrobots Жыл бұрын
Thanks for this great content! I always find your videos well researched and accessible. Please keep them coming!
@mizbot
@mizbot 7 ай бұрын
Love the effort you put in in your videos, I've come back to this video again and again as reference for the motor drivers. Appreciate your content a lot really helpful ❤️
@gpTeacher
@gpTeacher Жыл бұрын
Very informative and well-presented! Thank you!
@EsotericArctos
@EsotericArctos Жыл бұрын
H-Bridge devices have so many different applications. They can be looked at primarily as a motor controller but I also use a H Bridge to convert the digital signal out from an Arduino to DCC +-15V square wave for HO/OO scale model railways. Very versatile device.
@ernierasta
@ernierasta 7 ай бұрын
Thank you! Your videos are so pleasant to watch and easy to understand!
@bruinflight1
@bruinflight1 Жыл бұрын
EXCELLENT TOPIC! Thank you for sharing this knowledge, I've got some projects in mind that I'd love to apply this to.
@TYGAMatt
@TYGAMatt Жыл бұрын
Great work Bill. I'm using the TB6612FNG in my latest project but only driving one motor. But thanks to your vid I've just ordered a DRV8817 to replace it. Keep up the good work!
@rogueart7706
@rogueart7706 Жыл бұрын
Excellent video. I needed this as I’m building a CNC router. The drivers are the only thing I couldn’t quite grasp. Thanks a bunch
@erickbermudez8219
@erickbermudez8219 Жыл бұрын
You really know how to transfer knowledge! Great job, thanks for be so professional and provide excellent videos, very well explain and easy to follow.
@tungstikum
@tungstikum Жыл бұрын
Thank you for all your quality content
@TheUnofficialMaker
@TheUnofficialMaker Жыл бұрын
Very comprehensive as usual, thanks for your efforts. I always learn a lot from your well made experiments.
@andrewrevelee5097
@andrewrevelee5097 Жыл бұрын
Im just a hobbyist when it comes to electronics and have been slowing learning an self teaching myself for a few years know and even though I may know how to use h bridge controllers I still feel you can learn more about things by listening to others especially ones who are well versed or educated on the topic I just found this channel and subbed after the linear ps video because of how well you did in making a high quality informative video an because you don't drag on one thing forever explaining it you condense the important points with enough detail to get the message across then move on and that's why these videos I feel are packed full of information in a decent run time and can be watched with ease.
@johneagle4384
@johneagle4384 8 ай бұрын
Very comprehensive, very useful. Thank you very much!
@TheKirstebee
@TheKirstebee 23 күн бұрын
Thank you so much for this video - I have been trying to wrap my head around the different microcontrollers for dc motors and always ended up confused! Such clear explanations-as always 🙏 Love your work! ❤
@donaldkormos5529
@donaldkormos5529 Жыл бұрын
Super video on motor drivers!! All the best to you ...
@ausgewogen
@ausgewogen Жыл бұрын
Perfectly explained, the right speech speed and super diagrams.
@LeslieIsgrigg
@LeslieIsgrigg Жыл бұрын
👍 Very good course. Thanks again for your efforts.
@Graham1904
@Graham1904 9 ай бұрын
An awesome video for those people just started with DC motor controlling. Brilliant!!
@U8uxa8SP
@U8uxa8SP Жыл бұрын
Thanks for another wonderful video. I learned a lot.
@Mike.Kachar
@Mike.Kachar Жыл бұрын
Thank you very much for the videos you do!
@Kamal_Kalyan887
@Kamal_Kalyan887 Жыл бұрын
Thank you so much 💖 and I wish all the happiness be with you professor
@warrenking1815
@warrenking1815 7 ай бұрын
Great video, real good information presented in a clear and thoughtful manner!
@jackisgoofingoff5510
@jackisgoofingoff5510 7 ай бұрын
This is so detailed and useful, thanks.
@darkoprintshop9927
@darkoprintshop9927 Жыл бұрын
Another great video. These are so helpful. Thanks for putting them together. 🎉
@michaelkosciewicz1623
@michaelkosciewicz1623 Жыл бұрын
Phenomenon! i start with electrical machines, this semestr. Great thnx Bill:)
@Googolplex6
@Googolplex6 6 ай бұрын
Amazing video. I am a beginner but this video gave me the right answer were to start. Thanks!
@willlockler9433
@willlockler9433 Жыл бұрын
Great presentation as always! Cytron urc10 robot control board, which is UNO R3 and cytron 10/30 amp driver all on one board, is great project option. One power hookup and lots of pins.
@hammabuckshot5062
@hammabuckshot5062 Жыл бұрын
Yet another amazing video,this truly magnificent.keep up the good work ❤️❤️❤️
@petermolnar6017
@petermolnar6017 Жыл бұрын
Great as always! Thank you!
@Zeddify
@Zeddify Жыл бұрын
This channel deserves more recognition.
@chadizdroid
@chadizdroid Жыл бұрын
Thank you for another Great video, to complement this, I would follow up by showing how we can do current sensing on all, and also how to use an different types of motor encoders to demonstrate feedback control loop concepts.
@user-px3kp9eg8v
@user-px3kp9eg8v Ай бұрын
I couldn't find any like this. Thank you🎉
@79ober
@79ober Жыл бұрын
Hi Bill, great video! Thanks for trying out Cytron's MD25HV and happy that you like it.
@Eagle621
@Eagle621 5 ай бұрын
As an aircraft mechanic, A/P, with an Inspectors Authorization, IA, I’m just getting into this world…but I find your videos VERY informative and helpful. Thank you and I really appreciate your help in understanding in a way that I can develop my own projects. Cheers, new sub here👍
@rv10flyer84
@rv10flyer84 Ай бұрын
Nobody outside of Aviation cares about our credentials.
@Chloe_59
@Chloe_59 Жыл бұрын
Awesome! Thank you very much, you just released exactly the video I needed
@harryhino2267
@harryhino2267 Жыл бұрын
Great content as usual. Minor nit pick. Vbe is 0.7V for bipolar transistors; Vce(sat) is 0.3V. When using FETs, keep in mind that they cannot change from OFF to ON (or ON to OFF) instantaneously; there is a slew rate. When they are in this intermediate state, there is a voltage drop and a current flow; so they have to dissipate power as heat. It is nowhere near as bad as bipolar devices, but needs to be kept in mind when switching them very fast.
@Reach41
@Reach41 Жыл бұрын
Not to be ignored are the motor controller boards that communicate with the Arduino via I2C. They only require two of the precious IO pins to drive your robot’s motors, and the libraries available to control them take care of all the setup details. People new to the sport will be best off sticking with brands such as SparkFun or Adafruit, and picking motors from the same places that they indicate are compatible with the board you choose.
@luisrueda6459
@luisrueda6459 8 ай бұрын
HB
@TrillChords
@TrillChords Жыл бұрын
Nice variety in coverage. Bless 🙏
@GiC7
@GiC7 7 ай бұрын
Master, I love the pr.oject. thanks
@q12x
@q12x Жыл бұрын
Very good tutorial ! Thank you !
@yucynthia644
@yucynthia644 Жыл бұрын
Thanks! Very detailed and comprehensive!!!
@JochenRoth
@JochenRoth 3 ай бұрын
Thank you for this very interesting video and workshop! Best regards from Germany!
@joshuaoduroadu5376
@joshuaoduroadu5376 Жыл бұрын
Thanks Bill for another excellent 👍👌 video.
@munjee2
@munjee2 Жыл бұрын
The 5v logic input on the l298 also acts as a ~5v supply actually, which is pretty useful to supply μC's without built-in voltage regulator
@MitzpatrickFitzsimmons
@MitzpatrickFitzsimmons Жыл бұрын
I just rceived my motors for my remote controlled lawnmower project yesterday... and today this video! Coincedence or Syncronicity? Either way... thanks Bill!
@tobi9648
@tobi9648 10 ай бұрын
such a great video. exactly what I needed. Thank you very much!!
@ms.informed
@ms.informed 11 ай бұрын
This is a godsend, exactly what I need for my next wannabe project, if I stop procrastinating, that is.
@waynefilkins8394
@waynefilkins8394 7 ай бұрын
Great video, helped a TON with my project. Sadly I already ordered 5 of the L298N, but I got them super cheap so went ahead and ordered the ones I need, the TB6612FNG. Problem with the first one is that huge heatsink, and I only need 12v so 2nd one was perfect.
@chouseification
@chouseification Жыл бұрын
Another great video!
@usefulelectronics
@usefulelectronics Жыл бұрын
This is all in one motor driver tutorial! I didn’t not know about some of these drivers. Thank you for the amazing comparison! Keep it up !
@Jeovanivm
@Jeovanivm 11 ай бұрын
Thanks so much, I am from Brazil and I can understand you very well,
@lesthompson5907
@lesthompson5907 4 ай бұрын
that was very revelling & did infect answer a questions or tow i have still have to get in to wring the set up. And loop for the ono but at lest now i may have a drivers to handle the job thank you a lot once has figured out how to put it together on my lath.
@amirajpal6382
@amirajpal6382 Жыл бұрын
Great explanation in your video. Very Professional.
@Matt2chee
@Matt2chee Жыл бұрын
That helped, considering I started in industrial when MG set's were still commonly in use. The current rating is amazing in some of these small packages.
@donodono2287
@donodono2287 Жыл бұрын
Wish we'd been taught this stuff at school. Absolutely essential now!
@ronaldmorrison2765
@ronaldmorrison2765 Жыл бұрын
Me too but microcontrollers and H bridges weren't popular in the classroom 55 years ago.
@wodzimierzkeska2380
@wodzimierzkeska2380 Жыл бұрын
Perfect presentation!
@mahmoodmohammad7241
@mahmoodmohammad7241 Жыл бұрын
Great Tutorial, Thanks
@sciacabale
@sciacabale Жыл бұрын
This is a very well conceived and instructive tutorial. However, the most versatile motor controller I know of was left out. This is Basic Micro's ROBOCLAW. It comes in different sizes but the most common is the Roboclaw 2x7 capable of driving two motors drawing up to 7 Amp each. This controller has the ability of processing signal coming from motor encoders and controlling the motor's speed via a PID (Proportional, Integral, Derivative) feedback loop.
@ladiran
@ladiran Жыл бұрын
Great tutorial. It will be appreciated if a display showing the motor speed could also be included. Thanks, again, for the tutorial
@ingodering9649
@ingodering9649 Жыл бұрын
Many thanks for perfect explanation ☺️
@DingusGoesWest
@DingusGoesWest Жыл бұрын
Great video, very valuable information!
@oljobo
@oljobo Жыл бұрын
👍😃 Fantastic video! Thank You‼️
@diogenesofSinope87
@diogenesofSinope87 Жыл бұрын
Absolutely fantastic content thank you!
@paramtrx9558
@paramtrx9558 Жыл бұрын
Thx again for a great video!
@juliojoseruizolivo4697
@juliojoseruizolivo4697 7 ай бұрын
Very helpful, keep doing this videos!
@eduardprivat9821
@eduardprivat9821 8 ай бұрын
thx. amazing presentation
@jlucasound
@jlucasound Жыл бұрын
😲 You forgot to say "Wipers" @ 50:24. 😄 I so love your videos! Your illustrations, diagrams and tutorials are the BEST! And I mean that. I'm still keeping my L298Ns. I'll use a wall wart on a project with no wheels. A Pinball Machine!! 🤣 Thank You, Sir!
@0dbm
@0dbm Ай бұрын
Excellent, love your video I been seeing all these dc driver cicuit , no one has said there are 3 different types of cicuit
@duinobox6991
@duinobox6991 Жыл бұрын
Parabéns! bem explicado! aprendi muito
@billmckillip1561
@billmckillip1561 Жыл бұрын
great video!
@j.b.9474
@j.b.9474 Жыл бұрын
Would love to see video on motors with position feedback.
@jamesbevan9989
@jamesbevan9989 Жыл бұрын
Great video
@ranna.
@ranna. Жыл бұрын
Nice tutorial
@rich4239
@rich4239 Жыл бұрын
excellent work!!! thanks for your outstanding presentation...your consistent, clear outline for your videos makes them superior to any other source. You were the first source for my arduino learning process and as my level of understanding grows...you seem to be there with a video on the topic. I am a noob trying to control 12v powerwheels toy with my 80v lawn mower battery...needing to get the voltage down to 12-18v...from your explanation, an h-bridge does not seem to work...or am I missing something...is there a standard way to control lower voltage, lower cost dc motors with a much bigger voltage source...thanks again
@cornjulio4033
@cornjulio4033 Жыл бұрын
Cool video ! Also, at 46:00 that's a nice power supply, it reacts super fast.
@eneleich373
@eneleich373 7 ай бұрын
Very usefully, thanks a lot
@ramybrahim3188
@ramybrahim3188 7 ай бұрын
thank you from Morocco
@millbean13
@millbean13 6 ай бұрын
Very informative content. I enjoy it. lol, this guy is interesting. I don’t think I’ve ever heard someone pronounce the arbitrary names of any circuit board so many times. I don’t think he skipped a single time saying the entire name of board when talking about them. Very funny. Most people would shorten them or only refer to a small portion of the name. Interesting guy.
@crazytronics9917
@crazytronics9917 Жыл бұрын
Please make video on FOC and how we can use it for position controlling of BLDC motor. 👍
@stefanguiton
@stefanguiton Жыл бұрын
Would be great to see this
@TheMarshallFan
@TheMarshallFan Жыл бұрын
Electronoobs has a video on FOC PMSM control, but I'd like to see Bill's take on the topic as well.
@Ducerobot
@Ducerobot Жыл бұрын
Another good one!😁👍🤖
@Hey_Steve
@Hey_Steve 9 ай бұрын
Please do a video on driving 3 phase dc motors found in old computer printers so we can all repurpose them :) love your content!
@DavidTLutz
@DavidTLutz Жыл бұрын
Great video!!!
@pman1902
@pman1902 Жыл бұрын
very good video. thank you!
@JBernhard72
@JBernhard72 Жыл бұрын
Just to add ... if you try to 'roll our own' H-bridge, timing of the 'switches' is important! It is VERY easy to momentarily short out to ground and release the magic smoke!
Experimental Feedback Circuit for Compass Magnet Motor
9:59
Magnetic Propulsion
Рет қаралды 17
Arduino 🤖 in 200 Secondi
3:22
Alberto Canu
Рет қаралды 23
Please be kind🙏
00:34
ISSEI / いっせい
Рет қаралды 55 МЛН
В ДЕТСТВЕ СТРОИШЬ ДОМ ПОД СТОЛОМ
00:17
SIDELNIKOVVV
Рет қаралды 3,9 МЛН
Which one is the best? #katebrush #shorts
00:12
Kate Brush
Рет қаралды 21 МЛН
Sabertooth 2x32 dual motor controller + invacare tdx sp motor
0:40
Kelowna Robotics
Рет қаралды 15 М.
Motor Driver in depth | H-Bridge | L293D, L298N, TB6612FNG, VNH2SP30
12:50
Brushless 4 click | a 3 phase sensorless BLDC motor driver
1:35
MikroElektronika
Рет қаралды 45 М.
Let's build a voltage multiplier!
16:32
Ben Eater
Рет қаралды 1,9 МЛН
What is Inside a Canister Ignition Coil
5:14
Ben Mekanik
Рет қаралды 1,4 М.
What is an H-Bridge?
6:29
CircuitBread
Рет қаралды 11 М.
Brushless Motor - How they work BLDC ESC PWM
16:12
The Engineering Mindset
Рет қаралды 4,4 МЛН
Build a Custom Servo Motor with a DC Motor
42:08
DroneBot Workshop
Рет қаралды 124 М.
Parents' Breakfast Rescue Mission for Laptops
0:28
123 GO! CHALLENGE
Рет қаралды 32 МЛН
Try this 🤣  #funny #trending
0:14
Dung ABC
Рет қаралды 27 МЛН
Adhemz Sigma 55
0:27
Adhemz
Рет қаралды 18 МЛН
СМОТРИ КУДА СТАВИШЬ НОГИ
0:11
KINO KAIF
Рет қаралды 8 МЛН