3D Printer Lead Screw Upgrade

I built my 3D printer more than a year ago and I think it’s time for an upgrade.

This upgrade was long due and delayed because of lack of time (I worked full time in the summer) and the crawling pace in which the local postage service here works, but enough excuses – let the fun begin!

This upgrade will concentrate on the Z axis movement only, and the replacement of the threaded rods with proper lead screws.

Lead Screw? But Why?

After a year of printing, it can clearly be seen that threaded rods are not meant for this kind of application. The rod itself is not straight (which is not that big of a deal because there are straight rods keeping the movement straight), it squeaks pretty loudly during movement and its threads get full of black goo that consists of dust, oil and metal shavings from the friction with the nut.

A threaded rod is meant to be tightened with a nut and not move, the whole principal of its operation is based on friction – a thing we don’t really want in a moving mechanism.
A lead screw is much more rigid, it’s very hard so it doesn’t bend, it has a very smooth surface and its shape is specifically designed for moving inside a nut.

Made from scratch

I searched for a premade model so I wouldn’t have to model everything from scratch, but with all the different variations and sub-models of the Prusa i3, I couldn’t find one that I was sure would fit without further alterations. Eventually, I decided to design them myself and share for everyone with a similar printer to mine.
I had some big plans and special designs for this project, but It would take a lot of time and I couldn’t stand the threaded rods any more, so I decided to take the current design and improve on it. After the printer is functional with the threaded rods installed, I could take my time and experiment.
This project took two days total over the weekend, including modeling, printing and installing.

To keep the nut in place, I embedded M3 knurl nuts in holes in the plastic about 0.5 mm smaller in diameter than the outside of the nuts. The nuts are inserted by heating them with a soldering iron and pushing them in. A screw helps keep the nut straight while it’s inserted.
The linear bearings are held in place by the plastic itself.

At first, I thought I could get away with replacing only the X axis mounts, but I didn’t account for the lead screw’s center that had to move to make room for the big nut. eventually (after disassembling the printer, swapping the mounts, reassembling and realizing the mistake) I remodeled the mounts, printed them again and reassembled everything.

The old top bracket only supported the straight rod, the threaded rod’s top was floating, which didn’t help with it not being straight.
I improved on the design by including support for the new lead screw, which barely needs it thanks to it’s rigidity.
Instead of letting the lead screw move inside a hole in the plastic, I included bearings that hold the lead screw securely in place while letting it rotate freely.

The bottom brackets are basically the same, I just had to move the straight rod’s hole further out to follow the center dictated by the X axis carriage and the bigger lead screw nut.

All parts were printed in blue PLA @ 0.2 mm layer height and 200 degrees C with no support and no heated bed.
All models are available for Free download on Thinginverse.


The lead screw and threaded rod have different thread counts (the amount of turns per length unit) so the steps per millimeter value for the Z axis needs to be changed in the firmware. This is easily done by simply moving the Z axis 100 mm (direction doesn’t matter), measuring the actual movement and multiplying the current steps per millimeter value by the actual movement measured divided by 100 (watch your units). Repeat this process a few times, each time gets you closer until you reach the accuracy wanted.
Note that the error will be more apparent with longer movements. If you move your axis 1 mm and measure you might not see the error. A 1% error would translate to 0.01 mm with a 1 mm movement (which is something my analog caliper can’t measure), but with a 100 mm movement it would be much clearer at 1 mm.


That’s it. All done. No more squeaking Z axis and wobbly rods. I don’t expect a real improvement in printing quality, although that would be nice, but an improvement in the printing experience.

Final Thoughts

I’ve had some comments about losing resolution with lead screws because of the lower thread count, so lets see if that’s true (spoiler – it’s not):
The threaded rod I had measured at about 1 mm per turn (if I turn it inside a nut once, it will move 1 mm through the nut) and the lead screw measures at around 7.5 mm.
This means that my lead screw is 7.5 times faster than my threaded rod. If I want them to move the same distance, I need to turn the lead screw 7.5 times less than the threaded rod.
If I had a continuously rotating motor, I could, theoretically, have the same resolution (infinite) but the motors used in my printer are stepper motors, these motors move in steps and not continuously. My motors take 200 steps to make a full turn, this is the maximum resolution we can reach (well, there’s microstepping but the idea is the same, there still is a step to be made that determines the maximum resolution and amount of error to be expected).
With 200 steps per turn and 1 mm per turn, we get 200 steps per millimeter. That’s 0.005 mm per step. That’s the smallest increment in length we can make without microstepping.
At 7.5 mm per turn we get 0.0375 mm per step. While this is a larger number, the smallest increment you would expect to make while printing is still even larger. So what does this mean?
This means that the Maximum resolution your axle can reach will go down, but because the actual maximum resolution a 3D printer can reach is even lower, this doesn’t matter.
The maximum resolution I reached with my printer is 0.1 mm layer height and I don’t print at that resolution often. Even if I try to reach 0.05 mm, the lead screw would still be enough. Moreover, my firmware has microstepping enabled so the maximum resolution is much higher (microstepping can go down to 1/32 or even 1/64 of a step) and if I really want to go crazy, I could get geared motors to reduce the ratio to 1:14, 1:30 or even slower.

