Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Thread

[OT a little]Motor Position Sensor

[OT a little]Motor Position Sensor

2005-05-21 by John Samperi

G'day all

For a few days Yahoo has bumped off the list it seems...

I posted the following on AVRfreaks so some of you may see this twice.
I need to know exactly where a stepper motor is positioned at any time.
By Googling I found some potentiometric position sensors, which I guess
will do by feeding it into an A/D and reading back the voltage.

If there is a digital type of sensor that would give me discreet positions
from 0-255 that would be perfect, and as some of you are geniuses on
the subject, you may be able to point me in the right direction without having
to wade some 1600 pages in Google.Basically the program would check where
the motor is located, find out where it needs to be and issue the correct
number of pulses to take it there( backward or forward), then check that
is in fact there. This will be controlling a valve that needs to open a
certain amount.

Regards

John Samperi

******************************************************
                         Ampertronics Pty. Ltd.
   11 Brokenwood Place Baulkham Hills, NSW 2153 AUSTRALIA
          Tel. (02) 9674-6495       Fax (02) 9674-8745
                Email: samperi@ampertronics.com.au
                  Website  http://www.ampertronics.com.au
* Electronic Design   * Custom Products   * Contract Assembly
******************************************************

Re: [AVR-Chat] [OT a little]Motor Position Sensor

2005-05-21 by Bruce Parham

Lots of folks make encoders. The most common type is the two phase incremental.
Some of those come with a third channel to be used as an absolute "zero" reference.
Sounds like you mamy want an absolute encoder. Bourns has one that outputs seven
bit gray code. Check http://www.bourns.com/ rotary encoders for the EAW part.
Good luck.

Bruce

John Samperi wrote:
Show quoted textHide quoted text
> G'day all
> 
> For a few days Yahoo has bumped off the list it seems...
> 
> I posted the following on AVRfreaks so some of you may see this twice.
> I need to know exactly where a stepper motor is positioned at any time.
> By Googling I found some potentiometric position sensors, which I guess
> will do by feeding it into an A/D and reading back the voltage.
> 
> If there is a digital type of sensor that would give me discreet positions
> from 0-255 that would be perfect, and as some of you are geniuses on
> the subject, you may be able to point me in the right direction without having
> to wade some 1600 pages in Google.Basically the program would check where
> the motor is located, find out where it needs to be and issue the correct
> number of pulses to take it there( backward or forward), then check that
> is in fact there. This will be controlling a valve that needs to open a
> certain amount.
> 
> Regards
> 
> John Samperi

Re: [AVR-Chat] [OT a little]Motor Position Sensor

2005-05-21 by John Samperi

At 10:26 AM 21/05/2005, you wrote:
>Sounds like you mamy want an absolute encoder. Bourns has one that outputs 
>seven
>bit gray code. Check http://www.bourns.com/ rotary encoders for the EAW part.

Thanks Bruce

I was just looking at that in the Farnell data book (EAW0J-B24-AE0128)
The 50,000 revolution rotational life may not be good enough.

Regards

John Samperi

******************************************************
                         Ampertronics Pty. Ltd.
   11 Brokenwood Place Baulkham Hills, NSW 2153 AUSTRALIA
          Tel. (02) 9674-6495       Fax (02) 9674-8745
                Email: samperi@ampertronics.com.au
                  Website  http://www.ampertronics.com.au
* Electronic Design   * Custom Products   * Contract Assembly
******************************************************

RE: [AVR-Chat] [OT a little]Motor Position Sensor

2005-05-21 by Larry Barello

Get the real thing, not a digital panel control...

www.usdigital.com
Show quoted textHide quoted text
-----Original Message-----
From:  John Samperi
Sent: Friday, May 20, 2005 5:33 PM
To: AVR-Chat@yahoogroups.com
Subject: Re: [AVR-Chat] [OT a little]Motor Position Sensor


At 10:26 AM 21/05/2005, you wrote:
>Sounds like you mamy want an absolute encoder. Bourns has one that outputs
>seven
>bit gray code. Check http://www.bourns.com/ rotary encoders for the EAW
part.

Thanks Bruce

