Archive for the ‘ projects ’ 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.

CNC The Bay

I bought & assembled my X-Carve cnc during Christmas, 2015.  Ever since then, I thought it would be perfect to do topo maps.  I had great success with Denali & Lake Tahoe, but always wanted to do something bigger.  In fact, a year before the X-Carve’s arrival, I’d 3d printed the (lower half) of the San Franisco Bay Area, which I felt turned out well.

Some friends and I took a trip to Firewood Farms in Half Moon Bay, where I picked up a couple slabs of redwood, without really knowing what I was going to do with them at the time.  Then the stars aligned, and I realized one was the perfect shape to do a cnc topo map of the whole bay area.  “The Bay” is the result:

uberbay_final_web

uberbay_persp_web

uberbay_closeup_web

More pics below.

Info on it:

  • The piece measures 17×30″, and about 1.75″ deep.
  • Rough cut was 3h, 10min.  Finish pass was 6h, 20min.   Total was 9.5h (my whole Saturday…).
  • Used a 3-flute .25″ ballnose for both passes, DeWalt router on speed 1.
  • Roughcut feed for X/Y was at 150″/min, finish pass was at 210″/min.
  • Roughcut feed for Z was 20″/min, finish pass was 40″/min : I had to modify my firmware to get these speeds.  I tried a faster z-feed, but the machine couldn’t raise the spindle that fast, and chaos ensued.
  • Very little sanding was needed, based on the 10% stepover during the finish pass.
  • Used terrain2stl to get the topo data.
  • Used Autodesk Maya for all the mesh modification, and text creation.
  • Used MeshCAM for the toolpath generation.
  • Used Universal GcodeSender to send the cam to the machine.
  • Applied a ‘natural’ Minwax stain, and “Blue Lagoon” satin paint.

Issues:

  • I think the poor Arduino Uno couldn’t handle the fast feedrate during the rough terrain parts:  The whole thing would start & stop over and over (giving me an anxiety attack at first), while the buffer caught up with the operations.  Maybe it’s time to get some new electronics?  That really slowed down the finish pass.  Didn’t have any trouble during the rough.
  • I think I could speed up the rough-cut even more by not using MeshCAM’s ‘Use 3D Roughing’ option : while it makes a nice looking roughcut, who cares, it’s all getting cut out anyway.  The result was a lot of small up/down z-travels, that really slowed it down overall.

Here’s a series of photos showing the process:

A shot in Maya, while I got the text arranged:

uberbay_maya_web

1.15 million triangles:

uberbay_maya_polydensity_web

The very first cuts:

uberbay_initialcut_web

Roughcut complete:

uberbay_roughcut_web

The final piece, before stain and paint:

uberbay_unpainted_web

In conclusion, I found this to be really satisfying project, and it looks great hanging on my living-room wall.

 

Using Autodesk Fusion 360 with the X-Carve CNC & 3D Mesh

Overview

I’d been stuck on an old Macbook Air for all my CAD/CAM work for the past number of years.  And because of that, I was limited to MeshCAM (no disrespect, I quite like it, but one of the few mac apps for CNC I could find) for all my 3d-mesh carving.  I’d dabbled with Autodesk Fusion 360, but the ol’ Mac wasn’t powerful enough to handle it well unfortunately.

Finally got a new PC, and can start to branch out into other CAD/CAM apps.  I’ve been using my X-Carve CNC for just over a year now, been a great learning experience both with its hardware, and the CAM software that generates the toolpaths for it.  And as much as I appreciate how much I’ve learned from MeshCAM, I felt like there could be a more robust solution, and that’s where F360 comes into play.  I am by no stretch any sort of CNC expert, just an avid hobbyist, but I was really surprised how much the F360 team has put into its CAM solutions.

The below post is an overview on my first steps to get it working, specifically for cutting 3d mesh (rather than parametric solids) so I don’t forget what I did in the future.

