Arduino Stepper Motor Tutorial! Widget46

preview_player
Показать описание
Stepper Motors, Arduino and CNC'd parts - three of my favorite things! We get a lot of questions about how to control motors - thus this is the start of a series on that exact topic!

This video covers 5 topics:
1) Arduino Stepper Setup
2) Stepper Full Rotation (360 degrees)
3) Speed control with potentiometer
4) Button control to both start/stop and run-while-hold
5) Speed issues with Steppers in Arduino Code

Purchase Links:

I'm REALLY excited for this series! We've going to cover DC gearmotors, rotary encoders, more positional tracking and advanced Arduino motor control and programming!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Reach us / CNC Info:

Рекомендации по теме
Комментарии
Автор

You’re “not an Engineer and not a Machinist” you’re “self taught”. You, Sir John, are a bad a—! Very Nice! You just pushed me over the edge to start mucking with this stuff. Thanks!

foomanchewthis
Автор

For someone that may be completely new to motors and electricity, good video. For others that have experience in both, not so much, please don't try and explain something that isn't clear for yourself, like "put current on it". You apply voltage and it "pulls", or "draws" current. Another thing "I don't really like schematics, i don't read schematics", isn't a good way to teach people. BTW pin layouts are schematics if they are not in paragraph form like in your code. Schematics are EXTREMELY helpful. Become friends with schematics. You will be amazed how many people will watch this, copy exactly what you say without doing their own research, and repeat it.

**I am subscribed and I do enjoy watching the NYC CNC vids, which are very interesting and very informative, but this one so far at 2:25 got to me.

Thanks,
Kyle

kylefugatt
Автор

I love it how simple the explanation is.
Keep it up! The world of education needs more guys like you!

coldmow
Автор

Very nice introduction. I like that you kept in concise and kept the speed in arbitrary units and no acceleration or even motor libraries in the first video.

mortensentim
Автор

Thanks so much for making these videos! I couldn't find this information anywhere else, but now I've built an arduino based CNC milling machine, I couldn't have done it without these videos. Thanks bro.

jwhitestone
Автор

Awesome! Can’t wait for more stuff like this.
Also a quick little tip. Instead of doing Distance = Distance + 1; you can use Distance ++;
Also if you wanted to increment a number more than one for example three you can use Distance += 3; both tricks works with negative numbers as well just replace the + with -.

Ninjat
Автор

came here recently.

I am basically doing similar, just controlling the steppers via a Raspberry Pi (rather than an Arduino), and a bit lower-level (my stepper drivers are made out of raw transistors, and controlling them involves a little more than a direction-pin and a movement pulse).

using them basically to build a makeshift CNC machine (mill style, with an XY table and a tool head which moves in Z), which is mostly already built (but I have some doubts about its reliability/accuracy). construction is mostly made out of OSB with some steel pipe and 3D-printed plastic parts.

the steppers generally move things by spinning all-thread, with nuts used for movement (except for Z, where the nut is in a gearbox and moves the all-thread). a pair of steppers is used for Z as a single stepper was having a hard time moving the 17lb tool-head assembly. it isn't all that big (about the size of a short washing machine), but last measured, the thing was around 150 lbs.

have noted, with two steppers, the motors can also move the head-assembly with a cat sitting on top of it (not where he could get injured, also the XYZ movement is pretty slow).

thing is generally running at 12 volts, with an ATX PSU as the power-supply.

the code is fully custom written (including the G-code interpreter and similar).

BGBTech
Автор

goood explanation and showing problems with analogread in loop. I learn that also hard way, now I like to use memory to store only data if is not changed, this method speed up a lot

maximo
Автор

A Digital Rotary encooder can be substituted for a Pot and will have a much faster conversion rate. These operate as using the same principle as linear scales used for a DRO (usually using quadrature encoding). The issue is with Pots is they can generate a lot of noise and have trouble providing linear output near the position ends which can trip up the arduino to change speed suddenly when you move it just a tiny amount in a dead spot. 

I believe its possible to monitor the stepper current pulses to detect skipped steps, although I never looked into this method.

Another idea is to use a timer and interrupt to provide consistent loop delays. its possible to use a timer on the arduino that sends periodic interrupts that pulses the stepper pins.Instead of adjusting a count down loop for delay you adjust the timer (hardware) delay. The issue is that the more and more code you add to your loop the less and less responsive the stepper will become. You start to run into vibration issues because your control loop will not pulse the stepper smoothly. Thats when the timer/interrupt configuration comes in handy.

It might also be worthwhile using a better performance controller, such as an arm or pic-32 since arduinos have limited memory and processing capacity. I believe there are now arduino pic-32/arm kits available. Another option is the rasberry pi which runs linux but does have user controllable I/O pins.  I believe some routers/3d-printers use the raspberry pi with Linux-EMC.

guytech
Автор

These Arduino videos are cool. It is nice to see something moving in response to coding. Interested in seeing more of the Arduino CNC stuff.

chiparooo
Автор

John because of you I am getting more interested in motors. When I was young not so much. Well, on another note Sue and I bought a house and the garage is two stories and is large enough for 4 cars and it is heated with water.  Next summer I will add on to it.  I applied for the Veterans app with Solid works should have that approved tomorrow or the next day.  I wonder if I can make some sort of freight elevator for the garage from the ground floor to the second floor for many reasons. We shall see thanks for the vid.... Good times good times....

CSSIandAssociate
Автор

Hey John, another nice Arduino demo. Curious to see what interesting problems in the shop you'll be solving with them ;). You should be able to use the timer hardware in the AVR on the Arduino board to generate a fixed period pulse train without needing any involvement from the main code path. Then you can poll your pot or do whatever else on the side and just update the timer period when you need to.

KeenanTims
Автор

I'm loving this, I just bought an arduino uno board myself for a project im working on, this is going to be a sweet little series, looking forward to seeing the next episode on arduino :)

pugo
Автор

Thanks for the tutorial.  My Arduino is "in the mail" and hopefully it will arrive faster than the proverbial check that is in the mail.  I figured I was done with programming when I retired but I guess not.  Thanks for the video.

AmateurRedneckWorkshop
Автор

Excellent presentation. Style, tone, content is very pleasant to watch and learn. Thank you.

hollosaroka
Автор

Great video. I work with Arduinos and steppers a lot. I will look up your other videos.

skoootles
Автор

NYCCNC is doing Arduino videos.  Arduino Versus Evil is doing machining videos.  Cats living with dogs.  It's the apocalypse.

LibertyEver
Автор

Nice video, cool combine CNC and stepper control with Arduino

ceesruiter
Автор

Love the video, soo confused though. I have a 12v nema 17 and used easy driver with 12v supply, 1amp, easy driver got really hot and kept breaking, gone through 3 now, even the motor got hot. Am I missing something really easy people??

cambike
Автор

Hey john, another great video.... The audio seemed to have some static with it, just a heads up.

hailchristian
welcome to shbcf.ru