CNC Spindle Speed Monitoring and Control
cjm last edited by
Many Variable Frequency Drives (VFD) used to control CNC spindles have a spindle speed output giving one pulse per revolution.
I’d like to propose a firmware option that would configure one of the micro’s timers to measure the frequency of this signal and hence the actual RPM of the spindle.
Why would that be useful?
Well, it could be used to do things like:
a) ensuring the spindle is fully up to speed after an M3/M4 (this is most important as it avoids the risk of trying to cut metal with a too low spindle speed);
b) closing the loop around the spindle speed, to improve the loss of accuracy one usually gets using PWM/analogue speed control with low cost VFD; and
c) enabling DWC to display the actual spindle RPM.
To be fair, point a) could equally be addressed by enabling an M3/M4 dwell time in the M453 CNC mode setup command, but this wouldn’t give you b) and c)....
jay_s_uk last edited by
definitely RS485 (modbus) support would be good to be able to get feedback from the spindle.
cjm last edited by
@cjm As an addendum - one way of achieving this would be to allow one of the fan tacho inputs (e.g. exp.pb6) to be defined as a spindle tacho source and thus provide the spindle rpm .
EducatingSavvas last edited by
@cjm Some VFD's have an analogue output terminal that can be used to feedback information to the controller. This could be used to indicate the frequency and speed.
cjm last edited by cjm
@educatingsavvas Yes, indeed.
You might be interested in the most recent post in here:
This explains a way to convert the VFD analogue output voltage into a tacho pulse whose frequency is proportional to the spindle speed.
This frequency can be easily read by one of the fan tacho inputs on a Duet, using an opto isolator to keep the VFD interface electrically isolated from the Duet.
So, if M950 allowed a spindle tacho input and scale factor to be defined the Duet could use this to display actual spindle RPM and the other things suggested above like waiting after M3/M4 for the spindle to have got up to speed.