On Sat, 20 Mar 2010, cogoman wrote: > Date: Sat, 20 Mar 2010 16:02:39 -0400 > From: cogoman <cogo...@verizon.net> > Reply-To: "Enhanced Machine Controller (EMC)" > <emc-users@lists.sourceforge.net> > To: emc-users@lists.sourceforge.net > Subject: Re: [Emc-users] G52 and Fanuc conversion to EMC > > That price seems overkill to me too. I have been thinking about > trying to develop a product for just this kind of situation. The > solution seems simple, and inexpensive. Take an AVR microcontroller and > have it monitor the Q-encoder signals. The program would start out > counting the time between changes of the signals. When the RPMs get > high enough it could switch to counting encoder events for a certain > small amount of time. The RPM that is found would be converted to a DC > voltage by a PWM signal from one of the counters. The PWM would always > be clocked at a few MHz, so the RC filter would have a high corner > frequency, and the DC voltage would be able to change faster than most > (if not all) servo systems. For older servo motors that top out at > about 2500 RPM this should be overkill.
Actually theres a better way than changing counting modes at different speeds (from 1/T_Encoder to DeltaN/T_Sample): always timestamp encoder edges, that way, at T_Sample you have both encoder counts (N) and the time it took to get those counts (TsubN) from the timestamps. The velocity can now be calculated as KDeltaN/TsubN. This is what the HostMot2 hardware/driver does to calculate its velocity estimate (glossing over some nastiness that the driver fixes at reversals and stops) Dont know if the AVR has the hardware to do this, We've implemented this on a DSPIC (using DMA) but it wasn't pretty... Peter Wallace Mesa Electronics (\__/) (='.'=) This is Bunny. Copy and paste bunny into your (")_(") signature to help him gain world domination. ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users