Posts Tagged ‘ gcode

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.

Howto: Pause RepRap Fimrware for filament reload at a specific layer number

Like my previous two posts on the subject:

…since I’ve switched my C-Bot 3d Printer to RepRap Firmware, I needed to figure out how to pause it at a specific layer height in gcode.  The wrinkle this time is I have no LCD hooked up to it, so I wasn’t sure how to unpause it.

As it turns out, it’s darn simple (as it should be):  Enter a M226 at the line you want it to pause:

... bunch of gcode....
; layer 2, Z = 0.38
M226

And bam:  It’ll stop right there, executing what’s in your pause.g macro.  From there, you can change filament as needed, then enter a M24 (executing the resume.g macro) via a connected serial console to start the print back up.

Optionally, like mentioned in the above posts, you can use your slicer software (if it supports it) to post-process the gcode to add in the M226 where you need.  Look to those posts as examples of how to do this.

Note:  I’ve had this fail via Octoprint:  3 hours into a 6 hour SD print the gcode triggered an M226 where it was supposed to.  I watched as the print paused, and then I heard all the fans kick off:  The whole board reset, thus canceling the print.  I tried simple tests with Octoprint using small calibration cubes and got similar (negative) results after only a few lines of printing.  Doing the same tests via Simplify3D’s serial console (still printing off the SD) worked however.  In fact, as a sanity check, during the pause I’d disconnect S3D entirely and unplug the USB, then reconnect USB and reconnect the serial console:  I was able to successfully issue a M24 to restart the print, so right now I’m going that route if I need to do a filament change.

X-Carve CNC learnings : MeshCAM, touchplates, Chilipeppr, & multi-pass cuts

It’s been great having two weeks off over the holidays, and a newly assembled X-Carve.   Following up on previous posts, this is more learning, saved on the web for my future reference.  Current CNC skill level = noob.

MeshCAM

