How to drive a stepper motor easily using A4988 and Arduino

แชร์
ฝัง
  • เผยแพร่เมื่อ 20 ธ.ค. 2024

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

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

    nice buddy..but show us to use multimeter to measure the required current how slowly..

  • @zokitofaraon7807
    @zokitofaraon7807 13 วันที่ผ่านมา

    Hi sir, I have a question. How can I use A4988 on 3v 300mA micro stepper motor? Thank you

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

    how is the code if we using switch sensor as a output of step = high (500 rotation) and dir =high
    and then button switch to delay then change the dir=low step=high (500 rotation)

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

    6:13 I can't get this voltage on my driver with little potentiometer. I get maximum 0,03V. Where is the problem?

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

      Did you use the conductive screwdriver?

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

      ​@@miliohm Hi, I solve this problem, I am using driver L298N. It works perfect, but the motor is overheating after 10min of work. Do you know what is best option for solve this problem?

  • @ShrutiSrivastava-n8h
    @ShrutiSrivastava-n8h 10 หลายเดือนก่อน

    Hi, how do you configure the pins of the motor means which pin of motor is pin no.1(connected to 2B). I am not able to do as I am using BJ42D22- 23V01 NEMA17 motor.
    For me it is not working properly.

  • @imNobody160
    @imNobody160 4 หลายเดือนก่อน

    i need to know what kind of stepper motor, please

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

    does this work also in cnc shield?

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

    In your calculation the "2.5" value is a bit of a mystery. I assume it represents the "sense Resistor" value times the motors stepper setup percentage use (in my case this should be i00%). In another video the formula was "Imot x 8 x Sense Resistance (according to this guy the value "for most A4988"(?) for this resistance is 0.068 Ohms). With his calculation I get a VRef = 0.816 Volts and with your calculation I get a VRef = 0.600 Volts. Which is correct? How do I know (without burning up my stepper or driver)? The only Spec Sheet I found doesn't list a "Sense Resistor Resistance", where can I find this value reliably?

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

      Hi! where you able to find the solution? I have the same issue

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

      The truth is “not with any confidence” but it worked anyway. The two surface mount resistors next to pins 18 and 24 (on my board) when magnified have 100 imprinted on them. From there I did some research to determine what the value of the SMD’s were (it’s been a while and I’d have to rediscover my notes and research), however these appeared to be, also based on blogs and conversations like this, to be the correct resistors who’s value(s?) were used to calculate, hopefully correctly. The result in the end was that my NEMA 17 driven star tracker worked. However mechanical issues related to the PLA 3D printed frame and gears driven by a curved threaded rod produced other issues. If I do this again I will pivot a straight rod and make the frame from 3/8” plywood in order to safely support my heavy camera rig. A lot of frustrations in this project that ultimately left me with more problems than time to solve them. The A4988 was the least of my concerns!

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

      @@NedSar85 Note! That there is a reply to your question but you have to open the discussion to see it. I replied the wrong way, sorry!

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

    hello, please help, my motor is just vibrating. Also im usin 24v, is that the issue?

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

    why my stepper cant move ?

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

    What is the silver thing you stick on the top of the chip?

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

      that's called a heatsink, a metal to increase the heat of the IC.

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

      @@miliohm Thanks for replying so fast.....I just googled it and found out from there also.

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

      @@sampuraktalukdar1374 It's Aluminum, to decrease heat of the IC. It's very important for the driver and motor to be able to use the rated current (around 2.5A for my Nema 17). Without the heatsink, it's only rated for half the current! Get some.

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

      @@robertbrodersen4438 Oh thanks for the info?
      So the motor not running in my case may probably be due to the lack of heat sink?....
      Also I kept an led at the 4 outputs of the driver and it didn't blink neither damage (due to excessive volts) , so does that mean the driver ain't giving no output?

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

    // A4988 Stepper Motor Driver Pins
    const int dirPin = 7;
    const int stepPin = 6;
    const int enablePin = 5;
    // Stepper motor steps per revolution
    const int stepsPerRevolution = 200;
    void setup() {
    // Set the enablePin, dirPin, and stepPin as OUTPUT
    pinMode(enablePin, OUTPUT);
    pinMode(dirPin, OUTPUT);
    pinMode(stepPin, OUTPUT);

    // Enable the motor by setting enablePin LOW
    digitalWrite(enablePin, LOW);
    }
    void loop() {
    // Set the motor direction to clockwise
    digitalWrite(dirPin, HIGH);

    // Step the motor for one revolution
    for (int i = 0; i < stepsPerRevolution; i++) {
    digitalWrite(stepPin, HIGH);
    delayMicroseconds(500); // Adjust this delay to control motor speed
    digitalWrite(stepPin, LOW);
    delayMicroseconds(500); // Adjust this delay to control motor speed
    }

    delay(1000); // Delay between rotations

    // Set the motor direction to counterclockwise
    digitalWrite(dirPin, LOW);

    // Step the motor for one revolution
    for (int i = 0; i < stepsPerRevolution; i++) {
    digitalWrite(stepPin, HIGH);
    delayMicroseconds(500); // Adjust this delay to control motor speed
    digitalWrite(stepPin, LOW);
    delayMicroseconds(500); // Adjust this delay to control motor speed
    }

    delay(1000); // Delay between rotations
    }

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

    What’s the name of the part that you screw with the screwdriver?

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

      It's called trimpot or potentiometer

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

    Hi my friend, I have a question, and maybe you can help me, so, how can I control 2 motor to move at same time, can I take same signal for to drivers? Tks

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

      Yes you can, but you should know that the amperage maybe become a problem. The driver will get hot easily.

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

    I would like to adjust the engine revs using various buttons, does anyone know if this is feasible?

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

    i am facing the same problem had tried all the solutions changing wire combination, code, pins drivers but the motor is still sometime gives a beep only or rattles with beep and the strange thing is that motor is showing continuity in all four pairs, led blew up no matter what the wire combination is it show continuity on pairing 1,2 -1,3 -1,4 and so on for all. I had tried running motor directly with arduino without motor driver and it is running, but facing issue while it is connected to CNC shield with A4988 driver.
    I am using Arduino uno and motors are 4 pinned. Could you please tell me what I am doing wrong?

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

      are you already set the max current using the potentiometer?

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

      @@miliohm yup current is up to the mark

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

      @@miliohm can you please tell me the reason that why motor is coils is showing continuity in all pairs ? wont it just show in any 2? but its showing continuity with every coil, like I Checked continuity on pin 1 and 2 Ammeter beeps and then I connected pin 1 and 3 it again shows continuity and same goes with pin 2 and 4. it's Nema 17 stepper motor with 4 pins. Can you tell me the reason behind this? AFAIK It should show continuity on any 2 and not on all. Correct me if I am wrong
      Thanks.

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

    Hello , Iam really so gratful for this project because its worked well for my prototype. May God bless you abundantly

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

    How much amps and do you need for moving the motor? Does it get a good torque? Thanks!

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

      Not so much seeeing power cable is 20-18awg. My bet it's less than 2 amps.

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

    How to drive two stepper motor using two drivers????? Is it possible?????

  • @eastindiacompany691
    @eastindiacompany691 3 หลายเดือนก่อน

    It's really nice and helping vedio.How I can change the program as per my application. can you help me to change the program as per my requirement, for which I shall be very thankful to you.
    S.N.MALIK
    India.

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

    Eu estou com um projeto para uma maquina na area da serigrafia . Com motor nema 17 e um eixo T8 na vertical e uma chave fim de curso em cima e outra em baixo . E dois botoes um para ativa o moto para decer e para quando ativa a chave fim de curso e outro botao para subeir o motor e para quando ativa a chave fim de curso . Mais nao sei como vou fazer isso nao sei mexe com arduino e nem programa .esse meu projeto e bem simples espero um dia consegui .

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

    Untuk barang2 nya apakah bisa di beli di online market place indonesia? Boleh tau untuk nama/jenis motor stepper nya?

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

      Banyak mas, bisa cari dengan kata kunci stepper nema 17

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

      Makasih mas, sangat membantu

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

      @Istiqlal Silaban namanya breadboard broo

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

    maximal voltage a4988 ??

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

      Motor max voltage is 35V

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

    Mas ada schematic wiring nya ga ya

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

      Coba dibaca deskripsinya mba

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

    Untuk power supplynya 12v dc 5A apakah bisa?

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

      Bisa

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

      Berarti gambar rangkaian yang di web itu kapasitor 47uF cukup menggantinya menggunakan power supply seperti di video ya?

  • @vincentiusdhimasr.p.2695
    @vincentiusdhimasr.p.2695 3 ปีที่แล้ว

    Mau tanya bang, kalau motor nya tidak bisa berputar ccw itu kenapa ya? Padahal sudah sama seperti di video juga

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

      Apakah sudah diatur arus maksimalnya?

    • @vincentiusdhimasr.p.2695
      @vincentiusdhimasr.p.2695 3 ปีที่แล้ว

      @@miliohm Vref nya saya atur 0,5 V. Apakah kurang kalo utk motor nema 17?

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

      @@vincentiusdhimasr.p.2695 Coba-coba aja diputar naik turun, kalau tetep ga jalan cek apa wiringnya sudah benar. Dan kalau tetep tidak jalan coba pake ganti drivernya. kadang kalau yang bajakan suka ada yang rusak

    • @vincentiusdhimasr.p.2695
      @vincentiusdhimasr.p.2695 3 ปีที่แล้ว

      @@miliohm siap, terimakasih infonya 🙏

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

    In my case. It does not work. I tried different arduino boards (uno, mega), different steppers (nema 17) and a4988

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

      Sometimes there is fake A4988 in the market. It really easy to get hot, and doesn't work. Check the temperature of your A4988

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

      @@miliohm Hey do you know how to check if A4988 is working or not?...

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

    Min ini punya saya awalnya bisa normal terus skrg muternya ga jelas cuma geter2 aja gitu knp ya? Saya sudah cek wiring tidak ada yg salah

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

      Coba putar potensio yang buat arus mas

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

      Di perbesar apa diperkecil ya min?

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

      Dicoba adjust aja, naik turun biasanya gerak

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

    u change my life thx

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

      Thank you bro!

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

    thank you for this you are very good in teaching

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

      Thanks!

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

    Boleh minta codingnya paman

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

      baca deskripsinya bro

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

      @@miliohm ok siap trimakasih

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

    Thanks

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

    Because you have a strong accent it's a little difficult to understand you. The completely unnecessary background "music" makes it all but impossible.

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

      Thanks for the suggestion, will do better next time. And please turn on the subtitle to understand more

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

    Mosok didin iki?
    Wkwkwk

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

      iyo mas, rak percoyo ik. wkwk