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: Sherline

Sherline CNC mill

  • Mini-Lathe Cut-Off Tool Holder: Improved Clamp Screw

    Apparently all mini-lathe cutoff tool holders suffer from the same problem:

    Lathe Cutoff Tool - OEM swaged screw
    Lathe Cutoff Tool – OEM swaged screw

    The clamp tightening screw is made from butter-soft Chinese steel with a swaged hex socket. As you’d expect, the hex wrench eventually (as in, after a few dozen adjustments, tops) rips the guts right out of the socket.

    The screw has a M6×1.0 mm threads, but the thread around the hex recess is left-handed. While I could, in principle, print a 127 tooth change gear, rebuild the lathe’s banjo to accommodate it, then single-point a backassward M6 thread, it’s easier to just use a standard socket head cap screw:

    Lathe Cutoff Tool - rebuilt screw
    Lathe Cutoff Tool – rebuilt screw

    The clamp screw passes through the block at an angle:

    Lathe Cutoff Tool - blade view
    Lathe Cutoff Tool – blade view

    Fortunately, the screw is perpendicular to the angled side over on the left, making it easy to clamp in the Sherline’s vise:

    Lathe Cutoff Tool - aligning to screw
    Lathe Cutoff Tool – aligning to screw

    Using the laser aligner seemed like a good idea at the time, but the top of the screw wasn’t particularly well-centered on the hole’s axis. I couldn’t screw the left-hand part (with the socket) in from the bottom and center the block near its surface, because then I couldn’t extract the screw before proceeding.

    I used a diamond burr to grind out a flat for the screw head:

    Lathe Cutoff Tool - clearing screw recess
    Lathe Cutoff Tool – clearing screw recess

    The flat came from about twenty manual G2 I-2.5 full-circle passes, stepping down through the hard steel block 0.1 mm per pass, at a too-slow 4000 RPM and a too-fast 30 mm/min feed, with plenty of water squirted from one side into a shop vac snout on the other. The doodle in the background of the first picture shows a first pass at the layout, with the burr centered at X=-2.5; I actually did the grinding from X=+2.5 so most of the passes started in thin air.

    The screw head started just shy of 10 mm OD and the burr just over 5.2 mm, so the ensuing 5 mm circles created a flat barely large enough. If the flat were perfectly centered on the screw axis, I wouldn’t have had to grind out another millimeter on the left side (toward the bottom of the tool holder body), but it worked out OK:

    Lathe Cutoff Tool - 6 mm SHCS test fit
    Lathe Cutoff Tool – 6 mm SHCS test fit

    The trial fitting also showed the head stuck out ever so slightly beyond the far side of the block, where it would interfere with the blade, so I turned off 0.4 mm off its OD.

    If I had a 50 mm SHCS in hand, I’d have used it. Instead, I extended the threads of a 75 mm screw, then lopped off the end to the proper length. I’ll spare you the ordeal, including the moment when I reached for the cutoff tool to shorten the screw. A bag of such screws will arrive shortly, in preparation for future need.

    Now the [deleted] cut-off holder works the way it should have from the beginning.

  • Drag Knife Blade Ejector Handle

    The LM12UU drag knife holder buries the blade ejector pin deep inside the machinery:

    Drag Knife - LM12UU ground shaft - assembled
    Drag Knife – LM12UU ground shaft – assembled

    So a handle with a pin makes sense:

    LM12UU Drag Knife Ejector Pin Pusher
    LM12UU Drag Knife Ejector Pin Pusher

    It’s a variant Sherline tommy bar handle, so there’s not much to say about it.

    The dark butt end comes from the traces of the black filament I used for the previous part. Even after flushing half a meter of orange through the hot end, you’ll still see some contamination, even with the same type of plastic. Doesn’t make much difference here, though.

  • Sony NP-FM50 Battery Disassembly

    Having won an eBay action for a known-dead Sony DSC-F717 at $0.99 (plus $15 shipping, the seller being no fool), I now have a possibly salvageable camera, a Genuine Sony AC supply, and two more NP-FM50 batteries for about the price of any one of the components.

    One battery arrived stone-cold dead, suggesting the camera had been put away with the battery installed for a very long time and they died companionably. The camera still charges a (good) battery, even though it doesn’t turn on, and perusing the schematics suggests checking the power switch, because it’s always the switch contacts. That’s for another day, though.

    For the record, the battery status:

    NP-FM50 - 2019-03-30
    NP-FM50 – 2019-03-30

    The red and green traces come from the two batteries I’ve been cycling through the camera since, um, 2003, so they’re getting on in years and correspondingly low in capacity.

    The fourth battery (2019 D, the date showing when it arrived, not its manufacturing date) went from “fully charged” to “dead” in about three seconds with a 500 mA load, producing the nearly invisible purple trace dropping straight down along the Y axis.

    Sawing the dead battery case around its welded joint at a depth of 0.75 mm, then prying with a small chisel, exposed the contents without histrionics:

    Sony NP-FM50 battery - cell label
    Sony NP-FM50 battery – cell label

    Now, there’s a name to conjure with. Turns out Sony sold off its Fukushima battery business a while back, so these must be collectibles. Who knew?

    The lower cell is lifeless, the upper cell may still have some capacity. Three pairs of 18500 lithium cells are on their way, in the expectation of rebuilding the weakest packs.

    After desoldering the battery tab on the right from the PCB, it occurred to me I needed pictures:

    Sony NP-FM50 battery - PCB exposed
    Sony NP-FM50 battery – PCB exposed

    Yeah, that’s a nasty melted spot on the case, due to inept solder-wickage.

    Unsoldering the three tabs closest to the case releases the cells + PCB from confinement:

    Sony NP-FM50 battery - PCB overview
    Sony NP-FM50 battery – PCB overview

    I’m still bemused by battery packs with a microcontroller, even though all lithium packs require serious charge controllers. At least this is an Atmel 8-bitter, rather than 32-bit ARM hotness with, yo, WiFi.

    The cells have shaped tabs which will require some gimmicking to reproduce:

    Sony NP-FM50 battery - cell tabs
    Sony NP-FM50 battery – cell tabs

    Now, if only I could reboot the camera …

  • Multimeter Probe Cable: FAIL

    A reasonably good silicone-wire multimeter probe set arrived last spring and has worked well enough (I thought, anyhow) for the usual voltage measurements, but recently failed while measuring a small current. We all know how this will turn out, but the details may be of some interest.

    Measuring the resistance from tip to plug located the fault to the black probe, after which I poked a pin through the insulation near the plug:

    Multimeter probe - diagnosis
    Multimeter probe – diagnosis

    The two leads near the bottom go to my shiny Siglent bench multimeter. Despite their similarity to the failed probes, I’m pretty sure Siglent has better QC (well, mostly).

    The probe’s resistance was near zero from the tip (offscreen to the left) to the pin and megohms from pin to plug (on the right). Figuring the wire worked loose, I pulled it away from the plug:

    Multimeter probe - disassembly 1
    Multimeter probe – disassembly 1

    Huh.

    Although I wouldn’t have trusted those probes anywhere near their alleged 1 kV rating, seeing that exposed copper-like substance was disconcerting.

    Hacking off the strain relief bushing around the wire got closer to the fault:

    Multimeter probe - disassembly 2
    Multimeter probe – disassembly 2

    And, finally, the problem becomes obvious:

    Multimeter probe - disassembly 3
    Multimeter probe – disassembly 3

    Yet Another Cold Solder Joint:

    Multimeter probe - cold solder joint
    Multimeter probe – cold solder joint

    Pulling a black banana plug from the heap, I decided to drill a proper hole to anchor the wire:

    Multimeter probe - drilling plug
    Multimeter probe – drilling plug

    Which looked like this afterward:

    Multimeter probe - soldered plug
    Multimeter probe – soldered plug

    And produced a strongly mismatched pair:

    Multimeter probe - repaired
    Multimeter probe – repaired

    Ain’t it amazing how much fun you can have for a few bucks, all delivered by eBay? [sigh]

  • Astable Multivibrator: RGB LED Strut Fixture

    One cannot (or, perhaps, should not attempt to) solder parts to 14 AWG wires seated in a 3D printed battery holder base, so I cleaned up the edges of two polycarbonate scraps:

    RGB LED Strut Fixture - flycutting setup
    RGB LED Strut Fixture – flycutting setup

    Then drilled holes to match the strut positions:

    RGB LED Strut Fixture - drilling
    RGB LED Strut Fixture – drilling

    The holes fit snippets of the original wire insulation, because, after all, polycarbonate is a thermoplastic, too.

    Stretch some copper wire to straighten and work-harden it, add insulation snippets, then maneuver everything in place:

    RGB LED Strut Fixture - assembled
    RGB LED Strut Fixture – assembled

    I definitely need a third (and maybe a fourth) hand to hold each part, the solder, and the iron, but at least the wires won’t walk away in the middle of the process.

  • Toy Cast Iron Stove Lid Lifter

    This seemed appropriate for a day involving toys of all descriptions…

    A cast iron stove (most likely a mid-last-century reproduction rather than a Genuine Antique™) emerged from a living room recess:

    Toy stove with repaired lid lifter
    Toy stove with repaired lid lifter

    The line across the lid lifter handle shows where it broke, long ago, likely while being played with. Back then, I’d done a static-display-grade fix with a dab of clear epoxy, but a better repair seemed called for; my repair-fu has grown stronger.

    I expected the handle to be pot metal, so drilling a hole in both ends for a music-wire stiffener seemed reasonable:

    Toy lid lifter - laser alignment
    Toy lid lifter – laser alignment

    Much to my surprise, the carbide bit skittered off the surface, leaving fine swarf standing on the end. Turns out the lid lifter is cast iron, just like the rest of the stove!

    Given that much of a clue, I aligned the pieces in a pair of machinist’s vises:

    Toy lid lifter - alignment
    Toy lid lifter – alignment

    Slide apart (the vises stand on a smooth glass sheet; the nubbly side is down), dab silver solder flux on the ends, capture a snippet of 40% silver solder in the gap:

    Toy lid lifter - silver solder setup
    Toy lid lifter – silver solder setup

    Hit it ever so gently with a propane torch and slide together:

    Toy lid lifter - silver soldered
    Toy lid lifter – silver soldered

    The solder flows at 1200 °F = 650 °C, roughly corresponding to the blue-gray color near the joint. The nice purple (540 °C) on the left shows where I held the flame to start, with yellows (400 °C) on both sides. Good enough, sez I, it’s going to be a static-display exhibit.

    Most of the solder went to the back side, so I filed it smooth and buffed off most of the heat coloration with a stainless-steel wire wheel in the Dremel:

    Toy lid lifter - bottom
    Toy lid lifter – bottom

    A little more wire-brush action left the front side looking good:

    Toy lid lifter - top
    Toy lid lifter – top

    As with most of the repairs around here, it simply makes me feel better …

    Now, go play with your toys!

  • Astable Multivibrator: NP-BX1 Base

    Adapting the NP-BX1 battery holder to use SMT pogo pins worked well:

    NP-BX1 Holder - SMT pogo pins
    NP-BX1 Holder – SMT pogo pins

    The next step is to add sockets for those 14 AWG wires:

    NP-BX1 Battery Holder - Wire Posts - solid model
    NP-BX1 Battery Holder – Wire Posts – solid model

    Start by reaming / hand-drilling all the holes to their nominal size and cleaning out the pogo pin pocket.

    Solder wires to the pogo pins and thread them through the holder and lid:

    Astable - NP-BX1 holder - pogo pin soldering
    Astable – NP-BX1 holder – pogo pin soldering

    That’s nice, floppy silicone-insulated 24 AWG wire, which may be a bit too thick for this purpose.

    The pogo pins will, ideally, seat with the end of the body flush at the holder wall. Make it so:

    Astable - NP-BX1 holder - pogo pin protrusion
    Astable – NP-BX1 holder – pogo pin protrusion

    Dress the wires neatly into their pocket:

    Astable - NP-BX1 holder - pogo pin wiring
    Astable – NP-BX1 holder – pogo pin wiring

    Butter the bottom of the lid with epoxy, clamp in place, set it up for curing, then fill the recess:

    Astable - NP-BX1 base - curing
    Astable – NP-BX1 base – curing

    While it’s curing, make a soldering fixture for the 14 AWG wires:

    Astable - drilling strut soldering fixture
    Astable – drilling strut soldering fixture

    The holes are on 5 mm centers, in the expectation other battery holders will need different spacing.

    Solder it up and stick the wires into the base:

    Astable - NP-BX1 base - detail
    Astable – NP-BX1 base – detail

    Jam a battery in and It Just Works™:

    Astable - NP-BX1 3.8V - 20ma-div - cap V
    Astable – NP-BX1 3.8V – 20ma-div – cap V

    The traces:

    • Green = supply current at 20 mA/div
    • Yellow = LED driver transistor base voltage
    • Purple = other transistor collector voltage
    • White = base – collector voltage = capacitor voltage

    The measurement setup was a bit of a hairball:

    Astable - NP-BX1 base - current probe
    Astable – NP-BX1 base – current probe

    For completeness, here’s the schematic-and-layout diagram behind the circuitry:

    Astable - NP-BX1 base - schematic
    Astable – NP-BX1 base – schematic

    I love it when a plan comes together!

    The OpenSCAD source code as a GitHub Gist:

    // Holder for Sony NP-BX1 Li-Ion battery
    // Ed Nisley KE4ZNU January 2013
    // 2018-11-15 Adapted for wire leads from 1.5 mm test pins, added upright wire bases
    // Layout options
    Layout = "Fit"; // Show Build Fit Case Lid Pins
    //- Extrusion parameters – must match reality!
    // Print with +2 shells and 3 solid layers
    ThreadThick = 0.25;
    ThreadWidth = 0.35;
    HoleWindage = 0.2;
    function IntegerMultiple(Size,Unit) = Unit * ceil(Size / Unit);
    Protrusion = 0.1; // make holes end cleanly
    inch = 25.4;
    BuildOffset = 3.0; // clearance for build layout
    Gap = 2.0; // separation for Fit parts
    //- Basic dimensions
    WallThick = 4*ThreadWidth; // holder sidewalls
    BaseThick = 6*ThreadThick; // bottom of holder to bottom of battery
    TopThick = 6*ThreadThick; // top of battery to top of holder
    //- Battery dimensions – rationalized from several samples
    // Coordinate origin at battery contact face with key openings below contacts
    Battery = [43.0,30.0,9.5]; // X = length, Y = width, Z = thickness
    Contacts = [[-0.75,6.0,6.2],[-0.75,16.0,6.2]]; // relative to battery edge, front, and bottom
    ContactOC = Contacts[1].y – Contacts[0].y;
    ContactCenter = Contacts[0].y + ContactOC/2;
    KeyBlocks = [[1.75,3.70,2.90],[1.75,3.60,2.90]]; // recesses in battery face set X position
    //- Pin dimensions
    ID = 0;
    OD = 1;
    LENGTH = 2;
    PinShank = [1.5,2.0,6.5]; // shank, flange, compressed length
    PinFlange = [1.5,2.0,0.5]; // flange, length included in PinShank
    PinTip = [0.9,0.9,2.5]; // extended spring-loaded tip
    PinChannel = PinFlange[LENGTH] + 0.5; // cut behind flange for solder overflow
    PinRecess = 3.0; // recess behind pin flange end for epoxy fill
    echo(str("Contact tip dia: ",PinTip[OD]));
    echo(str(" .. shank dia: ",PinShank[ID]));
    OverTravel = 0.5; // space beyond battery face at X origin
    //- Holder dimensions
    GuideRadius = ThreadWidth; // friction fit ridges
    GuideOffset = 7; // from compartment corners
    ThumbRadius = 10.0; // thumb opening at end of battery
    CornerRadius = 3*ThreadThick; // nice corner rounding
    CaseSize = [Battery.x + PinShank[LENGTH] + OverTravel + PinRecess + GuideRadius + WallThick,
    Battery.y + 2*WallThick + 2*GuideRadius,
    Battery.z + BaseThick + TopThick];
    CaseOffset = [-(PinShank[LENGTH] + OverTravel + PinRecess),-(WallThick + GuideRadius),0]; // position around battery
    LidOverhang = 2.0; // over top of battery for retention
    LidSize = [-CaseOffset.x + LidOverhang,CaseSize.y,TopThick];
    LidOffset = [0.0,CaseOffset.y,0];
    //- Wire struts
    StrutDia = 1.6; // AWG 14 = 1.6 mm
    StrutOC = 45;
    StrutSides = 3*4;
    StrutBase = [StrutDia,StrutDia + 4*WallThick,CaseSize.z – TopThick]; // ID = wire, OD=buildable
    //———————-
    // 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);
    }
    //——————-
    //– Guides for tighter friction fit
    module Guides() {
    translate([GuideOffset,-GuideRadius,0])
    PolyCyl(2*GuideRadius,(Battery.z – Protrusion),4);
    translate([GuideOffset,(Battery.y + GuideRadius),0])
    PolyCyl(2*GuideRadius,(Battery.z – Protrusion),4);
    translate([(Battery.x – GuideOffset),-GuideRadius,0])
    PolyCyl(2*GuideRadius,(Battery.z – Protrusion),4);
    translate([(Battery.x – GuideOffset),(Battery.y + GuideRadius),0])
    PolyCyl(2*GuideRadius,(Battery.z – Protrusion),4);
    translate([(Battery.x + GuideRadius),GuideOffset/2,0])
    PolyCyl(2*GuideRadius,(Battery.z – Protrusion),4);
    translate([(Battery.x + GuideRadius),(Battery.y – GuideOffset/2),0])
    PolyCyl(2*GuideRadius,(Battery.z – Protrusion),4);
    }
    //– Contact pins
    // Rotated to put them in their natural oriention
    // Aligned to put tip base / end of shank at Overtravel limit
    module PinShape() {
    translate([-(PinShank[LENGTH] + OverTravel),0,0])
    rotate([0,90,0])
    rotate(180/6)
    union() {
    PolyCyl(PinTip[OD],PinShank[LENGTH] + PinTip[LENGTH],6);
    PolyCyl(PinShank[ID],PinShank[LENGTH] + Protrusion,6); // slight extension for clean cuts
    PolyCyl(PinFlange[OD],PinFlange[LENGTH],6);
    }
    }
    // Position pins to put end of shank at battery face
    // Does not include recess access into case
    module PinAssembly() {
    union() {
    for (p = Contacts)
    translate([0,p.y,p.z])
    PinShape();
    translate([-(PinShank[LENGTH] + OverTravel) + PinChannel/2, // solder space
    ContactCenter,
    Contacts[0].z])
    cube([PinChannel,(Contacts[1].y – Contacts[0].y),PinFlange[OD]],center=true);
    for (j=[-1,1]) // wire channels
    translate([-(PinShank[LENGTH] + OverTravel – PinChannel/2),
    j*ContactOC/4 + ContactCenter,
    Contacts[0].z – PinFlange[OD]/2])
    rotate(180/6)
    PolyCyl(PinFlange[OD],CaseSize.z,6);
    }
    }
    //– Case with origin at battery corner
    module Case() {
    difference() {
    union() {
    difference() {
    union() {
    translate([(CaseSize.x/2 + CaseOffset.x), // basic case shape
    (CaseSize.y/2 + CaseOffset.y),
    (CaseSize.z/2 – BaseThick)])
    hull()
    for (i=[-1,1], j=[-1,1], k=[-1,1])
    translate([i*(CaseSize.x/2 – CornerRadius),
    j*(CaseSize.y/2 – CornerRadius),
    k*(CaseSize.z/2 – CornerRadius)])
    sphere(r=CornerRadius/cos(180/8),$fn=8); // cos() fixes undersize spheres!
    hull() // wire strut bases
    for (j=[-1,1])
    translate([0,j*StrutOC/2 + Battery.y/2,-BaseThick])
    rotate(180/StrutSides)
    cylinder(d=StrutBase[OD],h=StrutBase[LENGTH],$fn=StrutSides);
    translate([0,Battery.y/2,StrutBase[LENGTH]/2 – BaseThick])
    cube([2*StrutBase[OD],StrutOC,StrutBase[LENGTH]],center=true);
    }
    translate([-OverTravel,-GuideRadius,0])
    cube([(Battery.x + GuideRadius + OverTravel),
    (Battery.y + 2*GuideRadius),
    (Battery.z + Protrusion)]); // battery space
    }
    Guides(); // improve friction fit
    translate([-OverTravel,-GuideRadius,0]) // battery keying blocks
    cube(KeyBlocks[0] + [OverTravel,GuideRadius,0],center=false);
    translate([-OverTravel,(Battery.y – KeyBlocks[1].y),0])
    cube(KeyBlocks[1] + [OverTravel,GuideRadius,0],center=false);
    }
    translate([2*CaseOffset.x, // battery top access
    (CaseOffset.y – Protrusion),
    Battery.z])
    cube([2*CaseSize.x,(CaseSize.y + 2*Protrusion),(TopThick + Protrusion)]);
    if (false)
    translate([(CaseOffset.x – Protrusion), // battery insertion allowance
    (CaseOffset.y – Protrusion),
    Battery.z])
    cube([(CaseSize.x + 2*Protrusion),(CaseSize.y + 2*Protrusion),(TopThick + Protrusion)]);
    for (j=[-1,1]) // strut wires
    translate([0,j*StrutOC/2 + Battery.y/2,-(BaseThick + Protrusion)])
    PolyCyl(StrutBase[ID],StrutBase[LENGTH] + 2*Protrusion,6);
    for (i=[-1,1], j=[-1,1])
    translate([i*StrutBase[OD],j*StrutOC/2 + Battery.y/2,-(BaseThick + Protrusion)])
    rotate(180/StrutSides)
    PolyCyl(StrutBase[OD],StrutBase[LENGTH] + 2*Protrusion,StrutSides);
    translate([(Battery.x – Protrusion), // remove thumb notch
    (CaseSize.y/2 + CaseOffset.y),
    (ThumbRadius)])
    rotate([90,0,0])
    rotate([0,90,0])
    cylinder(r=ThumbRadius,
    h=(WallThick + GuideRadius + 2*Protrusion),
    $fn=22);
    PinAssembly();
    translate([CaseOffset.x + PinRecess + Protrusion,(Contacts[1].y + Contacts[0].y)/2,Contacts[0].z])
    translate([-PinRecess,0,0])
    cube([2*PinRecess,
    (Contacts[1].y – Contacts[0].y + PinFlange[OD]),
    2*PinFlange[OD]],center=true);
    }
    }
    // Lid position offset to match case
    module Lid() {
    difference() {
    translate([-LidSize.x/2 + LidOffset.x + LidOverhang,LidSize.y/2 + LidOffset.y,0])
    difference() {
    hull()
    for (i=[-1,1], j=[-1,1], k=[-1,1])
    translate([i*(LidSize.x/2 – CornerRadius),
    j*(LidSize.y/2 – CornerRadius),
    k*(LidSize.z – CornerRadius)]) // double thickness for flat bottom
    sphere(r=CornerRadius,$fn=8);
    translate([0,0,-LidSize.z/2]) // remove bottom
    cube([(LidSize.x + 2*Protrusion),(LidSize.y + 2*Protrusion),LidSize.z],center=true);
    translate([LidSize.x/8,0,0])
    cube([LidSize.x/4,0.75*LidSize.y,4*ThreadThick],center=true); // epoxy recess
    }
    translate([0,0,-(Contacts[0].z + PinFlange[OD])]) // punch wire holes
    PinAssembly();
    }
    }
    //——————-
    // Build it!
    if (Layout == "Case")
    Case();
    if (Layout == "Lid")
    Lid();
    if (Layout == "Pins") {
    color("Silver",0.5)
    PinShape();
    PinAssembly();
    }
    if (Layout == "Show") { // reveal pin assembly
    difference() {
    Case();
    translate([(CaseOffset.x – Protrusion),
    Contacts[1].y,
    Contacts[1].z])
    cube([(-CaseOffset.x + Protrusion),
    CaseSize.y,
    (CaseSize.z – Contacts[0].z + Protrusion)]);
    translate([(CaseOffset.x – Protrusion),
    (CaseOffset.y – Protrusion),
    0])
    cube([(-CaseOffset.x + Protrusion),
    Contacts[0].y + Protrusion – CaseOffset.y,
    CaseSize.z]);
    }
    translate([0,0,Battery.z + Gap])
    Lid();
    color("Silver",0.15)
    PinAssembly();
    }
    if (Layout == "Build") {
    translate([-(CaseSize.x/2 + CaseOffset.x),-(CaseOffset.y – BuildOffset),BaseThick])
    Case();
    translate([CaseSize.x/2,-LidSize.x/2,0])
    rotate(90)
    Lid();
    }
    if (Layout == "Fit") {
    Case();
    translate([0,0,(Battery.z + Gap)])
    Lid();
    color("Silver",0.25)
    PinAssembly();
    }