Archive for the ‘ Electronics ’ Category

Getting started with Adafruit’s Circuit Playground Express

Overview

I’ve had a dream of authoring Python code directly on a microcontroller board for a long time.  That became a reality with MicroPython and the pyboard, but I didn’t jump in until my Circuit Playground Express (CPE, below) board from Adafruit showed up recently.

cpe <- CPE in bootloader mode!

This blog post is written as notes for my future-self, when I forget things.  But feel free to follow along reader…

I wrote this guide because despite the fact Adafruit has lot of data out there, it took me hours to sort through it all and figure out what applied, and what didn’t.


 

Circuit Playground Express Links


Required Hardware


Adafruit Setup Docs

It should be noted that I myself did all of these steps in the below order.  Which makes me wonder, for example, if the drivers & utils I installed during the Arduino section benefited later steps.  Each of these docs is broken out into more detail below The Bootloader section.

  • Circuit Playground Lesson #0 : Arduino Setup
    • This is authored for the “Circuit Playground” (the precursor to the CPE, it is a different thing), but docs still appears to apply.  Probably the best first place to start, but focused on Arduino.
  • MakeCode
    • If you want to try your hand at MakeCode programming on the CPE (Visual blocks, or JavaScript), start here.
  • CircuitPython Setup
    • This is actually a sub-doc for another tutorial, but explains how to setup CircuitPython on the CPE.
    • CircuitPyhon is based on MicroPython, with some differences.

The Bootloader

This CPE bootloader info applies to Arduino, MakeCode, and CircuitPython, so it’s worth calling out here.

Check the Bootloader:

  • Nice (MakeCode) overview here: “Downloading and Flashing“.  It should be noted that Arduino uploads via its own IDE, but you still need a bootloader to receive the data.  More info under “UF2 Bootloader Details“.
  • The first time you plug the CPE in over USB (before any other configuration / software installs), see if the bootloader works.  Press the reset button twice:  All the ring-LEDs should turn green, and D13 should be slowly pulsing.  The image a the top of this post shows this.
  • The issue I had is, the image in the linked docs don’t show the green LEDs:  Since mine were green, and the image of the docs were not, I thought I had a problem.  I did not.
  • IMPORTANT: Once the software is configured correctly (this started happening for me once I configured Arduino), entering bootloader mode should pop open a (Windows) Explorer.  However, the CPE has two different “Windows Explorer modes”:
    • “Bootloader Mode” : Again, all the LEDs should be red, and you should see a few files on it:
      • INDEX.HTM <- web link to the CPE
      • INFO_UF2.TXT  <- tells you about the bootloader
      • CURRENT.UF2  <- the current firware
    • “Program Mode” (I made that term up) : This is the the mode where you can drag & drop your programs onto the board.  This shows up on first time plug-in (usually takes 30 seconds or so for the Explorer window to pop open), or when you press the reset button once.  For example, with CircuitPython installed, I see these files:
      • /lib <- imported bundle libraries
      • code.py <- Main code to execute
      • boot_out.txt
  • Here’s a short video showing how the bootloader works:


Initial Arduino Setup

Based on Circuit Playground Lesson #0 : The links below are entirely from this tutorial, I’m just calling out some of the major points & gotchas.

I got the CPE with the goal of authoring Python code for it.  But based on all the initial documentation I could find, it seemed like Arduino was where one should start.

Install

  • From the docs for your OS: (Windows links below)
  • Add Circuit Playground to Arduino
    • (Obviously) follow all the steps here adding drivers and external packages.
    • This part really confused me for a bit (and Adafruit tech support to the rescue):  Be sure to choose the right board from Tools -> Board Menu.
      • The right board will be under the “Arduino SAMD (…) Boards” section, called “Arduino Circuit Playground Express”.  Any other board with a similar name (like, say, “Circuit Playground”) is wrong.  You’ll know it’s wrong because it won’t upload your sketch correctly.
      • See verbose errors and whatnot from my forum post here.
    • Once you’ve selected the correct COM port, you can then access:
      • Files -> Examples -> Adafruit CircuitPlayground  -> And choose a sketch therein for upload & test.
  • Other Notes:
    • During this process, I couldn’t get Arduino to connect.  After rebooting my machine and restarting the Arduino IDE, it asked me to install additional drivers, which I did.  Around that time things started working correctly.

Docs

  • The Arduino “Adafruit Circuit Playground Library Reference” can be found here.

Initial MakeCode Setup

Based on Adafruit’s MakeCode docs:  MakeCode provide a visual programming environment, JavaScript, all programmed in-browser.

Install

There really isn’t an “Install” per-say:  Just browse to : https://makecode.adafruit.com to open the editor.

You can now code in either the “visual blocks”, or JavaScript.

Presuming you can enter “bootloader” mode (discussed in the Arduino section above), once you save a .uf2 file from the MakeCode app, if you drag & drop it onto that open Explorer window, the window should close, and the app immediately run on your CPE.  Pretty slick!

I presume though, that some of those Arduino install steps were required, since my PC wouldn’t recognize the CPE as a USB device properly until then, which would have prevented me from dragging & dropping the .uf2 files onto it.

Docs


Initial CircuitPython Setup

From the Adafruit “Circuit Python Setup” docs (for the Metro M0 Express board, not that it matters so much).

This is the whole reason I got this hardware, so far, not disappointed!

Install

  • The above docs do a great job of covering it, but be sure you choose “Circuit Playground Express” options, since the tutorial was written for another board.
  • I flashed the CPE by just drag&dropping the downloaded ‘adafruit-circuitpython-circuitplayground_express-1.0.0.uf2’ (for CircuitPython 1.0, not 2.0, which at the time of this writing just came out and is in beta) file onto the CPE while in bootloader mode.  Note, it did take ‘a while’ for it to update, at one point I thought maybe it had broken.  But then it started working again.
  • I used the CircuitPython Blinky example to upload my first Python module, and it worked!
  • It appears that my current version of CircuitPython is running Python version 3.4.0.

Getting Bundles

  • CircuitPython ‘bundles’ Python libraries together for use on the CPE. Since the space on the CPE is so limited, sometimes you can only include specific compiled libraries with your module.
  • You can access the bundles here @ github: adafruit/adafruit_CircuitPython_Bundle
    • Don’t make the mistake I did:  Just grab (for example) the “adafruit-circuitpython-bundle-1.0.0-20170815.zip” file in the downloads section, not one of the individual libraries above:  They don’t have the ‘lib’ folder you need for transfer to the CPE.

Setting up a Serial REPL Editor

This is a great feature, that allows you to have a live Python interpreter running on the CPE.  This lets you query the board directly in a live coding session, awesome feature.  What is REPL you ask:  Answer here!

An overview of how to set this process can be found here: “Serial REPL“.

