Arduino DC Motor Control Tutorial - L298N | H-Bridge | PWM | Robot Car
Вставка
- Опубліковано 2 сер 2024
- howtomechatronics.com/tutoria... ► Find more details, circuit schematics and source codes on my official website.
In this Arduino Tutorial we will learn how to control DC motors using Arduino. We well take a look at some basic techniques for controlling DC motors and make two example through which we will learn how to control DC motors using the L298N driver and the Arduino board.
If you enjoy and find the content that I make useful, please consider supporting me on Patreon: / howtomechatronics
Parts list (check website article for full list, affiliate links):
Amazon.com:
L298N Driver: amzn.to/2KwGM0o
12V High Torque DC Motor: amzn.to/2HoYuUe
Arduino Board: amzn.to/2Ccd5kC
Banggood.com:
L298N Driver: bit.ly/3c7tOY4
12V High Torque DC Motor: bit.ly/39eup8s
Arduino Board: bit.ly/2YioMjH
Visit HowToMechatronics.com for more Tutorials, Tips, Projects and How It Works videos:
► howtomechatronics.com/
Like my page on Facebook:
► / howtomechatronics
I hope you enjoyed this video and learned something new! If you'd like to support me making more content like this, please consider supporting me on Patreon: www.patreon.com/howtomechatronics
dc brush or
bl?
@howtomechatronics Please what software or program did you use in creating the electrical connection animation?
where the code at?
Who cares about your voice bro, it's your brain we come here for. This is the best tutorial on H bridge and arduion I have ever run across, thank you for making it.
Glad you found it helpful, cheers!
This is kind of amazing, I was able to follow this video as a non engineer because of some video tutorials on youtube and how well this was presented. Seriously, thank you.
Thank you for including the written article for this video!! Both resources are clear and easy to follow.
Thanks dude for such amazing tutorial the quality of the content that you have provided to us is very much helpfull.
Keep sharing your knowledge!!
All of your videos deserve lot of superlative adjectives. Extremely good quality project and your explanation of theory and the Arduino sketch were precise and clear. May I suggest you do a self balancing two wheel "robot" project and cover PID in detail ?
Dude amazing video. Good quality tutorial
This is a very informative video, I have just starting learning with my own arduino starter kit, this helps to explain a few things. Cheers buddy.
Perfect. Explained very well, and clearly. Straight to the point as well. Fantastic video all round really. Thank you.
Great, and the schematics and illustrations are perfrect
Loved this tutorial! Thnx for explanations
Very informative..
🔥 fire really loved ur project
凄いなーー〜
見た目がかっこいい!
Very well explained.The schematics and illustrations are perfrect. Fantastic video
Great video! Very detailed and concise. Thank you.
I like this in-depth review dude, you're awesome!
Very good tutorial. I am working on version with NodeMCU and plan to use Blynk for controlling it over the internet. I get a lot of good information from this video. Thank you !
Thanks, I'm glad you found it useful!
This is so cool! All you need now is one more, then you can add weapons and fight them! 😜🤣
@David Pacák burn.
@David Pacák ussr anthem in background😂🔥
Thanks for another great tutorial vid. Keep up the great work.
very nice video. specially for novice. explains every details
Outstanding write up! Thanks for sharing your skills and thills
Thank you!
Thanks for the video it was helpful. No need to add potentiometer or buttons. Isolating everything makes it faster to undersand.
always good in explanation. Thank you for sharing knowledge
You make things real easy, great video.
Thank you for your clear tutorial.
The most well explained video so far that i found! thanks for showing the better understanding how to connect this driver to arduino. I am planning to do an 8 motor of ROV on my own. My question is how can we connect this motor driver if i should be using 4 piece of them? since 1 piece of driver is use for a pair of motor
would this kind of connection work if i add a routine loop coding and remove the joystick.
Of course. You can do that. You can even do things like use the sonar sensor to "look" for an obstruction, then program it to back up, turn, and move again.
Hi there! I was just wondering what the purpose of the 10k ohm resistor in the diagram at 1:09 in the video
Best electronic UA-cam channel
Great video. Can you link a parts list and where you bought the parts from? I know you didnt mention a diode but I am assuming that is necessary? Also is the MOSFET a separate component? Or is it included with the L298N ? Sorry if these are beginner questions. I am new to this
Very detailed demo of the project 👍
Great tutorial. Thank you! Can be added collision sensor switch module to last project ( L298N+Joystick)?
Thank you to you for taking the time to put together a video to help others online with their robotics projects. There are some mistakes though...ena, in1, in2, should be outputs. Button should be an input. The resistor should be on the positive side of the or on the 5v wire or the pin 4 wire, this is to protect the circuit. You don't necessarily rotDirection in your code, you can change directions without this.
Could you please make a tutorial on how to transmit data over the powerline using the
KQ-130F Power Line Carrier Module?
It would be very nice.
very well explained you have my thanks
May I know, what kind of software you used to draw the L298N + Motor + Arduino Board on the presentation slides, Would you let me know ? Thanks.
Well, how can I control a DC motor and a Servo motor at the same time? Would L298N control both of them at the same time or would I need two L298Ns for that? Or is there a better way to do that ? :)
Thanks for the video!
how are you powering the arduino? is it using the batteries? and when you upload the code to the arduino board does it store it?
That was very well done.
Great lessons. Thank you.
Always nice explain,,,
waiting for your new videos..
awesome video ... subscribed. good luck man.
This is a well done video!
You are the best arduino teacher
I need your help!
I want the adruino to read input from an accelerometer or any other angle tilting sensor and thus changes the direction of rotation of dc motor.
Is it possible and is there any code related to this?
This is so sick! I want an arduino so bad omg
awesome video. thank u very much
Don't change the rotation direction suddenly, you will damage the motor. You should reduce the speed to zero, delay for a bit to let the motor stop and then accelerate in the opposite direction.
I have one similar project but with a 5v motor and a 5v power suply, how can I connect the power suply to both arduino and motor and leds, cause if I conect via USB and it runs slow
Luis Pires have you found an answer to that problem? I’m trying to figure out the same thing
Valeu um Link e uma inscriçao, Parabens pelo video
Great video and explanation!
Outstanding ..... Thank you for sharing
Hi! congratulations for the tutorial👍🏻 I wanted to ask for help ... I would like to use the bts7960 43a driver to manage two powerful engines. you could change the code with these drivers! I would be very grateful to you 👍🏻 Thank you so much 👍🏻👍🏻
which programme did you use to draw the circuit diagram?
Great video. Thank you!
Hello
1) How do you think the code will be changed? if 1 motor uses to control left-right and 1 motor uses to move forward -backward?
2) do you think the code was without backward left and backward right situation?
GOOD JOB!
I'm sorry that I can't support you but i have to tell that you would deserve more for these videos.
This is so useful, thank you so so much!
Glad it was helpful!
I want to control 4 gear motors with this method ... will it work on 3 li-ion cells?
Is there a way to have continuous loop motion, as for a linear actuator motor to go back and forth by itself? Do you just take away VOID loop out of the code?
is it works If i use 12V battery and attach two 6v dc motor? please explain why?
Te hago una consulta.. que motores me recomendas de 12 o 24 v para mover un equipo de 40 kg de peso distribuido en 4 ruedas
Is it important for making Arduino car with out remote
Hi can v use ardunio uno board used before.and how to change or remove the code pls inform
@howtomechatronics Please what software or program did you use in creating the electrical connection animation?
Awesome tutorial! 👏 Are you italian?
You just rescued me ❤️
Hi, may I know what type of power supply did you use for arduino?
Great Video thanks a lot .. We really really appreciated .. keep going
How did you attack the wheels to the motors?
Wow, excellent tutorial !!!! thanks :) :) :)
Hi! I am searching for ideas on how to control my two brushed 500W 24v motors independently. The idea is like in this video, but I need it for my boats two outboards, so I could control them in the way you control two combustion outboards. I found Cytron two-channel 30A controller, but I can't find any wired or RC slider which could cover full speed range both directions and stay in its position without holding it (RC). Thanks.
Hi, its possible to conect L298n direct to output PWM from RX flysky ?
Excellent
Amazing video....helped me for my school spy bot project. Wanted to control the motors using DTMF successfully done... But there is a mistake: 5:27 set the pinmode for the in1 and in2 as input. it should be output
Yes
muy bueno gracias por compartir el código,,vídeo sin código es lo mismo que nada. Thanks for sharing.
hi. what kind of mosfet did you use?
great tutorial!
thanks
Thanks for this instructional & educational video! May I check with you... could I use a normal disposable 9V battery instead to power up 2 smaller DC motors each rated about 4-6V?
If they are rated 6V you cannot use 9V, you might burn them.
a standard 9V battery has a capacity of about 500 mAh. This battery will be empty after 2 or 3 hour of use even with small motors. If you would like to use them anyway you need a DC-DCstep-down voltage-regulator to reduce the voltage down to 6V
Thank this videos..so mus...
Can you please tell me how to give spring or suspension mechanism to the wheels?
Question. Besides the L298N driver max 2 ampere. Wich type of Arduino board are you using or do you advise using in your DC motor control ?
The "Uno R3"
The "Mega 2560"
or
The Arduino NAno 33 i/o
Are there Alternatives to using batteries for delivering the power supply to the Driver?
What if I use 1.5A motor woth l293d ?
Congratulations for 50k subscriber. When you will you make a IOT base project ???
I'm currently work on IOT based project do you collabe with me please comment nd give me your e-mail address.
fantastic
nice video sir ...very neatly explained
Yeah, I agree!
Круто !!!
50 000 subscribers
Great video, thanks. I am setting up the car for my kid´s science class - if I am using 6 v circuit, all coding should be the same? Thanks!!
Can i use more than 2 Motors? With the L298N?
On my l298n although I have set the jumper and given 7.4v to the pin marked as "+12v" it doesn't work. Even the power light doesn't light up. Then I supplied 7.4v to the other pin marked as "+5v". Then the power light was on and it worked. But when I connected a motor and connected it to arduino the current supplied to the motor was very low even the motor didn't run sometimes. As a result I gave 5v to the +5v pin and another 7.4v to +12v pin and then the motor worked fine. But the problem I have is that same thing happens when I remove the jumper. What should I do? Set the jumper or remove it?
What wheels did you use?
I want to use a foot motor from a vacuum cleaner, can I use this same setup using a 120v DC motor? If so, what type of battery should I use to power up a 120v?
thank you sir
can we connect 3 DC motors to L298 and connect it to Arduino?
What connections and code are changed pls help me
no code will get changed. Just change the board by going into tool
Would there be dead-time distortion problem?
Good explinetion