Hacking an old printer with optical encoder to create my own drive and closed loop PID controller. Using an ATXmega with built in quadrature decoder and a DRV8801 DC motor driver and PWM output. The output on the OLED is the current location. The software commands it to go to 100 and wait, then 2000, then 5000. It can be seen that the position has no error. Later modifications will be adaptive PID for faster movement independent of the load and a deceleration profile for smooth stopping.
3 окт 2024