How to control a DC motor with L298N driver and Arduino Uno

แชร์
ฝัง
  • เผยแพร่เมื่อ 2 พ.ย. 2020
  • Welcome to the L298N Arduino tutorial. In this video, we are going to learn how to control a DC motor using an Arduino board. We are going to use a small and inexpensive module that features the L298N motor driver chip.
    🛒 Arduino Uno ▶ educ8s.tv/part/ArduinoUno
    🛒 L298N Driver ▶ educ8s.tv/part/L298N
    🛒 2 DC Motors ▶ educ8s.tv/part/DCmotors
    🛒 Battery Holder ▶ educ8s.tv/part/5AAHolder
    🛒 Wires ▶ educ8s.tv/part/Wires
    💻 Code & Parts: educ8s.tv/control-dc-motor-l2...
    Want to learn to program?
    👨‍💻 Check my new TH-cam channel: bit.ly/3tku2n0
    🎮 My Android Game: bit.ly/QuizOfKnowledge
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 73

  • @georgekot6377
    @georgekot6377 3 ปีที่แล้ว +7

    Short and to the point. Always a good combination. Μπράβο φίλε Νικόλα.

  • @prov_s195
    @prov_s195 3 ปีที่แล้ว

    OMG the best tutorial EVER about l298n!!!!

  • @piconano
    @piconano 3 ปีที่แล้ว +3

    Yay...My favorite Greek is back with a new vidoe!

  • @Jonker95
    @Jonker95 ปีที่แล้ว

    Extremely helpful! Thank you! the gem of the stop code made my project a succes

  • @amdameerbasha854
    @amdameerbasha854 2 ปีที่แล้ว +2

    Bro I am from India I can clearly understand that what u r explaining thanks for uploading this video ❤️

  • @user-rk7on8jp7l
    @user-rk7on8jp7l 2 ปีที่แล้ว

    THAAAAAAAAAAAANK YOU SO MUCH!!!! I finally could use DC mortor with this video!! THANK YOU!

  • @samfeigenbaum5207
    @samfeigenbaum5207 ปีที่แล้ว

    Extremely helpful! Thank you!

  • @rlb5261
    @rlb5261 3 ปีที่แล้ว +2

    The best explanation anyone can find about how to use DC motors+ Arduino and L298N!!!!!

    • @Educ8s
      @Educ8s  3 ปีที่แล้ว

      Thanks for the awesome comment! How is your OpenMV robot going ?

    • @rlb5261
      @rlb5261 3 ปีที่แล้ว

      @@Educ8s I am working on it, my plan is to make the track (use a line following code) but I will put in the track also some Apriltags and then program different behaviors for the robot , the reason for that is the the camera has to be with an angle of 45 degrees, I wanted to train a network with tensorflow lite but the 45 degree constrain is a limitation for that. I really admire what you do.

  • @hirdayjeet
    @hirdayjeet 2 ปีที่แล้ว +2

    Thankyou sir , keep growing 👐🏼

  • @SlimeyDev
    @SlimeyDev 2 ปีที่แล้ว

    thanks a lot, i was looking for this!

  • @avejst
    @avejst 3 ปีที่แล้ว +4

    Great project
    If the 5V regulater is a LDO, then the power supply for the motor HAVE to be 6V or more
    If the 5V regulater is a 7805, then the power supply for the motor HAVE to be 8V or more
    Thanks for sharing :-)

  • @aadhithyabelkishridhara5075
    @aadhithyabelkishridhara5075 2 ปีที่แล้ว +1

    nice work bro and i learnt a lot of pretty other stuff and by the way love from INDIA

  • @RustysAdventures
    @RustysAdventures ปีที่แล้ว

    I've watched dozens of videos these few days. And this one worked for me. Thanks.

    • @Educ8s
      @Educ8s  ปีที่แล้ว

      I am glad it works!

  • @sujathaveeranala7208
    @sujathaveeranala7208 10 หลายเดือนก่อน

    Thank You very much now I can complete my project for science fair now

  • @DogRox
    @DogRox 3 ปีที่แล้ว +2

    Nice work!! Good to see you back!! :-)

    • @Educ8s
      @Educ8s  3 ปีที่แล้ว

      Hey, thanks! It is nice to see you around again! Stay safe!

    • @pravinchavhan8890
      @pravinchavhan8890 2 ปีที่แล้ว

      @@Educ8s
      hi , i tried to controll my motor with L298N and arduino nano , but my motor was not running . why it happened cause i checked the pins and program was also correct according with pin . but it doesn't work Can you help me please

  • @juliuscaesar5001
    @juliuscaesar5001 10 หลายเดือนก่อน

    this is so informative ,thanks alot

  • @unglaubichuberlieber8048
    @unglaubichuberlieber8048 ปีที่แล้ว

    danke for your enlighting video, just one question: could i use the your approach on a vnh2sp30 or vnh5019 ???

  • @kingnexa7257
    @kingnexa7257 หลายเดือนก่อน

    Great video! Well explained

  • @benorhancan
    @benorhancan 5 หลายเดือนก่อน

    You are perfect!

  • @kamenopixel
    @kamenopixel 3 ปีที่แล้ว

    Πολυ καλώς. Συνεχισε έτσι

  • @MIHAI0410
    @MIHAI0410 3 ปีที่แล้ว +1

    Hello Sir.
    I like everything about this video. You doing well.
    Canyou please give a solution
    In this regard?
    I am intrested how to change polarity of one coil with a speed of more than 100 per second.
    I want to do a replica for magnetic train " Maglev ".
    Thanks in advance👍

  • @nguyenthikimdung8016
    @nguyenthikimdung8016 2 ปีที่แล้ว

    thank you video very good I like
    I will use code it and I develop it so as to make robot following program

  • @ytsai5076
    @ytsai5076 หลายเดือนก่อน

    Good job!

  • @coder-c6961
    @coder-c6961 7 หลายเดือนก่อน

    Can you do this with 4 wheels?

  • @furkanbugraduzler5067
    @furkanbugraduzler5067 2 ปีที่แล้ว

    First of all, thank you for this video. But I couldn't understand this. You said that if the motor controller has a 5-12V power input, the 5V pin works as output and provides 5V. But then you said that you connect the Vin port of the Arduino with the 5V port of the motor driver and the Arduino is fed with 7.5V. In this case, if I am not mistaken, there is 5V on the Vin pin of the Arduino, and this will negatively affect the operation of the Arduino in the long run? Am I right?

  • @HENROCable
    @HENROCable 2 ปีที่แล้ว

    This is good Detailed Info.So How can I control 4 Dc motors With This Process?

  • @anurag-mn2pe
    @anurag-mn2pe 6 หลายเดือนก่อน

    Keep it up🎉

  • @electronic7979
    @electronic7979 3 ปีที่แล้ว +1

    Very good

  • @opreese
    @opreese 3 ปีที่แล้ว

    Looking forward to control hi amp dc motors such as 10 amps or more

  • @user-kc1ef6ii4w
    @user-kc1ef6ii4w 3 หลายเดือนก่อน

    excellent...

  • @nabilandadamslaboratory3422
    @nabilandadamslaboratory3422 3 ปีที่แล้ว

    Why are you removing the jumper between the enable pin and 5v? You can just drive the logic inputs with PWM signals. The way you're doing it saves a pin per motor, on the offset of only needing 1 PWM pin per motor.

  • @emadabuhagag222
    @emadabuhagag222 11 หลายเดือนก่อน

    thank you

  • @yousocy
    @yousocy 2 ปีที่แล้ว

    Thank you maaan

  • @peterm.4026
    @peterm.4026 3 ปีที่แล้ว

    Thank you! If I'm understanding this correctly, you are using your batteries to power the motor through the 12v+ pin and then outputting 5v through the 5v+ pin to power the arduino. Is it possible to plug in the arduino through the barrel connector and then use the 5v pin on the arduino to plug into the 12v+ pin on the motor and have the motor powered that way?

    • @Educ8s
      @Educ8s  3 ปีที่แล้ว

      No you can't.

  • @thaopham2510
    @thaopham2510 ปีที่แล้ว

    Sir, I don't know why in mode max step, the motor will turn 4 rounds. Can u explain it? thank you so much

  • @stanimatorblue
    @stanimatorblue 10 หลายเดือนก่อน

    Tinkercad doesn’t have the L298N. It only has the h bridge and possibly other components used in the L298N. How do you build a L298N in Tinkercad that will support the code you provided for Arduino?

  • @undeniableparadox7458
    @undeniableparadox7458 ปีที่แล้ว

    Would this work with 4AAs? I can’t get mine to work.

  • @flumzeeRBLX
    @flumzeeRBLX 5 หลายเดือนก่อน

    I'm using a 6v battery holder, and everything works okay, but when I try to make the motor rotate backward, (in1 = low voltage; in2 = high voltage), the motor just doesn't rotate. Any reasons this might not be working? I did everything correctly in the tutorial. (Edit: This only happens on the output1 and 2 on the L298N, not output 3 and 4)

  • @abolfazlamini98
    @abolfazlamini98 5 หลายเดือนก่อน

    If i use 14 V batterie it can damage my 6 volt dc motors??? But I don’t want use the high speed, the half speed is enough

  • @Mcflury_132
    @Mcflury_132 2 ปีที่แล้ว

    Can i do this with a relay?

  • @noorsyafiqkahbintirosli8001
    @noorsyafiqkahbintirosli8001 4 หลายเดือนก่อน

    Why the wheels still can move even the usb cable did connect with laptop? I mean how you make it wireless?

  • @nurulwahida3172
    @nurulwahida3172 4 หลายเดือนก่อน

    There is a problem when i compiling the coding in arduino... May i know why is that happened as i already followed the steps so may be the error lied on my coding and way to compile it?

  • @FromFame
    @FromFame 2 ปีที่แล้ว

    The parts linked aren't working?

  • @chibini1531
    @chibini1531 3 ปีที่แล้ว

    Great tutorial; for next one put encoders on the wheels.

    • @Educ8s
      @Educ8s  3 ปีที่แล้ว

      Noted!

  • @ShahadSami-pr9oe
    @ShahadSami-pr9oe 26 วันที่ผ่านมา

    can have a fall script please after add second montor ?

  • @nmooshka_301
    @nmooshka_301 2 ปีที่แล้ว

    How do I connect a switch to it ?

  • @MikevomMars
    @MikevomMars 3 ปีที่แล้ว

    VIN pin requires 6-20V but you are powering it with 5V only. Will this cause any side effects?

    • @Educ8s
      @Educ8s  3 ปีที่แล้ว

      I am entering 7.5 V

  • @t.k.r1913
    @t.k.r1913 ปีที่แล้ว

    I have three motors how to connect

  • @sitiafiahsitiafiah8653
    @sitiafiahsitiafiah8653 6 หลายเดือนก่อน

    Then what should I put in void loop

    • @Educ8s
      @Educ8s  6 หลายเดือนก่อน

      The thing that you want to repeat for ever.

  • @argshadow64
    @argshadow64 ปีที่แล้ว

    what about a setup with 4 motors?

    • @Educ8s
      @Educ8s  ปีที่แล้ว

      Use two modules

  • @xcinemeztutorial8961
    @xcinemeztutorial8961 2 ปีที่แล้ว +2

    My one motor is running but other motor is not running please help me it's very important to me

    • @pratheesha8168
      @pratheesha8168 5 หลายเดือนก่อน

      am facing the same problem now. did u figure it out?

    • @combogaming8302
      @combogaming8302 หลายเดือนก่อน

      Me too

  • @shohagaktaruzzaman2763
    @shohagaktaruzzaman2763 3 ปีที่แล้ว

    Sir what can we do using c language? Is it use to make for calculation or any other work? sir pls give your email address for any other information.

    • @aadhithyabelkishridhara5075
      @aadhithyabelkishridhara5075 2 ปีที่แล้ว

      i dont have much idea but if you are intrested in robotics you can learn c++ its more easier to code in it

  • @amirjono7517
    @amirjono7517 3 ปีที่แล้ว

    Can i get the coding?

    • @Educ8s
      @Educ8s  3 ปีที่แล้ว

      Check the video description.

  • @Educ8s
    @Educ8s  2 ปีที่แล้ว +2

    I hope you took away lots from this video. Let me know below!
    PS. Do you like quiz games? Check my popular FREE Android quiz game here: bit.ly/QuizOfKnowledge