I was just looking at that in the Farnell data book (EAW0J-B24-AE0128)
The 50,000 revolution rotational life may not be good enough.

Regards

John Samperi

******************************************************
                         Ampertronics Pty. Ltd.
   11 Brokenwood Place Baulkham Hills, NSW 2153 AUSTRALIA
          Tel. (02) 9674-6495       Fax (02) 9674-8745
                Email: samperi@ampertronics.com.au
                  Website  http://www.ampertronics.com.au
* Electronic Design   * Custom Products   * Contract Assembly
******************************************************





Yahoo! Groups Links

Re: [AVR-Chat] [OT a little]Motor Position Sensor

2005-05-21 by Roy E. Burrage

What are you controlling John? Could you measure output pressure or some other process variable at the valve rather than absolute position of the actuator? This is often more meaningful information if you're working with a process, rather than simple positioning, as it also allows you to compensate for input variations if those can cause an output variation.

REB

John Samperi wrote:
Show quoted textHide quoted text
At 10:26 AM 21/05/2005, you wrote:
  
Sounds like you mamy want an absolute encoder. Bourns has one that outputs 
seven
bit gray code. Check http://www.bourns.com/ rotary encoders for the EAW part.
    
Thanks Bruce

I was just looking at that in the Farnell data book (EAW0J-B24-AE0128)
The 50,000 revolution rotational life may not be good enough.

Regards

John Samperi

******************************************************
                         Ampertronics Pty. Ltd.
   11 Brokenwood Place Baulkham Hills, NSW 2153 AUSTRALIA
          Tel. (02) 9674-6495       Fax (02) 9674-8745
                Email: samperi@ampertronics.com.au
                  Website  http://www.ampertronics.com.au
* Electronic Design   * Custom Products   * Contract Assembly
******************************************************
  

Re: [AVR-Chat] [OT a little]Motor Position Sensor

2005-05-21 by Robert Adsett

At 10:08 AM 5/21/05 +1000, John Samperi wrote:
>I posted the following on AVRfreaks so some of you may see this twice.
>I need to know exactly where a stepper motor is positioned at any time.
>By Googling I found some potentiometric position sensors, which I guess
>will do by feeding it into an A/D and reading back the voltage.
>
>If there is a digital type of sensor that would give me discreet positions
>from 0-255 that would be perfect, and as some of you are geniuses on
>the subject, you may be able to point me in the right direction without having
>to wade some 1600 pages in Google.Basically the program would check where
>the motor is located, find out where it needs to be and issue the correct
>number of pulses to take it there( backward or forward), then check that
>is in fact there. This will be controlling a valve that needs to open a
>certain amount.

What kind of angular range do you need? 45degs, 90degs, 360degs, 720degs?

Robert

Robert

" 'Freedom' has no meaning of itself.  There are always restrictions,   be 
they legal, genetic, or physical.  If you don't believe me, try to chew a 
radio signal. "  -- Kelvin Throop, III
http://www.aeolusdevelopment.com/

Re: [AVR-Chat] [OT a little]Motor Position Sensor

2005-05-21 by Kathy Quinlan

John Samperi wrote:
> G'day all
> 
> For a few days Yahoo has bumped off the list it seems...
> 
> I posted the following on AVRfreaks so some of you may see this twice.
> I need to know exactly where a stepper motor is positioned at any time.
> By Googling I found some potentiometric position sensors, which I guess
> will do by feeding it into an A/D and reading back the voltage.
> 
> If there is a digital type of sensor that would give me discreet positions
> from 0-255 that would be perfect, and as some of you are geniuses on
> the subject, you may be able to point me in the right direction without having
> to wade some 1600 pages in Google.Basically the program would check where
> the motor is located, find out where it needs to be and issue the correct
> number of pulses to take it there( backward or forward), then check that
> is in fact there. This will be controlling a valve that needs to open a
> certain amount.
> 
> Regards
> 
> John Samperi


Hi John,

If the Valve can go to 0 regularly, it may be easier to home at 0 and 
count up from there (assuming that the valve and stepper have their 
shafts locked (no belt drive) and that the motor is powerful enough to 
drive the valve without slipping)

