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: Machine Shop

Mechanical widgetry

  • Sony DSC-H5 End-of-Life, With Reprieve

    So my trusty Sony DSC-H5 camera emitted a horrible crunching sound from inside its lens assembly, spat out several error codes which boiled down to “throw me out”, stopped retracting its lens, and developed a nasty rattle. If I thought dropping $2k on a fancy mirrorless DSLR would improve my photography, I’d do it, but instead I picked up a $60 used DSC-H5 from eBay and continued the mission.

    Of course, the new-to-me H5 suffers from the half-press switch failure common to that entire line of Sony cameras; my DSC-H1 repair notes still come in handy for many folks.

    I’d preemptively repaired the shutter button + switch in my now-defunct H5, so I dismantled it, extracted the control assembly + shutter button, bulldozed the debris aside, dismantled the new(er) H5, transplanted the parts, reassembled it, and declared victory.

    Which left me with a pile of parts that could become an H5, if I could fix the lens assembly, which seemed unlikely. While pondering the futility of human existence, I applied a low-effort repair to the defunct shutter button by scuffing the nicely chromed and absurdly tapered tip of the OEM shutter button’s shaft, then applying a dot of JB Kwik epoxy:

    DSC-H5 Shutter Button - epoxy dot
    DSC-H5 Shutter Button – epoxy dot

    The nice sphere came from hanging downward, with the button sitting atop a short brass tube on the workbench.

    Filing the dot’s end flat produced a blunt plunger much larger than the OEM tip:

    DSC-H5 Shutter Button - filed epoxy dot
    DSC-H5 Shutter Button – filed epoxy dot

    You can just see the edge of the OEM tip inside the grayish end, which puts the filed flat at the original pin’s length.

    I punched a new plastic disk to replace the indented one:

    DSC-H5 - shutter switch cover
    DSC-H5 – shutter switch cover

    Based on past experience, the new plunger tip will work fine, although, unlike the brass screw repair, the OEM plastic pin can still break and launch the spring-loaded shutter button cap into a nearby bush. Given that I may never actually use the repaired button, I’ll take the risk.

    Finding out if the new tip will work may take a while:

    DSC-H5 - disassembled
    DSC-H5 – disassembled

    I did a bit more disassembly than strictly necessary to replace the shutter button, but not by much; you’d be crazy to pay me to fix your camera, fer shure.

  • Torchiere Lamp Shade

    Torchiere Lamp Shade

    A pair of torchiere lamps lit the living room for many, many years:

    Torchiere Lamp Shade - original
    Torchiere Lamp Shade – original

    During their tenure, they’ve gone from 100 W incandescent bulbs to “100 W equivalent” CFL curlicues to “100 W equivalent” warm-white LED bulbs. The LEDs aren’t up to the brightness of the original incandescents, but you can get used to anything if you do it long enough.

    After so many years, the plastic shades / diffusers became brittle:

    Torchiere Lamp Shade - original broken
    Torchiere Lamp Shade – original broken

    That’s after a bump, not a fall to the floor. So it goes.

    Some casual searching didn’t turn up any likely replacements. The shade measures 14 inch = 355 mm across the top, far too large for the M2’s platform, but maybe a smaller shade in natural PETG would work just as well.

    ACHTUNG! This is obviously inappropriate for the original incandescent bulbs and would be, IMO, marginal with CFL tubes. Works fine with LEDs. Your mileage may vary.

    OpenSCAD to the rescue:

    Torchiere Lamp Shade - section
    Torchiere Lamp Shade – section

    That’s a section down the middle. The top is 180 mm across, leaving 20 mm of general caution on the 200 mm width of the platform. The section above the sharply angled base is 90 mm tall to match the actual LED height, thereby putting them out of my line-of-sight even when standing across the room.

    I ran off a short version, corrected the angles and sizes for a better fit, tweaked the thickness to fuse three parallel threads into a semitransparent shell, and …

    Torchiere Lamp Shade - M2 platform
    Torchiere Lamp Shade – M2 platform

    Producing what looks like thin flowerpot required just shy of seven hours of print time, as it’s almost entirely perimeter, goin’ down slow for best appearance. The weird gold tone comes from the interaction of camera flash with warm-white CFL can lights over the desk.

    If you hadn’t met the original, you’d say the new shade grew there:

    Torchiere Lamp Shade - no epoxy
    Torchiere Lamp Shade – no epoxy

    It’s definitely a Brutalist design, not even attempting to hide its 3D printed origin and glorying in those simple geometric facets.

    Those three threads of natural PETG makes a reasonably transparent plate, clear enough that the bulb produced an eye-watering glare through the shade:

    Torchiere Lamp Shade - no epoxy - lit
    Torchiere Lamp Shade – no epoxy – lit

    So I returned it to the Basement Laboratory, chucked it up in the lathe (where it barely clears the bed), dialed the slowest spindle speed (150 rpm according to the laser tach, faster than I’d prefer), and slathered a thin layer of white-tinted XTC-3D around the inside:

    Torchiere Lamp Shade - lathe spinning
    Torchiere Lamp Shade – lathe spinning

    For lack of anything smarter, I mixed 2+ drops of Opaque White with 3.1 g of Part A (resin), added 1.3 g of Part B (Hardener), mixed vigorously, drooled the blob along the middle of the rotating shade, spread it across the width using the mixing stick, smoothed it into a thin layer with a scrap of waxed paper, and ignored it for a few hours.

    If the lathe perspective looks a bit weird, it’s perfectly natural: I raised the tailstock end enough to make the lower side of the shade just about horizontal. Given the gooey nature of XTC-3D, it wasn’t going anywhere, but I didn’t want a slingout across the lathe bed.

    The lit-up result isn’t photographically different from the previous picture, but in person the epoxy layer produces a much nicer diffused light and no glare.

    I might be forced to preemptively replace the other shade, just for symmetry, but we’ll let this one age for a while before jumping to conclusions.

    The OpenSCAD source code as a GitHub Gist:

    // Torchiere Lamp Shade
    // Ed Nisley KE4ZNU – July 2017
    /* [Build] */
    Section = false;
    Shorten = false;
    //- Extrusion parameters – must match reality!
    /* [Hidden] */
    ThreadThick = 0.25;
    ThreadWidth = 0.40;
    function IntegerMultiple(Size,Unit) = Unit * ceil(Size / Unit);
    Protrusion = 0.01;
    HoleWindage = 0.2;
    //- Dimensions
    ID = 0;
    OD = 1;
    LENGTH = 2;
    /* [Dimensions] */
    ShadeThick = 1.2; // perpendicular thickness
    BaseAngle = 42; // lamp base angle wrt vertical
    BaseTopDia = 131.0; // lamp ID at top
    ShadeBaseThick = 6*ThreadThick; // horizontal bottom thickness
    SeatDepth = 10.0 + ShadeBaseThick; // shade bottom to base top
    SeatDia = BaseTopDia – 2* SeatDepth / tan(BaseAngle); // lamp ID at seating depth
    ShadeTopDia = 180.0; // top OD, limited by printer platform width
    ShadeHeight = 90.0; // height above lamp base
    ShadeHoleDia = 36.0; // central hole dia
    ShadeAngle = atan(ShadeHeight / ((ShadeTopDia – BaseTopDia)/2));
    echo(str("Shade angle: ",ShadeAngle));
    ShadeHThick = ShadeThick / sin(ShadeAngle);
    echo(str(" horiz thickness:",ShadeHThick));
    NumSides = 6*4;
    $fn = NumSides;
    //- Build it
    render(convexity=2)
    difference() {
    union() {
    cylinder(d1=SeatDia,d2=BaseTopDia,h=SeatDepth); // section within lamp base
    translate([0,0,SeatDepth])
    cylinder(d1=BaseTopDia,d2=ShadeTopDia,h=ShadeHeight);
    }
    translate([0,0,SeatDepth]) // inside of upper shade
    cylinder(d1=BaseTopDia – 2*ShadeHThick,
    d2=ShadeTopDia – 2*ShadeHThick,
    h=ShadeHeight + Protrusion);
    translate([0,0,ShadeBaseThick]) // seating base
    cylinder(d1=SeatDia – 2*ShadeHThick,
    d2=BaseTopDia – 2*ShadeHThick,
    h=SeatDepth – ShadeBaseThick + Protrusion);
    translate([0,0,-Protrusion]) // socket clearance
    cylinder(d=ShadeHoleDia,h=2*ShadeHeight);
    if (Section)
    translate([0,-ShadeTopDia,0])
    cube(2*ShadeTopDia,center=true);
    if (Shorten > 0)
    translate([0,0,(ShadeTopDia + 2*SeatDepth)])
    cube(2*ShadeTopDia,center=true);
    }
  • Vacuum Tube LEDs: Knockoff Arduino Nano USB Connector

    The LEDs adorning the 0D3 rectifier tube became unreliable:

    0D3 Octal - 25 mm socket - raised LED
    0D3 Octal – 25 mm socket – raised LED

    After failing to plug in a different USB power supply, a close look at the USB connector showed the problem:

    Knockoff Arduino Nano - broken Mini-B connector
    Knockoff Arduino Nano – broken Mini-B connector

    A bit of needle-nose tweezering extracted the culprit from the power supply’s connector:

    Knockoff Arduino Nano - broken Mini-B connector - fragment
    Knockoff Arduino Nano – broken Mini-B connector – fragment

    I tried applying the world’s smallest dot of epoxy to the fracture, probably slobbered epoxy along the pins while reinserting it, and the Nano still doesn’t light up.

    Given that knockoff Nano boards cost a touch over two bucks delivered, it’s not clear transplanting a connector from one of the never-sufficiently-to-be-damned counterfeit FTDI USB adapters makes any sense.

  • Vacuum Tube LEDs: Mogul Bulb Side Light

    The knockoff Neopixel on the 500 W mogul-base bulb failed in the usual way, so I rebuilt it with an SK6812 RGBW LED in a round cap:

    Mogul lamp socket - SK6812 LED side cap
    Mogul lamp socket – SK6812 LED side cap

    The nice 1-¼ inch stainless socket-head cap screws replace the 1 inch pan-head screws that engaged maybe one thread due to the additional spacer between the USB port and the upper hard drive platter I added for good looks.

    I tried a few iterations of an aluminized Mylar (*) disk with various sized pinholes over the RGB trio to crisp up the filament shadow, because the SK6812 LED casts a more diffuse light than the W2812 LEDs:

    Aluminized Mylar pinholes for SK6812 RGBW LED
    Aluminized Mylar pinholes for SK6812 RGBW LED

    Even the ⅛ inch pinhole made the bulb too dim, so I settled for a fuzzy shadow:

    500 W Mogul bulb - SK6812 RGBW LED - no pinhole - green phase
    500 W Mogul bulb – SK6812 RGBW LED – no pinhole – green phase

    The firmware has a tweak forcing the white LED to PWM=0, because this bulb looks better in saturated colors.

    (*) Here on earth, aluminized Mylar is nonconductive.

  • Tour Easy Daytime Running Light

    Pending more test rides, the flashlight fairing mount works well:

    Tour Easy Fairing Flashlight Mount - front overview
    Tour Easy Fairing Flashlight Mount – front overview

    Despite all my fussing with three rotational angles, simply tilting the mount upward by 20° with respect to the fairing clamp aims the flashlight straight ahead, with the ball nearly centered in the clamp:

    Tour Easy Fairing Flashlight Mount - front detail
    Tour Easy Fairing Flashlight Mount – front detail

    That obviously depends on the handlebar angle and the fairing length (which affects the strut rotation), but it’s close enough to make me think a simpler mount will suffice: clamp the flashlight into a cylinder with a slight offset angle, maybe 2°, then mount the cylinder into a much thinner ring clamp at the 20° tilt. Rotating the cylinder would give you some aim-ability, minus the bulk of a ball mount.

    Or dispense with the separate cylinder, build the entire mount at the (now known) aim angle, clamp the flashlight directly into the mount, then affix mount to fairing strut. Rapid prototyping FTW!

    For now, it’s great riding weather …

    The OpenSCAD source code as a GitHub Gist:

    // Tour Easy Fairing Flashlight Mount
    // Ed Nisley KE4ZNU – July 2017
    /* [Build Options] */
    FlashName = "AnkerLC40"; // [AnkerLC40,AnkerLC90,J5TactV2,InnovaX5]
    Component = "Mount"; // [Ball, BallClamp, Mount, Plates, Bracket]
    Layout = "Show"; // [Build, Show]
    Support = false;
    MountSupport = true;
    /* [Extrusion] */
    ThreadThick = 0.25; // [0.20, 0.25]
    ThreadWidth = 0.40; // [0.40]
    function IntegerMultiple(Size,Unit) = Unit * ceil(Size / Unit);
    Protrusion = 0.01; // [0.01, 0.1]
    HoleWindage = 0.2;
    /* [Fairing Mount] */
    ToeIn = 0; // inward from ahead
    Tilt = 20; // upward from forward
    Roll = 0; // outward from top
    Shift = -5; // realign to plate center
    //- Screws *c
    /* [Hidden] */
    ID = 0;
    OD = 1;
    LENGTH = 2;
    /* [Screws and Inserts] */
    BallInsert = [2.0,3.5,4.0];
    BallScrew = [2.0,3.5,2.0];
    ClampInsert = [3.0,4.2,8.0];
    ClampScrew = [3.0,5.9,50.0]; // thread dia, head OD, screw length
    ClampScrewWasher = [3.0,6.75,0.5];
    ClampScrewNut = [3.0,6.1,4.0]; // nyloc nut
    /* [Hidden] */
    F_NAME = 0;
    F_GRIPOD = 1;
    F_GRIPLEN = 2;
    LightBodies = [
    ["AnkerLC90",26.6,48.0],
    ["AnkerLC40",26.6,55.0],
    ["J5TactV2",25.0,30.0],
    ["InnovaX5",22.0,55.0]
    ];
    NumSides = 8*4;
    echo(str("Flashlight: ",FlashName));
    FlashIndex = search([FlashName],LightBodies,1,0)[F_NAME];
    BallThick = IntegerMultiple(5.0,ThreadWidth); // thickness of ball wall
    echo(str("Ball wall: ",BallThick));
    BallOD = max(45,IntegerMultiple(LightBodies[FlashIndex][F_GRIPOD] + 2*(BallThick + BallInsert[OD]),2.0));
    echo(str(" OD: ",BallOD));
    BallScrewOC = BallOD – BallThick – BallInsert[OD]; // from OD to allow different body diameters
    echo(str(" screw OC: ",BallScrewOC));
    BallLength = min(sqrt(pow(BallOD,2) – pow(LightBodies[FlashIndex][F_GRIPOD],2)),
    LightBodies[FlashIndex][F_GRIPLEN]);
    echo(str(" hole len: ",BallLength));
    ClampThick = 2*ClampInsert[OD];
    echo(str("Clamp wall: ",ClampThick));
    ClampOD = BallOD + 2*ClampThick;
    echo(str(" OD: ",ClampOD));
    ClampScrewOC = BallOD + 2*ClampInsert[OD];
    echo(str(" screw OC: ",ClampScrewOC));
    ClampLength = 0.70 * BallLength;
    echo(str(" length: ",ClampLength));
    //- Adjust hole diameter to make the size come out right
    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);
    }
    //- Ball around flashlight
    // Must print two!
    module BodyBall() {
    difference() {
    intersection() {
    sphere(d=BallOD,$fn=2*NumSides); // basic ball
    cube([BallLength,2*BallOD,2*BallOD],center=true); // max of flashlight grip length
    }
    translate([-LightBodies[FlashIndex][F_GRIPOD],0,0])
    rotate([0,90,0]) rotate(180/NumSides)
    PolyCyl(LightBodies[FlashIndex][F_GRIPOD],2*BallOD,NumSides); // flashlight body
    for (j=[-1,1])
    translate([0,j*BallScrewOC/2,0]) // commmon screw offset
    translate([0,0,-BallOD])
    PolyCyl(BallInsert[ID],2*BallOD,6); // punch screw shaft through everything
    translate([0,BallScrewOC/2,-Protrusion])
    PolyCyl(BallInsert[OD],(BallInsert[LENGTH] + 3*ThreadThick + Protrusion),6); // threaded insert
    translate([0,-BallScrewOC/2,BallThick])
    PolyCyl(BallScrew[OD],BallOD,6); // screw head clearance
    translate([0,0,-BallOD/2]) // remove bottom half
    cube(BallOD,center=true);
    translate([0,0,BallOD – BallThick/2]) // slice off top = bottom for E-Z build
    cube(BallOD,center=true);
    }
    if (Support) {
    NumRibs = 24;
    RibHeight = (BallOD – LightBodies[FlashIndex][F_GRIPOD]/cos(180/NumSides) – BallThick) / 2;
    ChordC = 2*sqrt(BallThick*BallOD/2 – pow(BallThick/2,2));
    intersection() {
    cube([BallLength,2*BallOD,2*BallOD],center=true); // max of flashlight grip length
    translate([0,0,BallOD/2 – BallThick/2])
    for (i=[0:NumRibs – 1])
    rotate(i*360/NumRibs + 180/NumRibs) // avoid screw holes
    translate([ChordC/2 + BallOD/8,0,-RibHeight/2])
    cube([BallOD/4,2*ThreadWidth,RibHeight],center=true);
    }
    }
    }
    //- Fairing Bracket
    // Magic numbers taken from the actual fairing mount
    // Centered on screw hole
    /* [Hidden] */
    inch = 25.4;
    BracketHoleOD = 0.25 * inch; // 1/4-20 bolt holes
    BracketHoleOC = 1.0 * inch; // fairing hole spacing
    // usually 1 inch, but 15/16 on one fairing
    Bracket = [48.0,16.3,3.6 – 0.6]; // fairing bracket end plate overall size
    BracketHoleOffset = (3/8) * inch; // end to hole center
    BracketM = 3.0; // endcap arc height
    BracketR = (pow(BracketM,2) + pow(Bracket[1],2)/4) / (2*BracketM); // … radius
    module Bracket() {
    linear_extrude(height=Bracket[2],convexity=2)
    difference() {
    translate([(Bracket[0]/2 – BracketHoleOffset),0,0])
    offset(delta=ThreadWidth)
    intersection() {
    square([Bracket[0],Bracket[1]],center=true);
    union() {
    for (i=[-1,0,1]) // middle circle fills gap
    translate([i*(Bracket[0]/2 – BracketR),0])
    circle(r=BracketR);
    }
    }
    circle(d=BracketHoleOD/cos(180/8),$fn=8); // dead center at the origin
    }
    }
    //- General plate shape
    // Centered on the hole for the fairing bracket
    Plate = [100.0,30.0,6*ThreadThick + Bracket[2]];
    PlateRad = Plate[1]/4;
    echo(str("Base plate thick: ",Plate[2]));
    module PlateBlank() {
    difference() {
    translate([BracketHoleOC,0,0])
    intersection() {
    translate([0,0,Plate[2]/2]) // select upper half of spheres
    cube(Plate,center=true);
    hull()
    for (i=[-1,1], j=[-1,1])
    translate([i*(Plate[0]/2 – PlateRad),j*(Plate[1]/2 – PlateRad),0])
    resize([2*PlateRad,2*PlateRad,2*Plate[2]])
    sphere(r=PlateRad); // nice rounded corners!
    }
    translate([2*BracketHoleOC,0,-Protrusion]) // screw holes
    PolyCyl(BracketHoleOD,2*Plate[2],8);
    translate([0,0,-Protrusion])
    PolyCyl(BracketHoleOD,2*Plate[2],8);
    }
    }
    //- Inner plate
    module InnerPlate() {
    difference() {
    PlateBlank();
    translate([0,0,Plate[2] – Bracket[2] + Protrusion]) // punch out fairing bracket
    Bracket();
    }
    }
    //- Clamp around flashlight ball
    module BallClamp() {
    BossLength = ClampScrew[LENGTH] – ClampScrewNut[LENGTH] – 2*ClampScrewWasher[LENGTH] – 4*ThreadThick;
    difference() {
    union() {
    intersection() {
    sphere(d=ClampOD,$fn=NumSides); // exterior ball blamp
    cube([ClampLength,2*ClampOD,2*ClampOD],center=true); // aiming allowance
    }
    for (i=[0])
    hull() {
    for (j=[-1,1])
    translate([i*(ClampLength/2 – ClampScrew[OD]),j*ClampScrewOC/2,-BossLength/2])
    rotate(180/8)
    cylinder(d=(ClampScrewWasher[OD] + 2*ThreadWidth),h=BossLength,$fn=8);
    }
    }
    sphere(d=(BallOD + 1*ThreadThick),$fn=NumSides); // interior ball
    for (i=[0] , j=[-1,1]) {
    translate([i*(ClampLength/2 – ClampScrew[OD]),j*ClampScrewOC/2,-ClampOD]) // screw clearance
    rotate(180/8)
    PolyCyl(ClampScrew[ID],2*ClampOD,8);
    }
    }
    color("Yellow")
    if (Support) { // ad-hoc supports for top half
    NumRibs = 6;
    RibLength = 0.5 * BallOD;
    RibWidth = 1.9*ThreadWidth;
    SupportOC = ClampLength / NumRibs;
    cube([ClampLength,RibLength,4*ThreadThick],center=true); // base plate for adhesion
    intersection() {
    sphere(d=BallOD – 0*ThreadWidth); // cut at inner sphere OD
    cube([ClampLength + 2*ThreadWidth,RibLength,BallOD],center=true);
    union() { // ribs for E-Z build
    for (j=[-1,0,1])
    translate([0,j*SupportOC,0])
    cube([ClampLength,RibWidth,1.0*BallOD],center=true);
    for (i=[0:NumRibs]) // allow +1 to fill the far end
    translate([i*SupportOC – ClampLength/2,0,0])
    rotate([0,90,0])
    cylinder(d=BallOD – 2*ThreadThick,
    h=RibWidth,$fn=NumSides,center=true);
    }
    }
    }
    }
    //- Mount between fairing plate and flashlight ball
    module Mount() {
    translate([-BracketHoleOC,0,0])
    PlateBlank();
    translate([Shift,0,ClampOD/2])
    rotate([-Roll,ToeIn,Tilt])
    intersection() {
    translate([0,0,-ClampOD/2])
    cube([2*ClampOD,2*ClampOD,ClampOD],center=true);
    BallClamp();
    }
    if (MountSupport) { // anchor outer corners during worst overhang
    RibWidth = 1.9*ThreadWidth;
    SupportOC = 0.1 * ClampLength;
    difference() {
    rotate([0,0,Tilt])
    translate([Shift + 0.3,0,0])
    for (i=[-4.5,-2.5,0,2.0,4.5])
    translate([i*SupportOC – 0.0,0,(ClampThick + Plate[2])/2])
    cube([RibWidth,0.8*ClampOD,(ClampThick + Plate[2])],center=true);
    # translate([Shift,0,ClampOD/2])
    rotate([-Roll,ToeIn,Tilt])
    sphere(d=ClampOD – 2*ThreadWidth,$fn=NumSides);
    }
    }
    }
    //- Build things
    if (Component == "Ball")
    if (Layout == "Show")
    BodyBall();
    else if (Layout == "Build") {
    translate([0,+1*(BallOD/2 + BallThick/2),0])
    translate([0,0,BallOD/2 – BallThick/2])
    rotate([180,0,0])
    BodyBall();
    translate([0,-1*(BallOD/2 + BallThick/2),0])
    translate([0,0,BallOD/2 – BallThick/2])
    rotate([180,0,0])
    BodyBall();
    }
    if (Component == "BallClamp")
    if (Layout == "Show")
    BallClamp();
    else if (Layout == "Build") {
    Both = false;
    difference() {
    union() {
    translate([Both ? ClampLength : 0,0,0])
    BallClamp();
    if (Both)
    translate([-ClampLength,0,0])
    rotate([180,0,0])
    BallClamp();
    }
    translate([0,0,-ClampOD/2])
    cube([2*ClampOD,2*ClampOD,ClampOD],center=true);
    }
    }
    if (Component == "Mount")
    Mount();
    if (Component == "Plates") {
    translate([0,0.7*Plate[1],0])
    InnerPlate();
    translate([0,-0.7*Plate[1],0])
    PlateBlank();
    }
    if (Component == "Bracket")
    Bracket();

  • Tour Easy Daytime Running Light: Fairing Mount

    The fairing mount must aim the flashlight generally parallel to the ground and slightly toed-in toward the bike’s frame, ideally holding the ball more-or-less in the center of its adjustment range. I eyeballed a protractor for the initial estimates and got it reasonably close on the third try:

    Tour Easy - J5 Tactical V2 - front
    Tour Easy – J5 Tactical V2 – front

    One more skilled in math than I could define a matrix transformation between the solid model’s XYZ coordinate space and the fairing’s XYZ space, then figure the reverse transformation allowing you to convert real-world angles back to the model’s space. I winged it by setting up adjustments to rotate the ball clamp ring on all three axes around its center:

    translate([-BracketHoleOC,0,0])
    PlateBlank();
    translate([Shift,0,ClampOD/2])
    rotate([-Roll,ToeIn,Tilt])
    intersection() {
    translate([0,0,-ClampOD/2])
    cube([2*ClampOD,2*ClampOD,ClampOD],center=true);
    BallClamp();
    }

    Lifting the ring upward by half its OD leaves it tangent to the XY plane, firmly embedded in the blank fairing clamp plate, and, through the magic of 3D printing, looking like it grew there.

    In practice, aligning the ring isn’t too difficult. Align an eyeball along each of the mount’s axes, center a protractor on the ball with it perpendicular to the line of sight, rotate it so the baseline is level / straight-ahead / crosswise, read off the angle, then type it in. Of course you’ll get the sign wrong at least once.

    For a given set of those angles, the mount looks like this:

    Fairing Flashlight Mount - Mount - rear view - no support - solid model
    Fairing Flashlight Mount – Mount – rear view – no support – solid model

    You can determine by inspection there’s no way to orient the shape for E-Z building, although putting the plate flat on the platform has a lot to recommend it.

    The outside being a spherical section, the overhangs will curl upward, so (as with the ball around the flashlight) rows of fins anchor the perimeter threads:

    Fairing Flashlight Mount - Mount - rear view - solid model
    Fairing Flashlight Mount – Mount – rear view – solid model

    The fins are just under two threads wide to eliminate any possible infill, with a simple sphere chopping their tops to fit just inside the clamp:

    if (MountSupport) { // anchor outer corners during worst overhang
    RibWidth = 1.9*ThreadWidth;
    SupportOC = 0.1 * ClampLength;
    difference() {
    rotate([0,0,Tilt])
    translate([Shift + 0.3,0,0])
    for (i=[-4.5,-2.5,0,2.0,4.5])
    translate([i*SupportOC – 0.0,0,(ClampThick + Plate[2])/2])
    cube([RibWidth,0.8*ClampOD,(ClampThick + Plate[2])],center=true);
    # translate([Shift,0,ClampOD/2])
    rotate([-Roll,ToeIn,Tilt])
    sphere(d=ClampOD – 2*ThreadWidth,$fn=NumSides);
    }
    }

    Slic3r built support structures under the overhanging screw bosses:

    Fairing Flashlight Mount - Mount - rear view - Slic3r
    Fairing Flashlight Mount – Mount – rear view – Slic3r

    It also added weird little towers that don’t come close to touching the clamp’s lower surfaces, which is why I added those fins. The automatic support should extend to one thread thickness from the bottom surface, but that’s a hard calculation to make for a spherical section represented by tesselating triangles.

    After a few test rides, the whole affair seems to be both holding together and holding the flashlight, so it’s good enough for now. A twilight ride around the block may be needed for better aiming, though.

  • Tour Easy Daytime Running Light: Ball Clamp Ring

    With the flashlight firmly clamped inside its ball, a surrounding clamp ring holds the ball on the mount:

    Tour Easy - J5 Tactical V2 - front
    Tour Easy – J5 Tactical V2 – front

    The solid model chops a sphere to a completely empirical 70% of the inner ball’s length (which, itself, may be truncated to fit the flashlight grip) and glues on a hull containing the M3x50 mm screws:

    //- Clamp around flashlight ball
    module BallClamp() {
    BossLength = ClampScrew[LENGTH] – ClampScrewNut[LENGTH] – 2*ClampScrewWasher[LENGTH] – 4*ThreadThick;
    difference() {
    union() {
    intersection() {
    sphere(d=ClampOD,$fn=NumSides); // exterior ball blamp
    cube([ClampLength,2*ClampOD,2*ClampOD],center=true); // aiming allowance
    }
    for (i=[0])
    hull() {
    for (j=[-1,1])
    translate([i*(ClampLength/2 – ClampScrew[OD]),j*ClampScrewOC/2,-BossLength/2])
    rotate(180/8)
    cylinder(d=(ClampScrewWasher[OD] + 2*ThreadWidth),h=BossLength,$fn=8);
    }
    }
    sphere(d=(BallOD + 1*ThreadThick),$fn=NumSides); // interior ball
    for (i=[0] , j=[-1,1]) {
    translate([i*(ClampLength/2 – ClampScrew[OD]),j*ClampScrewOC/2,-ClampOD]) // screw clearance
    rotate(180/8)
    PolyCyl(ClampScrew[ID],2*ClampOD,8);
    }
    }
    color("Yellow")
    if (Support) { // ad-hoc supports for top half
    NumRibs = 6;
    RibLength = 0.5 * BallOD;
    RibWidth = 1.9*ThreadWidth;
    SupportOC = ClampLength / NumRibs;
    cube([ClampLength,RibLength,4*ThreadThick],center=true); // base plate for adhesion
    intersection() {
    sphere(d=BallOD – 0*ThreadWidth); // cut at inner sphere OD
    cube([ClampLength + 2*ThreadWidth,RibLength,BallOD],center=true);
    union() { // ribs for E-Z build
    for (j=[-1,0,1])
    translate([0,j*SupportOC,0])
    cube([ClampLength,RibWidth,1.0*BallOD],center=true);
    for (i=[0:NumRibs]) // allow +1 to fill the far end
    translate([i*SupportOC – ClampLength/2,0,0])
    rotate([0,90,0])
    cylinder(d=BallOD – 2*ThreadThick,
    h=RibWidth,$fn=NumSides,center=true);
    }
    }
    }
    }

    The complete ring looks about like you’d expect, although it’s never built like this:

    Fairing Flashlight Mount - Clamp - show view - solid model
    Fairing Flashlight Mount – Clamp – show view – solid model

    The top half builds as an arch on the platform:

    Fairing Flashlight Mount - Clamp - build view - solid model
    Fairing Flashlight Mount – Clamp – build view – solid model

    The uppermost layers on the inside of the arch have terrible overhang pulled upward by the cooling plastic, so the builtin support structure hold the layers downward. The preview shows they don’t quite touch, but in actual practice the support bonds to the arch and requires a bit of effort to crack off:

    Fairing Flashlight Mount - support structures
    Fairing Flashlight Mount – support structures

    The ones on the right come from my (failed) attempts to build the ball hemispheres in the obvious orientation. It’s worth noting that my built-in “support” both bonds to the part and breaks off in one piece, quite unlike the pitched battle required to separate Slic3r’s automatic support structures; I think that’s the difference between the minimum feasible and maximum possible support.

    Anyhow, the inside of the arch requires only a bit of cleanup with a ball mill before it clamps firmly around the flashlight ball. In the normal orientation, the space over the missing ball cap snuggles into the cleaned-up part of the arch and there’s enough friction on the remaining ball to hold it in place. If it does joggle loose, a wrap of tape should provide enough griptivity.

    I started by assuming socket-head cap screws and brass inserts embedded in the clamp ring could provide enough force to hold everything together:

    Fairing Flashlight Mount - Clamp - screw inserts - solid model
    Fairing Flashlight Mount – Clamp – screw inserts – solid model

    The head recesses into the top opening and the insert sits just below the split line on the XY plane. That turned out to be asking a lot from a pair of 3 mm knurled brass inserts, even with JB Weld in full effect, and I wasn’t at all confident they wouldn’t pop out under duress and fling the flashlight away.

    Each screw now compresses the entire boss between a pair of washers and the nyloc nut won’t vibrate loose. The screws also serve to stiffen the clamp ring front-to-back, although I’m not convinced it needs any reinforcement.

    I also considered splitting the ring parallel to the front, right down the middle, with screws extending through both halves:

    Fairing Flashlight Mount - Clamp - Front Back split - solid model
    Fairing Flashlight Mount – Clamp – Front Back split – solid model

    It’d be trivially easy to build the front half face-down on the platform, but the rear would have only half the surface area bonded to the plate against the fairing, which seemed like a Bad Idea. Worse, I couldn’t figure out how to align the rear half on the plate with enough room for the nuts / inserts / whatever and alignment space around the front half.