CNC Homing And Over-Travel Discussion
idbruce
Posts: 6,197
Hello Everyone
I am currently considering homing and over-travel issues, so I am wondering what others are doing and what kind of successes or failures they have encountered. As usual, there are several ways to do this, hall effect sensors, proximity switches, slotted optical switches, limit switches, etc... or no switches at all, with simple hard stops.
I came across a PDF which discusses three common methods and it is woirth reading just for the basics, but I want to get a little more in depth. This PDF can be located here: http://www.galilmc.com/support/appnotes/optima/note2448.pdf
I personally like the idea of hard stops for a 3D printer, but I am unaware of a method to measure the torque of a stepper motor.
Anyway, let's hear what you have to say.
I am currently considering homing and over-travel issues, so I am wondering what others are doing and what kind of successes or failures they have encountered. As usual, there are several ways to do this, hall effect sensors, proximity switches, slotted optical switches, limit switches, etc... or no switches at all, with simple hard stops.
I came across a PDF which discusses three common methods and it is woirth reading just for the basics, but I want to get a little more in depth. This PDF can be located here: http://www.galilmc.com/support/appnotes/optima/note2448.pdf
I personally like the idea of hard stops for a 3D printer, but I am unaware of a method to measure the torque of a stepper motor.
Anyway, let's hear what you have to say.
Comments
Ken Gracey
Thanks for your input, which really got me thinking about the hard stop method. Did you read that PDF?
As applied to stepper motors, more particularly stepper drivers, I am now wondering whether the current changes as the load is increased or decreased. Taking the Gecko G251X for example, this drive will handle 3.5A per phase with a heat sink. The maximum current delivered through this drive can be adjusted with a single 1/4W resistor. For the sake of discussion, let's assume that the maximum desired current is 2.0A, which is set by the appropriate resistor value. My question now is whether or not that 2.0 Amps is being constanly applied to each phase or does the amperage change according to the load? If the amperage changes, it should be simple enough to monitor the amperage of the drive and apply it to a torque limit, which would indicate that home has been reached or whether an over-travel condition exists. This would eliminate sensors and switches.
I imagine this could be useful for other types of drives as well, and may be a solution for coolant flooded environments.
I've used the Geckos before, but not with current sensing.
And no, I didn't read the whole PDF. I don't have the time today, unfortunately.
Carry on - I'll lurk and check in on this interesting thread.
Ken jumped in with flood coolant messing up nearly everything, but you are thinking 3D printing. I'd go with optical breaks or hall-effect sensors.
But I wouldn't have these stops represent a calibrated X0 Y0 or Z0. They would be in negative regions (a few steps beyond where home base should be) and act only as fail safes.
Of course, there would be limit switches at both extremes and that annoys me a bit as they eat up a whole six i/o pins. Full control of 4 steppers( enable, direction, and step) eats up 12 i/o. So you have 18 pins consumed already.
In the scheme I am thinking the Propeller will have 3 or 4 used for I2C to an ADC chip, likely 3.
So starting with 28 available, 21 are a committed, 7 remain for heater PWM print heat and bed heat, power on/off, fans, a kill switch, and such.
Yeah, one Propeller is cutting it pretty close for a 3D printer.
However, I did start this discussion for all types of CNC homing and over-travel, not just 3D printing. And yes, Ken threw a very valid point into the subject.
Theoretically speaking, there should be no need for home or limit switches. In the case of hard stops, when you first start the machine, if the torque (current) limit is obtained within one index point, you know you are already against a stop, and if that is the case and you are going in the direction of a homing stop, simply reverse one index point and mark zero, if not then slowly reverse in the opposite direction until the torque (current) limit is obtained, then reverse one index point and mark zero.
In my opinion, all axes should have hard stops anyhow, to prevent machine damage, and to me, the other switches and indicators would be a waste of time, energy, and space, providing the machine is indexed correctly to zero and no over-shoots occur. However mistakes will be made, therefore if switches are used, I believe they should only be used as an indicator that the end is near.
In normal situations, I would say that zero should be nowhere near the beginning of possible linear travel and the workpiece should stop way before the ending of possible linear travel can be reached. So in other words, you obtain the location of the stop near the beginning of linear travel, then pick an arbitrary reversed index point and make it zero, as is the case when zeroing to a fixture or workpiece. At which point, the limit of travel would become the width of the fixture or workpiece, and the stop at the end of linear travel, would only be there to prevent severe damage in case of a coding error.
EDIT: However, the above arbitrary zero scenario could not be applied to the Z axis.
Backlash will need to be measured with a dial indicator. I'd put the money into ballscrews, too.
Limit switches have always been a problem on my desktop mill. Once you hit them, whatever part you were making is wrecked since you lost your location. Would've been better if my work envelope was properly defined in whatever CAM program I was using.
Ken Gracey
EXACTLY!!!!! The work envelope should be determined before any machining begins, to ensure it fits within machine parameters.
I am now wondering if you read my last post, since we both posted at about the same time.
EDIT: EXACTLY!!!!! The work envelope should be determined before any machining begins, to ensure it fits within machine parameters (Between any limit switches that may exist).
EDIT: Much of this is definitely a software issue.
EDIT: If limit switches are utilized, I am now beginning to think they should be considered E-Stops, providing current sensing is possible to detct torque limits, and the hard stops are only there to help set zero and to prevent severe damage to the machinery. However, if limit switches are utilized, as Ken suggest, zero and over-travel could be and in my opinion should be established before reaching the switches.
Stepper motors are not quite like DC motors, in that Steppers are usually current driven, and the motor speed sets the back EMF, which determines the voltage seen across the motor. ( Current Drive does not care what voltage drop there is ).
That makes simple current-sense not much use, but you could detect voltage changes that are unexpected for the speed, and so sense a stop.
Google finds this, covering exactly that topic
http://www.edn.com/design/analog/4368829/Back-EMF-method-detects-stepper-motor-stall
For an ST part
There they mention reading the actual micro-stepping -> Sine.Cosine reference -> local FB PWM drive current regulate and feeding back that local Drive PWM regulation loop (usually simple analog schmitt-comparator) to give info on the Back EMF.
A Prop can check an external PWM waveform fairly easily.
OnSemi have parts (NCV70521) saying
["The chip provides a so−called Speed and Load Angle output. This allows the creation of stall detection algorithms and control loops based on load−angle to adjust torque and speed."]
Cheap printers seem to simply overdrive at power up, at lower speeds, into a soft-stop, so they then know where one edge is.
After that, they rely on not missing steps to keep track of XY space.
Thanks for the info, I will look into that. As for the following comment:
And just exactly how do they know when the soft stop is reached? Do they run slow for the maximum possible extent of travel?
Good question - I suspect something of a hybrid combination, of both simple stall-sense, and deliberate over-stepping, but I have not tried moving the head to extremes on power-off.
At lower torques, you can give enough steps to ensure you must reach one end stop. (soft here means some shock absorber action, but it also needs to be not so soft that an accurate physical zero is lost )
As jmg indicates and as the article he linked to outlines, there are chips and drivers available that enable or indicate stalls, but the Gecko G251X is not one of them.
Although this is an open discussion, I believe my best bet for the current task will be to combine jmg comments with Kens advice:
jmg said:
and Ken said:
I believe by combining these two and ensuring the work envelope is well within machine parameters through software, I believe the home and over-travel switches can be eliminated, at least for a 3D printer.
'
The only time I have ever hit a limit switch is because of a loss of steps on a stepper motor. When this happens the software thinks a certain axes is at this location, But in fact it's farther one way then it should be. My limit switches are all wired back to inputs as "over travel stop everything" Abort...
'
I have found that just a tiny Little knot in a piece of Oak can cause steps to be lost on a stepper from increased tool pressure.
'
I'm in the process of adding encoders to my NEMA 23 steppers. I think this is a must to determine where the axis really are.
'
I really like the code "JonnyMac" showed in his article in Nuts&Volts magazine (Spin Zone 3/2014). It uses shift Reg. to free up some I/O pins on the Prop. He has a PASM version that's really fast.
Okay Kwinn.... Thank you very much for your input... I am going belt drives for X and Y, but I really like the idea of optical encoders on the motor shaft to detect stalls or the reach of a hard stop. And considering my motors are dual shaft, that is a perfect solution. One of those cases.... Why didn't I think of that? Anyhow, it gives me a chance to plug US Digital encoders, I now wish I had three of them:
Walt - And thank you for all of the valuable information provided in your post.
EDIT: However with the use of screws, you also gain a mechanical advantage, but with belts, you gain the advantage of speed. I can't drive 55
'
I have set my CNC machine up and have it carving away....Then I hear that distinct sound a stepper makes when it's missing steps. It goes from a hum to a buzz.
'
I got to aggressive with the feed rates and usually junked out the material I was carving when this happens.
That is another very good point:
But 3D printers are everywhere right now and they're almost in a race to the bottom price-wise. They keep getting cheaper and cheaper, and sometimes even better.
How come you want to build a 3D printer? What are you going to do differently in your design?
I'm interested in what you're doing here, not accusing you of making silly choices.
Ken Gracey
Believe me, I understand. Of course, we are talking about all types of application and not just mine. In your type of application, the load can be very unpredictable, such as hitting a knot like you described, but in the instance of a common printer or a 3D printer, I believe the load is much more predictable, with the possible exception of the extruder, where a jam might occur.
Many of you have probably heard me say the phrase "wirery mess", but I never really got into talking about it. In the 3D printer thead, I was talking to Peter about clearance issues, and the problems with clearance pertaining to the spring bender CNC.
I was not joking, and I had many wirery messes due to clearance issues
You have to remember that it was all built from scratch, both mechanical and software. If there was a mechanical issue, and the software did not compensate for that issue, steps would be missed, the machine would keep feeding wire, etc... Then the whole machine would need to be recalibrated, just because of a few steps. The wire cutter needed extreme accuracy, one single missed step in a production run, and there was a wirery mess and a lot of down time. A later fixed that issue by putting a proximity sensor in the bending table to detect if a completed spring had exited the table at the appropriate time, through the software, if not, the machine was shut down. Until I did that, missed steps were an absolute headache and there were many wirery messes. And of course there were other areas where missed steps would create serious havoc, but the cutter was the worst. In all cases, with the proximity sensor, a completed spring must leave the table before more wire would be fed. It took a lot of time to remedy missed steps in all the various stepper motors.
I am truly thankful for that proximity sensor
Yep, also agree with T Chap. And Walt, where the heck you been? In a Florida swamp? Either you haven't been here for a long time or I've not run across you as much as in the past.
My main objective is to test my new design of linear actuators. I have eliminated many costly components in this design and they should be easy to reproduce. I am not saying they will work, but I must build them and test them. For the most part, 3D printers are supposed to be the next big thing, so I want to test my actuators in something that has a foreseeable future. If my design works and it is durable, then I believe there might be a situation where I can compete against parts and labor. In addition to being low cost, they will also be pretty rugged, but only acceptable for light loads, such as a 3D printer.
As mentioned elsewhere, I have another similar prototype that I built, and it worked well as long as the temperture was stable. In this design, I have tried to compensate for variances in temperture. However, by altering the design, I believe I also heavily reduced the load capacity of the actuator. I could be wrong about the load and I won't know until I test, but this version will be limited to NEMA 17 at the moment.
I also want to get back into the Propeller as a CNC controller and I figure controlling 3D printers would be a nice thing for the Propeller. I will be trying some new things in combination with some old things. I figure on resurrecting that serial terminal I was working on several years ago and using a PC to send G-codes to a Propeller, which in turn will control the various stepper drives and other items associated with 3D printers. Additionally, I also want to see if I can use my old stepper drivers, that use the Propeller's counters to accurately control 3D printing. If I can get it working, the 3D printer serial terminal, the control software, as well as all electical hook-up will all be open to the public.
More or less I am just experimenting
You wire all 6 in series and then feed the end into just one pin. Just buy the normally closed variety. You have over 6,000 of these to choose from on Mouser. I'm at the stage of my build where I need to be concerned about this. If your motors are weak, you just don't worry about it like on a desktop 2D printer. The motor will stall, and then when you need to home it, it starts up again. On a more powerful machine, you don't rely on the motor stalling and you don't want to have the machine self-destruct and so over-travel limit switches are needed. A guy got killed on a big machine when it jammed up due to failure/missing/jumpering-out of the over-travel limit switch. When he was taking apart the machine to un-jam it, the lead screw broke or flew like a spring under tension and somehow went through his skull.
IDBruce, you have over 6700 to choose from on Mouser:
http://www.mouser.com/Sensors/Proximity-Sensors/_/N-7h7mq?Keyword=proximity+sensor&FS=True
You sure are providing a lot of nice input here. Thanks. This will be a good reference for years to come.