Another option is if you know you will use set positions, then maybe a 
couple of slotted opto isolators.........


or make your own disk on the shaft, home 0, have the opto on (and a 
second one that only gets light on 0) then count the pulses out as the 
valve moves....

measure the pressure out of the valve / amount in tank etc and adjust 
from that......

a pot on the valve to show the % angle open etc etc.

they are all I can think of for now ;)

Regards,

Kat.

RE: [AVR-Chat] [OT a little]Motor Position Sensor

2005-05-21 by John Samperi

Thank you for all your replies so far. I guess I will need to explain
a little more.

I'm trying to come up with some ideas for a prospective client.

 From what I understand so far the valve controls gas to a burner
which needs to keep a temperature of about 450 degrees celsius
(flaming hot!!) perhaps +- 30 degrees. A Mega16 (possibly) will
be monitoring the thermocouples and will adjust the opening of the
valve to maintain the temperature. So, yes I have some feedback
on what's happening with the valve perhaps 1 or several seconds later.

The valve will be moving a maximum of 1/2 turn, so no high speed
sensors are needed. An Absolute Position sensor would be nice
to have to find if the valve has moved or if the valve motor
has moved in the right direction or not moved at all i.e. faulty
motor, broken wire, jammed/locked valve etc. as a safety precaution.

As far as having the valve going to 0 (perhaps a limit switch) it
may be possible at power up but not during operation as it will
extinguish the burner. Also in case of a WDT reset it would
be good to know where the valve is located without having to zero
it's position.

This is a bit of additional equipment that has to work with an
existing PLC which control a lot of other stuff.

Keep on coming with ideas/suggestion PLEASE!! :-) I know many of you
have already gone down this road and have lots of experience on
the subject.....and I hope flattery will get me somewhere :-)

p.s. The stepper motor the client has is a 1.8 degrees step angle.

Regards

John Samperi

******************************************************
                         Ampertronics Pty. Ltd.
   11 Brokenwood Place Baulkham Hills, NSW 2153 AUSTRALIA
          Tel. (02) 9674-6495       Fax (02) 9674-8745
                Email: samperi@ampertronics.com.au
                  Website  http://www.ampertronics.com.au
* Electronic Design   * Custom Products   * Contract Assembly
******************************************************

Re: [AVR-Chat] [OT a little]Motor Position Sensor

2005-05-21 by Bernd Felsche

On Saturday 21 May 2005 14:39, John Samperi wrote:

> From what I understand so far the valve controls gas to a burner
> which needs to keep a temperature of about 450 degrees celsius
> (flaming hot!!) perhaps +- 30 degrees. A Mega16 (possibly) will
> be monitoring the thermocouples and will adjust the opening of the
> valve to maintain the temperature. So, yes I have some feedback
> on what's happening with the valve perhaps 1 or several seconds later.

You should still be controlling the output, not the input. :-)

You need to understand the process a bit better, I think. The delays
in the system will otherwise create instability. Such instability
may be invisible during normal operations but typically has
actuators moving unnecessarily as they hunt around the set-point.
Nobody wants that because it wears everything out very rapidly.

Look at the thermal constants, etc. Maybe you can measure the
desired temperature (not the flame) directly using a pyrometer (they
can measure changes quickly < 0.10 seconds).

You can also, by knowing the thermal constants, do "predictive"
control based on the previously-measured response of the system and
the present state of flow; especially if the thermal response is
slow.

If you're doing something like (hypothetically of course)
controlling the temperature of a hot-dip galvanizing bath, then the
main perturbation to the system is the immersion of cold steel which
will result in an observed "plummet" in the bath temperature;
especially if the bath contains "minimal" zinc. The rate at which
the temperature initially falls is an indicator of the thermal
capacity of the object being inserted and therefore the amount of
energy that the increase in energy to be provided by the gas flame
increase so that the minimum tolerable temperature is maintained.

It is of course impossible to maintain an exact temperature. Any
control system requires an error signal to attempt to maintain the
required output.

> The valve will be moving a maximum of 1/2 turn, so no high speed
> sensors are needed. An Absolute Position sensor would be nice
> to have to find if the valve has moved or if the valve motor
> has moved in the right direction or not moved at all i.e. faulty
> motor, broken wire, jammed/locked valve etc. as a safety precaution.

