If I understand it right, a (hobby) servo gets its positional
'encoding' from a variable pot which turns as the servo turns. The resistance
then tells the driving circuitry what the position is, and the circuitry can
change the position accordingly. Does the servo have this circuitry
(specifically the pulse-width modulator) on-board, or does it have an extra
couple of wires which feed that resistance back to the driving circuitry?
Does it manage it all with 2 wires? How?
Can the pot be removed, and replaced with a linear resistor (or even a
CdS photocell, or humidity sensor, or...) which would allow other types of
'encoding'? I suppose that part of the answer would depend on whether or not
the PWM is internal... there might need to be some mickeymouse circuitry to
interface these other sensors.
Do industrial grade servos rely on the same techniques as hobby
servos? I imagine that they would use rotational optical encoders for more
precise positioning, but the rest could be the same. Do they still use PWM
for positioning?
Can an ordinary DC motor be 'servo-d', i.e. have circuitry and
encoders added to make it respond to PWM and be accurately positionable?? I
think that an H-bridge would handle the drive part, and I guess the PWM would
have a feedback pin for the encoder to hook to... (???)
Also, if the servo is under load, say it is an arm that is lifting a
heavy object, and the object is too heavy, I would guess that the pulses just
get longer and longer to try to force it up. This could be a problem, as the
motor approached stall, and the current shot up. Is current-sensing circuitry
required to limit this and prevent burnout, or is there some limiting agent in
the PWM which restricts the maximum pulse width?
Thanks.
3 wires: power, gnd, signal. Signal is the PWM encoding of the desired
position, from 1 to 2 ms with 1.5 being midrange angle comand, pulsed
out every 20 to 30 ms or so. The servo has the circuitry to drive to
that position.
>
> Can the pot be removed, and replaced with a linear resistor (or even a
> CdS photocell, or humidity sensor, or...) which would allow other types of
> 'encoding'? I suppose that part of the answer would depend on whether or not
> the PWM is internal... there might need to be some mickeymouse circuitry to
> interface these other sensors.
You can replace the pot with a resistor, and get a motor that spins in
either direction depending on the pulse width. You might have to remove
a tab from the gear, and some models don't have teeth all around the
output gear. Futaba is a good brand for such mods.
>
> Do industrial grade servos rely on the same techniques as hobby
> servos? I imagine that they would use rotational optical encoders for more
> precise positioning, but the rest could be the same. Do they still use PWM
> for positioning?
Some do, but it's not as standardized as it is for hobby servos. Some
use analog, some use digital, some use servo speed control, some use
servo position control, all types of power. All mucho $$. The movie
industry is a big user of hobby servos because they're cheap,
standardized, and can be hot-glued just about anywhere.
>
> Can an ordinary DC motor be 'servo-d', i.e. have circuitry and
> encoders added to make it respond to PWM and be accurately positionable?? I
> think that an H-bridge would handle the drive part, and I guess the PWM would
> have a feedback pin for the encoder to hook to... (???)
>
Sure.
> Also, if the servo is under load, say it is an arm that is lifting a
> heavy object, and the object is too heavy, I would guess that the pulses just
> get longer and longer to try to force it up. This could be a problem, as the
> motor approached stall, and the current shot up. Is current-sensing circuitry
> required to limit this and prevent burnout, or is there some limiting agent in
> the PWM which restricts the maximum pulse width?
The servo will try to overcome the disturbance. You'd want to size the
motor so it could take the stall current. Some control schemes
(proportional) have small corrections for small disturbances, and bigger
commands for bigger disturbances. That is, if you're almost home but
can't quite get there, only a small restoring torque will result. More
advanced schemes will integrate the error and allow the command to build
up as high as it can to overcome any residual error. Under such a
scheme, a motor could see extended maximum stall torque conditions.
On Tue, 09 Sep 97 16:21:37 GMT, ken...@ucs.orst.edu (Michael Kennan)
> I have never actually seen a servo-motor, but based on the discussions
>I have seen here I have a few questions:
You're probably mistakes two kind of PWM. Model servo is controlled
by PWM signal, which contain repeatable pulses. Desired position
is coded by pulse width - 1.5ms is "neutrum", min is 1ms, max 2 ms.
Repetition rate is not critical - and should be about 50Hz [20ms].
This "controlling PWM" has nothing to do with signal powering servo
motor. I believe servo uses mostly analog signal for driving motor,
however most advanced one may use PWM driven motor. This time
parameter for PWM may be quite different - say, 10kHz signal
varying duty cycle 0-100%.
> If I understand it right, a (hobby) servo gets its positional
>'encoding' from a variable pot which turns as the servo turns. The resistance
>then tells the driving circuitry what the position is, and the circuitry can
>change the position accordingly. Does the servo have this circuitry
>(specifically the pulse-width modulator) on-board,
Yes - model servo have everything "on board". "everything" means
circuit which gets "controlling PWM", and somehow produce driving
power for motor [not necesarily PWM].
> Can the pot be removed, and replaced with a linear resistor (or even a
>CdS photocell, or humidity sensor, or...) which would allow other types of
>'encoding'? I suppose that part of the answer would depend on whether or not
>the PWM is internal... there might need to be some mickeymouse circuitry to
>interface these other sensors.
Usually you can disassemble servo and connect external pot. Depending
on particular servo design it may utilise pot resistance, or
resistance ratio [pot used as voltage divider in feedback].
I'm not quite sure what you want to do.
If you want to, say, rotate volume knob on amplifier depending on
brightness outside, use ordinary servo, and build encoder
[dual 555, or 74123] generating proper "controlling PWM" signal.
Notice you don't have global feedback this time.
If you want to, say, rotate heater knob, to keep preset temperature in
room, it's a nice trick to remove internal pot and connect thermistor.
You still need similar circuit to generate "controlling PWM" - used
to preset desired temperature.
Actually - to make it really well work, you probably need to keep
time constants. Otherwise it may oscillate.
> Can an ordinary DC motor be 'servo-d', i.e. have circuitry and
>encoders added to make it respond to PWM and be accurately positionable??
Sure. Everything may be servoed, by adding encoder and control
circuit.
> Also, if the servo is under load, say it is an arm that is lifting a
>heavy object, and the object is too heavy, I would guess that the pulses just
>get longer and longer to try to force it up. This could be a problem, as the
>motor approached stall, and the current shot up. Is current-sensing circuitry
>required to limit this and prevent burnout, or is there some limiting agent in
>the PWM which restricts the maximum pulse width?
Small simple model servos are probably not protected, but designed not
to burn. Professional servos often have current sensor, and special
operating modes which limit current to preset value. Not to protect
servo - but to limit torque. Very usefull if it controls robot hand
which hold glass. :-)
J.
Michael Kennan wrote:
>
> I have never actually seen a servo-motor, but based on the discussions
> I have seen here I have a few questions:
>
> If I understand it right, a (hobby) servo gets its positional
> 'encoding' from a variable pot which turns as the servo turns. The resistance
> then tells the driving circuitry what the position is, and the circuitry can
> change the position accordingly. Does the servo have this circuitry
> (specifically the pulse-width modulator) on-board, or does it have an extra
> couple of wires which feed that resistance back to the driving circuitry?
> Does it manage it all with 2 wires? How?
There are 3 wires; power (+5Vdc), signal (PWM), and ground. The PWM
pulse comes from an external device, such as an R/C receiver, and tells
the servo what position
to move to. There is no output signal feeding back to the receiver.
The circuit inside the servo uses the internal potentiometer for
feedback and drives the motor accordingly.
> Can the pot be removed, and replaced with a linear resistor (or even a
> CdS photocell, or humidity sensor, or...) which would allow other types of
> 'encoding'? I suppose that part of the answer would depend on whether or not
> the PWM is internal... there might need to be some mickeymouse circuitry to
> interface these other sensors.
I believe that the internal potentiometer forms part of an RC circuit,
so you should be able to replace it with another current-limiting device
for custom control.
> Do industrial grade servos rely on the same techniques as hobby
> servos? I imagine that they would use rotational optical encoders for more
> precise positioning, but the rest could be the same. Do they still use PWM
> for positioning?
Typically, the feedback loop is not internalized with an "industrial"
servo.
Instead, the roles of controller, motor amplifier, motor, and feedback
mechanism are separated. The controller determines the output signal
based on desired value and feedback on current status, the output signal
is amplified to a level which can drive the motor, the feedback changes,
and it starts over again. This allows for more sophisticated control,
for example control of position, velocity, acceleration, and/or other
factors, and allows monitoring of actual performance by the control
algorithm. It also increases the cost alot.
Hobby servos, by contrast, are designed to provide only position
control, and there is no way to determine if the servo is "behaving"
without external feedback sensors.
When you hear about PWM being used for industrial servos, it still means
"Pulse width modulation", but PWM is used in a very different way.
Hobby servos use a PWM pulse stream as a control signal telling the
controller inside the servo what to do. PWM in an industrial servo
system refers to modulating the output signal from the controller as a
way to reduce the energy losses in the motor amplifier. Lower losses
mean less heat, which means smaller and cheaper power transistors can be
used in the amplifier.
In the "industrial servo" use of PWM, power to a DC motor is switched
between +V and -V at a high frequency (typically in the audible kHz
range). By modulating the ratio
of pulses at +V and -V, it effectively appears to the motor as if it is
getting an analog voltage ranging between +V and -V.
For example, in order to leave a motor still (effectively at 0 volts), a
"50% duty cycle" is used, which means that the number of pulses at +V is
exactly the same as the number of pulses at -V. Varying the duty
cycle to 75% would mean that 75% of the pulses would be at +V and 25%
would be at -V. Thus, 75% duty cycle would appear to the motor as
+(1/2)V.
FYI, PWM reduces energy dissipation because the transistors in the motor
amplifier are (with the exception of the rise/fall time during
switching) either conducting max current with negligible voltage drop,
or no current with max voltage drop. (Power = Voltage * Current)
> Can an ordinary DC motor be 'servo-d', i.e. have circuitry and
> encoders added to make it respond to PWM and be accurately positionable?? I
> think that an H-bridge would handle the drive part, and I guess the PWM would
> have a feedback pin for the encoder to hook to... (???)
"Industrial" servos are often DC motors with appropriate support
circuitry, and H-bridges are a common form of motor amplifier, so you
are thinking in the right direction. I don't know of any
straightforward ways to take a "hobby" PWM signal and use it for
position control of a generic DC motor, though. I guess the best thing
to do would be to duplicate the PWM-decoding/potentiometer-reading
circuit in a hobby servo and scale it up for the increased
current/voltage required by the DC motor.
> Also, if the servo is under load, say it is an arm that is lifting a
> heavy object, and the object is too heavy, I would guess that the pulses just
> get longer and longer to try to force it up. This could be a problem, as the
> motor approached stall, and the current shot up. Is current-sensing circuitry
> required to limit this and prevent burnout, or is there some limiting agent in
> the PWM which restricts the maximum pulse width?
[the answer WRT hobby servos:]
Most hobby servo motors are rather weak and they will typically stall
before physical damage occurs to the servo. As for pulses getting
longer and longer, the R/C controller generating the PWM pulses doesn't
know what the servo is doing. Thus, the pulse width won't change unless
the user/control program tells it to do so.
The R/C standard for PWM pulses is between 1-2 ms every 20 ms. These
PWM pulses serve only as a control signal, so they cannot directly burn
out a servo. Some servos will, however, move beyond the normal range of
motion if they receive a non-standard pulse length, and this could cause
damage to the servo.
[the answer WRT industrial servos:]
A very common and basic form of motor control (Proportional control)
bases the output signal from the motor controller on the difference
between the desired position of the motor and where it actually is.
This means that the farther away the motor is from the destination, the
harder it is pushed toward the destination (ie. the higher the applied
voltage). This is sufficient for many uses, but can lead to some
interesting dynamics such as oscillation when the motor overshoots the
target and the system is not sufficiently damped. In the case of a
proportional motor controller with a PWM output signal, and your above
scenario, the +V/-V pulse ratio would indeed change as the desired
position of the arm outpaced the actual position of the arm. The
maximum pulse width for this type of PWM would simply be a 100% or 0%
duty cycle.
Some motor amplifiers offer built-in (often adjustable) current limiting
as a way to protect motors from burnout, mechanisms from excess torque,
etc. It is also conceivable to use an external current sensor and
integrate it with the control algorithm such that the control signal to
the motor amplifier is adjusted if the current theshold is exceeded.
However, the latter method will incur a delay based on the update rate
of the control loop.
Hope this helps,
Eric Rasmussen
Jaroslaw Lis wrote:
>
> On Tue, 09 Sep 97 16:21:37 GMT, ken...@ucs.orst.edu (Michael Kennan)
> > I have never actually seen a servo-motor, but based on the discussions
> >I have seen here I have a few questions:
>
> You're probably mistakes two kind of PWM. Model servo is controlled
> by PWM signal, which contain repeatable pulses. Desired position
> is coded by pulse width - 1.5ms is "neutrum", min is 1ms, max 2 ms.
> Repetition rate is not critical - and should be about 50Hz [20ms].
>
> This "controlling PWM" has nothing to do with signal powering servo
> motor. I believe servo uses mostly analog signal for driving motor,
> however most advanced one may use PWM driven motor. This time
> parameter for PWM may be quite different - say, 10kHz signal
> varying duty cycle 0-100%.
It is true that there are two separate PWM signals in the servo. One
(the Control PWM) is from the Radio receiver (or other control PWM
source), the other is derived inside the servo (Speed PWM) to control
motor speed. From my observations inside Futuba servos, the speed PWM IS
dependant on the Control PWM Signal. This dependance allows the servo to
generate its own PWM signals without the need for a clock source.
For example, the servo uses an integrator circuit to measure the Control
PWM (the result from the integrator is a proportional analog voltage).
On the control PWM's falling edge, the speed PWM signal STARTS. Here's
where the variable pot comes in. This pot produces another proportional
analog voltage which lies within the same voltage range as the output
from the integrator. These two voltages are compared to obtain two
results; speed and direction.
Direction: lets say the integrator's voltage is higher than the pots
voltage, the servo will then rotate in one direction in order to reduce
the difference between the voltages to zero. If the integrator's voltage
is LOWER than the pot's, then the servo will rotate in the other
direction.
Speed: Speed (or speed PWM Length) is proportional to the voltage
difference between the integrator's voltage and the pot's voltage. I
suspect that this is a non-linear relationship, it's a good bet that it
has been engineered to obtain the optimum step respone (minimum
overshoot). I am not sure how the servo does this, it may just be a RC
circuit which is pre-charged with the lower voltage, and then allowed to
charge until it is the same as the higher voltage, at which point the
speed PWM turns off again. The cycle resets and waits until the next
rising edge of the control PWM signal.
There are usually two IC's in the servo, one of which will be the
H-bridge. The other chip will contain the circuity to analyze the
incoming control PWM siganl with the voltage from the pot.
>
> > If I understand it right, a (hobby) servo gets its positional
> >'encoding' from a variable pot which turns as the servo turns. The resistance
> >then tells the driving circuitry what the position is, and the circuitry can
> >change the position accordingly. Does the servo have this circuitry
> >(specifically the pulse-width modulator) on-board,
>
Resistance is not really important (relatively speaking) but it is the
pot's voltage from the center tap which is used by the servo.
> Yes - model servo have everything "on board". "everything" means
> circuit which gets "controlling PWM", and somehow produce driving
> power for motor [not necesarily PWM].
>
> > Can the pot be removed, and replaced with a linear resistor (or even a
> >CdS photocell, or humidity sensor, or...) which would allow other types of
> >'encoding'? I suppose that part of the answer would depend on whether or not
> >the PWM is internal... there might need to be some mickeymouse circuitry to
> >interface these other sensors.
>
> Usually you can disassemble servo and connect external pot. Depending
> on particular servo design it may utilise pot resistance, or
> resistance ratio [pot used as voltage divider in feedback].
>
> I'm not quite sure what you want to do.
>
Anything will work that will produce an analog reference voltage. Make
sure to keep the voltage between the servo's operating voltage and it's
ground (0v).
> If you want to, say, rotate volume knob on amplifier depending on
> brightness outside, use ordinary servo, and build encoder
> [dual 555, or 74123] generating proper "controlling PWM" signal.
> Notice you don't have global feedback this time.
>
> If you want to, say, rotate heater knob, to keep preset temperature in
> room, it's a nice trick to remove internal pot and connect thermistor.
> You still need similar circuit to generate "controlling PWM" - used
> to preset desired temperature.
>
> Actually - to make it really well work, you probably need to keep
> time constants. Otherwise it may oscillate.
>
> > Can an ordinary DC motor be 'servo-d', i.e. have circuitry and
> >encoders added to make it respond to PWM and be accurately positionable??
>
Actually, you can make a speed-controllable motor out of a servo. Just
remove the pot from the servo, trim off the stop-tab from the spur gear
and give the servo a control PWM signal that does not change (constant
1.5ms for example). By adjusting the pot manually (or electronically by
a digital pot or something) you can change the motor speed. The servo is
trying to rotate to a position, but the position 'error' remains the
same (no feedback loop).
(saw this in an Elecronics Now, or a Popular Electronic Mag, can't
remember which one)
> Sure. Everything may be servoed, by adding encoder and control
> circuit.
>
> > Also, if the servo is under load, say it is an arm that is lifting a
> >heavy object, and the object is too heavy, I would guess that the pulses just
> >get longer and longer to try to force it up. This could be a problem, as the
> >motor approached stall, and the current shot up. Is current-sensing circuitry
> >required to limit this and prevent burnout, or is there some limiting agent in
> >the PWM which restricts the maximum pulse width?
>
> Small simple model servos are probably not protected, but designed not
> to burn. Professional servos often have current sensor, and special
> operating modes which limit current to preset value. Not to protect
> servo - but to limit torque. Very usefull if it controls robot hand
> which hold glass. :-)
>
> J.
Model servos have very simple control systems, referred to as stricly
proportional. This means that only the position 'error' is used to
determine the motor speed. More complex systems, which are analog in
nature, can have PI, PD, or PID control systems which rely on time and
accumulated error as well as positional error to determine motor speed.
ie if the error remains the same over a small period of time (servo
stalling) the control system will increase the current motor speed to
try to reduce the error.
PI proportional-integral
PD proportional-differential
PID proportional-integral-differential
--
Richard Willis
Elec Engr, Graduate
University of Victoria
Victoria, BC
http://www.engr.uvic.ca/~rwillis/
email rwi...@engr.uvic.ca
Richard Willis wrote:
> Actually, you can make a speed-controllable motor out of a servo.
> Just remove the pot from the servo, trim off the stop-tab from the
> spur gear and give the servo a control PWM signal that does not
> change (constant 1.5ms for example). By adjusting the pot manually
> (or electronically by a digital pot or something) you can change
> the motor speed. The servo is trying to rotate to a position, but
> the position 'error' remains the same (no feedback loop).
Even better:
Use two equal resistors in the place of the pot, to give the same as
the shaft being in the middle. Then send in a PWM signal!
Send in 1 ms pulses, goes full reverse, send in 2 ms pulses, goes full
forwards, send in 1.5, it stays still! You can plug it into the
output of almost anything, Presto! speed controled motor.
--
--ran...@slip.net
--Randy Gardner
HTH
--
Todd Schifferdecker
Send direct replies to:
jo...@i1.net
#include <disclaimer.std>
Michael Kennan <ken...@ucs.orst.edu> wrote in article
<5v3t4e$nsv$1...@spitting-spider.aracnet.com>...
> I have never actually seen a servo-motor, but based on the
discussions
> I have seen here I have a few questions:
>
> If I understand it right, a (hobby) servo gets its positional
> 'encoding' from a variable pot which turns as the servo turns. The
resistance
> then tells the driving circuitry what the position is, and the circuitry
can
> change the position accordingly. Does the servo have this circuitry
> (specifically the pulse-width modulator) on-board, or does it have an
extra
> couple of wires which feed that resistance back to the driving circuitry?
> Does it manage it all with 2 wires? How?
>
> Can the pot be removed, and replaced with a linear resistor (or
even a
> CdS photocell, or humidity sensor, or...) which would allow other types
of
> 'encoding'? I suppose that part of the answer would depend on whether or
not
> the PWM is internal... there might need to be some mickeymouse circuitry
to
> interface these other sensors.
>
> Do industrial grade servos rely on the same techniques as hobby
> servos? I imagine that they would use rotational optical encoders for
more
> precise positioning, but the rest could be the same. Do they still use
PWM
> for positioning?
>
> Can an ordinary DC motor be 'servo-d', i.e. have circuitry and
> encoders added to make it respond to PWM and be accurately positionable??
I
> think that an H-bridge would handle the drive part, and I guess the PWM
would
> have a feedback pin for the encoder to hook to... (???)
>
> Also, if the servo is under load, say it is an arm that is
lifting a
> heavy object, and the object is too heavy, I would guess that the pulses
just
> get longer and longer to try to force it up. This could be a problem, as
the
> motor approached stall, and the current shot up. Is current-sensing
circuitry
> required to limit this and prevent burnout, or is there some limiting
agent in
> the PWM which restricts the maximum pulse width?
>
> Thanks.
>