Maker Pro
Maker Pro

Steppers as rotary sensors

R

Rod Speed

Jan 1, 1970
0
Michael Black said:
Mike Harding ([email protected]) writes
It's not just a matter of newsreaders.

Correct. There aint many used much that dont handle them gracefully
and the fools that are using ones that dont handle crossposting
gracefully dont get to stop on crossposting because their pathetic
excuse for a newsreader doesnt handle crossposting gracefully.
Cross-posting is usually the result of someone who can't
be bothered to figure out the most appropriate newsgroup,

Bullshit. Cross posting like was seen with the post being discussed
is done because there isnt a single appropriate newsgroup and it
makes a lot more sense to crosspost it to those that are appropriate
rather than posting to just one of them and see what replys turn up.
so they shotgun across a bunch of somewhat related ones:
alt.engineering.electrical,
aus.electronics,
sci.electronics.components,
sci.electronics.basics,
sci.electronics.design

Every single one is entirely appropriate to the question being asked.
I can say outright that if it's posted to basics,
it doesn't belong in design, or vice versa.

Mindless hair splitting. It is a pretty basic question, whether
a stepper motor is usable as a rotational position sensor.
And its appropriate in design too incase there are some
rather subtle factors involved, as there are in this case.
If you are a beginner, then you aren't ready for design,

Bullshit. And basics aint necessarily just beginners anyway.
Many get into engineering because they want to make
something that isnt readily buyable and they may well not
have enough of a theoretical background to allow them to
actually comprehend an answer from someone who replys
assuming that full design is being asked about rather than
just a bit of a rough and ready approach to a problem.
and if you can design, then you've gone past the basics.

Not necessarily.
And then, let's post to a two other hierarchies, just because they exist.

Or you do have a clue and have noticed that the alt heirarchy
exists separately to the more formal hierarchys which attempt
finer distinctions in the structures and that has its own real
downsides, like that question you just split hairs about.
While I can see someone post to the Australian newsgroup,
because they live there and are among familiar people, I don't
see the point if they are posting to some other newsgroup.

Your problem. Thats done because the geographic group may
well not have too many who have gotten involved in that subject.
And if the original poster is not in Australia, then the
only reason they've posted there is because they saw the
"electronic" in the newsgroup name and decided to post there.

Wrong again. You do see quite a few who have noticed that
a particular geographic group has managed to achieve some
regular posters who do make useful contributions and some
choose to post to them just because they have noticed that.
That happens a lot with cross-posting, people search
for pertinent newsgroups using a keyword, and then
don't bother checking the newsgroups before they post.

Or they have the sense to realise that if there is just one
geographical newsgroup that includes the keyword thats
appropriate, that that may be because for whatever
reason there happens to be collection of individuals
who are interest in that subject who do use usenet.
And while I have no idea what alt.engineering.electrical is supposed
to be for, electrical invokes an image of motors and light switches
and things that Tesla, Edison, and Westinghouse worked with.

Or it could just be a result of the fact that the alt groups arent
named by some committee of self important prats and that
you do get some real downsides like that with that approach.
A stepper is nominally an electrical rather than electronic item,

But they do mostly get discussed in the electronics groups.
but I'd unless someone is discussing making
stepper motors, I'd place them in the electronic
realm since they virtually all the time require

What matters is where they are discussed.
Another key point against cross-posting is that it can often
result in unrelated issues, such as this, because someone
has jumped into some existing groups at the same time.

Hardly the end of civilisation as we know it any time soon.
People who don't normally talk together are
suddenly interacting, but without the interaction
of other things to temper the discussion.

Again, hardly the end of civilisation as we know it any time soon.
So if a discussion is kept to one newsgroup, if someone says
something that I'd consider outrageous, I might think twice
about saying something because I know some common points
that I have with that poster, and maybe even I realize that
I'll have to live with that person in the newsgroup in the future.

You're always welcome to do that sort of thing if you like.
No one is ever welcome to attempt to ram their views on
how things must be done down others throats like Mike did.
That's not the case when suddenly "people from other newsgroups"
are in the familiar newsgroup. This guy is an idiot for cross-posting.

You are an idiot for not understanding how effective cross posting can be.
The only real thing I know about him is that he's cross-posted;

Thats the nature of usenet, stupid.
I don't even know which, if any, of the newsgroups
he posted to is the one he regularly hangs out in.

Its completely trivial for anyone with a clue to check that.

You cant manage it ? Your problem.
 
M

Mike Harding

Jan 1, 1970
0
No one is ever welcome to attempt to ram their views on
how things must be done down others throats like Mike did.

Ram it down their throats??? Get a grip Speed.
Original post follows:

Quote
And there's a lot of us! You have probably posted this message
to a couple of million people - maybe more?

Was it really necessary to post to:
alt.engineering.electrical,aus.electronics,sci.electronics.components,sci.electronics.basics,sci.electronics.design
?

Why not try just one group to start with?

Mike Harding
End quote


Rod Speed is well know troll, he does have a basic knowledge
of electronics but is abusive, foul mouthed and resorts to simple
key macro responses when he looses the argument. He usually
just keeps responding ad infinitum until the other person gets
bored and stops. He can be fun to irritate occasionally but,
overall, usually fails to present a cohesive and rational argument.

In many ways people like Rod are one of the real dangers of
cross posting in that it brings them into groups like SED where
they don't normally reside.

Mike Harding
 
R

Rod Speed

Jan 1, 1970
0
Ram it down their throats???

Thats what you were attempting, Harding.
Get a grip Speed.

Let go of your dick before you end up completely blind, Harding.
Original post follows:
Quote
And there's a lot of us! You have probably posted this
message to a couple of million people - maybe more?

Terminally stupid comment.
Was it really necessary to post to:
alt.engineering.electrical,aus.electronics,sci.electronics.components,
sci.electronics.basics,sci.electronics.design
?
Why not try just one group to start with?
Mike Harding
End quote

Like I said, ramming your views on crossposting down his throat.

Reams of your desperate attempt to bullshit your way
out of your predicament flushed where it belongs.

Try harder, wanker. You might actually
manage to fool someone, sometime.
 
M

Mike Harding

Jan 1, 1970
0
Thats what you were attempting, Harding.


Let go of your dick before you end up completely blind, Harding.



Terminally stupid comment.




Like I said, ramming your views on crossposting down his throat.

Reams of your desperate attempt to bullshit your way
out of your predicament flushed where it belongs.

Try harder, wanker. You might actually
manage to fool someone, sometime.

And, you'll notice, he only _ever_ trims replies when he
wants to remove comments he finds difficult to deal with :)

Mike Harding
 
B

Bill Sloman

Jan 1, 1970
0
default said:
(snip)

You will never get "absolute" position information (turn it on and it
tells you how many degrees the shaft is relative to "north") but it is
easy to get relative information. With my synchro, the position was
very accurately reflected in the drive motor. As long as no one turned
the drive motor deliberately, it would show just what the driven motor
was doing.

None the less, there is obviously a rate of rotation low enough that
the voltages generated by the coils of the driven motor are going to
be less than the offset voltages of your LM324s, and the drive motor
won't follow any rotation at this rate or slower.

You'd probably have to rotate the driven stepper with a lathe to
generate a sufficiently smooth and slow rotation to demonstrate the
effect - unpowered steppers tend to be "notchy".

Measuring the inductance of the coils would let you get in-phase and
quadrature information about the position of a totally stationary
rotor within the angular range defined by a single step, which is all
an incremental encoder like a stepper motor can give you.
There's all kinds of shaft encoders, the simplest is just a series of
lines on a disc to pick up rotational speed, a stepper could easily
handle that task. A stepper just as easily goes one further, it puts
out two phases so it can tell which direction the shaft is turning in.
(or, more correctly, if the direction has changed).

Provided that the shaft is turning fast enough to generate coil
voltages larger than the voltage noise in your detectors ....
If one is a hobbyist and cost is a consideration, or just fooling
around with an idea, steppers are interesting devices. Where else can
you get an off the shelf alternator that puts out a few watts at slow
rotational speeds, for instance? Priced a full fledged synchro system
recently? Even surplus 400 cycle aircraft synchros aren't used much
these days, shipboard 120/60 cycle ones are practically museum pieces.
I built my stepper synchro for less than $10. Solve a problem
inexpensively and get to tinker with it is how I relax - Working on
someone else's 8 million dollar project and I buy better and more
costly hardware.

And pay more attention to the fundamentals of what you are doing?
 
R

Rod Speed

Jan 1, 1970
0
Mike Harding said:
And, you'll notice, he only _ever_ trims replies when he
wants to remove comments he finds difficult to deal with :)

More of your puerile lying that anyone can readily check for themselves.
 
K

Klaus Vestergaard Kragelund

Jan 1, 1970
0
Bill Sloman said:
You will never get "absolute" position information (turn it on and it
tells you how many degrees the shaft is relative to "north") but it is
easy to get relative information. With my synchro, the position was
very accurately reflected in the drive motor. As long as no one turned
the drive motor deliberately, it would show just what the driven motor
was doing.

None the less, there is obviously a rate of rotation low enough that
the voltages generated by the coils of the driven motor are going to
be less than the offset voltages of your LM324s, and the drive motor
won't follow any rotation at this rate or slower.

You'd probably have to rotate the driven stepper with a lathe to
generate a sufficiently smooth and slow rotation to demonstrate the
effect - unpowered steppers tend to be "notchy".

Measuring the inductance of the coils would let you get in-phase and
quadrature information about the position of a totally stationary
rotor within the angular range defined by a single step, which is all
an incremental encoder like a stepper motor can give you.
There's all kinds of shaft encoders, the simplest is just a series of
lines on a disc to pick up rotational speed, a stepper could easily
handle that task. A stepper just as easily goes one further, it puts
out two phases so it can tell which direction the shaft is turning in.
(or, more correctly, if the direction has changed).

Provided that the shaft is turning fast enough to generate coil
voltages larger than the voltage noise in your detectors ....
If one is a hobbyist and cost is a consideration, or just fooling
around with an idea, steppers are interesting devices. Where else can
you get an off the shelf alternator that puts out a few watts at slow
rotational speeds, for instance? Priced a full fledged synchro system
recently? Even surplus 400 cycle aircraft synchros aren't used much
these days, shipboard 120/60 cycle ones are practically museum pieces.
I built my stepper synchro for less than $10. Solve a problem
inexpensively and get to tinker with it is how I relax - Working on
someone else's 8 million dollar project and I buy better and more
costly hardware.

And pay more attention to the fundamentals of what you are doing?[/QUOTE]

Also for tactile feedback load the phases with a low value resistor :)

Cheers

klaus
 
N

Nico Coesel

Jan 1, 1970
0
default said:
You're right. My first attempt was to input the stepper to a
darlington transistor with no amplification - the stepper had to turn
at some speed before the 1.2 volts the darlington needed was met.

Second attempt was to bias the darlington's just shy of conduction -
worked but as ambient temperature increased, the darlingtons would
work in the linear range and self heat.

Third attempt was with an op amp, and it is so sensitive that it is
hard to imagine anything moving so slowly that it wouldn't catch it.
And like you said, the natural cogging action of the stepper will
cause it to jump ahead when the magnetic field between steps is
overcome (assuming there's just a little slop in the linkage between
the turning shaft and the stepper shaft).

Turning it by hand with a knob on the shaft, I couldn't move it so
slowly that the op amp wouldn't detect it. Geological events might
move slowly enough that a stepper won't detect them - for that we have
lasers and mirrors.

Hmm, if you use an elastic coupling, it may still produce a 'step'
when the holding torque is overcome and the stepper jumps to it's next
position.
 
D

default

Jan 1, 1970
0
On 3 Oct 2003 16:25:30 -0700, [email protected] (Bill Sloman)
wrote:
(snip)
None the less, there is obviously a rate of rotation low enough that
the voltages generated by the coils of the driven motor are going to
be less than the offset voltages of your LM324s, and the drive motor
won't follow any rotation at this rate or slower.

You'd probably have to rotate the driven stepper with a lathe to
generate a sufficiently smooth and slow rotation to demonstrate the
effect - unpowered steppers tend to be "notchy".

In theory, I couldn't agree more. Logic says there has to be some
speed where the output voltage won't be detected (by an amplifier with
an open loop gain of 200,000+ or so). In practice, I can't turn it so
slow or steady to detect it. Any slop at all in a gear train or
linkage and the natural cogging action of the stepper takes over.
Measuring the inductance of the coils would let you get in-phase and
quadrature information about the position of a totally stationary
rotor within the angular range defined by a single step, which is all
an incremental encoder like a stepper motor can give you.
A better theoretical solution, no argument there. Lot of extra
circuitry and design work.

