![]() ![]() I'm not saying PID is difficult when you have Arduino libraries. Let's start with the easy stuff: wiring and encoder testing. The motor with optical encoder wired to Arduino Wiring The proper approach requires a PID (proportional-integral-derivative) control algorithm which adjusts motor speed using PWM. Due to inertia, it continues to move a bit, even with the motor electrically shorted. Suddenly stopping the motor will not result in a sudden stop of the sliding block. I just can't turn on motor until the reading of encoder equals the desired position. The software is not as simple as you may think. I had to drive the motor with a L298N H-bridge module and for the encoder I built a PCB which replaced the original one used in printer. Original printer electronics such as motor drivers were of no use (proprietary ICs without public datasheets). As I found out, the printer used a common DC motor to move the cartridges on X axis, however with the addition of an optical encoder with strip, the cartridges could perform precise movements. In the previous post I gathered information about a cartridge slide unit taken from an old inkjet printer. How to move a sliding cartridge unit from an inkjet printer using a PID controlled DC motor with optical encoder feedback ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |