Arduino Motor Control and PWM Signal with L298N H-bridge Motor Driver

Поделиться
HTML-код
  • Опубликовано: 2 окт 2024
  • In this tutorial we will learn how to use the L298N H-Bridge Motor Controller. We will control the dual DC motor with using the PWM Signals via L298N. This allows you to control the speed and direction of two DC motors, or control one bipolar stepper motor with ease.
    2019 Banggood 11.11 Glaobal Shopping Festival 🤩 👉 bit.ly/2Cx7Nz6
    Required Hardware:
    Arduino Board :
    goo.gl/Rqc5w2
    amzn.to/2LZr6t4
    L298N H-Bridge :
    goo.gl/Ucvx6J
    amzn.to/3diatT1
    DC Motor Wheel:
    goo.gl/iDy7ep
    amzn.to/3djj9Zp
    F to F Jumper :
    goo.gl/TdGrkk
    amzn.to/3waMuOd
    M to M Jumper :
    goo.gl/VRzUN4
    amzn.to/3waMuOd
    Recommended Items:
    Use Your Muscles in Project - amzn.to/3wdL45C
    37 Sensor & Module Packages - amzn.to/3m66WeQ
    Try this Robot Arm - amzn.to/3fq8DCl
    Best Resin 3D Printer - amzn.to/39tY8KB
    Arduino Compatible Kits - bit.ly/2J2AFF7
    Banggood Spring Sale - bit.ly/3slMbOn
    Download Source Code: create.arduino...
    Social Media:
    / mertarduino
    / mertarduino