3D Printed Filament Rack

20150716_212129 When I first started out with 3D printing, I had like one or two spools of filament. I would mount one on the printer’s built-in spool holder and the other would lay around somewhere. As I started experimenting with different materials and colors, I accumulated quite a few spools that would lay on top of each other, looking like a leaning tower of filament. Every time I wanted to replace filament, I had to play filament Jenga, pulling the one I wanted from the stack without making the tower collapse on top of my expensive speakers.

Before. Notice the spools onthe top right stacked on top of each other
Notice the spools onthe top right stacked on top of each other

It looked bad, it was dangerous and uncomfortable, it was time for change. The first thing that came to my mind was “Someone must have had this problem before me. There’s probably a model ready for download on Thingiverse”, but all I found were single spool holders or more complex racks with spools mounted on bearings or on the wall. I wanted something simple, so I made one myself.

After. All the spools are nicely
All the spools are nicely racked and the needed one is fed to the printer directly

I had a spare metal broomstick laying around that was perfect for the job. It’s light but strong enough to carry the weight and it’s cheap enough so I wouldn’t care re-purposing it. I designed the model in SketchUp, I wanted to make it quick and keep it simple so I didn’t need any super-advanced tools. The model is just a clamp on triangular legs. The clamp attaches to the broomstick, obviously, and the triangular legs prevent the whole thing from tipping over. I added some braces inside the legs to provide structural integrity. I wanted both sides to be identical so I could just model one side and print it twice (instead of having to model a different piece for each side).

There are some guidelines and limitations that I had to follow in order to make this function as I want: The diameter of the broomstick is ~21.5mm. In order for the clamp to work, it had to be slightly smaller that value in it’s closed position and slightly larger when it’s open. The clamp needs to be high enough for the spools to clear the bottom, taking into consideration that the top of the spool’s hole sits on top of the broomstick rather than them being coaxial (I might add an attachment to the spools to make them coaxial and maybe reduce friction) The base needs to be wide enough for the rack to be stable and not tip over by the force of the extruder and external accidental forces. I’m not too concerned about friction and the force applied bu the extruder’s pull because the broomstick I chose is laminated and the spools slide on it very easily. The gap of the clamp needs to be big enough to work but not too bit or the plastic might break or its layers separate. The clamp levers need to be long enough to accommodate the screw head and nut and thick enough so they don’t break under pressure.

Print settings: Material: red PLA
Temperature: 190 deg C
Layer height: 0.3 mm
Infill: 10%
Print Time: ~80 mins per side
Slicing and interfacing program: Simplify3D
Printer type: Prusa i3

The model is available on Thingiverse along with the original file so people could make changes if they want.

BrainiHack 2015 – Blue GSD with Brain Controlled Labyrinth Game

This weekend (13-14.3) two of my friends (Gal Weinstock and Maxim Altshul) and I participated in the BrainiHack 2015 event hosted at the AutoDesk offices in Israel.
BrainiHack is a neuroscience themed Hack-A-Thon, where makers come to compete in a day-and-a-half long neuroscience-related project building marathon.

My group is called Blue GSD, we are two Communication Systems Engineering students and a Computer Science student. we came with absolutely no background in Neuroscience and tried to make something awesome. We brought an arsenal of tools, electronic components and a home-built 3D Printer.
We ended up winning the special OpenBCI prize for the best project in the open source category. The prize was an OpenBCI Starter Kit valued at 500USD.

Our project is a Labyrinth game controlled via brain waves (EEG). We are using OpenBCI, an arduino based open source bio-sensing microcontroller, It’s brilliant and with some initial assistance from Conor, one of the founders of OpenBCI, it’s really easy to work with.

