Re: Homebrew STG card - 8254
bfp wrote:
> I didnt mean to convert step pulses back to servo but instead to generate
> a PWM signal directly,sort of a poor-man's DAC.just change the software
> driver'A' puts out a square wave for a stepper board
> driver'B' generates PWM for servo amps
Ah, I misinterpreted your idea, here.
> I agree, the 8254 idea was more of a quick&dirty hack I thought up
> while looking at options for my own homebrew design,the resolution
> would have been down around 8 bits even with a 10mhz clock input
> (10mhz/256 = ~39khz PWM using only LSB of counter)
> and it would have required some extra work in the software initialization
> so I decided to use a real DAC instead
Well, that's the crux of the problem. The Allen-Bradley 7320 (1978 vintage
CNC) used this scheme for their D/A servo converters. The advantage
is they start life linear, and they stay linear. But, the bandwidth vs.
resolution
tradeoff remains, whether it is converted to analog, or stays PWM. But,
there's a lot more to it than just taking velocity commands and making them
PWM. In my servo amps, there are 3 control loops. The innermost is the
torque loop, which takes a torque command from the next outer loop, and
generates a PWM duty cycle such that a motor current proportional to the
torque command is delivered. The next outer loop is the velocity loop,
A DC tach senses velocity and compares it to the velocity command, and
the difference is the torque command. The outermost loop includes the
CNC control, where position error + programmed velocity produces a
velocity command.
Now, to do this digitally, the position encoder's difference from the last
cycle can compute velocity, but you'd need an A/D converter to read motor
current. Also, with a DC tach in an analog computing loop, the velocity
bandwidth can be GREATER than the computer can provide, giving very
smooth velocity, down to rediculously slow motion, like .01 IPM.
If the encoder resolution is coarse, it can't give good velocity info near
zero. Again, a bandwidth vs. resolution problem. My analog loop servos
don't jitter, AT ALL! A servo based on the encoder would likely jitter
badly, unless the encoder had VERY high resolution.
Jon
Date Index |
Thread Index |
Back to archive index |
Back to Mailing List Page
Problems or questions? Contact