Hello all,
Came here after reading the Blog by Brett to improve Beginner's PID library. I am currently working on a problem, where I want to control the speed of a 12v dc motor using high frequency PWM. I am able to control the motor speed using potentiometers to change duty cycle of PWM by esp32.
Now, I want to make a close loop control of the motor speed using PID to control duty cycle of PWM and therefore the speed of the motor. For the starters I now the relation between PWM duty cycle and motor speed which is linear by the way. So, I know the desired values of the PWM corresponding to the desired speed.
Any suggestion on how can I proceed from here to control PWM using PID?
Thanks in advance!