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.

Category: Software

General-purpose computers doing something specific

  • Layered Paper: Mariner’s Compass Block

    Layered Paper: Mariner’s Compass Block

    The Mariner’s Compass pattern on page 133 of Jinny Beyer’s The Quilter’s Album of Blocks and Borders:

    Mariners Compass - Beyer 133
    Mariners Compass – Beyer 133

    Becomes a laser-cut layered paper design:

    Layered Paper - Mariners Compass - Beyer 133
    Layered Paper – Mariners Compass – Beyer 133

    A face-on view with different colors:

    Layered Paper - Mariners Compass - Beyer 133
    Layered Paper – Mariners Compass – Beyer 133

    This seemed like an appropriate use for the stack (well, several stacks) of colored paper I’ve accumulated over the years.

    The illustration in the book is apparently a photograph of a quilt block Beyer put together, so I had to reverse-engineer the Platonic Ideal Block from the image:

    Mariners Compass - minimal shapes - LB layout
    Mariners Compass – minimal shapes – LB layout

    Fortunately, after a bit of fiddling around, I could take advantage of the radial symmetry to duplicate most of the fundamental shapes, so producing the layout really wasn’t all that difficult:

    Mariners Compass - LB layout
    Mariners Compass – LB layout

    The blue tooling lines (upper left) run along the centers of what would be seams in a fabric block, with 2 mm circles defining the endpoints for ease in snapping the lines.

    This being the first block I attempted, I did it all wrong. LightBurn can form the convex hull over a group of shapes, so I just selected pairs of circles, created the hull, and iterated for the minimal shapes required to generate the whole design. That produces the basic layout, but what you really want is the collection of shapes between those hulls that define the actual cutouts, which appears in the lower left image.

    Don’t do it that way, as explained tomorrow with a different block.

    With all the shapes in hand, you duplicate them for all the paper layers you need, removing the shapes corresponding to the color of each sheet. Sheets lower in the stack have fewer cutouts, with the pattern in the lower right being second from the bottom.

    The four holes in the corners fit over rivnuts in a fixture aligning the sheets in a tidy stack:

    Layered Paper - alignment fixture
    Layered Paper – alignment fixture

    Yes, that’s a blooper sheet.

    All in all, it’s easier than I expected to get nice results.

  • Gelatin Capsule Filler Plate

    Gelatin Capsule Filler Plate

    Being a guy of a certain age with a diagnosis of Low Bone Density, I must increase my calcium intake. Rather than add a few hundred calories a day of calcium-rich food that my waistline does not need, I’ll see what adding 600 mg of calcium citrate can do.

    Being a guy of a certain type, I prefer to fill my own capsules, which of course involves Quality Shop Time:

    Gelatin 000 Capsule Fill Plate - cutting
    Gelatin 000 Capsule Fill Plate – cutting

    Quite some years ago, for reasons not relevant here, I acquired several of what were called “manual capsule filling machines” from the usual online sources. During the ensuing years, such devices have fallen under the purview of the DEA and vanished from the import market, leaving (AFAICT) one USA-ian supplier.

    The key difference between “machines” for different capsule sizes is the plate holding the capsule bodies:

    Gelatin 000 Capsule Fill Plate - installed
    Gelatin 000 Capsule Fill Plate – installed

    A complete machine includes three other capsule-size-related parts:

    • A plate holding the caps
    • A plate with conical holes used to shake caps & bodies into their respective plates
    • A guide plate helping mate caps with bodies

    In normal use, you put the “shake plate” on the body or cap plate, dump a pile into it, and shake until most of the caps / bodies fall into the holes. Then you manually insert the rest, invert any that fell in backwards, and generally mess around until they’re all properly oriented in their sockets. After filling the capsules, you put the cap + guide plates atop the bodies, press down firmly, and (ideally) produce 100 filled and sealed capsules.

    It turns out Size 000 capsules are sufficiently chonky that I have no trouble capping the bodies by hand without those other parts, so making just the body plate seemed Good Enough™. The story might be different for Size 1 capsules.

    The external dimensions and screw holes match the original plate, so this one fits the same base:

    Gelatin 000 capsule plate - LB layout
    Gelatin 000 capsule plate – LB layout

    Make one plate and four spacing clips from 6 (-ish) mm acrylic.

    If you can think of anything to do with 100 3/8 inch cylinders of 1/4 inch acrylic, clue me in.

    Size 000 bodies are close enough to 3/8 inch that I cleaned up the holes with a step drill for a nicer fit. Perhaps making the plate from 3 mm acrylic would produce better results.

    Four springs around the screws in the corners support the plate to allow pressing the caps in place. I adjusted the screws to put the top of the plate at exactly the height of the bodies above the blue base place, producing a smooth surface for scraping suspicious white powder into the bodies:

    Gelatin 000 Capsule Fill Plate - filled
    Gelatin 000 Capsule Fill Plate – filled

    Iterate filling and tamping until the capsule contents are firm-but-not-overstuffed, then press the plate downward and secure it with the spacer clips:

    Gelatin 000 Capsule Fill Plate - capped
    Gelatin 000 Capsule Fill Plate – capped

    The clips hold the plate at the proper distance to let the caps slip over the bodies and lock in place. This is tedious, but much faster than doing the entire process on individual capsules one-by-one.

    With the caps locked in place, flip the whole thing above a bowl, remove the clips, press the plate against the base, and 100 finished capsules shower into the bowl.

    You could build a complete filler without having the blue base plate & springs, but I’ll leave that project to your imagination.

    The LightBurn layout as a GitHub Gist:

    Loading
    Sorry, something went wrong. Reload?
    Sorry, we cannot display this file.
    Sorry, this file is invalid so it cannot be displayed.

    No, I am not making one for you. :grin:

  • Laser Cutter: Print-and-Cut Alignment Accuracy

    Laser Cutter: Print-and-Cut Alignment Accuracy

    Up to this point I’ve been making mirror alignment targets entirely on the laser cutter to ensure accurate alignment:

    OMTech 60W laser - beam alignment - focus detail - 2022-03-22
    OMTech 60W laser – beam alignment – focus detail – 2022-03-22

    While that works fine, using Dot Mode takes basically forever to chew its way through any nontrivial number of targets.

    Now that I have more familiarity with LightBurn’s Print-and-Cut feature, I tried printing the graticules, aligning the sheet, then laser-cutting just the perimeters:

    Laser Beam Alignment Targets - cut tabs - smoothed
    Laser Beam Alignment Targets – cut tabs – smoothed

    The smaller targets fit neatly into the hole perpendicular to the beam:

    OMTech CO2 Mirror 2 mount - Y Z screws
    OMTech CO2 Mirror 2 mount – Y Z screws

    The larger ones sit flush on the mirrors at 45° to the beam, so stretching the horizontal scale by 1.414 = √2 makes each tick mark correspond to 1 mm of perpendicular beam offset.

    All of which worked surprisingly well, with some caveats.

    The first gotcha: ordinary consumer-grade inkjet printers do not have CNC accuracy. The corner targets are on 150 mm horizontal centers and 240 mm vertical centers in the LightBurn layout, but my Epson ET-3830 printer put them on 150×241.3 mm centers. This isn’t unexpected, particularly for laser printers, but it means you must use LightBurn’s scaled version of the P-n-Cut alignment.

    I used the upper-right and lower-left targets for the P-n-Cut alignment step, confirming the positioning with a laser pulse putting a tiny hole in the paper:

    Print-and-Cut - target accuracy
    Print-and-Cut – target accuracy

    The lines are 0.5 mm wide and the inner circle is 2 mm in diameter, so my alignment at the upper right is as good as it’s gonna get and the lower left is off by maybe 0.3 mm. While it may be possible to be more accurate, I think half a millimeter is a reasonable error budget for targeting accuracy.

    The laser-perforated circles should overlay the inner printed circles after LightBurn applies the P-n-C corrections. That they obviously do not indicates the effect of the small target errors. In any event, the maximum error seems to be 1 mm, which gives you an idea of just how precise P-n-C might be.

    The perimeter laser cuts are off by about the same amount & direction as the dotted circle in the adjacent target:

    Print-and-Cut - perimeter matching
    Print-and-Cut – perimeter matching

    Overall, errors around 1 mm seem possible with careful attention to detail, but expecting anything better than a few millimeters is probably unreasonable, particularly for layouts larger than a Letter size page.

    Works for me, though!

    The LightBurn SVG layout as a GitHub Gist:

    Loading
    Sorry, something went wrong. Reload?
    Sorry, we cannot display this file.
    Sorry, this file is invalid so it cannot be displayed.
    Loading
    Sorry, something went wrong. Reload?
    Sorry, we cannot display this file.
    Sorry, this file is invalid so it cannot be displayed.

  • Laser Cutter: Improved Tube Support Pads

    Laser Cutter: Improved Tube Support Pads

    A recent mirror alignment check led to complete failure at the laser head aperture just upstream of Mirror 3:

    Beam alignment - M3 fail
    Beam alignment – M3 fail

    Those five spots come from the center of the platform and the four corners; they will overlay into a single spot in a properly aligned machine.

    Pondering my options reminded me that I intended to build new laser tube support pads, because the ones shipped inside the machine seemed crudely made:

    CO2 Laser supports - OEM hardware
    CO2 Laser supports – OEM hardware

    It’s partly disassembled in preparation for the next step.

    The chipboard shims underneath the stack are mine, but the OEM pile was unstable even with the screws tightened. The reason became obvious when I took the stack apart:

    CO2 laser supports - OEM molded parts
    CO2 laser supports – OEM molded parts

    The bump in the middle of the upper block surrounds the post of the laser tube cradle. It looks like this from the side:

    CO2 Laser supports - OEM tube cradle - side view
    CO2 Laser supports – OEM tube cradle – side view

    All of the blocks were crudely molded and could not be stacked into a stable pile. The tech who assembled and aligned the machine tightened the screws so firmly that the washers crushed into saddles:

    CO2 Laser supports - OEM crushed washers
    CO2 Laser supports – OEM crushed washers

    I can do better than that, if only because I’m not on the clock.

    The tube support on the right end (toward the beam outlet) screwed into a nice set of threaded inserts brazed onto the floor of the laser compartment.

    As far as I can tell, the laser cabinet was intended for a real 60 W tube measuring 1200 mm that would stick out into a box on the side of the cabinet, but would allow the left tube support base (shown above) to screw into a similar quartet of threaded inserts. Instead, it has an overdriven 50 W tube measuring 1050 mm with the left support screwed into four crudely hand-drilled and -tapped holes so far off the centerline as to jam the screws against the front end of their slots in order to get the tube barely into alignment, with the screws on the output side jammed against the rear end of their slots.

    To answer a question you may have: the commercial tube supports one might buy from a reputable supplier (or, for that matter, Amazon) are either exactly as wide as the compartment (thus eliminating one degree of freedom) or obviously unsteady, and would surely require drilling more holes in awkward locations.

    So, we begin.

    The general idea is to make a larger set of blocks fitting another quartet of holes with threaded inserts on the right side of the compartment floor:

    CO2 Laser supports - installed right
    CO2 Laser supports – installed right

    On the right, I stuck the bottom block to the shelf with double-sided tape:

    CO2 Laser supports - installed left
    CO2 Laser supports – installed left

    Because I was unwilling to:

    • Drill and tap holes with the tube in place or
    • Remove the tube to get safer access

    The alert reader will note the four tapped holes immediately to the right of the new blocks. Those were evidently intended for a center tube support for the longer tube, because the crudely hand-drilled holes hide just out of view to the left of the new blocks.

    At the far left of that picture, beyond the two holes probably intended for coolant tubes, you can see one of the four holes with tapped inserts that would match longer tubes, where the 50 W tube has its anode and coolant connections.

    The larger blocks I made have a hole accommodating the bulge in the tube cradle to let it slide back and forth as needed:

    CO2 Laser supports - gluing top layers
    CO2 Laser supports – gluing top layers

    That seemed easier and less exciting than attempting to flycut the bottom of the OEM plastic tube cradle.

    The chipboard layer serves as a guide to keep the tube cradle lined up, with its now much shorter screws into the brass inserts epoxied into the plywood layer.

    I glued the top layers together to get a rigid assembly, with the lower layers being replaceable shims adding up to the right height, whatever that might be. The LightBurn layout has an assortment of useful pieces, some of which I didn’t need:

    Laser tube support blocks - LightBurn layout
    Laser tube support blocks – LightBurn layout

    If this were a greenfield project, the leftmost Base MDF pad would come in handy, as its slots are large enough to clear the flat side of the 4 mm rivnuts I’d install in the compartment floor.

    Thin shims come from paperboard boxes & chipboard:

    CO2 Laser supports - thin shims
    CO2 Laser supports – thin shims

    Thicker spacers come from (scrap) plywood and MDF:

    CO2 Laser supports - thIck shims
    CO2 Laser supports – thIck shims

    Skipping ahead a few days, the tube & mirror realignment came out much better:

    Alignment at Mirror 3 - four corners - 2023-09-02
    Alignment at Mirror 3 – four corners – 2023-09-02

    That’s only the four corners of the platform, but it’s OK by me.

    If you’re fussy, the scorches are all low by a bit under 2 mm. Fixing that requires raising the tube by 2 mm, which I can certainly do, but I’m going to let this whole affair mellow out for a while.

    The LightBurn SVG layout as a GitHub Gist:

    Loading
    Sorry, something went wrong. Reload?
    Sorry, we cannot display this file.
    Sorry, this file is invalid so it cannot be displayed.

  • Laser Cutter: Mirror Pin Wrench

    Laser Cutter: Mirror Pin Wrench

    After struggling with pin pliers again, I finally made a pin wrench for the laser cutter’s mirror retaining rings:

    Laser Mirror Pin Wrench - in use
    Laser Mirror Pin Wrench – in use

    The odd grayish tint toward the flat end of the knob comes from residual black filament in the hot end after switching to retina-burn orange PETG.

    The solid model looks about like you’d expect:

    Mirror Pin Wrench - Solid Model
    Mirror Pin Wrench – Solid Model

    The pins are snippets of 3/32 inch = 2.4 mm steel rod with ground-round ends to fit the 2.5 mm pin sockets in the retaining ring.

    They’re rammed into place with a drill press to keep them aligned with the holes:

    Laser Mirror Pin Wrench - pin insertion
    Laser Mirror Pin Wrench – pin insertion

    Pressed flush with the central boss that aligns the wrench with the ring:

    Laser Mirror Pin Wrench - pin leveling
    Laser Mirror Pin Wrench – pin leveling

    Then put the ring on the bench, set the wrench atop the ring with the pins in the sockets, and press firmly to seat the pins to the proper depth. The end results should look like this:

    Laser Mirror Pin Wrench - mirror ring test
    Laser Mirror Pin Wrench – mirror ring test

    The next time I clean the mirrors, there will be less muttering.

    The OpenSCAD source code as a GitHub Gist:

    // OMTech laser cutter mirror pin wrench
    // Ed Nisley – KE4ZNU – August 2023
    // From https://www.thingiverse.com/thing:4146258
    use <knurledFinishLib_v2_1.scad>
    /* [Hidden] */
    ThreadThick = 0.20;
    ThreadWidth = 0.40;
    HoleWindage = 0.2; // extra clearance
    Protrusion = 0.1; // make holes end cleanly
    inch = 25.4;
    //———————-
    // Dimensions
    /* [Knob] */
    PinDia = 2.4; // pin diameter
    PinOC = 20.5; // … on-center spacing
    PinDepth = 10.0; // … hole depth
    LocDia = 14.5; // central stud
    LocLength = 3.0;
    ShaftDia = 26.0; // un-knurled section diameter
    ShaftLength = 15.0; // … length
    KnurlDia = 30.0; // diameter at midline of knurl diamonds
    KnurlLen = 20.0; // … length of knurled section
    /* [Hidden] */
    KnurlDPNom = 32; // Nominal diametral pitch = (# diamonds) / (OD inches)
    DiamondDepth = 0.5; // … depth of diamonds
    DiamondAspect = 2; // length to width ratio
    KnurlID = KnurlDia – DiamondDepth; // dia at bottom of knurl
    NumDiamonds = ceil(KnurlDPNom * KnurlID / inch);
    echo(str("Num diamonds: ",NumDiamonds));
    NumSides = 4*NumDiamonds; // 4 facets per diamond
    KnurlDP = NumDiamonds / (KnurlID / inch); // actual DP
    echo(str("DP Nom: ",KnurlDPNom," actual: ",KnurlDP));
    DiamondWidth = (KnurlID * PI) / NumDiamonds;
    DiamondLenNom = DiamondAspect * DiamondWidth; // nominal diamond length
    DiamondLength = KnurlLen / round(KnurlLen/DiamondLenNom); // … actual
    TaperLength = 0.75*DiamondLength;
    KnobOAL = ShaftLength + KnurlLen + 2*TaperLength;
    //———————-
    // Useful routines
    module PolyCyl(Dia,Height,ForceSides=0) { // based on nophead's polyholes
    Sides = (ForceSides != 0) ? ForceSides : (ceil(Dia) + 2);
    FixDia = Dia / cos(180/Sides);
    cylinder(r=(FixDia + HoleWindage)/2,
    h=Height,
    $fn=Sides);
    }
    //- Build it
    difference() {
    union() {
    render(convexity=10)
    translate([0,0,TaperLength])
    knurl(k_cyl_hg=KnurlLen,
    k_cyl_od=KnurlDia,
    knurl_wd=DiamondWidth,
    knurl_hg=DiamondLength,
    knurl_dp=DiamondDepth,
    e_smooth=DiamondLength/2);
    color("Orange")
    cylinder(r1=ShaftDia/2,
    r2=(KnurlDia – DiamondDepth)/2,
    h=(TaperLength + Protrusion),
    $fn=NumSides);
    color("Orange")
    translate([0,0,(TaperLength + KnurlLen – Protrusion)])
    cylinder(r2=ShaftDia/2,
    r1=(KnurlDia – DiamondDepth)/2,
    h=(TaperLength + Protrusion),
    $fn=NumSides);
    color("Moccasin")
    translate([0,0,(2*TaperLength + KnurlLen – Protrusion)])
    cylinder(r=ShaftDia/2,h=(ShaftLength + Protrusion),$fn=NumSides);
    color("Brown")
    translate([0,0,KnobOAL – Protrusion])
    cylinder(r=LocDia/2,h=(LocLength + Protrusion),$fn=NumSides);
    }
    for (i=[-1,1])
    translate([i*PinOC/2,0,KnobOAL – PinDepth])
    rotate(180/6)
    PolyCyl(PinDia,PinDepth + Protrusion,6);
    }

    It descends from a long line of similar things dating back to the OG Sherline Speed Wrenches.

  • Popsicle Mixing Sticks

    Popsicle Mixing Sticks

    Perhaps popsicle stick mixers?

    Popsicle stick mixer - in action
    Popsicle stick mixer – in action

    I made a batch to see if they’d simplify mixing my usual tiny batches of epoxy … and they do! Now I need not worry about forgetting to wipe off the screwdriver or cross-contaminating the resin / hardener tubes.

    Reshaping the tip so the laser beam enters at right angles to the stick produced a cleaner cut and a slightly narrower blade:

    Popsicle stick mixer - cutting
    Popsicle stick mixer – cutting

    The fixture and LightBurn template I made for the engraved markers came in handy. Aligning the template to the fixture proceeds as with the larger craft stick garden markers.

    A small holder keeps finished sticks ready for use:

    Popsicle stick mixer - presentation box
    Popsicle stick mixer – presentation box

    I don’t know how long the box originally holding 1000 sticks has been sitting on the shop shelf, but it’s at least half full despite my continuing efforts. Maybe I can get ahead on my holiday gift prep?

    The LightBurn SVG template layout as a GitHub Gist:

    Loading
    Sorry, something went wrong. Reload?
    Sorry, we cannot display this file.
    Sorry, this file is invalid so it cannot be displayed.

  • Tour Easy Running Lights: Firmware

    Tour Easy Running Lights: Firmware

    The optoisolator carrying the Bafang controller’s LIGHT signal pulls Pin 2 down to turn the LED on constantly for night riding:

        if (!Morser.continueSending())
            if (digitalRead(PIN_LIGHTMODE) == HIGH)
                Morser.startSending();
            else
                digitalWrite(PIN_OUTPUT,HIGH);      // constantly turn on in headlight mode
    

    That’s the entirety of the program’s loop() function, so there’s not much to the firmware.

    Imagine that: a whole computer devoted to sampling an input bit a zillion times a second and persistently setting an output bit:

    Tour Easy Running Light - Arduino view
    Tour Easy Running Light – Arduino view

    The Morse output to the rear is now “s” rather than “i” for more blinkiness, but I doubt anybody will ever notice.

    The next time I raise the hood on this thing, I’ll add a digital input to select FRONT or REAR mode to get me out of having to remember which hardware goes where.

    The Arduino source code as a GitHub Gist:

    // Tour Easy Running Light
    // Ed Nisley – KE4ZNU
    // September 2021
    // 2023-03 preprocessorize for front/rear lights
    // https://github.com/markfickett/arduinomorse
    #include <morse.h>
    // Bafang headlight output pulls pin low
    #define PIN_LIGHTMODE 2
    #define PIN_OUTPUT 13
    #define FRONT
    #if defined(FRONT)
    #define BLINKS "b e "
    #define POLARITY false
    #elif defined(REAR)
    #define BLINKS "s "
    #define POLARITY true
    #else
    #error "Needs FRONT or REAR"
    #endif
    // second param: true = active low output
    LEDMorseSender Morser(PIN_OUTPUT,POLARITY,(float)10.0);
    void setup()
    {
    pinMode(PIN_LIGHTMODE,INPUT_PULLUP);
    Morser.setup();
    Morser.setMessage(String("qst de ke4znu "));
    Morser.sendBlocking();
    Morser.setSpeed(75);
    Morser.setMessage(String(BLINKS));
    }
    void loop()
    {
    if (!Morser.continueSending())
    if (digitalRead(PIN_LIGHTMODE) == HIGH)
    Morser.startSending();
    else
    digitalWrite(PIN_OUTPUT,HIGH); // constantly turn on in headlight mode
    }