I guess the poster's original question is too broad. He doesn't
specify if this is to be used on his go cart or the space shuttle. I
inferred the former because he is wanting to use a stepper as a rotary
sensor.
Provided that the shaft is turning fast enough to generate coil
voltages larger than the voltage noise in your detectors ....

Again, you are theoretically correct. no argument from me.
And pay more attention to the fundamentals of what you are doing?

Hmm, I consider this application paying attention to the fundamentals.
I can't afford to throw $500 on a sine cosine pot for my hobby
applications, but I can build a perfectly good pot with just $5 worth
of parts. Not every application calls for space shuttle reliability,
accuracy or bullet proof ruggedness. Cost is one of the fundamentals.

A good engineer takes satisfaction in solving problems. Using a part
for an application it wasn't intended for, is an interesting design
challenge.

"One takes what one has, and does what one can."

The simplest engineering solution that accomplishes the task at hand
is often the best solution. I can imagine applications where cost and
easy availability would make the stepper a good encoder choice. Low
cost, off the shelf parts, many step angles available, easy interface
(from a practical perspective, within the limitations of the
application).
 
B

Bill Sloman

Jan 1, 1970
0
default said:
On 3 Oct 2003 16:25:30 -0700, [email protected] (Bill Sloman)
wrote:
(snip)
A good engineer takes satisfaction in solving problems. Using a part
for an application it wasn't intended for, is an interesting design
challenge.

"One takes what one has, and does what one can."

Admirably put.
The simplest engineering solution that accomplishes the task at hand
is often the best solution. I can imagine applications where cost and
easy availability would make the stepper a good encoder choice. Low
cost, off the shelf parts, many step angles available, easy interface
(from a practical perspective, within the limitations of the
application).

You might want to go for a stepper motor designed for micro-stepping -
Escap list a couple.

One of the first papers I read on micro-stepping, in the Journal of
Scientific Instruments, probably after it became Journal of Physics E,
and before it became Measurement Science and Technology, mentioned at
least one complication.

When the authors applied currents proportional to the sine and cosine
of the desired microstep angle to the stepper motor coils used, they
didn't rotate the shaft through the desired angle.

They started off with 1024 pairs of sine/cosine entries in their
look-up table, and ended up with some 800 empirically determined
pairs. IIRR the non-linearity wasn't dramatic, but it was
significant.I don't remember them reporting that they repeated the
exercise for a second motor of the same make.
 
D

default

Jan 1, 1970
0
On 4 Oct 2003 10:55:07 -0700, [email protected] (Bill Sloman)
wrote:
(snip)
You might want to go for a stepper motor designed for micro-stepping -
Escap list a couple.

One of the first papers I read on micro-stepping, in the Journal of
Scientific Instruments, probably after it became Journal of Physics E,
and before it became Measurement Science and Technology, mentioned at
least one complication.

When the authors applied currents proportional to the sine and cosine
of the desired microstep angle to the stepper motor coils used, they
didn't rotate the shaft through the desired angle.

They started off with 1024 pairs of sine/cosine entries in their
look-up table, and ended up with some 800 empirically determined
pairs. IIRR the non-linearity wasn't dramatic, but it was
significant.I don't remember them reporting that they repeated the
exercise for a second motor of the same make.

Interesting. Sine and Cosine as in analog voltage/degree rotation?

I don't know squat about micro steppers. One degree per step is as
fine as I've played with.

Referring to non-linearity in your post. Were they losing a step now
and then, or a regular loss? At some speed? (a particular speed or
over a certain speed) Tell me more?

Interesting too, to think of combining steppers and a simple optical
encoder. With the application of steppers in things like printers,
and motion control (scanners etc.) one uses a "home" signal/switch
that initializes the electronics each time it turns on (or the
software just drives it against a hard stop and assumes it got there).
If the carriage gets stopped, the electronics has no idea where it is
and will merrily go on slamming against stops or printing gibberish.
Add a home position with a single optical switch and the
stepper/encoder is able to do a great deal more. (in theory)

