Thread: control signals to draw a circle
This is my first post! :)
I am planning to build a 'plotter' and wondering how the X and Y stepper motors should be controlled. If a line to be drawn, should the X and Y motors be stepped as illustrated in the drawing? If so, when a curve is drawn controlling will be same?
Red line is the line to be drawn
Pink line is the path of the pen
My intuition tells me that only one stepper is operated at a time. Your help would be greatly appreciated.
Essentially you are right. Suggest you read
Bresenham's line algorithm - Wikipedia, the free encyclopedia
for the basic line-drawing approach. While this will get you started however don't underestimate the complexity of handling the real-world mechanical issues of, for example, acceleration & deceleration, unless you can accept very low drawing speeds.
Both steppers could, and probably should, be operated at the same time to maximise smoothness of the line.
The Following User Says Thank You to irving2008 For This Useful Post:
You're entering the field of "XY Interpolation". I wouldn't worry at this stage about whether the XY motors step individually or at the same time - that's way down the road and when you understand how and when to step you'll find that sometimes the X leads and sometimes the Y and sometimes they'll step together. e.g. You've given an example of a 45 degree line and in that "special" case they can/will/should/may (depending on your implementation) both step together (IF you have the same "steps per" on X and Y).
With regards circles - for example if you start at 9 o'clock and draw clockwise, Y will lead until somewhere between 10 and 11 when both Y and Y will step together for (some) period and then X will lead until somewhere between 1 and 2 etc. etc. i.e. you'll discover you're interested in "octants" (as in half quadrants).
Last edited by stirling; 16-06-2013 at 10:17 AM.
The Following User Says Thank You to stirling For This Useful Post:
Thanks and I think I got a lot of work to do. :)
Anyway ready to take the challenge and proceed. Hope you will help me whenever I am in need of help.
"Bresenham's line algorithm" being studied at the moment... :)
Thank you again for the guidance!
By AdCNC in forum Resources & HelpReplies: 16Last Post: 10-07-2013, 02:01 PM
By millmateuk in forum Artsoft MachReplies: 1Last Post: 13-06-2013, 06:04 AM
By Peter. in forum Motor Drivers & ControllersReplies: 24Last Post: 17-09-2012, 07:36 AM
By Martin Paul in forum Machine DiscussionReplies: 2Last Post: 18-04-2011, 11:58 PM
By wizzy in forum Routers, Spindles & ControllersReplies: 4Last Post: 11-02-2011, 11:51 PM