Math help for Arduino-based stepper index head

Feel free to talk about anything and everything in this board.
Alan Reinhart
Old Timer
Posts: 7
Joined: Sat Nov 09, 2013 12:16 pm

Math help for Arduino-based stepper index head

Post by Alan Reinhart »

Greetings to all!  My first post on this forum - looking for a little math and precision info.

I'm building an Arduino-based control for a stepper motor to cut clock and other type gears on my milling machine.
The stepper I have is a 200-step-per-rev or 1.8 deg per step motor. To simplify my design of the programming of the Arduino, I'm thinking I could use a gear ratio between stepper and spindle;  1:.5555 at full step (1.8 x .5555) gives me 1 degree per step, and with the 1/2, 1/4, 1/8 micro stepping available via the Easy Driver board, I'd also get the 'even' fractional degree steps.

All nice in theory, but every silver lining has it's cloud:  It starts with a halving of the available torque - which I think will be ok.  But the real question is the precision needed for functioning gears.  I think I'll be machining my own timing gears - the curvilinear tooth style should be easy to replicate by drilling a bolt circle then machining off the outer edge.  Thing is - I don't think I can get an exact ratio.  So how much error is acceptable?

I've found that a 40 tooth gear driven by a 72 tooth gear gives a .555556 ratio - that seems D**M close!  Would stepping at that rate give usable degree division for gear cutting?    ???

=Alan R.

User avatar
ArtF
Global Moderator
Global Moderator
Posts: 4592
Joined: Sun Sep 05, 2010 6:14 am
Contact:

Re: Math help for Arduino-based stepper index head

Post by ArtF »

Alan:

You neednt worry about the number of steps per degree, it can be an even number of a weird one like 486.2345 per degree, wont really matter.
Id worry more about having enough steps per rotation of the axis to ensure you can get a high enough number for good resolution when cutting.
  Since your coding the software, makes no difference if its an even amount of steps or not. Id use a 10:1 driver so you have 2000 steps per rev of the motor,  and tell the arduino to divide out the closest number of steps and go there for any motion command..fractions wont bother you at all as long as you take them into account for calculation of closest step..

  Trying to make the stepper drive anything at that kind of ratio would be nasty in terms of torque.. You really want about 300 steps per degree or higher.. Personally Id recommand 2000 or so if you have a choice. A single degree on an object only 1 inch in radius is a lot different than the same degree on an object 1 foot in diameter. In the end you want a good resolution on the perimeter of the object..not so much in degrees..

Art
Alan Reinhart
Old Timer
Posts: 7
Joined: Sat Nov 09, 2013 12:16 pm

Re: Math help for Arduino-based stepper index head

Post by Alan Reinhart »

Ok - so if I go with a step-up ratio of 10:1, I now have 2000 steps per 360 or per revolution.
So if I want to cut a gear with say....  28 teeth, I would divide 2000/28 = 71.428 - and use 72 steps as it would be 'close enough' on small diameters?

About the biggest diameter I could do is about 6" or so...  so the rounding up to the nearest whole step wouldn't introduce any significant error?  ???

I really did not like the idea of reducing the ratio (torque loss) but the idea of being to go 1 deg at a time seemed ...attractive.  :)

=Alan R.
User avatar
ArtF
Global Moderator
Global Moderator
Posts: 4592
Joined: Sun Sep 05, 2010 6:14 am
Contact:

Re: Math help for Arduino-based stepper index head

Post by ArtF »

Hi Alan:

  Youll find having 1 degree as the resolution would make it very fast, but near useless in operation.  You really want to up it so that
1 rotation of 360 degrees is more like 72000 steps at a minimum, many would be a great deal higher than that.
With any stepper you should get a pretty good speed at that rate, and a good resolution.  Your 28 tooth gear will then have 2571.14 steps between teeth..a much better situation. Really its usually considered to be a balance between speed and resolution, you want as much resolution as you can get without making it too slow. On the other hand if you tell it to rotate 360 degrees and it takes 20 seconds..thats no big deal. But if you have a very coarse resolution and try cutting say a 86 tooth gear, trying to get exacly 4.1860 degrees will be very hard... but with 72000 steps for 360, 4.186 degrees is simply 837(.2) steps ( which is 0.1% off target). .but with 1 step per degree  youd be .1846 DEGREES off target which is 4.6% off position which would probably matter..

  Basically the more steps it takes to go 360...the better..

Art
Alan Reinhart
Old Timer
Posts: 7
Joined: Sat Nov 09, 2013 12:16 pm

Re: Math help for Arduino-based stepper index head

Post by Alan Reinhart »

Ok - guess I'm still a bit off base...  I hear your advice  regarding the higher resolution.  I think I got side-tracked into thinking about degrees, etc.

So in your first reply you commented that a 10:1 stepping ratio would be good - which I took to mean I'd end up with 2000 steps for the total 200 available.  That is of course, stepping at full steps.  I am interfacing through the "Big Easy Driver" which will allow me to do 1/2, 1/4, 1/8 micro-stepping.  I plan to make all this available thru my interface - or  'auto-select' depending on the input.  This should translate to:
Full step: 2000
1/2: 4000
1/4: 8000
1/8: 16,000  steps per rev - still a long way from your suggested 72,000.

To get to 72,000 steps per rev (I'd call this 'hi-res' mode!) I'd have to run full step at 10,000 (for even numbers), then I would have:
full: 10,000 steps/rev
1/2: 20,000
1/4: 40,000
1/8: 80,000

which def gives me the range you are talking of... but a 50:1 gear ratio seems a bit extreme
to this gearing novice!  Is this the line I should be thinking along?    ???

=Alan R.
Alan Reinhart
Old Timer
Posts: 7
Joined: Sat Nov 09, 2013 12:16 pm

Re: Math help for Arduino-based stepper index head

Post by Alan Reinhart »

Did a bit of searching and have found low priced motors with 50:1 gearboxes!
Since I'd never have much of a load, these transmissions, tied to my stepper, would give the range you suggest.  Jogging would be painful, unless there was a way to switch out the gearbox...  More food for thought!

A.
John S
Old Timer
Posts: 125
Joined: Sun Sep 12, 2010 12:33 am

Re: Math help for Arduino-based stepper index head

Post by John S »

Alan,

Have a read of this, might save you a bit of work.

http://bbs.homeshopmachinist.net/thread ... controller
John S.
Nottingham, England
User avatar
ArtF
Global Moderator
Global Moderator
Posts: 4592
Joined: Sun Sep 05, 2010 6:14 am
Contact:

Re: Math help for Arduino-based stepper index head

Post by ArtF »

Ive think rotary axis are at 40:1 to 72:1 typically. I think mine is about 40:1 but Id have to check. 
This is why most rotaries seem to use wormgear drives, easier to get large ratio's that way..

Art
John S
Old Timer
Posts: 125
Joined: Sun Sep 12, 2010 12:33 am

Re: Math help for Arduino-based stepper index head

Post by John S »

And the advantage of using worm drives is that they can't be driven backwards in the larger ratio's by cutting forces.
John S.
Nottingham, England
Post Reply

Who is online

Users browsing this forum: No registered users and 68 guests