Комментарии • 293

  • @maker101io
    @maker101io  3 года назад +1

    Source Code: create.arduino.cc/editor/mertarduinotech/7ce04954-82e2-48ea-87ee-26f530c3fcf0/preview
    Recommended Items:
    Use Your Muscles in Project - amzn.to/3wdL45C​
    37 Sensor & Module Packages - amzn.to/3m66WeQ​
    Try this Robot Arm - amzn.to/3fq8DCl​
    Best Resin 3D Printer - amzn.to/39tY8KB​
    Arduino Compatible Kits - bit.ly/2J2AFF7​
    Banggood Spring Sale - bit.ly/3slMbOn

    • @enejjarimehdi7305
      @enejjarimehdi7305 3 месяца назад

      what is the name of arduino simulator that you used?

    • @RomualdHinz
      @RomualdHinz 19 дней назад

      0:54 ​@@enejjarimehdi73050:54 🎉❤😂😂😂😂😂

  • @michaelspahn3675
    @michaelspahn3675 3 года назад +6

    This is the best tutorial for the simple use of this H-Bridge I have found. Very well done, without crazy music and even without a spoken text. Nice!

  • @oOcitizenOo
    @oOcitizenOo 5 лет назад

    What i really like in your videos is that you show lots of details regarding the topic whilst many other makers just covers basics without giving a brief explanation of how everything works

  • @KogoGaming
    @KogoGaming 4 года назад +2

    If you are unable to change the speed of the motors via the analogWrite code with the arduino, it's probably because your ENA or ENB is connected to a non PWM pin on the arduino. The PWM pins are the ones with a squiggle next to the number, like 11,10,9..ect. So ENA and ENB must be connected to a number on the arduino uno that has a squiggle.

  • @thomasalexander1563
    @thomasalexander1563 7 лет назад

    I'm waiting for L298N motor driver tutorial,,
    And today got it..
    Really clear explanation..
    I agree, make more L298N tutorial,,
    How to add more, 9 volt battery not really fast, battery drain fast,,
    If use adaptor 9 volt the speed is really different..
    How about add with serial battery configuration..
    Is that twice faster ??

    • @thomasalexander1563
      @thomasalexander1563 7 лет назад +1

      Okay thank you for your advice,,
      Keep make more videos..

  • @darryltaylor7890
    @darryltaylor7890 Год назад

    Fantastic video...simple, informative. Many thanks!

  • @kenchurchill6019
    @kenchurchill6019 7 лет назад +2

    Thank you for such a well made film.

  • @dannyyeoh2340
    @dannyyeoh2340 6 лет назад

    As for the quick sapping power from the 9V battery. Try using a lipo battery 7.4V 1300mAh to power the motor and Arduino instead.

  • @my-jorney
    @my-jorney 2 года назад

    Nice music and well tutorial)

  • @grahamtech
    @grahamtech 7 лет назад +7

    u have the best tutorials sir =)

    • @grahamtech
      @grahamtech 7 лет назад

      so mert i have a very big question is there any way possible that you could make a tutorial on controlling worm gear motors/torque motors or dc motors to move to a certain degree essentially like a servo ,home made servo sort of speak using dc motors with the l298n module ,im working on an exo skeleton project in wich i need to learn how to position my motors via joystick analog if you know how to do this then i will be so happy xD lol

  • @amvnerds5879
    @amvnerds5879 7 лет назад

    Awesome job!! Biggest fan here :)..Can you do a video on a UNO motor shield for 4 motors.

  • @Techonlineunboxing
    @Techonlineunboxing 5 лет назад +1

    Use mobile phone battery of two it will do the work and connect it in series connection

  • @md.rabiulislam5190
    @md.rabiulislam5190 6 лет назад +1

    Thanks, I learn from this video...

  • @muhammadawais1487
    @muhammadawais1487 4 года назад

    very well explained bro...thank you very much

  • @toothless22
    @toothless22 5 лет назад

    amazing tutorial good teacher!

  • @seenivasaneee759
    @seenivasaneee759 7 лет назад

    Great explanation about L298N I can't find more detailed version other than this..:) Thank you...Is there any way to control speed using RF 434 MHz module?

  • @joachimschmitz2782
    @joachimschmitz2782 3 года назад +1

    Hello,
    Joachim is my Name.
    in your Video i have found a Mistake it begin in second 0:44 the Picture what comes from the H-Bridge
    is wrong the 12 V input and 5 V output are exchanged , in your Video your Explanation is Right but the Picture NOT
    and i only looked at your Picture and Killed my L298H please change it that Nobody more Kill his H-Bridge.
    Big Thanks for the Tutorial. Top

  • @ngoclinh5609
    @ngoclinh5609 4 года назад

    Very good, thank you !

  • @shrutiambre3065
    @shrutiambre3065 7 лет назад

    This was a very informative video and I finally got the darn thing. Thank you very much! +1 subscribe

  • @pavi-rv1mp
    @pavi-rv1mp 3 года назад

    Many many thanks

  • @freemanfreed1581
    @freemanfreed1581 5 лет назад

    first @0:59,what is the difference between the power supply pin and the 5V power pin on the driver ? does it mean we use the 5 V output when we have no separate power supply for the controller arduino ?? second when you changed the pins @6:11-6:13 , should't you changed the connection also on the arduino ?? why don't you just change the HIGH and LOW status of the pin instead ??

  • @Arona_Learning
    @Arona_Learning 2 года назад

    If we don't remove jumpers and we use analoWrite(IN1 or any pin, 150 or any speed) then the motor speed is controlled without jumpers and we can use 6v battery to power and no need for 9V

  • @jonyjohan8958
    @jonyjohan8958 5 лет назад

    Best tutorial

  • @ych7064
    @ych7064 5 лет назад +4

    The diagram at 0:44 (top right of video), there seems to be an error in the locations of "+12V Power" and "+5V power" - there are swapped.

    • @philippeclair4017
      @philippeclair4017 4 года назад

      I own this module, I confirm this diagram is wrong, +12V and +5V are swapped. Thank You Mr Chor Hon Yong, You save my day ! I found this diagram in several places of the net, and I was about to use it to wire my project.

  • @francescolillo6034
    @francescolillo6034 7 лет назад +4

    +Mert Arduino and Tech Hi, I used an l298n , 2 dc motor like yours and a 9v battery(new), but it does not function, even using your code....can you help me??thanks!!

  • @ayushsinha7416
    @ayushsinha7416 4 года назад

    Solved my problem 👍👍

  • @193
    @193 4 года назад

    Can you power the arduino itself with the same battery used for the driver? So if I were to connect a bluetooth module i wouldnt need the power from the pc and could power the arduino without being connected to the pc?

  • @febochestbox5507
    @febochestbox5507 3 года назад

    Can we show a sample wiring for 24V power supply to drive the 2 24V DC motors, assuming 9V power supply from battery to power Arduino to include a breadboard.

  • @GaryMcKinnonUFO
    @GaryMcKinnonUFO 5 лет назад

    I've been trying this for hours today and when i connect the Uno ground to the ground of the h-bridge, or take it off a breadboard rail, i get current that's very high, it even shows 26mA when voltage is at zero (i'm using a DC bench PSU at 12V). I've tried it using other ground pins on the Uno but no joy, i've checked everything multiple times, what could cause high current like that ?

  • @mrdspgaming4663
    @mrdspgaming4663 5 лет назад +2

    You doing a nice job and put the video to make a wall follower robot........😊😊😊😊

  • @panzioma
    @panzioma 2 года назад

    MAAAAN PLEASE!!!.....
    How to control the brushless motor that has 3 wires instead of 2? with such L298N
    What differencies in program of controlling such a motor? How to wire up the whole setup?...

  • @paranjaychaudhary1655
    @paranjaychaudhary1655 5 лет назад

    THANKS SO MUCH!!!

  • @srikanth5832
    @srikanth5832 5 лет назад

    Very nice.

  • @ayushsinha7416
    @ayushsinha7416 4 года назад

    Thanks 😊😘😘

  • @abhishekgoel9465
    @abhishekgoel9465 5 лет назад +2

    sir i'll connect 6 dc motor in l298n motor drive it is working or not ????

  • @pvsmouli7727
    @pvsmouli7727 5 лет назад

    Thanks dude u clarified my doubt about enable pin
    does anyone know about the syntax of the enable pin in python because i am using raspbery pi
    for controlling my motors

  • @2496rama
    @2496rama 6 лет назад

    if I dont want to use a 9 Volt adapter, would a battery of greater value works well for a 7Volt motor?
    and how can i determine the appropriate battery (Power Supply) to my motors?

  • @narendrakajla77
    @narendrakajla77 4 года назад +1

    hey...what is the software u r using for showing us the connections... from 2.15 to 2.50 around u r using a software ... what is the name for this one???😃😃

  • @barbarasalinas9094
    @barbarasalinas9094 6 лет назад

    Thank you :) :) :)

  • @Essaycom
    @Essaycom 2 года назад

    I did exactly what you did but my motors are not working , Servo motor is working but bo motor is not working . Please help .

  • @ujjvalverma6169
    @ujjvalverma6169 7 лет назад +6

    thanx sir your tutorials are my favourite

  • @wannersolares-4582
    @wannersolares-4582 7 лет назад

    can you do the same thing but with the other h bridge

  • @vijaymane8993
    @vijaymane8993 6 лет назад +3

    Thanx for this great tutorial sir, still can I vary speed automatically instead of adjusting output bits of arduino everytime?

  • @innovationdad2398
    @innovationdad2398 7 лет назад

    thanks

  • @קליןפיירלה
    @קליןפיירלה 3 года назад

    i have a problem, the motor is going very very slowly even dou i gave him 255 on speed . even if i give just high and without the pwm its still going very very slow can you hekp me please?

  • @technicalinventors8313
    @technicalinventors8313 6 лет назад

    Bro thanku very much

  • @abdullahmemon6908
    @abdullahmemon6908 3 года назад

    Schematic kelie konsa software use kia?

  • @robertodindri6414
    @robertodindri6414 6 лет назад

    Excelent !

  • @jaykadu8745
    @jaykadu8745 5 лет назад +1

    hello i am setting up speed of 60 for both motors but one motor is speedy and other motor is slow ?? what is the reason behind this??

  • @RiBurek
    @RiBurek 7 лет назад +4

    This is just what I needed! Thanks! Can you do line following maze sloving robot maybe? Where the robots follows the line and finds the closest path in the second run using "left hand on the wall" rule?

    • @boowonder888
      @boowonder888 7 лет назад

      Hi, I'm new to Arduino but I have made some project work. I like motor projects, so I want to buy either this motor driver board or the other on you can stick on your Arduino, L28. Which one should I buy do you think?

  • @nirveshnava1920
    @nirveshnava1920 7 лет назад

    Hi...I have done the clap light project...followed all as in the tutorial....but when i turn on the 240v switch , it light ups even before i clap.....do i need to supply the arduino with 9v battery?

  • @charliebenton9391
    @charliebenton9391 6 лет назад

    How much voltage can L298N motor driver withstand ? Because, i want to use two 9V batteries to control four motors using one module. I've used L293D driver module for the same purpose of controlling four motors using two 9V batteries. But, the battery drains quickly and the module gets warmer. Using L298N can solve my problem or not ? Help please....

  •  5 лет назад +1

    thanks, this is useful. But I can´t control the motors for slow rotation... it starts making noise with values around 55. But for a robot it rotates too fast. Any ideas?

  • @dhivyas7618
    @dhivyas7618 6 лет назад

    I'm having arduino nano instead of arduino uno....So what are the connections ??

  • @kunalpatil3700
    @kunalpatil3700 7 лет назад +1

    Hey mate, which software did you use to layout the circuit ??...that you showed in the video....plzzzz replay mate.

    • @kvlpnd
      @kvlpnd 7 лет назад

      How To? Search for Fritzing

  • @narendrareddy8420
    @narendrareddy8420 3 года назад

    Which tool or software was used to draw the schematics?

  • @md.nadimhossainkhan4393
    @md.nadimhossainkhan4393 7 лет назад

    Arduino + L298n H Bridge Driver = Low Voltage Output
    plz give me the solution........

  • @mangaart3366
    @mangaart3366 5 лет назад +2

    Thank you so much! It's hard to find tutorial like this. Keep up the good work!

  • @ido3211
    @ido3211 7 лет назад +1

    You should really stop showing these "please subscribe" and "like & share" messages while the video still goes on. Out them in the end and beginning'. Putting them In the middle of the video just lowers the will of people to like and subscribe.

  • @vincentpanaligan139
    @vincentpanaligan139 5 лет назад

    FOR POOR BATTERY PROBLEM, use two (2) 9v Battery and create parallel circuit with it. This method will make your battery last very long. Thank me later ☺

  • @cirog.9341
    @cirog.9341 5 лет назад

    Can anybody help me? I want to connect an acs712 current sensor module (connected to arduino) with a motor dc that is connected to L298N. How do I go about doing that? I don't know which one should I connect with the IP+ and IP- on ACS712 to get a reading for the current passing through the motor. Thank you

  • @sahilsoni626
    @sahilsoni626 7 лет назад

    can you make a Arduino assistant which intract with speech and it can reply for some questions.

  • @ilhamrahmatmuharam8501
    @ilhamrahmatmuharam8501 4 года назад

    Can i use this driver for control servo ?

  • @mahdeenafis6937
    @mahdeenafis6937 6 лет назад

    i tried this but only one motor works but the other does not??i have checked theconnections and they seem to be alright.

  • @marilynstuart1546
    @marilynstuart1546 6 лет назад +1

    your source code does not display on the website shown

  • @MrHomyachek
    @MrHomyachek 5 лет назад

    How to connect the scanner engine to play hired music like on the floppotron RUclips channel?

  • @rosidimdzain3467
    @rosidimdzain3467 3 года назад

    I have followed this method one by one from beginning to end .... but when I want to run the motor it does not move. I tested with a multimeter incoming current 12v dc on the motor driver L298n ... but the output on the motor driver 0.00v dc .. confuse..

  • @ashutoshkadu1346
    @ashutoshkadu1346 4 года назад

    can we control the speed and direction using LabVIEW software

  • @vamshikrishna_vk1341
    @vamshikrishna_vk1341 4 года назад

    bro what about 5v pin....??should it be connected to arduino 5v pin...

  • @lupulalbastru8117
    @lupulalbastru8117 7 лет назад

    Hi,
    I have something like this with some driver and some motors, but my robot doesn't go straight.
    Why my robot doesn't go straight? How I can do my robot to go straight?

  • @riseoftech4k332
    @riseoftech4k332 7 лет назад

    I think you shouldn't be afraid to talk in your videos

  • @geoffreyomana3877
    @geoffreyomana3877 5 лет назад

    Do you have codes for line tracing robot using infared sensors?

  • @ysl989
    @ysl989 2 года назад

    What would happen if there is no battery involved, I would just connect 5v from arduino to the dc motor?

  • @innovationdad2398
    @innovationdad2398 7 лет назад

    sir make a obstacle avoidence robot with l298n please please

  • @motasemelshemy6185
    @motasemelshemy6185 7 лет назад

    what is the programe which you use to draw the circuit?
    and i need arduino simulation programe? D:

  • @djprometheus923
    @djprometheus923 5 месяцев назад

    Did anyone catch what voltage the battery was?

  • @ToninFightsEntropy
    @ToninFightsEntropy 6 лет назад +1

    For a video without voice, this is surprisingly informative.

  • @shipaakter7664
    @shipaakter7664 6 лет назад

    thanks bor

  • @jacheto
    @jacheto 7 лет назад

    BEST TUTORIAL EVER ABOUT THIS, THANK YOU

  • @grahamtech
    @grahamtech 7 лет назад

    can u show me how to control two motors on each axis of a joystick? for ex: y axis forward and backward of motor a. and X axis forward and backward motor B, plz i rly need a code for this a help on making it for exo skeleton project

  • @ArunKumar-vn4zm
    @ArunKumar-vn4zm 7 лет назад

    can i use l298n driver in the place of l293d driver

  • @jashsheth4606
    @jashsheth4606 6 лет назад

    hi sir, after increasing the speed to max, I am getting an output of only 7v after using a battery of 11.1v
    plz help

  • @damithsm1980
    @damithsm1980 5 лет назад +1

    Thanks for sharing your knowledge... :-)

  • @fazlulkarim8724
    @fazlulkarim8724 3 года назад

    Can u please tell which simulator u used in this video?

  • @eveshkunwor1057
    @eveshkunwor1057 7 лет назад

    what could be the reason for non synchronization of two motors

  • @moeshickenyay
    @moeshickenyay 6 лет назад +1

    Great tutorial, well demonstrated and easy to follow, code was clear and straight forward.

  • @vamshioruganti6319
    @vamshioruganti6319 7 лет назад

    WHICH SOFTWARE YOU ARE USEING FOR CONNECTION?

  • @emadabuhagag222
    @emadabuhagag222 Год назад

    Great tutorial, i thank you from the bottom of my life

  • @splendorman7922
    @splendorman7922 5 лет назад

    Mert Hocam selamlar, bu motor sürücüsünü fritzingde göremiyorum ben? Ayrıcamı indirmemiz gerekiyor?

  • @silentnight1740
    @silentnight1740 Год назад

    I m trying but not working my project 😭

  • @relostephenjoshuar.9869
    @relostephenjoshuar.9869 3 года назад

    Code pls. The link not unsupportted 😞

  • @sdelgadodelgado
    @sdelgadodelgado 7 лет назад

    puedes hacer un carrito 4x4 usando un joystick con blynk?

  • @ashutoshrana1363
    @ashutoshrana1363 7 лет назад

    please help me ! i want to make own bluetooth module

  • @Just_yog
    @Just_yog 6 лет назад

    Dude...can u pls say what simulation did u use to show us the connections

    • @hithere8541
      @hithere8541 6 лет назад

      its called fritzing. Check this out fritzing.org/home/

  • @ambarishkv2569
    @ambarishkv2569 6 лет назад

    My motor driver l298n is burning when connecting 12v 1.3 ah lead acid battery directly..! How to fix? Will using a mt3608 dc dc step up will work? So that I can reduce the current from battery.! Please help.!

  • @veyselaksoy6558
    @veyselaksoy6558 6 лет назад

    Hello , i have used l298N with powersupply which could generate 1000mA and 5V however my project's wheels could not work.Can you explaim this why it was not worked?Can you help me?

  • @Paladimhandmade
    @Paladimhandmade 2 года назад

    Wonderful and helpful tutorial! Maybe you already answered this but I wasn’t able to find the answer (lots of comments haha) - what is the app you use to design the circuit diagram (with the red and yellow and green lines)? Much appreciated!

  • @rakesh14041987
    @rakesh14041987 6 лет назад

    Hi, I have the battery problem which you explained. But my 9v battery drains very fast everytime. Say in just 5 min when I run this tutorial. Is it a problem with my L298N module? And this is the same problem which Vishal is facing. Please help

  • @ansumanpanda497
    @ansumanpanda497 7 лет назад

    why the 5v of motor driver is not used

  • @pedrogamino
    @pedrogamino 3 года назад

    these motors can't take up to 6v?