Monitoring motor current draw may be sufficient to detect a jammed
valve. Relative positioning is OK as long as you can map flame
temperature against step size (I'm assuming a well-regulated gas
pressure and sufficient oxygen). The "current flame" could probably
be used as a reference point against which to apply the delta.

-- 
/"\ Bernd Felsche - Innovative Reckoning, Perth, Western Australia
\ /  ASCII ribbon campaign | I'm a .signature virus!
 X   against HTML mail     | Copy me into your ~/.signature
/ \  and postings          | to help me spread!

Re: [AVR-Chat] [OT a little]Motor Position Sensor

2005-05-21 by Roy E. Burrage

Maybe add a pressure switch, or even a simple sail switch, on the input 
to ensure there is adequate gas supply and limit switches to indicate 
full open and full closed for the valve.

The reason for the supply switch is we had a customer once who 
discovered the hard way that inadequate gas supply will create 
incomplete combustion, excess production of CO rather than CO2, and 
caused other problems in their customers' operations.  You may also want 
to alarm if there is a supply loss.


REB


Bernd Felsche wrote:
Show quoted textHide quoted text
>On Saturday 21 May 2005 14:39, John Samperi wrote:
>
>  
>
>>From what I understand so far the valve controls gas to a burner
>>which needs to keep a temperature of about 450 degrees celsius
>>(flaming hot!!) perhaps +- 30 degrees. A Mega16 (possibly) will
>>be monitoring the thermocouples and will adjust the opening of the
>>valve to maintain the temperature. So, yes I have some feedback
>>on what's happening with the valve perhaps 1 or several seconds later.
>>    
>>
>
>You should still be controlling the output, not the input. :-)
>
>You need to understand the process a bit better, I think. The delays
>in the system will otherwise create instability. Such instability
>may be invisible during normal operations but typically has
>actuators moving unnecessarily as they hunt around the set-point.
>Nobody wants that because it wears everything out very rapidly.
>
>Look at the thermal constants, etc. Maybe you can measure the
>desired temperature (not the flame) directly using a pyrometer (they
>can measure changes quickly < 0.10 seconds).
>
>You can also, by knowing the thermal constants, do "predictive"
>control based on the previously-measured response of the system and
>the present state of flow; especially if the thermal response is
>slow.
>
>If you're doing something like (hypothetically of course)
>controlling the temperature of a hot-dip galvanizing bath, then the
>main perturbation to the system is the immersion of cold steel which
>will result in an observed "plummet" in the bath temperature;
>especially if the bath contains "minimal" zinc. The rate at which
>the temperature initially falls is an indicator of the thermal
>capacity of the object being inserted and therefore the amount of
>energy that the increase in energy to be provided by the gas flame
>increase so that the minimum tolerable temperature is maintained.
>
>It is of course impossible to maintain an exact temperature. Any
>control system requires an error signal to attempt to maintain the
>required output.
>
>  
>
>>The valve will be moving a maximum of 1/2 turn, so no high speed
>>sensors are needed. An Absolute Position sensor would be nice
>>to have to find if the valve has moved or if the valve motor
>>has moved in the right direction or not moved at all i.e. faulty
>>motor, broken wire, jammed/locked valve etc. as a safety precaution.
>>    
>>
>
>Monitoring motor current draw may be sufficient to detect a jammed
>valve. Relative positioning is OK as long as you can map flame
>temperature against step size (I'm assuming a well-regulated gas
>pressure and sufficient oxygen). The "current flame" could probably
>be used as a reference point against which to apply the delta.
>
>  
>

Re: [AVR-Chat] [OT a little]Motor Position Sensor

2005-05-21 by Brian Dean

Hi John,

On Sat, May 21, 2005 at 04:39:06PM +1000, John Samperi wrote:

> The valve will be moving a maximum of 1/2 turn, so no high speed
> sensors are needed. An Absolute Position sensor would be nice
> to have to find if the valve has moved or if the valve motor
> has moved in the right direction or not moved at all i.e. faulty
> motor, broken wire, jammed/locked valve etc. as a safety precaution.

