> PWM is unlikely to be able to generate voltages that are stable enough > for a servo drive. To increase smoothness of the PWM, you need to > either use a faster PWM base frequency or use a larger RC filter. Using > a fast PWM makes the resolution lower (for a given processor/crystal), > and using a large RC filter makes the response slower. You'll have to > find a good balance of PWM resolution and filter frequency. > > Incidentally, you could make something that does a more direct > conversion to analog, but it's still iffy as to whether it would work > well. Just use a simple circuit to do quadrature edge detection, and > have that trigger a short duration one-shot. The one-shot goes into an > averaging filter and an amplifier that can invert the output depending > on direction (the quadrature circuit would need to have a DIR output pin > as well). The faster the pulses come in, the higher the output > voltage. It more or less uses the quadrature data as the PWM. > > - Steve > I had thought about that, but in order to respond to low speeds, you would have to make the filter respond very slowly. If you were to try to make a quadrature to tachometer that would give full voltage at 5000 RPM with a 1024 pulse (256 finger) encoder then... 5000 RPM * 1024 counts = 5,120,000 5,120,000 per minute / 60 seconds = 85,333.3333 pulses per second 1 / 85,333.333 = 11.719 micro seconds for the pulse length
to have the filter respond to 100 RPM 100 RPM * 1024 counts = 102,400 102,400 per minute / 60 seconds = 1,706.666 pulses per second 1 / 1,706.666 = 586 micro seconds for the pulse length This would be about 2 KHz 50 RPM would need about 1KHz filter if we use a 10 bit timer/counter clocked at 10MHz 10,000,000 / 1024 = 9,765.625 nearly 10 KHz With 5000 RPM divided by 512 increments you get 9.765625 Hz for the least significant bit's resolution, while needing only a 10,000 Hz filter Since servo threads are usually set at 1KHz, I believe 10 KHz tach signal might work. I KNOW there are inexpensive uControllers out there that can clock their timers at 10MHz, some might be able to do it at 50MHz allowing 45KHz 10 bit, 22.5 KHz 11 bit, 11.25 KHz 12 bit or 2.44 RPM for the Least Significant Bit at 11.25 KHz. To do that with a pulse generated off each quadrature state change would require a filter corner frequency of 41.666 Hz. The filter corner frequency is set by the counter's clock frequency, and the counter's resolution. At very low RPM the counter is still counting at 10-50 MHz. I realize the filter frequencies I'm stating are too high to properly filter out the AC portion, but this gives an idea of the relative corner frequencies, and response time of the DC voltage. So, as I mentioned before, this is still in the idea stage, but I think it has merit. ------------------------------------------------------------------------------ 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 [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
