While you're making recent comments, as a tangential aside, old mice with scroll wheels make semi decent X-Y position recorders for moving surfaces that the mouse guts+scroll wheel can be sprung against so the wheel rolls as the object moves.
You will have to hack some old mouse driver code to interface and determine which USB mouse input(s) are of interest.
It's a kludge that saved me time over a long three day weekend with no shops open years back when I was putting together a laser scanner project.
Eventually we had a proper stepper moter, for proof of concept it was an "uncontrolled" motor with a mouse scroll wheel counting clicks for rough "good enough" position feedback.
That's a hilarious hack, I have a whole crate full of old mice so definitely will have to try this. Worst case it will allow you to automatically e-stop the machine if it encounters an obstruction. For instance: sometimes the air assist will flip a piece up and the laser head during high speed traversal will run into it. That requires immediate manual intervention right now, it would be nice if that happened automatically.
It was an Aha! moment for me when I looked a crate with old mice - they have rolling wheels and click buttons with plenty of sample drivers for counting wheel turns, <onclick> <clickrelease> events, etc.
Ain't pretty - but it works until a better version comes along.
You will have to hack some old mouse driver code to interface and determine which USB mouse input(s) are of interest.
It's a kludge that saved me time over a long three day weekend with no shops open years back when I was putting together a laser scanner project.
Eventually we had a proper stepper moter, for proof of concept it was an "uncontrolled" motor with a mouse scroll wheel counting clicks for rough "good enough" position feedback.