Re: [CAD_CAM_EDM_DRO] PWM signal to step/direction signals
Posted by
Howard Bailey
on 2002-10-08 23:20:47 UTC
Thanks to all who replied both on and off list.
the 16F84 and has the handy command Pulsin which measures the width of a PWM
signal. From the examples in a book based on this compiler, it doesn't seem
too difficult to output step and direction signals from the PIC. It seems
like it could work with the following steps: 1 measure the pulse, 2 compare
to last pulse and determine direction, 3 subtract the smaller pulse width
from the larger pulse, 4 set direction bit, 5 loop to send step pulses,
accelerating if needed, 6 repeat.
scheme phase.
one to drive a servo so I could have a closed loop system and let the Gecko
deal with the encoder feedback.
head would probably do. Without the reduction ratio yet, I can't calculate
maximum number of step pulses needed between each 50Hz input pulse, but I
will be aware of the need to keep the step pulses well within the time
limit.
keep the step pulses within their alloted time.
Best Regards,
Howard Bailey
> Eyup... that would be a PIC microcontroller running some custom microcode.I came across a limited version of the PICBasic compiler that will work for
the 16F84 and has the handy command Pulsin which measures the width of a PWM
signal. From the examples in a book based on this compiler, it doesn't seem
too difficult to output step and direction signals from the PIC. It seems
like it could work with the following steps: 1 measure the pulse, 2 compare
to last pulse and determine direction, 3 subtract the smaller pulse width
from the larger pulse, 4 set direction bit, 5 loop to send step pulses,
accelerating if needed, 6 repeat.
>A very welcome reminder.
> The devil's in the details.
>I honestly don't know yet. I am still in the preliminary hair brained
> How fast would the stepper have to run?
scheme phase.
>Geckodrives were exactly what I had in mind. I was actually planning to use
> If all you want is a low-current, TTL-level step and direction signal
> based on the PWM duty cycle of a servo controller output, it's a
> straight-forward implementation. Then, you'd take this output, and run it
> into your preferred stepper motor driver (Gecko, et. al.).
one to drive a servo so I could have a closed loop system and let the Gecko
deal with the encoder feedback.
>I have plenty of time and a willingness to learn.
> Developing the software to run on an $8 microcontroller to do this is
> about 40 man-hours worth of work. It's not dissimilar to some
> motion-control projects I've spun in the past.
>Looks like something between 50 and 60 HZ would be good enough.
> A normal RC servo driver (bar some ringers) runs at a base frequency
> between 50Hz and 400Hz with a typical pulse width of 0.6 mS to about 2.5
> mS.
>
> This pulse width is proportional to some angular rotation between 0 and 90
> degrees (or thereabouts).
>See hair brained scheme phase above, but +/- .5 deg on the output of a gear
> What is the ultimate precision you require for your application?
head would probably do. Without the reduction ratio yet, I can't calculate
maximum number of step pulses needed between each 50Hz input pulse, but I
will be aware of the need to keep the step pulses well within the time
limit.
>It seems promising and the accuracy should not be a problem as long as I can
> 1 degree is relatively simple to implement. 0.018 degrees would be about
> the best a 20 MHz microcontroller could generate.
>
> Does that meet your requirements?
keep the step pulses within their alloted time.
>Thank you for a comprehensive and informative answer.
> Kind Regards,
>
> David Kott
>
Best Regards,
Howard Bailey
Discussion Thread
Howard Bailey
2002-10-08 12:27:01 UTC
PWM signal to step/direction signals
dakota8833
2002-10-08 18:10:33 UTC
Re: PWM signal to step/direction signals
David Kott
2002-10-08 20:29:47 UTC
Re: [CAD_CAM_EDM_DRO] PWM signal to step/direction signals
Howard Bailey
2002-10-08 23:20:47 UTC
Re: [CAD_CAM_EDM_DRO] PWM signal to step/direction signals
JJ
2002-10-09 04:33:23 UTC
RE: [CAD_CAM_EDM_DRO] PWM signal to step/direction signals
Alan Marconett KM6VV
2002-10-09 10:50:14 UTC
Re: [CAD_CAM_EDM_DRO] PWM signal to step/direction signals
Brian Punkar
2002-10-09 18:10:44 UTC
Re: PWM signal to step/direction signals
Howard Bailey
2002-10-09 18:39:15 UTC
Re: [CAD_CAM_EDM_DRO] Re: PWM signal to step/direction signals
David Kott
2002-10-09 19:52:07 UTC
Re: [CAD_CAM_EDM_DRO] PWM signal to step/direction signals
JJ
2002-10-10 05:37:13 UTC
RE: [CAD_CAM_EDM_DRO] PWM signal to step/direction signals
j.guenther
2002-10-10 06:08:37 UTC
RE: [CAD_CAM_EDM_DRO] PWM signal to step/direction signals
Tim Goldstein
2002-10-10 11:35:45 UTC
Re: [CAD_CAM_EDM_DRO] PWM signal to step/direction signals