How do I know when my machine lost steps.

New link for me, Thank you for this info :slight_smile:

@Miguel_Sanchez I’m sure your “open loop to closed loop” converter solve the problem or is it still in development?

Such a thing would make you able to DETECT that you lost a step but it wouldn’t magically increase torque.

@Marcus_Wolschon https://www.youmagine.com/designs/dc-motor-closed-loop-control-software

@H_vanE your point being?

@Marcus_Wolschon I asked Miguel Sanchez a question relating to the subject. You made a remark as if to enlighten me on the subject which I am well acquainted with. I thought you could as well learn from someone (Miguel Sanchez) who actually developed such a system, taking in consideration your comment: “… I am planning to do that late this year” You would also notice that the link refers to a system that has PID closed loop control. My apologies if you misunderstood my reply.

@H_vanE I don’t see how it solves the problem of lost steps without any kind of feedback to the machine control software (MACH3 or Linux-CNC).
A stepper motor loosing steps or servo drive being too weak to reach a position in time will still be too weak.
The solution is to notify the machine control software to lower the feed rate or pause the program until a machine operator decides to lower the feedrate, increase RPM, change a dull tool or abort. Note that one axis being too slow means all OTHER axis must slow down as well. So even for a single line of g-code it may already be too late as the tool has taken as different path since 4 of 5 axis performed in time and 1 axis was slow or never got there at all.

So a closed loop DC motor control is PART of the solution but unless that motor has infinite power it doesn’t solve the problem alone.

(No “Serial port prints current position and target position every second.” is a) way too slow of an interval and b) neither MACH3 nor EMC2 actually read and handle that data)

@Marcus_Wolschon suggested to use encoder feedback with Mach3, I pointed out encoders can be had quite cheaply, plus that a digital read out was possible for manual operator verification of coordinates while machining.

@H_vanE My closed-loop project does not support steppers at the moment but DC motors so I did not feel it could help here though it could be repurposed as an alarm triggering mechanism (not driving the motor but supervising that the encoder values and step/dir commands remain close enough, raising an error signal if not). That would be a way to know when steps have been lost which was the original question.

Actually if you have an encoder and Atmel microcontroller anyway. The best way would be to add an ALARM-output to the servo drive. Pull it low when a STEP-pulse comes in before the final position of the last STEP has been reaches.
Replace the steppers with DC-motors PID-controlled from the Atmel.
Use the chain of ALARM-outputs and the regular E-Stop button as an E-Stop in MACH3.

Servo-Drives have a number of advantages.
Using the Atmel just for monitoring is not a good idea as you could gain much more using the same hardware.

A well setup stepper driven machine should not loose steps under normal operating conditions. So let’s look at your machine first and try to figure out why in the first place.

First describe your machine, what kind/model?
Stepper motor model/torque/inductance?
Stepper driver model/supply voltage?
Leadscrew/ballscrew/belt size/pitch?
Controller Mach3/grbl/Linux?
max feedrate/acceleration settings?

I run several machines using both stepper and servo drives. Currently running Mach3/Linuxcnc/UCCNC/grbl.

For me I only reduce Acceleration and max speed, and I finish to lost Step. My motor don’t have enough torque for the size of machine to go 150ipm and 25 in sec for ACC
I put 100ipm, and 10 in for acc, and is work Perfect :slight_smile:

Thanks for all the comments. I had again a proper look tonight. Everything moves freely so that was not the problem. Also cleaned the tracks at the same time. I did play around with the steps per unit setting and found out that I didn’t send out enough pulses to move 1mm. My new setting sends out 12more per mm. I recalibrate the machine to the new steps per unit and set new values for acceleration and velocity. Once I new the max velocity the machine could handle without making funny sounds I than set that value to 20% less. I did reset the acceleration to something I felt comfortable with and just felt right. I suppose I have to run a test program tomorrow to see if those changes make any difference.

On that not, does anybody has some experience with cnc carving? I just ran a sample the other day with a feed rate of 900mm/min. After some time I saw that my Z did not touch the material anymore. So over time of about 15min my Z was out by just about 2mm. I of course stopped and reset the axis and started the same toolpath wit only half the feed. That lasted a bit longer but still my Z was going more and more up. I did try it a third time with a feed rate of 200mm/min. On that speed it did go the whole way with being about 0.4mm of at the end. Time wise it just was ridiculous as it took 7h for a little oval dragon shape (150x80) in soft timber. Hopefully my new settings will stop Z from going off. Did anyone experience similar things and maybe has an explanation on why it happens?

+Sandro Kuehne Your Z-axis is skipping steps when going down. Most likely your feedrate is too fast so material is not removed fast enough and it pushes the bit upward more than the motor can handle. The net effect is the tool tip ends up above the stock material even when it thinks it is below and cutting.

The same may happen due to a too fast feedrate while engraving.

Right Miguel. I didn’t know that 900mm/min is to fast. I do most of my 2D work somewhere between 1500-2500mm/min and that’s all fine. Seems like carving is a new learning curve again.

What kind of feeds/speeds is everybody using for carving work?

I didn’t think that changing the direction of the stepper would make any difference but it did. After hours of research I found something that didn’t make any sense to why it would make a difference. It said to chance the direction in the software from active high to low and then reverse the motor driver from CW to CCW. I still don’t understand why it makes a difference but it does. I also went half on my micro stepping as well as acceleration and velocity. It seems to have fixed the problem. Strange

Does anybody have an explanation on that?