The Labyrinth
The game itself was entirely 3D printed, it’s movement is provided via two micro servo motors controlled with an Arduino Uno.
The mechanism consists of three nested frames that are anchored in different places to achieve two degrees of freedom – roll and pitch.
We had no time for strong glue and I didn’t want to make any permanent connections (I’m designing on the fly so a lot can go wrong, and some did) so my design had to be zip tie friendly, the motors and motor arms are all attached with zip ties to the frames. The hinges are M3x16 screws and nuts with some washers to keep the frames in place relative to each other and press them onto the motor.
In the end we noticed we didn’t have enough clearance under the device for the frames to move all the way and we had no time to print another outer frame, so we had to make lifters for the legs which actually worked out perfectly.
Models for all 3D printed parts can be downloaded free at Thingiverse.com

As mentioned before, OpenBCI is an open source EEG device (and more, but that’s not relevant right now, I might explore more of it’s capabilities in the future) which was handed out to whoever wanted to use it.
With OpenBCI we could attach electrodes wherever we wanted (as opposed to some of the other fixed position alternatives), that way we could experiment with different methods and brain waves and choose the ones that work for us.
Conor from OpenBCI was kind enough to give us a little guidance and showed us another project done with OpenBCI, a five-person controlled shark balloon by chip, from which we learnt a lot about the system.
In addition to all of its advantages, it’s Wireless! It includes an RFduino that transmits the data to a dedicated USB dongle that plugs into the computer.

Brain Waves
We wanted to explore more than one type of brain waves. The shark balloon project was based purely on Alpha waves, a 7.5-12.5Hz wave our brain produces in the Occipital Lobe when we close our eyes and relax, that’s neat but we wanted more. Alpha waves are very easy to detect but there’s only one type of Alpha wave per person, this means that in order to control 2 axis we would need 4 people or 2 if we use direction toggling (more on that next).
After some research we found out about SSVEP (Steady State Visually Evoked Potential), a phenomenon where the brain produces a frequency (and/or harmonies of a frequency) that matches the frequency that excites the retina. This means that if we look at a light that blinks at a constant frequency, the brain will produce the same frequency. After some experimentation, we found that the range 5Hz-20Hz was easiest to detect and that 16Hz was far enough from the Alpha waves so they don’t get mixed up.
By combining Alpha and SSVEP we have 2 types of waves we can control and anticipate, which gives us the ability to control the game with just one person.

Controlling the Game
The problem with this technology is that it’s very slow, it’s not real-time by any standard. It may take a few seconds for the wave to generate and be detected while the Labyrinth game requires finesse and delicate movements to balance the ball, this is impossible with 2 or 3 second delay between reaction and actual movement of the platform.
To overcome this challenge we decided to simplify the game, instead of continuous control of the position of the platform, each axis would only be fully tilted to one side or the other, for this to work we created a super-simple maze layout, no holes, no balancing, just walls with straight angles.
As mentioned, we wanted to control the whole thing with one person and we had two different signals we could extract. Left-right position toggle was controlled via Alpha wave and up-down position toggle was controlled via SSVEP.


Data Analysis and Translation
OpenBCI provides a neat GUI that allows you to visually see the data and analyse it more easily. The interface provides time-domain and frequency-domain (FFT) graphs as well as a map of the head with electrode activity.
Once the data is captured with OpenBCI, it is transferred to the computer for analysis, the computer runs a Processing program that computes the Fourier Transform of the signal over a defined interval of time, filters the spectrum to look at relevant frequencies and finds the most powerful frequency in the range. If the peaked frequency is the one we are looking for, a command is sent to an Arduino board via serial port. The Arduino then controls the servos according to the command received.
In our project, we were looking for peaks at around 10Hz (Alpha) and 16Hz (SSVEP) and had to ignore the very high peak at 50Hz that is caused by the AC power frequency here in Israel.

Screenshot from 2015-03-13 13_27_35

The code running on the computer is a modified version of the shark baloon’s code. Since they already figured out the Alpha wave capturing and translation, we had to modify it for one person (they used 5) and add the SSVEP frequency capturing. The shark balloon code was taken and modified from another project (which modified the original code from OpenBCI) so it’s already a little messy and we probably made it messier (with a day and a half to get the whole thing to work we had no time to waste on making it pretty).
The code running on the Arduino is fairly simple, just a loop polling input and controlling the servos. We made the servo movement slow and continuous so that the ball doesn’t jump around.
The code will be uploaded to GitHub in a few days.

Special thanks to Conor over at OpenBCI for helping us and introducing us to the technology.

3D Printed Headphone Pad Adapter

I own two pairs of over-ear closed headphones, Audio-Technica M50 and SHURE SRH-440, they are both great.
The SRH-440’s are really comfortable, especially after changing the the pads to the SRH-840’s pads, but they are a little heavy and the pads are a little too shallow for my ears (my ears touch the inner plastic and it hurts after a while, a problem a lot of people seem to have). the shallowness of the pads is easily fixed with some bungee cord cut to length and shoved underneath the pads all around to give it a little more height.
The ATH-M50’s sound a little better, but their pads are a little small for me and not very soft. They are lighter than the SRH-440 so I can wear them for longer periods of time without feeling the band on top of my head, but the pads start to be uncomfortable after a while.

