Welcome to Our Community

Some features disabled for guests. Register Today.

Auto calibration/stall detection

Discussion in 'CNC Mills/Routers' started by Mirthgiver, Sep 28, 2020.

  1. Mirthgiver

    Builder

    Joined:
    Sep 2, 2020
    Messages:
    28
    Likes Received:
    6
    I realise this has probably been discussed before, but I can’t seem to find the info I’m looking for. I’m very new to electronics and a total beginner when it comes to CNC.

    Based on my understanding of stepper motors, there’s a voltage spike when they hit an obstacle (eg the far limit of the gantry rail). If this is the case, why isn’t this voltage spike used instead of physical limit switches?

    During initial machine calibration, wouldn’t it be more accurate if the gantry moved from one end of the axis to the other automatically to determine the total number of steps traversed?

    I assume either this is something people already do (and hopefully there is some kind of program already) or it doesn’t work how I think it does. Either way, I would be interested in finding out.

    If it matters, I’m using a stock LEAD 1010 with blackbox and Nema23 steppers. Thanks for your help
     
  2. Rob Taylor

    Rob Taylor Master
    Builder

    Joined:
    Dec 15, 2013
    Messages:
    1,470
    Likes Received:
    748
    There may be a voltage spike as the coil field collapses, but only *after* the driver has cut power. First it would have to know to do that. The one thing that always spikes when any motor stalls is current... Except when steppers are being microstepped, because the driver simply doesn't provide any more current to them. The duty cycle of the PWM wave would shorten to compensate for the lack of back-EMF, but that would be the only thing you could feasibly look out for, and you'd really be best looking for that at the driver level using some sort of micro machine learning platform on the outputs. This may be the way the TMC2130 driver performs its sensorless homing, but I don't think that's enormously reliable, precisely because it's a "dumb" sensor and sometimes the exact nature of the bump doesn't overcome its sensitivity level or whatever.

    A better option would be to go closed-loop and look for a position following error. "Did the motor move? Did you command it to?" -> stall. This can be performed reliably at very low speeds, unlike current sensing.

    In general, avoiding shock loads, current spikes, frame misalignment, or any of the other adverse effects from crashing a powerful motor is probably the best policy. In-motor homing is usually done on machines that have servos with an absolute bit on the encoder, since it's a more reliable location than a switch.

    Personally I'd stick with switches- I can set them a couple mm in from the ends of travel precisely so I don't have to crash anything and still home at fairly high speed.
     
    Peter Van Der Walt likes this.
  3. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    14,927
    Likes Received:
    4,291
    I have a philosophy: build it square and true. Then you dont need to bother with too much compensation, calibration, adjusting. Do it right while you build the machine. Then just a once off steps per mm calibration.
     
    Giarc likes this.
  4. Corey Corbin

    Corey Corbin Well-Known
    Builder

    Joined:
    Feb 27, 2016
    Messages:
    135
    Likes Received:
    62
    If I understand this the voltage/current spike is a result of the crash. Crash already happen micro seconds ago. This is too late you don't want it to crash, limit switches are cheap and are easier to position to keep machine from crashing. Crashing machine means having to tighten and realign machine. And in the event you have a crash that is on your part you need a E stop switch or like me being too lazy I grab the closest limit switch.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice