Comment by raxxor
4 days ago
If you want precise movement, I always recommend an external encoder, even if the motor itself already has one. You probably use some form of transmission and there is always some transmission tolerance.
Also a good engineering rule is to have your stepper provide double the maximum torque than you need by specification, especially if you use partial steps.
Common dc motors don't need as much tolerance, but it doesn't hurt anyway.
Also, you still need to debounce signals from optical encoders because of the inteference you mentioned, even if your physicist tells you that optical encoders cannot bounce.
To read encoders try to use timer interrupts instead of pin change interrupts. A bit unintuitive for software developers, but polling is safer because you have specified maximal speed and your µC program isn't disabled from magnetic interference as well. There are specialized µC for quadrature encoders, but you usually do not need them if you don't have high speed applications.
No comments yet
Contribute on Hacker News ↗