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: Electronics Workbench

Electrical & Electronic gadgets

  • LightBurn to PrusaSlicer via Inkscape & OpenSCAD

    LightBurn to PrusaSlicer via Inkscape & OpenSCAD

    I laid out the cart coins in LightBurn for two reasons:

    • It’s easy to use
    • Making laser-cut cart coins is much faster than 3D printing

    The LightBurn layout looks like this:

    Cart coin - LightBurn screen shot
    Cart coin – LightBurn screen shot

    The red lines show cuts through the material to produce the overall shape with a hole for a keyring. The black areas show where the laser will raster-scan the surface at lower power to engrave the cart logo, which consists of vector outlines traced from a PNG file.

    LightBurn can export that design as an SVG drawing with all the elements properly aligned and OpenSCAD can import SVG drawings as 2D shapes, but that file produces only the filled outline of the coin:

    Cart coin - OpenSCAD outline screen shot
    Cart coin – OpenSCAD outline screen shot

    Presumably the other elements are still in there, but they’re hidden inside the outline and can’t be manipulated separately in OpenSCAD.

    OpenSCAD can pick out named elements, groups, or layers from the SVG file, but, alas, the LightBurn SVG file has no named items, as shown in this chunk:

    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="57.096mm" he
        <path transform="matrix(-1,0,0,1,0,0)" style="stroke:none;fill:#a000a0;fill-rule:evenodd" d="M350.
        <path transform="matrix(-1,0,0,1,0,0)" style="stroke:none;fill:#00a000;fill-rule:evenodd" d="M357.
        <path transform="matrix(-1,0,0,1,0,0)" style="stroke:none;fill:#00a000;fill-rule:evenodd" d="M358.
        <path transform="matrix(-1,0,0,1,0,0)" style="stroke:none;fill:#00a000;fill-rule:evenodd" d="M359.
        <path transform="matrix(-1,0,0,1,0,0)" style="stroke:none;fill:#00a000;fill-rule:evenodd" d="M343.
    </svg>
    

    So I copied that LightBurn design to put the shapes on two different layers marked for Fill processing:

    • The coin-with-handle
    • The cart logo

    It’s not absolutely necessary to use Fill layers, but they make it easier for me to visualize the shapes as solid objects.

    Subtracting the keyring hole and the cart logo from the overall coin-with-handle produces a single shape (with holes) for one material, plus the logo shapes in another material:

    Cart coin - separated - LightBurn screen shot
    Cart coin – separated – LightBurn screen shot

    Put the logo back in position before proceeding:

    Cart coin - overlaid - LightBurn screen shot
    Cart coin – overlaid – LightBurn screen shot

    Unlike the first LightBurn layout, these two layers won’t cut & engrave a cart coin: they define the shapes in such a way that OpenSCAD can turn them into 3D solid models. It’s straightforward to convert between those layouts and they can reside in the same LightBurn file as the original design; just select the one you want to burn or export, as needed.

    Note that LightBurn and Inkscape use the term “layer” in completely different ways:

    • A LightBurn layer defines the laser control settings for all the geometry in that layer
    • An Inkscape layer collects a bunch of shapes into a logical group, but does not otherwise influence them

    In particular, even though we now have objects in two different layers, the exported LightBurn SVG file still has no names for those layers. Fixing that requires a trip through Inkscape.

    Export the filled layout from LightBurn and open (or import) that SVG file with Inkscape, which automagically names the paths:

    Inkscape auto-generated path names
    Inkscape auto-generated path names

    In order from 5 down to 1, those paths correspond to:

    • The cart logo
    • Three go-fast stripes
    • The coin-with-handle outline with various holes

    Create two layers with memorable names, then move the appropriate paths into those layers:

    Cart Coin - Inkscape layer definitions
    Cart Coin – Inkscape layer definitions

    Save the Inkscape layout as an Inkscape SVG file, which will have contents something like this snippet:

    inkscape:groupmode="layer"
    id="layer2"
    inkscape:label="Coin"><path
      transform="matrix(-1.000003,0,0,
      style="display:inline;fill:#a000
      d="m 350.58594,298.00879 0.58716
      id="path1" /></g><g
    inkscape:label="Logo"
    inkscape:groupmode="layer"
    id="layer1"
    transform="translate(0,5.4354331)"
    style="display:inline"><g
      id="g1"
      transform="matrix(1.000003,0,0,1
        transform="scale(-1,1)"
        style="display:inline;fill:#00
        d="m 357.68781,313.02274 h -3.
        id="path2" /><path
        transform="scale(-1,1)"
        style="display:inline;fill:#00
        d="m 358.29401,310.65811 h -3.
        id="path3" /><path
        transform="scale(-1,1)"
        style="display:inline;fill:#00
        d="m 359.19412,307.96756 h -3.
        id="path4" /><path
        transform="scale(-1,1)"
        style="display:inline;fill:#00
        d="m 343.50088,317.48618 c -0.
        id="path5" /></g></g><metadata
    
    

    Note the inkscape:label="Coin" and inkscape:label="Logo" stanzas corresponding to the layers.

    Import that SVG file into OpenSCAD twice, once to extract each layer by name, extrude the 2D shapes to form a solid model with two parts, and give them distinctive colors:

        color("Gray")
        linear_extrude(height=1.6,convexity=10)
            import("/mnt/bulkdata/Project Files/Prusa Mk4/Models/Cart Coin/Cart Coin - Inkscape layers.svg",
                    layer="Coin",convexity=10);
    
        color("Orange")
        linear_extrude(height=1.6,convexity=10)
            import("/mnt/bulkdata/Project Files/Prusa Mk4/Models/Cart Coin/Cart Coin - Inkscape layers.svg",
                    layer="Logo",convexity=10);
    

    Which looks like this:

    Cart coin - OpenSCAD layer import
    Cart coin – OpenSCAD layer import

    The cart logo exactly fills the matching holes in the coin shape, but because it’s a different OpenSCAD object, it won’t merge with its surroundings.

    Export that model in 3mf format, because it seems better than stl for multi-material models, import it into PrusaSlicer, and get a helpful alert:

    PrusaSlicer multi-material alert
    PrusaSlicer multi-material alert

    Yes, do that thing, then assign the appropriate filament to each object:

    PrusaSlicer cart coin preview
    PrusaSlicer cart coin preview

    Arrange half a dozen instances on the platform and make yourself a set of cart coins:

    Blue cart coins on platform
    Blue cart coins on platform

    Now, the obvious question: “Why not just do this in Inkscape, set up all the layers for OpenSCAD, then also export the geometry to LightBurn?”

    LightBurn recently announced that Version 1.7 will be the last to support Linux, because Linux amounts to 1% of their users and we just don’t produce enough revenue to justify any effort to support us.

    I don’t see standing up a Windows 11 box in the Basement Shop just to drive the laser and there is no way I’ll start running Windows as my daily driver just to design layouts in LightBurn. So, yes, I expect over the next year I’ll be transitioning away from LightBurn to Inkscape + Visicut, even though the latter has some rough edges.

  • Subaru Forester Taillight Bulbs

    Subaru Forester Taillight Bulbs

    I finally got around to replacing the Forester’s taillight bulbs:

    Subaru Forester taillight bulbs
    Subaru Forester taillight bulbs

    The clear bulbs don’t have the same thermal damage as the headlights I replaced a year ago, but the new bulbs should be much brighter.

    Subaru calls them W21/5W and WY21W, respectively, but the rest of the world says 7443 and 7440NA (or 7440A).

    For the record, the taillight assembly comes off (after removing the obvious pair of screws not shown here) by pulling straight back with grippy gloves:

    Subaru Forester taillight mount
    Subaru Forester taillight mount

    Aligning the locating pins with those two latching sockets (why is one green?) requires a flashlight and a bit of dexterity, but easing the slot over the white post first helps a lot. Practice makes perfect: it’s easier on the other side of the car.

  • Anker A1215 PowerCore 13000 Power Banks: Five Years

    Anker A1215 PowerCore 13000 Power Banks: Five Years

    After five years of powering the action cameras on our Tour Easy recumbents, the pair of Anker A1215 PowerCore 13000 USB power banks have about 8 A·hr of capacity with a 2 A load after a full charge:

    Anker PowerCore 13000 - 20204-07-26
    Anker PowerCore 13000 – 20204-07-26

    It seems I did not test them on arrival, so I have no idea what their original capacity might have been, but I’m certain it wasn’t the 13 A·hr implied by their name.

    The sawtooth voltage output looks like the internal controller picks a constant boost (or buck) ratio based on the battery voltage, then adjusts it when the output voltage falls below the lower limit. You can imagine it desperately boosting the ratio as the battery voltage falls off a cliff near the end of the curve.

    I have no idea why the two packs behave so differently, although the voltages are certainly within ordinary USB limits.

    They’ll continue powering the camera on my bike for a while, after which I’m sure they’ll come in handy for something …

  • Tour Easy: Anker 20K V2 USB Power Bank

    Tour Easy: Anker 20K V2 USB Power Bank

    After five years, it’s time to replace the Anker 13000 mA·hr USB power banks / chargers I used with the M20 cameras and then the C100 cameras:

    SJCAM M20 Mount - Tour Easy side view
    SJCAM M20 Mount – Tour Easy side view

    The Anker 325 20K V2 power bank is considerably chunkier, as befits its 20,000 mA·hr cell capacity (although the fine print says 12,500 mA·hr output):

    Anker 20K V2 Power Bank - installed
    Anker 20K V2 Power Bank – installed

    The white tape stripe on the top marks the USB port on the end to reduce the fumbling involved in an out-of-sight socket. There’s also a USB-C port on that end for both charging the pack and powering other devices.

    The new mounting cradle descends directly from the 13000 cradle:

    Anker 325 20KV2 Power Bank - slicer preview
    Anker 325 20KV2 Power Bank – slicer preview

    The model includes a projection of the battery on the XY plane for export to an SVG file suitable for laser-cutting an EVA foam pad to cushion the bumps.

    The OpenSCAD source code as a GitHub Gist:

  • Tour Easy: PTT Button Replacement

    Tour Easy: PTT Button Replacement

    After five years and one cleaning, the PTT button on Mary’s Tour Easy became increasingly intermittent, both failing to activate solidly and sticking closed (there being nothing quite like a hot mic during a good hill climb), so it’s time for an autopsy:

    Failed PTT Switch - as extracted
    Failed PTT Switch – as extracted

    The snap dome is much more scarred at the central contact:

    Failed PTT Switch - snap plate
    Failed PTT Switch – snap plate

    That might be a gold flash coating, but it’s pretty well worn away where it hits the central contact:

    Failed PTT Switch - center contact
    Failed PTT Switch – center contact

    Those scratches surely happened during the previous cleaning pass, as I don’t see any way for the dome to create them.

    The corner contact also shows some scuffs, along with a scar where the dome corner pivots:

    Failed PTT Switch - edge contact
    Failed PTT Switch – edge contact

    All in all, though, it worked quite well.

    The replacement switch, also intended for indoor use on a keypad or some such device, pivots around the front edge and may be easier for her fingertip to activate:

    New PTT Switch - installed
    New PTT Switch – installed

    Hot melt glue seems vastly underrated for how wonderful a structural material it is.

    If this one lasts five years, I’ll be perfectly happy.

  • Speaker Re-Foaming

    Speaker Re-Foaming

    Having recently promoted a pair of Radford Tri-Star 90 speakers to the Sewing Room, it was time to make them presentable:

    Radford Tri-Star 90 speakers - taped grill
    Radford Tri-Star 90 speakers – taped grill

    The original foam grill covering had disintegrated and left fossilized adhesive over the metal gridwork. Being not much for historic accuracy, I used double-sided duct tape (the blue barrier film peels off) and stuck some allegedly acoustic foam in place:

    Radford Tri-Star 90 speakers - re-covered
    Radford Tri-Star 90 speakers – re-covered

    The foam is a single sheet wrapped around three sides and, after some whittling, measured 19.5 inches tall and 19.25 inches wide. The width surely depends on how snugly it’s stretched, so allow a bit more and trim to fit.

    Duct tape probably isn’t the right adhesive for the job, but we’ll see how long it lasts. I really did not want to use spray glue and doubted my ability to slobber liquid stickum without oopsing the cones.

    The speakers sounded great back in the day and they definitely sound much better than my deflicted ears can hear now. Mary thinks they’re OK and that’s all that matters.

    Patrick, wherever you are: thanks!

  • Samsung Microwave Light Improvements

    Samsung Microwave Light Improvements

    After replacing the gas / humidity sensor in the Samsung microwave, replacing the pair of 40 W (!) halogen bulbs with G8 LED bulbs didn’t pose much of a challenge:

    Samsung microwave light - LED-ified reflectorized
    Samsung microwave light – LED-ified reflectorized

    Those are not the best bulbs for the application, as they’re allegedly equivalent to 20-25 W halogens, but I had some on hand from a previous relamping project and they seemed promising.

    G8 halogens have a flattened section just above the pins that these G8 LED bulbs lack:

    G8 halogen vs LED bulb - front view
    G8 halogen vs LED bulb – front view

    It’s more obvious from the side:

    G8 halogen vs LED bulb - side view
    G8 halogen vs LED bulb – side view

    The curvature of the soft silicone LED body magnifies the components to look like they fill all the available space, but a little deft X-acto knife work flensed the body down to fit the microwave’s ceramic socket without exposing any of the electrical innards.

    Because the LEDs dissipate only 3 W and barely get warm, I replaced the original translucent glass diffuser panels with (yes, laser-cut) clear 3 mm acrylic, then tucked a strip of aluminized mylar above the bulb to bounce some of the light from the upper chips down where it would do more good. I think it’s possible to melt the acrylic with a stovetop mishap, but we don’t make those kinds of recipes.

    They’re not daylight shining on the stove, but they’re much brighter than the halogens at maybe 10% of the power.