meshCAMWhile Inventable’s Easel ($ = Free) is great, I’ve quickly exhausted it’s capabilities.  Specifically, I want to model 3d objects in Autodesk Maya, and mill them on my X-Carve.  Currently Easel does 2D (cutouts) 2.5D (cutouts at multiple heights) but not full 3D objects.  Reading the forums there appears to be several popular software packages out there that do what I’m after, two of which include MeshCAM ($250-$500) and VCarve ($350-$700).  My issue is I’m on a mac, which is very limiting in the world of CNC as I’ve learned, so I can’t even test V-Carve :-(  MeshCam it is!

MeshCAM does give you a nice fully featured trial period (couple weeks) to check it out.  And it does exactly what I’m after:  Creates multi-pass (roughing, finish) toolpaths based on my 3d objects.  Pros is that it does that well!  Cons is that the UI feels a bit antiquated compared to most 3d software I use, and I can’t really find any robust instructions online (they do email you a tutorial a day once you get the trial though).  But it gets the job done.

List of tutorials I’ve found:

Other Links:

And, it exposed the first issue that prompted this whole post:  Since it provides for multi-pass cuts (requiring a tool change), how can I actually implement them?

Touchplates

To dotouchplate a multi-pass cut (as I’ve been learning), you generally use a big fat bit on the roughing pass to remove a bunch of material, then a finer bit on the finish pass to make it look all nice.  But this obviously means you need to swap bits.  And if you swap bits, how can you guarantee that the Z-height is the exact same on the finish pass as it was on the roughing pass?  Since when you remove bitA and add bitB, there’s no way a human can guarantee the tip of bitB is at the exact same location that bitA’s was.

Reading the forums it quickly became apparent that I needed a ‘touchplate’ : A chunk of metal of a known thickness you can use to effectively ‘close a circuit’ with the spindle bit:  When that circuit is closed, you know you’ve hit the top of the material you’re about to mill (with the bit a known distance above it).

I fashioned my touch-plate out of a scrap of 1/8″ aluminum my father had given me from a previous boat build:  Drilled a small hole in one end, affixed a wire to it through a bolt tapped into it.

From there, per the forums, I connected that to the Arduino Uno’s A5 pin, and another wire with an alligator clip on the end to it to the gShield’s ground.  The main issue is the analog headers on the Arduino are hard to get at because of the gShield on top, but I was able to get a small lead plugged in (see below image).

wiring

But once it was all wired up, how to test, and ultimately use?

ChiliPeppr

ChiliPepprchillipeppr is something I only recently learned about:  A tool for sending gcode to your device, supporting tinyG and Grbl (which the X-Carve uses), and ‘generic serial’. The Universal GcodeSender (Grbl only?) was a close second (and I got it up and running, which required a frustrating update of Java on my mac), but honestly ChiliPeppr just looks cool while you’re using it.  While Easel allows you to send gcode to the gShield, I couldn’t actually get it to execute the (below) touchplate gcode:  The machine would just make a weird vibrating sound.  Could be my complete lack of knowledge on the subject, and I wanted to learn how to use ChiliPeppr anyway.

The first stumbling block was figuring out how to connect ChiliPeppr to my X-Carve (since there are no instructions for ‘first time users’ I could find) : As it turns out, based on the smallish screen of my Macbook Air, the menu on the bottom right that lets you “Download Serial Port JSON sever” wasn’t visible.  You need to install and run that server (a shell pops up to let you know its running) to allow ChiliPeppr to talk to the X-Carve.  Once that was done, I was in business.

One thing I’ve noted about ChiliPeppr every time I’ve used it to make a cut (total of three times now) : It seems to randomly pause.  I have to “unpause” it, and it happily goes along it’s way.  Not sure what is causing this, nor can I find any errors/warnings shown.

Other ChiliPeppr links:

Multi-Pass Cuts

Being the CNC noob that I am, since I couldn’t find any docs for this (meaning, using a combo of MeshCAM, Chilipeppr, and doing multi-pass, tool-changing cuts) anywhere.  So below is a rough outline of my experience doing just that:

  • In MeshCAM I created both a rough and finishing pass, and saved out the gcode using the “Shapeoko GRBL-Inch” postprocessor.
  • I drag & dropped that .nc file into ChiliPeppr.
  • In ChiliPeppr, I used the jog controls to move my toolhead to the bottom-left corner of where I wanted the cut to start.
  • Using the touchplate, I put it under the toolhead, connected the alligator-clip to the it, then created a ChiliPeppr JavaScript macro:
    • macro.sendSerial(“G20\n G92 Z0\n G38.2 Z-.5 F1\n G92 Z.124\n G0 z.25”);
    • The above (modified) code is thanks to a X-Carve forum post by user CharleyThomas.  The raw code on a single line looks like:
    • G20; G92 Z0; G38.2 Z-.5 F1; G92 Z.124; G0 z.25
      • G20 : set to inches
      • G92 Z0 : Zero the Z axis, I added this later:  Before I added this, there was a bug that the first time I’d run the macro, the toolhead would go up, not down.  There was some speculation that since the coordinate system wasn’t set yet, the machine thought the toolhead was too low, and would auto-raise it.  Regardless of the issue, this command solved it.
      • G38.2 Z-.5 F1 : Move the spindle down half an inch max looking for the touchplate
      • G92 Z.124 : Set the z-height to the thickness of the touchplate (mine is .124″)
      • G0 z.25 : Raise the spindle to 1/4″ above the material.
    • Note, as I was authoring this, I realized ChiliPeppr has a ‘Touch Plate’ widget, but I have yet to investigate it.
  • From there I turned on the spindle, and fired off the gcode.
  • When it paused for toolchange, I swapped the bit, then re-executed the above steps with the touchplate and macro to re-zero the z-height.  Then unpaused it to continue the work.

Worked like a charm:

final_pass

In the above pic you can see the finish pass emerge from the rough.

All in all, a pretty rewarding experience.

 

Howto: Pause Marlin for filament reload at a specific layer number

I’ve had fun in the past printing maps with water (SF Bay, Oahu) : Using my Replicator 1 & it’s Sailfish firmware, it was easy via the LCD to set a specific layer number to pause at:  Doing this, I’d calculate which layer the print transitioned from water to land, pause it there, and swap filament.

Marlin firmware (which is on my C-Bot) gives you no such feature via the LCD :  Which means you have to monitor the print, and when it appears land is printing, you quickly pause the bot, go through the manual steps (via the LCD) to lower the bed, possibly move the hotend out the the way, and do the reload.  Afterwards (via the LCD) you have to get everything back into position. Awkward.  I am aware that the latest cut of Marlin allows for filament reload via the LCD:  I’ve been unable to get it to work.  And even if it did work, it’s still not accurate enough since I’m guessing at the layer to pause at.  There must be a better way!

There is:  You can directly edit the .gcode to insert a chunk that will do exactly what you need:  Lets say you want to pause just before layer 2 starts:  You’d find the line starting with the layer change comment…

; Layer 2

in your .gcode file, and then paste this right above it (I’ve included the layer change comment in the below code, plus comments for what the commands are doing):

G91                  ; Put in relative mode
G1 Z10               ; Lower bed by 10mm
G90                  ; Put back in absolute mode
G1 X0 Y0             ; Zero (home) the X & Y
M0 Click To Restart  ; Pause and wait for the user
G91                  ; Put in relative mode
G1 Z-10              ; Raise the bed back up 10mm
G90                  ; Put back in absolute mode
; layer 2, Z = 0.45

Works like a charm :)

