Control Speed and Direction of rotation of DC motor using L293B L293D motor driver with Aarduino PWM

Поделиться
HTML-код
  • Опубликовано: 14 июл 2024
  • This video shows you how to control a DC motor using a L293D motor driver with Arduino PWM.
    You will learn how to change the direction of rotation of the motor, change the speed and start or stop it. We learn how to control the speed and direction. You can contgrol the DC motor over WiF from anywhere in the world, watch this video • ESP32 Tutorial 49 - Co...
    The best thank you for me is to not skip ads and Subscribe 🔔 to my channel, like 👍 the video and do not skip the ads.. It is greatly appreciated. 🔔 😊.
    I will reply to all Subscriber's 🔔 questions. So make sure to Subscribe.😊 .
    00:00 introduction
    02:29 A look at the datasheet of L293D motor driver
    04:38 Wiring is explained
    07:03 Arduino code is explained
    11:05 Demonstration of controlling motor
    Get the code for this video: robojax.com/L/?id=315
    Control DC motor with CW and CCW without speed control:
    • Introduction to L293D ...
    What is PWM Frequency of Arduino (Video): • What is Arduino Uno PW...
    Tutorial by Ahmad Shamshiri form Canada
    ****************************
    Arduino Step by Step Course (over 150 lectures) Starts here • Lesson 00 What is Ardu...
    ****************************
    If you found this tutorial helpful, please support me so I can continue creating contents like this. Here is PayPal link paypal.me/robojaxTV
    Follow me on Facebook robojaxTV
    Follow me on Twitter: / robojaxtv
    Follow me on Instagram: / robojax
    Rotojbax on Ticktok: / robojaxtv
    Tutorial by Robojax.com
    Get other projects code and learn Arduino
    robojax.com/learn/arduino
    *** AFFILIATE PROGRAM ***
    We are a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for us to earn fees by linking to Amazon.com and affiliated sites.
    #robojax #robojax_motor #robojaxL293D
  • НаукаНаука

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

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

    Thank you ,nice job I learned and understood a lot from this 👍

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

      Great to hear!

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

    Thank you so much for this, really appreciate

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

      You are welcome. The best thank you for me is to Subscribe 🔔 to my channel and like 👍 the video. It is greatly appreciated. 🔔 😊.

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

    Nice job. Now I’m going to implement this logic on the MSP430

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

      thanks. Good luck.

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

    nice work. very clear to understand

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

    thanks man!

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

    Very helpful video

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

      Glad it was helpful!

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

    hey , how are you giving the input to change the direction , i tried giving character input( L / R) via serial monitor but it didn't work

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

      at 11:43 (click on 11:43) I have explained it. It would be very simple. I have not provided code to control the direction via serial monitor. I will try to make a video on that too if time permits.

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

    Thank you for your valuable sharing, dude!
    How can I control 20 step motors using Arduino or even the PC?
    Thank you in advance!

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

      Hi, I am glad you found it useful. I am not sure about 20 step motor but here we can is my video on stepper ruclips.net/video/TQ7R2bY-MWU/видео.html motor and tones of other tutorials on stepper you can search and find.

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

      You didn’t reply? I searched for the video and provided a link. A simply acknowledgment is appreciated.

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

      @@robojaxI'm really so sorry. For now, I only managed to say thank you with a like as a reply. I work traveling and haven't had time to catch that up on this yet. Billions of thank you!

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

    Sir in the for loop can you explain how you fixed the end value of 255...How to determine the PWM values...

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

      It can't be explained better than video in the text. please watch it 2 ore 3 times. to understand it.

  • @IvanPerez-cg6le
    @IvanPerez-cg6le 4 года назад

    Hey robojax im designing a a laser cat tower and im not sure to use this as my motor for complete 360 degrees and speed control or should i use a 360 degree micro servo please help! and keep making videos!

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

      Hi Ivan, Thank you. I have lot of videos for servo motors and here is the search result ruclips.net/channel/UCkcBSig_Iu4ZnAIeCeG1TVgsearch?query=servo

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

    I thought speed control wasn't possible with the L293 drivers. Thank you for sharing. Why do I need the diodes if I have an L293?

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

      I have explained it in the video. Motor is inductive and when it turns OFF or ON, it generates reverse voltage that can damage components to the chip. So the diode absorbs that spike of voltage.

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

      @@robojax Thank you. I'm sorry for missing that part.

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

      No problem. You are welcome.

  • @t.n.1056
    @t.n.1056 3 года назад

    Thanks man for this video. You've mentioned the L293B-Driver in the video title. But in the video itself, you have not mentioned it at all, so, with which driver is this similar, the L293 or the L293D ??? I'm asking because of usage of diodes. I also could ask you: do we need diodes for L293B too ?

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

      D means diode.

    • @t.n.1056
      @t.n.1056 3 года назад

      @@robojax I know, but I asked you for the L293B Driver. You have not mentioned the L293B driver at all. Is L293B similar to L293 or is it similar to L293D ?

    • @t.n.1056
      @t.n.1056 3 года назад

      @@robojax Does the L293B needs Diodes too ?

    • @t.n.1056
      @t.n.1056 3 года назад

      @@robojax Hi again. Does the L293B needs diodes too ? If yes: which kind of diodes do you use ? I'm a geginner, sorry :D

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

      I remember I opened the datasheet and explained it. That's why I remember the D but for the rest watch the video and get it from there.

  • @dexays.
    @dexays. 3 года назад

    hey i love the video, but can you explain the wiring a bit better because i dont understand it!

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

      Thank you. for all my videos I provide the wiring diagram. The wiring diagram is available for my students at my Arduino course at Udemy.com robojax.com/L/?id=153

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

    Your videos are very clear to understand. Do you have a tutorial where you use a l293d, potentiometer, breadboard,push buttons ( up down right left ) directions, dc motors, leds for a line following robots please ?

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

      not. I have for L298N module ruclips.net/user/robojaxTVsearch?query=L298N

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

    Does the speed controll part works also on raspberry pi?
    Im also using a l293d for my project, but didnt know yet how to controll speed of motors...

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

      Hope you can help my

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

      Yes it does. As long as you send PWM signal to this, it works.

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

      Can you may explain on which pin to send the PWM signal...? That would be very helpful

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

      *May you explain

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

      It has been explained in the video. This is for Arduino and not raspberry Pi.

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

    How do i determine motor current draw if no data sheet is available. Is there a way to test them?

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

      Hi, a simple google searched showed this www.eaelec.com/ea_hobby/tips1.htm

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

    Sir how to rotate dc motor in required angualr displscement. And how to repeat this motion clockwise and counterclockwise.

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

      Hi, angular displacement depends on what is attached to the shaft and diameter of wheel or piece attached to the shaft. You will also need something called ENCODER where you can precisely know the speed of motor. I can't explain it in a few line but that is the basic idea.

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

      Sir can you provide mail id so I can send you our problem in project. It will help us in completing our project

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

    How can I attach four motors? Will I need two ic’s?

    • @robojax
      @robojax  11 месяцев назад +1

      If you want just to rotate them in one direction then one I c is good otherwise yes you need two chip

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

    where are u connecting the external power supply of 9 V?

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

      I have a power supply that produces 0 to 30V. But have explained it in the video. please watch it without escaping.

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

    nice video but i have a question, why can't you just connect the motor in the arduino?

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

      thanks. Arduino's output pins can output only 30mA max. this motor needs 1000mA so we use the IC as driver.

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

      Here I found your question in one of my videos ruclips.net/video/EaoB6lfnS7g/видео.html

  • @mukesh.k4571
    @mukesh.k4571 3 года назад

    sir i have a doubt, can i use this chip for arduino nano? if i can how many motors can control?

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

      you can use any Arduino. just define pins and go.

    • @mukesh.k4571
      @mukesh.k4571 3 года назад

      @@robojax thank you somuch sir!!

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

    how did you change the direction in your code ?

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

      watch the video and do not escape. It has been explained.

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

      @@robojax do i have to change from L to R in the code to change the direction? I wanna do that automatically in one code

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

    u should add a schematic to your video!

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

      Schematic is provided with my Arduino course at Udemy.com. If you purchase the course, you will see the schematic. here is the link to my course at Udemy bit.ly/rj-udemy

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

    Where can i find this code?

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

      perhaps you missed it and skipped. All videos on RUclips have decryption which is under the video and there are links for the video. The same is true for my videos.

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

    sir i have 4 questions
    1. how may chips can i use at the same time?
    2. how many motors can run using the same chip?
    3. can i run 4 motors using a single chip?
    4. can i use 1 chip for 4 motors?

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

      Hello Random K
      Answers
      1-As many as your Arduino board allows
      2-Watch the video as I have not skipped such important thing
      3-refer to answer 2
      4-Yes you can as long as the chip can handle the current. I've explained how much current this chip can handle. I've shown datasheet and there is link for the datasheet so you can view
      Good luck and be nice to reply back when you got this replay. Thank you

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

      @@robojax Thank you so much sir!!!, but i have another question, instead of four dc motors can i run four coreless motors?

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

      this is for DC motor.

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

      @@robojax is there a chip for coreless motors for drones?