3D Printed Servo Linear Actuator

A low cost yet rigid & precise robot module

Public Chat
Similar projects worth following
A linear actuator designed for replication, modularity, and to provide maximum performance given its low cost. This is an enabling robotic module that fills a gap in currently available open source hardware.
This rack & pinion type actuator uses a standard mounting pattern, and is completely 3D printed minus the servo & screws. Printed parts are designed to accommodate 3D printing variance.
Output = 80mm controlled linear motion, ~0.5kg max force.
License = Creative Commons-Attribution

Video Link:


 This project started when I was inspired by a 3d printed plotter bot design by MakerBlock. He and others developed arduino code that allowed a robot to read g-code and plot with a marker using hobby servos. (Something typically done with stepper motors.) Great idea and perfect for making a low cost simple robot with lots of functionality. 

 My intent was to leverage his code and create my own set of robot hardware to draw on coffee mugs. The original vision was to create an educational toy like the famous Egg-bot, but one with even lower barriers to copy. 

Why a Rack & Pinion Actuator?

I choose a rack & pinion type actuator to keep the vitamins low and the movement speed fast. (As opposed to a slow leadscrew or pulley driven actuator with belts & bearings).  Well for those reasons and the fact that hobby servos only have 180 degs of usable motion severely limits your options. 

I had to do some math up front to size the gear to get the 80mm of motion I needed to draw on an entire 13 oz coffee mug. The effective diameter is the only variable that affects motion, tooth size did not, so I picked a large (easily printable) tooth size that maintained contact ratio around 2. The tooth mesh benefits from some of the assembly compliance to keep it tight enough to prevent backlash, but squishy to prevent sticking points.

 Keeping it Tight: 

  For a drawing robot to be worth anything it needs to be rigid so you can draw straight lines. The challenge of designing a tight moving assembly without bearings is that to reduce slop you end up making it harder to drive, and hobby servos don't have much torque to waste. 

 Indeed, my research for an existing rack & pinion to start from yielded lots of wiggly/loose gear rack assemblies that are purpose built. Most of the machines I saw were hacked together, designed by folks gifted with software skills much greater than their mechanical design skills. I consider those projects to be fantastic works of art, rather than repeatable mechanically sound works of engineering. There is a limit to how much slop you can tune out of a machine. 

 So I had to design these models from scratch and during the iteration process I found it necessary to include some special compliance/adjustability features to facilitate reliably smooth motion. For those interested I wrote an article on my personal blog to share some of the design for assembly tips I used,  "Design for Assembly Tips- Building a Better 3D Printed Linear Actuator". 

 To aid in that effort I included pockets/reservoirs along the moving surfaces to hold grease to further facilitate smooth wiggle free motion.


During the design phase I realized that I could greatly enhance the usefulness of the linear actuator by giving it a standard hole mounting pattern to make it modular. The result allowed me to rearrange the robot components to reuse proven designs and to create even more awesome stuff! 

At this point this actuator is a key component of two robots. See images for the prototype Mug-O-Matic & Post-It-Plotter!  

Additionally, the 4x screw hole pattern I've selected allows for easy reconfiguration of the parts at 90 deg angles. I have also designed some compatible accessories including a gripper (because fun!), a fishing line pulley (designpending), a lazer light pan-tilt frame, and some other fun bits. 

For all of these projects I drive the robots with an arduino nano, expansion board, & 9v battery or wall-wart. Yes it is brutal on the 9V, but it so compact & easy to use that I don't care ;).  This setup is great for a classroom environment because it doesn't require messy soldering or complicated bread boarding. 

The servos are also great because...

Read more »

Optional accessories for this module that have the same mounting pattern: Includes assembly tool, arduino case, 90 deg bracket, a flexible bracket, an ultrasonic holder, a pen holder, a gripper, an actuator handle, and a pan-tilt servo mount

x-zip-compressed - 1.05 MB - 06/02/2018 at 06:56



a STEP file of the assembly for those wishing to modify the CAD model

stp - 7.15 MB - 06/02/2018 at 06:54



