Pages: [1]   Go Down
Author Topic: Control stepper motor starting position?  (Read 7283 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 :-)
Logged

New Hampshire
Offline Offline
God Member
*****
Karma: 13
Posts: 779
There are 10 kinds of people, those who know binary, and those who don't.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged


Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 515
Posts: 31567
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

Logged

Leighton Buzzard, UK
Offline Offline
Edison Member
*
Karma: 20
Posts: 1318
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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)
Logged

there are only 10 types of people
them that understands binary
and them that doesn't

0
Offline Offline
Newbie
*
Karma: 0
Posts: 17
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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  smiley
« Last Edit: January 28, 2011, 10:19:08 pm by 41south » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 17
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 smiley

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

Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 332
Posts: 16566
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

0
Offline Offline
Tesla Member
***
Karma: 118
Posts: 8962
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Consider the daffodil. And while you're doing that, I'll be over here, looking through your stuff.   smiley-cool

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 515
Posts: 31567
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Offline Offline
Edison Member
*
Karma: 6
Posts: leet
If you're not living on the Edge, you're taking up too much space!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The code I wrote measures the current going to one of the windings to detect the end point if there's a hard stop.
Logged

If you fall... I'll be there for you!
-Floor

Skype Brighteyes3333
(262) 696-9619

0
Offline Offline
Shannon Member
****
Karma: 162
Posts: 10523
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

[ I won't respond to messages, use the forum please ]

Pages: [1]   Go Up
Jump to: