Main > Everything Else |
Online electronics parts store? |
<< < (10/12) > >> |
Howard_Casto:
Cool beans man. It turned out pretty good. I guess I'm up. Gonna try and have something releasable this weekend in terms of software. |
PL1:
Thanks. :cheers: Handle code is almost done. Still working on documentation. --- Code: ---// Data East rotary joystick handle (balltop replacement) V0.02 // -- Handle // Other prints needed: // -- Test print // -- Test print 2 // -- Handle top // -- Eject pin (2 pins per handle) // Required hardware: // - M6 locknut (M6-1.0mm thread) // Variable values are estimates. Awaiting accurate measurements. ///////////////////////////// // Adjustable variables ///////////////////////////// // Body BodyHeight = 39.89; // Default = 39.89 // Height of the body BodyDiameter = 33.22; // Default = 33.22 // Diameter of the body UpperRoundover = 1.2; // Default = 1.2 // Radius of the cylinder upper edge roundover UpperRoundoverScale = 1.5; // Default = 1.5 // Amount of horizontal stretch applied to the upper roundover radius of the handle LowerRoundover = 0.5; // Default = 0.5 // Radius of the cylinder lower edge roundover // Spaces to remove from body ShaftHeight = 21.8; // Default = ???mm - panel thickness. (This formula positions the bottom of the handle ???mm above the top of the panel, same as Heavy Barrel.) // ??? for a 3/4" wood panel (19.05mm) // ??? for a 1.6mm metal panel with 7mm spacers (8.6mm) // CRITICAL MEASUREMENT: ShaftHeight + ThreadedHeight must be <= ??? to allow enough room for the locknut under the top // Height of the unthreaded shaft cavity ShaftDiameter = 9.35; // Default = 9.35 for a 9mm shaft // Diameter of the joystick unthreaded shaft cavity. This value needs to be *very slightly* larger than the actual joystick shaft diameter to allow for the 180-sided polygon used to render circles -- see "undersized holes" at https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Primitive_Solids#cylinder ThreadedHeight = 6; // Default = 6 // CRITICAL MEASUREMENT: ShaftHeight + ThreadedHeight must be <= ??? to allow enough room for the locknut under the top // Height of the thread hole ThreadedDiameter = 6.2; // Default = 6.2 // Outer diameter of the thread hole LocknutDiameter = 11.65; // Default = 11.55 + wiggle room // 10mm flat-to-flat = 11.55mm point-to-point // (Height is automatically calculated below.) PinDistance = 11; // Default = // Horizontal distance from handle center to eject pin center PinDiameter = 4; // Default = 4 // Diameter of the eject pin body TopDiameter = 29.2; // Default = 29.2 // Hole for removable top. TopHeight = 2; // Default = 2 // Hole for removable top. // 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. ///////////////////////////// // Non-adjustable variables ///////////////////////////// // Locknut cavity LocknutHeight = (BodyHeight - ShaftHeight - ThreadedHeight); // Height of the locknut cavity ///////////////////////////// // Make the part ///////////////////////////// // Make the main body difference(){ // Body minus holes // Body union () { // Upper roundover scale([UpperRoundoverScale,UpperRoundoverScale,1]) minkowski() { cylinder(d=(BodyDiameter/UpperRoundoverScale)-(UpperRoundover*2),h=0.01); translate ([0, 0, BodyHeight-(UpperRoundover)-0.02]) sphere(r=UpperRoundover); } // Center cylinder translate ([0, 0, LowerRoundover]) cylinder (BodyHeight-UpperRoundover-LowerRoundover,d=BodyDiameter); // Lower roundover minkowski() { cylinder(d=BodyDiameter-(LowerRoundover*2),h=0.01); translate ([0, 0, LowerRoundover]) sphere(r=LowerRoundover); } } // End body // // Holes color("limegreen") translate ([0, 0, ShaftHeight/2]) cylinder (ShaftHeight+.001, d = ShaftDiameter, center=true); // Hole for Shaft color("blue") translate ([0, 0, ShaftHeight+ThreadedHeight/2]) cylinder (ThreadedHeight + .001, d = ThreadedDiameter, center=true); // Hole for threaded color("white") hull() { // Locknut hexagon hull translate ([0, 0, ShaftHeight + ThreadedHeight + LocknutHeight/2]) rotate ([0, 0, 0]) translate ([LocknutDiameter/2, 0, 0]) cylinder (LocknutHeight + 0.01, d = 0.01, center=true); translate ([0, 0, ShaftHeight + ThreadedHeight + LocknutHeight/2]) rotate ([0, 0, 60]) translate ([LocknutDiameter/2, 0, 0]) cylinder (LocknutHeight + 0.01, d = 0.01, center=true); translate ([0, 0, ShaftHeight + ThreadedHeight + LocknutHeight/2]) rotate ([0, 0, 120]) translate ([LocknutDiameter/2, 0, 0]) cylinder (LocknutHeight + 0.01, d = 0.01, center=true); translate ([0, 0, ShaftHeight + ThreadedHeight + LocknutHeight/2]) rotate ([0, 0, 180]) translate ([LocknutDiameter/2, 0, 0]) cylinder (LocknutHeight + 0.01, d = 0.01, center=true); translate ([0, 0, ShaftHeight + ThreadedHeight + LocknutHeight/2]) rotate ([0, 0, 240]) translate ([LocknutDiameter/2, 0, 0]) cylinder (LocknutHeight + 0.01, d = 0.01, center=true); translate ([0, 0, ShaftHeight + ThreadedHeight + LocknutHeight/2]) rotate ([0, 0, 300]) translate ([LocknutDiameter/2, 0, 0]) cylinder (LocknutHeight + 0.01, d = 0.01, center=true); } // Hole for locknut color("red") translate ([0, 0, BodyHeight - TopHeight/2]) cylinder (TopHeight, d = TopDiameter, center=true); // Hole for removable top color("aqua") translate ([0, -PinDistance, 1]) cylinder (2.01, d1 = 3.5, d2 = 2, center=true); // Eject pin access hole 1 color("aqua") translate ([0, PinDistance, 1]) cylinder (2.01, d1 = 3.5, d2 = 2, center=true); // Eject pin access hole 2 color("purple") translate ([0, -PinDistance, BodyHeight/2 + 2]) cylinder (BodyHeight, d = PinDiameter, center=true); // Eject pin hole 1 color("purple") translate ([0, PinDistance, BodyHeight/2 + 2]) cylinder (BodyHeight, d = PinDiameter, center=true); // Eject pin hole 2 } // End body minus holes // --- End code --- Two questions: 1. Is the shaft diameter 9mm or 10mm on the joystick you're modding? 2. How far from the top of the mounting plate to the top of the unthreaded part of the shaft on that stick? (46mm in this diagram) Scott |
Howard_Casto:
Sorry had to find my calipers. The shaft is 9mm wide. From the mounting plate to the start of the threads is 32mm. Just for reference it's a Sanwa JLF, or at least that's what's on the box (long story). I really need to learn open scad btw. It's been amazing what you've been able to pull off in terms of having a user-defined top. |
PL1:
--- Quote from: Howard_Casto on July 12, 2019, 12:02:22 am ---The shaft is 9mm wide. --- End quote --- That variable is already set to the correct value. ;D - Same shaft diameter as the Ultimarc mechanical rotary upgrade. --- Quote from: Howard_Casto on July 12, 2019, 12:02:22 am ---From the mounting plate to the start of the threads is 32mm. --- End quote --- ShaftHeight + panel thickness + 15.6mm (clearance) = 32mm ShaftHeight + panel thickness = 16.4mm For anyone else following along, here are a few good ways to mount that stick and still have enough support (ShaftHeight) for handle strength. 1. A metal or acrylic panel. 2. "Under mount (support blocks)" as described here in the FAQ. 3. A layered panel like Slagcoin shows here. 4. Top-mount in a wood panel. If you go the top-mount approach, you may want something like this fully-parametric mounting plate cover with a Japanese (40x84mm) mount pattern. --- Code: ---// Triggerstick mounting plate cover for top-mounted short shaft triggerstick // Cut a square in the control panel for the body of the stick. // Countersink the mount plate into the control panel so the cover sits flush. // To NOT create a screw hole, comment out both the "translate" and "cylinder" code lines for that hole -- located on lines 71 - 84 below ///////////////////////////// // Define variables ///////////////////////////// cornerdiameter = 2.5; // Corner diameter and plate thickness stickdiameter = 30; // Stick hole diameter Xplate = 75; // Plate width (metal is 65) Yplate = 107; // Plate length (metal is 97) Xscrew = 40; // X-axis distance between screws Yscrew = 84; // Y-axis distance between screws screwbody = 4; // Screw body diameter screwhead = 4; // Screw head diameter -- same as screwbody for non-countersunk screws // 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(){ // Plate minus stick and screw holes hull() { translate([Xplate/2 - cornerdiameter/2, Yplate/2 - cornerdiameter/2, cornerdiameter/4]) cylinder(d=cornerdiameter, cornerdiameter/2, center=true); // Corner cylinder 1 (upper right) translate([- Xplate/2 + cornerdiameter/2, Yplate/2 - cornerdiameter/2, cornerdiameter/4]) cylinder(d=cornerdiameter, cornerdiameter/2, center=true); // Corner cylinder 2 (upper left) translate([Xplate/2 - cornerdiameter/2, - Yplate/2 + cornerdiameter/2, cornerdiameter/4]) cylinder(d=cornerdiameter, cornerdiameter/2, center=true); // Corner cylinder 3 (lower right) translate([- Xplate/2 + cornerdiameter/2, - Yplate/2 + cornerdiameter/2, cornerdiameter/4]) cylinder(d=cornerdiameter, cornerdiameter/2, center=true); // Corner cylinder 4 (lower left) translate([Xplate/2 - cornerdiameter/2, Yplate/2 - cornerdiameter/2, cornerdiameter/2]) sphere(d=cornerdiameter, center=true); // Corner sphere 1 (upper right) translate([- Xplate/2 + cornerdiameter/2, Yplate/2 - cornerdiameter/2, cornerdiameter/2]) sphere(d=cornerdiameter, center=true); // Corner sphere 2 (upper left) translate([Xplate/2 - cornerdiameter/2, - Yplate/2 + cornerdiameter/2, cornerdiameter/2]) sphere(d=cornerdiameter, center=true); // Corner sphere 3 (lower right) translate([- Xplate/2 + cornerdiameter/2, - Yplate/2 + cornerdiameter/2, cornerdiameter/2]) sphere(d=cornerdiameter, center=true); // Corner sphere 4 (lower left) } // End plate hull // Stick hole translate([0, 0, cornerdiameter/2]) cylinder(d=stickdiameter, cornerdiameter + 0.01, center=true); // Screw hole 1 (upper right) translate([Xscrew/2, Yscrew/2, cornerdiameter/2]) cylinder(h=cornerdiameter + 0.01, d1=screwbody, d2=screwhead, center=true); // Screw hole 2 (upper left) translate([- Xscrew/2, Yscrew/2, cornerdiameter/2]) cylinder(h=cornerdiameter + 0.01, d1=screwbody, d2=screwhead, center=true); // Screw hole 3 (lower right) translate([Xscrew/2, - Yscrew/2, cornerdiameter/2]) cylinder(h=cornerdiameter + 0.01, d1=screwbody, d2=screwhead, center=true); // Screw hole 4 (lower left) translate([- Xscrew/2, - Yscrew/2, cornerdiameter/2]) cylinder(h=cornerdiameter + 0.01, d1=screwbody, d2=screwhead, center=true); } // End plate minus stick and screw holes // --- End code --- --- Quote from: Howard_Casto on July 12, 2019, 12:02:22 am ---I really need to learn open scad btw. --- End quote --- It's really easy to get started. There are lots of great introduction tutorials like this one, a fantastic cheatsheet here that links each command to the corresponding user manual entry, and a ton of well-documented code samples out there. Scott |
PL1:
Files are almost all done: - Test Print (shaft diameter) - Done - Test Print 2 (hex locknut) - Done - Eject pins - Done - Handle top - Done, but might add CircleLogo option added - DE_Arrow.svg (Inkscape) - Done - DE_Arrow.dxf (Inkscape) - Done - DE_Logo.svg (Inkscape) - Done - DE_Logo.dxf (Inkscape) - Done - DE_CircleLogo.svg (Inkscape) - Might add this option Done - DE_CircleLogo.dxf (Inkscape) - Might add this option Done - Diagram - Done - Handle - Confirm your panel thickness measurement, set ShaftHeight variable, and add comments These two test prints confirm whether several important variable values will or will not work with your particular combination of printer and joystick/hardware. Test Print -- hardware tested: - Joystick M6 threaded diameter (clears without engaging threads) - Joystick shaft diameter (snug fit) --- Code: ---// Data East rotary joystick handle (balltop replacement) // - Test print // Other prints needed: // -- Test print2 // -- Handle // -- Handle top // -- Eject pin (2 pins per handle) // This test print allows you to verify the correct variable values for your specific hardware and your slicer software before you render/export/print the whole handle. // Hardware tested: // - Joystick M6 threaded diameter (clears without engaging threads) // - Joystick shaft diameter (snug fit) // This part is oriented upside-down compared to the handle so print supports are not needed. ///////////////////////////// // Define variables ///////////////////////////// ShaftDiameter = 9.35; // Default = 9.35 ShaftHeight = 9; // Default = 9 ThreadedDiameter = 6.2; // Default = 6.2 // 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 $fn=180; // Number of fragments (polygon sides) used to render a circle ///////////////////////////// // Make the part ///////////////////////////// // Make the shaft test layer difference() { cylinder(ShaftHeight, d=ShaftDiameter+6, center=true); // Shaft outer cylinder cylinder(ShaftHeight+2, d=ShaftDiameter, center=true); // Remove Shaft Collar hole } // // Make the thread test layer (red) difference() { color("red") translate([0,0,-1 - ShaftHeight/2]) cylinder(2, d=ShaftDiameter + 6, center=true); // Outer cylinder translate([0,0,-1 - ShaftHeight/2]) cylinder(ShaftHeight, d=ThreadedDiameter, center=true); // Remove threaded hole } --- End code --- Test Print 2 -- hardware tested: - Joystick M6 threaded diameter (clears without engaging threads) - Locknut (snug fit) --- Code: ---// Data East rotary joystick handle (balltop replacement) // - Test print 2 // Other prints needed: // -- Test print // -- Handle // -- Handle top // -- Eject pin (2 pins per handle) // This test print allows you to verify the correct variable values for your specific hardware and your slicer software before you render/export/print the whole handle. // Hardware tested: // - Joystick M6 threaded diameter (clears without engaging threads) // - Locknut (snug fit) ///////////////////////////// // Define variables ///////////////////////////// LocknutDiameter = 11.65; // Default = 11.55 + wiggle room // 10mm flat-to-flat = 11.55mm point-to-point LocknutHeight = 9; // Default = 9 ThreadedDiameter = 6.2; // Default = 6.2 // 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 $fn=180; // Number of fragments (polygon sides) used to render a circle ///////////////////////////// // Make the part ///////////////////////////// // Make the locknut test layer difference() { hull() { // Make outer hexagon rotate ([0, 0, 0]) translate ([3 + LocknutDiameter/2, 0, 0]) cylinder (LocknutHeight, d = 0.01, center=true); rotate ([0, 0, 60]) translate ([3 + LocknutDiameter/2, 0, 0]) cylinder (LocknutHeight, d = 0.01, center=true); rotate ([0, 0, 120]) translate ([3 + LocknutDiameter/2, 0, 0]) cylinder (LocknutHeight, d = 0.01, center=true); rotate ([0, 0, 180]) translate ([3 + LocknutDiameter/2, 0, 0]) cylinder (LocknutHeight, d = 0.01, center=true); rotate ([0, 0, 240]) translate ([3 + LocknutDiameter/2, 0, 0]) cylinder (LocknutHeight, d = 0.01, center=true); rotate ([0, 0, 300]) translate ([3 + LocknutDiameter/2, 0, 0]) cylinder (LocknutHeight, d = 0.01, center=true); } hull() { // Remove inner hexagon translate ([0, 0, 0]) rotate ([0, 0, 0]) translate ([LocknutDiameter/2, 0, 0]) cylinder (LocknutHeight + 0.01, d = 0.01, center=true); translate ([0, 0, 0]) rotate ([0, 0, 60]) translate ([LocknutDiameter/2, 0, 0]) cylinder (LocknutHeight + 0.01, d = 0.01, center=true); translate ([0, 0, 0]) rotate ([0, 0, 120]) translate ([LocknutDiameter/2, 0, 0]) cylinder (LocknutHeight + 0.01, d = 0.01, center=true); translate ([0, 0, 0]) rotate ([0, 0, 180]) translate ([LocknutDiameter/2, 0, 0]) cylinder (LocknutHeight + 0.01, d = 0.01, center=true); translate ([0, 0, 0]) rotate ([0, 0, 240]) translate ([LocknutDiameter/2, 0, 0]) cylinder (LocknutHeight + 0.01, d = 0.01, center=true); translate ([0, 0, 0]) rotate ([0, 0, 300]) translate ([LocknutDiameter/2, 0, 0]) cylinder (LocknutHeight + 0.01, d = 0.01, center=true); } } // // Make the thread test layer (red) difference() { color("red") translate([0,0,-1 - LocknutHeight/2]) cylinder(2, d=LocknutDiameter + 6, center=true); // Outer cylinder translate([0,0,-1 - LocknutHeight/2]) cylinder(LocknutHeight, d=ThreadedDiameter, center=true); // Remove threaded hole } --- End code --- Scott |
Navigation |
Message Index |
Next page |
Previous page |