I did some fooling around with analog drive voltages. That does give
one a cheap and dirty slow speed synchronous motor. You just need a
current limiting resistor and (phase angle) cap that works with the
inductance and frequency of the drive signal. I got some motors to
turn as a self-educational project, I didn't try to maximize the
torque or see what the limits were. I get the feeling that there's an
application out there that can use this technique - enough torque to
be useful and slow speed, synchronous operation. (and cheap,
reliable, off the shelf, motors)

Thinking about it some more, I applied an op amp that was capable of
seeing a microvolt signal at the output of a stepper, when the stepper
was capable of outputting several volts at even a small rotational
speed. Bound to be a signal.

The more amazing thing (now that I think about it) is that I didn't
encounter "chattering" by trying to turn it slowly. Seems likely that
when trying to turn it slowly, one's hand would oscillate just enough
to cause it to "flip out" at the cross over. Some combination of it
wanting to cog to the next position and back EMF from eddy currents
probably ameliorates that (theoretical) tendency(?)

There is another application that I haven't tried regarding
stepper/encoders, that ought to work: using the quadrature output to
find a simple !! way to increment/decriment an up down counter. Just
using the output of one phase to toggle the U/D input of a counter
while counting the counts with the other. In one direction the U/D
would always be high (say for argument) just before the count input
was valid and in the other direction it would be low. Since the motor
magnet/coil assembly has a built in overlap, it ought to work.

I was winding some coils and had a magnet on my mandrel with a pickup
on the lathe base. Works great until you go back to repair an
overlapped turn then it keeps incrementing when you are taking turns
off - a mechanical ± counter could do it better . . .

I play with electronics. Every now and then I have to do "real" work.
"Real Work" = anything involving non-engineers (usually PhDs) who
don't really have a clue as to what they want, but are, none the less,
imbued with a sense of great self importance, and worth, and magical
properties of always being right, if not omniscience . My own self
defense mechanism is ego . . . I don't mean to be grating - It is
sometimes hard to switch gears - life was simpler working with
electrical engineers, but more profitable with PhD chemists. In that
environment, one has to dominate or be dominated - like those guys
have any clue about electronics.
 
B

Bill Sloman

Jan 1, 1970
0
default said:
On 4 Oct 2003 10:55:07 -0700, [email protected] (Bill Sloman)
wrote:
(snip)

Interesting. Sine and Cosine as in analog voltage/degree rotation?

Not exactly. Stepper motors can best be seen as low voltage
synchronous motors, and ought to be driven by in-phase and quadrature
sine waves.

Micro-stepping follows up this point of view by trying to rotate the
rotor smoothly, rather than in steps, by varying the current through
the coils smoothly and continuously as the sine and cosine of a
continuously varying angle.

For most stepper motors, 360 degrees of microstepping equals the
rotation of the rotor between stable positions with constant coil
excitation - or four conventional steps.
I don't know squat about micro steppers. One degree per step is as
fine as I've played with.

Micro-stepping lets you move the rotor in smaller increments. The
down-side is that the torque required to rotate the shaft against load
intertia and friction is generated by having the rotor lag the
rotating magnetic field, so your fine steps lag the field by up to
half a conventioan step or more.
Referring to non-linearity in your post. Were they losing a step now
and then, or a regular loss? At some speed? (a particular speed or
over a certain speed) Tell me more?

The non-linearity wasn't produced by missing steps not missing
microsteps, but merely by deviations from the expected relationship
between micrstep angle and coil current. If you rotate the shaft of
such a mootr in a lathe,the waveforms that you detect across the motor
coils aren't perfectly sinusoidal.
Interesting too, to think of combining steppers and a simple optical
encoder. With the application of steppers in things like printers,
and motion control (scanners etc.) one uses a "home" signal/switch
that initializes the electronics each time it turns on (or the
software just drives it against a hard stop and assumes it got there).
If the carriage gets stopped, the electronics has no idea where it is
and will merrily go on slamming against stops or printing gibberish.
Add a home position with a single optical switch and the
stepper/encoder is able to do a great deal more. (in theory)

Been there, done that - the most recent system had two over-run
sensors and a home sensor, and sent pathetic messages to the operator
if the carriage didn't activate the home sensor after the expected
number of steps.

