EasyDriver A3967 Stepper Motor Driver Tutorial with Arduino Code

  Рет қаралды 46,989

Science Fun

Science Fun

Күн бұрын

Пікірлер: 73
@ScienceFunInnovations
@ScienceFunInnovations 5 жыл бұрын
Please help my new channel get some traction on KZbin by liking, sharing, and subscribing so that I can continue to make helpful and fun tutorials (I've got some great ideas in the queue). I need 1000 subs in order to monetize my channel to help reinvest in equipment for future videos. Thanks for watching!
@ScienceFunInnovations
@ScienceFunInnovations 4 жыл бұрын
Anyone done any creative projects lately with the EasyDriver board?
@figspigsandfeathers8179
@figspigsandfeathers8179 4 жыл бұрын
@@ScienceFunInnovations Came across your video looking at this board and stepper motor to operate an automated chicken coop door. Currently I have several doors using standard small dc motors and they work okay, the stepper motor application seemed interesting to me. So for my application I would need to run the motor forward for a time then stop, later, run the motor backward for a time and stop. With the dc motors, I run them for a number of seconds and cut them off when a limit switch is reached. Should the switch fail, the seconds expires and the motor cuts off anyway. I'm using a Mosquito MQTT server on a Raspberry Pi, along with Node-Red to control a NodeMCU ESP8266 with ESP Easy firmware. This combination works really well for my needs, but doesn't seem to be a mix I see very often. The big benefit of using a stepper motor is the ease of matching the motor to a lead screw and associated hardware. Most chicken automatic chicken doors want to wind a string to open the door. A lead screw provides a much better lock on the door which is better suited to thwart raccoons that would quickly thief a chicken dinner.
@magdcs
@magdcs 14 күн бұрын
The surpise at the end topped it for me. Great video all around.
@ScienceFunInnovations
@ScienceFunInnovations 12 күн бұрын
Glad you liked it.
@DougsMessyGarage
@DougsMessyGarage 3 жыл бұрын
An easy way to tell if you have the wires in pairs on a stepper motor is to hold two wires together and turn the shaft. If the wires are a pair, the motor will resist turning. If the motor turns freely, you have one wire from each coil set so try another wire. No multimeter required.
@ScienceFunInnovations
@ScienceFunInnovations 3 жыл бұрын
Great idea!
@malcolmhodgson7540
@malcolmhodgson7540 3 жыл бұрын
Perfect explanation. Stunningly good tutorial. So helpful. now I just need mine to arrive!
@ScienceFunInnovations
@ScienceFunInnovations 3 жыл бұрын
Glad it was helpful!
@jimbooth2010
@jimbooth2010 Жыл бұрын
Best explanation on a stepper board i have watched. Are you still making youtube videos?
@ScienceFunInnovations
@ScienceFunInnovations Жыл бұрын
It has been about a year since my last, but I am working on two new ones today that should post on Monday.
@104littleal6
@104littleal6 3 жыл бұрын
The ultimate badass Bruce Lee. I saw it as soon as the eyes were revealed. 😎
@ScienceFunInnovations
@ScienceFunInnovations 3 жыл бұрын
:-)
@brogannicholas1599
@brogannicholas1599 3 жыл бұрын
Ditto
@arduinouno839
@arduinouno839 3 жыл бұрын
excellent! i tried it on TB6600 and it s works.
@ScienceFunInnovations
@ScienceFunInnovations 3 жыл бұрын
Glad it helped. I'm using some TB6600's right now on another project.
@Dancopymus
@Dancopymus 3 жыл бұрын
I cannot understand the sequence of the wire connections. I have several stepper motors (unipolar and bipolar) and this is my biggest difficulty. The sequence of the stepper motor wires I know how to do; I just don't know the sequence to connect to Easy Driver; it is a logical sequence like 1 & 2 = [A] and 3 & 4 = [B]; or 1 and 3 = [A] and 2 & 4 = [B]? Can you help me? Thanks
@ScienceFunInnovations
@ScienceFunInnovations 3 жыл бұрын
It doesn't really matter which coil goes to output A or B. It's just important to find which wire on the motor go the same coil. One way to check is with a battery. If you connect a battery to two wires and the motor resists turning, you have found one coil. If the motor spins the wrong direction, just switch the two wires on one of the coils. Hope this helps...
@BrilliantDesignOnline
@BrilliantDesignOnline 3 жыл бұрын
Great explanation and appreciated. BUT...edit your sound levels, or always use the lapel mic. And it is either Justin Bieber :-O or Bruce Lee :-)
@ScienceFunInnovations
@ScienceFunInnovations 3 жыл бұрын
Noted! I'm new to this video stuff. Thanks for the feedback.
@MakerDan55
@MakerDan55 Жыл бұрын
Very helpful. Thanks 👍🏿
@ScienceFunInnovations
@ScienceFunInnovations Жыл бұрын
Glad it was helpful!
@joranvancoillie8133
@joranvancoillie8133 4 жыл бұрын
Can you help me? My stepper motor is rated at 8V, does this mean I can't use an external power supply that's higher than 8V for my EasyDriver? I'm currently using a 12V external power supply and it does seem fine. I know the EasyDriver can have an input of 6-30V but how do I know how much is going through the motors?
@ScienceFunInnovations
@ScienceFunInnovations 4 жыл бұрын
The good thing about the EasyDriver is that it is current limiting. My guess is that providing 8V directly to one of the coils would provide the maximum current (which is really what is important). If you know the resistance of the coil, you can calculate the max current dividing 8V by the number of ohms. As long as you adjust the screw on the EasyDriver to deliver less than the maximum current (as shown in the video) your input voltage will not matter. You should be able to use 12V power supply just fine and the EasyDriver will protect your motor. If your motor feels too hot, you can turn down the current even more on the EasyDriver. Hope this helps, and thanks for watching!
@joranvancoillie8133
@joranvancoillie8133 4 жыл бұрын
@@ScienceFunInnovations Thank you for the detailed answer!
@easy_engineering_drawing
@easy_engineering_drawing 3 жыл бұрын
These easydriver supports upto stepper motor NEMA 23, 24 34...? Sorry if it sounds stupid. I did not study this electrical.
@ScienceFunInnovations
@ScienceFunInnovations 3 жыл бұрын
Good question. The easydriver will work with larger stepper motors but will have limited holding torque due to the maximum current. It just depends on how strong you need the motors to be.
@raymondmichael4987
@raymondmichael4987 3 жыл бұрын
Well explained everything important.
@ScienceFunInnovations
@ScienceFunInnovations 3 жыл бұрын
Thanks for watching!
@michaelcostello6991
@michaelcostello6991 4 жыл бұрын
Nice lecture. Thanks. Why does current affect the speed. One would think its just the pulses from arduino board. please explain.
@ScienceFunInnovations
@ScienceFunInnovations 4 жыл бұрын
Good question. You can control the speed with the Arduino up to a point. The Arduino can send commands faster than the motor can respond. The higher the current, the longer it takes to magnetize and demagnetize the coils. The magnetic fields act as resistors to the flow of electricity. The higher the current, the stronger the magnetic field, the more time it takes to change the magnetic field. In order to have the motor turn fast, you need to rapidly change the current flow in the coils. High current increases the torque, but makes it harder to rotate quickly. Thanks for watching!
@Gontrill
@Gontrill 3 жыл бұрын
What about the h-bridge functionality? How to use it?
@ScienceFunInnovations
@ScienceFunInnovations 3 жыл бұрын
Easydriver is a stand alone solution. I have another video about H-bridge and stepper motors.
@Gontrill
@Gontrill 3 жыл бұрын
@@ScienceFunInnovations i was wondering if I could use this board to control 2 dc motors as woth the L298N. I would like to do this because the L298N comes with a big heatsink which is not needed for the 6v from a couple of batteries I'm gonna send to the motors
@gatyi28
@gatyi28 3 жыл бұрын
Wow man that was a perfect explanation. Thanks a lot helped me so much
@ScienceFunInnovations
@ScienceFunInnovations 3 жыл бұрын
Glad it helped. Thanks for watching!
@omnianti0
@omnianti0 2 жыл бұрын
is it possible to manually activate the steper motor by soldering a push buton inbetween the +5 and step pins
@ScienceFunInnovations
@ScienceFunInnovations 2 жыл бұрын
Yes. But you would have to push many times to get it to turn. :-)
@omnianti0
@omnianti0 2 жыл бұрын
@@ScienceFunInnovations actually it not make 1.8deg when i push it and i dont feel any resistance in the axis maybe because i let all the pins loose and not grounded ?
@MegaClaudj
@MegaClaudj 4 жыл бұрын
Does anyone know if I can connect two of these drivers (ms1 ms2, step, dir, sleep of each of the two drivers in parallel) so that each one commands its steper motor with a single arduino board?
@ScienceFunInnovations
@ScienceFunInnovations 4 жыл бұрын
Yes. You can connect in parallel and control several EasyDrivers with one Arduino. Also, you don't have to always connect ms1, ms2, sleep, to the Arduino. You can wire them directly to GND or 5V if you always want them off or on. For my etch-a-sketch project kzbin.info/www/bejne/mmeoeKl5pb6dbLc I control two steppers with one Arduino and only connect "step" and "dir" (only uses 4 Arduino pins).
@samrodian919
@samrodian919 4 жыл бұрын
Hi, I have just done this Arduino programme and I get an error code for the first line of the void code, it says. ' " direction_pin" does not name a type' can anyone help me correct this as I have no idea what to do as far as Arduino language is concerned, any input would be helpful. Also I am looking to control the rpm's with a potentiometer. Could you help me with the code for this using an Arduino uno v3 and this motor controller here. Many thanks, Samrodian
@ScienceFunInnovations
@ScienceFunInnovations 4 жыл бұрын
Send the code to my business email and I will take a look. No promises, but I will take a look. sciencefunbiz@gmail.com
@prashantchopde9020
@prashantchopde9020 3 жыл бұрын
Sir, Would it be possible to run this driver using input from "REES52 Stepper Motor Driver Speed Board Controller Pulse Signal Generator Module" I am a amateur and would appreciate your reply as to the connections. Thanks
@ScienceFunInnovations
@ScienceFunInnovations 3 жыл бұрын
I am not familiar with that module, but there are several stepper motor drivers out there and they pretty much work the same way. Thanks for watching!
@stephenengland6659
@stephenengland6659 Жыл бұрын
Can I have a link to the website please.
@ScienceFunInnovations
@ScienceFunInnovations Жыл бұрын
I don't have a website (yet) but Science Fun Innovations is on Facebook.
@leonardoavendano6031
@leonardoavendano6031 3 жыл бұрын
Hello, what size are those plastic screws black color holding in place the easy driver? I am trying to attach everything in place in a personal project, thanks, Leo
@ScienceFunInnovations
@ScienceFunInnovations 3 жыл бұрын
I used M3 (3mm) screws. I used nylon screws, standoffs, and nuts and they worked really well (and I didn't want to short anything). Good luck on your project!
@leonardoavendano6031
@leonardoavendano6031 3 жыл бұрын
@@ScienceFunInnovations Great, thanks for you answer. I have another question for you, my steppers have a rated current of 1.7A, is this the reason why I cant get them to go faster? I am wondering if the easy driver you are using will be strong enought to provide for those steppers. if so, is there another way to increase the speed if increasing voltage and decreasing amps didnt work? Thanks a lot!
@ScienceFunInnovations
@ScienceFunInnovations 3 жыл бұрын
@@leonardoavendano6031 To get high speed with Easydriver, raise input voltage (up to 30V max), turn down the current setting, and/or find motors with lower induction. 1.7 is just a max current. If you care more about speed than torque, you can drop the current on the ED. Hope this helps.
@leonardoavendano6031
@leonardoavendano6031 3 жыл бұрын
@@ScienceFunInnovations Unfortunatelly the speed didn't change with those modifications. I would say my last try to speed up those steppers would be modifying the code, changing steps or frequency?
@ScienceFunInnovations
@ScienceFunInnovations 3 жыл бұрын
@@leonardoavendano6031 The code definitely controls the speed. Reduce the time in between pulses, or you can play with the tone command to see how fast it will go.
@darthnegativehunter8659
@darthnegativehunter8659 4 жыл бұрын
i'm not very familiar with the type of controller you are referring to. why did you say don't plug out or you will burn your board?
@ScienceFunInnovations
@ScienceFunInnovations 4 жыл бұрын
Don't disconnect the motor wires while the easydriver board is energized, or it can damage the board. Not really a problem if you use the solder board, more of a problem with the pin header version.
@darthnegativehunter8659
@darthnegativehunter8659 4 жыл бұрын
@@ScienceFunInnovations ty, i read about it here : electronics.stackexchange.com/questions/345003/why-does-disconnecting-a-stepper-motor-while-powered-on-damage-the-driver seems like the inductive current may try to find another way and do a spark like current on a mosfet.
@shivar8023
@shivar8023 3 жыл бұрын
hello I'm learning about stepper motors using arduino.. It just works fine... but the actual problem is after uploading the basic stepper motor code to arduino; its not rotating one complete rotation can u help me???
@ScienceFunInnovations
@ScienceFunInnovations 3 жыл бұрын
How many pulses (steps) are you sending and how many degrees is the motor turning? May have to do with micro stepping...
@shivar8023
@shivar8023 3 жыл бұрын
@@ScienceFunInnovations I have uploaded basic stepper code which performs one rotation in clockwise and two rotations in anti-clockwise direction with 200 steps... The motor works fine but it is not rotating completely in both the directions... I'm using nema 17 with easy driver (a3967 module) and arduino uno For current limit setup in easy driver, the voltage we set to is 1.792 V Could you spot the error which I'm making?
@novusordo201
@novusordo201 3 жыл бұрын
Your inductance value is most likely wrong. It should be 0.0046 not 0.046. So the calculated speed is x10 what you show.
@ScienceFunInnovations
@ScienceFunInnovations 3 жыл бұрын
I'll have to check on that...
@itaizrihan5701
@itaizrihan5701 4 жыл бұрын
how do u mircostepping? i cant understand the datashit
@ScienceFunInnovations
@ScienceFunInnovations 4 жыл бұрын
Micro stepping is done with pins MS1 and MS2. Depending on which pins are connected to 5V (HIGH) and which are connected to GND (LOW). By default, both pins are HIGH and the board will do 1/8 steps. If you connect both pins to GND, there will be no micro stepping. If MS1 is HIGH and MS2 is connected to GND, it will do 1/2 steps. If MS1 is connected to GND and MS2 is HIGH, it will do 1/4 steps. Hope this helps.
@smarshallfamily3410
@smarshallfamily3410 2 жыл бұрын
Bruce lee
@ScienceFunInnovations
@ScienceFunInnovations 2 жыл бұрын
Yep.
@alvarobyrne
@alvarobyrne 4 жыл бұрын
bruce lee
@ScienceFunInnovations
@ScienceFunInnovations 4 жыл бұрын
You got it!
@alvarobyrne
@alvarobyrne 4 жыл бұрын
So many (good) info! TY YT
@radeopbr2143
@radeopbr2143 2 жыл бұрын
you can not explique good
@ScienceFunInnovations
@ScienceFunInnovations 2 жыл бұрын
What part was unclear?
Big Stepper Motors with Arduino
29:43
DroneBot Workshop
Рет қаралды 1,2 МЛН
Arduino Solar Tracker with USB Phone Charger - DIY Tutorial
29:43
Wait for the last one 🤣🤣 #shorts #minecraft
00:28
Cosmo Guy
Рет қаралды 13 МЛН
А что бы ты сделал? @LimbLossBoss
00:17
История одного вокалиста
Рет қаралды 11 МЛН
Use stepper motor drivers correctly with the Arduino UNO!
14:58
Edi's Techlab
Рет қаралды 23 М.
I tried the 3 Cheapest Arduino Alternatives! (That you Suggested)
13:21
Stepper Motors with Arduino - Controlling Bipolar & Unipolar stepper motors
50:22
How to Control a 12V Motor with Arduino: Easy Wiring & Code Examples
44:13
Beginners Guide To Using Large Stepper Motors: #087
19:49
Jeremy Fielding
Рет қаралды 296 М.
What Makes TMC2208 Stepper Motor Drivers Silent?
9:07
Michael Klements
Рет қаралды 304 М.
MOSFETs and Transistors with Arduino
40:50
DroneBot Workshop
Рет қаралды 1 МЛН