Arduino Beginners Getting Started With NEMA 17 Stepper Motor and The L298N Motor Driver Module

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

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

  • @racquelsample3910
    @racquelsample3910 2 года назад +3

    Love it great

  • @josephnudelman1420
    @josephnudelman1420 10 месяцев назад +2

    Awesome video. I bought my own controller/driver to use in conjunction with my captive actuator. You helped me overcome some conceptual mountains!

    • @BMonsterLaboratory
      @BMonsterLaboratory  10 месяцев назад

      Great to hear! Stick with it and you'll learn something new every day. Good luck with your future projects and thank you for this comment 👍 👍

  • @Platttraining
    @Platttraining 4 месяца назад +2

    Man this video does exactly what I am trying to do. Thanks so much for sharing and explaining it so perfectly.

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

      Thanks! I appreciate your kind comment. Good luck with your project! 💪 👍

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

    It’s very simple… but I truly appreciate seeing everyone’s instructions on how to use these.
    I need to see how the pins on other motor drivers actually impact speed etc….

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

      Thanks! I agree, it is simple once you connect a stepper or use it in a project or 2. Which motor drivers are you referring to? I have a couple of others.

  • @mickyas1000
    @mickyas1000 4 месяца назад +2

    Great video and excellently explained. 😊😊 I'm about to undertake a little DIY project which involves, a touch screen to control a stepper rotation and movement, but trying to source the correct, compatible components is mind boggling.this has helped me understand some basics. Thank you.

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

      That sounds like a fun project! What are you using for the touch screen display?
      Thank you for the kind comment. 👍😎

  • @alexmstudio
    @alexmstudio Год назад +2

    Really great tutorial! Thanks for the thorough explanations.

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

      I appreciate your comment, thanks! I'm glad it was helpful 👍

    • @BMonsterLaboratory
      @BMonsterLaboratory  4 месяца назад +1

      Thanks for the comment! I do appreciate it.
      I apologize if this reply is late, I don't see any previous acknowledgement on my part.
      If you have any ideas or questions about the video, I'm happy to help. Good luck with your Stepper projects!

  • @andrewgeorge1524
    @andrewgeorge1524 9 месяцев назад +2

    Great video, exactly what I was looking for. Thank You!

    • @BMonsterLaboratory
      @BMonsterLaboratory  9 месяцев назад

      hey there! Thanks for the compliment, I appreciate it. I'm glad you found the video useful 👍

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

    Really instructional, I am about to automate a little Christmas scene using a stepper motor with a NEMA 17 10.4 V 0.33 A . I am just trying to figure out why you need two power sources? The 9V and the computer powering the Arduino? I didnt know why you cant run the entire thing off of the power jack? Im pretty illiterate with electricity honestly though. Thank You!

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

      Hi Chris! thanks for the comment. Sounds like a fun project you're about to dive into. I don't power motors from the Arduino and in this video you can see I just chose to leave the USB plugged in for a power source. If you run a motor off the power pin of your Arduino it could potentially kill your board. Some small motors may be ok to run off the Arduino, but I just make it a habit to use external power when I run motors and other devices with similar power requirements. I could have unplugged the USB and connected the 9v power rail of the bread board to the VIN pin on the Arduino and to the motor driver. 9v is ok to use on both (Arduino & motor driver) because they both have a 5v regulator. I hope that helps. If you have any questions throughout your project, just shoot me a question on here, Facebook, or email. Good luck and Merry Christmas!

  • @nilugajjar8205
    @nilugajjar8205 Год назад +3

    I am your subscriber good explaining

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

      Thanks! I appreciate you watching and seeing this comment 👍

  • @json6764
    @json6764 4 месяца назад +1

    Awesome video, very informative Thanks.. will this work (code) with a Arduino Nano, need space! thank you!

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

      Thanks~! I appreciate it.
      Yes, it will work with Nano as long as the Nano pins you're using match the pins declared in the code. 👍

    • @j2host
      @j2host 4 месяца назад +1

      Thank you so much for replying so quickly. I appreciate you for sharing your knowledge and jumping right on it 👍

  • @NevesProjects
    @NevesProjects Месяц назад +1

    I am trying to get my 2 stepper motors to work with my Flysky rc transmitter/receiver but can't find any video's that show how stepper motors work with rc controllers, do you know if it would work If i replaced that potentiometer with my receiver ? in other words can I connect those 3 wires from the Arduino to the receiver instead of the potentiometer

    • @BMonsterLaboratory
      @BMonsterLaboratory  Месяц назад

      switching the potentiometer with your RC receiver output probably will not work as intended, because the two signals are different types of inputs. Taking the three wires from where the potentiometer was (V+, GND, and the analog output) and just hook them to the receiver’s servo channel (signal, V+, GND), the Arduino’s analog input will not read a stable voltage. It would see a quick changing pulse. Attempting to read this directly as an analog input won’t give reliable results. The Arduino’s analogRead() is designed for steady DC voltages, not digital pulses.
      you’ll need to modify your Arduino code to read the pulse width of the RC signal. Once you interpret that pulse width as a control value, you should be able to drive your stepper motor.

    • @NevesProjects
      @NevesProjects Месяц назад +1

      @@BMonsterLaboratory Ok I'll keep searching, Thanks for taking the time to reply

    • @BMonsterLaboratory
      @BMonsterLaboratory  Месяц назад

      @@NevesProjects you're welcome. I hope it works well for you! 👍

  • @Rollercole
    @Rollercole Год назад +2

    Thanks for this!!

  • @romaintarayre
    @romaintarayre 5 месяцев назад +1

    Great video! I followed your instructions, but I can only get my motor to move in random directions. Any idea what this might be? I'm using the A4988 and I adjusted the code for that. Thanks for the help!

    • @BMonsterLaboratory
      @BMonsterLaboratory  5 месяцев назад +1

      Thanks! I don't have the A4988 but there are lots of online diagrams. If you would like to share your code, just message it to me on Facebook. happy to take a look and help however I can

  • @terrycollebrusco7339
    @terrycollebrusco7339 11 месяцев назад +2

    Nice job

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

    Thanks for the tutorial! Quick question: Do the 4 pins on the Arduino connected to the L298N motor drive module have to be PWM pins, or can they be regular digital pins? Also, would analog pings A0 - A5 work as well?

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

      Hi there! The 4 pins don't have to be pwm, they can be digital or Analog. The Arduino has an analog-to-digital converter (ADC) that measures the value of analog signals. The ADC converts the analog voltage into a digital value. Use analogWrite(pin, value) to get the value. We can also use a potentiometer at A0 to control the stepper speed, but that's perhaps a video for another day.
      In the code we used here, just replace line 24 with this:
      Stepper myStepper(stepsPerRevolution, A0, A1, A2, A3);
      The code in the video is the stepper_oneRevolution.ino example in the Stepper.h library. Hope that helps!

  • @Henry-ty1qd
    @Henry-ty1qd 8 месяцев назад +1

    Hey, be carefull when copying the schematic from the video. I tried to copy what was done in the video, but the motor kept spinning in random directions. I followed the instructions as closely as possible, but it still didn't work for me. I even used the same model of motor and driver. As a last ditch effort i swapped a couple of the wires going from the driver to the stepper motor in an act of desperation, and after dozens of hours of brain-rott it magically worked. Not sure if the diagram is wrong or i had a faulty product but it finally worked. Im not mad at the creator, i just want share my experience, so that it may help at least someone out there.
    Kind regards Hen ry

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

      hi, thanks for the heads up. Sorry to have delayed your project. do you know which wires you switched? I was sure I had this diagram nailed down correctly. I'll go back and try it out again. Thanks again for the info

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

    How much torque does it produce with the 9 volt input pls ?

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

      Hi there! This 4.1v stepper at 9v will probably produce torque below the rated number on the Amazon post. 9v works for me but a nema 17 @ 4.1v has a recommended operation voltage of 10-12v. A nema 17 with a voltage rating of 4.1 operating at 9v 0.5A may produce a holding torque around .2Nm and operating at 1A could produce .4Nm (57oz-in). It's just an estimate and could change under different conditions.

  • @Brandon-qp7gq
    @Brandon-qp7gq Год назад +1

    Couple questions:
    1. Is the power 1-2 amps at 12 volts safe for humans? Do you need to take precautions?
    2. How do you know it's safe to power the arduino via the computer? Eg that electricity isn't feeding back through the signal wires from the driver board? Also the driver is powered from the house circuit, but what if the laptop is on battery power? What does it mean to connect the ground of the battery to the ground of the DC power supply from the wall?

    • @Brandon-qp7gq
      @Brandon-qp7gq Год назад +1

      Also, thank you for this great tutorial!

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

      Hi there!
      1. 12v is considered low voltage and 1-2amp is considered relatively low as well. You should always take precautions regardless of the amount of voltage and current you are using. Low current, as low as 10-20ma, could cause heart arrythmias. There are many factors in determining what is safe and what is not. Check out this website www.hsa.ie/eng/topics/electricity/dangers_of_electricity/
      If you're not comfortable with electric circuits, get help from someone who is experienced. Practice connecting low power circuits until you're confident. As always, be careful with electric connections and avoid getting shocked 💪
      2. Standard USB from a computer is 5v. It may fluctuate from 4.75 to 5.25 but I have never had a problem with powering small peripherals like leds or motion sensors this way. I have connected Arduino to my laptop and it has worked fine. If I ever use more than a couple leds or more than 20ma on one arduino pin, I will always use external power and I never power motors of any sort directly from my board.
      Current does not go through Arduino signal wires. Arduino signal wires carry digital signals, which are represented by voltage levels. When a signal wire is high, it is at 5V. When a signal wire is low, it is at 0V. The current that flows through Arduino signal wires is very small, typically less than 1 mA. This is because Arduino signal pins are not designed to carry high currents. If you need to power a device from an Arduino signal pin, you will need to use a transistor or other circuit to amplify the signal current.
      Did I say connnect the ground of the battery to the ground of the dc power supply from the wall? I was searching the caption and couldn't find it so i'm not sure what I was referring to.
      If you look at 10:20 I have 9v 1amp coming from a regulated power supply plugged into the wall. The positive wire is connected to the driver pin that powers the IC’s internal H-Bridge, which drives the motors. You can use 5-12v here. The neg wire is connected to the ground rail - you want your circuit grounded. If you want to unplug the USB power and connected Arduino VIN pin to the 9v rail, you could power the board that way.
      Thanks for the great questions. I hope I answered them without too much rambling. This is a hobby I enjoy and if you have anymore questions, please feel free to ask! Good luck!

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

      Thanks, Brandon!

    • @Brandon-qp7gq
      @Brandon-qp7gq Год назад +1

      @@BMonsterLaboratory wow, thank you for such a thoughtful response! This helps!

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

      you're welcome! enjoy your Arduino projects ~

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

    5:00 Sadly you are not explaining how to calculate your values.

    • @BMonsterLaboratory
      @BMonsterLaboratory  Год назад +3

      the NEMA17 stepper has 200 steps per revolution with a step angle of 1.8 degrees. With 360 deg in a full circle, 360 / 1.8 = 200 steps for one complete revolution.
      If you want to adjust the timing of your rotation check out my previous video - ruclips.net/video/I9GUL64_3Xw/видео.html - at 5:41 Thank you for pointing that out. If you have any questions I'm happy to do my best answering. good luck to you! 👍

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

    Second 😉

  • @woldecosgrove
    @woldecosgrove 8 месяцев назад +1

    wheres the code and diagram ?

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

      Hi! Code is straight from the stepper.h library. I show you how to load it to your board in the video. There is also a diagram in the video. 👍

  • @saturn_imploded
    @saturn_imploded 4 месяца назад +1

    thank you so much!! i struggled for an hour or so before i found this, explained everything amazingly 🤍

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

      Thanks! I appreciate the compliment. good luck to you on your projects👍👍

  • @Francisco-ch6uf
    @Francisco-ch6uf 2 года назад +1

    【p】【r】【o】【m】【o】【s】【m】 👏

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

      Hi Francisco! Good to hear from you. What does promosm mean? Just curious