We used a neodynium-iron magnet on the carriage and Hall effect
sensors at the home and over-run positions - they were a lot easier to
mount than optical sensors.
I did some fooling around with analog drive voltages. That does give
one a cheap and dirty slow speed synchronous motor. You just need a
current limiting resistor and (phase angle) cap that works with the
inductance and frequency of the drive signal. I got some motors to
turn as a self-educational project, I didn't try to maximize the
torque or see what the limits were. I get the feeling that there's an
application out there that can use this technique - enough torque to
be useful and slow speed, synchronous operation. (and cheap,
reliable, off the shelf, motors)

That is what microstepping drives offer - except that they don't have
to be slow. It is a lot easier to accelerate a microstepped motor
through the first resonance than it is with a conventional drive. And
there are chips that handle the complex parts of the job fairly
cheaply.
Thinking about it some more, I applied an op amp that was capable of
seeing a microvolt signal at the output of a stepper, when the stepper
was capable of outputting several volts at even a small rotational
speed. Bound to be a signal.

The more amazing thing (now that I think about it) is that I didn't
encounter "chattering" by trying to turn it slowly. Seems likely that
when trying to turn it slowly, one's hand would oscillate just enough
to cause it to "flip out" at the cross over. Some combination of it
wanting to cog to the next position and back EMF from eddy currents
probably ameliorates that (theoretical) tendency(?)

Beats me. Sounds like a can of worms.
There is another application that I haven't tried regarding
stepper/encoders, that ought to work: using the quadrature output to
find a simple !! way to increment/decriment an up down counter. Just
using the output of one phase to toggle the U/D input of a counter
while counting the counts with the other. In one direction the U/D
would always be high (say for argument) just before the count input
was valid and in the other direction it would be low. Since the motor
magnet/coil assembly has a built in overlap, it ought to work.

I was winding some coils and had a magnet on my mandrel with a pickup
on the lathe base. Works great until you go back to repair an
overlapped turn then it keeps incrementing when you are taking turns
off - a mechanical ± counter could do it better . . .

Run your in-phase and quadrature outputs through a pair of comparators
(with hysterisis). Use the in-phase output as the clock for a D-type
bistable, and feed the quadrature output into the D-input. The
Q-output changes sign with the direction of rotation. You can fit
this, and the up-down counters, into a small programmable logic device
- I had to patch up such a system back in 1992.
I play with electronics. Every now and then I have to do "real" work.
"Real Work" = anything involving non-engineers (usually PhDs) who
don't really have a clue as to what they want, but are, none the less,
imbued with a sense of great self importance, and worth, and magical
properties of always being right, if not omniscience . My own self
defense mechanism is ego . . . I don't mean to be grating - It is
sometimes hard to switch gears - life was simpler working with
electrical engineers, but more profitable with PhD chemists. In that
environment, one has to dominate or be dominated - like those guys
have any clue about electronics.

Hmm. I started off as a chemist doing a Ph.D. and ended up having to
design my own electronics to get the instruments I needed - I got the
Ph.D. but metamorphised into an electronic engineer over the next few
years.

Every now and then I revert to the chemist, which has been known to
surprise people.
 
D

default

Jan 1, 1970
0
Hmm. I started off as a chemist doing a Ph.D. and ended up having to
design my own electronics to get the instruments I needed - I got the
Ph.D. but metamorphised into an electronic engineer over the next few
years.

Every now and then I revert to the chemist, which has been known to
surprise people.
Yeah, I shouldn't make generalizations. I did work with several saavy
PhDs

I get things like (this really happened) a chemist going to radio
shack and buying a knob, toy motor and battery holder. He comes to my
shop and says: "what do I need to buy to vary the speed? What goes
in between this and this?" (holding the knob in one hand and motor in
the other)

The guy is pulling down six figures and wants to save a buck by going
to Radio Shack . . . On a project that will net the company a cool
$200K . . .OK . . . Or maybe he figured I had enough to do and was
helping out?

I tell him radio shack doesn't have what he needs and that I'll build
something for him. Put together a pulse width modulated speed control
and we get his stirrer, toy motor, and sample cup mounted up and he
goes away happy.

Two hours later he's back. "It don't work." "Well, let's go look at
it," figuring it can't be that hard to fix . . .

He's got the thing in a cryogenic chamber, his sample is a stiff gel
and the batteries are frozen solid, and dead.

The problem is eventually solved: With a relatively large servo
motor, tachometer feedback, and hole drilled in the chamber for the
stirrer rod. Three days work and several hundred dollars.
 
Top