Arduino Stepper Motor Tutorial! Widget46

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

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

  • @foomanchewthis
    @foomanchewthis 6 лет назад

    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!

  • @kylefugatt32
    @kylefugatt32 8 лет назад

    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

  • @coldmow
    @coldmow 9 лет назад +4

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

  • @mortensentim511
    @mortensentim511 9 лет назад +2

    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.

  • @jwhitestone
    @jwhitestone 8 лет назад +2

    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.

  • @45Ninjat
    @45Ninjat 9 лет назад +3

    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 -.

    • @diygarygaming
      @diygarygaming 5 лет назад

      For beginners, it's good to tell them Distance=Distance+1; . Then they understand the underlying process of what they're doing, rather than teaching the shortcut right off the bat.

  • @Abom79
    @Abom79 9 лет назад +18

    Cool stuff John! I enjoyed.
    Adam

  • @BGBTech
    @BGBTech 9 лет назад

    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).

  • @guytech7310
    @guytech7310 9 лет назад

    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.

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

    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

  • @hailchristian
    @hailchristian 9 лет назад +5

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

  • @chiparooo
    @chiparooo 9 лет назад

    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.

  • @cambike
    @cambike 7 лет назад +1

    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??

  • @CSSIandAssociate
    @CSSIandAssociate 9 лет назад

    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....

  • @KeenanTims
    @KeenanTims 9 лет назад +1

    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.

  • @jackbryan5851
    @jackbryan5851 5 лет назад +1

    best video on steppers I have seen

  • @dormoshe11
    @dormoshe11 8 лет назад +2

    NYC CNC, Great Videos as usual!
    can you describe where you taking the ground from?, i mean where is the origin of the DC ground of the arduino ?

  • @pug2o5
    @pug2o5 9 лет назад

    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 :)

  • @hollosaroka
    @hollosaroka 6 лет назад

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

  • @Liberty4Ever
    @Liberty4Ever 9 лет назад +9

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

    • @claraj.winston7156
      @claraj.winston7156 8 лет назад +1

      +Liberty4Ever I was lucky to get this wonderful=== FREE DOWNLOAD Arduino Tutorial and Programming plus.google.com/105456673395930650430/posts/PWgqWWct4AF? XOXO~fZ7

  • @skoootles
    @skoootles 9 лет назад

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

  • @AmateurRedneckWorkshop
    @AmateurRedneckWorkshop 9 лет назад

    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.

  • @Regnarrussell
    @Regnarrussell 9 лет назад

    Are you going to add a lcd and numpad to make a automated fence for say a cutoff saw or maybe a lathe feeder?

  • @ceesruiter9839
    @ceesruiter9839 9 лет назад

    Nice video, cool combine CNC and stepper control with Arduino

  • @Creeperboy099
    @Creeperboy099 6 лет назад

    I am wondering, how do you match the position of a stepper to the position of a potentiometer knob or another form of analog input?

  • @melissaoliva6206
    @melissaoliva6206 7 лет назад

    I am a mechanical engineer and currently building a 3D printer. How many motors can you attach to the Arduino board? Also do you need a big easy drive for each motor?
    Thank u

  • @chipcash
    @chipcash 7 лет назад

    I'm thinking about building a flatbed printer using an Epson 1400. How difficult is it to connect a flatbed arduino assem. to an Epson printer?

  • @pladselsker8340
    @pladselsker8340 8 лет назад

    Why not just use the integrated millis() or micros() Arduino functions? They're probably more precise if you use them the right way. You did great anyway, nice video!

  • @gaugeblockjenga
    @gaugeblockjenga 9 лет назад

    Say you are running everything off 5V power. Can you run the power supply 5V directly to the pot instead of from the Arduino? (Also for limit switches for digital pins?) Advantages/Disadvantages?

    • @gaugeblockjenga
      @gaugeblockjenga 9 лет назад

      I experimented with running the small Easydriver 4.4 with 5V and it was awful! It had about zero torque. Next, I'm going to try to power my Arduino (Adafruit Trinket Pro 5V) off the Easydriver on-board regulator and power the Easydriver with a 24V PSU similar to yours. I know the Easydriver regulator can't push out more than around 70mA, and hope that the Arduino can operate with less than that. Thank you for the reply and thank for all your awesome videos!

  • @naboulsikhalid7763
    @naboulsikhalid7763 5 лет назад +1

    I did learn something, well explained a d made easy to understand. thank you

  • @reaganks
    @reaganks 7 лет назад

    How do you convert your arbitrary speed to the actual RPM of the shaft? Or does it change according to the load?

  • @jimm2099
    @jimm2099 9 лет назад

    John,
    There's a ridiculous amount of overhead using digitalWrite/digitalRead in Arduino programming. The language is written to be easy to learn. Writing directly to the port registers bypasses the Arduino overhead. This should give you an increase in speed between 10x - 15x.

  • @kevinbelaen601
    @kevinbelaen601 8 лет назад

    Hello, how do I go about plotting the output speed of the motor? For my project I need to plot force from a load cell vs velocity of the motor. Thank you.

  • @andrewmack4830
    @andrewmack4830 9 лет назад

    Great video. Very interesting. I'm looking forward to the forthcoming episodes. Keep them coming. Thank you

  • @timle1286
    @timle1286 7 лет назад

    How do you make the stepper motor run continuously in one direction?

  • @MS-ld3jn
    @MS-ld3jn 5 лет назад

    Thanks for the video! I just wanna ask, is it possible to have the stepper motor run for a certain time, then stop? I'm working on a project which includes one motor rotating for a few seconds (maybe 15-20 seconds) and stops, then another motor rotates until a mechanical end stop/limit switch is clicked. I don't really care about the position of the first motor's shaft tbh

  • @MarkValenzia
    @MarkValenzia 9 лет назад +2

    Quality video again John, excellent stuff. With the Arduino series are you looking at getting back into GRBL?

    • @MarkValenzia
      @MarkValenzia 9 лет назад

      NYC CNC That is music to my ears! You're right about so many great machinists on YT with the likes of ABOM79, Oxtools and Kieth Fenner just to name a few. Projects playlists are brilliant and I bet most of your subs will feel the same way.
      I'm planning on doing the same once my DIY CNC Plasma table build is finished. I'll then shift focus to the cutting side of things.

  • @ashutoshnale1303
    @ashutoshnale1303 6 лет назад

    How can we increase the torque by keeping speed constant on stepper??

  • @michael_iy7
    @michael_iy7 7 лет назад

    why did you create a delay variable when you could have easily just declared a delay function?

  • @DStrayCat69
    @DStrayCat69 9 лет назад

    Hooooly Poopie!!! A genius you are... Hmmm... lol Are you sure your name isn't Anikan Skywalker...??? lol
    I'm a programmer and could not, in my wildest dreams explain this shyet the way you do... Bravo! I also see that you are a total Hacker... That's a Good thing :-) What blows me away is, you're self-taught... Sheesh! You make me look like a newbie... I Love it :-)

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

    does anyone know what button and potentiometer he used ??????

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

    Are there code examples available?

  • @anjeel08
    @anjeel08 7 лет назад

    Awesome !! I thoroughly enjoyed it., Now I am going to try this out myself. Looking forward to lots of learning.

  • @vishuvig1571
    @vishuvig1571 7 лет назад

    hello sir i am working on a project and i want to know is their any way out to control 6 stepper motor with one arduino uno using some special drive

  • @AnwarAlfaqeehAlhusseini
    @AnwarAlfaqeehAlhusseini 7 лет назад

    hi
    rotary table on bearing shaft
    what size of stepper motor i need
    for stepper index
    thanks

  • @alexbobawesomeness
    @alexbobawesomeness 6 лет назад

    It doesnt really matter and idk if it will work because ime new to arduino kinda but i have experience with coding but i think u can type Distance ++ instead of Distance = Distance +1 so it would save you a couple of words ++ means + 1 and -- means - 1 idk lol

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

    Great info
    Hello sir can we increase frw/rew

  • @nedstar7378
    @nedstar7378 7 лет назад +1

    Excellent video and very good explanation.

  • @stefforte8302
    @stefforte8302 8 лет назад

    Hi NYC CNC.
    I am new to Arduino and am wondering what the abbreviation "B.E.D" means?
    Thanks.

    • @stefforte8302
      @stefforte8302 8 лет назад

      +NYC CNC Thanks for that, was googling it all day there looking. Seems to be the perfect piece for what I'm looking to do. Thanks a lot for that. Very helpful tutorial too (y)

  • @RoboCNCnl
    @RoboCNCnl 9 лет назад

    Nice one John.. Keep them coming.. (ps.. to ad on the slug btw.. )

  • @subashkavinda445
    @subashkavinda445 8 лет назад

    Hey can u help me with adding a LCD display for Arduino CNC

  • @ThePakcikjack
    @ThePakcikjack 6 лет назад

    can i use it for my wheelchair?

  • @shootgp
    @shootgp 9 лет назад

    Last year I built a simple AHRS using an Arduino and the LSM9DS0 and was piping the feedback into an XNA 3D (game) environment.
    Lets combine the two, CNC and a heading reference, cut where you look... LMAO
    I don't foresee any problems with that... :-)

  • @sharpx777
    @sharpx777 9 лет назад

    cool, looking forward for the encoder one

  • @visionaryrobotics4065
    @visionaryrobotics4065 5 лет назад

    Great video, can you give me a link to some other stepper motors and stepper motor shield that will work for this video because the one that you have in the description will take to long to be delivered to my house.Thanks

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

      ruclips.net/video/EV4LAljXZLk/видео.html is great little shield with its own library

  • @magna59
    @magna59 8 лет назад

    Thanks for putting this up !

  • @roboatlas2808
    @roboatlas2808 6 лет назад

    I want to move 2 stepper motor. If pressed key then Ist motor start move 12 inch clockwise and stop 1st motor and start 2nd motor 4 inch clockwise and stop 2nd motor . And again 1st motor move 12inch anticlockwise.
    And finally I want goes to final position. Please help me..

    • @roboatlas2808
      @roboatlas2808 6 лет назад

      My email id .. sah.indrachand@gmail.com

  • @cocoarecords
    @cocoarecords 9 лет назад +1

    sounds awesome!

  • @TonyLing
    @TonyLing 7 лет назад

    int means interval now does it?

  • @MrBhujbalgv
    @MrBhujbalgv 8 лет назад

    Very useful video, Thanks for uploading.

  • @btlscarz9819
    @btlscarz9819 9 лет назад

    Thank you for making these type of videos!

  • @mgphotostudio
    @mgphotostudio 7 лет назад

    Thank you very much! This was very usefull!

  • @codecrossed7556
    @codecrossed7556 8 лет назад

    Could I use Arduino Zero?

  • @nassimback
    @nassimback 7 лет назад

    3:06 what language is used ? C++ ?

  • @jaimebortoni
    @jaimebortoni 5 лет назад

    does anyone know where is the next part of this video???? since ruclips.net/video/KbDPgxHpgAA/видео.html i can´t find any examples regarding this. thanks.

  • @janhbrenna4264
    @janhbrenna4264 9 лет назад

    Thanks alot, or Even more than that! Need too design and fabrikate camera slider with deadline tonight, now that i can modify your code it will save me some time, design part should be Quick thanks too fusion 360, produce also quick thanks too you that made me build a cnc machine, and now the code thanks too you again. With all this time that i saved i can spend it on suporting you on Patreon. :-) keep it up, wish you the best.

  • @chris030111
    @chris030111 7 лет назад +3

    John, I could kiss you, you just saved my dissertation! Thanks!

  • @PixelVanguard
    @PixelVanguard 6 лет назад

    Great video

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

    Where's part 2?

  • @huequanganglam1734
    @huequanganglam1734 6 лет назад

    thanks for your teach

  • @Notion8
    @Notion8 9 лет назад

    What is that "star" in the code: int FullRotation = NumSteps MicroSteps;
    I get the error: 'NumSteps' was not declared in this scope
    'NumSteps' was not declared in this scope
    New to all of this.. Someone knows why? :P

    • @garthn2561
      @garthn2561 8 лет назад

      +Notion8 Multiplication. Look at Reference on arduino.cc for more

  • @siamalek3072
    @siamalek3072 8 лет назад

    Nice video, but where is the rest of the series. where is the video after this and so on?

    • @hosseinhayati9820
      @hosseinhayati9820 8 лет назад

      Did you check somthing like "how H-bridge works" and L293D ? I think it will be a good start :)

    • @cpbpilot
      @cpbpilot 7 лет назад

      NYC CNC did you ever figure out the encoder?

  • @danilosuarez4887
    @danilosuarez4887 5 лет назад

    can you share me a schematic and arduino code? thanks.

  • @jftt42
    @jftt42 8 лет назад

    very cool thank you

  • @iownslaves
    @iownslaves 8 лет назад

    Where's the next vid about the encoder?

    • @iownslaves
      @iownslaves 8 лет назад

      +NYC CNC The reason I asked is because I am following/building your widget at the same time. Kind of stuck cause everything else takes off with "how to build a CNC machine." It's not on the website either

  • @avery7990
    @avery7990 6 лет назад

    I am just peeved he did not use INPUT_PULLUP and also the code is not always "grammatically good" for instance he did "distance = distance + 1" instead of distance++. Just curios if he has ever taken a coding class, or online course

  • @will11m
    @will11m 9 лет назад +1

    "Integer" distance, not interval :)

  • @FrustratedBaboon
    @FrustratedBaboon 6 лет назад

    You don't need a paper to say you are an Engineer. I say you are an Engineer !!!!

    • @FrustratedBaboon
      @FrustratedBaboon 6 лет назад

      Much smarter than most I have met in my career.

  • @Kyle-fu6en
    @Kyle-fu6en 9 лет назад

    Awesome

  • @simonaldridge82
    @simonaldridge82 9 лет назад

    arduino is open source is charging for the code going against the intended free use of

    • @simonaldridge82
      @simonaldridge82 9 лет назад

      NYC CNC dis not mean to be negative just wondered if you could put the code in the description or web site love your videos and always thumbs up

  • @MrDondoerner
    @MrDondoerner 8 лет назад

    unable to download the code. Can you help

    • @MrDondoerner
      @MrDondoerner 8 лет назад

      www.patreon.com/nyccnc

    • @MrDondoerner
      @MrDondoerner 8 лет назад

      +NYC CNC Thanks for any help you can provide

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

    noise annoying on video unable to watch

  • @kyleemmerich2460
    @kyleemmerich2460 6 лет назад

    I also usually have a Diet Coke can on my desk!

  • @oliverlavermicocca2455
    @oliverlavermicocca2455 9 лет назад

    hey NY CNC.
    Im currently doing a school project at the moment which ive been trying to code and was wondering if you could help me out. Im very very new to coding and as a result, i have been struggling trying to find code to allow my stepper motor to turn X amount of steps, then delay for an X amount of time, before repeating itself with the same process. If it helps im using an arduino motor controller shield and a stepper motor which has 200 steps. Everything runs of a 12V powersupply. www.freetronics.com.au/products/hbridge-dual-channel-h-bridge-motor-driver-shield#.VcH5rPmqpBc - This is the motor controller that im using.
    Please help me :)

    • @oliverlavermicocca2455
      @oliverlavermicocca2455 9 лет назад

      thankyou :) ill give it a try in the morning :) (I live in Australia hahaha)

  • @DwightWilbanks
    @DwightWilbanks 7 лет назад

    I guess the target audience for this video are people who don't know the basics, but, have someone locally who setup the breadboard and selected all the components for them.
    Why wouldn't the person just ask the guy that setup the hardware? You've skipped an pretty significant step.

  • @beochie
    @beochie 8 лет назад

    Arduino is all about open source, putting you code up on a pay site is shady

    • @DimaProk
      @DimaProk 8 лет назад

      +beochie His code is not that different from the sample code that comes with Arduino under stepper with exception of push button, but you can just copy that part, he doesn't try to hide it.

  • @ftyufutf4015
    @ftyufutf4015 8 лет назад

    Become friends as possible in order to teach me how to develop my myself in programming, I beg you from the country of Iraq has taught me that it will be sincerity to you when God

  • @nbanggi1730
    @nbanggi1730 6 лет назад

    mamtap