Register Help Remember Me? . .

# Thread: control signals to draw a circle

1. Hi,

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.

Thanks
Lakmal

2. 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.

3. ### The Following User Says Thank You to irving2008 For This Useful Post:

4. 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.

5. ### The Following User Says Thank You to stirling For This Useful Post:

6. 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!

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•