quintindunn / StringArtRobot

A StringArt robot inspired from https://www.youtube.com/watch?v=WGccIFf6MF8
MIT License
1 stars 0 forks source link

Generator/Slicer not working #5

Closed quintindunn closed 1 month ago

quintindunn commented 1 month ago

Generator/Slicer needs to move the arm to the forwards position prior to travel to next pin, after final loop around it should stay in the forward position to keep tension on the thread.

quintindunn commented 1 month ago

I think I've worked out a sequence to loop around a given pin:

Variables: fw -> forward angle (arm) bw -> backward angle (arm) d1 -> Clockwise (CW) d2 -> Counter-Clockwise (CCW) spacing = 360/pin_count

Sequence: 1.) Rotate to the pin 2.) Rotate d1 spacing/2deg 3.) Arm from fwdeg -> bwdeg 4.) Rotate d2 spacingdeg 5.) Arm from bwdeg -> fwdeg 6.) Rotate d1 spacingdeg 7.) Arm from fwdeg -> bwdeg 8.) Rotate d2 spacingdeg 9.) Arm from bwdeg to fwdeg

Not able to test this right now as I'm printing a new design for the stepper mount, but will implement this on a generator branch.

quintindunn commented 1 month ago

Complete rework of how the motor interprets rotational commands, moving from relative positioning to absolute position relative to the zero'd position of the motor. (#6, #7)

This seems to be working as I anticipated now even without real world testing through simulation from my StringArtRobotSimulator project. Hopefully any further tuning can be conducted strictly through the parameters I added to the generator, likely specifically the Table sleep time (tbsp), which is the time in milliseconds between the motor finishing a movement and the next command to be executed in the sequence.