How to connect your “L298N Dual H-Bridge Motor Controller” to “Arduino Uno”

แชร์
ฝัง
  • เผยแพร่เมื่อ 15 พ.ค. 2024
  • In this video, you will learn how to control a dc motor with the help of Arduino Uno using an L298N dual H-bridge motor controller.
    ►Arduino Uno:
    Arduino Uno is a microcontroller board based on the ATmega328P. It has got 14 digital input/output pins(of which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz quartz crystal, a USB connection, a power jack, an ICSP header and a reset button.
    ►Motor Driver L298n:
    The l298n motor driver is based on the L298 Dual H-Bridge Motor Driver IC. This module allows us to easily and independently control two motors of up to 2A each in both directions.
    It has got the ability to control the speed of the motors and this is achieved using ENA and ENB pin provided on the motor driver.
    ►PWM:
    Pulse Width Modulation (PWM), is a technique for getting analog results with digital means. Digital control is used to create a square wave, a signal switched between on and off. This on-off pattern can simulate voltages in between 5 Volts and 0 Volts by changing the portion of the time the signal spends 'on' versus the time that the signal spends 'off', Basically, we take out the average of the signal over a certain time period.The average voltage will be closer to the 5V if the pulse width, that is the time when it is switched 'on' is greater than the 'off' time. If we repeat this on-off pattern fast enough with a LED, the result is as if the signal is not fluctuating but is steady between 0 and 5v controlling the brightness of the LED.
    To know more about it visit our website: teampsi.org/
    Follow us on Twitter: / teampsi_iitr
    Follow us on Facebook: / team-psi-118297035365690
  • วิทยาศาสตร์และเทคโนโลยี

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

  • @barbasbandas6665
    @barbasbandas6665 6 ปีที่แล้ว +46

    very very nice video. Apreciate the effort

    • @teampsi6771
      @teampsi6771  6 ปีที่แล้ว +4

      Thanks

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

      @@teampsi6771
      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

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

      @@teampsi6771 Yes, the effort put into this video from the editing to the graphics is amazing

  • @GaneshHosur97
    @GaneshHosur97 5 ปีที่แล้ว +5

    Concise and straight to the point explanation. Very well written description .. Hats off.. Great work!!

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

    Finally i found somebody who explained me this connection. Thank you

  • @yakshbhola8916
    @yakshbhola8916 5 ปีที่แล้ว

    THE BEST video available on L298N Dual H-Bridge Motor Controller , along with the explanation ...effort appreciated

  • @guybenami7387
    @guybenami7387 6 ปีที่แล้ว

    Wow I searched so so much for helpful tutorials on the Internet and this one is maybe the best!!!

  • @TheAutospkr
    @TheAutospkr 4 ปีที่แล้ว

    nice - was looking for a practical of this specific board variant of the l298n. thank you!

  • @everetteworley1333
    @everetteworley1333 4 ปีที่แล้ว +7

    Dude you helped me with a school project that I've been stuck on for so long. Thank you so much!!!

  • @saadatkhan2791
    @saadatkhan2791 5 ปีที่แล้ว +4

    Wow! a really good video. Great explanation, great editing; the effort put in the video is exceptional.

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

    that was so perfectly to the point
    Realy appreciate your effort mann

  • @dolanyisk8
    @dolanyisk8 5 ปีที่แล้ว

    great video, i was having issues making the l928 circuit work, but this video cleared my doubts. Thanks!

  • @boowonder888
    @boowonder888 6 ปีที่แล้ว +1

    Thanks 4 letting me know about pwm and it's sinus sign on next to the pin, that's important info!

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

    Pure genius. What a clean demonstration. Thank you good sir.

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

    i hve been searching this kind of video for a long time. thanks!

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

    why is this video so perfect in every way

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

    I like the way he explains it! Good!

  • @Ripsticker45
    @Ripsticker45 5 ปีที่แล้ว +93

    he didn't put the code in so I did.
    //CODE:
    int In1 = 7;
    int In2 = 8;
    int ENA = 5;
    int SPEED = 210;
    void setup(){
    pinMode(In1,OUTPUT);
    pinMode(In2,OUTPUT);
    pinMode(ENA, OUTPUT);
    digitalWrite(In1,HIGH);
    digitalWrite(In2, LOW);

    //ENA 255 means high speed and 0 means low speed
    analogWrite(ENA, SPEED);
    }
    void loop(){

    }

  • @user-ll6dm8lg9e
    @user-ll6dm8lg9e 3 ปีที่แล้ว

    Thank you. This is very useful for my project and it make me understand about L298n.

  • @jaimeherrera2510
    @jaimeherrera2510 6 ปีที่แล้ว +4

    Thank you very much. You explain so clear.

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

    The best explanation about this part !
    Thanks

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

    great info that helped me out on my project!

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

    NEATEST DC MOTOR ARDUINO INTEGRATION VIDEO IN TH-cam ,THANK YOU

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

    You did a great tutorial here. Thank you :)

  • @kartikkashyap7595
    @kartikkashyap7595 7 ปีที่แล้ว +5

    Good work !!!!! And please upload such informative videos

  • @user-ie7jx2yf3x
    @user-ie7jx2yf3x 4 ปีที่แล้ว

    Easy to understand,very helpful for the beginners.

  •  5 ปีที่แล้ว

    Thank you, great video. Greetings from Colombia

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

    Wow very clear instructions!

  • @richardsherman1685
    @richardsherman1685 7 ปีที่แล้ว

    thank you for sharing this topic clearly and concisely. I have wanted a CNC device since my first awareness. The possibility of this 65th anniversary gift is closing! thanks

    • @teampsi6771
      @teampsi6771  7 ปีที่แล้ว

      I am glad to hear this, Sherman.

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

      @@teampsi6771 can i use L298N DUAL FULL BRIDGE MOTOR DRIVER FOR CONTINUOUS SERVO MOTOR?
      KINDLY REQUESTED,

  • @henrikborjeson8264
    @henrikborjeson8264 4 ปีที่แล้ว

    Very nice video , a comprehensive and useful example.

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

    Excellent video ! Super helpful. Thank you!

  • @aizukhalid9776
    @aizukhalid9776 4 ปีที่แล้ว

    the best and simple explanation ever. May Allah bless you and ease your life my friend.

  • @user-rm9vt2rw2b
    @user-rm9vt2rw2b 3 ปีที่แล้ว

    Perfect, thanks for that. I am just beginning to learn Arduino and it is very daunting. Appreciate you sharing your knowledge.
    3

  • @Mememeister
    @Mememeister 6 ปีที่แล้ว +1

    Thank you very much. Really good video!

  • @thepredator1943
    @thepredator1943 4 ปีที่แล้ว +11

    always wanted a pair of talking hands,wonderful

  • @hervemarie966
    @hervemarie966 5 ปีที่แล้ว

    Very clear and useful. Thanks a lot

  • @manishpanchal8689
    @manishpanchal8689 7 ปีที่แล้ว +6

    Nice Explanation.

  • @thefuzzman9833
    @thefuzzman9833 5 ปีที่แล้ว +4

    Perfect, thanks for that. I am just beginning to learn Arduino and it is very daunting. Appreciate you sharing your knowledge.

  • @mihirbarnwal2820
    @mihirbarnwal2820 5 ปีที่แล้ว

    To much easy. Great work

  • @hemayetkabir1331
    @hemayetkabir1331 4 ปีที่แล้ว

    Excellent teacher. Thank you so very much

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

    Apreciate the effort, thanks for the video!

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

    Hi Team PSI, great video! Can I use part of your video (without the audio) for a quick explanation on a L298N?

  • @11Rising_Wood11
    @11Rising_Wood11 4 ปีที่แล้ว

    Beutifull video one of a kind type tutorials - keep it up with this chill sound in background. For me personally it helps me focus way better on what u saying with the track lol

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

    Explained very well

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

    Very helpful thank you so much, i do have a follow up question. How would one co about scaling this up to two motors?

  • @Vikijangir
    @Vikijangir 4 ปีที่แล้ว

    Really appreciable, keep it up 👌👍👏👏👏

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

    get in there holmes! keep it going on

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

    Could i connect two different Motor in the same motor driver using the In 3&4 and the Enb to control it, without changing the power source?

  • @gamecity7265
    @gamecity7265 6 ปีที่แล้ว

    I programed a stepper motor that stop 24 time in one loop.
    Would you know how to turn on an led for each stop ? So 24 blink.
    LED on while motors stops. LED off while motor rotates. Thanx for your great help

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

    For anyone whose motor just pulses without rotating (which was happening to me) you just need to use an independent power supply for your Arduino so that the 9v battery's current doesn't get overcharged when trying to start the motor and power the Arduino at the same time.

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

      still not working broo can you please help

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

      @@BongChoch do you still need help?

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

      How? can you explain the schematic

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

    Nice video! What should I change if I use a 24 power to power a 24V motor? Thanks

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

    Well explained and good knowledge

  • @jeranrai645
    @jeranrai645 4 ปีที่แล้ว +1

    7:33, is it necessary to pull out the Vin and GND connection before connecting the data cable to computer ?

  • @subhayansinha4417
    @subhayansinha4417 5 ปีที่แล้ว

    well explained sir!

  • @markigames7313
    @markigames7313 5 ปีที่แล้ว

    Thanks for the nice vid :)

  • @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, ENA and ENB enable.

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

    I am thankfull for video!

  • @freemanfreed1581
    @freemanfreed1581 4 ปีที่แล้ว

    we can separately give power to arduino right? connecting arduino to external power source instead of connecting the 5v from the motor driver with the arduino power pin is also possible??

  • @sanjunamathews-robotechietips
    @sanjunamathews-robotechietips 4 ปีที่แล้ว

    Nice video.. I have a doubt.. I am using Ros serial for varying speed from robot operating system and I am having 12v power supply.. In that case is it safe to connect gpio pins while Arduino is connected to laptop.. ?

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

    Good explanation

  • @saivenkatesh4730
    @saivenkatesh4730 5 ปีที่แล้ว

    Sir if we need to control 6 12v DC 300ma motor ..which motor shield sould we use and how to connect ...

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

    sir is there any extra component required like resistor or any more? or by using this much only it will work...i m little bit confused..please help

  • @ashemdijen9281
    @ashemdijen9281 5 ปีที่แล้ว

    explanation is good .

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

    Creative video, thanks for sharing, like it :)

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

    can we use steps of any Axis"x,y,z" out of cnc controller to control the speed of a Dc motor or stepper motor while running G-Code???

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

    Bro I have done the same stuff wid two 5 volt dc motors but they are not rotating can suggest me anything I powered the bridge with 9 volts dc like you sir?

  • @zumpitu
    @zumpitu 5 ปีที่แล้ว

    very good Video, thank you !

  • @aridkhanurrehman8048
    @aridkhanurrehman8048 4 ปีที่แล้ว

    thanks sir very informative video

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

    Can we use dc dc power booster instead of motor driver ??
    Plz ans ...

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

    Can u make a tutorial of same setup controlled using mobile app and wifi module esp8266. Great video.

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

    Hello, can i connect 4 motors to L298N?
    I connected two motors to the L298N and they work normally but while I connect the third it slows down and only one motor works. I am using a 9V battery. Do they need two batteries or is it something else?

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

    Hi community.
    I need some advice regarding H Bridge guy's. What I am looking for is just H Bridge which can change the polarity of the around 100 times per second.
    Must work between 5 Volt to 12 Volt.
    What you recommend ?
    Many thanks

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

    Can this also work with a 9V 5A DC motor? As long as I have a power supply of 9V that also has a current of at least 5A? The only L298N that I could find has a value of 25W though, and the motor has 9*5=45W power. I don't know if that'll work.

  • @itssevii3622
    @itssevii3622 5 ปีที่แล้ว

    love me some pulse width modulation

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

    Obrigado, ajudou bastante!!!

  • @berk530
    @berk530 4 ปีที่แล้ว

    I have 3 TB6612FNG motor driver. I am trying to connect 3 motor drivers to arduino. Which arduino should i use?

  • @milosp.551
    @milosp.551 ปีที่แล้ว

    Can you connect battery on arduino and via 5v pin it delivery power to driver?

  • @DeveloperJunaid
    @DeveloperJunaid 5 ปีที่แล้ว

    Sir If We use 9v battery to 12v dc motor and if Its clip which fits the power supply terminal of arduino, then will it damage the motor?

  • @yuxuanli1114
    @yuxuanli1114 5 ปีที่แล้ว

    Hi ! I am wondering what the function of PIN3 on L298N is.

  • @foodies4140
    @foodies4140 4 ปีที่แล้ว +1

    can we connect 4 motors to the same arduino

  • @relaxingandrefreshingvideo801
    @relaxingandrefreshingvideo801 5 ปีที่แล้ว

    Can u suggest which battery is used for Bo mortors??

  • @technofire6039
    @technofire6039 6 ปีที่แล้ว

    sir can I connect 2 motors in same l298n pin with joining motor wire

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

    Hello can i ask.. What battery that u use ?

  • @MuhammadAwais-jh2dy
    @MuhammadAwais-jh2dy ปีที่แล้ว

    Do u have video about linear actuator with arduino

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

    excellent video thank you

  • @spiksplinter
    @spiksplinter 4 ปีที่แล้ว

    Thanks, nice video

  • @akevin8920
    @akevin8920 4 ปีที่แล้ว

    is that a 6v dc motor that you use?

  • @bernienufc3166
    @bernienufc3166 5 ปีที่แล้ว +1

    extremely well explained thank you, can i use this for a stepper drive?

    • @zezeA380
      @zezeA380 5 ปีที่แล้ว +1

      Bernie NUFC No, stepper motor has 3 input wires. The programming for stepper motor is different. Look up the tutorial for stepper motor

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

    If i am using power from my latop, can i power the motor driver with arduinos 5v pin ?

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

    Bro which wire you is use

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

    Can I connect 5v of arudino to the 5v of motor driver? ....
    Please reply fast 🙏🙏🙏🙏

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

    thank you bro

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

    This was excellent. Can I use an 2.4ghz Tx to control the pwm value of the motor like an Rc car?

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

      Sounds like you got some stuff confused. 2.4GHz is a Radio Frequency. PWM runs in the Hz range for Arduino. Higher the Frequency the faster the pulses known as Dutycycle.
      In the past I have used RF to control a MCU such as the Arduino to toggle on/off and set the duty cycle "speed" of a Motor for my CNC Machine Spindle.

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

    I connect the the l298n to a stepper motor nema17 my DC power supply shows no current being drawn when I send a signal to move the stepper one revolution and then stops I notice it's still continuously drawing max amps and it's in CC mode an till I reset the Arduino then it goes back to normal again it's like the pins 8,9,10,11 are causing it to still run some how also after about 30mins the rc522 RFID scanner stops working any ideas what this could be?

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

    How to download arduino uno programming on the laptop can you help us and fast too

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

    Thanks brother

  • @amoghnivas6624
    @amoghnivas6624 4 ปีที่แล้ว +1

    Sir, when i followed the same procedure as above, the motor rotated stepwise. Please help.

  • @sourabhgayake7015
    @sourabhgayake7015 4 ปีที่แล้ว

    Can i use it for 24V DC, 1440RPM, 5A Motor....

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

    How can I use separate batteries for the Arduino and the motors. Please help.

  • @sahilkamble240
    @sahilkamble240 5 ปีที่แล้ว

    Hi my l298 motor driver ni 12 volt not supported but + supply attach to 5 volt out put it has worked but but way problem of 12 Volt is not supported

  • @akshaytupe4819
    @akshaytupe4819 6 ปีที่แล้ว

    Hi sir muze 4servo and 4 Dc motor connect karna hai by using aurdino and l289n

  • @user-irb
    @user-irb 3 ปีที่แล้ว

    Hi can you fix N20motor connect adurino noisy?