If your slicing software supports post-processing of the gcode, it’s possible you can do this work directly in the slicer.  I slice using Simplify3D:  In a given process, it has a section in its ‘Scripts’ tab, at the bottom, called ‘Additional terminal commands for post processing’.  This allows you to enter in script to do a text-replace in your file, to edit it for you.  I learned about it on a forum post here.

To do the above using that system, you’d need to enter this text into that field:

{STRIP ";   postProcessing,"}
{REPLACE "; layer 2," "G91 \nG1 Z10 \nG90 \nG1 X0 Y0 \nM0 Click To Restart \nG91 \nG1Z-10 \nG90 \n; layer 2,"}

Some really important things to note:

  • The fist line that says ‘STRIP’ is super important:  If you don’t do this, Simplify3D will embed a copy of the REPLACE line in the header of the gcode, but won’t properly comment it out, basically ruining the gcode.
  • In the STRIP line, there needs to be exactly three spaces between the semicolon ‘;’ and the ‘postProcessing text.  Any more or less will screw up the strip.  If you copy-paste this code, make sure there are three spaces in there.
  • As you can see, you need to insert newline characters (\n) into the string you’re building for it to show up properly in the gcode later.

Other notes:

  • Handy-dandy gcode reference.
  • If you don’t enter in some text after the M0, it’ll never un-pause (at least for me).
  • I got most of the code on my own, but was able to finish it off based on the help from this thread.
  • My printer starts off in absolute mode by default:  I know this because up at the top of the gcode, I can see a G90 command.
  • The S3D forum post here (under “Additional Terminal Commands For Post Processing”) list other post-processing commands you can use.

Building the C-Bot 3D printer: Part 21 : Software Day 4: PID Autotune & start/end G-Code

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


Total time : 2.5 hours

Even though I need to really un-spaghetti the machine and do the final wiring, I can’t help but want to print more, especially since I installed & tuned the DRV8825 stepper drivers:  I want to make sure they actually work!

Start & End G-Code

At the same time, I wanted to create better start & end G-Code for the bot:  I slice & print using Simplify 3D (S3D):  When you create a new custom printer profile, for the start G-Code, all it does is a G28:  Auto-home.  It seems to take care of the extruder and bed heating for you.

In addition, even though I’d previously figured out how in S3D you can set ‘global G-Code offsets’ in its G-Code tab, which lets you define the offset between home and the build platform, I thought it’d be better to set it in the start G-Code instead. I don’t know why, but it feels safer in there…

I’ve never done any start\end G-Code ‘programming’ before. The start/end G-Code for my Replicator1 was already setup.  So heading off to the ‘G-Code in Marlin‘ page, I researched what I wanted it to do on start:

  • Lower the bed a bit just in-case it hadn’t before
  • Home all axes
  • Warm up the extruder (and eventually heated bed)
  • Purge the nozzle
  • Move nozzle to edge of the bed and zero it (per the above paragraph).
  • Start print

And on end:

  • Turn off extruder and bed heating
  • Lower the z-platform slightly
  • Home XY
  • Disable motors

Another great resource is S3D itself:  Once you’ve connected to your machine, and are in the Machine Control Panel, any commands you issue show up in the Communication log:  So I set about doing each step manually, then creating the G-Code script for them.

What I came up with is currently below.  I’m sure this will change in the future.  But just in case my computer explodes I’ll have a backup here.  Note that [stuff in brackets] is S3D’s own internal syntax for embedding variables to help make the gcode more temperature agnostic.  Pretty nice.

