How to use L298N with Arduino (with code)

Поделиться
HTML-код
  • Опубликовано: 16 авг 2024
  • In this Tutorial I explained some basic information about L298N Motor driver in order to help you understand how to use this super cheap full bridge driver. Also I showed how to use it with an Arduino board to control a heavy 24V DC Motor.
    ★☆★Recommended PCB Manufacturer: ★☆★
    👉 JLCPCB : jlcpcb.com/PCH
    ★☆★ OUR LATEST PROJECT 🏅🤖 ★☆★
    👉 Arduino MIDI Controller : • DIY Arduino MIDI contr...
    ★☆★ The necessary components ★☆★
    - Arduino Nano : www.utsource.n...
    - L298N Motor driver : www.utsource.n...
    - 24V DC Motor : www.utsource.n...
    ★☆★ Download the schematic and PCB ★☆★
    - The schematic (Fritzing) : www.mediafire....
    - The schematic (PNG) : www.mediafire....
    ★☆★ Download the Arduino CODE ★☆★
    - Speed and direction motor control : www.mediafire....
    ★☆★ SUPPORT US WITH A SIMPLE TIP ★☆★
    TiP here : en.tipeee.com/...
    ★☆★ FOLLOW ME BELOW: ★☆★
    Instructables: www.instructabl....
    Hackaday : hackaday.io/Me...
    Facebook : www.facebook.c....
    Twitter : / megadas1
    Hackster : www.hackster.i...
    #L298Arduino #ArduinoMotorControl #MEGADAS #howtocontrolmotor #L298N #fullbridgedriver #electronicsDIY #learnArduino #arduinogettingstarted
  • НаукаНаука

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

  • @EonZombiecrafter
    @EonZombiecrafter 5 лет назад +3

    Very good video. There is one thing I think that might be good to add to the Arduino code: when changing the direction of the motor, a delay should be added for the motor to stop (especially when there is load on the motor) and then start turning into other direction.

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

      Thank you for your comment
      You are 100% right thnx

  • @angelleal3005
    @angelleal3005 2 года назад +2

    Is it me or you didn't remove the 12 v jumper from its place ? Also what's the maximum amp consumption of your motor ?

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

    Hi, nice tutorial. But I can make it work with more than 12v. If I don't remove the 12v jumper, the output is about 8v and if I remove it, it doesn't output any voltage. Thanks

  • @eat-myshorts
    @eat-myshorts 3 года назад +1

    you said you will remove the jumper but the led in the l298n module is ON.

  • @seanlyon2870
    @seanlyon2870 Год назад +1

    Very nice video! In your video you used a breadboard to mediate connection to arduino to control the motor. Is the breadboard necessary? If not, how can you set up for arduino uno + L298N for a 24V DC motor (preferably not using a breadboad)? Thanks!

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

    Hello sir can you help me? I have l298n and 1 dynamo which is 12v and linear actuator 12v also and the power supply is from solar charger controller which is 12v output. Is the scc can provide the needs of the two? Pls help me im doing dual axis solar panel.

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

    Bro can you help me, can I connect 2 l298n with 1 arduino, where arduino gets input by RC transmitter receiver

  • @sonic797_youtube
    @sonic797_youtube 2 года назад +1

    What was the gauge of your wires from the dc output to the L298N?

  • @Deesara2.0
    @Deesara2.0 3 года назад +1

    What should be the amperage when supplying 24 v?

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

    What about sample wiring connection for 24Vpower supply to drive two 24V DCmotor, using Arduino Uno along a breadboard. Assuming Arduino Board is powered by 9V Battery.

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

    Hi, Thanks for video Im trying to build a similar circuit with a 24v power supply, a L298 driver to control a 24v servo motor question is the l298 Im planning to use doesn't have 5v to power the arduino board how can I send the 5v to the board

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

      Easy, there is a 5V jumper. If it's in place then the 5+V pin beside the GND and 12+V pins will act as an output and you can send this output to the Arduino VIN

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

    If I'm using a rotary encoder, do I need to change any code?

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

    In this circuit will voltage from potentiometer regulated between 0-5v or 0-24v

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

    Using the same power supply 24V to drive the 2 motors and 9V power supply from battery to power Arduino Board, what about the 5V input supply for IC controller, can I draw them from Arduino Board both +5V and GND to be plugged in the L298 common ground along with the 24V GND?

  • @ayux_ovic9545
    @ayux_ovic9545 2 года назад +1

    HI WHAT'S DIFFERENCE BETWEEN L298 AND L298N ?

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

    I'm trying to run a PM55L - 048 - HP69 stepper motor with the L298N on the Arduino which, according to the datasheet, is powered by 24v but is not running (the motor is fine). I am connecting the 4 wires of the coil, leaving the common wire disconnected. I connect this way: Motor wires 1,2,4,5 in OUT1-OUT4 of the Drive. Wire 3 is the common one; Am I right? Thank you

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

    But in your demonstration the 12v jumper is still in place. How does this not destroy the 5v regulator then?

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

    I connected 12v supply for two tt motors but the voltage output at motor terminal is 3v why? And only one motor is working

    • @chillboyy_
      @chillboyy_ 4 месяца назад

      same problem with me. have you solved this problem? good to see your answer :)

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

    Sir what is the maximum current given as input to L298n

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

    How to control 3 phase AC induction motor?

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

    Sir if I use L298 driver, 1 dc motor and ultrasonic sensor
    I plug the 9v battrey to GND and 12v at the L298 driver also connecting 5V (L298) to vcc Arduino and ground in arduino
    so how about the ultrasonic power and ground?
    should I connect to the L298 too?

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

      Hello
      You can use the 5V of your Arduino to power the sensor too.

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

    Thank you Very Mutch Sir 👍👍

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

    Sir can I used 24 volt and 4 amp for input and control moter speed

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

      Hello
      Yes and this is what we used in our video.
      Are you trying to control speed and direction too!

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

      Isn't the l298n supposed to handle 2 amps max ?

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

      @@angelleal3005 this is the same question I have, have you come up with an answer?

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

      @@sonic797_youtube I used it initially but the voltage drop was so significant that the control of my motor was severely affected. So I decided to go with another driver. Good luck on your project.

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

    its says potentiometer was not declared in this scope

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

    So my where do I download the code from please my friend? I can't find any link. Thank you

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

      OK I had another look and found it after seeing another comment below. Thank you

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

      @@keithremnant7234 I hope you got what you need
      Let me know if I can further assist you.

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

    Will the same code work with Arduino MEGA?

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

    Hey - New to this - Cant find the code to copy

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

      Hello
      Check the link in the description section of this video.
      There is a bownload link out there that you can have for your need.
      Let us know if we can further assist you.

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

    Wieviel Ohm muss denn das Poti haben ?

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

      Is it possible to write me in English?

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

    Will the same code work with Arduino UNO?