ServoStrap: Replacing Stepper Motors with Salvaged DC Motors on a RepRap
servo-controlled reprap 3D printer
At a glance
- What is it?
- ServoStrap is a Processing sketch that turns stepper signals from a RepRap motherboard into servo control for DC motors with encoders. It targets low-cost, silent, and step-loss-free printing, but the project is early-stage and hardware-specific.
- Who is it for?
- Adopt ServoStrap if you are an experienced tinkerer who wants to experiment with DC motor retrofits on a RepRap and are comfortable with the LMD18245 or similar H-bridge. Avoid it if you expect a plug-and-play solution or a maintained codebase; the project has no recent releases and limited documentation.
- Can I use it commercially?
- Yes, with conditions. GPL-2.0 is a copyleft licence: if you distribute software that includes it, you must release that software's source code under the same licence. Running it internally without distributing it does not trigger that obligation.
- Is it still maintained?
- Probably not. The repository last received commits 138 months ago, on May 29, 2015.
- What is it written in?
- Mainly Processing, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on October 4, 2026, and from our analysis. They are not legal advice.
Star history
- danithebest91/ServoStrap99 ★ · -1
| Repository | 2026-08-18 | 2026-10-04 |
|---|---|---|
| danithebest91/ServoStrap | 100 | 99 |
-1 Stars in the last 47 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
What ServoStrap Solves and Who It Is For
The code takes stepper information from a standard 3D printer motherboard and uses it to control a servo motor. This means the motherboard still thinks it is driving steppers, but the actual motion is handled by a DC motor with an encoder. The active position tracker is the key mechanism: it continuously monitors the encoder to correct for any deviation, so if the print head is stalled, it returns to the correct position. This is a closed-loop control system, unlike the open-loop operation of a typical stepper. The README credits Josh Kopel's PID code and the MakerBot servo-controller board as the basis, which suggests the project is a merge of existing ideas rather than a from-scratch design.
Mechanism: From Stepper Pulses to Servo Motion
The core mechanism is a translation layer. A standard 3D printer motherboard sends step and direction pulses to what would normally be a stepper driver. ServoStrap intercepts these signals and converts them into commands for a DC motor. The DC motor is paired with a quadrature encoder and a timing slit strip, which provide position feedback. The PID controller, borrowed from Josh Kopel, adjusts the motor's PWM to minimize the error between the desired position (derived from the step count) and the actual position (from the encoder). This closed-loop approach is what allows for active position tracking. The README mentions that the code was written for the LMD18245 motor controller, a specific H-bridge IC, but you can adapt it to other boards by changing some values. The hardware setup requires an external quadrature encoder, timing slit strip, and DC motor, all of which can be sourced from old printers.
Getting It Running: Commands and Config
The README gives minimal setup instructions. To use the code, you must place two files, digitalWriteFast.h and Keywords.txt, into a folder inside arduino/libraries. This is a standard Arduino library installation step. The code is written in Processing, which is unusual for Arduino projects, but it likely runs on an Arduino board. You will need to configure the PID constants to match your motor and encoder. The README notes that resolution can be increased by fine-tuning these constants and using an angular encoder, whether slit disk or magnetic. The hardware connections depend on your H-bridge; the LMD18245 datasheet is referenced for the wiring. The author is drawing a schematic and PCB layout in Eagle to make an integrated board that can be added to RAMPS 1.4 or other printer motherboards, but that board is not yet available. So, expect to prototype on a breadboard.
Limitations and Failure Modes
The biggest limitation is the lack of documentation. The README is a short description with a list of improvements, but it does not explain the code structure, pin mappings, or how to tune the PID loop. This means you will need to read the source code and reverse-engineer the logic. Another limitation is the hardware dependency. The code is written for the LMD18245, and while you can change values for other boards, there is no guidance on what those values are. The project also claims that endstops are potentially not needed because the timing strip has special codes at the beginning and end, but this is not implemented or explained. A failure mode is if your motherboard does not output standard stepper signals, or if your salvaged motor lacks a quadrature encoder. The project is also not actively maintained; there are no recent releases, and the last push is unknown. This is a single-author hobby project, so you cannot expect support.
Alternative Approaches
A direct alternative is to use a closed-loop stepper driver, such as those from Trinamic or other manufacturers, which integrate an encoder with a stepper motor. These drivers accept standard step/direction inputs and use the encoder to correct for step loss, similar to ServoStrap's active tracking, but they keep the stepper motor. The difference is that closed-loop steppers retain the torque characteristics of steppers, which decrease with speed, whereas ServoStrap claims the DC motor's torque does not decrease with speed. However, closed-loop stepper drivers are commercially available, well-documented, and often come with tuning software. Another alternative is to use a different servo controller board, like the MakerBot servo-controller board that ServoStrap references. That board is designed for DC motors with encoders and might have more mature firmware. The trade-off is that ServoStrap is free and flexible, but you must build the hardware yourself.
Maintenance, Upgrades, and License
The project is licensed under GPL-2.0, which means you can use, modify, and redistribute the code, but any derivative work must also be licensed under GPL-2.0. This is important if you plan to sell a printer based on this code. There are no releases, so you will need to clone the repository from the default branch. The README lists improvements as goals, such as faster movements, less noise, and no step losses, but these are claims, not verified results. The YouTube link is provided as a test, but we cannot confirm what it shows. Maintenance is essentially up to you. The code is a merge of two other projects, so you may need to understand those original codebases to debug issues. Upgrading the code to support new hardware will require changing the PID constants and possibly the H-bridge control logic. Given the lack of recent activity, do not expect upstream fixes.
Editorial conclusion
Adopt ServoStrap if you are an experienced tinkerer who wants to experiment with DC motor retrofits on a RepRap and are comfortable with the LMD18245 or similar H-bridge. Avoid it if you expect a plug-and-play solution or a maintained codebase; the project has no recent releases and limited documentation. Before using it, verify that your printer motherboard outputs standard stepper signals and that your salvaged DC motor has a quadrature encoder and timing strip. Test the PID tuning on a single axis first, and check the GPL-2.0 license if you plan to redistribute modifications.
Frequently asked questions
What does ServoStrap do?
It takes stepper information from a standard 3D printer motherboard and uses it to control a DC motor with active position tracking, turning a reprap into a servo driven printer without changing the host firmware.
What hardware does ServoStrap need beyond the printer motherboard?
A quadrature encoder, a timing slit strip and a DC motor, all obtainable from old printers; the author took them from Canon and HP machines, a PSC1510 among them. For motor control it uses an LMD18245 H-bridge, with three orderable from Texas Instruments on a sample request.
How do I install the ServoStrap code?
Before compiling, put digitalWriteFast.h and Keywords.txt into a folder inside arduino/libraries. Both files sit at the repository root, though the README spells the keywords file with a capital K while the file itself is lowercase.
Does ServoStrap need endstops?
Potentially not. The seventh improvement in the README notes that the timing strip carries special code at its beginning and end which can be interpreted as an endstop, so the mechanism can replace them.
Can ServoStrap use a different motor controller board?
Yes. A different type of H-bridge can be chosen, and the code can be used on other boards by changing some values. The LMD18245 was the controller used, and the design intent was an integrated board that would add to RAMPS 1.4 or another printer motherboard.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/danithebest91-servostrap)Star history chart for your README
[](https://hysenlabs.com/projects/danithebest91-servostrap)