1x gear per assy. NOTE: This gear & the other are the same except for the type of servo horn that fits inside, only one gear is necessary. Print 3 perimeters all sides, 10%infill, Print with largest flat face touching buildplate, 0.25mm thick layers max.

Standard Tesselated Geometry - 3.33 MB - 05/26/2018 at 09:21



1x gear per assy. NOTE: This gear & the other are the same except for the type of servo horn that fits inside, only one gear is necessary. Print 3 perimeters all sides, 10%infill, Print with largest flat face touching buildplate, 0.25mm thick layers max.

Standard Tesselated Geometry - 3.24 MB - 05/26/2018 at 09:21



1x per assy. Print 3 perimeters all sides, 10%infill, Print with largest flat face touching buildplate, 0.25mm thick layers max

Standard Tesselated Geometry - 1.30 MB - 05/06/2018 at 21:53


View all 10 files

View all 7 components

  • Video Update #2: Measuring & improving the output precision.

    Michael Graham06/11/2018 at 06:53 0 comments

    While controlling the linear actuator can be done without hacking, I've found that doing so has its limitations. 

    Specifically with my setup the arduino nano has voltage and current limits that prevent the servos from reaching their full potential. Especially when I'm controlling 3 servos simultaneously in a stressful application!  This problem manifests in a locked up actuator when trying to make small movements, because the actuator cannot overcome the static friction with a proportioned control designed to only move a small distance.

     So I did some experimenting to find a way to power my servos directly from two 18650 batteries while isolating that 7V from getting to my computer's usb port. 

     In the end the hack was simple, which is the way I like it! This successful experiment will enable my drawing robots to operate with move torque and a greater degree of precision in small movements! 

    One step closer, yay!

  • Uploaded Accessories & STEP files

    Michael Graham06/02/2018 at 07:25 0 comments

    Continuing from last weeks log I have thought about how to best share the 3d models for this work. 

     I think since there are many applications of these modular components, each with their own instructions, that they are best shared as their own separate projects on HackaDay. (See end of this post for more new application pics!)

    Along that same line of thinking I believe that the small sub assemblies should each have their own project identity as well. This will make following & reproducing the body of work the easiest.

     But for now my time is limited so I simply uploaded a compressed folder containing some of the accessories that go with the linear actuator module, as well as a STEP file (universally importable 3d model) of the actuator assembly itself.

    Seen below top left are special mounts that clip onto an arduino nano without the need or screws and they hold bluetooth & sd card modules.  going CCw is a gripper, an ultrasonic sensor mount, a flexible joint, a hard 90 deg joint, and an assembly tool for pressing the servo horn on.

    I'll leave off with a neat picture of a laser turret I just finished up. It does not contain the linear actuator, but the components of this turret are compatible with the actuator mounting pattern so all the pieces could be used together to make something else! 

    The hinged joints in the turret shown below are also designed to be robust, rigid, and easy to 3D print like the actuator. 

  • Models complete! Testing in progress, Challenges encountered.

    Michael Graham05/22/2018 at 02:22 0 comments

    I am finally confident enough in my hardware to release all of the 3D models associated with this body of work! Every single model has been printed and tested to my liking. 

     However, I am dealing with 3 challenges at the moment.

    1.  Sharing too much makes the work hard to follow. I need to figure out a way to share these models without making it confusing as to which part goes where in which application...

    You see, sometimes (ok frequently) I get creatively carried away and at this point there are 39 different parts in this set! (And the arduino cases are compatible with the SimpleSumo robot set to boot). 

    The site does not allow you to sort your uploads into folders so I will have to upload everything into one long flat list and that will be hard to follow.  Hard to follow = hard to replicate = failure of a primary project goal...

    For now my plan is to be very careful with my naming conventions, and to provide separate build lists for the assemblies, & screenshots with callouts to identify which part goes where. 

    2. My drive system is underpowered. Through research & testing I realized that the arduino nano & breakout board that I love so much are actually limiting factors in the functionality of the drawing robot applications. 

     As it turns out, the breakout board does not have its own 5V voltage regulator and instead relies on the nano's built-in regulator to power all the 5V rails. I believe it is 1 amp maximum divided among the 3 servos and the nano itself. 

     The result is that the post-it-plotter application has a hard time completing small movements without stalling.  The mug-o-matic coffee cup application works OK though because it doesn't require as much torque to operate. Clearly, I am operating at the edge of the capabilities of my equipment.

     Ive tried to get cute & write the code to shut off the Z axis servo when it is not in use. This has helped to a limited extent. I can do that because these drawing robots are 2.5 axis CNC's in practice because the pen axis is only used in one of two extreme positions. Draw or no draw.

    Indeed, when I plug the servos into a stand alone servo driver with two 18650 batteries as I did in my demo video, they are exploding with torque.  

     One way I can get around this issue is to program the robot to draw via dot matrix. That is, drawing by making lots of dots instead of dragging the pen to make lines (which requires more torque.)

    3. Coding is hard. While I am strong at mechanical design & documentation, my coding skills are comparatively soft and flabby. Making the robot do the cool things it will physically be capable of is a challenge. 

      For now the robot can draw simple shapes via a mathematical algorithm written on the arduino. Fairly simple stuff. But my vision for the project includes drawing the EngineerDog logo on the side of my coffee mug which will require a more complicated solution.

     To draw via dot matrix I can convert images to a 2D array of 0s & 1s via a free website here;   However, getting the arduino to read that data is the issue. I can literally paste the array directly into the arduino code but I'd have to manually add text delimiters to make it work so thats a no go.

      To read the dot matrix or G-code I could send the data over serial using "Processing" or an SD card, but it is easier said than done. For that capability I will have to lean heavily on the code written by MakerBlock, whose work inspired this project.

     Im thinking the easiest cool thing I can accomplish within the time frame of this contest may be the addition of bluetooth control. Adding a common HC-05 bluetooth module is easy and I can use a nifty freemium program called Robo-Remo to drive from my phone.

     More time/sweat is...

    Read more »

  • Details of actuator module conveyed

    Michael Graham05/08/2018 at 05:13 0 comments

    Video Posted. Project Instructions & details updated. 3D Printing files are up!

  • State of the project, Work in Progress

    Michael Graham05/06/2018 at 06:20 0 comments

    May 5 2018:  Hardware designs mostly complete but I always find tiny things to update & always getting new ideas for modules to attach. The devil is in the details.

    Primary work remaining = writing & testing code for the intended applications of this module. That is, two different drawing robots that actually use the same code to draw on two different mediums.  I need to decide where to focus my time developing: Dot matrix drawing, gcode drawing, or bluetooth manual control.  Eventually I want to do them all :) 

    Still working on support documentation which is key for a project to be fully replicable. In any case, most of my work as of late has been created with an educational focus (see 'SimpleSumo Robots'), so excellent documentation is a major boon for teachers looking to integrate my work into their curriculum.  I love the thought that the things I create will be used to inspire & teach the next generation of scientists!

    Names & exact details of future robots are fun & will be revealed in the near future when a video of a fully functioning application is available.  :)

     Eventually I'd like to package the two applications into kits and sell them on my site but managing the business side of things is a project all of its own. There are only so many hours in the day, plus my strength is mechanical engineering so everything thats not that takes extra time. 

View all 5 project logs

  • 1
    Attach servo to gearbox_Lid

    **Note that the video in the details section has a timelapse of this process.**

    Use the screws that come with the servo to attach it to the top of the gearbox

  • 2
    Attach gear to servo & Clock

    Position servo @ center. 

    Use tool to press servo horn into gear. Then attach to servo assembly with the horn pointing upward to help you keep track of the position. 

    CLOCKING PROCESS: Rotate gear all the way to one side, say ClockWise then rotate CCW by 1 tooth spacing. (This enables the servo actually reach the end position. The servo actually has a little more than 180 degrees of physical rotation but only 180 degress of it are usable by the program. To keep from having a dead space at the end of your rack motion, we back off the max servo end position when we are at the max rack end position.) 

  • 3
    Apply Grease

    Apply grease to gearbox_Base @ 4 grease pockets & inner ID. Just a dab helps extract all the torque from your servo motor. (You can grease the teeth too if you want) 

View all 5 instructions

Enjoy this project?



Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates