3D Printing: Upgrading Firmware & Printer Driver (For Ultimaker & More)

Out of the box, the Ultimaker shipped with a stable, but relatively ancient, version of the firmware. This, combined with the stable, but relatively ancient, version of ReplicatorG available from the Ultimaker site was sure to produce useful prints with a relatively minimal of fuss, but nothing that remotely approaches either the blazing speed or amazing quality possible from this printer.

To achieve that requires some significant upgrades to the software stack. And, in some cases, it requires outright replacing some of the pieces entirely.

While this writeup is specific to the Ultimaker, there is a lot of general knowledge in here, and the various bits of software are largely universal to a number of printers. When my Printrbot shows up, I’ll write a revised version specific to that printer while generalizing this a bit.

Note that this is all moving very quickly. When I first wrote this, it required about 3x more steps and was considerably more fragile. It is improving rapidly! However, there is still a long way to go before any of this is easy.

Note: At the time of writing, you need to perform both of these upgrades simultaneously. ReplicatorG really does’ want to talk to the new firmware (of course, by the time I write this, it’ll likely be fixed).

Firmware Upgrade

First, refer to the Ultimaker Marlin firmware page. I’ll try to keep this up to date, but there will be windows of lag, I’m sure. As of 2/12/2012, this was “state of the art”.

The Marlin firmware offers vastly improved print quality and print speed. As well, it has much better I/O and, thus, allows for higher speed host communications and better interactive control during a print job.

To obtain the latest [not entirely bleeding edge] Marlin build, you can use Daid’s Marlin Build Tool. Scary config page, but the defaults are relatively universally applicable to recent Ultimakers and the little (?)s provide lots of information (I’m using the default settings).

Once you build firmware, you’ll end up with an Arduino .hex firmware image. Not very useful in that pretty much none of the GUIs on the Mac (at this time) can upload it to your printer! ReplicatorG might be able to, but you’d have to edit a bunch of XML. NetFabb can’t currently talk to the printer. Finally, Pronterface doesn’t have a firmware uploader (feature coming soon).

Fortunately, there is avrdude. Even more fortunately, there is a copy of avrdude included in ReplicatorG. (Newer versions of ReplicatorG no longer include avrdude and there is no reason to stick with the old version, given how easy it is to “go direct” as described below.)

First, download and install Objective Development’s build of avrdude for the Mac.

For convenience, I dropped a build of Marlin via Daid’s tool on friday.com. It built with the default Ultimaker settings with the maximum temperature reduced from 275 to 240 (there is no reason to go even that high, but 275 is guaranteed to liquify the plumber’s tape wrap on the extruder).

So, with .hex file in hand, printer powered up and connected to your Mac, the following Terminal commands should work (and are relatively harmless otherwise — avrdude is good about not blowing things up):

cd /directory/containing/hex/file
avrdude -v -p atmega2560 -b 115200 -c stk500v2 -P /dev/tty.usbmodem411 -U flash:w:marlin_rc2_pla.hex

That’ll spew a bunch of output that should look something like the following on success:

avrdude: AVR device initialized and ready to accept instructions

… bunch of verbosity deleted …

avrdude: verifying ...
avrdude: 45488 bytes of flash verified

avrdude: safemode: Fuses OK

avrdude done.  Thank you.

You’ll know you were successful if you try to run ReplicatorG and it fails to connect to the printer. No big deal because the next step is to install a far more capable printer driver package (and slicer).

New Printer Driver & Slicer

While ReplicatorG is quite nice for opening an STL to make sure it is properly aligned and centered on the print bed, the Ultimaker version is woefully out of date, can’t talk to the machine at high speeds, and the actual G-Code send/receive functionality is buggy and limited.

Printrun, pronsole, and pronterface, together, largely address the limitations of ReplicatorG. Like ReplicatorG, Printrun wraps SkeinForge for all [most] of your slicing needs. However, Printrun doesn’t have an STL editor like ReplicatorG’s and, thus, ReplicatorG will still be quite useful.

Installation is a bit of a bear. Or, was. Daid kindly pulled all the pieces together into a cohesive easy-to-install package.

Screen Shot 2012 02 12 at 12 23 00 AM

xAdditionally, Daid has packaged Printrun and the latest SkeinForge together with PyPy. By using PyPy’s ultra-fast Python engine, SkeinForge runs around 4x faster via this specially packaged version of Printrun than it does in ReplicatorG! A very welcome speed improvement, indeed!

Since Daid doesn’t have a Mac OS X box, I forked Daid’s github repository and have been maintaining easy-to-use Mac OS X build scripts.

To install:

First, you’ll need a couple of Python bits installed. Everything will be targeted to the 32 bit version of Python 2.7 (that is included with the system):

pyserial

Pyserial is easy to install. Literally:

sudo easy_install-2.7 pyserial

wxPython

Download and install the unicode “py2.7″ build of wxPython (2.8 as of this writing).

Note: It looks like the development versions of wxPython support 64-bit on Mac OS X. I will move to the cocoa version when I have the chance.

Either clone or fork this github repository and run build_osx.sh (please, someone fork it and make it better!) or grab the pre-built tar ball.

Either clone or fork this github repository , modify the build script to build for your platform, and then run the build script. Or you can grab the direct download. The author, said, has integrated my changes into the trunk to better support OS X, but I’ll leave the above URL as I may make updates in my fork that might be of interest.

Once installed, you should be able to do this and it should launch a UI like the one pictured above. The “connect” button should work (at 250kbaud, no less) and you ought to be able to control the printer from the UI. In that screenshot, I’ve sliced a trilego in prep for printing.

Note: Before you start printing, I highly recommend that you drop bed (Z+, it is backwards) below the extruder and pre-heat the extruder. The new firmware has a feature where it simply won’t extrude below a certain temperature. Unless you remember to configure the G-Code generation to pre-heat the head, you’ll end up with a screwed up print.

With this configuration, I was able to print a good quality octopus really fast.



2 Responses to “3D Printing: Upgrading Firmware & Printer Driver (For Ultimaker & More)”

  1. Simon Oliver says:

    I’m following along at home in anticipation of the arrival of my own Ultimaker sometime in the next month… it seems that under Lion, the default install of Python 2.7 is 64-bit only. As such in the pronterface.sh script, the arch commands fail with a complaint about a ‘Bad CPU type’ – and in any case the wx library won’t work.

    I upgraded to the v2.9 development build of wx for Python 2.7, and removed the arch commands, and while I obviously can’t test the proper functioning of the app yet, it does at least appear to run.

  2. djedjey says:

    Hi,
    First thank you for your tutorial!
    I tried to install the osx64-SkeinPyPy-NewUI-Beta4, I’ve following all installation process, but when I open a new terminal window and enter:
    ” cd osx64-SkeinPyPy-NewUI-Beta4
    ./pronterface.sh &
    ./skeinpypy.sh &”
    Terminal say me: -bash: ./pronterface.sh: No such file or directory
    -bash: ./skeinpypy.sh: No such file or directory

    Have you a solution?

    Thank you very much
    djedjey

Leave a Reply

Line and paragraph breaks automatic.
XHTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>