What about a simple potentiometer?  I've turned several large motors
into "servos" by attaching a 10-turn pot to their output shaft, then
read the wiper position with the on-board A/D converter to determine
position.  You get good position feedback and very easily and quickly
too.

It sounds like you could get by with a single-turn pot.

-Brian
-- 
Brian Dean
BDMICRO - ATmega128 Based MAVRIC Controllers
http://www.bdmicro.com/

RE: [AVR-Chat] [OT a little]Motor Position Sensor

2005-05-21 by Robert Adsett

At 04:39 PM 5/21/05 +1000, John Samperi wrote:
>Thank you for all your replies so far. I guess I will need to explain
>a little more.
>
>I'm trying to come up with some ideas for a prospective client.
>
>  From what I understand so far the valve controls gas to a burner
>which needs to keep a temperature of about 450 degrees celsius
>(flaming hot!!) perhaps +- 30 degrees. A Mega16 (possibly) will
>be monitoring the thermocouples and will adjust the opening of the
>valve to maintain the temperature. So, yes I have some feedback
>on what's happening with the valve perhaps 1 or several seconds later.
>
>The valve will be moving a maximum of 1/2 turn, so no high speed
>sensors are needed. An Absolute Position sensor would be nice
>to have to find if the valve has moved or if the valve motor
>has moved in the right direction or not moved at all i.e. faulty
>motor, broken wire, jammed/locked valve etc. as a safety precaution.

OK, I've a couple of alternatives in mind that you may want to take a look at.

Hall effect rotary position sensors (also referred to in some circles as 
Hall effect pots).  A number of manufacturers, Clarostat, Midwest Power 
Components, Honeywell, Vishay Spectrol and others.  A primary target for 
these is vehicles for use in throttle inputs or position sensors.  The 
primary advantage is that they are non-contact and so their life tends to 
be limited by their bearings.  However, their rotational sensor range tends 
to be limited, commonly to less than 90degs although I've seen them go as 
high as 160deg.

The other alternative to consider are inductive sensors such as those 
produced by Gill. See for example 
http://www.gillsensors.co.uk/content/DualCavity.htm I priced their rotary 
sensor recently and found it pricey (around 200 pounds as I recall) but I 
did price the dual cavity sensor at one time and I remember it being 
reasonable at the time.  The big advantage with the Dual cavity is that the 
sense element is just a piece of metal and a little imagination can provide 
quite a wide range of input possibilities.

Both these alternatives are analog so you would need an A/D.


I've used the Hall effect sensors myself for throttle input and was quite 
happy with them.  It sounds like range would be an issue for you though.

I recently went through looking for rotary position sensors.  I was looking 
for something rugged since they will end up at the top of a tower with 
limited access and moist conditions.  It also had to support a full 360degs 
and continuous, although slow, rotation and it had to give absolute 
position at power-up to within a degree or so.  Also I wanted to limit the 
number of wires running up and down the tower. That appears to limit the 
field to rather pricey alternatives (>$300).

Robert

" 'Freedom' has no meaning of itself.  There are always restrictions,   be 
they legal, genetic, or physical.  If you don't believe me, try to chew a 
radio signal. "  -- Kelvin Throop, III
http://www.aeolusdevelopment.com/

RE: [AVR-Chat] [OT a little]Motor Position Sensor

2005-05-21 by Zack Widup

On Sat, 21 May 2005, Robert Adsett wrote:

> 
> OK, I've a couple of alternatives in mind that you may want to take a look at.
> 
> I recently went through looking for rotary position sensors.  I was looking
> for something rugged since they will end up at the top of a tower with
> limited access and moist conditions.  It also had to support a full 360degs
> and continuous, although slow, rotation and it had to give absolute
> position at power-up to within a degree or so.  Also I wanted to limit the
> number of wires running up and down the tower. That appears to limit the
> field to rather pricey alternatives (>$300).
> 

This is sort of distantly related to the topic.  Have any of you ever done 
anything with a flux gate compass?

Zack

Re: [AVR-Chat] [OT a little]Motor Position Sensor

2005-05-21 by Bruce Parham

