Welcome! Log In Create A New Profile

Advanced

Flowchart/general programing guide?

Posted by sun2407 
Flowchart/general programing guide?
February 21, 2008 02:55AM
Hi,

well i have never programmed a 3 axis stepper motor before and I can't get around the idea of how I would program the motors if I started from scratch. I just ordered the Audunio. Hopefully it will be here early next week. But in the mean time I want to try to program the stepper motors using the Basic Stamp microcontroller which I already have.

Does anyone know if there is a general guide to programming 3 axis stepper motors. There is probably books out there that show the easiest and most robust algorithm for programming a 3 axis motor. A flowchart would also be great also.

thank you

sun2407

Edited 1 time(s). Last edit at 02/21/2008 02:55AM by sun2407.
Anonymous User
Re: Flowchart/general programing guide?
February 21, 2008 03:58AM
You'll need some kind of driver to send power to the steppers. Do you already have that?

--Blerik
Re: Flowchart/general programing guide?
February 21, 2008 09:55AM
i'm not entirely sure what you mean. i've spent the past 3 months learning how to use and program an Arduino to control steppers, so I can definitely help you.

first off, you should look into the stepper control code we've already written. the easiest to understand is in the GCode_Interpreter firmware. its located here: [svn.reprap.org]

secondly, what stepper drivers are you using. i would recommend the RRRF stepper motor drivers. they use the industry standard step/direction interface. what this means it that you control them with 2 pins: step and direction. when you send a pulse on the step pin (take pin high for 10 usecs, then back to low) it will take a step in the desired direction. the direction is determined by direction pin. high = forward, low = reverse.

thirdly, there is an algorithm for coordiniated movement along a line (ie. when you want to move in both XY at the same time in a straight line) this is called Bresenhams DDA (digital differential algorithm) it has been implemented in the code above.

thats all there is to it, good luck!
Sorry, only registered users may post in this forum.

Click here to login