CAD CAM EDM DRO - Yahoo Group Archive

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.


> 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.
>
> The devil's in the details.

A very welcome reminder.
>
> How fast would the stepper have to run?

I honestly don't know yet. I am still in the preliminary hair brained
scheme phase.
>
> 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.).

Geckodrives were exactly what I had in mind. I was actually planning to use
one to drive a servo so I could have a closed loop system and let the Gecko
deal with the encoder feedback.
>
> 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.

I have plenty of time and a willingness to learn.
>
> 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).

Looks like something between 50 and 60 HZ would be good enough.
>
> What is the ultimate precision you require for your application?

See hair brained scheme phase above, but +/- .5 deg on the output of a gear
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.
>
> 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?

It seems promising and the accuracy should not be a problem as long as I can
keep the step pulses within their alloted time.
>
> Kind Regards,
>
> David Kott
>
Thank you for a comprehensive and informative answer.

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