I have been thinking on "Closing the Loop" on my desktop router. After a bunch of reading, obviously what I want is glass scales, but that is just too much money for my little machine, so I started thinking about rotary encoders attached to my steppers. This line of thought has led me to designing an encoder, and I have gone so far as to build the encoder wheels, but before I spend any more time finishing them and fitting them to my steppers I thought I would ask a few questions, but I should start with a bit of background.

My desktop router has about 9" x 12" of XY travel, and about 3" of Z clearance. I use it for making PCBs, small parts and molds. The lead screws are 3/8" x 12 pitch, and the steppers are kelings 381oz-in size 23 steppers. While there is a bit of backlash in the lead screws, it is nominal (<0.001"), and KFLOP compensates for it beautifully. This being said, in order to maintain accuracy on PCBs, I have to limit the feed//rapid rates to 30ipm or less. For less critical work I can bump the feeds up to ~90ipm, but I have to keep my "Accel" & "Jerk" numbers relatively low:

Code:
	ch0->Vel=120000;
	ch0->Accel=60000;
	ch0->Jerk=200000;
(I limit the actual ipm in my settings in KMotionCNC).

On a 4x6 PCB of fairly low density with trace widths > 0.020" and spacing = 0.020" I get very good results @ 30ipm or less. Above 30ipm things go awry, sometimes in the X, sometimes in the Y, sometimes in both. As the feed rate increases, so do the errors. Obviously there are "missed steps". The cumulative affect is as much as 0.050" which is simply unacceptable.

Ignoring backlash and microsteps, my setup should yield 1 / (200 * 12) Inches per Step = 0.0004166In/Step. My thought is that by closing the loop with 200ppr encoders tied directly to the stepper shafts I should be able to limit position errors by +/- 1 step = ~0.001". With the same setup 400ppr encoders should limit the error to +/- 1/2 a step etc, etc. In theory this should allow me to run the steppers near the top of their speed curve on PCBs (obviously there are negligible cutting forces involved) and KFLOP will correct for the missed steps.

I do not mean to be obtuse, but I want to make sure I am thinking this through correctly. By adding 200ppr encoders directly to the steppers I should limit absolute errors to 1/(ppr * lead screw pitch)? OK, assuming this is true, am I actually losing absolute accuracy? By this I mean, if KFLOP calculated an axis needs to move 0.020", given my setup params (16uSteps/Step, 200 Steps Per Rev, 12 Rev Per Inch = 38400uSteps/Inch) it should travel 768uSteps (48 encoder pulses using a 200ppr encoder) the encoder could reach the position anywhere between 752uSteps and 784uSteps (assuming no missed steps). Does KFLOP search for the center, leading edge, trailing edge or am I just over thinking this? LOL. If I made the "quantum leap" to 12800ppr encoders would KFLOP oscillate the driver between two uSteps? Obviously there is a 1:1 correlation between absolute accuracy and ppr in the encoder; by using a low resolution encoder (200ppr) am I robbing Peter to pay Paul, but gaining speed in the process or am I just robbing Peter?

The encoder wheels I made have 100 slots. Using two sensors this implies 200ppr in quadrature. Electronically it is trivial to use 4 sensors to achieve 400ppr in quadrature; however mechanically this is slightly more complex and perhaps more prone to vibration and shock causing misalignment. 8 or more sensors are probably beyond what I could achieve with my tools. Obviously I could build encoder wheels with more slots, but this would require larger diameter wheels (1/32" slots/spaces is the best I have been able to do while keeping tool breakage to a minimum, this implies a roughly 2" diameter encoder wheel (200 * 1/32" = 6.25 ==> 6.25"/Pi = 1.9894" median diameter) which mates nicely with the NEMA23 frame. To achieve 200 * 1/32 slots/spaces implies a 4" encoder wheel, certainly achievable if 800ppr is truly requisite, but I am hoping 200 to 400 ppr will be enough....?

Thanks in Advance for reading through this, hopefully I can get some guidance and close the loop....

Hunter