Other Info:

  • I used PuTTY for this connection.
  • It looks like the COM port for my CPE changes pretty often, so I have to access the Windows Device Manager every time I want to run this feature.  Mine shows up as “Teensy USB Serial”, and tends to bounce around COM9->11
  • You can’t connect when you’re in bootloader mode:  Get a program running first.
  • Note, on first time connect, you can’t connect in via REPL until the Windows Explorer (auto) opens:  That signifies that the machine is ready.
  • If, when the terminal screen comes up its black/no info, hit ctrl+c to break out of the running program and access the terminal: >>>
  • type help() to see a list of built-in functions.
  • You can use this same connection (before the ctrl+c) to see the output of any module currently running.

Docs


Really look forward to seeing what this little board can do!

Building the C-Bot 3d Printer : Part 38 : PID Autotune on RepRap Firmware, fix z-artifacts

Jump to C-Bot blog index to see all the posts.


In my last post on the subject, I described how I completely rebuilt my C-Bot printer.  The main goal was to get better print quality based on some odd z-artifacting I’d been experiencing for some time.  But, the z-artifacing still persisted.

This post is to talk about both the solution to the artifact issue, and how to PID Autotune your hotend and heated bed with RepRap Firmware.

Solving the Z-artifacting

After the rebuild, the z-artifact was still there.  Was so frustrating to have a machine that printed so well, yet on the Z-axis, I’d get this:

z-ringing <- Click on it to make bigger, and look on the inside of the print.

The real oddity was that the artifact didn’t match the pitch of my leadscrew, which seemed like the obvious culprit, and the period of the artifact could vary based on what you were printing.  For example, a 20mm calibration cube showed off the issue much more than the above cylinder.  And it was more of a square-wave, not an s-curve.

3D printer people to the rescue:  I posted my issues to the ‘3D Printer Tip, Tricks and Reviews‘ Google Group, and through a lot of back and forth discussion (thanks JetGuy + several others), the users figured it was either one of two things:

  • Thermal expansion of the bed during the bang/bang heat cycle was causing these anomalies.
  • The hit the heated bed was making on my power supply:  When I built my machine 2 years ago I was recommended a fancy PC power supply (Corsair CTX 500), but as it turns out, this may not have been the right choice for a 3D printer.

Check Thermal Expansion

To troubleshoot the thermal expansion, user Joseph Chiu suggested a great idea:  Shine a laser off a mirror on the bed during the heat cycle, and track the dot on the wall.  If the dot moves during the bang/bang cycle, then it’s thermal expansion.  So, I gave it a shot:  Heated up the bed, waited for the temp to start banging back and fort, and then stared a dot on the wall…

frikkin_lasers The ol’ Replicator1 served as a based for the vice holding the laser.

That laser was bright, so I moved the mirror so it hit a “splotch” on it, and gave a nice diffusion pattern on the wall.  This was much easier to look at, and track the specks to see if the changed / moved : The did not.  This is not a thermal expansion issue.

Check Power Supply

The easiest way to check if this is a power supply issue?  Just ‘not print with the heated bed on’:  I normally always do, at 60c:  Not required, but sometimes helps large PLA prints stick better over time.

So, I did the same cylinder print with no heated bed and: The z-artifacting was gone!  Can’t believe I’ve been having this issue for a year-ish, and never realized it was the amp-draw the heated bed puts on the PSU, even though the PSU is rated for it, based on numbers.

Compare PID Tuning vs no heatbed

One thing I’d never done since upgrading the bot to RepRap Firmware, was PID autotune the hotend, or bed:  The defaults seemed fine, and the temp curves as shown in my slicer seemed “good enough” : I could easily see the bed overshoot based on the bang/bang setup, and a slight wobble on the hotend.  But I figured this would be a good time to PID autotune both the hotend and bed (discussed in more detail in the next section):  Would this help any of the z-artifacting?

Why, in fact it does.  Here’s a comparison shot:

print_compare

‘Bed off’ and ‘Bed with PID Autotune’ are nearly the same:  The artifacing caused by the bang/bang is completely removed, and only a very slight, larger-period artifact remains (which I’m happy enough with at this point).

I should also note that my temp curves, for both hotend and bed, are now dead flat.  PID tuning completely makes a difference.

However, I noticed that while the pid-tuned bed works, the LED strips on my bot flicker with the same frequency as the SSR controlling the bed:  The same power-hit that caused the bang/bang artifact is still there, it’s just happening at such a high rate, the artifact is being averaged out of existence.

For future improvement, I need to choose one of these:

  • Get a separate power supply for just the 12v bed.
  • Switch to an entirely separate 120v AC heated bed.  This is the option I’m currently investigating.
  • Switch all my electronics out to 24v (ugh).

But in the meantime, at least the stupid z-artifact is gone.

PID Autotune your hotend and heated bed in RepRap Firmware

These are the steps I went through to PID autotune my hotend and heated bed in RepRap Firmare:  None of it hard, just took a good amount of digging online to figure out what exactly needed to be done.

In RRF gcode, ‘H’ Is the heater number: H0 is the bed, H1 is the first hot end, H2 the second etc.

PID Autotune the hotend

To PID autotune the hotend, these were the steps I took:

  • Position nozzle over bed
  • Turn on cooling fan 50% to simulate real printing environment.
  • Start with a cold hotend.
  • Enter this gcode, + the result returned as it’s ran:
    • I chose 230c as the target temp, since I print a lot of filament at that temp.
    • If you get an temp overshoot error during the tune, you may need to add / adjust your M143 in config.g:  The default value for hotends is 262c.

M303 H1 S230
READ: Auto tuning heater 1 using target temperature 230.0C and PWM 1.00 – do not leave printer unattended
READ: Auto tune phase 2, heater off
READ: Auto tune phase 3, peak temperature was 234.6
READ: Auto tune heater 1 completed in 228 sec
READ: Use M307 H1 to see the result, or M500 to save the result in config-override.g

  • Then entered this gcode, the result returned as it’s ran:
M307 H1
READ: Heater 1 model: gain 325.3, time constant 117.3, dead time 5.0, max PWM 1.00, mode: PID
READ: Computed PID parameters for setpoint change: P12.9, I0.110, D45.0
READ: Computed PID parameters for load change: P12.9, I1.026, D45.0
  • Finally entered this gcode to save the results out to config-override.g
M500
  • Which in turn, added this info (actually more, but this is what’s important to this operation) to config-override.g
M307 H1 A325.3 C117.3 D5.0 S1.00 B0 
  • Note, the B0 = PID tuned.  B1 = bang/bang.

PID Autotune the heated bed

