Good news:The flange shaft couplers arrived earlier than expected.
Cam model updated for flange shaft coupler, spring is now connected to the cam using safety wire instead of a screw, and added screw holes along the cam radius to keep the spring from splitting the cam in half.
"Cam - Bat Controller.scad" (second draft)
// Cam - Bat Controller (v0)
// The diameter values may need to be *very slightly* larger to account for the 180-sided polygon used to render circles -- see "undersized holes" at https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Primitive_Solids#cylinder
/////////////////////////////
// Adjustable variables
/////////////////////////////
// Flange shaft collar and screw variables
ShaftCollarOD = 10.8; // Shaft collar outer diameter (not the flange outer diameter)
ShaftCollarHeight = 10; // Shaft collar height, not including the flange thickness
ShaftCollarSetscrewDia = 3; // Shaft collar setscrew diameter
ShaftCollarSetscrewHeight = 6.5; // Distance from the bottom of the cam to the center of the setscrew.
ShaftCollarSetscrewAngle = 0; // Number of degrees to rotate the Z-axis of the setscrew hole -- 0 = parallel with the Y-axis, 10 = 10 degrees counter-clockwise
ShaftCollarFlangeScrewDia = 3.5; // Shaft collar flange screw diameter
ShaftCollarFlangeScrewOffset = 8; // Shaft collar flange screw offset from center
ShaftCollarHubDia = 22.2; // Shaft collar hub diameter
// Screw block variables
ScrewBlockX = 8; // Screw block X-axis size
ScrewBlockY = 8; // Screw block Y-axis size
SpringHole = 2; // Diameter of hole for 0.020" or 0.032" safety wire to attach the spring to the cam
// Cam variables
CamRadius = 33; // Cam radius
CamThick = 10; // Cam thickness
BumperOffset = 18; // Bumper offset
BumperDia = 13.5; // Bumper diameter
ShaftNotchDia = ShaftCollarHubDia - 0.2; // Ensures notch is smaller than the shaft collar hub.
CamRadiusScrewDia = 3.5; // Diameter of screw holes around the outer radius of the cam -- these screws and washers prevent layer separation due to force applied by the spring
CamRadiusScrewInset = 2.5; // Inset distance of the screw holes around the outer radius of the cam
CamRadiusScrewAngle1 = 80; // Angle of screw hole 1 on the outer radius of the cam
CamRadiusScrewAngle2 = 30; // Angle of screw hole 2 on the outer radius of the cam
CamRadiusScrewAngle3 = -20; // Angle of screw hole 3 on the outer radius of the cam
CamRadiusScrewAngle4 = -70; // Angle of screw hole 4 on the outer radius of the cam
// Number of fragments (polygon sides) used to render a full circle.
$fn = 180; // Default = 180 Typical range = 6 - 360
// 6 will render a circular hole as a hexagon, 8 will render a circular hole as an octagon.
// Lower the number for faster rendering, raise the number for smoother rendering.
/////////////////////////////
// Make the part
/////////////////////////////
difference(){ // Cam body cylinders minus cam back half, shaft notch, bumper notches, skeleton holes, and cam radius screw holes
union(){ // Cam body cylinders
// Cam lower half cylinder
translate([0, 0, - CamThick/4])
cylinder (h = CamThick/2 + 0.01, r1 = CamRadius + CamThick/2, r2 = CamRadius, center=true);
// Cam upper half cylinder
translate([0, 0, + CamThick/4])
cylinder (h = CamThick/2 + 0.01, r1 = CamRadius, r2 = CamRadius + CamThick/2, center=true);
} // End cam body cylinders
//
// Cam back half
translate([0, - (CamRadius + CamThick/2)/2 - 1, 0])
cube ([CamRadius * 2 + CamThick + 2, CamRadius + CamThick/2 + 2, CamThick + 2], center=true);
// Shaft notch
cylinder (CamThick + 2, d = ShaftNotchDia, center=true);
// Left bumper notch
translate([- BumperOffset, 0, 0])
color("purple")
cylinder (CamThick + 2, d = BumperDia, center=true);
// Right bumper notch
translate([BumperOffset, 0, 0])
color("purple")
cylinder (CamThick + 2, d = BumperDia, center=true);
// Left skeleton hole
rotate([0, 0, 120])
translate([BumperOffset, 0, 0])
color("green")
cylinder (CamThick + 2, d = BumperDia, center=true);
// Right skeleton hole
rotate([0, 0, 60])
translate([BumperOffset, 0, 0])
color("green")
cylinder (CamThick + 2, d = BumperDia, center=true);
// Cam radius screw hole 1
rotate([0, 0, CamRadiusScrewAngle1])
translate([0, CamRadius - CamRadiusScrewInset, 0])
color("orange")
cylinder (CamThick + 2, d = CamRadiusScrewDia, center=true);
// Cam radius screw hole 2
rotate([0, 0, CamRadiusScrewAngle2])
translate([0, CamRadius - CamRadiusScrewInset, 0])
color("orange")
cylinder (CamThick + 2, d = CamRadiusScrewDia, center=true);
// Cam radius screw hole 3
rotate([0, 0, CamRadiusScrewAngle3])
translate([0, CamRadius - CamRadiusScrewInset, 0])
color("orange")
cylinder (CamThick + 2, d = CamRadiusScrewDia, center=true);
// Cam radius screw hole 4
rotate([0, 0, CamRadiusScrewAngle4])
translate([0, CamRadius - CamRadiusScrewInset, 0])
color("orange")
cylinder (CamThick + 2, d = CamRadiusScrewDia, center=true);
} // End cam body cylinders minus cam back half, shaft notch, bumper notches, skeleton holes, and cam radius screw holes
//
difference(){ // Shaft collar hub minus shaft collar hole, shaft collar flange screw holes, and setscrew hole
// Shaft collar hub
cylinder (CamThick, d = ShaftCollarHubDia, center=true);
// Shaft collar hole
color("white")
cylinder (CamThick + 2, d = ShaftCollarOD, center=true);
// Shaft collar flange hole 1
rotate([0, 0, 45])
translate([0, ShaftCollarFlangeScrewOffset, 0])
color("blue")
cylinder (CamThick + 2, d = ShaftCollarFlangeScrewDia, center=true);
// Shaft collar flange hole 2
rotate([0, 0, 135])
translate([0, ShaftCollarFlangeScrewOffset, 0])
color("blue")
cylinder (CamThick + 2, d = ShaftCollarFlangeScrewDia, center=true);
// Shaft collar flange hole 3
rotate([0, 0, 225])
translate([0, ShaftCollarFlangeScrewOffset, 0])
color("blue")
cylinder (CamThick + 2, d = ShaftCollarFlangeScrewDia, center=true);
// Shaft collar flange hole 4
rotate([0, 0, 315])
translate([0, ShaftCollarFlangeScrewOffset, 0])
color("blue")
cylinder (CamThick + 2, d = ShaftCollarFlangeScrewDia, center=true);
// Setscrew hole
rotate([0, 0, ShaftCollarSetscrewAngle])
translate([0, - ShaftCollarHubDia/2, - CamThick/2 + ShaftCollarSetscrewHeight])
rotate([90, 0, 0])
color("red")
cylinder (ShaftCollarHubDia, d = ShaftCollarSetscrewDia, center=true);
} // End shaft collar hub minus shaft collar hole, shaft collar flange screw holes, and setscrew hole
//
difference(){ // Screw mount block minus spring hole
// Screw mount block
translate([CamRadius - ScrewBlockX/2, - ScrewBlockY/2, 0])
cube ([ScrewBlockX, ScrewBlockY + 0.01, CamThick + 0.01], center=true);
// Spring hole
translate([CamRadius - ScrewBlockX/2, - ScrewBlockY/2, 0])
color("aqua")
cylinder (CamThick + 2, d = SpringHole, center=true);
} // End screw mount block minus spring hole
//
Test rig confirms that this combination of cam and spring should work well together.
- Mounting the spring just 10mm past the zero tension point provides enough tension to
always return the potentiometer to minimum when the lever is released so it is good on the low end of the tension range.
- Looks like the spring, cam, and potentiometer work well together throughout the 180 degree range of motion.
Bad news:The M3 setscrews for the flange shaft coupler can't maintain tension against the shaft during the mechanical stresses involved in this application.
- This weakness is due to a combination of short setscrew length, thin side walls, and
very loosely cut female threads.
- It takes less than a dozen half-power twangs on the lever arm for the setscrew to work it's way loose.
- AFAIK the only way around this is to drill into the shaft and use a longer M3 screw in place of the setscrew.
- I could drill a 3mm hole in the shaft that's 3 or 4 mm deep, but the screw might eventually work it's way loose.
- Worst case, I drill all the way through the shaft and use a 12mm M3 screw and locknut to attach the flange coupler to the shaft.
------------------------------------------
Next steps are to make a hardware store run and write the code for the mount plate and bottom plate.
Scott