Open aamott opened 2 years ago
Don't we need to measure the motor speed for implementing PID control?
Yes, PID motor control will need that implemented. Once we have that, we can copy the heater code since it uses the same system - measure speed and change the pwm.
Is your feature request related to a problem? Please describe.
PWM-driven puller motors can change speed while pulling due to voltage changes or load changes, like if the filament sticks. PID control of the speed could solve that issue.
Describe the solution you'd like
By configuring the motor to use steps per second (like with the stepper motor, but detecting "steps" with the encoder) and changing PWM the same as the temperature is controlled with PWM, a speed controlled motor should be easy to get working. The code should be easy to adapt from the temperature control - 1 input (target speed instead of target temp) and 1 output (pwm output on the motor pin)
This feature may be better implemented after PWM autotune, but the autotunes may also be different. A motor is going to react considerably faster.