Go Down

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

dreken

Hi,

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.

Cheers,
Mike (beginner :-)

jraskell

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.

Grumpy_Mike

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.


mmcp42

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

41south

#4
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  :)

41south

I have found these being used in 3 axis mills to "home" the steppers, they are small, cheap and if they are good enough for a cnc mill will solve my problem nicely :)

http://www.sparkfun.com/products/246 QRD1114


retrolefty

I think a simpler method for a home position indicator/sensor is a simple hall effect switch mounted on a fixed part and have a small permanent magnet attached to the rotating part. Won't be effected by light level or dirt/dust build up, etc.

http://www.sparkfun.com/products/9312

Lefty

zoomkat

If the stepper setup has the mechanical strength, one can just drive the stepper motor in in a desired direction until it hits the hardstop. Drive the motor with a larger number of steps than the full travel step number, and then start at that position as step 0.
Google forum search: Use Google Advanced Search and use Http://forum.arduino.cc/index in the "site or domain:" box.

Grumpy_Mike

What have these motors got to do with this thread? They are brushless motors and this thread is about stepping motors and initial position.

sbright33

The code I wrote measures the current going to one of the windings to detect the end point if there's a hard stop.
If you fall... I'll be there for you!
-Floor

Skype Brighteyes3333
(262) 696-9619

MarkT


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.


3-axis accelerometer?

But what accuracy / repeatability are you looking for?
[ I won't respond to messages, use the forum please ]

Go Up