I decided to mount the 440’s pads onto the M50s, that way I could enjoy superior sound quality and prolonged comfort.
Luckily, the 440’s cups are a little larger than the M50’s, making the 440’s pads fit loosely on the M50’s. This was a big improvement, but the pads are a little too big, they slide all over the place and they could easily be knocked off the cups.
If only there was a way to make an adapter to make them fit… wait, I have a 3d printer!


The 440’s cups are elliptical while the M50’s are shaped like two distant halves of a circle with the tangents connecting them on the top and bottom.
After some quick measuring, sketching, and modeling I came up with a 3d model ready to be printed.
A few iterations later, we have the right scale and everything fits!
Now I can really enjoy my headphones.

This can be easily implemented for virtually any model of headphones (providing that the cups of the headphone that donated the pads are larger than those of the headphones on which they will be mounted)

OctoPi – Remote Control 3D Printing

Leaving a 3D printer unattended is not very smart, especially a homemade one. If you’re lucky, you’ll only mess up a print and waste some plastic. If you’re less lucky, you can cause some damage to the printer or worse, burn down your house!

This is where OctoPrint comes in. OctoPrint is a free 3D printer web interface. It includes a password protected interface with live video stream, time-lapse capturing, G-Code viewer, Terminal interface, Temperature graphs, motor and temperature control buttons, and more.
This means you can SEE what is going on in real-time and stop the printing or send some code to the printer if necessary. This is a huge convenience, I no longer have to go and check that everything is OK, I can do it from my phone.
Moreover, I can slice on any computer and send the G-Code from anywhere in the world. If I don’t have a computer with slicing software, I can even link OctoPrint to a local installation of CURA and slice remotely! now that’s amazing.

I work with two computers, a desktop and a laptop. Although OctoPrint gives me the freedom to send and monitor prints from any computer, I didn’t like the idea that my printer has to be permanently connected to one of them. I wanted the printer to be independent, autonomous. I didn’t want to have to leave my computer on or not be able to reset it is something else needed it.
A dedicated computer is a massive overkill, It takes up a lot of space and it costs too much for what it does, I was looking for a more mobile solution so that I could move the printer and still have all features available. I wanted the printer to be an all-in-one solution.
After a short search I found OctoPi, A Raspberry Pi image with OctoPrint and everything built-in, maintained by Guy Sheffer. This means I can mount a RPi on the printer and have the interface and all of its features and settings no matter where the printer is set or on which computer I’m currently working.

OctoPi also provides a GUI for a touch screen to be mounted on the printer, I have no need for this right now, but maybe I’ll add one in the future.

Raspberry Pi mounted on the printer. Excuse the cabling - i'm still working on that.
Raspberry Pi mounted on the printer. Excuse the cabling – i’m still working on that.

If you’ll notice, the USB cable is made of two cables, there are two reasons for this. One, the Arduino’s USB port is facing downwards and a straight jack would be pressed against the desk and apply force on the Arduino – not good. I used some scrap L shaped USB-B cable I had from an old scanner to prevent this. And two, the RPi and the Arduino are powered via two different power sources and both regulate the voltage seperately. This means that their operating voltages aren’t 100% identical. If I connect the RPi to the Arduino via regular USB cable, the RPi would supply its regulated 5V to the Arduino, making the Arduino receive power from two different sources – also not good. For this reason I cut the 5V line of the USB cable, thus connecting the + and – data lines and sharing ground (important!) without supplying power.
I didn’t cut the cable to length because I’m not completely sure this is the final position of all components. there are more to be mounted.

Working with a RPi meant i can use the GPIOs to make the printer smarter and add features I need (see the relay in the picture? more on that in a future post)

Playing With Glass

The build surface of a 3D printer is critical for producing good prints. There are a few things that can go bad during a print or may prevent one from even starting printing.

