Behalf Of grumpy via Groups.Io
is this usable
-=-=-=-=-=-=-=-=-=-=-=-
Yes but not without a bit of work.
If you look at the Schematic of my ELS motor driver section you can see that not only is the ELS a lathe controller but also built in is a micro-stepper controller.
On each X axis step event it uses the SPI bus to send out the next micro-step phase information. There's also the step/dir signals that would go out to the DB-25 connector.
So one could use the Motor_LATCH, /RESET, SPI_CLK and SPI_MOSI pins along with the Z_STEP/Z_DIR pins to use the Pololu module. Although I haven't looked it's possible that there's an extra pin available for selecting either X or Z in which case the SPI bus on my ELS could be used for both axis.
It doesn't change the fact that at 6000 RPM (100RPS) an 1800 line encoder as required for the RELS, my ELS would be receiving 180,000 falling edges from one line of the encoder. If you wanted to deal with back and forth motion it has to be quadrature so now it's 720,000 edges per second. That's an interrupt every 1.3888 uS. The processor on the ELS can't handle that speed. However it can handle 100 interrupts per second (index pulse) easily.
The BEI encoder I have has 100 lines or 400 edges per rev. That's 40kHz or an interrupt every 25uS. When looking at the way I do step pulses etc. I was limited to 20kHz step rates (way more than a micro-stepping motor could handle) Anything more often and I found I'd spend too much time inside the interrupt routine and scanning keys and other processing became very slow or was blocked.
Now if the processor had a quadrature encoder module then once can capture the count every 50uS (for example) and scale both it and the desired speed to calcuate a step rate for the Z that is slaved to the spindle.
But the PIC 18F doesn't so a processor upgrade would also be required.
John