How to "Home" Stepper Motors using Limit Switches - Tutorial using Arduino and Easy Driver

แชร์
ฝัง
  • เผยแพร่เมื่อ 25 มิ.ย. 2024
  • Full tutorial available here: www.brainy-bits.com/homing-st...
    Facebook: / brainybits
    Twitter: / brainy_bits
    Follow us on Facebook and Twitter to get notified when we post new stuff!
    You can find more information about our tutorials on our website: brainy-bits.com/
  • วิทยาศาสตร์และเทคโนโลยี

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

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

    Really great lecture. Will watch this a few times. Never understood how homing a motor worked before.

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

    Definitely something that i will need in a few days. Awesome.

  • @WideVisionMetalFab
    @WideVisionMetalFab 7 ปีที่แล้ว

    Good tutorial. "Homing" is definitely a good thing! Oh, and good luck with your garage build.

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

    Very insightful and helpful. Thanks for sharing from the UK.

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

    Thank you so much, sir, this was what I was looking for a long time. Will try it out soon. And sorry for your barn and the lawn mover.

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

    Really helpful video, thanks for sharing!

    • @BrainybitsCanada
      @BrainybitsCanada  7 ปีที่แล้ว

      Thank you for your comment and for watching!

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

    Thank you... very useful video. just watching this i could code my own camera slider with homing and limit switches. Thanks again. keep up the good work.

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

      Thank you for the comment and for watching. I've made a new motorized slider with LCD screen here if you want to check that out : th-cam.com/video/WzrRIPhIiaU/w-d-xo.html

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

      @@BrainybitsCanada Sure

  • @KK-fh1ds
    @KK-fh1ds 5 ปีที่แล้ว +1

    Thanks man 🙂👍you're a good guy

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

    How I an't like the video if it's well detailed, explained with demo. Thank you very much. learning a Lot from YOU

  • @webslinger2011
    @webslinger2011 6 ปีที่แล้ว

    Hi! any chance you can use an ultrasonic sensor to set limits?

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

    Great video!

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

    Should I use 2 switches to be safe in cases where the gears might grind?
    I've got a Rack and pinion set up where at almost full extension of the rack, the ram cannot physically extend any further. Should I have a switch at the closed and fully extended positions to prevent gear grinding? This to me sounds better in case some steps were missed. Thoughts?
    Thanks for the video :)

  • @kushumtim
    @kushumtim 6 ปีที่แล้ว

    Really helpful video. Could you please mention the details about the limit switch, where it can be found?

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

    Great video. Thanks for taking the time. It has help me so much being new to this. Is there a way to speed up the homing? Just my track is 2m long and would take forever if it was near the end of the run. Thanks again

  • @77blue34
    @77blue34 6 ปีที่แล้ว +1

    thank you for tutorial, very good cannel...

  • @boxingfan5742
    @boxingfan5742 2 หลายเดือนก่อน

    Very much appreciated.

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

    Thanks for the video, super!!

  • @diamony123
    @diamony123 6 ปีที่แล้ว

    Digital has great advantage, but i love analog as a newbe... i would use optical switch for home position. soon as you power up, you let a 555 timer run once to activate motor to go to home base where there is an ir stop switch, then that activate some sort of latching (On) switch from the same 555 timer when its sinking voltage. its just a matter of giving sufficient time for sourcing and sinking current.. done

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

    Thanks for that......Paul

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

    I haven’t read all the comments and sorry if this has been answered but can this be done with proximity switches too? Same code? Absolutely love this channel by the way, very well presented material and you explain everything with simplicity which is amazing for people starting out, like me :)

  • @80sday36
    @80sday36 7 ปีที่แล้ว

    Very good video Sir Yvan. I'm waiting for your video about limit switch with AccelStepper library.

    • @BrainybitsCanada
      @BrainybitsCanada  7 ปีที่แล้ว

      I've just uploaded it :) th-cam.com/video/YsLykxnHApg/w-d-xo.html Hope it helps and thanks for watching.

  • @monkeyjuju7441
    @monkeyjuju7441 6 ปีที่แล้ว

    If you wanted to stop the motor from accidentally stripping the threaded rod if you lose a couple steps or something do you have to wrap each motor step in a while loop? For instance if I had a program to make a square would I have to do:
    While XSwitch is low && xVal < 120{
    StepperX.move(1);
    X++}(obviously not the actual code)
    Then repeat for y, then again for x in reverse, then again for y in reverse? Or is there an easier way to initialize it and if at any point an axis hits the switch it stops moving that direction? I have a few sketches I've been using to test my vinyl/pen plotter/3d printer that make things like smiley faces that would require A ton of while loops :/

  • @armandbajrami7380
    @armandbajrami7380 6 ปีที่แล้ว

    Really helpful ,thanks very match

    • @meme-hj5rs
      @meme-hj5rs 5 ปีที่แล้ว

      O mandi ca bone :)

  • @DavidCook42
    @DavidCook42 7 ปีที่แล้ว

    Nice ! Thank you
    very helpfull

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

    excellent and interesting!
    two questions:
    1. in the first part (no external file) is there a bouncing problem in the limit switch? and, does the accelstepper version contain such function here?
    2. I am not familiar with the driver you use. can you kindly inform the equivalent wiring to a driver like DM860A?
    thanks.

  • @Alexseehp
    @Alexseehp 6 ปีที่แล้ว

    Thanks!!! I am thinking of using an optical sensor as a home switch actually. maybe highlighting a dot on the gear to read a contrast as a home position. :)

    • @BrainybitsCanada
      @BrainybitsCanada  6 ปีที่แล้ว

      Good idea, let me know how it turns out. Thanks for watching!

  • @Jmtech-we9cd
    @Jmtech-we9cd 7 ปีที่แล้ว +1

    good!!!

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

    I am making a Soda can crusher using a NEMA 23 stepper motor. It will take several rotations for the soda can to crush using a Befenybay Ball screw with end supports. What I want it to do is hit the end limit switch and have it return to position zero. What I have run into is when I code in. myStepper.step(20000); it works fine, any greater number and it reverses the direction of the motor. What I did is put in the command twice to make it go 5 inches. The design is to crush Monster cans which are 6.5 inches in length down to 1.5 inches. Thank you for the video. I am not much of a coder. The code seems straight forward however.

  • @Maher-
    @Maher- 7 ปีที่แล้ว

    Hi, how will 0 be set, I'm building a DLP printer, when I fixed the motor in place and connect it to arduino mega, will that point be its 0 and how can I set the 0 in different positions?
    I asked and thy say to use a block switch or end stop, but as I saw in your video that it only backed off a little from the switch
    I'm new to arduino hope you can help
    Thanks

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

    Thank you for your script, however, may advise me on how is the limit switch hardwire connection to?

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

    Thanks for the video. I have a question for you, if I wanted to completely run with limit switched only (using relays to turn on a motor) is that possible? Instead of having a driver program, I would just have the motor turn on with a relay one direction until it limited with the switch.. then reverse out of it to go the other direction (say, with a screw). If is could, would I wire the limit to cut off the positive power?

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

      You prolly dont give a damn but does someone know of a way to get back into an Instagram account??
      I was stupid lost the password. I would appreciate any tricks you can offer me

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

      @Rohan Samuel Instablaster ;)

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

      @Kyler Malachi i really appreciate your reply. I found the site through google and Im trying it out now.
      Seems to take a while so I will get back to you later with my results.

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

      @Kyler Malachi It did the trick and I now got access to my account again. Im so happy:D
      Thanks so much you saved my account :D

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

      @Rohan Samuel you are welcome :D

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

    Hi. Is it possible to not use limit switch instead create a function data which inputs the position of the stepper motor into an SD card?
    for instance, i limit my stepper motor to 3 rotations clockwise. When it is controlled and moved 1 rotation and I off the power, when I start it back, the arduino reads the data from the SD card and automatically knows that the stepper motor is at 1 rotation and it only either can go another two clockwise rotation or 1 anticlockwise rotation.

  • @AliSaldin
    @AliSaldin 7 ปีที่แล้ว

    I have an idea why you don't use an IR sensor it will be better than the switch or laser diode and LDR alternative of the switch

  • @jaimebortoni
    @jaimebortoni 7 ปีที่แล้ว

    So 0 position will be 1 step away of the switch?

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

    Hello i have a question, I want to controll the same code with DMX. is it possible that you can help me with that ?

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

    How do you do it with feed back from the motor. I don't want to fit a switch?

  • @kalashnikov6640
    @kalashnikov6640 6 ปีที่แล้ว

    Is it possible to show us microstep TB6600 driver Arduino connection with the drivers by the three motors with endstop buttons with relay to stop and run the drill please showing this in video or photo please ? cnc machine?

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

    thanks

  • @mikeobrien9829
    @mikeobrien9829 6 ปีที่แล้ว

    I was wondering if you guys could do a tutorial on a stepper motor attached to a compass module, so when the direction changed it would move the stepper motor, this is something I'm looking for as a easy course holder on a boat, the stepper motor would control the rudder

    • @monkeyjuju7441
      @monkeyjuju7441 6 ปีที่แล้ว

      Mike OBrien do you have a compass module in mind? I'd have to order one to be sure it works right but I think it should be rather easy to convert the input of the compass to an output for the stepper. Of course I have limited knowledge of boats so I could be wrong. How do you plan to drive the rudder? Like is the motor going to be connected directly to it, or are you planning on putting it on the wheel or something with a manual override? Seems like a big line following robot to me

    • @mikeobrien9829
      @mikeobrien9829 6 ปีที่แล้ว

      Hi Chris; I have a HMC5883L, this is a 3 axis compass unit which may have issues with the boat rolling, I thought by reducing the sample rate we could sort of average it out. Its really only something to keep the boat going in the correct general direction, it doesnt have to be exact.
      My boat has wheel steering so I was going to get the motor to turn the wheel. I'm just looking to start small and build up to add ons like rudder position sensors (to stop the stepper motor when full lock is reached), however I think this could also be done by counting the steps on the motor.
      There is a few TH-cam videos from people who have made full boat autopilots, but none explain things very well, Im just looking for something simple to start off with
      I would be most appreciative of any help you can give me.

  • @mzunar16
    @mzunar16 6 ปีที่แล้ว

    How to create " home" with l298n module , because this modul donr have 1=easy driver interface and motor dont moving then ..

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

    Thanks for informative video. Just wondering , why don't you show your face intentionally? :)

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

    Don't understand I've been on your website and got your code for this project in this video but the code is complete different to what you show in this video. Sorry I'm trying to understand how to homing and end stops. i need to use a 28BYJ-48 stepper motor with the ULN2003 board with a encoder like in one of your other videos but need homing and end stops. any help please

  • @pauledwards7720
    @pauledwards7720 7 ปีที่แล้ว

    Oh the EPROM sounds a good way to go.......Paul

    • @BrainybitsCanada
      @BrainybitsCanada  7 ปีที่แล้ว

      Will try to do an example on using the EPROM on the Arduino in a future video.

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

    dear sir thank's for the idea, sir i want to know about that, when i use tb6600 then the code is same? please help me.

  • @amrashraf1863
    @amrashraf1863 7 ปีที่แล้ว

    what is the best driver for small stepper motors (and also be not expensive because of limited badged)?

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

      The Easy Driver boards (brainy-bits.com/products/easydriver-stepper-motor-driver) like the one I used in this tutorial, are pretty cheap and easy to use for small steppers up to 1.5Amps. Thanks for watching!

    • @amrashraf1863
      @amrashraf1863 7 ปีที่แล้ว

      Thank you.

    • @Ed19601
      @Ed19601 7 ปีที่แล้ว

      There is a complete L298n Board: www.aliexpress.com/item/Free-Shipping-New-Dual-H-Bridge-DC-Stepper-Motor-Drive-Controller-Board-Module-L298N-MOTOR-DRIVER/32769190826.html
      Also the Version 1 of the Arduino Motor shield (a 293 I think)is dirt cheap at the moment ( I think I paid 1.5 dollar)
      The TB6612F breakoutboard is also very cheap. The latter works via I2C. www.aliexpress.com/wholesale?catId=0&initiative_id=AS_20170515053856&SearchText=tb6612fng+motor+driver
      There are even small steppers that come complete with an ULN2003 board: www.aliexpress.com/item/5V-Stepper-Motor-28BYJ-48-With-Drive-Test-Module-Board-ULN2003-5-Line-4-Phase/32615355685.html

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

    can we use only cncjs for switches

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

    hello paul, i'm a beginner to arduino.
    i want to create a project in which at initialization stage the program should record the final position of the motor when a button is pressed and record and save the value permanently as final position .
    after that when motor is in home position whenever a button is pressed , the motor should move to the saved position and when again pressed it should home back to original position .
    can you help ?

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

      the movement should only be after push of the button

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

    Can you please help me to make a code for DMX stapper motor with limit switch

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

    hello boss i realy like ur video about to make a code...
    we have a project, about (steper motor) with (Photo electric sensor) and (limit switch) in arduino. maybe u can help us..
    can i send u a video in ur email what exactly we want.if its posible.we realy appreciate it...
    thanks in advance

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

    FYI, The link to the tutorial seems dead at this time.
    Also, Thanks!

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

      It is on his website still, I found it www.brainy-bits.com/post/how-to-set-the-home-position-of-a-stepper-at-startup and also the video for using the Accel library www.brainy-bits.com/post/homing-stepper-motors-using-the-accelstepper-library
      Enjoy :-)

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

      @@DavidCook42
      Great! Thanks for the links.

  • @howardgreenwood
    @howardgreenwood 6 ปีที่แล้ว

    You can skip the first 4 mins. Good video after that.

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

    Nice . Need code

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

    Full Tutorial link gives 404 now :(

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

      Changed website a while back, here's the new link for this tutorial: www.brainy-bits.com/homing-stepper-motor-at-startup/ Thanks for pointing that out and for watching of course!

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

      @@BrainybitsCanada www.brainy-bits.com/post/how-to-set-the-home-position-of-a-stepper-at-startup
      Is this it now ?

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

    The code is no longer available at www.brainy-bits.com/homing-stepper-motor-at-startup/

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

    Your link is dead.
    Full tutorial available here: www.brainy-bits.com/homing-st...
    PAGE NOT FOUND
    We looked everywhere for this page.
    Are you sure the website URL is correct?
    Get in touch with the site owner.

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

    Can you please help me to make a dmx stapper motor with encoder