|Oct 30, 2008, 08:46 AM|
Joined Nov 2002
Servo actuator basics...
Lets build one !! Or at least think about what is required...
Refer to the drawing to help you visualize the ideas I am attempting to convey here.
Here is somewhat ideal but still practical example of a practical
servo actuator system: All this should be described
(from actual measurements) to "model" how the system will act.
The CPU uses an 8 bit ADC determine the position of the
servo actuator arm, and the set point is determined by the
width of the 1 - 2 msec pulse from the system driving the servo
The system is physically built so the ADC reads 0x80 when
the servo is at neutral position. At the mechanical stops
on each side, the ADC reads 0x50 when the arm is at one end
of its travel (-30 degrees from neutral) and 0xb0 at the
other end (+ 30 degrees) from neutral) of its travel.
Here you can see the range of the movement is
0x50 to 0xb0 == 0x60 == 96 steps.
We will remember the range of movement so if the arm falls outside of it
we assume the system failed mechanically, and we will
quit driving the output arm. We have to add in some tolerance there,
so we accidentally dont assume it is broken when it is not...
Adding gain between the hall effect sensor and the ADC can
change the ADC reading through the range of movement if you
need to have more steps between the limits of the servo actuator
travel. That would make the lower and upper values for the ADC
reading closer to the rails for the same positions..
At 96 steps the value of 1 LSB of the ADC represent 60/96 == .625
Your S/W can be set up to not attempt to drive the output
arm past those limits.
That also means that an input pulse width of 1 msec should translate to
a set point value of 0x50 at -30 degrees, 0x80 at neutral, and 0xb0
at +30 degrees.
The error at any particulate sample time will be the difference between
the set point value and the value of the output arm position...
Lets assume that the arm moves from one extreme to another
in .10 seconds == 100 msec when the actuator is driven with the maximum
amount of current possible.
This a movement of 60 degrees in 100 msec or 600 degrees/sec
Lets assume you sample the output arm 256 times per second, or about every
4 msec. That means the output arm can only move about 2.4 degrees
between sample times., which corresponds to 2.4 degrees/.625 degrees/LSB =
3.84 LSBs. If your control program reads more than lets say 4 MSBs
difference in the current sample versus the last, then the measurement
must have been corrupt, being the system dictates that it is physically
impossible to do that.
Lets also assign a dead band value of 2 degrees to the system.
The corresponds to 2/.625 = 3.2 LSBs. Unless the error is more than
that 3 LSBs we wont attempt to move the arm.
Lets also adopt the convention (and make the physical system adhere it)
that a "positive" control output moves the arm from an angle which
gives a lower ADC voltage to a higher one. This in turn corresponds
to the direction in which the current flows through the servo actuator coil,
and ultimately dictates the specifics of the programming of the hbridge
driving the actuator coil..
Lets also adopt the convention that the error for a sample is "negative" when the
ADC reading for the output arm is less than the set point, and is "positive"
when the ADC reading for the output arm is greater than the set point.
That concludes the preliminary analysis of the mechanical
aspects of the servo actuator system which will have an impact on the
details in our control program.
Remember, the widget you build have have slightly different
values for all the above.. so take that into consideration as well
|Category||Thread||Thread Starter||Forum||Replies||Last Post|
|can anyone provide a PIC program for a servo/actuator converter||blue_bull||DIY Electronics||23||Jan 07, 2005 01:20 AM|
|I Need Some Servo/Actuator selection HELP!||JonB||Scratchbuilt Indoor and Micro Models||9||Oct 14, 2003 06:39 AM|