Yahoo Groups archive

AVR-Chat

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

Thread

servo position

servo position

2004-06-28 by jay marante

when i power-up my MCU, is it possible for me to know the position of
my servo motor if it is in a 0, 90, 180, etc, degree? how?
TIA

-jay

Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!

Re: [AVR-Chat] servo position

2004-06-28 by David VanHorn

At 07:30 AM 6/28/2004 -0700, jay marante wrote:

>when i power-up my MCU, is it possible for me to know the position of 
>my servo motor if it is in a 0, 90, 180, etc, degree? how?
>TIA

For remote control servos, no. There's no positional feedback.
You could ADD a sensor.

Re: [AVR-Chat] servo position

2004-06-28 by jay marante

what kind of sensor? where should i put 'em?

David VanHorn wrote:
At 07:30 AM 6/28/2004 -0700, jay marante wrote:

>when i power-up my MCU, is it possible for me to know the position of
>my servo motor if it is in a 0, 90, 180, etc, degree? how?
>TIA

For remote control servos, no. There's no positional feedback.
You could ADD a sensor.


Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!

Re: [AVR-Chat] servo position

2004-06-28 by David VanHorn

At 08:41 AM 6/28/2004 -0700, jay marante wrote:

>what kind of sensor? where should i put 'em?

That's up to you.
Switches, pots, lots of options.

Re: servo position

2004-06-28 by Dave Mucha

--- In AVR-Chat@yahoogroups.com, David VanHorn <dvanhorn@c...> wrote:
> At 07:30 AM 6/28/2004 -0700, jay marante wrote:
> 
> >when i power-up my MCU, is it possible for me to know the position 
of 
> >my servo motor if it is in a 0, 90, 180, etc, degree? how?
> >TIA
> 
> For remote control servos, no. There's no positional feedback.
> You could ADD a sensor.


Most hobby servo's have an internal pot or encoder that feeds the 
internal circuit a posistion feedback.  It is used as one of the 
parameters on how fast it needs to move to posistion.

It may be possible to add an op-amp to the pot to get a value from 
that pot.  But, since that pot is part of the internal circuit, it 
would be prudent to really understand the circuit on the board.  
There may be a place you can pic off an amplified value that would 
not interferre with the signal.

The add-on would be to add a 10k pot to the shaft and use a voltage 
divider or RC pulse to get a value.

Dave

Re: servo position

2004-06-28 by upand_at_them

If you're real crafty you might be able to fit an optical encoder 
ring inside the servo housing.

Or could you store the last position in the MCU before shutdown?  Or 
do a calibration sequence?

Mike


--- In AVR-Chat@yahoogroups.com, jay marante <jaythesis@y...> wrote:
> when i power-up my MCU, is it possible for me to know the position 
of 
Show quoted textHide quoted text
> my servo motor if it is in a 0, 90, 180, etc, degree? how?
> TIA
>  
> -jay

Re: servo position

2004-06-28 by Phil

Some one did do just that.  check out this page - 
<http://www.portlandrobotics.org/robots/servo_encoder/index.html>

but wouldn't an optical encoder simply tell you relative motion (not 
absolute)?  

How important is it to know the initial position?  You can command a 
servo to a known position and go from there.  

If you want to know position after a power cycle, you could store the 
value in eeprom befor powering down (or as you commmand the device, 
more likely).  It would require a way of setting the first initial 
position, though.

 
--- In AVR-Chat@yahoogroups.com, "upand_at_them" <upand_at_them@y...> 
wrote:
> If you're real crafty you might be able to fit an optical encoder 
> ring inside the servo housing.
> 
> Or could you store the last position in the MCU before shutdown?  
Or 
> do a calibration sequence?
> 
> Mike
> 
> 
> --- In AVR-Chat@yahoogroups.com, jay marante <jaythesis@y...> wrote:
> > when i power-up my MCU, is it possible for me to know the 
position 
Show quoted textHide quoted text
> of 
> > my servo motor if it is in a 0, 90, 180, etc, degree? how?
> > TIA
> >  
> > -jay

Re: [AVR-Chat] Re: servo position

2004-06-28 by David VanHorn

At 08:05 PM 6/28/2004 +0000, Phil wrote:

>Some one did do just that.  check out this page - 
><http://www.portlandrobotics.org/robots/servo_encoder/index.html>
>
>but wouldn't an optical encoder simply tell you relative motion (not 
>absolute)?  

Depends on the encoder. Gray code or binary units give absolute, quadrature gives relative.

>How important is it to know the initial position?  You can command a 
>servo to a known position and go from there.  

Good point.