To PID autotune the heated bed, these were the steps I took.  Note, it’s very similar to the hotend above.

  • Start with a cold heated bed.
  • Enter this gcode, + the result returned as it’s ran.
    • I chose 60c as the target temp, since I print a lot of filament at that temp.
    • If you get an temp overshoot error during the tune, you may need to add / adjust your M143 in config.g:  The default value for heated beds is 125c.
M303 H0 S60
READ: Auto tuning heater 0 using target temperature 60.0C and PWM 1.00 - do not leave printer unattended
READ: Auto tune phase 2, heater off
READ: Auto tune phase 3, peak temperature was 61.2
READ: Auto tune heater 0 completed in 1105 sec
READ: Use M307 H0 to see the result, or M500 to save the result in config-override.g
  • Note, it took forever for this to finish, since it wants the bed to cool down before it completes.  I had to point a fan at it to help it along after ‘phase 3’.
  • Then entered this gcode, the result returned as it’s ran:
M307 H0
READ: Heater 0 model: gain 111.6, time constant 814.0, dead time 20.5, max PWM 1.00, mode: PID
READ: Computed PID parameters for setpoint change: P63.5, I0.078, D911.1
READ: Computed PID parameters for load change: P63.5, I1.082, D911.1
  • Finally entered this gcode to save the results out to config-override.g
M500
  • Which in turn, added this info (actually more, but this is what’s important to this operation) to config-override.g
M307 H0 A111.6 C814.0 D20.5 S1.00 B0
  • B0 = PID.  Previously, it was B1, bang/bang.

Configure config-override.g

The M500 command entered above does a live update to the config-override.g script living on the SD card, which is a great feature.  However, I’d never used this feature before, so my config.g had no idea to execute this script.

To do so, simply (I did mine a the bottom), enter this gcode in your config.g

M501

This will then execute the contents of config-override.g from within your config.g, when the machine boots up.

Optionally, you could simply copy the M307 lines (as generated by M500) from config-override.g and paste them directly into config.g, and remove the M501 call.  Either will work.

PID Autotune related gcodes

  • M135 : Set PID sample interval
  • M301 : Set PID parameters
  • M303 : Run PID Tuning
  • M304 : Set PID Parameters – Bed  :  This command is identical to M301 except that the H parameter (heater number) defaults to zero.
  • M307 : Set or report heating process parameters

Jump to C-Bot blog index to see all the posts.

Building the C-Bot 3d Printer : Part 37 : 2017 Redux

Jump to C-Bot blog index to see all the posts.


Hard for me to believe I built the C-Bot just over two years ago.  During that time I’ve done a number of upgrades, but a weird z-wobble had shown up in the process, that I’d been completely unable to resolve.

After discussion on the C-Bot/D-Bot 3D Printer Google Group, I generated a new list of parts to re-3d print, to improve my bot.  So I really can’t call this a C-bot anymore, it’s more of a C-Bot/D-Bot/Spiffbot (+ others) mashup at this point.

So after two weekends of disassembly & reassembly, the CDSO-bot is back up and running.  Behold:

cbot_redux_web

The colors are a bit like a time machine:  Anything in blue is original prints. White was printed next, and latest is gray.

Overview of my updates below.  Huge thanks to all of those who have put time in to improve these files, and release them for free!

  • Printed all new lower corner brackets based on the Spiffbot designs.  These add the bulk of the rigidity to the new system.  Feels like a tank now.
  • I remixed the D-bot top XY-idlers, extending them down on Z an extra 20mm, to provide for even more z-rigidity.
  • Switched my X-endstop to now be on the X-carriage instead of the Y-gantry.  Used the ‘X-endstop mount for the direct-drive gantry’, by pizzachef.  This cleaned up a bunch of wiring from the left side.  While it added more mass to the toolhead, it seems pretty negligible.
  • From the D-Bot remix by spauda01, leadscrew brackets and bed supports:
  • All new smaller, 3-wheel brackets for my Y Gantry, by BucketOchicken.  These are nice in providing slightly more space on +/- Y.
  • Used some silicon caulk to affix a 12″ square chunk of cork under the heated bed.  Hopefully will heat up faster, and save some energy.
  • Switched from the front/back leadscrew design to the “middle, side-by-side design” (+ brass nuts), just to try something new, since I had the spare extrusion.  The extrusion is held in place by triangular aluminum brackets, making the base even more rigid.
  • The top front X-beam is now held in place my much stronger aluminum triangle-brackets.

Here’s another pic of some of the updated parts I printed, mocked up to make a very tiny printer 😉

smallxy_akeric

Successes:

  • Once I rebuilt everything, and got all the electronics re-hooked-up, everything still worked!  No magic smoke, nothing exploding.
  • The dumb z-wobble I was experiencing is gone!
    • Update:  Wait, no it’s not.  ARGH!

Issues:

  • With the new L/R leadscrew config, they now hit both my “beefy print cooler fan” (on the left), and my inductive probe (on the right) if printing all the way to the edge of the volume: I’ll need to remove them, and cut about an 1″ off to solve that problem.
  • I ran out of T-nuts:  I had a surplus during my last build, but this one used up all the remaining ones, and then some.  So waiting for that delivery slowed things down a bit.
  • Even with the giant new base-corners, it still wasn’t square on top:  While the based seemed to be nice and square, it took some time to get all the top extrusions back in line.

Overall, a very successful rebuild.  Here’s to another two years of 3d printing!


Jump to C-Bot blog index to see all the posts.

A comparison of Simplify3D and Slic3r Prusa Edition

allBenchies_web

I printed so many 3dBenchies for this comparison….

Preface

I’ve been a 3d printing hobbyist for right around five years now:  I purchased my first printer, a Makerbot Replicator 1 (which I still own, still prints great) in March of 2012.  Since then I’ve used multiple slicers to generate my gcode, but mainly (and in order):  ReplicatorG, MakerWare (now MakerBot Print), and Simplify3D.  And for the time I used them, they’ve all been great.  I’ve also built my own printer a few years ago.

However, and as much as I like Simplify3D:

  • Despite it does so many things so well…
  • The fact that I paid cash money for it.
  • And that their updates are so few and far between…
  • And the updates don’t include fixes to some major issues I feel it has…

I thought I should revisit what slicer software 2017 has available.

I know that slicer software is like religion, politics, and CAD software:  People can get very attached to them.  And there’s a good chance someone out there is going to disagree with my findings : That’s great, I’d like to hear your perspective, leave a comment below.  Everyone uses the software differently, and the things I find important (or not) could be polar opposite of someone else.

Based on a general poll I posted, it looks like these slicers are out in the wild and commonly used.  Yes, there are more, but these seem to be popular:

