Day Twenty-Three: Optical encoders for the Drawing Bot
For day 23, I added optical encoders to the drawing bot that was built on day 19. I also modified the program so that it uses the Servo library, which I only recently became aware of. The encoders work like a charm- they are hooked up to the interrupt input on the Arduino, and that part works fine. The problem, however, becomes that the continuous-rotation servo motors cannot be stopped fast enough, so they end up overshooting their destinations. I tried to get around this by cutting power to the servo motors when the device reaches position, however there still appears to be a good amount of mechanical energy in the system, so no dice. I’m giving up on the servos, and will switch to stepper motors for the next version. The code, which demonstrates how to use interrupts, is available here. The test patterns were not so interesting so I didn’t take any pictures ![]()
Last 5 posts by cibomahto
- Day Twenty-Nine: Photos, Thanks! - March 1st, 2008
- Day Twenty-Eight: Photo Wall - February 28th, 2008
- Day Twenty-Seven: Remote Trigger for Powershot S3 - February 28th, 2008
- Day Twenty-Six: Automatic Marshmallow Gun - February 27th, 2008
- Day Twenty-Five: Automatic Marshmallow Gun - February 26th, 2008