From b518654a3137c6599245a9eca6b279e78dece1ba Mon Sep 17 00:00:00 2001 From: Arne Durr Date: Mon, 8 Dec 2014 13:40:33 +0100 Subject: [PATCH] Added more config settings --- .../Source_files/Cycl_X_carriage.scad | 13 +- .../CYCLONE_2/Source_files/Cycl_X_frames.scad | 87 ++++++----- .../Source_files/Cycl_Y_carriage.scad | 144 +++++++++--------- .../CYCLONE_2/Source_files/Cycl_Y_frames.scad | 131 +++++++--------- .../Source_files/Cycl_Z_carriage.scad | 51 +++---- Hardware/CYCLONE_2/Source_files/Cyclone.scad | 33 ++-- .../Source_files/configs/Default_config.h | 60 ++++++-- .../Source_files/libs/standard_parts.scad | 2 - 8 files changed, 279 insertions(+), 242 deletions(-) diff --git a/Hardware/CYCLONE_2/Source_files/Cycl_X_carriage.scad b/Hardware/CYCLONE_2/Source_files/Cycl_X_carriage.scad index f116799..4ebad23 100644 --- a/Hardware/CYCLONE_2/Source_files/Cycl_X_carriage.scad +++ b/Hardware/CYCLONE_2/Source_files/Cycl_X_carriage.scad @@ -204,24 +204,24 @@ module Cyclone_X_carriage() { // ----- Holes for the linear bearings ------ // Bottom right linear bearing translate([-linearBearingLength/2-X_linearBearingSeparation/2,0,0]) - rotate([0,0,90]) linearBearingHole(model=X_linearBearingModel, lateralExtension=sideExtensions*2+screwExtension*2, lengthExtension=linearBearingLengthExtension); + rotate([0,0,90]) linearBearingHole(model=X_linearBearingModel, lateralExtension=sideExtensions*2+screwExtension*2, pressureFitTolerance=LinearBearingPressureFitTolerance, lengthExtension=linearBearingLengthExtension); // Bottom left linear bearing translate([linearBearingLength/2+X_linearBearingSeparation/2,0,0]) - rotate([0,0,90]) linearBearingHole(model=X_linearBearingModel, lateralExtension=sideExtensions*2+screwExtension*2, lengthExtension=linearBearingLengthExtension); + rotate([0,0,90]) linearBearingHole(model=X_linearBearingModel, lateralExtension=sideExtensions*2+screwExtension*2, pressureFitTolerance=LinearBearingPressureFitTolerance, lengthExtension=linearBearingLengthExtension); // Top linear bearing translate([0,axes_effective_Xsmooth_separation,axes_effective_Xsmooth_separation]) - rotate([90,0,0]) rotate([0,0,90]) linearBearingHole(model=X_linearBearingModel, lateralExtension=sideExtensions*2+screwExtension*2, lengthExtension=linearBearingLength+linearBearingLengthExtension+X_linearBearingSeparation); + rotate([90,0,0]) rotate([0,0,90]) linearBearingHole(model=X_linearBearingModel, lateralExtension=sideExtensions*2+screwExtension*2, pressureFitTolerance=LinearBearingPressureFitTolerance, lengthExtension=linearBearingLength+linearBearingLengthExtension+X_linearBearingSeparation); // ----- Holes for the screws ------ // Bottom right screw translate([-linearBearingLength/2-X_linearBearingSeparation/2,-screwLength/2-screwAditionalLength/2,-linearBearingDiameter/2-screwExtension/2]) - rotate([0,0,180]) hole_for_screw(size=screwSize,length=screwLength+screwAditionalLength,nutDepth=0,nutAddedLen=0,captiveLen=0); + rotate([0,0,180]) hole_for_screw(size=screwSize,length=screwLength+screwAditionalLength,nutDepth=0,nutAddedLen=0,captiveLen=0,tolerance=screwHoleTolerance); // Bottom left screw translate([linearBearingLength/2+X_linearBearingSeparation/2,-screwLength/2-screwAditionalLength/2,-linearBearingDiameter/2-screwExtension/2]) - rotate([0,0,180]) hole_for_screw(size=screwSize,length=screwLength+screwAditionalLength,nutDepth=0,nutAddedLen=0,captiveLen=0); + rotate([0,0,180]) hole_for_screw(size=screwSize,length=screwLength+screwAditionalLength,nutDepth=0,nutAddedLen=0,captiveLen=0,tolerance=screwHoleTolerance); // Top screw translate([0,axes_effective_Xsmooth_separation+screwExtension/2+linearBearingDiameter/2,axes_effective_Xsmooth_separation+screwLength/2+screwAditionalLength/2]) - rotate([90,0,0]) hole_for_screw(size=screwSize,length=screwLength+screwAditionalLength,nutDepth=0,nutAddedLen=0,captiveLen=0); + rotate([90,0,0]) hole_for_screw(size=screwSize,length=screwLength+screwAditionalLength,nutDepth=0,nutAddedLen=0,captiveLen=0,tolerance=screwHoleTolerance); // ----- Hole for the Z nut ------ translate([0,axes_Zreference_posY+axes_ZthreadedReference_posY,axes_effective_Xsmooth_separation+(linearBearingDiameter+sideExtensions)/2]) @@ -247,4 +247,3 @@ module Cyclone_X_carriage() { translate([linearBearingLength/2,axes_effective_Xsmooth_separation,axes_effective_Xsmooth_separation]) rotate([0,-90,0]) linearBearing_single(model=X_linearBearingModel, echoPart=true); } - diff --git a/Hardware/CYCLONE_2/Source_files/Cycl_X_frames.scad b/Hardware/CYCLONE_2/Source_files/Cycl_X_frames.scad index a0df86a..d5caad9 100644 --- a/Hardware/CYCLONE_2/Source_files/Cycl_X_frames.scad +++ b/Hardware/CYCLONE_2/Source_files/Cycl_X_frames.scad @@ -4,9 +4,8 @@ // License: CC BY-SA 4.0 (Attribution-ShareAlike 4.0 International, http://creativecommons.org/licenses/by-sa/4.0/) // Designed with http://www.openscad.org/ - -Xmotor_sideLen = 42.20; - +X_motorModel = Nema17; +Xmotor_sideLen = lookup(NemaSideSize, X_motorModel); //42.20; axes_XgearRatio = X_motorGearRatio/X_rodGearRatio; // Number of tooth (motor/rod) module Cyclone_X_leftFrame() { @@ -15,13 +14,17 @@ module Cyclone_X_leftFrame() { include module Cyclone_X_rightFrame(isLeft=false) { + + footThickness = X_frame_footThickness; + corner_radius = X_frame_corner_radius; + frameFrontalThickness = X_frame_FrontalThickness; footScrewSize = X_Frame_footScrewSize; rodScrewSize = X_Frame_rodScrewSize; - motorWallSeparation = 5; - motorRotatedOffset = 5; - gearWallSeparation = 5; + motorWallSeparation = X_motorWallSeparation; + motorRotatedOffset = X_motorRotatedOffset; + gearWallSeparation = X_gearWallSeparation; partThickness = X_frames_additional_thickness+rodScrewSize*2; @@ -34,12 +37,20 @@ module Cyclone_X_rightFrame(isLeft=false) { footWidth = dimX+2*footSeparation; rod_nut_len = 0.8*axes_Xthreaded_rodD; - X_motorModel = Nema17; module Cyclone_XsubPart_gearCover() { + margin = gearCover_margin; + rodGearAddedMargin = rodGearAddedgearCover_margin; effectiveXgearSeparation = axes_XgearSeparation+0.5; + wallThickness = gearCover_wallThickness; + screwHeadSpaceHeight = gearCover_screwHeadSpaceHeight; + screwHeadSpaceDiam = gearCover_screwHeadSpaceDiam; + coverHeight = gearCoverHeight; + coverExtraHeight = gearCoverExtraHeight; + coverExtraRadius = gearCoverExtraRadius; nema_screw_separation = lookup(NemaDistanceBetweenMountingHoles, X_motorModel); - + truncationAngle = gearCover_truncationAngle; + motorGearRadius = axes_XgearSeparation/(1+axes_XgearRatio)+gearCover_margin; rodGearRadius = axes_XgearSeparation/(1+1/axes_XgearRatio)+gearCover_margin+rodGearAddedgearCover_margin; @@ -120,8 +131,7 @@ module Cyclone_X_rightFrame(isLeft=false) { } } } - - + module Cyclone_X_endstopHolder(holes=false) { // Endstop holder translate([-partThickness-0.04,19,-5+axes_Xsmooth_separation]) @@ -189,7 +199,6 @@ module Cyclone_X_rightFrame(isLeft=false) { } } - difference() { // Main block union() { @@ -247,15 +256,15 @@ module Cyclone_X_rightFrame(isLeft=false) { translate([-axes_Xreference_posX-dimX-footSeparation,axes_Xreference_posY+footSeparation,-axes_Yreference_height+footThickness]) { rotate([0,90,0]) rotate([0,0,90]) - hole_for_screw(size=footScrewSize,length=footThickness+base_thickness,nutDepth=0,nutAddedLen=0,captiveLen=0, invert=true); + hole_for_screw(size=footScrewSize,length=footThickness+base_thickness,nutDepth=0,nutAddedLen=0,captiveLen=0,tolerance=screwHoleTolerance, invert=true); translate([0,dimY/2,0]) rotate([0,90,0]) rotate([0,0,90]) - hole_for_screw(size=footScrewSize,length=footThickness+base_thickness,nutDepth=0,nutAddedLen=0,captiveLen=0, invert=true); + hole_for_screw(size=footScrewSize,length=footThickness+base_thickness,nutDepth=0,nutAddedLen=0,captiveLen=0,tolerance=screwHoleTolerance, invert=true); translate([0,dimY-2*footSeparation,0]) rotate([0,90,0]) rotate([0,0,90]) - hole_for_screw(size=footScrewSize,length=footThickness+base_thickness,nutDepth=0,nutAddedLen=0,captiveLen=0, invert=true); + hole_for_screw(size=footScrewSize,length=footThickness+base_thickness,nutDepth=0,nutAddedLen=0,captiveLen=0,tolerance=screwHoleTolerance, invert=true); } } @@ -278,9 +287,11 @@ module Cyclone_X_rightFrame(isLeft=false) { translate([axes_Xthreaded_rodD,0,0]){ rotate([0,-90,0]) nut(size=axes_Xthreaded_rodD, echoPart=true); - translate([axes_Xthreaded_rodD-7,0,0]) - rotate([0,-90,0]) color(color_movingPart) - cyclone_rod_gear(Gear_N_Teeth=X_rodGearRatio,gearHeight=X_gear_thickness,nutSize=8,tolerance=0); + if(Render_X_rodGear) { + translate([axes_Xthreaded_rodD-7,0,0]) + rotate([0,-90,0]) color(color_movingPart) + cyclone_rod_gear(Gear_N_Teeth=X_rodGearRatio,gearHeight=X_gear_thickness,nutSize=8,tolerance=0); + } } // Translate to motor position rotate([motorRotatedOffset,0,0]) { @@ -288,13 +299,18 @@ module Cyclone_X_rightFrame(isLeft=false) { rotate([-motorRotatedOffset,0,0]) { translate([-motorWallSeparation,0,0]) rotate([0,90,0]) stepperMotor(screwHeight=motorWallSeparation, echoPart=true); - translate([axes_Xthreaded_rodD+1.5,0,0]) - rotate([0,-90,0]) color(color_movingPart) - cyclone_motor_gear(Gear_N_Teeth=X_motorGearRatio,gearHeight=X_gear_thickness,tolerance=0); + if(Render_X_motorGear) { + translate([axes_Xthreaded_rodD+1.5,0,0]) + rotate([0,-90,0]) color(color_movingPart) + cyclone_motor_gear(Gear_N_Teeth=X_motorGearRatio,gearHeight=X_gear_thickness,tolerance=0); + } } } + if(Render_Y_gearCover) { + // Draw the X gear cover translate([0.1,0,0]) color(color_stillPart) Cyclone_XsubPart_gearCover(); + } } translate([0,0,axes_Xsmooth_separation]) rotate([0,0,-90]) @@ -304,23 +320,18 @@ module Cyclone_X_rightFrame(isLeft=false) { translate([-axes_Xreference_posX-dimX-footSeparation,axes_Xreference_posY+footSeparation,-axes_Yreference_height+footThickness]) { rotate([0,90,0]) rotate([0,0,90]) - screw_and_nut(size=footScrewSize,length=footThickness+base_thickness,nutDepth=0,nutAddedLen=0,captiveLen=0, invert=true, autoNutOffset=true, echoPart=true); + screw_and_nut(size=footScrewSize,length=footThickness+base_thickness,nutDepth=0,nutAddedLen=0,captiveLen=0,tolerance=screwHoleTolerance, invert=true, autoNutOffset=true, echoPart=true); translate([0,dimY/2,0]) rotate([0,90,0]) rotate([0,0,90]) - screw_and_nut(size=footScrewSize,length=footThickness+base_thickness,nutDepth=0,nutAddedLen=0,captiveLen=0, invert=true, autoNutOffset=true, echoPart=true); + screw_and_nut(size=footScrewSize,length=footThickness+base_thickness,nutDepth=0,nutAddedLen=0,captiveLen=0,tolerance=screwHoleTolerance, invert=true, autoNutOffset=true, echoPart=true); translate([0,dimY-2*footSeparation,0]) rotate([0,90,0]) rotate([0,0,90]) - screw_and_nut(size=footScrewSize,length=footThickness+base_thickness,nutDepth=0,nutAddedLen=0,captiveLen=0, invert=true, autoNutOffset=true, echoPart=true); + screw_and_nut(size=footScrewSize,length=footThickness+base_thickness,nutDepth=0,nutAddedLen=0,captiveLen=0,tolerance=screwHoleTolerance, invert=true, autoNutOffset=true, echoPart=true); } } - - - - - module rodHolder(rodD=8.5, screwSize=3, height=0, sideLen=0, thickness=5, space=2, negative=false) { screwAditionalDistance = rodD/2; dimX = rodD+4*screwSize+screwAditionalDistance; @@ -332,14 +343,16 @@ module rodHolder(rodD=8.5, screwSize=3, height=0, sideLen=0, thickness=5, space= if(negative) { translate([screwSize+screwAditionalDistance,-dimY/2,dimZ]) rotate([90,0,0]) - hole_for_screw(size=screwSize,length=dimZ+15,nutDepth=5,nutAddedLen=0,captiveLen=10, rot=90); + hole_for_screw(size=screwSize,length=dimZ+15,nutDepth=5,nutAddedLen=0,captiveLen=10,tolerance=screwHoleTolerance, rot=90); translate([-screwSize-screwAditionalDistance,-dimY/2,dimZ]) rotate([90,0,0]) - hole_for_screw(size=screwSize,length=dimZ+15,nutDepth=5,nutAddedLen=0,captiveLen=10, rot=90); + hole_for_screw(size=screwSize,length=dimZ+15,nutDepth=5,nutAddedLen=0,captiveLen=10,tolerance=screwHoleTolerance, rot=90); } else { difference() { union() { - color(color_movingPart) translate([0,-dimY/2,dimZ/2+space/4]) bcube([dimX,dimY,dimZ-space/2],cr=corner_radius,cres=10); + //if(Render_rodHolder) { + color(color_movingPart) translate([0,-dimY/2,dimZ/2+space/4]) bcube([dimX,dimY,dimZ-space/2],cr=corner_radius,cres=10); + //} color(color_stillPart) if(sideLen>dimX/2) translate([sideLen/2-dimX/4,-dimY/2,-height/2-space/4]) bcube([dimX/2+sideLen,dimY,height-space/2],cr=corner_radius,cres=10); @@ -348,21 +361,19 @@ module rodHolder(rodD=8.5, screwSize=3, height=0, sideLen=0, thickness=5, space= } translate([screwSize+screwAditionalDistance,-dimY/2,dimZ]) rotate([90,0,0]) - hole_for_screw(size=screwSize,length=dimZ+15,nutDepth=5,nutAddedLen=0,captiveLen=10, rot=90); + hole_for_screw(size=screwSize,length=dimZ+15,nutDepth=5,nutAddedLen=0,captiveLen=10,tolerance=screwHoleTolerance, rot=90); translate([-screwSize-screwAditionalDistance,-dimY/2,dimZ]) rotate([90,0,0]) - hole_for_screw(size=screwSize,length=dimZ+15,nutDepth=5,nutAddedLen=0,captiveLen=10, rot=90); + hole_for_screw(size=screwSize,length=dimZ+15,nutDepth=5,nutAddedLen=0,captiveLen=10,tolerance=screwHoleTolerance, rot=90); standard_rod(diam=rodD, length=dimY*4, threaded=false, renderPart=true, center=true); - rodHolder(rodD=rodD, screwSize=screwSize, negative=true); + //rodHolder(rodD=rodD, screwSize=screwSize, negative=true); } // Draw screws translate([screwSize+screwAditionalDistance,-dimY/2,dimZ+0.01]) rotate([90,0,0]) - screw_and_nut(size=screwSize,length=dimZ+15,nutDepth=5,nutAddedLen=0,captiveLen=0, rot=90, echoPart=true); + screw_and_nut(size=screwSize,length=dimZ+15,nutDepth=5,nutAddedLen=0,captiveLen=0,tolerance=screwHoleTolerance, rot=90, echoPart=true); translate([-screwSize-screwAditionalDistance,-dimY/2,dimZ+0.01]) rotate([90,0,0]) - screw_and_nut(size=screwSize,length=dimZ+15,nutDepth=5,nutAddedLen=0,captiveLen=0, rot=90, echoPart=true); + screw_and_nut(size=screwSize,length=dimZ+15,nutDepth=5,nutAddedLen=0,captiveLen=0,tolerance=screwHoleTolerance, rot=90, echoPart=true); } } - - diff --git a/Hardware/CYCLONE_2/Source_files/Cycl_Y_carriage.scad b/Hardware/CYCLONE_2/Source_files/Cycl_Y_carriage.scad index 1a342b6..8f0d980 100644 --- a/Hardware/CYCLONE_2/Source_files/Cycl_Y_carriage.scad +++ b/Hardware/CYCLONE_2/Source_files/Cycl_Y_carriage.scad @@ -56,10 +56,10 @@ module Cyclone_YsubPart_nutHolder() { // Holes for the supporting screws translate([0,-screwSeparation/2,workbed_separation_from_Y_threaded_rod+workbed_thickness]) rotate([90,0,0]) - hole_for_screw(size=screwSize,length=workbed_thickness+footThickness,nutDepth=-dimZ,nutAddedLen=dimZ,captiveLen=0); + hole_for_screw(size=screwSize,length=workbed_thickness+footThickness,nutDepth=-dimZ,nutAddedLen=dimZ,captiveLen=0,tolerance=screwHoleTolerance); translate([0,+screwSeparation/2,workbed_separation_from_Y_threaded_rod+workbed_thickness]) rotate([90,0,0]) - hole_for_screw(size=screwSize,length=workbed_thickness+footThickness,nutDepth=-dimZ,nutAddedLen=dimZ,captiveLen=0); + hole_for_screw(size=screwSize,length=workbed_thickness+footThickness,nutDepth=-dimZ,nutAddedLen=dimZ,captiveLen=0,tolerance=screwHoleTolerance); } translate([0,dimY/2+rod_nut_len/2,0]) rotate([0,90,0]) rotate([90,0,0]) nut(size=8, echoPart=true); @@ -69,7 +69,6 @@ module Cyclone_YsubPart_nutHolder() { washer_single(diam=washer_D, thickness=washer_thickness, echoPart=true); } - use module Cyclone_YsubPart_singleLinearBearingHolder(onlyScrews=false) { linearBearingLength = linearBearing_L(Y_linearBearingModel); @@ -90,12 +89,10 @@ module Cyclone_YsubPart_singleLinearBearingHolder(onlyScrews=false) { workbed_screws_aditional_length = PCBholder_height; - //Y_linearBearing_pressureFitTolerance = 0.5; - if(onlyScrews) { // Hole for the screw and nut translate([dimX/2+footSeparation,0,dimZ+workbed_thickness+workbed_screws_aditional_length]) - rotate([90,0,0]) hole_for_screw(size=screwSize,length=workbed_screws_aditional_length+footThickness+workbed_thickness,nutDepth=0,nutAddedLen=0,captiveLen=0); + rotate([90,0,0]) hole_for_screw(size=screwSize,length=workbed_screws_aditional_length+footThickness+workbed_thickness,nutDepth=0,nutAddedLen=0,captiveLen=0,tolerance=screwHoleTolerance); } else { difference() { // Main part @@ -113,11 +110,11 @@ module Cyclone_YsubPart_singleLinearBearingHolder(onlyScrews=false) { bcube([dimX,dimY,holderExtension], cr=3, cres=0); } // Hole for linear bearing - linearBearingHole(model=Y_linearBearingModel, lateralExtension=holderExtension, lengthExtension=2*plasticHolderLength, holderLength=plasticHolderLength/2); - //linearBearingHole(model=Y_linearBearingModel); + linearBearingHole(model=Y_linearBearingModel, lateralExtension=holderExtension, pressureFitTolerance=LinearBearingPressureFitTolerance, lengthExtension=2*plasticHolderLength, holderLength=plasticHolderLength/2); + // Hole for the screw and nut translate([dimX/2+footSeparation,0,dimZ+workbed_thickness+workbed_screws_aditional_length]) - rotate([90,0,0]) hole_for_screw(size=screwSize,length=workbed_screws_aditional_length+footThickness+workbed_thickness,nutDepth=0,nutAddedLen=0,captiveLen=0); + rotate([90,0,0]) hole_for_screw(size=screwSize,length=workbed_screws_aditional_length+footThickness+workbed_thickness,nutDepth=0,nutAddedLen=0,captiveLen=0,tolerance=screwHoleTolerance); } translate([0,linearBearingLength/2,0]) @@ -136,9 +133,6 @@ module Cyclone_YsubPart_linearBearingHolders(onlyScrews=false) { Cyclone_YsubPart_singleLinearBearingHolder(onlyScrews=onlyScrews); } - - - module Cyclone_YsubPart_PCBholder() { holderArmLength = 30; @@ -156,67 +150,70 @@ module Cyclone_YsubPart_PCBholder() { %translate([0,0,PCBholder_height+PCB_dimZ/2]) color([0.8,0.5,0, 1]) cube([PCB_dimX+PCB_holder_tolerance*2,PCB_dimY+PCB_holder_tolerance*2,PCB_dimZ/10], center=true); - difference() { - color(color_stillPart) translate([0,0,PCBholder_height/2]) - bcube([workbed_size_X,workbed_size_Y,PCBholder_height], cr=25, cres=0); - - // Hole for the PCB - translate([0,0,PCBholder_height]) - cube([PCB_dimX+PCB_holder_tolerance*2,PCB_dimY+PCB_holder_tolerance*2,PCB_dimZ], center=true); - - // Holes to split the part in two pieces - translate([0,0,PCBholder_height/2]) - cube([PCB_dimX-PCB_holder_edge_length*2,PCB_dimY-PCB_holder_edge_length*2, 2*PCBholder_height+1], center=true); - translate([-PCB_dimX/2+PCB_holder_edge_length,0,-0.5]) - cube([PCB_dimX-holderArmLength-PCB_holder_edge_length,workbed_size_Y, 2*PCBholder_height+1]); - scale([-1,-1,1]) translate([-PCB_dimX/2+PCB_holder_edge_length,0,-0.5]) - cube([PCB_dimX-holderArmLength-PCB_holder_edge_length,workbed_size_Y, 2*PCBholder_height+1]); - - // Holes for the screws - for (x = [-1,1], y=[-1,0,1]) { - translate([x*(PCB_dimX/2+screwSeparation),y*PCB_dimY/4,PCBholder_height+screwSize]) - rotate([0,0,x*-90]) rotate([90,0,0]) hole_for_screw(size=screwSize,length=PCBholder_height+3,nutDepth=4.5,nutAddedLen=0,captiveLen=10, rot=90); - } - translate([PCB_dimX/2-holderArmLength/2,PCB_dimY/2+screwSeparation,PCBholder_height+screwSize]) - rotate([90,0,0]) hole_for_screw(size=screwSize,length=PCBholder_height+3,nutDepth=4.5,nutAddedLen=0,captiveLen=10, rot=90); - scale([-1,-1,1]) translate([PCB_dimX/2-holderArmLength/2,PCB_dimY/2+screwSeparation,PCBholder_height+screwSize]) - rotate([90,0,0]) hole_for_screw(size=screwSize,length=PCBholder_height+3,nutDepth=4.5,nutAddedLen=0,captiveLen=10, rot=90); - - } - // Holder top L supports - translate([0,0,0.5]) - difference() { - color(color_movingPart) translate([0,0,PCBholder_height+(holderL_thickness+holderL_thickness_btm)/2]) - bcube([PCB_dimX+PCB_holder_tolerance*2+holderL_width, PCB_dimY+PCB_holder_tolerance*2+holderL_width, holderL_thickness+holderL_thickness_btm], cr=8, cres=0); - translate([0,0,PCBholder_height+holderL_thickness_btm/2]) - bcube([PCB_dimX+PCB_holder_tolerance*2+holderL_innerWidth, PCB_dimY+PCB_holder_tolerance*2+holderL_innerWidth, holderL_thickness_btm], cr=8, cres=0); - - if(draw_references) %frame(); - - translate([0,0,PCBholder_height/2]) - cube([PCB_dimX-PCB_holder_edge_length*2,PCB_dimY-PCB_holder_edge_length*2, 2*PCBholder_height+1], center=true); - translate([-PCB_dimX/2+PCB_holder_edge_length,0,-0.5]) - cube([PCB_dimX-holderArmLength-PCB_holder_edge_length,workbed_size_Y, 2*PCBholder_height+1]); - scale([-1,-1,1]) translate([-PCB_dimX/2+PCB_holder_edge_length,0,-0.5]) - cube([PCB_dimX-holderArmLength-PCB_holder_edge_length,workbed_size_Y, 2*PCBholder_height+1]); - - // Holes for the screws - translate([0,0,holderL_thickness+(holderL_thickness+holderL_thickness_btm)/2]) { + if(Render_PCBholderBottom) { + difference() { + color(color_stillPart) translate([0,0,PCBholder_height/2]) + bcube([workbed_size_X,workbed_size_Y,PCBholder_height], cr=25, cres=0); + + // Hole for the PCB + translate([0,0,PCBholder_height]) + cube([PCB_dimX+PCB_holder_tolerance*2,PCB_dimY+PCB_holder_tolerance*2,PCB_dimZ], center=true); + + // Holes to split the part in two pieces + translate([0,0,PCBholder_height/2]) + cube([PCB_dimX-PCB_holder_edge_length*2,PCB_dimY-PCB_holder_edge_length*2, 2*PCBholder_height+1], center=true); + translate([-PCB_dimX/2+PCB_holder_edge_length,0,-0.5]) + cube([PCB_dimX-holderArmLength-PCB_holder_edge_length,workbed_size_Y, 2*PCBholder_height+1]); + scale([-1,-1,1]) translate([-PCB_dimX/2+PCB_holder_edge_length,0,-0.5]) + cube([PCB_dimX-holderArmLength-PCB_holder_edge_length,workbed_size_Y, 2*PCBholder_height+1]); + + // Holes for the screws for (x = [-1,1], y=[-1,0,1]) { translate([x*(PCB_dimX/2+screwSeparation),y*PCB_dimY/4,PCBholder_height+screwSize]) - rotate([0,0,x*-90]) rotate([90,0,0]) hole_for_screw(size=screwSize,length=PCBholder_height*10,nutDepth=4.5,nutAddedLen=0,captiveLen=10, rot=90); + rotate([0,0,x*-90]) rotate([90,0,0]) hole_for_screw(size=screwSize,length=PCBholder_height+3,nutDepth=4.5,nutAddedLen=0,captiveLen=10,tolerance=screwHoleTolerance, rot=90); } - translate([PCB_dimX/2-holderArmLength/2,PCB_dimY/2+screwSeparation,PCBholder_height+screwSize]) - rotate([90,0,0]) hole_for_screw(size=screwSize,length=PCBholder_height*10,nutDepth=4.5,nutAddedLen=0,captiveLen=10, rot=90); + rotate([90,0,0]) hole_for_screw(size=screwSize,length=PCBholder_height+3,nutDepth=4.5,nutAddedLen=0,captiveLen=10,tolerance=screwHoleTolerance, rot=90); scale([-1,-1,1]) translate([PCB_dimX/2-holderArmLength/2,PCB_dimY/2+screwSeparation,PCBholder_height+screwSize]) - rotate([90,0,0]) hole_for_screw(size=screwSize,length=PCBholder_height*10,nutDepth=4.5,nutAddedLen=0,captiveLen=10, rot=90); + rotate([90,0,0]) hole_for_screw(size=screwSize,length=PCBholder_height+3,nutDepth=4.5,nutAddedLen=0,captiveLen=10,tolerance=screwHoleTolerance, rot=90); + + } + } + + // Holder top L supports + if(Render_PCBholderTop) { + translate([0,0,0.5]) + difference() { + color(color_movingPart) translate([0,0,PCBholder_height+(holderL_thickness+holderL_thickness_btm)/2]) + bcube([PCB_dimX+PCB_holder_tolerance*2+holderL_width, PCB_dimY+PCB_holder_tolerance*2+holderL_width, holderL_thickness+holderL_thickness_btm], cr=8, cres=0); + translate([0,0,PCBholder_height+holderL_thickness_btm/2]) + bcube([PCB_dimX+PCB_holder_tolerance*2+holderL_innerWidth, PCB_dimY+PCB_holder_tolerance*2+holderL_innerWidth, holderL_thickness_btm], cr=8, cres=0); + + if(draw_references) %frame(); + + translate([0,0,PCBholder_height/2]) + cube([PCB_dimX-PCB_holder_edge_length*2,PCB_dimY-PCB_holder_edge_length*2, 2*PCBholder_height+1], center=true); + translate([-PCB_dimX/2+PCB_holder_edge_length,0,-0.5]) + cube([PCB_dimX-holderArmLength-PCB_holder_edge_length,workbed_size_Y, 2*PCBholder_height+1]); + scale([-1,-1,1]) translate([-PCB_dimX/2+PCB_holder_edge_length,0,-0.5]) + cube([PCB_dimX-holderArmLength-PCB_holder_edge_length,workbed_size_Y, 2*PCBholder_height+1]); + + // Holes for the screws + translate([0,0,holderL_thickness+(holderL_thickness+holderL_thickness_btm)/2]) { + for (x = [-1,1], y=[-1,0,1]) { + translate([x*(PCB_dimX/2+screwSeparation),y*PCB_dimY/4,PCBholder_height+screwSize]) + rotate([0,0,x*-90]) rotate([90,0,0]) hole_for_screw(size=screwSize,length=PCBholder_height*10,nutDepth=4.5,nutAddedLen=0,captiveLen=10,tolerance=screwHoleTolerance, rot=90); + } + + translate([PCB_dimX/2-holderArmLength/2,PCB_dimY/2+screwSeparation,PCBholder_height+screwSize]) + rotate([90,0,0]) hole_for_screw(size=screwSize,length=PCBholder_height*10,nutDepth=4.5,nutAddedLen=0,captiveLen=10,tolerance=screwHoleTolerance, rot=90); + scale([-1,-1,1]) translate([PCB_dimX/2-holderArmLength/2,PCB_dimY/2+screwSeparation,PCBholder_height+screwSize]) + rotate([90,0,0]) hole_for_screw(size=screwSize,length=PCBholder_height*10,nutDepth=4.5,nutAddedLen=0,captiveLen=10,tolerance=screwHoleTolerance, rot=90); + } } } } - - module Cyclone_Y_carriage() { if(render_DXF_workbed) { offset(delta = DXF_offset) projection(cut = true) @@ -229,17 +226,22 @@ module Cyclone_Y_carriage() { } } else { if(draw_references) color("red") %frame(20); - rotate([0,0,180]) Cyclone_YsubPart_nutHolder(); + if(Render_YsubPart_nutHolder){ + rotate([0,0,180]) + Cyclone_YsubPart_nutHolder(); + } translate([0,0,axes_Y_smoothThreaded_verticalSeparation]) { - Cyclone_YsubPart_linearBearingHolders(); - difference() { - translate([0,0,workbed_separation_from_Y_threaded_rod+workbed_thickness-axes_Y_smoothThreaded_verticalSeparation]) - Cyclone_YsubPart_PCBholder(); - Cyclone_YsubPart_linearBearingHolders(onlyScrews=true); + if(Render_YsubPart_linearBearingHolders) + Cyclone_YsubPart_linearBearingHolders(); + if(Render_PCBholderTop || Render_PCBholderBottom) { + difference() { + translate([0,0,workbed_separation_from_Y_threaded_rod+workbed_thickness-axes_Y_smoothThreaded_verticalSeparation]) + Cyclone_YsubPart_PCBholder(); + Cyclone_YsubPart_linearBearingHolders(onlyScrews=true); + } } } color([0.9,0.9,0.9, 1]) translate([0,0,workbed_separation_from_Y_threaded_rod+workbed_thickness]) beveledBase(size=[workbed_size_X,workbed_size_Y,workbed_thickness], radius=3, res=15, echoPart=true); } } - diff --git a/Hardware/CYCLONE_2/Source_files/Cycl_Y_frames.scad b/Hardware/CYCLONE_2/Source_files/Cycl_Y_frames.scad index 82f4d48..e83cf5f 100644 --- a/Hardware/CYCLONE_2/Source_files/Cycl_Y_frames.scad +++ b/Hardware/CYCLONE_2/Source_files/Cycl_Y_frames.scad @@ -22,9 +22,9 @@ axes_YgearRatio = Y_motorGearRatio/Y_rodGearRatio; // Number of tooth (motor/rod module Cyclone_Y_frontFrame() { screwSize = Y_frontFrame_footScrewSize; - motorWallSeparation = 5; - motorRotatedOffset = 5; - gearWallSeparation = 5; + motorWallSeparation = Y_motorWallSeparation; + motorRotatedOffset = Y_motorRotatedOffset; + gearWallSeparation = Y_gearWallSeparation; motor_YgearSeparation_projected = axes_YgearSeparation*cos(-motorRotatedOffset); @@ -32,7 +32,7 @@ module Cyclone_Y_frontFrame() { gear_thickness = Y_gear_thickness; bearing_width = bearingWidth(Y_threaded_rodBearingModel); bearing_diam = bearingOuterDiameter(Y_threaded_rodBearingModel); - bearingDepth = 3; + bearingDepth = Y_threaded_rodBearingDepth; partThickness = 5+screwSize*2; dimX = bearing_diam+partThickness; @@ -40,23 +40,22 @@ module Cyclone_Y_frontFrame() { dimZ = axes_Y_threaded_height; footSeparation = screwSize*2; - foot_additional_separation = 5; - footThickness = 10; + foot_additional_separation = Y_foot_additional_separation; + footThickness = Y_frame_footThickness; module Cyclone_YsubPart_gearCover() { - margin = 4; - rodGearAddedMargin = 0; + margin = gearCover_margin; + rodGearAddedMargin = rodGearAddedgearCover_margin; effectiveYgearSeparation = axes_YgearSeparation+0.5; - wallThickness = 0.4*4; - screwHeadSpaceHeight = 4; - screwHeadSpaceDiam = 6; - coverHeight = 16; - coverExtraHeight = 5; - coverExtraRadius = -7; + wallThickness = gearCover_wallThickness; + screwHeadSpaceHeight = gearCover_screwHeadSpaceHeight; + screwHeadSpaceDiam = gearCover_screwHeadSpaceDiam; + coverHeight = gearCoverHeight; + coverExtraHeight = gearCoverExtraHeight; + coverExtraRadius = gearCoverExtraRadius; nema_screw_separation = lookup(NemaDistanceBetweenMountingHoles, Y_motorModel); - - truncationAngle = 10; + truncationAngle = gearCover_truncationAngle; motorGearRadius = axes_YgearSeparation/(1+axes_YgearRatio)+margin; rodGearRadius = axes_YgearSeparation/(1+1/axes_YgearRatio)+margin+rodGearAddedMargin; @@ -141,7 +140,6 @@ module Cyclone_Y_frontFrame() { } } - translate([0,2*rod_nut_len+gear_thickness,0]) { translate([0,bearing_width-bearingDepth,0]) { if(draw_references) color("blue") %frame(20); @@ -186,15 +184,15 @@ module Cyclone_Y_frontFrame() { translate([footSeparation+dimX/2,0,0]) rotate([0,90,0]) rotate([0,0,90]) - hole_for_screw(size=screwSize,length=footThickness+base_thickness,nutDepth=0,nutAddedLen=0,captiveLen=0, rot=90, invert=true); + hole_for_screw(size=screwSize,length=footThickness+base_thickness,nutDepth=0,nutAddedLen=0,captiveLen=0,tolerance=screwHoleTolerance,rot=90, invert=true); translate([dimX/3,dimY/2+footSeparation+foot_additional_separation,0]) rotate([0,90,0]) rotate([0,0,90]) - hole_for_screw(size=screwSize,length=footThickness+base_thickness,nutDepth=0,nutAddedLen=0,captiveLen=0, rot=90, invert=true); + hole_for_screw(size=screwSize,length=footThickness+base_thickness,nutDepth=0,nutAddedLen=0,captiveLen=0,tolerance=screwHoleTolerance, rot=90, invert=true); translate([-footSeparation-foot_additional_separation-motor_YgearSeparation_projected-Ymotor_sideLen/2,0,0]) rotate([0,90,0]) rotate([0,0,90]) - hole_for_screw(size=screwSize,length=footThickness+base_thickness,nutDepth=0,nutAddedLen=0,captiveLen=0, rot=90, invert=true); + hole_for_screw(size=screwSize,length=footThickness+base_thickness,nutDepth=0,nutAddedLen=0,captiveLen=0,tolerance=screwHoleTolerance, rot=90, invert=true); } // Translate to motor axis position rotate([0,-motorRotatedOffset,0]) { @@ -212,15 +210,15 @@ module Cyclone_Y_frontFrame() { translate([footSeparation+dimX/2,0,0]) rotate([0,90,0]) rotate([0,0,90]) - screw_and_nut(size=screwSize,length=footThickness+base_thickness,nutDepth=0,nutAddedLen=0,captiveLen=0, rot=90, invert=true, autoNutOffset=true, echoPart=true); + screw_and_nut(size=screwSize,length=footThickness+base_thickness,nutDepth=0,nutAddedLen=0,captiveLen=0,tolerance=screwHoleTolerance, rot=90, invert=true, autoNutOffset=true, echoPart=true); translate([dimX/3,dimY/2+footSeparation+foot_additional_separation,0]) rotate([0,90,0]) rotate([0,0,90]) - screw_and_nut(size=screwSize,length=footThickness+base_thickness,nutDepth=0,nutAddedLen=0,captiveLen=0, rot=90, invert=true, autoNutOffset=true, echoPart=true); + screw_and_nut(size=screwSize,length=footThickness+base_thickness,nutDepth=0,nutAddedLen=0,captiveLen=0,tolerance=screwHoleTolerance, rot=90, invert=true, autoNutOffset=true, echoPart=true); translate([-footSeparation-foot_additional_separation-motor_YgearSeparation_projected-Ymotor_sideLen/2,0,0]) rotate([0,90,0]) rotate([0,0,90]) - screw_and_nut(size=screwSize,length=footThickness+base_thickness,nutDepth=0,nutAddedLen=0,captiveLen=0, rot=90, invert=true, autoNutOffset=true, echoPart=true); + screw_and_nut(size=screwSize,length=footThickness+base_thickness,nutDepth=0,nutAddedLen=0,captiveLen=0,tolerance=screwHoleTolerance, rot=90, invert=true, autoNutOffset=true, echoPart=true); } // Translate to motor position rotate([0,-motorRotatedOffset,0]) { @@ -229,14 +227,18 @@ module Cyclone_Y_frontFrame() { translate([0,motorWallSeparation,0]) rotate([90,0,0]) stepperMotor(screwHeight=motorWallSeparation, echoPart=true); - translate([0,-rod_nut_len-gear_thickness,0]) - rotate([-90,180,0]) color(color_movingPart) - cyclone_motor_gear(Gear_N_Teeth=Y_motorGearRatio,gearHeight=gear_thickness,tolerance=0); + if(Render_Y_motorGear) { + translate([0,-rod_nut_len-gear_thickness,0]) + rotate([-90,180,0]) color(color_movingPart) + cyclone_motor_gear(Gear_N_Teeth=Y_motorGearRatio,gearHeight=gear_thickness,tolerance=0); + } } } + if(Render_Y_gearCover) { // Draw the Y gear cover translate([0,-0.1,0]) color(color_stillPart) Cyclone_YsubPart_gearCover(); + } } rotate([-90,0,0]) radialBearing(echoPart=true); @@ -247,17 +249,13 @@ module Cyclone_Y_frontFrame() { translate([0,rod_nut_len+gear_thickness,0]) rotate([-90,0,0]) nut(size=axes_Ythreaded_rodD, echoPart=true); - translate([0,METRIC_NUT_THICKNESS[axes_Ythreaded_rodD]/4+rod_nut_len,0]) - rotate([-90,0,0]) color(color_movingPart) - cyclone_rod_gear(Gear_N_Teeth=Y_rodGearRatio,gearHeight=gear_thickness,nutSize=8,tolerance=0); + if(Render_Y_rodGear) { + translate([0,METRIC_NUT_THICKNESS[axes_Ythreaded_rodD]/4+rod_nut_len,0]) + rotate([-90,0,0]) color(color_movingPart) + cyclone_rod_gear(Gear_N_Teeth=Y_rodGearRatio,gearHeight=gear_thickness,nutSize=8,tolerance=0); + } } - - - - - - module Cyclone_Y_backFrame() { screwSize = Y_backFrame_footScrewSize; @@ -265,7 +263,7 @@ module Cyclone_Y_backFrame() { rod_nut_len = 0.8*axes_Ythreaded_rodD; bearing_width = bearingWidth(Y_threaded_rodBearingModel); bearing_diam = bearingOuterDiameter(Y_threaded_rodBearingModel); - bearingDepth = 3; + bearingDepth = Y_threaded_rodBearingDepth; partThickness = 5+screwSize*2; dimX = bearing_diam+partThickness; @@ -273,10 +271,10 @@ module Cyclone_Y_backFrame() { dimZ = 0; footSeparation = screwSize*2; - foot_additional_separation = 5; - footThickness = 10; + foot_additional_separation = Y_foot_additional_separation; + footThickness = Y_frame_footThickness; - endstopHolderRotation = 5; + endstopHolderRotation = Y_endstopHolderRotation; translate([0,-2*rod_nut_len,0]) { translate([0,bearingDepth-bearing_width,0]) { @@ -313,15 +311,15 @@ module Cyclone_Y_backFrame() { translate([-footSeparation-dimX/2,0,0]) rotate([0,90,0]) rotate([0,0,90]) - hole_for_screw(size=screwSize,length=footThickness+base_thickness,nutDepth=0,nutAddedLen=0,captiveLen=0, rot=90, invert=true); + hole_for_screw(size=screwSize,length=footThickness+base_thickness,nutDepth=0,nutAddedLen=0,captiveLen=0,tolerance=screwHoleTolerance, rot=90, invert=true); translate([footSeparation+dimX/2,0,0]) rotate([0,90,0]) rotate([0,0,90]) - hole_for_screw(size=screwSize,length=footThickness+base_thickness,nutDepth=0,nutAddedLen=0,captiveLen=0, rot=90, invert=true); + hole_for_screw(size=screwSize,length=footThickness+base_thickness,nutDepth=0,nutAddedLen=0,captiveLen=0,tolerance=screwHoleTolerance, rot=90, invert=true); translate([0,dimY/2+footSeparation+foot_additional_separation,0]) rotate([0,90,0]) rotate([0,0,90]) - hole_for_screw(size=screwSize,length=footThickness+base_thickness,nutDepth=0,nutAddedLen=0,captiveLen=0, rot=90, invert=true); + hole_for_screw(size=screwSize,length=footThickness+base_thickness,nutDepth=0,nutAddedLen=0,captiveLen=0,tolerance=screwHoleTolerance, rot=90, invert=true); } } @@ -330,15 +328,15 @@ module Cyclone_Y_backFrame() { translate([-footSeparation-dimX/2,0,0]) rotate([0,90,0]) rotate([0,0,90]) - screw_and_nut(size=screwSize,length=footThickness+base_thickness,nutDepth=0,nutAddedLen=0,captiveLen=0, rot=90, invert=true, autoNutOffset=true, echoPart=true); + screw_and_nut(size=screwSize,length=footThickness+base_thickness,nutDepth=0,nutAddedLen=0,captiveLen=0,tolerance=screwHoleTolerance, rot=90, invert=true, autoNutOffset=true, echoPart=true); translate([footSeparation+dimX/2,0,0]) rotate([0,90,0]) rotate([0,0,90]) - screw_and_nut(size=screwSize,length=footThickness+base_thickness,nutDepth=0,nutAddedLen=0,captiveLen=0, rot=90, invert=true, autoNutOffset=true, echoPart=true); + screw_and_nut(size=screwSize,length=footThickness+base_thickness,nutDepth=0,nutAddedLen=0,captiveLen=0,tolerance=screwHoleTolerance, rot=90, invert=true, autoNutOffset=true, echoPart=true); translate([0,dimY/2+footSeparation+foot_additional_separation,0]) rotate([0,90,0]) rotate([0,0,90]) - screw_and_nut(size=screwSize,length=footThickness+base_thickness,nutDepth=0,nutAddedLen=0,captiveLen=0, rot=90, invert=true, autoNutOffset=true, echoPart=true); + screw_and_nut(size=screwSize,length=footThickness+base_thickness,nutDepth=0,nutAddedLen=0,captiveLen=0,tolerance=screwHoleTolerance, rot=90, invert=true, autoNutOffset=true, echoPart=true); } } rotate([90,0,0]) @@ -352,19 +350,6 @@ module Cyclone_Y_backFrame() { nut(size=axes_Ythreaded_rodD, echoPart=true); } - - - - - - - - - - - - - module Cyclone_logo(sizemm = 30, thickness = 10, mirrorLogo = false) { dxf_logo_size = 50; // Real size of the logo in the DXF file scale_factor = sizemm/dxf_logo_size; @@ -392,7 +377,7 @@ module Cyclone_Y_rightSmoothRodIdler(mirrorLogo = false) { footSeparation = footScrewSize*2; - footThickness = 10; + footThickness = Y_frame_footThickness; color(color_stillPart) difference() { union() { @@ -415,51 +400,51 @@ module Cyclone_Y_rightSmoothRodIdler(mirrorLogo = false) { translate([2.5+holderOuterRadius,dimY/2,holderOuterRadius]) rotate([0,90,0]) rotate([0,0,90]) - hole_for_screw(size=rodScrewSize,length=screwLength+10,nutDepth=10,nutAddedLen=0,captiveLen=10, rot=90); + hole_for_screw(size=rodScrewSize,length=screwLength+10,nutDepth=10,nutAddedLen=0,captiveLen=10,tolerance=screwHoleTolerance, rot=90); translate([dimX/2,dimY/2,0]) cube([dimX+1,dimY+1,slotHeight],center=true); - translate([(dimX-holderOuterRadius)/2,-0.1,-(dimZ+axes_Ysmooth_rodD/2)/2]) - scale([1,-1,1]) - rotate([90,0,0]) - Cyclone_logo(sizemm = min(dimX+holderOuterRadius-5,dimZ-axes_Ysmooth_rodD/2-5), thickness = logoDepth, mirrorLogo = mirrorLogo); + if(Logo){ + translate([(dimX-holderOuterRadius)/2,-0.1,-(dimZ+axes_Ysmooth_rodD/2)/2]) + scale([1,-1,1]) + rotate([90,0,0]) + Cyclone_logo(sizemm = min(dimX+holderOuterRadius-5,dimZ-axes_Ysmooth_rodD/2-5), thickness = logoDepth, mirrorLogo = mirrorLogo); + } translate([0,dimY/2,-axes_Yreference_height+footThickness]) { translate([-holderOuterRadius-footSeparation,0,0]) rotate([0,90,0]) rotate([0,0,90]) - hole_for_screw(size=footScrewSize,length=footThickness+base_thickness,nutDepth=0,nutAddedLen=0,captiveLen=0, rot=90, invert=true); + hole_for_screw(size=footScrewSize,length=footThickness+base_thickness,nutDepth=0,nutAddedLen=0,captiveLen=0,tolerance=screwHoleTolerance, rot=90, invert=true); translate([holderOuterRadius*2+footSeparation,0,0]) rotate([0,90,0]) rotate([0,0,90]) - hole_for_screw(size=footScrewSize,length=footThickness+base_thickness,nutDepth=0,nutAddedLen=0,captiveLen=0, rot=90, invert=true); + hole_for_screw(size=footScrewSize,length=footThickness+base_thickness,nutDepth=0,nutAddedLen=0,captiveLen=0,tolerance=screwHoleTolerance, rot=90, invert=true); translate([holderOuterRadius/2,dimY/2+footSeparation,0]) rotate([0,90,0]) rotate([0,0,90]) - hole_for_screw(size=footScrewSize,length=footThickness+base_thickness,nutDepth=0,nutAddedLen=0,captiveLen=0, rot=90, invert=true); + hole_for_screw(size=footScrewSize,length=footThickness+base_thickness,nutDepth=0,nutAddedLen=0,captiveLen=0,tolerance=screwHoleTolerance, rot=90, invert=true); } } // Draw nuts and bolts translate([2.5+holderOuterRadius,dimY/2,holderOuterRadius]) rotate([0,90,0]) rotate([0,0,90]) - screw_and_nut(size=rodScrewSize,length=screwLength+10,nutDepth=10,nutAddedLen=0,captiveLen=0, rot=90, echoPart=true); + screw_and_nut(size=rodScrewSize,length=screwLength+10,nutDepth=10,nutAddedLen=0,captiveLen=0,tolerance=screwHoleTolerance, rot=90, echoPart=true); translate([0,dimY/2,-axes_Yreference_height+footThickness]) { translate([-holderOuterRadius-footSeparation,0,0]) rotate([0,90,0]) rotate([0,0,90]) - screw_and_nut(size=footScrewSize,length=footThickness+base_thickness,nutDepth=0,nutAddedLen=0,captiveLen=0, autoNutOffset=true, rot=90, invert=true, echoPart=true); + screw_and_nut(size=footScrewSize,length=footThickness+base_thickness,nutDepth=0,nutAddedLen=0,captiveLen=0,tolerance=screwHoleTolerance, autoNutOffset=true, rot=90, invert=true, echoPart=true); translate([holderOuterRadius*2+footSeparation,0,0]) rotate([0,90,0]) rotate([0,0,90]) - screw_and_nut(size=footScrewSize,length=footThickness+base_thickness,nutDepth=0,nutAddedLen=0,captiveLen=0, autoNutOffset=true, rot=90, invert=true, echoPart=true); + screw_and_nut(size=footScrewSize,length=footThickness+base_thickness,nutDepth=0,nutAddedLen=0,captiveLen=0,tolerance=screwHoleTolerance, autoNutOffset=true, rot=90, invert=true, echoPart=true); translate([holderOuterRadius/2,dimY/2+footSeparation,0]) rotate([0,90,0]) rotate([0,0,90]) - screw_and_nut(size=footScrewSize,length=footThickness+base_thickness,nutDepth=0,nutAddedLen=0,captiveLen=0, autoNutOffset=true, rot=90, invert=true, echoPart=true); + screw_and_nut(size=footScrewSize,length=footThickness+base_thickness,nutDepth=0,nutAddedLen=0,captiveLen=0,tolerance=screwHoleTolerance, autoNutOffset=true, rot=90, invert=true, echoPart=true); } } - module Cyclone_Y_leftSmoothRodIdler() { scale([-1,1,1]) Cyclone_Y_rightSmoothRodIdler(mirrorLogo = true); } - diff --git a/Hardware/CYCLONE_2/Source_files/Cycl_Z_carriage.scad b/Hardware/CYCLONE_2/Source_files/Cycl_Z_carriage.scad index 9954b74..007045c 100644 --- a/Hardware/CYCLONE_2/Source_files/Cycl_Z_carriage.scad +++ b/Hardware/CYCLONE_2/Source_files/Cycl_Z_carriage.scad @@ -20,17 +20,16 @@ use use Z_motorModel = Nema17; -motor_width = lookup(NemaSideSize, Z_motorModel); //43; - -motor_screw_head_diameter = 8; +motor_width = lookup(NemaSideSize, Z_motorModel); +motor_screw_head_diameter = METRIC_BOLT_CAP_DIAMETERS[3]+1+screwHoleTolerance;; Z_bearing_width = bearingWidth(Z_threaded_rodBearingModel); axis_distance = 21; -wall_thickness = 9; +wall_thickness = Z_carriage_wall_thickness; wall_height = motor_width; -wall_width = 54; +wall_width = Z_carriage_wall_width; axes_ZgearRatio = Z_motorGearRatio/Z_rodGearRatio; // Number of tooth (motor/rod) @@ -74,7 +73,7 @@ module Cyclone_Z_carriage(z_thread_rod_length=120, with_extra_parts=false, explo translate([0,-4,-0.01]) cube([90,4,length+2]); translate ([spindiam/2+15,15,length/2]) rotate([90,0,0]) cylinder(r=2,h=30); translate ([spindiam/2+15,-10.5,length/2]) rotate([90,0,0]) cylinder(r=3.5,h=4,$fn=6); - translate ([spindiam/2+15,10.5,length/2]) rotate([0,0,0]) screw_and_nut(size=spindle_holder_screwSize,length=25,nutDepth=4,nutAddedLen=0,captiveLen=0, autoNutOffset=true, echoPart=true); + translate ([spindiam/2+15,10.5,length/2]) rotate([0,0,0]) screw_and_nut(size=spindle_holder_screwSize,length=25,nutDepth=4,nutAddedLen=0,captiveLen=0,tolerance=screwHoleTolerance, autoNutOffset=true, echoPart=true); } } else @@ -84,7 +83,7 @@ module Cyclone_Z_carriage(z_thread_rod_length=120, with_extra_parts=false, explo translate([0,0,-0.01]) cube([90,4,length+2]); translate ([spindiam/2+15,20,length/2]) rotate([90,0,0]) cylinder(r=2,h=30); translate ([spindiam/2+15,15,length/2]) rotate([90,0,0]) cylinder(r=3.5,h=4,$fn=6); - translate ([spindiam/2+15,17,length/2]) rotate([0,0,0]) screw_and_nut(size=spindle_holder_screwSize,length=25,nutDepth=4,nutAddedLen=0,captiveLen=0, invert=true, autoNutOffset=true, echoPart=true); + translate ([spindiam/2+15,17,length/2]) rotate([0,0,0]) screw_and_nut(size=spindle_holder_screwSize,length=25,nutDepth=4,nutAddedLen=0,captiveLen=0,tolerance=screwHoleTolerance, invert=true, autoNutOffset=true, echoPart=true); } } } @@ -112,7 +111,6 @@ module Cyclone_Z_carriage(z_thread_rod_length=120, with_extra_parts=false, explo } } - module motor_stand_holes_Z() { partThickness = wall_thickness; // Position relative to motor shaft @@ -132,16 +130,13 @@ module Cyclone_Z_carriage(z_thread_rod_length=120, with_extra_parts=false, explo } } - module linearBearingHolderZ(h=10) { linearBearingDiameter = linearBearing_D(Z_linearBearingModel); translate([0,0,1.5]) cylinder(r=linearBearingDiameter/2+Z_linearBearingHole_tolerance,h=h); cylinder(r=linearBearingDiameter/2.5,h=10*h,center=true); } - module Z_solid_body(top_part=true) { - color(color_stillPart) union() { hull() { if(top_part) @@ -158,8 +153,7 @@ module Cyclone_Z_carriage(z_thread_rod_length=120, with_extra_parts=false, explo else cylinder(r=spindle_motor_diam/2+spindle_holder_thickness,h=wall_thickness); } - - + // For the linear bearing holders hull() { translate([wall_height/2-Z_smooth_rods_sep/2,Z_threaded_pos,0]) @@ -185,20 +179,19 @@ module Cyclone_Z_carriage(z_thread_rod_length=120, with_extra_parts=false, explo } else translate([wall_height/2,wall_width-4,0]) - translate([0,38,0]) { - - rotate([0,0,180]) { - translate([spindle_motor_diam/2,-7-0.5,0]) cube([22,20,wall_thickness]); - color([0.2,0.2,0.5]) - scale([1,1,textHscale]) - writecylinder(bottomText,[0,0,wall_thickness/(2*textHscale)+1],spindle_motor_diam/2+spindle_holder_thickness,0,font="orbitron.dxf",space=1.1,h=wall_thickness-2,t=textThickness,center=true,ccw=true); - } + translate([0,38,0]) { + + rotate([0,0,180]) { + translate([spindle_motor_diam/2,-7-0.5,0]) cube([22,20,wall_thickness]); + color([0.2,0.2,0.5]) + scale([1,1,textHscale]) + writecylinder(bottomText,[0,0,wall_thickness/(2*textHscale)+1],spindle_motor_diam/2+spindle_holder_thickness,0,font="orbitron.dxf",space=1.1,h=wall_thickness-2,t=textThickness,center=true,ccw=true); } + } } } module Z_carriage(showSpindle=false,top_part=true, with_extra_parts=false, exploded=false) { - difference() { rotate([0,0,-90]) translate([-wall_height/2,-Z_threaded_pos,0]) { difference () { @@ -225,11 +218,15 @@ module Cyclone_Z_carriage(z_thread_rod_length=120, with_extra_parts=false, explo } // Carriages - rotate([0,0,-90]) - Z_carriage(showSpindle=true,top_part=false,with_extra_parts=with_extra_parts, exploded=exploded); - translate([0,0,spindle_holder_distance+1.5]) rotate([180,0,-90]) - Z_carriage(showSpindle=false,top_part=true,with_extra_parts=with_extra_parts, exploded=exploded); - + if(Render_Z_carriageBottom) { + rotate([0,0,-90]) + Z_carriage(showSpindle=true,top_part=false,with_extra_parts=with_extra_parts, exploded=exploded); + } + if(Render_Z_carriageTop) { + translate([0,0,spindle_holder_distance+1.5]) rotate([180,0,-90]) + Z_carriage(showSpindle=false,top_part=true,with_extra_parts=with_extra_parts, exploded=exploded); + } + // Bearings translate([-axes_Zsmooth_separation/2,0,1.5]) linearBearing_single(model="LM8UU", echoPart=true); diff --git a/Hardware/CYCLONE_2/Source_files/Cyclone.scad b/Hardware/CYCLONE_2/Source_files/Cyclone.scad index e2f0f26..c12eba5 100644 --- a/Hardware/CYCLONE_2/Source_files/Cyclone.scad +++ b/Hardware/CYCLONE_2/Source_files/Cyclone.scad @@ -105,6 +105,7 @@ render_2D_or_3D() { // Draw left Y smooth rod rotate([0,0,180]) standard_rod(diam=axes_Ysmooth_rodD, length=axes_Ysmooth_rodLen, threaded=false, echoPart=true); + if(Render_X_leftFrame) Cyclone_X_leftFrame(); // TRANSLATE REFERENCE POSITION to the RIGHT frame, Y smooth rod end @@ -114,7 +115,8 @@ render_2D_or_3D() { // Draw right Y smooth rod rotate([0,0,180]) standard_rod(diam=axes_Ysmooth_rodD, length=axes_Ysmooth_rodLen, threaded=false, echoPart=true); - Cyclone_X_rightFrame(); + if(Render_X_rightFrame) + Cyclone_X_rightFrame(); } @@ -136,7 +138,8 @@ render_2D_or_3D() { translate([axes_Xcarriage_pos,0,0]) { if(draw_references) %frame(); - Cyclone_X_carriage(); + if(Render_X_carriage) + Cyclone_X_carriage(); // TRANSLATE REFERENCE POSITION to the Z axis origin (right smooth rod) translate([-axes_Zsmooth_separation/2,axes_Zreference_posY,axes_Zreference_height]) { @@ -155,7 +158,8 @@ render_2D_or_3D() { translate([axes_Zsmooth_separation/2,0,axes_Zcarriage_pos]) { if(draw_references) %frame(); - Cyclone_Z_carriage(); + if(Render_Z_carriage) + Cyclone_Z_carriage(); } } } @@ -164,22 +168,25 @@ render_2D_or_3D() { } - - translate([axes_Xsmooth_rodLen/2,0,0]) - control_board(plasticColor=color_stillPart); + if(Render_control_board) { + translate([axes_Xsmooth_rodLen/2,0,0]) + control_board(plasticColor=color_stillPart); + } // TRANSLATE REFERENCE POSITION to the FRONT LEFT Y rod idler, Y smooth rod end translate([-axes_Ysmooth_separation/2,-axes_Ysmooth_rodLen/2,axes_Yreference_height]) { if(draw_references) %frame(); - Cyclone_Y_leftSmoothRodIdler(); + if(Render_Y_leftSmoothRodIdler) + Cyclone_Y_leftSmoothRodIdler(); } // TRANSLATE REFERENCE POSITION to the FRONT RIGHT Y rod idler, Y smooth rod end translate([axes_Ysmooth_separation/2,-axes_Ysmooth_rodLen/2,axes_Yreference_height]) { if(draw_references) %frame(); - Cyclone_Y_rightSmoothRodIdler(); + if(Render_Y_rightSmoothRodIdler) + Cyclone_Y_rightSmoothRodIdler(); } @@ -190,14 +197,16 @@ render_2D_or_3D() { // Draw Y threaded rod standard_rod(diam=axes_Ythreaded_rodD, length=axes_Ythreaded_rodLen, threaded=true, echoPart=true); - Cyclone_Y_frontFrame(); + if(Render_Y_frontFrame) + Cyclone_Y_frontFrame(); // TRANSLATE REFERENCE POSITION to the BACK Y frame, Y threaded rod end translate([0,axes_Ythreaded_rodLen,0]) { if(draw_references) %frame(); - Cyclone_Y_backFrame(); + if(Render_Y_backFrame) + Cyclone_Y_backFrame(); } } @@ -208,8 +217,6 @@ render_2D_or_3D() { if(render_DXF_workbed) !Cyclone_Y_carriage(); // Render carriage exclusively - else Cyclone_Y_carriage(); + else if(Render_Y_carriage) Cyclone_Y_carriage(); } } - - diff --git a/Hardware/CYCLONE_2/Source_files/configs/Default_config.h b/Hardware/CYCLONE_2/Source_files/configs/Default_config.h index 83d04d3..c4d940e 100644 --- a/Hardware/CYCLONE_2/Source_files/configs/Default_config.h +++ b/Hardware/CYCLONE_2/Source_files/configs/Default_config.h @@ -49,13 +49,27 @@ PCB_holder_edge_length = 3; // --- Z carriage --- - X_backlash_armThickness = 30; + Z_carriage_wall_thickness = 9; + Z_carriage_wall_width = 54; // --- X frames --- X_frames_additional_thickness = 5; - footThickness = 10; - corner_radius = 10; - frameFrontalThickness = 15; + X_frame_footThickness = 10; + X_frame_corner_radius = 10; + X_frame_FrontalThickness = 15; + X_backlash_armThickness = 30; + X_motorWallSeparation = 5; + X_motorRotatedOffset = 5; + X_gearWallSeparation = 5; + + // --- Y frames --- + Y_frame_footThickness = 10; + Y_motorWallSeparation = 5; + Y_motorRotatedOffset = 5; + Y_gearWallSeparation = 5; + Y_foot_additional_separation = 5; + Y_endstopHolderRotation = 5; + Logo = true; // Add logo to the Y Smooth Rod Idlers // --- Axes sizes --- // *_rodLen = length @@ -87,6 +101,7 @@ Z_linearBearingModel = "LM8UU"; Z_threaded_rodBearingModel = 608; Y_threaded_rodBearingModel = 608; + Y_threaded_rodBearingDepth = 3; // --- Steppers --- //Y_motorModel = Nema17; @@ -140,9 +155,9 @@ gearCover_wallThickness = 0.4*4; gearCover_screwHeadSpaceHeight = 4; gearCover_screwHeadSpaceDiam = 6; - coverHeight = 16; - coverExtraHeight = 5; - coverExtraRadius = -7; + gearCoverHeight = 16; + gearCoverExtraHeight = 5; + gearCoverExtraRadius = -7; gearCover_truncationAngle = 10; // --- Spindle Motor --- @@ -166,6 +181,9 @@ axes_Xsmooth_separation_tolerance = 0.5; X_threaded_rod_Tolerance = 0.5; Z_linearBearingHole_tolerance = 0.5; + LinearBearingPressureFitTolerance = 0.4; + screwHoleTolerance = 0.4; + // --- Render options --- @@ -190,10 +208,30 @@ axes_Ycarriage_pos = axes_Ysmooth_rodLen/2+sin($t*360)*axes_Ysmooth_rodLen/4.1; axes_Zcarriage_pos = axes_Zsmooth_rodLen/2+sin($t*360)*axes_Zsmooth_rodLen/8; - - - - + // --- Parts --- + Render_X_leftFrame = true; + Render_X_rightFrame = true; + Render_X_carriage = true; + Render_Z_carriage = true; + Render_Z_carriageTop = true; + Render_Z_carriageBottom = true; + Render_Y_leftSmoothRodIdler = true; + Render_Y_rightSmoothRodIdler = true; + Render_Y_frontFrame = true; + Render_Y_backFrame = true; + Render_Y_carriage = true; + Render_control_board = true; + Render_Y_gearCover = true; + Render_Y_motorGear = true; + Render_Y_rodGear = true; + Render_X_gearCover = true; + Render_X_motorGear = true; + Render_X_rodGear = true; + Render_PCBholderTop = true; + Render_PCBholderBottom = true; + Render_YsubPart_linearBearingHolders = true; + Render_YsubPart_nutHolder = true; + //Render_rodHolder = true; \ No newline at end of file diff --git a/Hardware/CYCLONE_2/Source_files/libs/standard_parts.scad b/Hardware/CYCLONE_2/Source_files/libs/standard_parts.scad index c50e4bb..c0cd86b 100644 --- a/Hardware/CYCLONE_2/Source_files/libs/standard_parts.scad +++ b/Hardware/CYCLONE_2/Source_files/libs/standard_parts.scad @@ -134,7 +134,6 @@ module hole_for_nut(size=3,nutAddedLen=0,captiveLen=0,rot=0,tolerance=0.35) { } } - module screw_single(size=3,length=10,tolerance=0, renderPart=false, echoPart=false) { height = METRIC_NUT_THICKNESS[size]+tolerance; color(BlackPaint) @@ -225,7 +224,6 @@ module cyclone_rod_gear(Gear_N_Teeth = 21, gearHeight=10, nutSize = 8, saveMater rod_diam = COURSE_METRIC_BOLT_MAJOR_THREAD_DIAMETERS[nutSize]+tolerance; nut_separation = METRIC_NUT_THICKNESS[nutSize]/2+tolerance; nut_radius = METRIC_NUT_AC_WIDTHS[nutSize]/2+tolerance; -// TODO add support for gearHeight in the gears.scad // Rod Gear difference() { union() {