Homing with the AccelStepper library and a limit switch

แชร์
ฝัง
  • เผยแพร่เมื่อ 7 พ.ย. 2019
  • In this video I show you an alternative way for homing using the AccelStepper() library. I use a TB6600 to drive a NEMA17 stepper motor and I use a microswitch/limit switch for the homing task.
    To have a full understanding of the AccelStepper() library and the TB6600 driver, please check my video on that topic: • Arduino with TB6600 us...
    If you liked my video, please subscribe to help my channel growing!
    Source code: curiousscientist.tech/blog/ac...
    If you want to buy the gadgets shown in the video and support me at the same time, you can use the following affiliate links:
    Arduino UNO: www.banggood.com/custlink/33K...
    Variable Power Supply (9-24V 3A 72W): www.banggood.com/custlink/DGK...
    TB6600 Stepper Driver: www.banggood.com/custlink/Kvv...
    NEMA17 Stepper Motor: www.banggood.com/custlink/vGK...
    Limit switch on PCB (1PCS): www.banggood.com/custlink/DGD...
    Limit switch on PCB (5PCS): www.banggood.com/custlink/DGv...
    Limit switch on PCB (10 PCS): www.banggood.com/custlink/m3G...
    Limit switch (10PCS) Requires soldering and cables: www.banggood.com/custlink/mKG...
    Aluminium profile 2020 T-slot: www.banggood.com/custlink/vm3...
    Right angle joint for 2020 profile: www.banggood.com/custlink/mm3...
    Various M5 screws for 2020 profile: www.banggood.com/custlink/DG3...
    Sliding nut for 2020 profile: www.banggood.com/custlink/Gmm...
    T8 lead screw with anti-backlash nut: www.banggood.com/custlink/D3G...
    T8 nut housing block: www.banggood.com/custlink/m3v...
    KPxxx Pillow Bearing: www.banggood.com/custlink/DK3...
    DJI OSMO Action Camera: www.banggood.com/custlink/Kmm...
    DJI OSMO Action Case: www.banggood.com/custlink/Dvm...
    Silicone Soldering mat: www.banggood.com/custlink/D3K...
  • วิทยาศาสตร์และเทคโนโลยี

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

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

    Great video as always.
    It's possible to use a cheap hall effect sensor and a small neodymium magnet as a limit switch to avoid any mechanical failure.

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

      Thank you! Yes, a Hall sensor would provide a contactless switching possibilities!

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

    love your videos, I've learned a lot with em 🙌

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

      Thank you! I am glad that you could learn something from my videos!

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

    This code works with my a4988 driver and belt driven gantry (with tweaks for steps/mm) and thank you. I was pulling my hair out looking for exactly this functionality. I deleted the malarkey regarding LEDs. Anyone looking to control a linear actuator can take this code and run with it even if they're an arduino noob like me.

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

      Thank you very much for your positive feedback! My intention with the whole channel is exactly this! I want to provide knowledge in a form that is easy to understand and easy to work with. I am very happy that the code worked for you and you could use it for your own project. Don't forget to subscribe, if you haven't done it already. More stepper motor related videos are on their way, I am just waiting for some parts.

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

    Kudos to you. Really informative.

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

    Hi, Thank you for your 2 videos on this setup, it's pretty much what I have for my project. My question is how are the limit switch wired (can't make out from the vid), I have the same limit switches but can't make them work. I assume you are using just the green and red wires. Also, I want to use an external timer to start and stop the motor, opposed to using keyboard commands, to reverse the direction twice a day to open and close a small hatch (door), any suggestions?

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

      Hi! I am glad that it helped you! In this video, I just wired the black (GND) and green (signal, D2) pins and that's all. It is not the best practice, but it worked. I have a more recent video, where I show a sort of a ping pong game with 2 limit switches, you might want to check that out for some extra knowledge. There, I wired all 3 wires (red: 5 V, black: GND, green: signal)
      For the timer-related question, check my video where I built a real-time clock based plant watering circuit. If you combine that with the stepper motor controller, you get what you want. But to make it more simple, you don't need an external timer. Twice a day, that can be fitted in the millis() function very easily. Start two timers when you start the arduino. You need two if() statements which are checking the time. Something like this:
      if(time1 > 80000)
      {
      runmotor();
      restartTime1();
      }
      if(time2 > 80000)
      {
      runmotor
      ();
      restartTime2();
      }
      This is a very simple algorithm and it does not need any external units.

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

    Great video.
    I would like to count the revolutions. I'm building a winder and have to have for instance 150 windings on my probe, it varies from probe to probe. I am beginner with Arduino. don't know how to do it.
    Like your videos very much.
    Thank you, learn a lot.

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

      Hi and thanks. I built a coil winder and published everything, check my channel and website for the resources.

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

    Hello. Thank you very much for the tutorials!!! I learned a lot from your videos and sketches you make!
    I have a question. How can I make my bipolar stepper motor constantly looping back and forth with the AccelStepper library with the NON-blocking function?
    Thank you!

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

      Hi! Thank you, I am happy that I could help.
      Just write a loop where you move to a certain number of steps, then with an if() statement, check if you have reached the end of the movement in one direction. After that, step back the same amount (flip the sign) and check the steps again with an if(). You can check the accelstepper library's info page where they say which functions are non-blocking. Use those. Remember, if you want to do something between 2 steps, the time required for the task should be quicker than the delay between the two steps. Otherwise, the motor will be lagging.

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

      @@CuriousScientist Thank you very much, I will try that!!

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

    Hi I have tried your examples they are very good . But your last two examples where you have Changed to P, N etc i get a message on the monitor but the motor does not move . Have you made some other changes which effect the Accel Libaray ? Can you please help many thanks

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

      Hi! It is a bit difficult to guess your issue. Do you use the code from PasteBin? Do you have the exact same wiring...etc? What did you exactly try?

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

    Thanks for sharing the video and your code. Would you be able to make a suggestion on how to adjust the code so that it works from buttons instead of the serial monitor? I just want to truncate it to a momentary button for homing, and one each for fast positive/negative movement and slow positive/negative movement while button pressed.

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

      I made a control panel for stepper motors based on buttons and other controllers. Search for it on my channel and website.

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

    Thanks so much for great work
    Where I could find the connection diagram

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

      Hi! I am glad to help. For example, you can read the source code that I made available, and you can see what are the assigned pins for the different connections. Or, you can check the video, that I dedicated to this specific question: th-cam.com/video/3LZ_v3Jldwo/w-d-xo.html

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

    Curious scientist, Great work! I am very new with Arduino, I have used AccelStepper bounce example but I don't know to make the motor always start in one set place(Home or Cero if you will, at the very beginning) then go from point A to point B and vice versa until it is shot down. Please Help. can you give me some codes.

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

      Hi and thank you! I suggest you to look around in my stepper motor related playlist. There are many videos and each video has its own code. I also have a website where you can find the playlist and the codes too.

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

    i'm having issues in my code tho. I have a 2-axis system, 2 motors on y-axis and 1 motor on X-axis. I have 6 total limit switches attached for each end. I want my program to do the following: when the motors hit the limit switches, i want them to stop and then move in opposite direction a small amount to "De-press" the switch and then set that to my 0 position or Maxtravel Position. Any suggestions?

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

      Could i possibly do something like this?: in setup() { attachInterrupt(digitalPinToInterrupt(limitSwitch3), revXMotor, FALLING); } void revXMotor()
      {
      //Stops motor then moves reverses direction and moves it 1-inch back.
      stepper3.stop();
      stepper3.moveTo(abs(stepper3.currentPosition()- 254)); }

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

      Looks ok, but why would you do that "complicated" stuff with the abs and moveTo... etc if you can directly move the motor in relative terms using the move() function?!

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

    Hi may I ask if making a 'homing' needs microswitch always? Can I make homing by just putting codes? I'm using nema23 and same driver module as yours

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

      Hi! Homing can also be done by keeping track of the number of steps done. In fact the AccelStepper library keeps track of the steps and you can always use that to perform the homing. For example you move the motor clockwise 2000 steps, then move counterclockwise 500, then 700 clockwise and then give the homing command, the library will know that the overall steps from zero in cw direction was 2200, therefore it has to make 2200 steps in ccw direction to get back to zero. You just have to make sure that the system is 100% doing the exact amount of steps you give as a command. I can make a video on homing without switches using the AccelStepper library in the near future.

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

      @@CuriousScientist Thank you so much! So all I need is the AccelStepper library and not any extra module for that control then?

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

      @@maryannemacalinao8376 Yes, you are right! I will upload a video of it during this week where I explain everything.

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

      @@CuriousScientist looking forward for it sir! Thanks again!

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

      Hi! I uploaded the promised video. Please check it out if you have time. :)

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

    terimakasih banyak atas tutorialnya

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

      Sorry, I just understand the first word, but you are welcome. :)

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

    Give me help , my question is that ln holding ( means stop ) condition stepper motor draw current which is not good for my product , my product has holding time 1 hrs and running time 3 second . So how to solve my problem please reply me

  • @freytube1
    @freytube1 6 หลายเดือนก่อน +1

    good video. i have been using your code thanks.. have not gotten over the limit switch bouncing issue yet. can you share where you bought the microswitch with its board? thanks

    • @CuriousScientist
      @CuriousScientist  6 หลายเดือนก่อน +1

      Hi! It is on my website under the parts & tools page. Check it!

    • @freytube1
      @freytube1 6 หลายเดือนก่อน +1

      great thank you @@CuriousScientist

    • @CuriousScientist
      @CuriousScientist  6 หลายเดือนก่อน +1

      It is my pleasure!

  • @JohnDoe-sz5jh
    @JohnDoe-sz5jh ปีที่แล้ว

    Do you have wiring diagram that you have already shared or can you. Please sir.

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

      Hi! Every pin connection is in the source code.

  • @fooballers7883
    @fooballers7883 10 หลายเดือนก่อน

    Thank you...much appreciated.

  • @user-li1dy7if1r
    @user-li1dy7if1r 4 ปีที่แล้ว

    Cool! How do I add buttons to control movement?

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

      Hi! Assign a digital pin as an input, then connect a button to it using either an external debounce wiring or the internal pullup resistor. Then you just have to check the status by the button. You can do this by reading the pin's status withing the main loop() or by connecting the button to an attachInterrupt()-capable pin. I can make a video about this in the near future (in 1-2 weeks).

    • @user-li1dy7if1r
      @user-li1dy7if1r 4 ปีที่แล้ว +1

      @@CuriousScientist thanks! wait for the video, I'm new to this)

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

      @Павел Лях Please check my new video where I show the button-controlled stepper motor.

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

    hello. I made a project with arduino and RF433 module and I hooked up a stepper motor to it and it works fine. but i need some help with the sketch.
    how can i define 1 button of remote control to turn the motor shaft CW and CCW ?
    i mean when i pressed the button the motor turned 45 degree CW and when hit the button again its turn in upposit direction.
    is that possible to answer me

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

      Hi! It is very difficult to answer this without seeing the system and the code. Sorry!

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

      @@CuriousScientist This is the video link for my setup : th-cam.com/video/BbRRBhTBkbI/w-d-xo.html
      and this is the link for sketch : drive.google.com/file/d/1zXLyvI9J7zIwIZOa5bKqR1TsO38wGnfV/view?usp=sharing

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

      Hi! Could you please upload the code to PasteBin? Or it would be easier if you could email it to me. You can find my email address on my website: curiousscientist.tech . I think it should be easy to solve your issue.

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

      @@CuriousScientist I really thank you for reply and i need to tell you I found the solution.one of my friends helped me with code.

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

      I am glad that you and your friend could find a solution! Have a great day!

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

    you are correct, delay() does not work in an ISR function. I believe you can use delayMillis() or whatever function is closest to that spelling

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

      No, you should not use any delays, at all.

  • @patis.IA-AI
    @patis.IA-AI 4 ปีที่แล้ว +1

    Thanks a lot... I have other questions but I dont want to abuse ;)

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

      You are welcome! Just go on, ask it! We are here to help each other. And maybe if I can answer your question, it will help others too.

    • @patis.IA-AI
      @patis.IA-AI 4 ปีที่แล้ว +1

      Hello Is it possible to make a cercle with accelstepper library without Gcode ?

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

      @@patis.IA-AI I think it is possible. If you have a x and y table or you can move your pen or anything that you use for drawing in terms of x and y, then you can do it.
      The equation of a circle with its center in the origin is x^2 + y^2 = r^2. So, you have to define the radius, then you can basically manually calculate x and y. You can run x as the integer in the for loop and calculate the y values at each step. Then you move your x-y stage/table/head...etc, according to the coordinates. It is pretty straightforward, you just have to move the x and y stepper motors based on the coordinates calculated from the equation of the circle. You can refine the step of x, then the circle will be smoother as well. If you want to place the circle at a certain place, you have to use the whole equation: r^2 = (x-a)^2 + (y-b)^2. Variables 'a' and 'b' will determine the center of the circle in the coordinate system.

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

      @@CuriousScientist works with drv drivers?

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

      @@unknownblueblue Hello! Yes, it will work with the DRV8825, the A4988 as well as with the Easydriver circuits.
      Why?
      All these circuits basically have the same two inputs: Step (or pulse) and direction. You just have to make sure that when you do the setup/initilaization, you define the proper pins for the step and the direction.

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

    Thanks . How to setting origin position ?

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

      Hi! You define it manually when you assemble your system, then you just use the accelstepper library and program it. The library knows where the stepper motor is located at.

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

      @@CuriousScientist if i need to control 3 stepper mycode is
      AccelStepper stepperX(1, 8, 9);
      AccelStepper stepperY(1, 10, 11);
      AccelStepper stepperZ(1, 12, 13);
      right ? sir

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

      @@CuriousScientist 0 position alway reset when power off arduino ?

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

      Yes, if you remove the power, the physical position of the stepper becomes the zero if you don't have homing. That's why you have homing. You have to code a home direction (let's say, all your 3 motors move in the same direction within their coordinate system), then when you restart the Arduino, you can initiate a homing procedure which brings the 3 axes (1 by 1, that is the safest), to their own home position.
      The part of the code looks OK, however, I would avoid pin 10-13. They are valuable SPI pins. :)

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

      ​@@CuriousScientist thank

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

    I want wiring connection diagram

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

      I want many things too. Maybe you should actually watch the video. The wiring is in the source code.

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

    The wobbling, which is a huge issue, is actually because of the quality of the Chinese parts. I too have similar issue. I am not saying parts make in China are all the same, but these are the affordable ones from Amazon or Aliexpress.

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

      Yeah, but I also barely put any effort into properly assembling a nice carriage. I did not have too many parts for the demo, so I had to use what I had.

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

    Hello, thanks for creating videos like this but i was bit confused with circuit. And there was no circuit diagram in your source code if update it it would be very helpful to our project
    Thankyou

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

      Hi! All the pins are described in the source code.

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

      @@CuriousScientist a clear circuit diagram is always needed. But thanks for the info you've been a massive help

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

      Just watch the video carefully and read the source code I made available. It is a very simple circuit.

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

    Hey everyone, I used the template provided and tried to adapt the code for my used case, but I encountered some issues and though someone will stumble over this and will be able to help. I do not really understand the AccelStepper step counting feature. Could someone please help?
    I want to enter a char into the serial monitor, say "t" and make the stepper move to a fixed position, where I know the number of steps from the zero position (which is indicated by the limit switch). But I want to be able to move to this position freely.
    However, I encounter two main problems:
    I don't really understand how the step counter in AccelStepper works.
    My try was:
    long sputter_pos = 1000;
    if (receivedCommand == 's') { //Sputter - Sends the motor to the predefined sputter position
    runallowed = true; //Allow running
    Serial.println("Going to sputter position.");
    current_pos = stepper.currentPosition();
    howfar=abs(sputter_pos-current_pos); //Set distance
    if(current_pos > sputter_pos){
    stepper.move(howfar); //Move distance
    }
    else{
    stepper.move(-1 * howfar); //Set distance - negative value flips the direction
    }
    However the output simply is:
    09:27:43.432 -> Going to sputter position.
    09:27:43.480 -> POS: 0
    09:27:43.480 -> POS: 0
    and the motor does not move.
    Another problem I have is that I would like the acceleration curve to be as specified but to have no deceleration curve, is that possible?
    I also need a way of counting steps, so I would then send the stepper from the zero (limit switch) position and until I stop him manually with "n" for example and output the number of steps it went. Here the problem with the deceleration comes into play, as the stepper moves different amounts for different accelerations and if I stop him without decelerating th distance is slightly skewed.
    Would someone reading this happen to know a thing or two, please let me know. I will update this if I find the solution to my problems.

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

      Check my most recent videos in the stepper motor related playlist and you will find information for your questions. Your task is easy to do and I showed a lot of similar stuff in my most recent video related to stepper motors. As far as I know, you cannot accelerate but not decelerate. Then, just use the functions which do not use acceleration. But keep in mind that you won't reach high speeds.

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

      @@CuriousScientist Thanks a lot for your quick reply! I will check it out and also figured that it can't be that difficult.
      Also thanks for the info in the deceleration. Maybe I will have to measure the position from full speed to stop when decelerating and just add this amount of steps as an offset for the distance to travel.

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

      As long as your stepper motor is not hindered by something, it will do the exact amount of steps that you instructed. The deceleration does not influence the amount of steps and the precision if everything is set up properly. For example let's say you want to move 4000 steps and you have acceleration/deceleration implemented. Then the motor for example will step 800 steps with acceleration, then it does 2400 steps with constant speed and finally it decelerates to zero in the final 800 steps. So, even with deceleration, it will stop at the desired 4000 step position.

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

      @@CuriousScientist Oh okay, then I will have to check it again but that was a thing that I didn't understand before.

  • @Thomas-ij7ki
    @Thomas-ij7ki 4 ปีที่แล้ว +1

    It would help to show the schematics. It is is hard to see how you wired all up.

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

      Hi, You are right, but the wiring is so simple, it does not worth the effort to draw it. Also, pretty much everything is explained in the video, you just have to watch it carefully.
      DIR (-) goes to 9, PUL (-) goes to 8. DIR(+), PUL(+) ENA(+) goes to +5 V, and ENA(-) is not connected. The 4 wires for the stepper always depends on the motor. The limit switch uses one of the interrupt pins, in this case pin 2. The LED is connected to the pin 4 using a limiting resistor.
      Also, there is another video mentioned in the description where I tell where did I connect the pins. Check that video from 17:15-19:00. You're welcome!

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

    1) You should NEVER use delay inside ISR.
    2) Serial print inside ISR is not recommended too

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

      Yes, you are right. I wanted to visualize that something actually happens when the ISR is triggered. Therefore, I had to send some messages to the computer, and I wanted to light up some LEDs. As the ISR was related to something which stops the motor, I think it is "okay" to use it as it is not taking away the resources from some important task.

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

    This guy spent %80 of the video time taling about the very simple things but when he goes in the important stuff which why we are all here in the first place, he went flying

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

    Thanks for the video! It was useful for me in order to construct my "Bimbo V.1" device: th-cam.com/video/vgfCYsiZAkE/w-d-xo.html By the way, what do you think it is actually good for?

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

      Do you want to open and close something with it?

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

      @@CuriousScientist Well, I would like to periodically close and open something...until its failure : ) and plan B is to do something like this: th-cam.com/video/aqAUmgE3WyM/w-d-xo.html

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

      Nice! So, you will build a fatigue testing machine! :D

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

    I "Liked" the video, I did that cause the code is available, but the wiring ... This code uses AccelStepper, and all my previous projects use Stepper, so stepper wiring is different, and so far I've not figured it out. Your code uses only 3 wires for the stepper control, (1, 8, 9); whereas usually I needed to wire all 4, usually (8,9,10,11); So I'm confused, but I've got time!

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

      Don't confuse the accelstepper library with other stepper motor libraries. This is a different system, it is not the video's fault. :)

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

      @@CuriousScientist I get that, I changed the code, added #define motorPin1 8, and such and added AccelStepper stepper(8, 9, 10, 11); and it moves, but VERY slowly and always in the same direction! I don't know any other method of using a 4 wire motor on a 3 wire program.

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

      @@CuriousScientist I'm using a DM542T driver

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

      You are using it totally wrong.

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

      @@CuriousScientist I am, obviously, it's not working, but I don't know what to do. And it looked so promising!

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

    Your linear screw is not pendiculer of the motor😂

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

    I need the switch to send the motor back home.

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

      Should I send it to you by post or what?

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

      @@CuriousScientist HAHAHAHAHAHA! Touché.

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

      But jokes aside, could you elaborate on the question a bit more? Maybe I can help. 😄

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

      @@CuriousScientist I need to send an object about 6 feet, via a motor. But, I need the object to come back once it hits the limit switch.
      I’m currently using a stepper for the “motor” part of my build, but I’m running into issues regarding missing steps. My end point continues to slowly move further away.
      This is really due to a combination of things. Stepper working with a diy belt system.

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

      Yeah, it can be due to many reasons. Check the tension of the belt, it can cause missed steps. Also, if you overload the motor or provide insufficient current to it, it can skip steps. Maybe it would be easier to put an encoder in the system and rely on that to navigate between different points.