Zack Widup wrote:

> On Sat, 21 May 2005, Robert Adsett wrote:
> 
> This is sort of distantly related to the topic.  Have any of you ever done 
> anything with a flux gate compass?
> 
> Zack

I worked for a small company in Texas about 20 years ago that did and from scratch.
Quite an interesting process. The flux gate sensor has some very good competition
these days. As I sit typing this, my $40 US Timex tells me that I'm facing 28 Degrees.
It uses a pair of small 2x2x6 mm Magneto-Inductive sensors made by PNI.
Check http://www.pnicorp.com for more.

Bruce

Re: [AVR-Chat] Position Sensor

2005-05-21 by Zack Widup

Interesting.  Thanks for the link.

What I'm looking for is something to be lowered down a 2 1/2 inch diameter 
PVC pipe into a coal mine on a borehole camera. The sensor should probably 
be an inch in diameter or less.

We've encountered situations where we don't know which direction the 
camera is pointing.  I thought of mounting a little compass below the 
camera but things tend to get very muddy on the way down and it might get 
obscured.

I might be using an AVR to control camera position from the surface. In 
that case, I can add a routine to communicate the sensor data. It  
promises to be an interesting project!

Zack
Show quoted textHide quoted text
On Sat, 21 May 2005, Bruce Parham wrote:

> Zack Widup wrote:
> 
> > On Sat, 21 May 2005, Robert Adsett wrote:
> >
> > This is sort of distantly related to the topic.  Have any of you ever done
> > anything with a flux gate compass?
> >
> > Zack
> 
> I worked for a small company in Texas about 20 years ago that did and from scratch.
> Quite an interesting process. The flux gate sensor has some very good competition
> these days. As I sit typing this, my $40 US Timex tells me that I'm facing 28 Degrees.
> It uses a pair of small 2x2x6 mm Magneto-Inductive sensors made by PNI.
> Check http://www.pnicorp.com for more.
> 
> Bruce
>

Re: [AVR-Chat] [OT a little]Motor Position Sensor

2005-05-21 by John Samperi

Thanks again for more suggestions and ideas. I'm sorry
I can't be more specific on the application yet but I
don't really know how confidential the information is,
whether it is covered by patents or pending patents so
I'm trying to be generic in terms so I don't get into
any possible trouble. In a week or 2 I should be able
to know what I can say and what I can't.

The best analogy I can come up with is my kitchen oven.
Gas flame at the bottom, temp sensor at the top, food
in between and the oven door needs to be opened occasionally
because the oven lamp has been broken for a couple of years
an I haven't fixed because I "haven't got a round twit" :-[

In fact now that I think of it, all that my prospective client
needs is a kitchen oven temperature controller that goes up to
about 500 degrees celsius instead of the 280 that my oven goes
up to....but then I'll do myself out of a possible job :-)

 >Relative positioning is OK as long as you can map flame
 >temperature against step size (I'm assuming a well-regulated gas
 >pressure and sufficient oxygen). The "current flame" could probably
 >be used as a reference point against which to apply the delta.

That was my original idea. I may be able to get that info from the
client. It would need some possible trimming every few seconds
according to the readings of the temperature sensors.

 >Maybe add a pressure switch, ..........You may also want to alarm if 
there is a supply loss.

Already existing and handled by the main PLC.

 >What about a simple potentiometer?

That was one of my early option. Someone send me a link to a French
company that makes 360 degrees flat pots. The Absolute position sensors
with Gray code output seems a more elegant way of doing it but they seem
to be VERY expensive.

 >Hall effect rotary position sensors (also referred to in some circles as
 >Hall effect pots)

Extremely interesting, especially the sensor with integral activator and
spindle. Let's find out the price now...






Regards

John Samperi

******************************************************
                         Ampertronics Pty. Ltd.
   11 Brokenwood Place Baulkham Hills, NSW 2153 AUSTRALIA
          Tel. (02) 9674-6495       Fax (02) 9674-8745
                Email: samperi@ampertronics.com.au
                  Website  http://www.ampertronics.com.au
* Electronic Design   * Custom Products   * Contract Assembly
******************************************************

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.