Replies: 4 comments 3 replies
-
It kind of exists as I have experimented with this for the MSP432P401 driver. Currently only this, iMXRT1062 (Teensy 4) and STM32F4xx drivers has support for the encoder input(s) and the low-level driver code required. Adding the closed loop code (by copy/paste from the MSP432 driver) to iMXRT1062 and STM32F4xx should be fairly easy, other drivers not necessarily so as at least one free GPIO input for the encoder is required. |
Beta Was this translation helpful? Give feedback.
-
I am building the mill controller now. When I get it working I'll take a look at the MSP432P401 driver and see if my creaky coding skills are up to the task of porting to Teensy 4. Thanks for your quick response. |
Beta Was this translation helpful? Give feedback.
-
@terjeio, I started reviewing the code and I have a few questions. In MSP432P401R/driver.h there are two defines, RPM_COUNTER_PIN (line 214) and RPM_INDEX_PIN (line 223).
|
Beta Was this translation helpful? Give feedback.
-
@terjeio you previously mentioned that the encoder logic is edge triggered. For the purposes of determining pulses per revolution, does the encoder trigger on one edge or both edges? |
Beta Was this translation helpful? Give feedback.
-
I’m using the RT1062 driver for a 4 axis cnc mill. The spindle uses a 90VDC motor controlled via a 0-10vdc control signal derived (averaged) from GRBL’s PWM output. Rather than setting a PWM value for spindle speed I would like to configure GRBL with encoder pulses/rev, set a speed in RPM, and let it PID spindle PWM to get the correct speed. The controller can’t react faster than half wave US line frequency or 120Hz, so a PID update of 8ms or better would be ideal.
This is for general milling operations so it does not have to be nearly as accurate as spindle sync for threading. +/-10% of set point would be terrific.
Does this functionality exist, or is it planned?
Beta Was this translation helpful? Give feedback.
All reactions