LabVIEW Basics #10 - Controlling a DC motor in LabVIEW (LINX) with a L298N H-Bridge IC and Relay

Поделиться
HTML-код
  • Опубликовано: 25 янв 2025

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

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

    Great video, really helpful.

  • @YaseminTheBest
    @YaseminTheBest 4 года назад +3

    Would you be able to make a similar video for controlling a stepper motor with a driver like the TB6600?

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

      Thanks for the suggestion :) I have already planned to make a stepper motor tutorial, so it should be out this year sometime.

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

      @@SINConsulting do you happen to have a VI already? Im running into some problems with trying to control a stepper motor using LINX. :(

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

      Feel free to email me, and I'll see if I can help. I'm only currently working on a pan-tilt servo VI.

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

      @@SINConsulting I actually managed to solve it just now! Started panicking too soon haha. Thanks a lot though and also thanks for the tutorials you upload. They are very helpful.

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

      @@YaseminTheBest Would you be willing to share how you solved this ? I'm in the same boat, trying to get a stepper to work with linx.

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

    Hello sir . I have a doubt. I can observe only the vibration sound of my motor . Is not running. What might be the problem?

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

    I would like to ask if we can read the motor encoder and display it on the LCD with LINX? Thanks!

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

    Hi, I was wondering if it is possible to do the same using a L293D motor shield attached to Arduino UNO. I have tried that but it seems I cannot control the spinning direction of the connected dc motor.

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

      Hi Alexandru,
      I'm sure you definitely could, it would just require modifying the VI to send the appropriate signals to the L293D motor shield. This shield is a bit more complicated than the one I used in this example, so all that would be required is becoming familiar with its operation as explained here lastminuteengineers.com/l293d-motor-driver-shield-arduino-tutorial/
      Then interpreting there code into LabVIEW using the LINX functions palette, so a bit of experimentation is required.

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

      @@SINConsulting Thank you for your answer!

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

    Hello again...How do you know the speed at a certain point on the duty cycle? My fan has 3 speeds on a little controller, where you have to manually control it. Which from the fan's spec I know what are mine CFM at Low, Med, and High. Since now that I am controlling it using the duty cycle which is from 0-1. Can you help me how to figure out the the speed?

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

    How can i control it in 2 directions tho

  • @hud3036
    @hud3036 2 месяца назад

    thanks so much for this video, if only it worked with PID it would be A+, great.

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

    love it, it was beneficial.

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

    Thanks a lot !!

  • @BaqerAlkuraysi
    @BaqerAlkuraysi 8 месяцев назад

    thank you very much

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

    Hello, at the 16.60 minute mark, i didnt see you control the fan speed, i just saw on/off only. Are you able to control the fan speed with the same code? how do you wire the motor to pin 9 with the duty cycle?

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

      Hi Anh, that is because the motor is being controlled by a relay which is an 'electronic' switch, so all i am doing is turning the motor on and off. If you need to control speed and direction please use a H-Bridge circuit as I demonstrate in the first part of the video.

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

      @@SINConsulting Hi, thanks for the quick response...I see that now. So, if I want to control on/off fan and speed at the same time, would the H-bridge work or the H-bridge is only for controlling seed and direction? because right now I am using an Arduino Relay connects to Arduino Omega and I can only turn the fans on/off. Please advise, Thank you much for your help.

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

      You can also turn the motor off with a H-Bridge by setting the Duty Cycle of the signal to zero :)

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

      @@SINConsulting i should have read that lastminuteengineers site before asking questions...great article on the L298N...but thanks again...

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

    loved it!!

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

    Hi, I have followed all the steps, but the motor does not seem to be rotating when the Arduino code is compiled and executed. Can you help me out?

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

      Hey mate, have you confirmed your circuit is correctly setup and powered ?

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

    love your videos:-)

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

    Nice.

  • @minhtruong8856
    @minhtruong8856 8 месяцев назад

    Thank you!!!!!!!!!!!

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

    Can yow tell me with slow tutorial? Plis

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

      Which part was too fast ? You can slow down the VI creation sections if you want to see it line by line.

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

    God

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

    I can't understen.

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

    ı have a some porblemes

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

      Hi Busra, what issues are you having?

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

      @@SINConsulting First of all because you explained it in a very detailed and beautiful way and step by step. thank you. I've done all the installations and also used your .vi on github but I'm having problems controlling the engine. It responds late, the engine runs but does not react to the commands I give later. I am using clone arduino. 💖

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

      Sir, can you help me please ?

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

      Sure, there shouldn't be any delay in the VI because there is no timing functions in the while loop. So it's set to run as fast as your CPU can handle. A few things you could try to debug this issue is:
      1. Make sure you are stopping the VI by only using the STOP button, do not use the Abort button because this sometimes can tie up the VISA resources;
      2. Make sure the duty cycle is set correctly;
      3. Re-upload the LINX/Hobbyist Firmware and try a different USB port;
      4. Check your circuit to ensure everything is grounded properly.
      5. Make sure you are not powering your MOTOR and DRIVER through the Arduino 5V, but through an external 5V power supply.
      Then try to run the example again, if it still doesn't work, try running the basic LINX blink example to see if that code runs without any issues. If it does, then the problem is with the motor controller VI you're using, which you might want to re-write again on your LabVIEW edition to test :)
      Otherwise, if that all fails please send me the VI you are using through my email listed on my YT channel and I'll take a look to make sure it's all fine.

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

      @@SINConsulting Hello Sir,
      I did what he said one by one and checked it and there are no errors. I am using Labview 2020. I tried a different exit but still the engine does not work.
      If we come to the example of turning on the led, the led lights up late here and then the commands I give are not detected by the arduino and gives the error 5001 code.
      Both the LED and the motor work one time and they cannot perceive the commands I give later.

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

    Hi.
    Nice video.
    But the link to github doesn't work:
    GitHub: tiny.cc/yxjsbz9pm

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

      Thanks for picking that up - here is the link to my GitHub: github.com/SINConsulting/LabVIEW-Basics