I'm working on a similar project - I'm working on using a Adafruit Trinket Pro (ATmega323) for my ink sprayer control for my powder bed - Y axis is a DC motor + encoder (600 DPI) with a InkShield.
The DC motor is velocity, not position, controlled which makes it simpler to manage - I just bump up the PWM if going too slow, bump down if going too fast.
For accurate fast positioning, you will need to do inertial calibration - given velocity X of the printhead, how much force Y do you need to apply to get the head to stop.
This part (positioning) is not well suited for PID control, however. You don't want to bounce back and forth, you just want to accept a (small) amount of overshoot and apply that as an error factor into your next movement.
You will need to know the mass of the printhead, it's velocities, and how PWM relates to velocity.
The last part (PWM to velocity) *is* a good place for PID control.
i'll be following this topic if you wish to discuss more.
The DC motor is velocity, not position, controlled which makes it simpler to manage - I just bump up the PWM if going too slow, bump down if going too fast.
For accurate fast positioning, you will need to do inertial calibration - given velocity X of the printhead, how much force Y do you need to apply to get the head to stop.
This part (positioning) is not well suited for PID control, however. You don't want to bounce back and forth, you just want to accept a (small) amount of overshoot and apply that as an error factor into your next movement.
You will need to know the mass of the printhead, it's velocities, and how PWM relates to velocity.
The last part (PWM to velocity) *is* a good place for PID control.
i'll be following this topic if you wish to discuss more.