The main issue is adhesion. You haven’t felt frustration until a 20 hour print gets loose at the last few layers. Other important issues are flatness and warping which might not be as important for some people with certain types of prints, but can also affect adhesion and are very important to me.
There are many techniques to get the job done, I haven’t tried all of them but through trial and error i found the method that works for me.
At first, I tried to print directly on top of the hot-bed. That’s not a good idea, not only is the hot-bed flexible and not flat, it can easily be damaged by the hot-end or a print that’s stuck too well. Applying masking tape, painter’s tape (basically the same thing) or Kapton tape (thick nylon-like tape that can withstand extreme temperatures) can protect the bed from the hot end or stuck prints and some say help with adhesion, but I saw no improvement and it does not help with the hot-bed’s flexibility.
Some use commercial products like BuildTak, but I haven’t tried it yet.
Aluminium seems like a rather popular option, but it has a few drawbacks. While having good thermal conductivity, aluminium tends to warp in high temperatures. It’s relatively soft so it gets easily scratched and damaged if not handled with care. I think a better option would be copper, which has similar mechanical properties but better thermal conductivity. (to date, I haven’t seen anyone use copper)
I guess THE best surface would be made of diamond, it has the best combination of thermal conductivity and strength, but that would be a little over budget..
It was obvious to me that glass is the way to go. It’s hard, flat, can withstand a little beating if a print is stuck and it’s cheap. I actually got mine free.


I tried a few types of glass sheets, 3mm, 4mm and 6mm thick, smooth and sandblasted.
Thickness was very important because i’m using a heated bed. The 6mm and 4mm needed a lot of time and energy to warm up to the temperature i wanted, the 3mm still serves me and it’s doing a fine job.
I thought about going 2mm but that’s harder to find and i’m afraid it might be too fragile.
The 6mm glass was actually a shelf from my bathroom. It wasn’t the right size and it was a hassle fixing it to the bed.
The 4mm had a sandblasted side and a smooth side. I thought the sandblasted side would help with adhesion but i saw no difference. I got if from a glazier who cut it form a scrap piece and gave it to me free.
The 3mm was taken from a broken all-in-one printer’s scanner bed. I cut it to shape myself with a glass cutter and to maximize the printing area, I cut the corners to make room for the bolt heads and washers holding the bed.

20141122_152118Sometimes a flat and hard surface isn’t enough to make the print stick, sometimes it needs a little help.
For ABS there’s a neat trick, I use ABS Juice, that’s ABS dissolved in acetone. Once applied, the acetone evaporates and leaves a thin layer of ABS on the bed for the print to stick to.
For PLA, I use UHU stic glue (like the one in the top photo). A thin layer is enough for a number of prints and it’s removed easily with hot water.
As mentioned above, some use different tapes on top of the surface, but they didn’t really work for me.

Building The 3D Printer

Well, I didn’t document the whole building process because there are A LOT of guides and documentations out there. Plus, it would have slowed me down considerably.
This is written after the fact, obviously.

This project is not completely finished and it might never be. I see it as an evolving project, I constantly add features and change stuff.

Most of the parts were ordered off eBay.
The frame is Dibond Aluminum. That’s plastic with aluminum layers on both sides, it’s supposed to be light and strong – it is.
All plastic parts are 3D printed and came with the frame (the whole idea of the RepRap project is self-replicating 3D printers, well not fully, just the plastic parts – the goal is to get a better printed to non-printed parts ratio)
The hot end is an E3D v6 all aluminum hot end.
The motors are Nema 17 stepper motors, they are a little less powerful that the “standard” 0.4Nm ones, but they work perfectly fine.
The controller is an Arduino Mega 2560 paired with a RAMPS 1.4 driver board.
I’m using a standard 500W computer ATX power supply.

The initial build took about about 3 days. It took place during the last summer at my house with a few of my friends who wanted to help and see the wander.
The build itself wasn’t special, just a marathon of wrenching, drilling, measuring, soldering and calibrating. Oh, and pizza. lots of pizza.

I think the most exciting moment was seeing the code and motors work together. It’s not something I haven’t done before, nor was it an advanced part of the build, but seeing the pile of metal and plastic turn into something that follows commands other that the trivial “stay” was just beautiful and a sign that the hardware is fine and we are on the right track.

After 2 and a half days we had a kind-of-working 3D printer. a diamond in the rough, one might say.
It extruded plastic and moved in the right direction, but it needed calibration and lots of it.

On the evening of the 3rd day I did some work alone and kept having the same problem – I could print fine at first, but after letting the printer rest it would not extrude more plastic, every time I had to disassemble the hot end and drill out the stuck plastic.
It’s too long of a story for this post (maybe I’ll post another one with the fully detailed comedy) but I’ll give you the recap of what I learnt – Computer thermal compound is not intended for these temperatures and if your hot end came with a little fan – use it.
I ended up breaking my hot end in so many places I had to buy a new one.

The new hot end took a little time to arrive and when it did, the semester had already begun and this one was brutal, papers and assignments every week in every course. I never thought I’d wish for midterms to come sooner, Argh..
I could only invest a few hours a week for fiddling with the printer but slowly and surely, it’s up and running.