Go Down

Topic: Control stepper motor starting position? (Read 9 times) previous topic - next topic



What would be the best way to initialize a stepper motors starting position? Im would like my motor to operate 0-180 degrees but never go beyond that since it will be fitted against a wall. The starting position would be 90 degrees straight out from the wall.

Is there a way to control this? If i have to use a sensor it should be able to last a couple of thousend initializations.

Mike (beginner :-)


The standard method of initializing a stepper motor position is with a "home" position switch.

If you want your stepper motor to have a 0-180º range of motion, set up a mechanic switch at the 0 or 180º point.  During startup, move the stepper motor in the direction of your home switch until the switch is activated.  Now you know the position of the motor, and can move it to the 90º starting position.

Another option (since you do not require continuous rotation) is using a potentiometer as a voltage divider tied to the stepper motor shaft.  This will allow you to determine it's current position without having to move the motor.


One such switch is called an opto slot, as it is optical it will not ware out like a mechanical one. It consists of a photo transistor and detector.


you might be better using a RC servo
easy to drive from *duino
easy to set it's position
travels 0-180
sounds just the job to me (from here)
there are only 10 types of people
them that understands binary
and them that doesn't


Jan 28, 2011, 08:54 pm Last Edit: Jan 29, 2011, 04:19 am by 41south Reason: 1
I'm about to have a similar "problem" to this with an antenna Azumith/Elevation (Az/El) rotator. My Az needs almost 360 degrees rotation (it has a South "stop" so the cables don't wrap around) and the El needs 180 degrees. My thoughts were heading towards using a compass sensor such as the HMC6352 http://www.sparkfun.com/products/7915 for the Az so I knew where the stepper was but I was having trouble finding an inclinometer to handle the El stepper motor. I was trying to stay away from the mechanics of using a pot with such a large rotation.

I like the look of those opto slot switches, should have thought of those sooner - thanks for the tip  :)

Go Up