He made the code and bracket designs available. Thnx misan!
|DC servo motor powering y axis of Prusa I3|
You can find all the files and code here:
Here are the files for y-axis DC motor drive:
Here is video of stepper motor and servo running together:
Here is a video of DC servo motor powering the x-axis:
Here is a video of DC servo motors powering the x- and y-axis:
This program uses an Arduino for a closed-loop control of a DC-motor.
- Motor motion is detected by a quadrature encoder.
- Two inputs named STEP and DIR allow changing the target position.
- Serial port prints current position and target position every second.
- Serial input can be used to feed a new location for the servo (no CR LF).
- Digital inputs 2 & 8 are connected to the two encoder signals (AB).
- Digital input 3 is the STEP input.
- Analog input 0 is the DIR input.
- Digital outputs 5 & 6 control the PWM outputs for the motor (I am using half L298 here).
- Please note PID gains kp, ki, kd need to be tuned to each different setup.