L298N | how to control dc motor with Arduino | Motor speed and direction control

Поділитися
Вставка
  • Опубліковано 16 жов 2024
  • ❤️ Hi friends, Welcome to Project Weekend
    In this video, I will clearly explain, how to create a powerful motor speed and direction control using Arduino + L298N Motor driver.
    Keywords: #l298n, l298n, l298n motor driver arduino, how to control dc motor with arduino, arduino motor shield, motor speed and direction control, h-bridge motor control, l298n motor driver arduino,arduino dc motor speed control,arduino dc motor control,l298n arduino, l298n motor driver,l298n motor driver price
    If you like my video, please 👍 Like and share it.
    Please 💬 Comment your ideas in the comment section. Your comment helps me a lot to produce more quality videos in the future.
    Please 👆🏻 Subscribe to the Project Weekend channel to watch my future videos.
    Click the bell icon to get notifications when I upload a new video.
    Thank you.
    ❤️ 🧡 💛 💚 💙 💜
    This video includes-
    👉 L298N Powering up
    👉 L298N + Arduino Connection Diagram
    👉 L298N Change direction and speed of DC motor
    👉 Arduino Source Code for L298N Motor Driver
    👉 Sample code and modifications for various control methods
    Gear motor link: bit.ly/3NIEn3A
    12V DC motor link: bit.ly/3GTZdLe
    775 Motor link: bit.ly/3tddvAV
    L298N stepper motor driver link: bit.ly/3xohZHz
    Arduino UNO link: bit.ly/3ma5N6v
    My other videos -
    🎬 BOOMBOX V2 - Multimedia Bluetooth speaker DIY/ Bluetooth boombox/ DIY boombox/ Multimedia system
    • ❤️Portable bluetooth s...
    🎬 How to build multimedia Boombox using a pipe: DIY homemade audio system
    • How to build multimedi...
    🎬 7 BRILLIANT WRENCH LIFE HACKS!/ WRENCH HACKS/ USING WRENCH/ SUPER WRENCH/ WRENCH TIPS/ WRENCH TOOL
    • 7 BRILLIANT WRENCH LIF...
    🎬 Unscrew any bolt using any available wrench!
    • Unscrew any bolt using...
    🎬 775 DC Motor repair rebuild with 150% power gain!
    • 775 DC Motor repair re...
    🎬 Mp3 USB KIT DIY boombox
    • portable speaker | Bes...
    🎬 How to fix Alternator battery charging problem, belt squeezing noise, belt alignment issue
    • Alternator belt noise ...
    🎬 DIY TOOL HOLDERS using PVC pipe parts
    • NICE TOOL HOLDER | HO...
    🎬 HOW HAIR CLIPPER WORKS/ hair clipper adjustments/ Best hair clippers/ Hair clipper tutorial
    • HOW HAIR CLIPPER WORKS...
    🎬 FULL TOOLBOX REVIEW - 40 pcs combination socket wrench set unboxing and full review
    • FULL TOOLBOX REVIEW - ...
    🎬 Knight Rider LED Keyboard hack!
    • Knight rider led | kni...
    🌴🌴 🌳 🌳🌴🌴🌴🌴🌴🎄🎄🎄🌴🌴🌴 🌳🌴🌴🌴🌴🌴🌴🌴🌴🌴🌴🌴🌴🎄 🌲 🌳
    If you like my channel, then, please
    👍 Like
    💬 Comment
    👆🏻 Subscribe
    🛎 Click the bell icon on my channel.
    Website: projectweekend...
    Facebook group: / 645023196075453
    Facebook Fan Page: / project-weekend-202139...
    Thank you and have a great day!
    ❤️ 🧡 💛 💚 💙 💜 ❤️ 🧡 💛

КОМЕНТАРІ • 1,1 тис.

  • @ProjectWeekend
    @ProjectWeekend  2 роки тому +6

    Gear motor link: bit.ly/3NIEn3A
    12V DC motor link: bit.ly/3GTZdLe
    775 Motor link: bit.ly/3tddvAV
    L298N stepper motor driver link: bit.ly/3xohZHz
    Control two DC motors using L298N motor controller: ua-cam.com/video/RgFOpSlIpvA/v-deo.html

  • @Artur1959
    @Artur1959 3 місяці тому +3

    Thank you. In spite of the ugly music I had to endure, the topic was very well explained.

  • @levin8291
    @levin8291 Рік тому +27

    interesting choice of bgm

    • @divinechijindu7465
      @divinechijindu7465 Рік тому +1

      I’m saying 😂😂😂

    • @PerilNotion
      @PerilNotion 11 місяців тому +1

      It's like we're about to go F some stuff up

    • @lohikarhu734
      @lohikarhu734 3 місяці тому

      "retribution" drives me f'n into deep irritation with the Creator of the channel!

  • @learnwithlsm5595
    @learnwithlsm5595 Рік тому +3

    Thank You for your time and effort.. Simply awesome code. 🖐️

  • @PlantRoomRadio
    @PlantRoomRadio Рік тому

    🎈🎈🎈🔥🔥🔥🔥 Really appreciate this video. Great work. keep it up

  • @indralaljayathilaka645
    @indralaljayathilaka645 Місяць тому

    keep up the good work. the motor control is superb

  • @amanagarwal3682
    @amanagarwal3682 Рік тому +4

    Hi, Amazing video, Could you guide us on using a remote control for controlling the motor too?

    • @ProjectWeekend
      @ProjectWeekend  Рік тому

      Sure I will post another video with RF remote module

  • @neumannvon2051
    @neumannvon2051 Рік тому +1

    Thank you for sharing the UA-cam video and what will happen when “IN1”, “IN2” and “ENA” are equal to Logic ‘1’ or HIGH ? Will it damage the H-Bridge L298N or the DC motor. kindly advise. Thanks

    • @garyhalsey7693
      @garyhalsey7693 Рік тому

      If you set both IN1 and IN2 to “HIGH” there is a very good chance you will blow the H-Bridge, yes.

    • @ProjectWeekend
      @ProjectWeekend  9 місяців тому

      No it will not damage L298N driver anyway. It's designed to handle all logic states without any problem. If all pins are set high, the motor will simply not run.

  • @AmirHamza-wi7os
    @AmirHamza-wi7os 5 місяців тому +1

    for those who are thinking will it work with L298n (Green) ? YES it does works..Congrats

  • @06_කමරේ-23
    @06_කමරේ-23 5 місяців тому

    🎈🎈 Really appreciate this video. Great speed controller

  • @kavijohn1972
    @kavijohn1972 Рік тому +1

    Hi sir, I have one arudino uno, 3 gread 12v motor, 2 joystick & 2 L298n. I want run this 3 motor forward & backward with joystick. Can you share the code pls

  • @Rise_and_Thrive1111
    @Rise_and_Thrive1111 3 місяці тому

    Thank you for sharing the speed controller. 🖤🖤🖤

  • @AmaniNimthara_YT
    @AmaniNimthara_YT 9 місяців тому

    🌈 Awesome video my friend

  • @slbuspodda7283
    @slbuspodda7283 26 днів тому

    Really appreciate this video. Great motor control

  • @ILLANDMENTAL
    @ILLANDMENTAL Рік тому +2

    you made my day!. Really appreciate this video. Great motor control

  • @Laguhitsaiori
    @Laguhitsaiori 2 місяці тому

    💛💛💛🔥🔥🔥 Like it. very nice motor controller

  • @CleonMusicOfficial
    @CleonMusicOfficial 24 дні тому

    Thank You for your time and effort.

  • @CricMagazine
    @CricMagazine 5 місяців тому

    I'm impressed.. Thank you for sharing the coding

  • @JOY-x3y
    @JOY-x3y 4 місяці тому

    superb work. keep up the great work. 🎉🎉🎉🎉

  • @ChaMa432
    @ChaMa432 4 місяці тому

    thanks for sharing the speed controller. you made my day!. 💗🖤🖤🖤

  • @FixitEasyDIY
    @FixitEasyDIY Рік тому

    Nice videos my friend ! Keep up!

  • @Sikabroo
    @Sikabroo Рік тому

    Really appreciate this video. Great speed controller. 💗💗🖐️🖐️🖐️🖐️

  • @Aroundthecountry
    @Aroundthecountry Рік тому

    💙💙💙 very nice arduino code. keep up the great work

  • @MindBlownFacts1.0
    @MindBlownFacts1.0 6 місяців тому

    Thank you for sharing this motor control. I'm impressed.

  • @manojt1266
    @manojt1266 Рік тому +1

    hlo sir, I am trying to make a controller of self made train with motors attached I am so confused how to give the connections of four motors into arduino uno can you pls let me know about it

    • @ProjectWeekend
      @ProjectWeekend  Рік тому

      Hi, if you need to control 4 DC motors individually, you can use two L298n drivers. one L298N driver can control two DC motors.

    • @ProjectWeekend
      @ProjectWeekend  9 місяців тому

      Here is the video for two DC motors using L298N : ua-cam.com/video/RgFOpSlIpvA/v-deo.html

  • @Echo-Wisdom
    @Echo-Wisdom Рік тому

    😍😍😍😍 speed controller is good. Congratulations!

  • @joshtechjunction7041
    @joshtechjunction7041 Місяць тому +1

    Want make auto Reverse Forward rotating circuit working on high Torque gear DC motor.... Can you please share hardware and arduino program details

  • @Gleaming_Goals
    @Gleaming_Goals 2 дні тому

    Thank you for sharing the motor control

  • @ARTBYSAMINTHA
    @ARTBYSAMINTHA 4 місяці тому

    Congratulations!. Nice speed controller

  • @AbigailFernando-bs9dm
    @AbigailFernando-bs9dm 6 днів тому

    Nice speed controller. ❤️👏👏👏👏

  • @ganeshpingle.8423
    @ganeshpingle.8423 Рік тому +1

    very good video. thank you. but i have a queshion . i like to connect a potentiometer to control the direction of this moter so how i do this. plz help..

    • @ProjectWeekend
      @ProjectWeekend  Рік тому

      Thanks. Yes you can. You need to connect potentiometer middle pin to Arduino, as a analog input, and one pin to ground, and the other pin to 5V line with resistor in series. Then you need to read the value of analog input pin you used, and adjust the potentiometer to it's middle position. Read the value, and set that value as 0 position that stops the motor. Considering the value of potentiometer reading, you can change the direction and set speed with some simple calculations.

  • @thegodofbinary
    @thegodofbinary Рік тому

    Awesome video my friend

  • @diomandepascaltokpa2760
    @diomandepascaltokpa2760 Рік тому +1

    HELLO I LOVED THE VIDEO AND WANT TO KNOW HOW TO US RF TO CONTROL MOTOR SPEED IN 4 DIFFERENT PRESET SPEED

    • @ProjectWeekend
      @ProjectWeekend  Рік тому

      Hi, You will need RF module with 4 channels, or if you have only one channel then it needs a bit of extra work. I will explain in a future video.

  • @mr.d-fbtrainer5466
    @mr.d-fbtrainer5466 Рік тому

    Thank you for sharing the driver. 🙌🏼🙌🏼🙌🏼🙌🏼🖤🖤🖤

  • @Sakura89968
    @Sakura89968 Рік тому +2

    Simply awesome motor driver. you made my day!

  • @Raaj0612
    @Raaj0612 Рік тому

    Thank you for sharing this speed controller. 💖💖💖💖

  • @ARTBYSAMINTHA
    @ARTBYSAMINTHA 3 місяці тому

    nice motor control. Thank You for your time and effort.

  • @worldgaming0Q
    @worldgaming0Q Рік тому

    💖💖🌈🌈🌈🌈 Awesome video my friend

  • @longlivesoothingmusic2286
    @longlivesoothingmusic2286 Рік тому

    I'm impressed.. excellent work. nice speed controller. 💛💛💛

  • @timbaldes3054
    @timbaldes3054 Рік тому +1

    Hi, so I‘m looking to build a motor that drives a lynx for back and forth several meters along a linear axis to test out wildlife cameras for a scientific study. Your video was very helpful since I have exactly no ER background. But I’d there any way to tell the motor when it has reached the end of the track, wait there for one minute and then reverse? This process would have to be repeated several hundreds if not thousand of times. I‘d be so glad if you could help!

    • @komplikuotas1691
      @komplikuotas1691 Рік тому +2

      You would need some sort of button that the lynx would push when it gets to the end, and in the code write that if it is pushed, delay for ... and change direction.
      Another way you could do that is measure the time the lynx takes to get to the end, and delay the code for that time and once its over stop the motor, then delay for ... and change direction

    • @ProjectWeekend
      @ProjectWeekend  Рік тому

      You can use limit switches and attach them on both ends, and connect to Arduino ground and to input pin. Then in the code, set the pin to input mode and stop motor and add delay before direction change.

  • @CHENIRU_OFFICIAL_BUS
    @CHENIRU_OFFICIAL_BUS 7 місяців тому

    I'm impressed.. motor controller is awesome!

  • @football_fans-89f
    @football_fans-89f 17 днів тому

    Thank you for sharing the project

  • @scstrend
    @scstrend Рік тому

    Cool motor control!

  • @SandraC
    @SandraC 15 годин тому

    👍💫 Very good coding

  • @agatewaytoenglishlanguage
    @agatewaytoenglishlanguage 11 місяців тому

    👍🏽👍🏽 amazing motor control. I'm impressed.

  • @travelwithabisheka
    @travelwithabisheka 10 місяців тому

    the driver is superb. you made my day!

  • @starkitchen5752
    @starkitchen5752 2 місяці тому

    Thank you for sharing the speed controller

  • @metaed6455
    @metaed6455 Рік тому

    Nice motor driver. keep up the good work. ⭐️⭐️✌️✌️✌️

  • @garrettdwyer9425
    @garrettdwyer9425 Рік тому

    Really appreciate this video. Great motor controller. 👏🏼👏🏼👏🏼👏🏼

  • @HemakumaraDissanayake
    @HemakumaraDissanayake 10 місяців тому

    ❤️❤️👍👍👍 Loved it

  • @ridewithusadventures6960
    @ridewithusadventures6960 Рік тому

    Really appreciate this video. Great work

  • @vandawtceu1289
    @vandawtceu1289 6 місяців тому +1

    can i put the programs into if sentences and put it together with a distance sensor? For example, if the distance sensor detects something, then could it make the motors stop ?

    • @ProjectWeekend
      @ProjectWeekend  5 місяців тому

      Yes, you can integrate a distance sensor with your L298N motor driver. You can use if statements in your program to make the motors stop when the distance sensor detects an obstacle. For example, with an ultrasonic sensor like the HC-SR04, you can measure the distance and if it is below a certain threshold, you can stop the motors by controlling the L298N driver pins accordingly. This way, the motors will stop whenever an obstacle is detected within a specified range.

  • @olumuyiwasiyanbola8093
    @olumuyiwasiyanbola8093 Рік тому +1

    Is it possible to connect motors with different voltages on the same motor driver?

    • @ProjectWeekend
      @ProjectWeekend  Рік тому

      I don't think it's easy than using separate driver's for two motors

  • @OVERALLFITNESSGALLERY
    @OVERALLFITNESSGALLERY Рік тому

    keep it up. Really appreciate this video. Great motor control

  • @viaggio19
    @viaggio19 Рік тому

    wow that's fantastic driver. 💗💗💗

  • @JibinRajuart7
    @JibinRajuart7 Рік тому

    Really appreciate this video. Great driver. I like it

  • @voiceofrythemvoiceof-vor
    @voiceofrythemvoiceof-vor Рік тому

    Simply awesome project. 😎😎😎💛💛

  • @Laguhitsaiori
    @Laguhitsaiori Місяць тому

    excellent work. nice motor control

  • @vimaTVWrestling
    @vimaTVWrestling Рік тому

    💚💚💚💚🖐️🖐️ super work. I'm impressed.

  • @ilovebabyviral
    @ilovebabyviral Рік тому

    💓💓💓😍😍 Thank you for sharing this coding. Thank You for your time and effort.

  • @harithawahinisrilanka1459
    @harithawahinisrilanka1459 Рік тому

    😇😇😇😇 I'm impressed.. motor controller is awesome!

  • @Amazingtop-kv4ur
    @Amazingtop-kv4ur Рік тому

    Really appreciate this video. Great project. Hats off

  • @scriptureworldsinhala
    @scriptureworldsinhala 6 місяців тому

    😘😘🖤 Great job and appreciate it

  • @NadunVideoTeamKotugoda
    @NadunVideoTeamKotugoda Рік тому

    Hi! Thank you for the video.

  • @NKcreation1995
    @NKcreation1995 5 місяців тому

    wow that's fantastic work. 💖💖💖👍🏽👍🏽

  • @FunkeyMonkeyCartoons
    @FunkeyMonkeyCartoons 7 місяців тому

    keep up the good work. great work!

  • @MehboobStudio133
    @MehboobStudio133 9 місяців тому

    wow nice motor controller!. Genius!. 😇💚💚💚

  • @zionministriessrilanka7108
    @zionministriessrilanka7108 Рік тому

    💪🏻 the work is superb

  • @thecity-zo2xe
    @thecity-zo2xe 5 місяців тому +1

    I'm trying this using a 5v pc fan.
    I followed the directions, so why does the fan only twitch?
    Should I have connected a battery where it says 12v?
    If so, what kind of battery?

    • @ProjectWeekend
      @ProjectWeekend  5 місяців тому +1

      If you are using brushless DC fan with L298N, it wont work as you expected because the fan is controlled by the fan's internal circuit. First check the driver with normal brush type DC motor, and it should work as you expected.

    • @thecity-zo2xe
      @thecity-zo2xe 5 місяців тому

      I own an Elegoo Ultimate Starter Kit, so I tried using its breadboard power supply module and... the fan didn't even twitch this time .
      I have seen that there are "brush" type and "brushless" dc motors. I didn't think that would be important here. I will have to read up on that.
      Thank you.

    • @thecity-zo2xe
      @thecity-zo2xe 5 місяців тому

      @@ProjectWeekend I read that again.
      Yes. My pc fan is, in fact, a DC BRUSHLESS fan. 05V | 0.25A.

  • @slpguru2009
    @slpguru2009 9 місяців тому

    Nice work. Like it. 🍦👏🏼👏🏼👏🏼

  • @GihanRathnayaka-po5qc
    @GihanRathnayaka-po5qc Рік тому

    💪💪⭐️ very nice project

  • @ZenfluenceJuntion
    @ZenfluenceJuntion Рік тому

    🍦 Hats off. motor controller is awesome!

  • @slideamaster9043
    @slideamaster9043 Рік тому

    Genius!. very nice project. 🍺🍺

  • @YouTube_LIFE_Watch
    @YouTube_LIFE_Watch Рік тому

    excellent work. nice motor controller. 🙏🙏💛💛💛

  • @cyberhublk
    @cyberhublk 23 дні тому

    very useful speed controller. 🙌🏼🙌🏼😘😘😘😘

  • @ThusithAthauda
    @ThusithAthauda День тому

    💗💗💗👍👍 this helped a lot. thanks

  • @CReDiTz_10m
    @CReDiTz_10m Рік тому

    Congratulations!. very useful speed controller

  • @iduvaianuvaiia
    @iduvaianuvaiia 8 місяців тому

    Thank You for your time and effort.. wonderful coding

  • @anushbro1987
    @anushbro1987 Рік тому

    Simply awesome code. Hats off. 😘😘😘😘🍓🍓🍓🍓

  • @lekafinance
    @lekafinance Місяць тому

    😎😎😎😎 Awesome work

  • @Martialff487
    @Martialff487 Рік тому

    keep up the great work. Thank you for sharing the speed controller

  • @dilshancreations413
    @dilshancreations413 2 місяці тому

    😻😻😻😻😎😎😎😎 Great job and appreciate it

  • @ANIMALLOVER-ns8yf
    @ANIMALLOVER-ns8yf Рік тому

    Thank you for sharing this motor driver. Keep going

  • @frendziponlinesocialnetwork

    💗💗💗❤️❤️❤️ Congratulation

  • @manulperera4129
    @manulperera4129 Рік тому

    🍦🍦🍦🍦🌈🌈🌈 Awesome video my friend

  • @charizard664
    @charizard664 Рік тому

    💓👏 the motor control is superb

  • @shaheensportsinfo
    @shaheensportsinfo Рік тому

    Hi! Thank you for the video.. 🍦🍦❤️

  • @AbigailFernando-bs9dm
    @AbigailFernando-bs9dm День тому

    🍟😍😍 very useful work

  • @shashivlogs88
    @shashivlogs88 Рік тому

    Thank you for sharing the project. 🖤🖤🖤🖤

  • @theultimatemonstergaming
    @theultimatemonstergaming Рік тому

    Really appreciate this video. Great work. you made my day!

  • @knowledgepress
    @knowledgepress Рік тому

    superb speed controller. Thank You for your time and effort.

  • @VImukthiDissanayake-yj4so
    @VImukthiDissanayake-yj4so 5 місяців тому

    Really appreciate this video. 😻😻😻😻🖤🖤🖤🖤

  • @Dr.GuneratneWickremasinghe
    @Dr.GuneratneWickremasinghe Рік тому

    😍😍😍😽😽 Keep going

  • @ryantech6956
    @ryantech6956 Рік тому

    Hi! Thank you for the video.. 😇😇😇😇👏👏👏👏

  • @kiwimechanic
    @kiwimechanic Рік тому

    🥰🥰🥰🥰😽😽 Hats off. Thank you for sharing this arduino code

  • @Exotic_Car_World
    @Exotic_Car_World Рік тому

    Awesome!. 🖤👏🏼👏🏼👏🏼

  • @BinuriKarunarathna
    @BinuriKarunarathna Рік тому

    Thank you for sharing this driver. 😍😍😍

  • @InpersonaVyvo
    @InpersonaVyvo 6 місяців тому

    Cool speed controller!. I liked it!

  • @ahmadirfan3155
    @ahmadirfan3155 11 місяців тому

    I already built same as this and i put potientiometer as the variable to control the motor rotate clockwise or counterclockwise, but can i put the limit ?

    • @ProjectWeekend
      @ProjectWeekend  9 місяців тому

      Yes, you can add limits to the potentiometer values to control the rotation of the motor within a specific range using something like
      if (potValue < 500) {
      potValue =500
      }
      if (potValue > 1000) {
      potValue =1000
      }

  • @FoodLover356
    @FoodLover356 Рік тому

    Thank you for sharing this project. I'm impressed.