Start G-Code:

G92 Z0 ; Set current z position to zero.
G1 Z20 ; Lower Z to be safe 20mm.
G28 ; Safe Homing of All Axes
M104 [extruder0_temperature] T0 ; Set extruder targe temp
M109 S[extruder0_temperature] T0 ; Wait for extruder current temp to reach target temp.
G1 E50.0 F600 ; Purge nozzle 50mm at 10mm/sec
G92 E0 ; zero extruder
G1 X2 Y26 ; Move nozzle to left front corner of build platform.
G92 X0 Y0 ; Zero X & Y here to start the build.

End G-Code:

M104 S0 ; turn off extruder
M140 S0 ; turn off bed
G92 Z0 ; Set current z position to zero.
G1 Z10 ; Lower Z to be safe 10mm.
G28 X0 Y0 ; Home XY
M84 ; disable motors

So I fired off my first print over USB, and ran into all sorts of weird problems over the next hour.  Long story short:

Gotchas:

  • Every time I change a setting in S3D and want to re-print, I need to turn my printer off and on.  I don’t know if this is a S3D bug, a Rumba bug, a Marlin bug, or what.  But if I don’t do this, the start G-Code won’t properly execute.  Side effects include it not heating and immediately starting a print, or heating up but then never beginning the print after it.
  • Once that was resolved, for the longest time I couldn’t get the filament to stick to the bed:  it would just curl up around the extruder.  I finally realized that a new profile I’d setup had my layer height set to 200 micron… printing with a 1mm wide Volcano nozzle:  Once I set that back to 500 micron the printing had no problems.
  • I really need to get a print-cooler fan installed:  I built a custom one for my Replicator 1 which has really helped.  When I finally got my printing working, and was working on a 2cm test cube, the sides looked pretty good for effectively my second print:
    • not too bad
  • But when it got to the top, the whole print was so hot that the extruded top layer filaments literally started grabbing & collapsing the side-walls.  Plus when I went to remove it when the print was done, it was soft like warm gummy bear:
    • aaaugh
  • Top priority: Get print cooler fan installed.  Or maybe a jet of liquid nitrogen…. :)

PID Autotune:


Update:  Since authoring this post I have switched my electronics to RADDS, and my firmware to Repetier.  See the “Part 31 post” for the latest on it.


 

While my extruder has been heating up fine, I noticed that as it approaches the target temp (say, 200c) it really slows down for the last few degrees, and takes a long time getting to the final temp.  I remember that when I switched my Replicator 2x to Sailfish firmware, the extruders stopped heating up correctly, and talking on the forums they told me I needed to update my PID settings.

PID stands for “proportional-integral-derivative“, something I did not learn about in math class.  But in a nutshell it’s a way via the maths to reach a target value smoothly and quickly, without banging/oscillating all over the place.  And luckily, Marlin comes with a PID autotune feature you can run as G-Code directly from S3D (or any software that can issue G-Code):

M303 E0 S200 C8

Fire that off when you extruder is cold, and a few minutes later it’ll spit out something that looks like this:

Recv:  bias: 213 d: 41 min: 199.38 max: 200.71
Recv:  Ku: 77.96 Tu: 13.40
Recv:  Classic PID
Recv:  Kp: 46.77
Recv:  Ki: 6.98
Recv:  Kd: 78.32
Recv: PID Autotune finished! Put the last Kp, Ki and Kd constants from above into Configuration.h

And those values you then enter back into Marlin’s Configuration.h file.

These were my original values when I authored this blog post:

#define DEFAULT_Kp 46.15
#define DEFAULT_Ki 5.10
#define DEFAULT_Kd 104.32

UPDATE (2016-01-13) :  But I found when my powerful 24cmf cooling fan would kick on to cool the Volcano nozzle, the temp would drop, and it would take a loooong time trying to catch back up.  So instead, I cranked my fan to 100% (255) and re-running the auto-pid gave me the values in the code snatch two paragraphs up.

I never timed the nozzle warmup before, my E3d-V6 Volcano now heats up from cold to 200c in 2min 10 seconds:  Not too bad.

I’ve still not got my heated bed soldered up yet (waiting on 10-gauge wire in the mail), but I’ll run this again on the bed when it’s ready.


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