diff --git a/implementation/SCARA/hardware/openSCAD/arm1.scad b/implementation/SCARA/hardware/openSCAD/arm.scad similarity index 100% rename from implementation/SCARA/hardware/openSCAD/arm1.scad rename to implementation/SCARA/hardware/openSCAD/arm.scad diff --git a/implementation/SCARA/hardware/openSCAD/carriage.json b/implementation/SCARA/hardware/openSCAD/carriage.json new file mode 100644 index 0000000..d864e83 --- /dev/null +++ b/implementation/SCARA/hardware/openSCAD/carriage.json @@ -0,0 +1,48 @@ +{ + "parameterSets": { + "design default values": { + "arm1": "70", + "arm2": "55", + "arm_thickness": "3", + "arm_width": "10", + "position": "[65, 105]", + "stepper_spaceing": "45" + }, + "corner1": { + "arm1": "70", + "arm2": "55", + "arm_thickness": "3", + "arm_width": "10", + "position": "[15, 35]", + "stepper_spaceing": "45" + }, + "corner2": { + "arm1": "70", + "arm2": "55", + "arm_thickness": "3", + "arm_width": "10", + "position": "[15, 85]", + "stepper_spaceing": "45" + }, + "corner3": { + "arm1": "70", + "arm2": "55", + "arm_thickness": "3", + "arm_width": "10", + "position": "[85, 85]", + "stepper_spaceing": "45" + }, + "corner4": { + "arm1": "70", + "arm2": "55", + "arm_thickness": "3", + "arm_width": "10", + "position": "[85, 35]", + "stepper_spaceing": "45" + } + }, + "parameterSets": "", + "parameterSets": "", + "parameterSets": "", + "fileFormatVersion": "1" +} diff --git a/implementation/SCARA/hardware/openSCAD/carriage.scad b/implementation/SCARA/hardware/openSCAD/carriage.scad new file mode 100644 index 0000000..a4a2a0b --- /dev/null +++ b/implementation/SCARA/hardware/openSCAD/carriage.scad @@ -0,0 +1,74 @@ +use +use +use +use +//module arm(holes, width, thinkness, bore){ + + +arm1 = 70; +arm2 = 55; +x = 55; //[15:85] +y = 70; //[35:85] +length = sqrt(pow(x,2) + pow(y,2)); +arm1_sq = pow(arm1,2); +arm2_sq = pow(arm2,2); +length_sq = pow(length,2); +b = acos((arm1_sq + length_sq - arm2_sq)/(2 * arm1 * length)); +c = acos((arm1_sq - length_sq + arm2_sq)/(2 * arm1 * arm2)); +angle1 = b + atan2(y,x) - 90; +angle2 = angle1 - 90 + c; +stepper_spaceing = 45; +stepper_offset = 55; +arm_thickness = 3; +arm_width = 10; +arm_offset = 15; + +%translate([stepper_offset,0,0]) { + // stepper on joint C + rotate([0,90,0]) stepper_103H5205(); + // stepper on joint A + translate([0,stepper_spaceing,0]) rotate([0,90,0]) stepper_103H5205(); + + translate([arm_offset,0,0]){ + + translate([0,stepper_spaceing,0]) rotate([angle1,0,0]) rotate([0,-90,0]) arm([0,-25],arm_width,arm_thickness,5); + //arm1 + rotate([angle1,0,0]) rotate([0,-90,0]) arm([0,-25,arm1],arm_width,arm_thickness,5); + + //arm2 + translate([3,0,0]) rotate([angle1,0,0]) translate([0,0,-25]) rotate([-angle1,0,0]) rotate([90,0,90]) arm([0,stepper_spaceing],arm_width,arm_thickness,5); + translate([-3,0,0]) rotate([angle1,0,0]) translate([0,0,-25]) rotate([-angle1,0,0]) rotate([90,0,90]) arm([0,stepper_spaceing],arm_width,arm_thickness,5); + + //arm3 + rotate([angle2,0,0]){ + translate([3,0,0]) rotate([90,0,-90]) arm([0,25],arm_width,arm_thickness,5); + translate([-3,0,0]) rotate([90,0,-90]) arm([0,25],arm_width,arm_thickness,5); + translate([0,-25,0]) rotate([angle1-angle2,0,0]) { + // arm4 + rotate([0,-90,0]) arm([0,arm1],arm_width,arm_thickness,5); + translate([0,0,arm1]) rotate([angle2-angle1,0,0]) { + translate([3,0,0]) rotate([90, 0, 90]) arm([25,0,arm2+25],arm_width,arm_thickness,5); + translate([-3,0,0]) rotate([90, 0, 90]) arm([25,0,arm2+25],arm_width,arm_thickness,5); + translate([-stepper_offset-arm_offset,arm2+25]) rotate([0,90,0]) marker(0); + } + } + } + } +} + +// electronics +translate([20,80,-10]) rotate([-0,-90,0]){ +color("olive") translate([-12,-2,5]) cube([40,61,1]); +stepper_controller(); +translate([0,25.4,0]) stepper_controller(); +} + +//carriage +translate([stepper_offset,0,0]) + rotate([0,90,0]) { + stepper_103H5205_mount(); + translate([0,stepper_spaceing,0]) stepper_103H5205_mount(); + } + + + diff --git a/implementation/SCARA/hardware/openSCAD/electronics.scad b/implementation/SCARA/hardware/openSCAD/electronics.scad new file mode 100644 index 0000000..1cab7fc --- /dev/null +++ b/implementation/SCARA/hardware/openSCAD/electronics.scad @@ -0,0 +1,24 @@ +module stepper_controller() { + //board + color("darkgreen") cube([15.24,20.32,1.5]); +translate([0,0,1.5]){ + pin_header(8); + translate([15.24-2.54,0,0]) pin_header(8); + } + +} + + +module pin_header(length) { +translate([1.27,1.27,0]) + for (i = [0:length-1]){ + translate([0,2.54*i,2.55]){ + color("goldenrod") cube([0.62,0.62,11.15],center=true); + translate([0,0,-1.225]) + color("#1a1a1a") hull() { + cube([2.55,1.8,2.5],center=true); + cube([1.8,2.55,2.5],center=true); + } + } + } +} diff --git a/implementation/SCARA/hardware/openSCAD/marker.scad b/implementation/SCARA/hardware/openSCAD/marker.scad new file mode 100644 index 0000000..abcfd42 --- /dev/null +++ b/implementation/SCARA/hardware/openSCAD/marker.scad @@ -0,0 +1,18 @@ +$fn = $preview? 32 : 72; +module marker(col) { + translate([0,0,7]) { + color(col) scale([4,4,14]) sphere(d=1); + color(col) cylinder(h=15, d1=7,d2=13); + translate([0,0,15]){ + color(col) cylinder(h=11, d=13); + translate([0,0,11]) { + cylinder(h=97, d=14.5); + translate([0,0,97]) { + color(col) cylinder(h=4, d=13); + } + } + } + } +} + +marker("red"); diff --git a/implementation/SCARA/hardware/openSCAD/stepper.scad b/implementation/SCARA/hardware/openSCAD/stepper.scad new file mode 100644 index 0000000..c45583d --- /dev/null +++ b/implementation/SCARA/hardware/openSCAD/stepper.scad @@ -0,0 +1,70 @@ +$fn = $preview? 32 : 72; + +module stepper_103H5205(){ + body_length = 33; + body_width = 42; + shaft_length = 24; + shaft_diameter = 5; + flange_thickness = 1.5; + flange_diameter = 22; + hole_seperation = 31; + hole_bore = 3; + hole_depth = 4; + corner_radius = 5; + connector_height = 7; + connector_width = 27; + connector_depth = 11; + connector_offset = 20; + + // body; + color("dimgray") + difference(){ + rotate([180,0,0]) + body(length=body_length, width=body_width, corner_radius = corner_radius); + // remove screws + rotate([180,0,0]) translate([0,0,-1]) four_cylinder(hole_seperation/2,hole_depth+1,hole_bore/2); + } + // flange + color("silver") translate([0,0,-1]) cylinder(h=flange_thickness+1,d=flange_diameter); + // shaft + color("lightcyan")cylinder(h=shaft_length,d=shaft_diameter); + color("snow")translate([body_width/2-1,-connector_width/2,-connector_offset-connector_depth]) cube([connector_height+1,connector_width,connector_depth]); +} + +module body(length, width, corner_radius){ + distance = (width/2-corner_radius); + hull(){ + four_cylinder(distance,length,corner_radius); + } +} + +module four_cylinder(distance,height,radius){ + for (i = [0:3]){ + rotate([0,0,90*i]) translate([distance,distance,0]) cylinder(h=height,r=radius); + } +} + +stepper_103H5205(); +translate([0,0,0.2]) stepper_103H5205_mount(); + +module stepper_103H5205_mount() { + body_width = 42; + flange_diameter = 22; + hole_seperation = 31; + hole_bore = 3; + hole_depth = 4; + corner_radius = 5; + bracket_thickness = 4; + + difference(){ + body(length=bracket_thickness, width=body_width, corner_radius = corner_radius); + translate([0,0,-0.5]) four_cylinder(hole_seperation/2,bracket_thickness+1,hole_bore/2); + translate([0,0,-0.5]) cylinder(h=bracket_thickness+1,d=flange_diameter+1); + } +} + + + + + +