CNC closed-loop CNC machine with step motors and encoder

Dear All,

I've build a CNC machine using an Arduino UNO a micro step driver (DM556) and few rotary step motors. I'm using GRBL motion control on Arduino and Universal-G-Code-Sender on my laptop to control the machine.

While this works fine, sometimes, the motors get stuck or are not able perform the requested action. I thus want to include a feedback loop telling me how many steps where actually performed. I've read multiple tutorials on rotary encoders and was able to build a prototype reading the number of steps performed by each motor.

Now, I don't know how to use this information to correct the position of the motors. It's probably a naive question, but I don't know whether the feedback should be handled by Arduino or the G-Code Sender on my laptop. Is there any software that, having the feedback information, can handle this automatically or I must implement it myself?

I know of no software for closed loop stepper control at the hobbyist level. That does not mean that it does not exist but in my travels through the hobby CNC world I have not seen it.

Modifying grbl to use closed loop control would be challenging and probably not possible with an Uno.

Writing your own program would be more challenging.

The easy solution is to install steppers (and drivers if necessary) strong enough to handle the work load without skipping or stalling.

Probably that's the reason why I couldn't find anything :)

Thanks a lot, that's very helpful!