After reviewing all of them, and for reasons listed below, I decided to investigate Slic3r Prusa Edition.  And mainly that edition over vanilla Slic3r because vanilla Slic3r hasn’t been updated since mid 2015, while the Prusa edition is being actively developed (+ extra fancy features).  I know vanilla Slic3r is still being developed, it’s just been a while since an official release has gone out.

Update:  As it turns out, dev releases of vanilla Slic3r are generated often, so it’s pretty easy to be on the cutting edge, find downloads here.

This is not a post designed to bash Simplify3D and espouse the values of some other slicer:  My goal is to make it an honest comparison of the two software.  It should be noted however, I have over two years of experience with S3D, and only a few weeks on Slic3r, but so many of the concepts of the software overlap, I feel I have a pretty good grasp of it.

Finally, why am I writing this? It’s taken quite a while to do all the research!  Mainly for myself actually:  I wanted to get all my research down on paper to see if I should make a slicer switch or not.  There are so many facets to all of this, I wanted to get it in one place to make sure I wasn’t missing anything.

I will continue to update it over time, see bold “Update” text below.

What I used for testing

  • 3D printer hardware:
    • My custom core-xy C-Bot : It has a 12x12x21″ build volume, auto-leveled on a heated, removable, mic6 aluminum bed covered in a PEI sheet.
    • Runs RepRapFirmware on 32-bit RADDS/Due electronic.
    • All steppers set to 1/128 microstepping using SD6128 drivers.
    • I currently print mainly MakerGeeks PLA out of a .6mm E3D-v6 Volcano nozzle at 230 degrees on a 60 deg bed, with active PLA cooling from a ducted 24cfm fan.
  • 3D Model:  I used the good’ol 3dBenchy as my test model for all comparisons, except the thin-wall compare, it’s linked to below.

So let’s get into it…

Simplify3D

Version Tested: 3.1.1

Unique things it does well

These are things I’ve found it to do, that other slicers may not.  Or it does better.

  • Multiple ‘Processes’:
    • A process in S3D is basically a print preset.  And you always need at least one:
      • s3d_process x
    • The power comes into play however, that you can assign them per mesh to print (if there are multiple being printed):
      • s3d_process_permesh
    • Or by layer height:
      • s3d_process_heights
    • You can even ‘group’ processes so as to link their similar parameters together, so changing one changes all others (see how this works here).  This is extremely powerful, and arguably one of the best parts of the software.  And when I need it, it’s great.  But honestly 95% of the time I don’t need it.
    • Not that it effects me so much, but it has pre-configured profiles for many printers, allowing a larger market-share to have success with the software sooner.
    • I should note that I’ve found no other slicer that treats “processes” as well as S3D.  This is a major selling point, and brings much power and convenience when needed.
  • Print options:
    • In its ‘Advanced Mode’, there’s a knob to tune just about every aspect of your print.
  • Post processing of gcode:
    • You can modify the output of the gcode via S3D’s own custom syntax.  You can see this post on an example of how to do it.
  • Printer communication & machine control panel
    • S3D has a robust “machine control panel” for operting your printer, issuing gcode, printing gcode either over USB, or via SD.  It also allows you to make your own macro’s that show up in the UI.
  • Manual supports:
    • An area where S3D really shines, is how easy it allows you to place and generate your own support material (vertical columns).
    • Even in ‘manual’ mode, you can place them ‘automatically’, then add/remove them as you need.  A nice feature is you can toggle on/off ‘from built platform only’, so you can generate automatic supports for everything touching the bed, the later add in manual supports as needed elsewhere.
    • Support removal has always been great.
  • Technical support:
    • Yes, they actually get back with you if you email them with a problem.
  • Active forums:
    • Linked above:  A very active community.
  • Gcode previewer:
    • Does a great job displaying gcode through a variety of filters (print speed, feature type, etc).
  • Slicing speed:
    • Fastest slicer I’ve ever used, 3DBenchy sliced in 1 second.
  • Print results:
    • There’s no question that once you get your settings tuned right, S3D produces great results.
  • Object transformation:
    • In addition to translation\rotation\scale of parts on the build platter (either via a manip, of numeric entry), you can also specify dimensions, and it will scale to match.  Handy.
  • Multi OS support:
    • I’ve used it on powerful PC’s, and pretty old Mac’s, and it’s never had a problem.

Things it does not do well

This list is the main reason I started looking for other slicer options.  The “Major Issues” are things that I personally feel really, really need to be addressed.

  • Thin wall detection:
    • Major issue“: If you have a wall that’s .5mm thick, but you’re printing with a .6mm nozzle (or extrusion width), S3D won’t print it.  This drives me (and many others) nuts, considering old slicers like Makerware handled this just fine.  Simply having the ability to ‘opt in’ would be great.  Since I print with large (.6 -> 1.2mm) volcano nozzles, it means many files are simply unprintable.
  • Automatic supports:
    • Major issue“: S3D does a great job with manual supports (that you place by hand, which can be accurate but time consuming), but it’s automatic supports (most commonly used) are some of the worst I’ve seen, because… it doesn’t support any type of stalactite (or icicle) like feature.  While the supports it creates are fantastic, and remove great (better than any other slicer I’ve used), when it fails to create them at all where it should ‘automatically’, that’s a major failure.   I have an ongoing thread here with plenty of pics showing this problem.  This is a straight up bug that other slicers don’t have any problem with.  In fact, Simplify3D, KISSlicer, (Update:) CraftWare and ideaMaker have this problem:  Cura, Makerware, Slic3r, and ReplicatorG all handle this just fine .  Here’s an informative pic with the problem.  Just imagine how this can make your prints fail, I’ve had many wreck because of it:
    • overhangCompare
  • Cost, no trial version:
    • That about says it all.  I’ve been told they’ll refund you if you don’t like it after you buy it.  But seriously, there should be a trial for software like this for new people
  • Timely updates
    • They have maybe one update a year… and since it’s closed source software, you have no idea when its going to be released, or what will be in it.  And the last update was pretty lackluster as far as major bugfixes (anything on this list) or improvements.
  • Listening to their community:
    • While they do have tech support (that does respond), they seem to be completely absent from the forum.  Which I personally find quite questionable, since it gives the impression they don’t care about their user base.   There can be a certain topic that has 5 pages of people voting it up, but you never hear if the developers know, or care.
  • Toolpath simplification of high res mesh:
    • Major issue“: This is another major gripe of mine I’ve talked with tech support about, and they seem to have no want to address:  If you pass in a very high-res mesh from zbrush (for example), that may have a much higher poly density that what can actually be printed, the software will do no sort of simplification on the tool path.  The result is that it still tries to print all the detail, and the fallout is your print having a surface quality of oatmeal.  I have example prints that show this off pretty well, as they transition from low-poly to highres mesh.  Their suggested fix is that you manually decimate all your models.  But this means any time I scale a model, I have to re-decimate it for that particular scale (and how do I know how much to decimate it?).  That’s horrible.  Considering other slicers, like ancient Makerware or Slic3r do this for you.\
    • UpdateThis post of mine talks about the problem more, but here are some pics showing it off.  If you enlarge the pic on the right the quality difference is pretty clear.
    • resCompare_s3d_web foot_web
  • Lumping printer settings, print settings, and filament settings into the same preset/Process.
    • Not the end of the world, but since all these things are saved together, it means I need to have… a lot of processes for every speed, resolution, and filament type combo.  Splitting these settings up (like Slic3r) would only make data management easier.
  • Process Storage:
    • Even though S3D does a great job with it’s ‘processes’, it took a step backwards with it’s v3 release:  Up until then, when you’d save a process, it would save on your hard drive, allowing for multiple people to easily share process values.  But with v3, all process are saved “internally” in the software, making it very hard to do any sort of distributed process sharing between employees.  Yes, you can export them out to your HD, but this creates an extra, unnecessary step.  The issue is discussed here.
    • Update:  In addition, if you ever ‘reset S3D to factory settings’, it will wipe all your custom process and firmware setups without warning.  Which would be a non-issue if theses were stored on disk.  I’ve been bit by this in the past, its painful.

