I wanted to get it working today. So instead of debugging my version of gCodeSender, I just hacked a copy of my gCodeFilter and used Rabbit gCodeSender.
Rabbit gCodeSender has some faults but it worked:
The Sticky Note is not very flat thus some variance in the burn. Here is a close up:
The design is about 45mm x 45mm.
Note how the lines are wavy, that is the oscillation of the SCARA arm. You can see it dies down after a few millimetres. Basically I need to add a light brake to the arm to dampen the oscillation (if I was to persist with this design).
Now the truncation of the right is by design:
To Home the SCARA I set zero for a fully outstretched or straighten arms. Pretty easy.
I did spend a few hours looking a PID to control the overshoot/undershoot.
Its feasible but you need to add optical encoders for the positional feedback, and a processor between GRBL and the A4988s.
But the purpose of this project was to prove the gCode filter works rather than the basis for a proper SCARA.
The easiest way to fix the overshoot/undershoot is to let "gear friction" dampen it.
Limit Switches and Drawing Envelope
I draw up a design for limit switches and the drawing envelop. Not much envelope:
Should have used 60mm for Arm 2 rather than 50mm.
Set the controller 1/4 stepping. 1/16 is over kill for this project. 1/4 stepping will increase torque.
Cut the tracks to the reverse Y motor phases and jumped the limit switch sensors. I hope there is no interference from the stepper motor drive cables.
I bought some micro-switches but I have not worked out how to install them. I don't have a M2 screw/bolt that is long enough. Perhaps epoxy is the way to go. Even then the "knock" bolts are not long enough. Needs more though.
I need to turn the Laser off in the initialisation string for GRBL.
Once I have tested the Homing sequence this project is done.
I had a project killed (could not get it to work) because of common power supply and electrical interference from the stepper motors. I did have some success by twisting the stepper motor cables and moving them away from the electronics. But I am still worried about the limit switches and the cables running near the stepper motor cables.
Well I found a really good discussion (by chance) on the GRBL WIKI (https://github.com/gnea/grbl/wiki/Wiring-Limit-Switches). I will definitely try the RC filter option.