Category Archives: gCode

Printing With Steel on the Printrbot Simple


One of the most popular pages on this blog is Calibrating the Printrbot Simple. To be honest I haven’t been using my Simple much lately, what with the hullabaloo surrounding my Barbie-Compatible 3D printed armor Kickstarter. Just don’t have the time.

My mental juice can’t be occupied by all Kickstarter, all the time, so I took a few hours to mess around with Mr. Simple, and I decided to try an experiment that’s long been tugging at my frontal lobes. Can I print something recognizable, in metal, using my Printrbot simple and some clever engineering?

There are hobbyist metal printers on the way. I saw Vader Systems’ prototype at Maker Faire NYC, and can’t wait to get one of these bad boys into the basement at Zheng Labs.

But! Enough wishful thinking. Let’s get down to brass tacks.

I’m using baling wire for this project. You can get this stuff at any hardware store. Just make sure it’s not galvanized, because that can give off some nasty zinc fumes when it’s heated up. Also, I highly advise wearing protective gear.


warning Attempt this project at your own risk! There is an excellent chance that you’ll completely junk your Printrbot, or at least melt the plastic collar at the top of the extruder nozzle. Have a fire extinguisher handy, just in case. Goggles, gloves, the whole nine yards. Be smarter than I was: under no circumstances should you down three mimosas before trying this, no matter how much fun you were having at brunch.

As a precaution, you’ll also want to cover the print bed in fire-retardant tape, unless you’re willing to deal with a flaming Printrbot.

I’m planning on doing this repeatedly, so I replaced the Printrbot Simple’s print bed with a piece of asbestos tile instead. Yay for Open Source!

I just redid the kids’ room with asbestos tile and had some left over. It’s cheap and durable and I can’t believe people just throw this stuff away. Watch this space for a blog post about turning old asbestos tile into cutting boards; I’ll be putting them on Etsy once I’ve cut a dozen of them or so.

Temperature is everything here and you’ll have to move quickly once you start, so be sure to have your gCode pre-generated. Don’t waste time slicing the model before you print.

Preheat the extruder as high as you can get it. I managed to get mine up to 275°C by disabling the firmware safeties and working under heat lamps in the basement. (Printrbot firmware hacking is a topic for another day.)

Even 275°C is way too low for melting steel, so you’ve got to help the Simple across the finish line by heating your baling wire up with a propane torch. Depending on the alloy of your wire that means somewhere around 1400°C, which should be within the range of a hardware store torch.


Start the print and gently feed the hot wire into the Simple’s extruder. I epoxied a steel washer onto the collar of the extruder nozzle to protect it from the hot wire. Don’t lick the glowy part!

The print was a miserable failure, just your typical tangle of filament touched by His Noodly Appendage, ramen. This is what happens when you leave steel prints unattended:

print failure

The second time through I stayed with the print, keeping the propane flame focused on the wire as extruder pulled it in.


With just a little filing and polishing the nose ring looks way better than I expected it to. Not bad for a printer kit that retails for $300, even if I did have to babysit the print the entire time.


Permit me a brief foray into my other hobby, studying Mandarin Chinese. It’s a remarkably concise language, so cramming the entire One Ring poem (to find them, bind them, yadda yadda yadda) onto the side of the ring is easy peasy lemon squeezy.

You can compress the whole poem into five characters, 愚人节快乐. Way fewer than required in the Black Speech of Mordor.

Flagrant stagecraft alert: I printed the ring and nose separately and welded them together afterwards; I haven’t tried printing anything with support yet.

You can download the STL files for the nose ring in the Baubles section of The Forge, or if you’re impatient or don’t have a 3D printer just grab one from Shapeways.

