PDA

View Full Version : L293/Stepper Motor Help



Sara
02-14-2007, 03:03 AM
I need help in my project .I USED IN THE PROJECT UNIPOLAR STEPPER MOTOR· ,5 WIRES ,48 STEPS EACH

·7.5 ,L293D chips ,WITH SPARTANT -3E STARTER KIT BOARD.

I HAVE TO USE ALL THESE THINGS TO LET THE STEPPR POINT TO SPECIFIC DIRECTION ,BUT THE

PROBLEM IN THE STEPPER I DO N'T·HOW CAN I RETURN TO THE OIGINAL POSITION OF THE STEPPER,I

MEAN· THERE MUST BE INITIAL POSITION FOR THE STEPPER·.·THIS POSITION MUST BE FIXED EVERY TIME I

HAVE TO START FROM IT.HOW CAN I DO IT????

please heeeeeeeelp me ???????http://forums.parallax.com/images/smilies/cry.gif http://forums.parallax.com/images/smilies/cry.gif http://forums.parallax.com/images/smilies/rolleyes.gif http://forums.parallax.com/images/smilies/rolleyes.gif


[Subject Changed By Moderator]

Post Edited By Moderator (Chris Savage (Parallax)) : 2/14/2007 3:43:46 PM GMT

metron9
02-14-2007, 03:16 AM
Typically a stepper motor design uses a stop switch where you control the stepper movement in one direction while you poll the contact switch for closure. When the switch trips you have your known position.

I use some tiny steppers where they have an internal stop so you just rotate the stepper more than 360 degrees and the stop keeps the position at zero.

Many other methods can as well be deployed.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Think Inside the box first and if that doesn't work..
Re-arrange what's inside the box then...
Think outside the BOX!

Mike Green
02-14-2007, 03:37 AM
By the way, if you're using a Spartan-3E Starter Kit from Xillnx, this is a support forum for Parallax products (like the Stamps, SX processors, and Propeller). If you're having problems using the Xillnx kit, you should look for a support forum for Xillnx products.

Sara
02-14-2007, 04:08 AM
Thank you for help ,but in my project i use gps to get my position than calculate the direction of specific

city that is constant for example if i am in any place in the world and i need to know the direction of ny

from my position ,ny is constant position every time.so i must get my current position from gps do some

calculation on it. And from the stepper must move to the direction of ny.

Tricky Nekro
02-14-2007, 04:49 AM
Why don't you use a servo... They may have much less angle of view but are much more precise and strong than a stepper!!!

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
-Rule your Destiny-
--Be Good. Be Bad. Be Provas--

The hellinic (Greek) robots portal: Greekbotics (http://ptyxiouxos.net/greekbotics/e107/news.php)
Many Projects and Schematics by the users·and also robotic news
(Translate using babelfish (http://babelfish.altavista.com/babelfish/tr))

Paul Baker
02-14-2007, 06:08 AM
Provas, where you intending to post with black text on a black background? Makes it a little hard to read :)


Provas said...
Why don't you use a servo... They may have much less angle of view but are much more precise and strong than a stepper!!!

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker (mailto:pbaker@parallax.com)
Propeller Applications Engineer
[/url][url=http://www.parallax.com] (http://www.parallax.com)
Parallax, Inc. (http://www.parallax.com)

Sara
02-14-2007, 02:30 PM
well..

the exact problem that i have that i want to know where is the current position of the stepper motor shaft to rotate it towards the north. of course we need a compass to know the exact direction,

But how could i know what is the current position of the shaft?
And if any one have an idea how to connect it to the compass to rotate it to the north?

thanx..

Bruce Bates
02-14-2007, 04:30 PM
Sara -

The device you need is called a rotary encoder. It is a feedback device which will report its rotary position when polled. Generally it will report in one of the following ways:

Enoding:

BCD, DECIMAL, HEX or Gray Code

Positional Range:

0-nn, 0-nnn, or 0 -nnnn

Data range:

0-15, 0-99, 0-255, 0-1024
·2^4, -----,·· 2^8,·· 2^10

These can be directly attached to the stepper motor shaft (front or rear), or indirectly attached via a firm linkage like sproket and chain or 1:1 gearing.

Regards,

Bruce Bates

Post Edited (Bruce Bates) : 2/14/2007 9:34:58 AM GMT

metron9
02-15-2007, 02:51 AM
Bruce is correct about the encoder of course but typically a stepper setup doesn't need one because once you zero the stepper to a known position you know the position that is if you are driving the stepper motor. If something else is driving the stepper and you don't have access to the digital data driving the motor or you need to be very exact with confirming feedback via an encoder that's a different story. You originally asked how to return to a known position or the initial position of the stepper.

If you have the possibility of the stepper kipping steps because of unknown loads an encoder can gige you the feedback for each step of the motor. but just to return to a known position is easily done with a stop micro switch or a photo switch feedback at that known position.

Encoders are typically used on motors with no position feedback, a motor driving a belt on a machine for example being monitored by an encoder for its exact position so other processes can be done at those known positions for example.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Think Inside the box first and if that doesn't work..
Re-arrange what's inside the box then...
Think outside the BOX!

Chris Savage
02-15-2007, 03:20 AM
That is how the C= 1541 disk drives worked. The head was driven by a Stepper Motor that would bang against a stop and then move a known number of steps. If there was a read error it would try calibrating by banging the head against the stop again. Over time this caused failures. An IR detector like that used for the write protect notches could’ve saved some wear there. Basically a beam-break for calibration. Something to keep in mind.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support

John R.
02-15-2007, 03:25 AM
Clarifying something for Sara, when using a stepper motor, after determining "home" by either mechannically "stalling" the stepper against a mechanical stop, or tripping some other type of sensor, you "know" where the stepper motor is because you basically "count" the steps you move the stepper, adding for one direction, subtracting for the other.

The reason people talke about "resetting home" (like when Chris mentioned "banging against the stop again", is that sometimes the steppers "slip", and even though you sent a pulse, the motor didn't move that incriment, or moved one to many. If an external force is applied to the motor that exceeds it's holding power, this can also put the motor "out of sync" from where the software counters think it should be.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
John R.
Click here to see my Nomad Build Log (http://share.crustcrawler.com/JohnR/)

LSB
02-15-2007, 06:38 AM
I think you'll need a compass to tell you which direction you are facing as well. Suppose you are in Qaanaaq, Greenland and facing North. You calculate that NY is WSW, so the needle of your device rotates to about the 8:00 position--now turn 90 degrees and face West; your indicator still points at 8:00, which is now SSE. You need 2 pieces of information to calculate direction--position and bearing (direction). So... with a compass, rotate the compass (with the stepper) to face North--this becomes '0', now rotate (-) your calculated degrees to point WSW.

Edited:
Reading the thread again, there are a couple of choices for compasses. Dinsmore (?) makes one that the bearing pin/s goes high and (?) makes a much more accurate device that reads in actual degrees--outputs serial or PWM as I recall. Either might be mounted on an old CD (or similar) and spun, like a record, on the stepper shaft.

Post Edited (LSB) : 2/14/2007 11:49:40 PM GMT

tommy
02-16-2007, 08:04 AM
re-zeroing the stepper-motor (apparently for tomorrow's use).

. your program has calculated and sent the correct number of pulses to get it to point where you wanted it to point...

.· now get it to count back before today's shut-off.

. ready for tomorrow.





tommy