On Saturday 04 January 2014 21:55:24 Peter C. Wallace did opine:
> On Fri, 3 Jan 2014, Gene Heskett wrote:
> > Date: Fri, 3 Jan 2014 17:53:11 -0500
> > From: Gene Heskett <[email protected]>
> > Reply-To: "Enhanced Machine Controller (EMC)"
> >
> > <[email protected]>
> >
> > To: [email protected]
> > Subject: Re: [Emc-users] Spindle control on BBB
> >
> > On Friday 03 January 2014 17:49:56 andy pugh did opine:
> >> On 3 January 2014 22:09, Kirk Wallace <[email protected]>
> >
> > wrote:
> >>> VFDs are often controlled with a PWM signal going to an
> >>> opto-coupler. An example is here:
> >>> http://wiki.linuxcnc.org/cgi-bin/wiki.pl?VFD_Digital/Analog_Interfac
> >>> e
> >>
> >> I have just found out that Mesa have a ready-made widget for the job:
> >> http://store.mesanet.com/index.php?route=product/product&filter_name=
> >> spi n&product_id=205
> >
> > That looks like a ready-made recipe for happiness. How long has that
> > been in your "bag of tricks" Peter? I'd be willing to bet it would
> > kick ass on Leonardo's C41 I've had to cuss and cobble, screwing with
> > mods to mods to get it to work.
> >
> >
> > Cheers, Gene
> >
> > It gets late early out there.
> >
> > -- Yogi Berra
> >
> > A pen in the hand of this president is far more
> > dangerous than 200 million guns in the hands of
> >
> > law-abiding citizens.
>
> We have used the same circuit for a number or years (in cards like the
> 7I47S). But note that you cannot directly compare this to the C41. We
> have a much easier task since the PWM is assumed to come from a FPGA
> card where we have a minimum 100 MHz PWM clock so we use 12 bit PWM at
> 5KHz. This is trivial to filter without adding a significant lag to the
> spindle control, not so with bit banged PWM...
True. The stock C41 is a bandwidth joke, and the relay timings for a cnc
reversal can eat your controller by sending a reverse while the motor is
still doing 5k rev fwd.
I cranked up the bandwidth by pulling both 10uf caps and subbing .1 mylar's,
which gives me pretty timely control, but with a nominal 20% sawtooth
component in the DC out since its running at about 120 hertz, with the
dither enabled. That of course limits the bits of resolution, but with
the PID controlled by the encoder, the control itself is quite decently
stiff once above about 100 rpm's.
There is of course a point where using the PID to diddle the PWM to get
the right average speed begins to get a little rough when the controller
has 20x the bandwidth (its running at somewhere in the 25+ kilohertz
range, dead silent to these old ears), so I guess what I'm asking at what
point yours would perform worse than the speeded up and quite non-linear
C-41?
Is that even something you can expound on.
Here are those two stanza's of the hal file now:
# setup spindle pwmgen.0
setp pwmgen.0.pwm-freq 120.0
setp pwmgen.0.scale 1500 # arbitrary, is sorta like a
gain control
setp pwmgen.0.offset 0.069 # overcome friction in drive?
set s60=1 rps
setp pwmgen.0.dither-pwm true
setp pwmgen.0.max-dc 0.99
setp pwmgen.0.min-dc 0.001 # min duty cycle .5% or just
creeping rpm
setp pid.0.Pgain 40.00 # see how stiff, much more gets
noisy
setp pid.0.Igain 0.00 # ???
setp pid.0.Dgain 0.00 # not useful in velocity mode
for spindle
setp pid.0.FF0 60.000 # arbitrary, adjust for 60x rps
requested to make rpms
setp pid.0.FF1 20.000 # Similar to Igain? Similar
effects it seems...
setp pid.0.FF2 0 # Similar to Dgain? not useful
for velocity
setp pid.0.maxoutput 1500 # keep it from running away,
but what is it?
setp limit2.1.maxv 750 # denoise the spindle rpm
display a wee bit
I have no clue if the pwmgen is setup correctly/optimum, I'll plead guilty to
using the 10,000 monkeys method to make it work. Advice welcomed of course.
> Peter Wallace
> Mesa Electronics
>
> (\__/)
> (='.'=) This is Bunny. Copy and paste bunny into your
> (")_(") signature to help him gain world domination.
Cheers, Gene
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>
"It's a summons."
"What's a summons?"
"It means summon's in trouble."
-- Rocky and Bullwinkle
A pen in the hand of this president is far more
dangerous than 200 million guns in the hands of
law-abiding citizens.
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users