Pro tip: I found that copying my gCode into OpenOffice, coloring it pure red (#FF0000), and then re-pasting it back into Repetier-Host helped me get the extruder nozzle up to 282°C the second time around.

A Little Counter Intelligence

So I’m printing out a couple sets of Magic: The Gathering +1/-1 counters for an Etsy customer and I run into a problem. The red ABS +1/+1 counters are printing fine, but the -1/-1 black PLA counters are getting all feshnicket about midway up the print.

feshnicket couner

Good enough for a pickup game at Casa de Zheng, but one of these might show up at a tournament somewhere and we can’t have our customers looking anything less than their best.

If you don’t have your own 3D printer, you can get these counters on Shapeways, and if you do have your own printer head over to The Forge and print them at home. They’re in the Miniatures section.

These fellas are pretty small, so the newly-extruded PLA isn’t cooling off before the extruder head comes around to the same X-Y position on the next layer. Gooey plastic gets smudged a little bit and the edge of the counter becomes irregular. Fugly.

The solution is a little bit of custom gCode. A brief pause between layers gives the PLA time to stiffen before the extruder drags itself over the same spot.

The gCode needed for this is G4, or “dwell,” with a parameter measured in milliseconds. You’ll also want to move the extruder head out of the way while it dwells so that it doesn’t continue pumping heat into the print.

Here’s the gCode that needs to be added after each layer. Everything in parentheses is a comment and might make your interpreter go to la-la land.

G91 (set to RELATIVE positioning)
G1 Y10 F3900.0 (move 10mm in Y)
G4 P5000 (wait for 5 seconds)
G1 Y-10 F3900.0 (move -10mm in Y)
G90 (reset ABSOLUTE positioning)

You could add this with a Find/Replace in a text editor; just search for (</layer>) and append the gCode above to the end.

OSX’s TextEdit will actually let you add carriage returns to your find/replace fields if you hit CTRL-Q and then hit the return key. But saving that output gave me some weird text encoding errors, demanding that I switch from UTF-8 and it’s not 1994 anymore so WTF Apple.

It’d take me longer to figure out that text-encoding problem than it would to write a short Python script to do the job. Assuming you’re on a Mac and have in_file.gcode on your Desktop:

import os

# read the input file
f=open(‘/Users/zheng3/Desktop/in_file.gcode’, ‘r’)
#Windows and Linux paths are left as an exercise for the reader.

gCode=’G91\nG1 Y10 F3900.0\nG4 P5000\nG1 Y-10 F3900.0\nG90\n’
# the \n puts a carriage return after each line.

for i in range(len(content)):

if ‘()’ in content[i]:

#write the output file

Then fire up out_file.gcode in ReplicatorG and a few minutes later, you’ve got yourself a decent print. Nice print on the left, yeechy print on the right.


Calibrating the Printrbot Simple

printrbot calibration fails

As a barebones 3D printer the Printrbot Simple needs a little bit of software love before you can reliably print stuff. You’ve gotten your printer together, the X-Y fishing lines are tight, and it’s plugged in. You’re satistifed that despite your hamfisted build process, the bot won’t catch fire, and it’s time to get it calibrated so you can get started on your adventures in 3D printing.

First things first, download and install Repetier-Host. I’m using Version .56 on OSX, but the clicky points should be pretty much the same no matter what OS you’re on. If you’re a TL;DR type, skip to the starting gCode settings at the end of this post and proceed from there.

Repetier-Host desperately needs a name change. In the hierarchy of 3d printing software names, MakerWare is clearly the hep cat, followed by ReplicatorG. Pronterface sounds like a schoolyard insult, and Repetier-Host is the foreign exchange student who eats his own scabs.

Connect to the printer with the button on the top left of the screen. Assuming you get something cryptic in the log at the bottom like:

5:37:47 AM: FIRMWARE_NAME:Marlin V1; Sprinter/grbl mashup for gen6 FIRMWARE_URL: PROTOCOL_VERSION:1.0 MACHINE_TYPE:Mendel EXTRUDER_COUNT:1

You’re connected and ready to go. First, let’s calibrate the X-axis.

The plan here is to find the difference between how we’re telling the bot to move in software and how it’s actually moving in hardware. Variance in motors, line tension, humidity, gear slippage, localized tachyon concentrations, sunspots, Lindsay Lohan, all these things contribute to unpredictability in the Simple’s motion.

Once we find the difference we’ll write a little bit of simple gCode to correct for it.

The first thing you’ll do is set a default value for the X-axis steps per mm. I’ve been using 114.20, but any number in that neighborhood will work for this step. You’ll likely change this value later, so don’t worry too much about it.

Go to the Print panel and enter the following gCode in the G-Code field (inside the Print Panel tab) and then click Send:

M92 X114.20

Not much will appear to happen, but Repetier-Host has silently told your Printrboard to set the steps per mm of the X-axis motor to 114.20. We’re off and running with the calibration process.

Now move the print head all the way to the left. I do this by disconnecting the power supply to disengage the motors and physically sliding the print bed to the right, as if it were an old-style typewriter carriage.

warningWARNING: It looks like physically moving the X-stepper this way generates a current, which you’ll see lights up the status LED on the Printrboard. I’ve done this dozens of times with no apparent damage to the bot, so I’m assuming there’s a diode in there somewhere protecting it. Manhandle your bot at your own risk.

Once you have the X-axis homed, move the Z-axis up just enough that you can slide a ruler under the print head. I’ve covered my print bed in painters’ tape to help prints adhere, which also makes a handy writing surface. Record the start position of the print head with a mark on the tape.

marking the first line

Remove the ruler and click the X +10 button 5 times, for a sofwtare move of 50mm. Record the position of the head again and measure the distance between the two points, in millimeters. Mine was 46mm in this case, but yours may be different. In the unlikely event that your hardware move already matches your software move, congratulations! You’re done with X and can skip on to calibrating your Y-axis.

If your print bed doesn’t move or moves haltingly, there’s a good chance that you don’t have enough tension in the X line. Tighten it up and try again. The first few times I adjusted the line I was being way too gentle and got unpredicatble movement in the print bed, especially before the motor took up the slack on one end. Really pull hard on the line, like you’re trying to land a walleye.

A note to our international readers: a walleye is a type of North American antelope traditionally hunted with tethered harpoons.

We need a little bit of math to figure out our steps per mm. The Magic Formula is:

(old steps value * software move) / hardware move = new steps value

So plugging in our values we get:

(114.20 * 50) / 46 = new steps value

Which evaluates to 124.13 for my bot. Put your value into the gCode field like this:

M92 X124.13

And hit Send again. Test your X calibration by moving the print head back to the left with the X -10 button and recording the position. Repeat as needed until you’re satisfied that the print head is moving precisely enough for your needs. I’m OK with a little slop in my calibration because I’m trying to have fun with this machine and not get obsessive about print quality. It’s not like I’m printing jet engine parts here.

Repeat this process with the Y-axis, except swap the X for a Y in your gCode. I calculated a Y-value of 114.58 this time.

M92 Y114.58

The process is very similar with the Z-axis. Measure the distance from the top of the leadscrew to the extruder head, Z-move the extruder in software, and measure again. I’ve got one end of the ruler resting right on the plywood, sandwiched between the leadscrew and the head of a hex nut.

UPDATE 6/3/13: Read Bill Owens’ comments below on Z-axis calibration.

measuring the leadscrew

Plug your measurements into the Magic Formula and calculate. Calculate like the WIND!

After you’ve got the motion motors moving the way you think they should be, the next thing to do is calibrate the extruder motor. You need to make sure that the motor’s feeding enough filament to the hot end, but not so much that you spaghettify your print bed during a print.

The process is pretty straightforward: wrap a piece of tape around the filament, 10 centimeters up from the extruder.


Set the extruder temperature to 220°. Repetier-Host won’t let you extrude with a cold hot end, so while you’re waiting set the extrude distance to 10mm. It shouldn’t take more than two or three minutes to go from room temperature to 220°.

If your hot end gets up to around 80° and stalls, check to make sure the power supply is plugged in. USB power will get you to 80° without the power supply, which can be deceptive.

After the extrusion is done, measure the distance to the tape again, and use the Magic Formula one more time.

Once you think you’ve all four motors calibrated, it’s time for a test print. You’ll want something simple and small, so that you can iterate quickly through test prints and really home in on the correct settings for your printer.

I’ve been using a 2x2x0.5cm test lozenge, which you can download right here if you’re not into 3d modelling yourself. The lozenge is nothing fancy, no bevels or geegaws. I keep the gCode for it handy so that I can quickly calibrate after a mishap or hardware adjustment. Do not suck the lozenge.

I’ll be exploring Slic3r and test printing in a subsequent post. For now just accept the defaults, hit Slice with Slic3r, and cross your fingers.

Before I print, I put my calibration setting into the Start gCode dropdown. If you’ve never done this before the dropdown can be a little hard to find:

start gCode

Here are the values that have been working well for me lately. They’ll be decent default settings for a Simple, but more than likely you’ll be tweaking them for your own bot. Note that these are a little different from the values I calculated above– there’s been some adjustments done to my bot since I originally started measuring things.

M92 X112.20 ; calibrate X
M92 Y112.58 ; caibrate Y
M92 Z2387.0719 ; calibrate Z
M92 E450 ; calibrate E

Assuming your print bed is mostly level you should have a printed lozenge in short order. Check the dimensions with a pair of calipers and adjust the print settings repeatedly until your OCD is satisfied.

Once you’re reliably printing lozenges, head on over to The Forge and grab a more complicated model to try out.

Also! Pledge fealty to The Horde to receive the latest Zheng3 models along with assorted other useful giblets like this calibration guide.

printrbot calibration fails

MakerWare 2.1.061 Review

TL;DR summary: MakerWare is rapidly maturing, and while the UI is easier to use than ReplicatorG, I had a lot of difficulty getting anything more than a basic print out of it. I’m hopeful for the next version, but in the meantime I’m sticking with ReplicatorG.

This is my third review of MakerWare. The first. two. reviews showed the software to be promising but beset with enough problems so as to be unusable. Some problems persist, but the usability’s taken a big step up.

The biggest change I’ve made to my setup is upgrading the Replicator Dual’s firmware to the most recent version. This fixes the MakerWare connectivity problems I was having a month ago, and also makes the Replicator quieter and faster. I jumped from 5.4 to 7.2, and frankly I’m kicking myself for not doing it sooner.

I’ve started aiding the printerless by offering prints of some models on Etsy. A recent order for a set of three Magic: The Gathering +1/+1 counters prompted me to download the new MakerWare to try printing multiple models with a dualstrustion printer.

MTG +1/-1 Counters

downloadThese are small models and they should print quickly, which makes them ideal test subjects. (These counters are available in The Forge, so go ahead and print some for your local Friday Night Magic game. Tell ’em Zheng sent ya.)

Launching MakerWare shows me a familiar interface, including the NYC skyline that I’ve maligned in the past as an unprofessional distraction to the process of 3D printing. I have it on decent authority that this image is the view from Brooklyn, which makes sense given that MakerBot’s HQ is there.

MakerWare Launch

The story of the Brooklyn Renaissance has progressed from interesting to beating a dead horse with a twee-stick. I’m sure it’s great to live in a land where the streets are paved with locally-sourced artisanal chutneys, but give me the option to turn the image off, please. I hear enough about how awesome Brooklyn is from reading Gawker. Or replace it with a truly iconic skyline, like Chicago’s. OH, SNAP. Yes I did, New York.

Back to the review: I reach into my Bag of Holding, withdraw an STL, and MakerWare puts it in the center of the build space, defaulting to white plastic for the build material.

first import

I Command-C/Command-V twice, and now I’ve got three +1/+1 counters. This little feature is far and away my favorite improvement MakerWare makes over grizzled warhorse ReplicatorG. The GUI’s very easy to use when it comes to duplicating and arranging objects on the build platform.

Three counters

Minor feature request: I’d like to be able to select multiple items and group them the way I can in Illustrator, so that I can click one and rotate/scale/translate the group around a common origin. This functionality is kinda-sorta of implemented with a drag across multiple items, but there’s always a chance you’ll grab something else on the build platform by accident.

I import a new item (the -1/-1 counter) and it shows up at the origin, which I guess is to be expected but I have trouble selecting it because another very similar item is in the same spot. I try to move it out of the way and I end up screwing up my placement and I have to start over.

This time I import a single instance of each counter. There is no snap-to-grid option that I can find, but there is an Auto-Layout feature that easily separates the models and places them independently on the platform. Very nice.

Auto Layout

Next. I want to print the -1/-1 in black, and the +1/+1 in red. This is pretty easy to do. Click the instance you want to change and then click the Object button. Select the extruder you want to use. In my case I’ve preloaded the Replicator Dual with black on the right and red on the left.

There’s a color swatch in the Object popup, but clicking on it doesn’t bring up a color picker the way I’d expect it to. Instead I have to go to Preferences, which seems like a weird place to change an object’s settings. I guess if you’re thinking that you’re setting the preferences for the bot it makes sense, but I prefer to think about the object I’m building rather than the tool I’m using.

Object Color

It’s easy to make the +1/+1 counter red, and now I’ll just copypasta the pair of counters and I’ve got three of each. So far, so good.

Ready to Print

I click the make button and get a bunch of well-organized settings, but I’m going to pretend I have no idea what I’m doing and just accept most of the “High Quality” defaults.

I’ve never managed to get a print to work on a Replicator Dual with lower than .18 layer height, but the High Quality settings default to .1 layer height. Either that’s a theoretical minimum that better geeks than me have reached, or it’s a minor oversight in the software. I change the layer height to .2 just to be safe.

My first print fails due to an off-kilter build platform and I have to cancel it from the bot. This isn’t a MakerWare-specific problem– it can and does happen with any software.

Feature request: It’d be nice to have a “try” again button, because now I’m waiting for the slice to finish again. It seems odd to me that MakerWare isn’t caching the most recent slice operation so I can try again quickly. Failed prints aren’t exactly rare as hens’ teeth, and this slice-fail-repeat pattern is really slowing me down.

I re-slice, wait, and try again. This time, it turns out the left extruder head is slightly higher than the right. The first layer of red counter goes to la-la-land, crashes into the emerging black counter, and the whole print goes kablooie. I cancel, get out a wrench, and adjust the hardware while the extruder nozzle is still warm.

This is frustrating, but not unexpected in the world of home 3D printing. So I try to keep things simple, and go back to printing a single color print of a single -1/-1 counter with Make it Now. Success.


I need to print two more of these, so I Make To File and export the gCode. The gCode file is ready in a few seconds.

Export to File defaults to .x3g, so if you’re not poking around in there or haven’t RTFM’d you won’t even know gCode’s an option. You can’t print an .x3g file directly from MakerWare, at least not in this version.

I choose File->Make It from File (this really should be an option under the Make button) and a dropdown appears. I click Make It and the build fails before it even gets to the printer. It tells me to look at the log to see what happened. I see a bunch of cryptic errors in the logs that I’m unqualified to troubleshoot. I’m abandoning this method for now, and I’ll just print two more single copies of the -1/-1 counter, slice delay and all.

I’ll also need some red +1/+1 counters, so in the interest of keeping it simple I import the STL, change the color of the instance to red, and discover a bug shortly after I hit the Make It button. This version of MakerWare doesn’t like single-extruder prints with the left nozzle for some reason.

The Replicator goes through the motions, tracing an empty line on the build platform, but the extruder’s not heating up. It’s got residual heat from a previous attempt, but it’s not getting hotter.

doesn't heat up

But. Both extruders work just fine if I try a dualstrusion print again, now that I’ve leveled the HBP and made sure my nozzles are both at the same height. They work just fine in that they manage to extrude plastic, but they do that job just a little too well.

Both prints have these filament morgellons sticking out of them. Close observation during the print reveals that a little bit of filament continues to seep out of the nozzle as the machine switches colors. That tuft of filament catches on the print the next time the extruder sweeps over the top layer. Maybe this could be fixed in gCode by running the extruder drive motors in reverse for a bit in-between colors. I dunno.


This is more cleanup than I want to get into. Probably better to print one color at a time.

At this point my effit-o-meter’s in the red zone, so I give up and go back to printing with ReplicatorG. It looks like MakerWare is sufficently advanced to handle a simple import-and-print operation, but for more complicated operations I’d prefer software that allows for quick and easy print iterations.

Verdict: Still waiting for MakerWare to live up to its potential. I’m looking forward to the next version, but for now the software is a perfectly cromulent way to troubleshoot away your Saturday morning.

The Quickstone Challenge


It’s been some time since I posted a new Seej model. I got tied up with work for couple of months and then I got on to making Magic: The Gathering Tokens, and new Seej work kind of fell by the wayside.

Plus I’ve been working on getting the Forge going, and the Scrying Pool, and I’ve been dusting off my long-unused PHP chops, and also managed to develop cubital tunnel syndrome in my left arm to match the carpal tunnel in my right.

So here’s a quickie as I dip my toes back into the moat. I’ve designed the Quickstone bloxen with paper-thin walls and internal supports to print as rapidly as possible.

Look at the red bloxen in the photo above and you’ll see the backlit mortises self-inverting to become tenons.

My best print time on a Replicator 1 with default firmware and ReplicatorG is 27 minutes.

There have got to be übernerds out there with pimped out RepRaps who can smoke that. I’m particularly interested to see how quickly someone with a b9Creator, Form1, or mUVe can do it. The internal supports on the Quickstone are built for the limitations of an FDM printer, but could probably be deleted if you didn’t have to worry so much about gravity during the printing process.

Can you knock Lao Zheng off the mountain?

First, visit The Forge and download the Quickstone bloxen. (It’s buried under Forge -> Seej Models -> Fortifications.) Then email me with the deets on your slicer, your printer, and your results. Pics or it didn’t happen.

Here are the settings I used:

Replicator1 Dual (using single head)
Infill: 0%
Layer Height: .3mm
Shells: 1
Feedrate: 75 mm/s
Travel Feedrate: 75mm/s
Print Temperature: 240°C
HBP Temp: 110°C
ABS Natural

A few rules:

  • We’re on the honor system here. No fibbing.
  • Cram as many 1:1 bloxen into your build area as you like, and measure your time in bloxen per minute.
  • Slicing time is not included in your total.
  • The bloxen must print in one piece.
  • The bloxen must be usable in a Seej match. If it can’t withstand a firm squeeze, it’s no good.
  • you can modify the bloxen’s geometry, but under the terms of the CC license you must make derivatives available to others. I can host your model in The Forge, or I’ll link to the site of your choice.

Have at thee!

His nibs.

I started using a Wacom Intuos 2 tablet in 1999 after struggling with a mouse-induced repetitive stress injury. I’ve been holding the same stylus pretty much every day, for hours a day, for the last twelve years.

Over time, the nibs eventually wear out, and I’m left wondering where I left that tiny bag of replacement nibs I bought from Wacom three years ago to replace the tiny bag of replacement nibs I lost six years ago.

Now I have a Replicator, and I can print my own highly precise pieces of plastic. I’m a big believer in Taking It Just A Little Too Far, so I’ve designed a nib based on the slicing end of a Shaolin spade.

The Shaolin spade (月牙铲, or yuèyáchǎn for my fellow xuésheng) was the favored weapon of drunken monk Lu Zhishen, made famous to those without an interest in classical Chinese literature by Max Brooks’ Zombie Survival Guide and the fine Kurt Russell vehicle Big Trouble in Little China.

The nib should work for any Wacom stylus. Here it’s pictured in my Bamboo, which I use for work when I’m traveling.

My original plan was to include the Shaolin spade in the Zheng3 Cocktail Arsenal, but the tip is too wide to be thrusting through maraschino cherries. It should make a dandy calligraphic nib for those so inclined.

If you’re the kind of person who cares enough about the quality of a digital brush stroke to 3D print custom nibs for a Wacom tablet, you deserve a step-by-step tutorial on how to do it.

This is a really precise, but very simple print. The nib’s shaft needs to be sized so that it fits the bore of the Wacom pen and can be removed with the tiniest effort, but not so loose that it falls out when one begins to draw with the stylus.

I did a lot of trial and error to get the nib diameter correct, because my four-dollar hardware store calipers produced a measurement that was way, way too thick to fit into the pen. A radius of .065 cm seems to do it when printing with the following method. I’m assuming there’s some contraction/expansion/plastic real-world-weirdness that doesn’t show up when the design isn’t all vertices and electrons.

Note that I’m printing with PLA.

ReplicatorG Settings:
HBP: 45° C
100% infill
Layer Height: .2
Number of shells: 1
Feedrate: 25 mm/sec
Travel Feedrate: 55

This print is so small and delicate that any extruder-induced jiggling of the Replicator is likely to shift the plastic off your platform. I got good results by slowing the print heads down. Here’s how I did it:

Generate your gCode from within ReplicatorG using the above settings. Then do a couple of find/replaces in your favorite text editor:

Replace F750.0 with F100.0
also replace F1500.0 with F100.0

There’s probably a way to do this from the GUI but for some reason I’m more comfortable mucking around in the ASCII.

Run the print. Your instinct will be to pull that new nib off the build platform and jam it into your stylus ASAP. Don’t. Give it a few minutes to cool so it doesn’t warp upon removal.

It’s easy to remove a fresh nib from a Wacom stylus. Just grab it with some pliers and pull gently. Scissors are useful for removing a worn nib; cut slightly into the plastic of the nib with the blades and then pull it out.

Download it here.