I should note though, if you don’t care about cutting 3d mesh, this tutorial is still a valid intro to generating toolpaths with F360.

Disclaimer : Not a CNC expert.  Not a F360 expert.  What I list below are ways I figured out how to do things by looking through the docs, and a lot of forum posts.  There may be better ways out there to do any of this.  If so, please let me know!

Note, I use the term “RMB” a lot below.  That means “RightMouseButton”.

Updates:

  • 2017-04-23 : Based on the 2.0.2989 release,  they made a huge improvement to importing mesh for CNC cutting.  While I’m not going to go through this whole post updating it, things worth calling out include:
    • It doesn’t have to be a solid body.
    • You no longer have to convert your mesh to a BRep to cut it.
    • It does seem a little twitchy:  Some mesh will come into the CAM workspace fine, others does not.

Fusion 360 CAM Docs

These are the docs I got the most out of when it came to learning its CAM capabilities.

And an informative tutorial:

F360 Installation

Really nothing to report here:  Install went off without a hitch.  It should be noted that F360 is cloud-app, meaning everything you do gets uploaded to the cloud.  I remember back in the day when it first came out there was a way around this, to only ever work locally.  I’ve not looked into that recently though.

Importing your mesh

F360’s CAM package can’t deal with 3d mesh natively (at least, I’ve been unable to find a way) : You first need to convert it into a solid it can deal with.  And in this case, it needs converted to a ‘BRep’ : I’ve been unable to actually figure out what the definition of a BRep is, but I’m guessing it’s a (solid)BodyRepresentation.  This process probably took me the most time to figure out, not having a broad knowledge of how F360 works.  The trick is, you can’t have any ‘history’ enabled when you do the conversion : The menu won’t even be there if that’s the case.

Note if you don’t care about 3d mesh, and just want to cut your solids, you can just skip this section.

Prep the mesh for import

Before you import/convert your mesh, you should be certain of a few things, based on the way you want to import/convert the mesh:

  • There are no holes in it.  It should be a solid mesh, no non-manifold geometry… quality solid geometry.

Triangulated:

  • It should be triangulated:  While F360 accepts quads or n-sided polys, I found that it’s internal triangulation function, which appears to be auto-ran when converting to a BRep, sucks, causing poorly converted mesh. Pre-triangulate your mesh.
  • F360 will complain (but still do the conversion if you tell it to) if the mesh is over 10k tri’s, citing poor performance to BRep’s.  I presume this is for good reason.  Right now, I just auto-downres my mesh via Meshmixer or Remake.
  • Note, if you want to use this method on mesh that is more than 10k tris, you can cut your mesh up into 10k or less chunks via software like Meshmixer, export all those chunks, then import them all in one at a time via the below instructions.  Super clunky.