Re: servo position

2004-06-28 by Dave Mucha

--- In AVR-Chat@yahoogroups.com, David VanHorn <dvanhorn@c...> wrote:
> At 08:05 PM 6/28/2004 +0000, Phil wrote:
> 
> >Some one did do just that.  check out this page - 
> ><http://www.portlandrobotics.org/robots/servo_encoder/index.html>
> >
> >but wouldn't an optical encoder simply tell you relative motion 
(not 
> >absolute)?  
> 
> Depends on the encoder. Gray code or binary units give absolute, 
quadrature gives relative.
> 
> >How important is it to know the initial position?  You can command 
a 
> >servo to a known position and go from there.  
> 
> Good point.

depending on the thing, it could be a problem.  A car or buggy is no 
problem, but robot of some sort could need to start where it left off 
and a re-zeroing could present a problem.

Encoders in the simplest form are disks with holes.  the can reveal 
direction.  The larger quantity of holes will offer higher resolution 
and typically encoders are used for speed and/or direction.

A Gray scale (for Frank Gray the first patent holder) encoder is not 
only incremental (direction, speed) but it is also Absolute.

With a Gray Scale encoder, you can know the exact posistion of the 
wheel.

Of course, the greater resolution means the higher number of sensor 
lights and patterns on the wheel.

a colored wheel could show relative posistion as could a pot.


Dave

Re: servo position

2004-06-28 by Phil

--- In AVR-Chat@yahoogroups.com, David VanHorn <dvanhorn@c...> wrote:
> 
> Depends on the encoder. Gray code or binary units give absolute, 
quadrature gives relative.
> 

true but I was assuming that he didn't want to get to a complex 
solution or burn a large number of I/O lines.  possibly a bad 
assumption on my part.  It would be helpful to better understand the 
application problem before I go solving, eh?

Re: [AVR-Chat] Re: servo position

2004-06-28 by jay marante

actually, im trying to drive a bolt thru the servo. the bolt will serve as a door lock. 
 
my problem is that if ever a brown out occurs, a simple switch on the back-up power will just power up the MCU and automatically turns the servo and drives the bolt to open. and then i would turn off the whole system to conserve power. but what if the door is already open when the brown out occurs? i know it would only require a single pulse value (2ms or 1ms) to turn the servo either way. and if it is already in a 180 degree angle, sending a pulse of 2mS doesn't really matter since the servo would likely to stay on the same position. 
 
and what if i power up the back-up power again so that the bolt will close? 
the problem now is that i should send a 1mS pulse for the servo to turn the other way.
that is why i should know the current position of the servo on power up for me to know the PWM value. and if possible, no more additional hardware for lesser power requirements.
thanks...
-jay
 
thanks for the help.

David VanHorn <dvanhorn@cedar.net> wrote:
At 08:05 PM 6/28/2004 +0000, Phil wrote:

>Some one did do just that.  check out this page - 
><http://www.portlandrobotics.org/robots/servo_encoder/index.html>
>
>but wouldn't an optical encoder simply tell you relative motion (not 
>absolute)?  

Depends on the encoder. Gray code or binary units give absolute, quadrature gives relative.

>How important is it to know the initial position?  You can command a 
>servo to a known position and go from there.  

Good point.


Yahoo! Groups SponsorADVERTISEMENT


---------------------------------
Yahoo! Groups Links

   To visit your group on the web, go to:
http://groups.yahoo.com/group/AVR-Chat/
  
   To unsubscribe from this group, send an email to:
AVR-Chat-unsubscribe@yahoogroups.com
  
   Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 


		
---------------------------------
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!

Re: [AVR-Chat] Re: servo position

2004-06-29 by David VanHorn

Sounds like you need at least two switches, so you can indicate locked, unlocked, and "somewhere inbetween".

Re: [AVR-Chat] Re: servo position

2004-06-29 by erikc

----- Original Message -----
Show quoted textHide quoted text
From: "David VanHorn" <dvanhorn@cedar.net>
To: <AVR-Chat@yahoogroups.com>; <AVR-Chat@yahoogroups.com>
Sent: Tuesday, June 29, 2004 01:04
Subject: Re: [AVR-Chat] Re: servo position


>
> Sounds like you need at least two switches, so you can
indicate locked, unlocked, and "somewhere inbetween".

Also another switch to indicate if the door is ajar.


Erikc  - firewevr@airmail.net
///
"An Fhirinne in aghaidh an tSaoil."
"The Truth against the World."
        -- Bardic Motto
///I did NOT lose my mind!  It's backed up on the server
(and the network's down....)

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.