Slic3r Prusa Edition

Version Tested: 1.33.8-prusa3d-win64

Unique things it does well

These are things I’ve found it to do, that other slicers may not.  Or it does better.

  • Splitting printer settings, print settings, and filament settings into different presets.
    • slic3r_printsettings_tabs
    • I love this feature.  I can mix and match printer settings, print settings, and filament settings as needed.  Cuts way down on the number of ‘profiles’ needed vs say, S3D.  Plus they’re all saved on disk, easily shareable.
  • Toolpath simplification of highres mesh:
    • You can specify a ‘minimum detail resolution’ that will help it print higres mesh better.  Great feature.
  • Thin wall detection
    • If two walls are close together, they can be collapsed into one, so as to not cause an overextrusion problem in that area.  In addition, within reason (and discussed below in more detail), it will print a collapsed single wall much thinner than your nozzle width, which is desirable.
  • Variable layer height
    • Powerful new feature allowing you to smoothly adjust the print resolution over height.  See an informative post here.
  • Unique infill:
    • In addition to what you’d expect out of a slicer (hexagona, triangluar, grid, etc) Slic3d has additionl types like cubic and 3d honeycomb.
  • Unique top layer infill:
    • Whoe doesn’t love a hilbert curve for their top layer, eh?
  • Notes
    • Simple, but handy:  There’s a notes page for your prefs, to jot down extra info.
  • Max volumetric speed:
    • A handy way, mainly when dealing with bigger volcano nozzles, to limit how much material you extrude.  Based on resarch, the common thought is a volcano heater can melt about 30 mm3/sec, so you can actually enter that in, to make sure you don’t try to extrude more material than you can actually melt.  Which I’ve done before, it’s not good.
  • Verbose cooling description:
    • A little thing, but they have a human-readable paragraph describing how your print cooling fan is going to work, based on the values you set.
  • gcode postprocessing via scripting language of your choice:
    • This is pretty great:  You can pass in code from any scripting language (Python, Perl, JavaScript, etc) to postprocess your gcode.  I found this valuable when I had to modify the gcode output to support my RepRap Firmwares, by writing a custom pos-tprocesser in Python.
  • Slicing speed:
    • Not as fast as S3D, but still pretty fast.  3dBenchy sliced in 4 seconds.
    • Update:  Based on the v1.34 release, which the release notes state moved to a parallelized slicing system, dropped the benchy to a 2 second slice time.  Nice!
  • Print options:
    • In its ‘Advanced Mode’, there’s a knob to tune just about every aspect of your print.
  • Update: Octoprint connection:
    • It can connect to, and upload gcode directly to Octoprint.
  • Update:  Run it from the command line.
    • Fully scriptable from the command-line, no window needed!  That’s great for custom toolchains.
  • Update: Object Modifiers
    • Object Modifiers allow you to use stl files to define volumes of your print for custom print settings.  This is similar to S3D’s ‘processes’, except you can use an stl to define a volume to define the custom settings, rather than just a layer height.
    • You can use your own stl files, or it provides primitives like box, cylinder, sphere, and slab.  With the later you only have to define a height, so it acts a lot like defining a S3D process height.
    • In this example, I have a helix for print, and two cubes defining volumes for custom print settings:
    • slic3r_modifiers

