Stepper motors

Im new to stepper motors and this question may have been asked and answered already.

I have a stepper that steps at 1.8 deg. If I want to move it 90 deg with the stepper library i give it a value of 50. As I understand this is a integer can I feed the it a float value to move the stepper a fraction of a deg?

if the smallest step that it can do is 1.8deg how can you do a step with a fraction of a degree?

You can get "in between" steps using microstepping, but the Stepper library is not set up to do that. It also requires support from the electronics that converts the digital output pulses to actual motor current.

--
Check out our new shield: http://www.ruggedcircuits.com/html/gadget_shield.html

I'm using a unipolar stepper with four coils, two split coils. And the motor driver I'm usig is a uln2003a, but I have access to a lm293d if it will work better. Oh and I'm using the generic stepper library bundled with arduino. Thanks

Thanks but my original question was if I could turn it a fraction of a degree, for instance 90.5 degrees.

thanks for the answers, i'm not planning on using microsteps, was just wondering if it were possible.

thanks for the answers, i'm not planning on using microsteps, was just wondering if it were possible.

Maybe you won't go down that route at the moment but just in case you do in the future, please don't go away with the idea that microstepping would do what you want as you've specified in your question. There's a lot more (and less) to microstepping than has been mentioned here. Though contrarily if you buy an off the shelf microstepping drive they are VERY easy to use and can be driven by the arduino very simply. Even "blink" will turn your motor by simply replacing the LED with just about any commercial driver - some cheap some expensive - you get what you pay for. Just be sure to understand what they can do, why they do it and what they can't do.

Micro stepping actually came about to get a motor past its resident frequency. This is more prevalent with large motors but it can happen with small motors under a large load. I saw a Parker demonstration where a rather large stepping motor was slowly brought up to speed. After it got up to a couple of thousand RPMs it stopped rotating and started to vibrate. Their new micro stepping integrator eliminated that. But repeatability of micro stepping is actually rather pore. Conceder using timing belts to come up with a ratio that will give you 1/2deg stepping. And timing belts are an anti backlash drive. For a relatively inexpensive integrator/driver look at www.geckodrive.com. Now all you need do is to send this driver a direction and PWM lines. These little drivers have taken the desktop and small home shop CNC guys by storm. But then you could go the other extreme and look into Anaheim.

Micro stepping a unipolar motor is discussed here:-
http://www.thebox.myzen.co.uk/Workshop/Motors_3.html

You still have to give it an integer number of steps, so for example 100 micro steps would be the equivalent of 50 full steps. Therefore 101 micro steps is the same as 50.5 full steps.
If you have 1.8 degrees per step then 101 micro steps would give you 90.9 degrees.

If you use a bi-polar motor you can get drivers that do 4, 8 or even 16 micro steps per step. This then divides the 1.8 degrees into smaller and smaller parts. But you still have to give the motor an integer number of steps. Just think of micro stepping as reducing that 1.8 degrees per step.

The point I was trying to make above is that this is all well and good in theory but in practice it rarely if ever works out like is being implied. Quoting theory without an explanation of what any naive user can actually expect to achieve in practice is in my view misleading. Using microstepping to increase a stepper driven system's resolution is a poor solution. Timing belts have been mentioned and are a preferred method in certain circumstances, particularly where cost is an issue. That is not to say don't use microstepping, I use it all the time, but I use it for what it was primarily designed for - i.e. to reduce mechanical resonance at low speed.

@mike - can't find microstepping on your link - has it moved?

can't find microstepping on your link

Figure IV shows half stepping for a unipolar motor.

Half stepping may be the "embryonic" form of microstepping but it exemplifies very few of the points of interest to this discussion. There is a world of difference in a real system's behaviour between half-stepping and microstepping to a factor of 10 for example.

Several years ago I worked with wafer probers that use a unique motion table with linear stepping motors in X- and Y-axis. Just the two-directional stepping motor design was pretty cool. But on top of that, because of the microscopic dimensions of integrated circuits, they use something like 100 (or was it 200?) micro-steps per physical motor "pole". Furthermore, they calibrated each unit with a laser interferometer and an error table in flash memory to correct any mechanical errors to a remarkable final precision positioning accuracy.

Not entirely sure what your point is but whatever - I stand corrected. Microstepping clearly is a good way of increasing resolution. All we have to do is get our arduino users to get a laser interferometer, build an error table in flash, build the circuitry to modify the microstepping waveforms according to that error table to bring the poles back to where we'd hope they'd be and we're home and dry.

I'll now go and switch one of my systems to use its max microstepping (128) and I'll be able to resolve my motors down to 0.0140625 of a degree - excellent (I don't think so).