The Smell of Molten Projects in the Morning

Ed Nisley's Blog: Shop notes, electronics, firmware, machinery, 3D printing, laser cuttery, and curiosities. Contents: 100% human thinking, 0% AI slop.

Tag: Improvements

Making the world a better place, one piece at a time

  • Lathe-Turned Almond Butter

    Pure almond butter comes with the somewhat stilted admonition “Must stir product. Oil separation occurs naturally.” I’d just opened a new jar and was busily (and laboriously) stirring when I realized we have the technology:

    Lathe-turned Almond Butter
    Lathe-turned Almond Butter

    I installed the chuck’s outside jaws to grab the jar lid.

    About three hours at 50 rpm, the lathe’s slowest speed, did the trick. We now have the smoothest, creamiest, best-mixed almond butter ever.

    In a month or so, I’ll chuck up an unopened jar to see how well it works without any manual intervention.

     

  • MPCNC: Corner Post Shims

    The rail height measurements suggested three shims could level the MPCNC rails:

    MPCNC Rail Height - 2017-12-23
    MPCNC Rail Height – 2017-12-23

    The numbers inside the lower square give the additional height required to sorta-kinda level the result, keeping in mind we’re not dealing with a particularly stable mechanical setup.

    The figures in the lower right translate sensible metric values into mils. I plucked those sheets from my brass shimstock selection, taped them together into a 42 mil stack, and introduced them to Mr Bandsaw:

    Sawing MPCNC Corner Post Shims
    Sawing MPCNC Corner Post Shims

    The sacrificial sheet underneath the stack prevents bending. Using the saw (with a 24 tpi blade), rather than tin snips or scissors, produces a nice clean flat cut without any curling or bending.

    A brief conversation with Mr Drill Press created screw clearance holes:

    Drilling MPCNC Corner Post Shims
    Drilling MPCNC Corner Post Shims

    N.B.: Brass is fiercely grabby, so don’t use an ordinary twist drill. Blunt ’em if you have a spare set of drills, but a step drill works for my simple needs, shallow holes, and infrequent drilling. In any event, don’t hand-hold the sheets, because they can turn into whirling knives without the formality of warning you first.

    I bandsawed the holes into slots, so I could slide the shims under the corner posts without completely removing the screws, in the hope the posts would stay more-or-less in the same place. Probably doesn’t make any difference:

    MPCNC Corner Post Shim
    MPCNC Corner Post Shim

    Looks like I overtightened the post clamp screw a bit, doesn’t it? So it goes with 3D printed parts.

    Another round of measurements with the shims in place:

    MPCNC Rail Height - 2017-12-25
    MPCNC Rail Height – 2017-12-25

    The numbers on the outside of the bottom set give the difference from the lowest rail in each direction, the inner numbers are the average of the two differences in each corner.

    All of which seems to indicate the pen height now varies by a smidge over 0.1 mm across the span of those 16.5×14 inch plots.

    A plot with all the legends and traces at Z=-0.25 came out OK:

    MPCNC - Leveled plot at Z -0.1
    MPCNC – Leveled plot at Z -0.1

    The legend in the upper left looked slightly faint:

    MPCNC - Leveled plot at Z -0.1 - legend detail
    MPCNC – Leveled plot at Z -0.1 – legend detail

    The upper right legend looks about the same, suggesting my average of differences probably isn’t meaningful.

    Lowering the pen to Z=-0.25 should darken the traces a bit and reduce the effect of any inconsistencies in the tool length probe switch.

    Not, of course, that this will make much difference in actual use; a router will probably shake the whole thing out of alignment in a matter of seconds.

  • MPCNC: Emergency Stop / Feed Hold / Resume Pendant

    The Protoneer CNC Shield has pin headers for GRBL’s Feed Hold and Resume inputs, so it seemed appropriate to put big buttons on the far end of the cable:

    MPCNC - E-stop Hold Resume switch box
    MPCNC – E-stop Hold Resume switch box

    The Emergency Stop Push Button Switch Station arrived for ten bucks delivered halfway around the planet.

    There’s not much to the wiring inside the box:

    MPCNC - E-Stop switch box - interior
    MPCNC – E-Stop switch box – interior

    I drilled a hole to fit the 6 pin Aviation Wire Connectors  I got for this very purpose:

    MPCNC - E-stop switch box - drilling
    MPCNC – E-stop switch box – drilling

    You could CNC machine a precise D-hole, but let’s stay realistic about the application. Applying a deburring tool enlarged the 9/16 inch hole enough to force the 16 mm threads into it, with the drill press holding the connector perpendicular to the box while I hand-turned the chuck to screw it in.

    Although I like the Protoneer CNC Shield, I really really dislike using header pins as connectors:

    MPCNC - Protoneer Wiring - SSR
    MPCNC – Protoneer Wiring – SSR

    Those pins are much too delicate.

    The DC-DC solid state relay input connects to the Arduino’s +5 V power supply through the red mushroom disconnect switch. The mushroom is normally closed to turn on the SSR and connect the power brick’s +24 V supply to the motors; it opens when slapped. GRBL will continue about its business, but without any power to the steppers the MPCNC will stop dead in its tracks. Turn the mushroom cap clockwise to unlatch and reset.

    The disconnect switch should also kill AC power to the router, when I get around to adding one to the mix, probably through a DC-AC SSR.

    AFAICT, the cable should come out of the box on the end with the mushroom switch, putting the “normal” pushbuttons closer to me. I did it the other way around, because I want the panic button to be the most easily reached thing on the benchtop. If I have time to think about it, I can reach around the mushroom to the Hold switch.

  • Epson R380: Re-re-routed CISS Tubing

    Alas, what seemed like a better tube route didn’t work any better and, in fact, the generous loop snagged crosswise between the print head box and the R380’s frame. So I deployed the big diagonal cutters and a nasty end cutter to chop a channel through the side of the box:

    Epson R380 - modified print head box
    Epson R380 – modified print head box

    As far as I can tell, the thin section above the reinforcing gridwork exists specifically to get in the way of routing CISS tubes, but I suppose it could be just for pretty.

    With the tubes coming directly off the top of the tanks and folding neatly as the print head moves under the frame, I could rearrange the supports to hold the tubes in a nearly straight line throughout their motion:

    Epson R380 - straight CISS tube route
    Epson R380 – straight CISS tube route

    So far, so good.

    Although the yellow ink now feeds properly and all the nozzles appear up on the test page, the printer output has an overall cyan tinge that gave the Annual Christmas Letter a gloomy aspect. Maybe the latest bottle of cheap Light Cyan ink isn’t quite as light as it should be?

  • MPCNC: Spirograph Exerciser

    Both bCNC and GCMC include Spirograph generators with more-or-less fixed patterns and sizes, because the code serves to illustrate the software’s capabilities:

    MPCNC - bCNC Spirograph patterns
    MPCNC – bCNC Spirograph patterns
    GGMC Cycloids test patterns
    GGMC Cycloids test patterns

    I wanted to exercise my MPCNC’s entire range of travel, familiarize myself with some new GCMC features, and, en passant, mimic the actual gears in a classic Spirograph, so, of course, I had to write a Spirograph emulator from scratch:

    MPCNC - Full-platform Spirograph - multicolor
    MPCNC – Full-platform Spirograph – multicolor

    The perspective makes a 29×19 inch sheet of paper (made from three B sheets and one A sheet) look not much larger than the 17×11 inch B size sheets in the first two pictures. IRL, it’s a billboard!

    My GCMC code uses notation and formulas from a paper (tidy PDF) on a Gnuplot spirograph generator, with a dash of error checking from the GCMC source.

    The code enumerates the possible gear tooth counts in a pair of vectors from which you select the desired stator and rotor gears using integer subscripts. Because I eventually scale the results to fit the plot area, there’s no need to keep track of actual gear pitch diameters.

    Similarly, the pen offset from the center of the rotor gear is a pure number, which you can think of as the ratio of the offset to the rotor diameter. It can have either sign and may exceed unity, as needed, either of which would be difficult with a physical gear.

    Figuring the number of rotor turns required to complete the pattern requires reducing the gear ratio to a fraction with no common factors, so I wrote a Greatest Common Divisor function using Euclid’s algorithm adapted for GCMC’s bitwise tests and shifts.

    With those values in hand, a loop iterates around the entire pattern to produce a list of XY coordinates in normalized space. Because the formula doesn’t have the weird properties of the Superformula I used with the HP 7475 plotter, I think there’s no need to prune the list to eliminate tiny moves.

    Scaling the entire plot requires keeping track of the actual extents along both axes, which happens in the loop generating the normalized coordinates. A pair of gears producing an odd number of lobes can have different extents in the positive and negative directions, particularly with only a few lobes (3, 5, 7 …):

    Spirograph - 3 lobes - QnD Simulator
    Spirograph – 3 lobes – QnD Simulator

    So I accumulate all four, then scale based on the absolute maximum; I added scalar min() and max() functions.

    Converting the list of scaled points into G-Code turns out to be a one-liner using GCMC’s tracepath() library function. Previewing the results in a Web-based simulator helps weed out the duds.

    The code needs cleanup, in particular to let a Bash script set various parameters, but it’s a good start.

    The GCMC source code as a GitHub Gist:

    // Spirograph simulator for MPCNC plotter
    // Ed Nisley KE4ZNU – 2017-12
    // Spirograph equations:
    // https://en.wikipedia.org/wiki/Spirograph
    // Loosely based on GCMC cycloids.gcmc demo:
    // https://gitlab.com/gcmc/gcmc/tree/master/example/cycloids.gcmc
    include("tracepath.inc.gcmc");
    //—–
    // Greatest Common Divisor
    // https://en.wikipedia.org/wiki/Greatest_common_divisor#Using_Euclid's_algorithm
    // Inputs = integers without units
    function gcd(a,b) {
    local d=0;
    // message("gcd(" + a + "," + b + ") = ");
    if (!isnone(a) || isfloat(a) || !isnone(b) || isfloat(b)) {
    warning("Values must be dimensionless integers");
    }
    while (!((a | b) & 1)) { // remove and tally common factors of two
    a >>= 1;
    b >>= 1;
    d++;
    }
    while (a != b) {
    if (!(a & 1)) {a >>=1;} // discard non-common factor of 2
    elif (!(b & 1)) {b >>= 1;} // … likewise
    elif (a > b) {a = (a – b) >> 1;} // gcd(a,b) also divides a-b
    else {b = (b – a) >> 1;} // … likewise
    }
    g = a*(1 << d); // form gcd
    // message(" " + g);
    return g;
    }
    //—–
    // Max and min functions
    function max(x,y) {
    return (x > y) ? x : y;
    }
    function min(x,y) {
    return (x < y) ? x : y;
    }
    //—–
    // Spirograph tooth counts mooched from:
    // http://nathanfriend.io/inspirograph/
    Stators = [96, 105, 144, 150];
    Rotors = [24, 30, 32, 36, 40, 45, 48, 50, 52, 56, 60, 63, 64, 72, 75, 80, 84];
    //—–
    // Set up gearing
    s = 1; // index values should be randomized
    r = 6;
    StatorTeeth = Stators[s]; // from the universe of possible teeth
    RotorTeeth = Rotors[r];
    message("Stator: ", StatorTeeth);
    message("Rotor: ", RotorTeeth);
    L = 0.90; // normalized pen offset in rotor
    message("Pen offset: ", L);
    g = gcd(StatorTeeth,RotorTeeth); // reduce teeth to ratio of least integers
    StatorN = StatorTeeth / g;
    RotorM = RotorTeeth / g;
    K = to_float(RotorM) / to_float(StatorN); // normalized rotor dia
    Lobes = StatorN; // having removed all common factors
    Turns = RotorM;
    message("Lobes: ", Lobes);
    message("Turns: ", Turns);
    AngleStep = 2.0deg;
    //—–
    // Crank out a list of points in normalized coordinates
    Path = {};
    Xmax = 0.0;
    Xmin = 0.0;
    Ymax = 0.0;
    Ymin = 0.0;
    for (a=0.0deg ; a <= Turns*360deg ; a += AngleStep) {
    x = (1 – K)*cos(a) + L*K*cos(a*(1 – K)/K);
    if (x > Xmax) {Xmax = x;}
    elif (x < Xmin) {Xmin = x;}
    y = (1 – K)*sin(a) – L*K*sin(a*(1 – K)/K);
    if (y > Ymax) {Ymax = y;}
    elif (y < Ymin) {Ymin = y;}
    Path += {[x,y]};
    }
    message("Max X: ", Xmax, " Y: ", Ymax);
    message("Min X: ", Xmin, " Y: ", Ymin); // min will always be negative
    Xmax = max(Xmax,-Xmin); // odd lobes can cause min != max
    Ymax = max(Ymax,-Ymin); // … need really truly absolute maximum
    //—–
    // Scale points to actual plot size
    TableSize = [25in,18in]; // largest possible plot area
    PaperSize = 0 ? [17.0in,11.0in] : TableSize;
    Margins = [0.5in,0.5in] * 2;
    Boundary = PaperSize – Margins;
    message("Boundary: ",Boundary);
    PlotScale = [Boundary.x / (2*Xmax), Boundary.y / (2*Ymax)];
    message("Plot scale: ", PlotScale);
    Points = scale(Path,PlotScale); // fill page, origin at center
    //—–
    // Produce G-Code
    feedrate(6000.0mm);
    safe_z = [-,-,25.0mm];
    plotz = -1.0mm;
    goto([0,0,10.0mm]);
    tracepath(Points, plotz);
    goto(safe_z);

  • MPCNC: GCMC Spirograph Shakedown

    The MPCNC instructions recommend running it for a while, taking it apart, then putting it back together, so all the parts have a chance to relax and get used to working together. To that end, I figured doing some full platform plots would run the rollers over the entire length of the rails:

    MPCNC - Full-platform Spirograph - first pass
    MPCNC – Full-platform Spirograph – first pass

    I taped three B-size sheets together, with an A-size sheet in the far right corner, into a 29×19 inch sheet to put borders around the MPCNC’s 28×18 inch work area. The tape is on the top surface to prevent embarrassing accidents where the pen snags on an edge, at the cost of blurry lines where the ink doesn’t stick quite right.

    The far left corner of the paper washes up on the tool length probe’s base, but the pen position turns out to be so repeatable (it should be!) you can swap them with gleeful abandon and get good results:

    MPCNC - Full-platform Spirograph - multicolor
    MPCNC – Full-platform Spirograph – multicolor

    The pen rumbles along at 12000 mm/min = 200 mm/s = 7.8 inch/s with no hint of wobblulation. Most likely, those big loops aren’t particularly challenging, although watching the big central assembly whip around a tight curve can be startling.

    I modified the pen holder for 3-point support, as the recess for the pen flange isn’t quite deep enough:

    MPCNC - Pen holder - 3 point grip
    MPCNC – Pen holder – 3 point grip

    Good old masking tape holds the pens securely enough for now.

    The glass plate I’d been using for B-size plots doesn’t cover the full area, but I’d set the Z axis limit switch to trip just before the bottom of the rails whacked into the glass. Extending the travel by 5 mm required a snippet of black tape:

    MPCNC - Z axis switch - table limit
    MPCNC – Z axis switch – table limit

    The patterns come from a scratch-built Spirograph generator, because I wanted to review what’s new in GCMC. More on the software tomorrow …

  • MPCNC: Tool Length Probe, Reshaped for Plotter Pens

    It turns out old-school plotter pen nibs skid right off the rounded top of the switch lever:

    MPCNC Tool Length Probe - plotter pen
    MPCNC Tool Length Probe – plotter pen

    You can’t see the nib inside the cap, but you get the idea.

    Flattening the top and adding a snippet of masking tape produces a better outcome:

    MPCNC - Reshaped Tool Probe switch
    MPCNC – Reshaped Tool Probe switch

    I aligned the flat section so it’s parallel to the platform when the switch activates.

    Stipulated: plotter pens aren’t a good test for tool length probing, because they have a locating flange to ensure a consistent position in the pen holder and a rigidly controlled flange-to-tip length:

    HP 7475A Plotter Pen Body - in holder
    HP 7475A Plotter Pen Body – in holder

    What’s going on here involves configuring and testing bCNC’s overall tool change process: not using cutting tools preserves both sanity and hardware!