Things it does not do well

  • Printer communication
    • The Prusa edition has the option to connect directly to your printer over a serial/usb connection, but I’ve been unable to get it to work, up through version 1.34.1.24.  Just says my printer is ‘not detected’.
    • Vanilla Slic3r (1.29) doesn’t have this option at all.  It just means you need some other sender software like Printrun or Repetier Host (or, ironically, Simplify3D).
      • The 1.3 dev branch of vanilla Slic3r does have this ability, and I have tested it successfully.
  • Thin wall detection:
    • This is a pro above, but I also found it to be a con:  There were issues on my 3dBenchy tests (mainly the flag-pole hole on the stern) where it would collapse thin walls, but not replace them, causing gaps to form in the walls.  Disabling this option caused noticeable over-extrusion in some areas.
    • Update:  You can track this issue here.
  • Mac support:  It crashes a lot on my (old) mac.  No problem on my PC.
  • Update : Adjusting settings print settings per model:
    • Slic3r only lets you modify the ‘print settings’ per model, you can’t adjust printer or filament settings, which would help greatly.
  • Update : x3g support:
    • This only matters if you have a Makerbot printer (like myself), but while you can export a Makerbot-flavored gcode, you’ll still need some external tool (like gpx) to convert the gcode to x3G.  Technically since Slic3r supports postprocessing of gcode, it could call out to a x3g converter via a scripting language of your choice as well.
  • Update:  Saving/loading ‘scenes’:
    • It seems a bit awkward to save and load a ‘scene’.  To me, a ‘scene’ is  the current 3d mesh on the platter, plus all the current machine, print, and, printer configuration states.  You can do it, but (instead of the File menu) via “Platter -> Export Plate as AMF…” (Additive Manufacturing File Format).  you can later “Add” the xml file that process generates, which has the effect I’m after, it’s just a weird/clunky process.
    • Update:  I’ve read that per v1.34.1 it now supports a .prusa format that should handle this… but I can’t actually find that functionality in the software.
  • Update : Undo : Slic3r hands undo ok inside the print\printer\filament settings, but it doesn’t work on the platter:  I accidentally hit “Delete All”, and I was unable to get my data back :(

Comparing Simplify3D & Slic3r’s successes & failures

  • Print Quality
    • They both print great, in my opinion, see the below section with all the pretty pictures.  After setting up similar profiles in both slicers and printing 3dBenchies, the results look different, but great.
  • Overall level of print settings:
    • They both provide a similar level of knobs to twist for designing your print settings.  A wash.
  • Setting organization:
    • While Simplify 3D’s ‘processes’ are great, based on the fact that I use multiple ones so infrequently, I give Slic3r the win here, since it allows you to split you printer settings, print settings, and filament settings to separate presets, while Simply3D lumps them all into one.  Plus Slic3r’s are saved on disk, while S3D hides them inside the software.
  • Gcode previewer:
    • S3d’s better than slic3r for the fact it has more ways to preview the gcode.  However, both of them physically render the gcode about the same.
  • Gcode postprocessing:
    • Slic3r wins here, with it’s ability to use any scripting language.
  • Printer Communication:
    • S3D does a great job with its Machine Control panel.  Update:  Slic3r’s only seems to currently work in a dev branch.
  • Supports:
    • The supports that S3D actually creates (manual or automatic) are fantastic, but when it completely fails to ‘automatically’ support certain features that cause print failure, it’s just sad.  Slic3r’s supports are pretty standard, but don’t fail when they shouldn’t, so it gets a win for just being status-quo.  Both software could learn from the other.
  • Object Transformations:
    • S3D wins here, providing more tools that are easier to use.
  • Tech support & forums : S3D for the win, just a bigger community (or better communication platform) it seems.  It’s not that Slic3r doesn’t have that, S3D’s just seems more active.
  • Thin wall detection : Even though Slic3r has some problems, the fact that it recognizes them at all (compared to S3d) is a win.
  • Cost : You can’t beat free, Slic3r FTW.
  • Software Updates:  The Prusa Edition of Slic3r seems very actively developed… who knows when S3D will get another update, or what it will even have.
  • Highres mesh toolpath simplification:  Slic3r clearly wins here, realizing this is an important aspect of any highres model.
  • Setting storage:  Slic3r for the win here:  All if it’s printer, print, and filament settings are stored on desk in ini files, easily accessed by others, while S3D hides all the settings in the software itself.
  • Update: x3g support:  S3D wins, supporting it natively, with no extra steps needed for export.
  • Update : Slicing speed:  S3D wins, but with the latest Slic3r release I tested, the gap got a lot smaller.
  • Update : Scene saving/loading : S3D wins, it behaves like you’d expect any software too.  While you can do it in Slic3r, it’s just a bit clunkier.
  • Update : Overall experience:  S3D feels like a more polished piece of software, while Slic3r sill gives me that ‘shareware’ vibe from the 90’s.
  • Update: Setting customization per model / height:  This is a tossup:  S3D makes it easy to define processes by height, and you have full control to all print settings within.  Slic3r allows you to create robust Part Modifiers, but it takes a bit more time, and not all options are available within.
  • Update:  Command line api access:  Slic3r has it, S3D does not.
  • Update: Undo : S3D handles undo great, Slic3r is missing it in some areas.

Things I didn’t test

  • Supports : Since I did this entire test with the 3dBenchy, which requires no supports, I didn’t feel it was important to test them.  But I’ve used plenty of supports generated by S3D in the past, and they were always easily better than the older slicers I used like Makerware or ReplicatorG.  I’ve actually not ever printed supports in Slic3r, just looked at the gcode output.
  • Other slicers :  I was considering mixing ideaMaker, Craftware and Cura into this test… but I’d probably never have finished it.

3dPrint Comparison

I should be noted that all prints have had zero cleanup work done to them.  This is to show all possible flaws.

Print Stats

I did most of my testing with the 3dBenchy model, trying to make sure both slicers had similar values.  This is what I printed with:

  • 280 micron z layer heights (‘medium res’ for a nozzle this size, set to full z-stepper steps).
  • .6mm E3d-v6 volcano nozzle, extruding at .72mm.
  • 2 shells, 3 top and bottom layers.
  • Triangualr infill @ 30%.
  • MakerGeeks Urban Camo PLA extruded at 230 deg, with a .97 extrusion multiplier.
  • Printed at 60mm/sec with active filament cooling, and slowing layers down for details like the smoke stacks.
  • The gcode for both slicers were sent over USB, via S3D.

Printer issues:

  • It should be noted my bot has a slight z-wobble I’ve been working on addressing.
  • Even though I think I have it tuned in for that filament, I feel like my tests were slightly over-extruding.

Print time and weight:

  • Both slicers generated prints weighting 15g.
  • Both prints took exactly 41 minutes.

Visual Gcode Comparison

On the left is Simplify3D, on the right is Slic3r

s3d_bency_gcode slic3r_bency_gcode

You can note the nice on-screen legend that S3D provides, not to mention it has many other display modes.  With Slic3r, on the right is what you get.  Visually, they’re about the same aside from the colors used.

Poll Results

I know I’m biased about what I think are good/bad print results.  I though it would be interesting to see what others thought, that really have no experience with 3d printing.  I did a poll at work where I brought in benchies sliced in both software(shown in the pics below), put it in the kitchen, and over the course of the day let people vote on which they thought was ‘better’.

I had a total of 57 people vote, and by 2:1, they chose the Slic3r version over S3D.  I didn’t tell them anything about how they were made other than “I’m comparing two different prints, what do you think is better?”.  I should also note that a number of people abstained saying “I don’t see any difference”.

Do I feel Slic3r’s visual results outweigh S3D’s by 2:1?  Not at all.  But I still find the results interesting.  Take them for what you will.

Visual Print quality comparison

Click on images to expand.

Side By Side

Beauty shot, side by side, S3D on the left, Slic3r on the right:

s3d_slic3r_compare_web

Pretty darn close!  Slic3r has slightly more stringing, but at a glance they look like twins.

Individual Simplify3D & Slic3r closeups:

s3d_closeup_web slic3r_closeup_web

Thin wall comparison

Since the bencny wasn’t the best test for this, I down laded a “thin wall test” from Thingiverse, and ran them through both slicers.  I didn’t print these, but I didn’t need to:  The gcode preview tells enough.

FYI, the walls on the top start at .05mm (on the left), and end at 1.0mm (on the right).  The walls on the bottom start at 1.0mm (on the left) and end at 3.0mm (on the right).

Again, I generated this gcode with a .6mm nozzle, but with an extrusion width of .72mm (20% over).

Simplify3D

Did not do well at all.  It didn’t start printing until the wall with was greater than my extrusion width, so it left out all walls under .75mm.  Kind of hard to print anything architectural related at scale with this limitation.

s3d_thinWall_lines_web

Slic3r

Did great:  It was able to detect and deal with walls almost 1/3 the width of my nozzle, the first one being .25 mm wide.  Note, this was with “Detect thin walls” turned on in the settings.  With it turned off, it had the exact same results as S3D.

slic3r_thinWall_lines_web

Slic3r ‘Detect thin walls’ issues

Interesting findings:  As mentioned above, Slic3r allows for thing wall detection and collapse, S3D does not.  The above benchy pics of Slic3r have the “Detect thing walls” feature turned on.  But I figured out, it was collapsing more than it should, in the case of the flagpole : There’s a small hole in it, which is also shown in the gcode itself:

slic3r_thinwall2_web slic3r_flagpole_hole

Turning this feature off fixed the flagpole, but caused a slight over-extrusion in other places, like where the bow meets the sidewalls, visualized in this comparison:

slic3r_thingwall_compare_web

Note on the right benchy, the line running parallel to the bow, below it.  But also go look at the top/first pic of the S3D/Slic3r compare above:  You can see the same artifact in the S3D print as well.

The thin wall collapse does help give better definition to features though, compare the portholes in these to Slic3r prints:

slic3r_thinwall_compare2_web

Note how the porthole on the left has better definition.  It looks better than S3D’s as well.

In Conclusion

They’re both great pieces of software, and they both a have many features in my ‘pro’ sections.  But based on the cost involved, how Slic3r has matured, and how few cons Slic3r has in comparisons to S3D’s cons, I’d have a hard time recommending S3D off the bat to someone new to this:  Give the free software a shot.

For myself, I’m definitively going to give Slic3r Prusa Edition a look:  Considering how it addresses all my ‘major con’ issues with S3D (correct automatic supports, properly handles highres mesh, deals with thin edges), I’m going to invest some serious time in it.  I think sometime in the next few months S3D should have another release if they follow years past, I definitively look forward to that will bring.

Finally, I’d like to give some suggestions to the S3D dev’s if they ever end up reading this:

  • Regularly comment on the forums.
  • Expose upcoming features & bug-fixes that are in development:  If I knew all the problems I discussed above would be fixed in an upcoming release, I’d be far less likely to spend the hours I have looking at other slicers.
  • Release more than once a year.
  • Basically, stop being such a black box.
  • Charge a reoccurring fee rather than a single upfront lump-sum:  I’d happily pay, say 5$ a month for an ongoing subscription where the above issues were met.  The OctoPrint Patreon subscription model (that I contribute to on a montly basis) is a great example of this.

Building the C-Bot 3d Printer : Part 36 : Adding an inductive z-probe to RepRap Firmware / RADDS

Jump to C-Bot blog index to see all the posts.


Introduction

This post describes how I installed an inductive Z-probe on my C-Bot 3d printer, using RADDS hardware with RepRap Fimrware.

My C-Bot printer has a 12″ square build plate, with 4-point screw leveling: Not the easiest thing to keep level.  I decided to tackle installing an inductive Z-probe to help with the leveling, since RepRap Firmware supports it.

Very important:  Before you get started, you’ll either need an aluminum build plate, or some copper tape you can stick on your existing surface at the points you want to probe.

Other info:

  • This sensor works in conjunction with your Z-endstop:  You still home using the endstop.  But after the home, the probe takes over fine-tuning the leveling process.

Get the probe:

I picked up a LJ12A3-4-Z/BY inductive probe off E-bay some time back.  It’s stats:

  • 4mm sensing distance (to iron)
  • NO, PNP
  • 6-36v input, 300ma
  • Brown = Positive, Blue = Negative, Black = signal

Make a bracket:

I modeled up a bracket for it in Autodesk Maya, that would hang off the rear of my hotend gantry.

After the probe was mounted to the bracket, I adjusted the probe so it was about 1mm from the build-plate, if the nozzle was touching the plate.  Basically, a different in 1mm from nozzle to probe-base.

probebracket_web

You can download the bracket from Thingiverse here.

Wire it up:

Voltage Divider:

Update:  I’ve been told you can drive these sensor directly off 5v:  I’ve not tested this,but if you’re going to attempt it, it’s worth a shot.  Save you from having to deal with the voltage divider below, and it means you can wire + & – directly into the RADDS board itself.

The probe needs 6-36v, the signal input on the RADDS board only accepts 5v, and my PSU is 12v:  Need to make a voltage divider!  Generally speaking, you need two resistors, with the smaller one half the value of the larger one. Like 10k & 5k.  Of course none of my resistors worked this well, and even when I did find some that may ‘sort of match’, they value they split wasn’t 5v.

After MUCH combinations, I came up with this:  Big 2k (really 1970 on my meter).  Small was two in a series: 1k (really 970) and 670 (really 660) for a total of 1730:  1730 isn’t remotely half of 1970, not even close.  However when setup on my beadboard, it was splitting out to 5.6v, which was the closest I got all day.

Later I read that anything over 3v would trigger things fine, so I was probably making this way harder on myself than I should have.

Mockup on the breadboard, using my Macbook Air as the ‘inductive aluminum surface’ 😉

breadboard_web

Final shrink-wrapped setup.  Resistors hidden beneath the wrap.

voltage_divider_web

RADDS Board:

The signal line needs to run into the “Servo PWM3 pin” (aka Due digital 39, AKA E0_AXIS endstop[3]), which is located in a cluster of solder-points on the corner of the board:  I soldered in a header, so that I could plug my signal line into it.

radds_web

Connect the wires:

Signal from probe (since having it’s voltage lowered above) -> ‘Servo PMW3’ 5v pin on RADDS board (image above).

Positive & Negative probe leads -> PSU 12v +- terminals.

Update the Firmware:

G32 is the command that triggers the probing on the board.  But the probing can be setup two different ways:

  • Use a bed.g macro filled with M30 commands (and others).
  • Use config.g filled with M557 commands, no bed.g.

I like the idea of having a separate macro file to configure my probing:  If bed.g exists, when you execute a G32, the bed.g is parsed.  If there is no bed.g, G32 instead looks for pre-configured M557’s, that live in config.g.

Initial setup

Below, I discuss how I setup config.g and bed.g

config.g

When you first add the code for the probing in config.g, it’s important that you set the ‘Z offset’ in G31 to 0: You’ll later calibrate it and edit it with the final setting.  Here’s my probing section:

M558 P4 X0 Y0 Z1 ; M558 must come before G31.
G31 X49 Y52 Z.4 P500

To break it down:

  • M558 – Set Z Probe Type
    • P4 : Set the sensor type.  When using an inductive sensor plugged in to the PMW3 pin, you need to set this to 4.
    • X0 Y0 Z1 : Use the sensor for the Z axis only.
  • G31 – Set Current Probe
    • X49 Y52 : This is the distance in mm that the sensor is away from the nozzle (used my calipers to roughly figure this out).  Since my sensor is behind and to the right of my nozzle, these are both positive values, since 0,0 is in the front left of the bed.  You can leave these zero, but I’ve read that having them set makes the calibration more accurate.  However, it makes setting up bed.g more complicated (more on that below).
    • Z.4 : This is the difference in height between the sensor and the nozzle.  Set this to zero the first time you set it up, it will be calibrated later.
    • P500 : The ‘trigger value’ : Really only important if using an IR probe, but I read for switches just set this to 500.

bed.g

This is where you define the points to probe/sample.  I’m doing a 5-point probe, but you can use as few as 3.

The only really confusing part is if you’ve entered any probe offsets in config.g’s G31 (above):  They need to be accounted for below, since you’re telling the system where to send the probe.  If the probe has a 50x, 50y offset from the nozzle, and you tell the probe to go to 0,0, it’ll try to run the nozzle outside the bounds of your printer, and much stepper chattering / printer shaking will ensue until you kill the power.

To calculate the below values, this was my process:

  • Home the printer, G28.
  • In my software (Simply3D), manually jog the toolhead around to the 5 points I want to sample  When I get the probe to a sample spot, I note the current X,Y value (which is for the nozzle), and I add the offset values  to it.
  • Make sure the probe is always over the bed!  If you position the probe off-bed, when it goes to sample that point, it’ll drive the bed straight up into your nozzle :(

My bed.g:

M561 
G28
; Probe the bed and do 5-factor auto calibration
; These are the same toolhead points, but with the sensor offsets added. Note, to use these points, you must set config.g's G31 X49 Y52
G30 P0 X49 Y52 Z-99999 ; Four... - Front Left
G30 P1 X49 Y305 Z-99999 ; ...probe points... - Back Left
G30 P2 X299 Y305 Z-99999 ; ...for bed... - Back Right
G30 P3 X299 Y52 Z-99999 ; ...levelling - Front Right
G30 P4 X149 Y152 Z-99999 S5 ; 5th probe point + store the levelling - Center
G1 X0 Y0 ; Send X & Y back to zero before print starts. This is commented out during the initial calibration.

To break it down:

  • M561 – Set Identity Transform : Clear out any previous probing transformation done.
  • G28 –  Home : Must always home before probing.
  • G30 – Single Z Probe :
    • P# : Each sample point must be assigned an index, from 0-4.
    • X# Y# : the location on the bed to send the probe.  These include the offset set in config.g’s G31.
    • Z -99999 : A value less than -9999 tells the system to probe here.
    • S5 : The final probe has the S value entered, telling it to store all 5 points.
  • G1 X0 Y0 : Send the toolhead back to X0 Y0 before print starts.  Just something I like to do, since I purge the nozzle there.  Note, during the initial calibration stage this is commented out, which makes setting the probe to nozzle z-height easier (more below).

Calibrate the nozzle-to-probe height

As discussed above, I set my proximity sensor to be about 1mm above my nozzle height.  These sensors have a 4mm detection distance for highly inductive materials like iron, but for aluminum, it’s much closer, around 1mm it seems.

Once the config.g and bed.g have been updated, fire up the printer, heat up the nozzle and bed (if you can) and execute a G32:  This will both home, and then start the probing sequence (based on what you’ve defined in bed.g).  Be excited as you watch your printer automatically drive around probing for points!  It’s important the nozzle/bed is heated up, because thermal expansion.

When the probing is done (and everything is still hot), use this process to determine the nozzle-to-probe height difference:

  • You can either enter the below commands, or use some other control software (Simplify3D) to do it.
  • G1 Z0 ;  Send the bed\nozzle to the current Z0 position.  This should move the plate close to the nozzle, but not touch it: Should be 1mm or less away.
  • G92 Z10 ; This tricks the machine so it thinks the toolhead is actually 10mm above the bed.
  • Slip a piece of paper between the nozzle and build plate.
  • G91 ; Set Relative moves.
  • G1 Z-.1 ; Start raising the bed\lowering the nozzle by -.1mm values.
  • Track how many moves you make.  Keep raising the bed\lowering the nozzle until the paper just barely moves:  You should still be able to slip the paper under the nozzle.
  • Write that number down.  Mine was -.4mm.
  • Let your machine cool, power it down.

Update config.g and bed.g

Take the positive value of that number from above, and update your config.g’s G31 Z# with it:  This is now your calibrated offset!

G31 X49 Y52 Z.4 P500

In your bed.g, enable the last line to send the toolhead back to G1 X0 Y0 if you want.

The next time you run a G32 and then send the nozzle to Z0, it should be just touching the build plate, allowing you to slip a piece of paper under it with the same friction as above.  If not, something is amiss.

However, it’s possible this position still isn’t optimal for printing the first layer:  I did a test print with a hollow cube (no roof, no floor, 2 shells) just slightly smaller than my build volume.  The nozzle was still slightly too high for good first layer adhesion.  Rather than constantly updating your firmware value to try and tweak this, you can use your slicer software, covered below.

Update your print Profiles:

My slicer software is Simply3D, but I’m guessing other slicers (Slic3r, Cura, etc) work similarly.

Start Script

The start script is the gcode that is execute before a print starts.  The only change I had to make was switch out the line that did the home operation (G28) with the new G3d command, which calls to bed.g, which homes and probes.  This is what mine looks like:

G92 Z0 E0 ; Set current z position to zero.
G1 Z2 ; Lower Z to be safe 2mm.
G32 ; bed.g - home and probe bed - If not probing, this would be G28 instead to just home.
G1 E50 F600 ; Purge nozzle 50mm 10mm sec When a print ends it's retracted by 30mm.
G92 E0 ; zero extruder
G1 X0 Y10 ; Move nozzle to left front corner of build platform.
G92 X0 Y0 ; Zero X & Y here to start the build.

Refine the Z-height

As mentioned above, my first layer was a bit too high, and wasn’t quite sticking right.  Simplify3D has a section in its ‘G-Code’ menu called ‘Global G-Code Offsets’: These allow you to provide an additional global offset to all values in the gcode.  As it turns out, setting XYZ to 0,0,-.025 mm made for a great first layer.  Iterating with this value is far easier/faster than updating the firmware.

Thoughts for dialing this in:

  • With the Z value set to zero (the default), do a test print of a box with a solid bottom.
  • If the first layer doesn’t stick well enough, cancel the print, lower by -.02 and try again.  If you see the extrusion curling up and off the bed as it extrudes, it’s actually to close, and add .02 and try again.
  • Keep iterating on this process until you get a nice stuck first layer.

Final Thoughts

Now that it’s working, I’m so sad I did’t do this sooner.  Full-volume first layers are just ‘spot on’ now.  It’s almost magical to watch it work.  Get an aluminum plate and do this mod!

Resource List:


Jump to C-Bot blog index to see all the posts.