Quadrangulated:

  • If you want to get passed the 10k poly limit, you can instead import quad-based OBJ data.  The trick is to first get it converted to a quad obj:  I learned most of this from this video.
  • Very important:  Make sure in your F360 Mesh Preferences, the “Triangulate Mesh Polygons” option is turned off.
  • Based on what I’ve read, you can do this via Remake:  First you should still decimate the model to some reasonable amount (via its Retopologize menu).
  • Then, via its Export Model windows ‘advanced’ tab, you can choose OBJ(Quads) as an export format.  You can additionally reduce the poly count here, but remember the tri count will be 2x the quad count you’re putting in.
  • Also note, this tool likes to blue-screen my PC from time to time :(
  • I’ve tried to get software like Meshlab to convert to quads and export as an OBJ, but F360 doesn’t seem to like that output (maybe I’m doing it wrong…).

Import into F360

Initial import steps:

To import in your mesh, regardless of it being triangles or quads:

  • From the Model Workspace, access Create -> Create Base Feature
  • Insert -> Insert Mesh
    • Browse to the mesh on disk, hit “Ok” in the “Insert Mesh” dialog

If you have triangulated mesh:

  • Once inserted, access the RMB marking menu on the mesh and “Mesh to BRep”
  • Finish Base Feature via the top menubar.

The imported mesh:

meshImport

Via either method, at this point you can delete the original mesh from the Browser.

This will now give you a ‘body’ the CAM package can deal with.

f360body

If you have quadrangulated mesh:

  • Press the “Finish Base Feature” after the mesh is imported.
  • Press the Create -> Create Form button:  This will open the Sculpt Environment.
  • Utilities -> Convert
    • Choose : Quad Mesh to T-Splines
    • Select the mesh
    • Hit OK
  • This will create a new T-Spline body.
  • Press “Finish Form” From the top menubar:  This will auto-convert the T-Spline into a BRep (Body1), ready for CAM.
  • And again, here’s the video link I learned most of this from.

Dealing with scale

Note, that based on where you authored your mesh and the units it was in, you may need to scale it up.  For example, I work in Autodesk Maya in cm units.  I need to scale that mesh up by a factor of 1o either before I export, or once in F360, to get it in mm correctly.

Setting up CAM

First, switch to the CAM workspace in F360.

Manage your tools

Before you can start making toolpaths, you need to tell F360 what cutting tools you have:  Via the CAM workspace, access MANAGE -> Tool Library.

Uncheck all the libraries on the left except “Local”/”My Tools”.  Select “My Tools”.

Press the “New Mill Tool” button on the top bar, and start filling out the info for all the bits you own/want to cut with.

Nice page showing what all the values mean:  “New Mill Tool Reference

But in general the below values are always equal to or less than the one that came before it, from the “Cutter” tab:

  • Overall Length:  Total length of the tool,  say, 2.5″ for a fictional bit.
  • Body Length : How much of the tool sticks out of the chuck, or “Holder” in F360 terms. Obviously variable every time you insert it, but say 1.5″ here.  That leaves 1″ inside the chuck.
  • Shoulder Length:  From the tip of the bit to the last part of the thread, even the non-cutting part of the thread, say 1.25″.  That leaves .25″ between the end of the shoulder, and the chuck.
  • Flute Length:  Length of the cutting surface, like 1″:  There’s .25″ of non-usable cutting surface.

I should also note that with the 1/4″ chuck on the DeWalt611, it has 2″ of internal space for bits.

You can also make “Holders” for your different chucks:  Doesn’t seem necessary, but I did it anyway.

Create a Setup

Setups collect the rules that define the the stock to cut, and the toolpaths to cut in them.

Via the SETUP menu: New Setup : This will immediately open the SETUP dialog.  Below are good defaults I start with, but obviously every situation is different.  I skip over values I don’t change.

  • Setup Tab
    • Setup:
      • Operation Type:  Set this to Milling.
    • Work Coordinate System (WCS):
      • Origin: Selected Point : I pick the point on my mesh in the top of bottom left corner, which is the usual (0,0,0) position for the X-Carve:
      • stockZero
  • Stock Tab
    • Stock
      • Mode : Relative Box Size : This creates stock relative to the size of the model you’re working with.
      • Stock Offset Mode : No additional stock:  The stock is the exact size of the model.

This creates a new Setup for the given solid model.  If you hide the body via the lightbulb in the browser, you’ll see a ghost of the resultant stock:

stockGhost

Create a rough clearing operation

Now that there is a setup which defines our stock and the WCS origin, we can start adding toolpaths.  The order is important, since F360 cuts them in that order in Simulate mode.

Note, F360 has great tooltips, many with pictures:  Hover over the given field and see what pops up.

Via the “3D” CAM button, there are two clearing options available:  “Adaptive Clearing” and “Pocket Clearing” :

  • Pocket clearing is closest to what I’m familiar with in MeshCAM:  It removes material layer by layer, which is good for a light-weight machine like the X-Carve.
  • Adaptive Clearing will attempt to burrow down to the full length of your tool, then start cutting material against the full length of the tool. While this sounds great, I’m not sure how well the X-Carve would handle it, and have yet to test at this point (probably would need to cut very slow…).

Choose the “Pocket Clearing” operation:

  • Tool Tab
    • Tool : Select a tool you defined above.  The below “Feed & Speed” section will be auto-populated with that tools defaults.
    • Feed & Speed
      • Adjust as necessary based on the type of material you’re cutting.  How do you know what to set?  Based on my hobbyist level experience it’s all about learning what others have done, + trial & error.
  • Geometry Tab : Controls what area of the mesh will be machined.
  • Heights Tab:  A nice graphical way to set the vertical areas to be machined, and how far the tool-head should retract.
  • Passes Tab
    • Passes
      • Manual Stepover : If you want direct control over this, you can check this and set the min/max values.  Note that F360 can either use hard-coded values, or expressions for the fields : RMB on the “Maximum Stepover” field and “Edit Expression”:  You’ll see something like this pop up:
        • Math.max((tool_diameter – (2 * tool_cornerRadius)) * 0.95; tool_diameter * 0.20)
      • Change it, edit it, etc, based on your needs.  Here’s an example video on how to do that.
      • Direction : Climb by default, but machines like the X-Carve should have it set to “Conventional”, so the cutting edge bites into the material with the direction of toolhead travel.
    • Stock to Leave:  Here you can set how much stock is left over for the finish passes.  How much should you leave?  I generally make this a percentage of the diameter of the finish bit I’m using.
    • Smoothing : In general it sounds like you want this checked on, check the tooltip.
  • Linking Tab
    • Linking
      • Retraction Policy : I’ve had good success with “Minimum Retraction”.
    • Ramp
      • Ramp Type :
        • If you’re cutting wood, “Plunge” seems good.  If you’re cutting metal, then “Helix” is the way to go.

There are obviously many more options, but the above got me started well.

After you hit “Ok” in the dialog, you’ll see the new Pocket operation in the browser show up : While it’s calculating the toolpath a % value will be visible.  After a few seconds, the toolpath should show up, presuming you have the pocket operation selected.

roughPocket2

 

Create one or more finish operations

F360 comes with quite a few finish operations.  Technically you can use can combine as many as you want, but again, build them in order of operation.  In this example, I’ll use the “Parallel” operation, because it most closely emulates what I’m used to in MeshCAM.

Via the 3D  Menu access “Parallel” operation:

  • Tool Tab
    • Tool : Select the tool for this pass. But default it’ll choose the tool used in the operation before it. Note if you choose a different tool, obviously you’ll need to go through a toolchange operation (which on the X-Carve is a very manual step), and need to save out your gcode as multiple files.
  • Geometry Tab : Controls what area of the mesh will be machined.
  • Heights Tab:  A nice graphical way to set the vertical areas to be machined, and how far the tool-head should retract.
  • Passes Tab
    • Passes Options to control the angle of the surface to be machined, the stepover, etc.
      • I like to set my stepover to be 10% of the bit width to give a nice, smooth finish, which you can set as an expression by RMB on the “Stepover” field & “Edit Expression”:
        • tool_diameter * .1
    • Smoothing : Like in the rough cut, this seems good to check on.
  • Linking Tab
    • Linking
      • Retraction Policy : I’ve had good results with “Minimum Retraction”.

After you hit “Ok” in the dialog, you’ll see the new Parallel operation in the browser show up : While it’s calculating the toolpath a % value will be visible.  After a few seconds, the toolpath should show up, presuming you have the parallel operation selected.

parallelFinish

Like mentioned above, you can add more finish passes using different techniques here as needed.

Name your setup and operations

It’s a good idea to name your setup and operations, so you know what you were up to months later.  Click once on a name in the Browser, then click again after a second: It’ll let you rename them:

passNames

Save operation templates

Presuming you get values you like and want to resuse thes on other cuts later, there are two ways to access the data:

  • You can open a previous cut, then RMB on any operation and “copy” it.   You can go to your other cut’s setup, and “paste” it.  Works, but clunky.
  • Better, is to select one or more operations in the browser, and RMB on them -> Store as template : This will give you a broswer to your local HD for storage, and later import via the “Create from Template” Setup RMB menu.

Simulate / preview the cut

This is an incredibly powerful part of F360:  You can pre-visualize your cut.  Either select your setup folder in the Browser, or multi-select all the operations you want to preview (basically, whatever toolpaths are shown will be simulated), and press the  ACTIONS -> Simulate button.

In the SIMULATE popup, check on the “Stock” box.  This will show you the uncut stock.  You can uncheck the “Toolpath” if you don’t want the lines to obscure the view.  Then simply press the > Play button at the bottom of the screen:  All the selected operations will begin previewing their cut:

cutPreview

Green is the roughcut, blue is the final pass.

Using the correct postprocessor

For F360 to generate the correct gcode/nc data, it needs to be post-processed for your given machine.  Since I’m using an Inventables X-Carve (grbl-based), I had to do some searching.

This section has been edited since the original blogging:  Originally I’d found a couple postprocessors online, and they “worked”, but had a “bug” where at the end of the cut, they’d send the machine back to the “machine home” (where the toolhead was when the machine was powered on), not the “work home” (the zero/home position of the cut).  This caused two failed cuts for me as the tool-head ripped into my stock trying to go somewhere bad.

After troubleshooting and posting on the forums, I was made aware that F360 comes with a ‘generic grbl postprocessor’, that needs only one small adjustment.  I’ll show that info below.

Generate or “post” the gcode/nc data

Once you’re happy with your toolpaths, you can ‘post’ the data for your CNC to use.

The big decision here is how you’ll save the operations you’ve made previous:  If they all share the same bit, you can select them all at once in the Browser, and save a single file for all of them.  However, if toolchange is needed, you should save each operation as a separate file, selecting one at a time and going through the below steps.

Via the ACTIONS -> Post Process Menu:

  • Setup your postprocessor.  Since I’m using an X-Carve that runs grbl:
    • Setup : Use Generic Posts
    • In the Post Configuration section, select “grbl.cps – Generic grbl”
    • In the “Property” section in the bottom right, make sure that “useG28” is “No”.  If this is “Yes”, it’ll return to machine home (instead of work home, where you zeroed the cut) upon completion of the job, discussed above.  If this is “No”, it simply raises the toolhead and leaves it there.
    • grbl_post
  • Define the Output folder where you want the .nc data saved.
  • Under Program Settings, set the name of the file under “Program name or number”.
  • Press the “Post” button:  The .nc data is saved to disk.

Cutting with the data

There are number of sender software available to send the .nc data to your machine:  Easel (browser-based) can do it, I’ve had success with Chlipeppr (browser-based), I hear good things about LaserWeb/CNCWeb (browser-based, not yet tried), but currently use Universal GCode Sender (Java applet)  for all my work.

The F360 data didn’t cut any differntly in UGS than MeshCAM data, and had great result:

finalCut

In fact, the few hard-edges around the hemisphere are due to a pencil-cut I was toying around with as an extra pass.

In Conclusion

I feel F360 provides a tremendous amount of power to the hobbyist CNC user, especially considering the price (free).  The learning curve is a bit steep, but it has a large amount of helpful documentation, and videos available.  It’ll be my go-to piece of CAM software in the future, hands down.

 

New CNC Cut : HexBeam

Continuing to play more with MASH in Autodesk Maya, I came up with this experiment:  I used a ramp node with a wave to mask where the hexagons are placed, then randomized their scale.  Applied a dark stain on the uncut top, and a natural stain on all the hexagons.  Material is a reclaimed redwood beam.

hexbeam

About half an hour of modeling in Maya, and 1h45min on the X-Carve CNC with a 1/8″ 1-flute upcut endmill.  Probably another half hour of sanding.