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: Recumbent Bicycling

Cruisin’ the streets

  • Tour Easy Daytime Running Light: Annotation

    The flashlight mount need not be symmetric after applying all the rotations, so recording how it’s aimed and which end goes forward seemed appropriate:

    Fairing Flashlight Mount - Mount Annotation
    Fairing Flashlight Mount – Mount Annotation

    Optionally, with rounded ends just for pretty:

    Fairing Flashlight Mount - Mount Annotation - rounded
    Fairing Flashlight Mount – Mount Annotation – rounded

    Because the rounding comes from resized spheres, the plate gets a ridge along the top to (maybe) lock the nylon screws / wing nuts in place:

    Fairing Flashlight Mount - Mount - rounded
    Fairing Flashlight Mount – Mount – rounded

    Or discourage them from turning, which would be OK, too. After the second tightening, they don’t seem to come loose, so this may be overthinking the problem.

    All in all, they look pretty good in cyan PETG:

    Fairing Flashlight Mount - rounded
    Fairing Flashlight Mount – rounded

    Believe it or not, that’s aimed so the top edge of the beam is roughly horizontal to keep the hot spot out of oncoming traffic. They’re plenty bright, even on the “low power” setting.

    The flashlight mounting balls produce a decorative brim that ought to be useful for something:

    Slotted ball on platform
    Slotted ball on platform

    Maybe earrings?

    The OpenSCAD source code as a GitHub Gist:

    // Tour Easy Fairing Flashlight Mount
    // Ed Nisley KE4ZNU – July 2017
    // August 2017 –
    /* [Build Options] */
    FlashName = "AnkerLC40"; // [AnkerLC40,AnkerLC90,J5TactV2,InnovaX5]
    Component = "Plates"; // [Ball, BallClamp, Mount, Plates, Bracket]
    Layout = "Build"; // [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 (M=20 E=15)
    Roll = 0; // outward from top
    Shift = 0; // Finagle Constant for support ribs
    //- Screws *c
    /* [Hidden] */
    ID = 0;
    OD = 1;
    LENGTH = 2;
    /* [Screws and Inserts] */
    ClampInsert = [3.0,4.2,8.0];
    ClampScrew = [3.0,5.9,35.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]
    ];
    //- Fairing Bracket
    // Magic numbers taken from the actual fairing mount
    /* [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
    //- Base plate dimensions
    Plate = [100.0,30.0,6*ThreadThick + Bracket[2]];
    PlateRad = Plate[1]/4;
    RoundEnds = true;
    echo(str("Base plate thick: ",Plate[2]));
    //- Select flashlight data from table
    echo(str("Flashlight: ",FlashName));
    FlashIndex = search([FlashName],LightBodies,1,0)[F_NAME];
    //- Set ball dimensions
    BallWall = 5.0; // max ball wall thickness
    echo(str("Ball wall: ",BallWall));
    BallOD = IntegerMultiple(LightBodies[FlashIndex][F_GRIPOD] + 2*BallWall,1.0);
    echo(str(" OD: ",BallOD));
    BallLength = IntegerMultiple(min(sqrt(pow(BallOD,2) – pow(LightBodies[FlashIndex][F_GRIPOD],2)) – 2*4*ThreadThick,
    LightBodies[FlashIndex][F_GRIPLEN]),1.0);
    echo(str(" length: ",BallLength));
    BallSides = 8*4;
    //- Set clamp ring dimensions
    ClampOD = 50;
    echo(str("Clamp OD: ",ClampOD));
    ClampLength = min(20.0,0.75*BallLength);
    echo(str(" length: ",ClampLength));
    ClampScrewOC = IntegerMultiple((ClampOD + BallOD)/2,1);
    echo(str(" screw OC: ",ClampScrewOC));
    //- 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);
    }
    //- Fairing Bracket
    // This part of the fairing mount supports the whole flashlight mount
    // Centered on screw hole
    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
    module PlateBlank() {
    difference() {
    translate([BracketHoleOC,0,0])
    intersection() {
    translate([0,0,Plate[2]/2]) // select upper half of spheres
    cube(Plate,center=true);
    hull()
    if (RoundEnds)
    for (i=[-1,1])
    translate([i*(Plate[0]/2 – PlateRad),0,0])
    resize([Plate[1]/2,Plate[1],2*Plate[2]])
    sphere(r=PlateRad); // nice round ends!
    else
    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 round corners!
    }
    translate([2*BracketHoleOC,0,-Protrusion]) // punch 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 fairing bracket
    Bracket();
    }
    }
    //- Slotted ball around flashlight
    // Print with brim to ensure adhesion!
    module SlotBall() {
    NumSlots = 8*2; // must be even, half cut from each end
    SlotWidth = 2*ThreadWidth;
    SlotBaseThick = 10*ThreadThick; // enough to hold finger ends together
    RibLength = (BallOD – LightBodies[FlashIndex][F_GRIPOD])/2;
    translate([0,0,BallLength/2])
    difference() {
    intersection() {
    sphere(d=BallOD,$fn=2*BallSides); // basic ball
    cube([2*BallOD,2*BallOD,BallLength],center=true); // trim to length
    }
    translate([0,0,-LightBodies[FlashIndex][F_GRIPOD]])
    rotate(180/BallSides)
    PolyCyl(LightBodies[FlashIndex][F_GRIPOD],2*BallOD,BallSides); // remove flashlight body
    for (i=[0:NumSlots/2 – 1]) { // cut slots
    a=i*(2*360/NumSlots);
    SlotCutterLength = LightBodies[FlashIndex][F_GRIPOD];
    rotate(a)
    translate([SlotCutterLength/2,0,SlotBaseThick])
    cube([SlotCutterLength,SlotWidth,BallLength],center=true);
    rotate(a + 360/NumSlots)
    translate([SlotCutterLength/2,0,-SlotBaseThick])
    cube([SlotCutterLength,SlotWidth,BallLength],center=true);
    }
    }
    color("Yellow")
    if (Support) {
    for (i=[0:NumSlots-1]) {
    a = i*360/NumSlots;
    rotate(a + 180/NumSlots)
    translate([(LightBodies[FlashIndex][F_GRIPOD] + RibLength)/2 + ThreadWidth,0,BallLength/(2*4)])
    cube([RibLength,2*ThreadWidth,BallLength/4],center=true);
    }
    }
    }
    //- Clamp around flashlight ball
    module BallClamp() {
    BossLength = ClampScrew[LENGTH] – 1*ClampScrewWasher[LENGTH];
    BossOD = ClampInsert[OD] + 2*(6*ThreadWidth);
    difference() {
    union() {
    intersection() {
    sphere(d=ClampOD,$fn=BallSides); // exterior ball clamp
    cube([ClampLength,2*ClampOD,2*ClampOD],center=true); // aiming allowance
    }
    hull()
    for (j=[-1,1])
    translate([0,j*ClampScrewOC/2,-BossLength/2])
    cylinder(d=BossOD,h=BossLength,$fn=6);
    }
    sphere(d=(BallOD + 1*ThreadThick),$fn=BallSides); // interior ball with minimal clearance
    for (j=[-1,1]) {
    translate([0,j*ClampScrewOC/2,-ClampOD]) // screw clearance
    PolyCyl(ClampScrew[ID],2*ClampOD,6);
    translate([0,j*ClampScrewOC/2, // insert clearance
    -(BossLength/2 – ClampInsert[LENGTH] – 3*ThreadThick)])
    rotate([0,180,0])
    PolyCyl(ClampInsert[OD],2*ClampOD,6);
    translate([0,j*ClampScrewOC/2, // insert transition
    -(BossLength/2 – ClampInsert[LENGTH] – 3*ThreadThick)])
    cylinder(d1=ClampInsert[OD]/cos(180/6),d2=ClampScrew[ID],h=6*ThreadThick,$fn=6);
    }
    }
    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
    render(convexity=2*NumRibs)
    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 NumRibs + 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=BallSides,center=true);
    }
    }
    }
    }
    //- Mount between fairing plate and flashlight ball
    // Build with support for bottom of clamp screws!
    module Mount() {
    difference() {
    translate([-BracketHoleOC,0,0]) // put bracket center at origin
    PlateBlank();
    mirror([0,1,0])
    translate([0,0,-Protrusion])
    linear_extrude(height=3*ThreadThick + Protrusion) {
    translate([BracketHoleOC + 15,0,0])
    text(text=">>>",size=5,spacing=1.20,font="Arial",halign="center",valign="center");
    translate([-BracketHoleOC,8,0])
    text(text=str("Toe ",ToeIn),size=5,spacing=1.20,font="Arial",halign="center",valign="center");
    translate([-BracketHoleOC,-8,0])
    text(text=str("Tilt ",Tilt),size=5,spacing=1.20,font="Arial",halign="center",valign="center");
    translate([BracketHoleOC,8,0])
    text(text=str("Roll ",Roll),size=5,spacing=1.20,font="Arial",halign="center",valign="center");
    translate([-(BracketHoleOC + 15),0,0])
    rotate(90)
    text(text="KE4ZNU",size=4,spacing=1.20,font="Arial",halign="center",valign="center");
    }
    }
    rotate([0,ToeIn,Tilt])
    translate([0,0,ClampOD/2])
    rotate([-Roll,0,0])
    intersection() {
    translate([0,0,-ClampOD/2])
    cube([2*ClampOD,2*ClampOD,ClampOD],center=true);
    BallClamp();
    }
    color("Yellow")
    if (MountSupport) { // anchor outer corners at worst overhang
    RibWidth = 1.9*ThreadWidth;
    SupportOC = 0.1 * ClampLength;
    difference() {
    rotate([0,0,Tilt])
    translate([Shift,0,0])
    for (i=[-4.5,-2.5,0,2.0,4.5])
    translate([i*SupportOC – 0.0,0,(5 + Plate[2])/2])
    cube([RibWidth,0.7*ClampOD,(5 + Plate[2])],center=true);
    rotate([0,ToeIn,Tilt])
    translate([Shift,0,ClampOD/2])
    rotate([-Roll,0,0])
    sphere(d=ClampOD – 2*ThreadWidth,$fn=BallSides);
    }
    }
    }
    //- Build things
    if (Component == "Ball")
    SlotBall();
    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();

     

  • J5 V2 Flashlight: Switch Tightening

    From the start, the (second) J5 V2 flashlight had an erratic switch that flickered the LED at the slightest pressure. Not enough to switch modes, as it does with a half press, but enough to show something’s not quite right inside.

    Taking it apart requires a pin wrench, which I have, but the deeply recessed ring required more reach than any of the tips I’ve made over the years. Introducing a pair of stainless steel 10-32 screws to Mr Grinder added two more pins to the collection:

    J5V2 Flashlight - custom pin wrench
    J5V2 Flashlight – custom pin wrench

    The lock ring in the flashlight cap turned out to be finger-loose, certainly contributing to the problem. Removing the lock ring, peeling the rubber dome out of the cap, and poking with a punch sufficed to drive out the guts of the switch assembly:

    J5V2 Flashlight - switch parts
    J5V2 Flashlight – switch parts

    Which consists of, as you’d expect, the cheapest possible parts that don’t immediately fail.

    The (steel) tab sticking out of the actual switch (in the upper right) contacts the inside of the (aluminum) cap. I bent it slightly outward, added a trace of DeoxIT Red, reassembled everything in reverse order, and it’s all good for the first time in its brief life.

    I’d rate J5’s QC as Below Average, given that the first light arrived with built-in dirt and its replacement (this one) had an alien egg next to the LED, plus this loose switch lock ring + crappy tab contact.

    The J5 V2 light claims 750 lumen output, but the spot is nowhere near twice as bright as the LC40 lights on the bikes and much dimmer than the LC90 light (which is too big for the bikes), all tweaked for equivalent-size illuminated areas. Given that lumens measure total output and candela measure lumen/steradian, there’s some wiggle room for misinterpretation.

    Won’t buy another, for sure.

  • Tour Easy Daytime Running Light: Improved Ball Mount

    The original ball around the flashlight consisted of two identical parts joined with 2 mm screws and brass inserts:

    Flashlight Ball Mount - flattening fins
    Flashlight Ball Mount – flattening fins

    Providing enough space for the inserts made the ball bigger than it really ought be, so I designed a one-piece ball with “expansion joints” between the fingers:

    Fairing Flashlight Mount - Finger Ball - solid model
    Fairing Flashlight Mount – Finger Ball – solid model

    Having Slic3r put a 3 mm brim around the bottom almost worked. Adding a little support flange, then building with a brim, kept each segment upright and the whole affair firmly anchored.

    Fairing Flashlight Mount - Finger Ball - solid model - support fins
    Fairing Flashlight Mount – Finger Ball – solid model – support fins

    Those had to be part of the model, because I also wanted to anchor the perimeter threads to prevent upward warping. Worked great and cleanup was surprisingly easy: apply the flush cutter, introduce the ball to Mr Belt Sander, then rotate the ball around the flashlight wrapped with fine sandpaper to wear off the nubs.

    The joints between the fingers provide enough flexibility to expand slightly around the flashlight body:

    Flashlight Mount - finger ball
    Flashlight Mount – finger ball

    I made that one the same size as the original screw + insert balls to fit the original clamp, where it worked fine. The clamp ring applies enough pressure to the ball to secure the flashlight and prevent the ball from rotating unless you (well, I) apply more-than-incidental force.

    Then I shrank the ball to the flashlight diameter + 10 mm (= 5 mm thick at the equator) and reduced the size of the clamp ring accordingly, which made the whole mount much more compact:

    Flashlight Mount - LC40 - finger ball - side
    Flashlight Mount – LC40 – finger ball – side

    Here’s what the larger mount looks like in action:

    The flashlights allegedly puts out 400 lumen in a fairly tight beam. The fairings produce a much larger and brighter glint in full sunlight than the flashlights, so I think they’re about the right brightness.

    The OpenSCAD source code for the new ball as a GitHub Gist:

    //- Slotted ball around flashlight
    // Print with brim to ensure adhesion!
    module SlotBall() {
    NumSlots = 8*2; // must be even, half cut from each end
    SlotWidth = 2*ThreadWidth;
    SlotBaseThick = 10*ThreadThick; // enough to hold finger ends together
    RibLength = (BallOD – LightBodies[FlashIndex][F_GRIPOD])/2;
    translate([0,0,BallLength/2])
    difference() {
    intersection() {
    sphere(d=BallOD,$fn=2*BallSides); // basic ball
    cube([2*BallOD,2*BallOD,BallLength],center=true); // trim to length
    }
    translate([0,0,-LightBodies[FlashIndex][F_GRIPOD]])
    rotate(180/BallSides)
    PolyCyl(LightBodies[FlashIndex][F_GRIPOD],2*BallOD,BallSides); // remove flashlight body
    for (i=[0:NumSlots/2 – 1]) { // cut slots
    a=i*(2*360/NumSlots);
    SlotCutterLength = LightBodies[FlashIndex][F_GRIPOD];
    rotate(a)
    translate([SlotCutterLength/2,0,SlotBaseThick])
    cube([SlotCutterLength,SlotWidth,BallLength],center=true);
    rotate(a + 360/NumSlots)
    translate([SlotCutterLength/2,0,-SlotBaseThick])
    cube([SlotCutterLength,SlotWidth,BallLength],center=true);
    }
    }
    color("Yellow")
    if (Support) {
    for (i=[0:NumSlots-1]) {
    a = i*360/NumSlots;
    rotate(a + 180/NumSlots)
    translate([(LightBodies[FlashIndex][F_GRIPOD] + RibLength)/2 + ThreadWidth,0,BallLength/(2*4)])
    cube([RibLength,2*ThreadWidth,BallLength/4],center=true);
    }
    }
    }
  • Byonics TinyTrak3+ vs. RFI

    Some weeks ago, the APRS + voice adapter on my radio began randomly resetting during our rides, sending out three successive data bursts: the TinyTrak power-on message, an ID string, and the current coordinates. Mary could hear all three packets quite clearly, which was not to be tolerated.

    I swapped radios + adapters so that she could ride in peace while I diagnosed the problem, which, of course, was both intermittent and generally occurred only while on the road. The TinyTrak doc mentions “… a sign of the TinyTrak3 resetting due to too much local RF energy”, so I clamped ferrite cores around All! The! Cables! and the problem Went Away.

    Removing one core each week eventually left the last core on the GPS receiver’s serial cable, which makes sense, as it plugs directly into the TT3. The core had an ID large enough for several turns (no fool, I), another week established a minimum of three turns kept the RFI down, so I settled for five:

    KG-UV3D APRS - ferrite on TT3 GPS cable
    KG-UV3D APRS – ferrite on TT3 GPS cable

    Prior to the RFI problem cropping up, nothing changed. Past experience has shown when I make such an assertion, it means I don’t yet know what changed. Something certainly has and not for the better.

    I swapped the radios + adapters and all seems quiet.

  • 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.

  • Riding With Scissors

    Well, bypass pruning shears, anyway …

    Although NYSDOT did cut back the Japanese Knotweed along Rt 376 north of Maloney Rd, perhaps because they were repaving that section, the overgrowth south of Red Oaks Mill continues unabated:

    Rt 376 - SB at Walker - Overgrowth - 2017-07-09
    Rt 376 – SB at Walker – Overgrowth – 2017-07-09

    I’ve been carrying shears to deal with the most egregious offenses, because some sport inch-long thorns:

    Rt 376 - SB at Walker - Thorns - 2017-07-09
    Rt 376 – SB at Walker – Thorns – 2017-07-09

    Unlike the NYSDOT Wappingers (a.k.a. Dutchess South) Residency , their Poughkeepsie (a.k.a. Dutchess North) Residency has no compunction about defoliation around road signs:

    Rt 376 - SB marker 1117 - Sign defoliation - 2017-07-15
    Rt 376 – SB marker 1117 – Sign defoliation – 2017-07-15

    And guide rails:

    Rt 376 - NB marker 1124 - Rail defoliation - 2017-07-15
    Rt 376 – NB marker 1124 – Rail defoliation – 2017-07-15

    So, obviously, different strokes for different Residencies.