separate dimensions from form
authordaniel watson <ozzloy@gmail.com>
Mon, 1 Dec 2014 06:57:27 +0000 (22:57 -0800)
committerdaniel watson <ozzloy@gmail.com>
Mon, 1 Dec 2014 06:57:27 +0000 (22:57 -0800)
3d-printables/Makefile
3d-printables/caster-standoff-dimensions.scad [new file with mode: 0644]
3d-printables/caster-standoff.scad
3d-printables/motor-mount-dimensions.scad [new file with mode: 0644]
3d-printables/motor-mount.scad
3d-printables/sonar-table-top-holder-dimensions.scad [new file with mode: 0644]
3d-printables/sonar-table-top-holder.scad
3d-printables/wheel-dimensions.scad [new file with mode: 0644]
3d-printables/wheel.scad
3d-printables/wire-jig-dimensions.scad [new file with mode: 0644]
3d-printables/wire-jig.scad

index b44013e91b98e2aa0696212807b0d2a91f771eb2..81a5ee922bdd1872e715e3763a96f8b0c9c17750 100644 (file)
@@ -1,4 +1,4 @@
-%.stl: %.scad
+%.stl: %.scad %-dimensions.scad
        openscad $< -o $@
 
 %.gcode: %.stl
diff --git a/3d-printables/caster-standoff-dimensions.scad b/3d-printables/caster-standoff-dimensions.scad
new file mode 100644 (file)
index 0000000..9d6e9e6
--- /dev/null
@@ -0,0 +1,27 @@
+/* measured with calipers */
+ball_diameter = 11 + 0.75; // extra bit added for printing imprecision
+ball_radius = ball_diameter / 2;
+
+standoff_height = 60; // kyle eyeballed
+
+gap = 3;
+wall_thickness = 1;
+holder_floor = 3;
+holder_arms_length = 20;
+holder_height =
+  holder_floor + holder_arms_length + (11 / 16) * ball_diameter;
+
+holder_radius = ball_radius + wall_thickness;
+holder_diameter = holder_radius * 2;
+
+standoff_radius = holder_radius; // 0.580 / 2 inches from spec sheet
+standoff_lower_portion_height = standoff_height - holder_height;
+
+// eyeballed caster flange height, (0.580/5) inches, times 2 to be stronger
+caster_flange_height = 5;
+caster_flange_width = 20.32;  // 0.800 inches
+
+deck_pitch = 25.4; // measured center to center on grid on pegboard
+deck_flange_height = 2.9464;
+deck_flange_screw_radius = 3.556 / 2;  // For #6 machine screws
+deck_flange_radius = (deck_pitch) / 2 + deck_flange_screw_radius + 3;
index 5bbab48907807fa329855b90edf1f9436b15d568..328bc8b7f47987ce09043a2590fa1218fb377adf 100644 (file)
@@ -4,41 +4,12 @@
 // https://gitorious.org/ozzloy/challenge-bot
 // https://github.com/waynegramlich/challenge-bot
 
+include <caster-standoff-dimensions.scad>
 use <oshw.scad>
 
 // use 10 ish for development, 60 or so for printing
 $fn = 60;
 
-/* measured with calipers */
-ball_diameter = 11 + 0.75; // extra bit added for printing imprecision
-ball_radius = ball_diameter / 2;
-
-standoff_height = 60; // kyle eyeballed
-
-gap = 3;
-wall_thickness = 1;
-holder_floor = 3;
-holder_arms_length = 20;
-holder_height =
-  holder_floor + holder_arms_length + (11 / 16) * ball_diameter;
-
-holder_radius = ball_radius + wall_thickness;
-holder_diameter = holder_radius * 2;
-
-standoff_radius = holder_radius; // 0.580 / 2 inches from spec sheet
-standoff_lower_portion_height = standoff_height - holder_height;
-
-// eyeballed caster flange height, (0.580/5) inches, times 2 to be stronger
-caster_flange_height = 5;
-caster_flange_width = 20.32;  // 0.800 inches
-caster_flange_screw_radius = 2.286 / 2;  // 0.090 inches
-caster_flange_screw_length = 8; // eyeballed
-
-deck_pitch = 25.4; // measured center to center on grid on pegboard
-deck_flange_height = 2.9464;
-deck_flange_screw_radius = 3.556 / 2;  // For #6 machine screws
-deck_flange_radius = (deck_pitch) / 2 + deck_flange_screw_radius + 3;
-
 module deck_flange(){
   deck_pitch_diagonal = sqrt(2 * pow(deck_pitch, 2));
   difference(){
diff --git a/3d-printables/motor-mount-dimensions.scad b/3d-printables/motor-mount-dimensions.scad
new file mode 100644 (file)
index 0000000..8cb78f5
--- /dev/null
@@ -0,0 +1,14 @@
+// from schematic http://goo.gl/96RKol
+collar_radius = 9.2 / 2 + 0.25;
+nubbin_radius = 4.48 / 2;
+screw_radius = 2.9 / 2 + 0.35; // a little bigger so screws fit through
+
+motor_height = 22.23;
+
+// http://freespace.virgin.net/matt.waite/resource/handy/screwsize.htm
+_6_radius = 3.5 / 2 + 0.25;
+
+// measurements we made up:
+mount_total_x = 38;
+mount_total_y = mount_total_x;
+mount_total_z = 3.175; // 3/16 in mm
index 3e96b6999df54403963651752d87e75f9e4ed73e..b15e5a7b7f9483a187f1cf65672b0936c68c68b6 100644 (file)
@@ -6,20 +6,7 @@
 
 $fn = 60;
 
-// from schematic http://goo.gl/96RKol
-collar_radius = 9.2 / 2 + 0.25;
-nubbin_radius = 4.48 / 2;
-screw_radius = 2.9 / 2 + 0.35; // a little bigger so screws fit through
-
-motor_height = 22.23;
-
-// http://freespace.virgin.net/matt.waite/resource/handy/screwsize.htm
-_6_radius = 3.5 / 2 + 0.25;
-
-// measurements we made up:
-mount_total_x = 38;
-mount_total_y = mount_total_x;
-mount_total_z = 3.175; // 3/16 in mm
+include <motor-mount-dimensions.scad>
 
 module motor_holes(){
   collar_x_offset = 10.8;
diff --git a/3d-printables/sonar-table-top-holder-dimensions.scad b/3d-printables/sonar-table-top-holder-dimensions.scad
new file mode 100644 (file)
index 0000000..171721e
--- /dev/null
@@ -0,0 +1,24 @@
+// 3/16 inch in mm deck_depth = 4.7625;
+// 1/4 inch in mm = 6.35
+// subtract a little to be a squeeze fit
+deck_depth = 4.7625 - 0.4;
+// sonar sensor measurements taken with calipers:
+//  10.82 in between, 42.33 outside, 15.82 diameter
+// measured diameter of 15.82 with calipers,
+//  but when printed ends up being too small, so add some
+sonar_diameter = 15.82 + 0.4;
+sonar_radius = sonar_diameter / 2;
+sonar_height = 13.8;
+between_sonar_centers = sonar_diameter + 10.82;
+// the sonar cylinders are placed on the pcb at slightly different positions
+//  from one sensor to the next, so this allows for that variance.
+between_sonar_centers_variance = 2;
+// keep at least this much plastic surrounding the sonar cylinder on all sides
+buffer = 3;
+sonar_holder_length = buffer + between_sonar_centers + sonar_diameter + buffer;
+sonar_holder_width = buffer + sonar_diameter + buffer;
+// sonar_holder_depth is deck_depth minus a little bit to make arm fit
+//  into deck holder
+sonar_holder_depth = deck_depth - 0.7875;
+
+deck_holder_length = sonar_holder_depth * 2 + deck_depth + 15;
index 8f0d1539d9a9aa6f39172a40759669127db5723f..23279e40736dbab68368ba2076d4f6a0c7e70093 100644 (file)
 
 $fn = 60;
 
+include <sonar-table-top-holder-dimensions.scad>
 use <oshw.scad>
 oshw_dy = 120.366;
 oshw_dx = 133.888;
 
-// 3/16 inch in mm deck_depth = 4.7625;
-// 1/4 inch in mm = 6.35
-// subtract a little to be a squeeze fit
-deck_depth = 4.7625 - 0.4;
-// sonar sensor measurements taken with calipers:
-//  10.82 in between, 42.33 outside, 15.82 diameter
-// measured diameter of 15.82 with calipers,
-//  but when printed ends up being too small, so add some
-sonar_diameter = 15.82 + 0.4;
-sonar_radius = sonar_diameter / 2;
-sonar_height = 13.8;
-between_sonar_centers = sonar_diameter + 10.82;
-// the sonar cylinders are placed on the pcb at slightly different positions
-//  from one sensor to the next, so this allows for that variance.
-between_sonar_centers_variance = 2;
-// keep at least this much plastic surrounding the sonar cylinder on all sides
-buffer = 3;
-sonar_holder_length = buffer + between_sonar_centers + sonar_diameter + buffer;
-sonar_holder_width = buffer + sonar_diameter + buffer;
-// sonar_holder_depth is deck_depth minus a little bit to make arm fit
-//  into deck holder
-sonar_holder_depth = deck_depth - 0.7875;
-
-deck_holder_length = sonar_holder_depth * 2 + deck_depth + 15;
+module sonar_holder_2d() {
+  difference() {
+    square([sonar_holder_length, sonar_holder_width]); } }
 
 module sonars(){
   translate([between_sonar_centers / 2, 0, 0]){
@@ -61,10 +41,12 @@ module sonar_holder(){
     cube([sonar_holder_length, sonar_holder_width, sonar_holder_depth]);
     translate([sonar_holder_length / 2, sonar_holder_width / 2, -0.05]){
       sonars();}
-    translate([sonar_holder_length - rounded_corner_radius,
-               sonar_holder_width - rounded_corner_radius,
+    translate([sonar_holder_length,
+               sonar_holder_width,
                0]){
-      corner_rounder(rounded_corner_radius, sonar_holder_depth);}}
+      corner_rounder(rounded_corner_radius,
+                     sonar_holder_depth,
+                     "bottom-right");}}
   translate([sonar_holder_length, 0, 0]){
     cube([elbow_length, deck_depth, sonar_holder_depth]);
     translate([elbow_length, 0, 0]){
@@ -109,16 +91,20 @@ module deck_holder(){
           linear_extrude(height = 0.5)
             oshw();}
 
-module corner_rounder_2d(radius){
+module corner_rounder_2d(radius, corner_name="top-left"){
+  rotate_for_corner = (corner_name == "top-left") ? 0 :
+    ((corner_name == "top-right") ? -90 :
+     ((corner_name == "bottom-left") ? 90 :
+      ((corner_name == "bottom-right") ? 180 :
+       1 / 0)));
+  rotate(rotate_for_corner){
     difference (){
-        square (radius);
-        circle (radius);}}
-
-module corner_rounder(radius, height){
-    linear_extrude(height = height){
-        corner_rounder_2d(radius);}}
+      square(radius);
+      translate([radius, radius]){
+        circle(radius);}}}}
 
-deck_holder();
+module corner_rounder(radius, height, corner_name="top-left"){
+  linear_extrude(height = height){
+    corner_rounder_2d(radius, corner_name);}}
 
-translate([0, sonar_holder_depth * 2 + deck_depth + 2, 0]){
-  sonar_holder();}
+sonar_holder();
diff --git a/3d-printables/wheel-dimensions.scad b/3d-printables/wheel-dimensions.scad
new file mode 100644 (file)
index 0000000..496a8ee
--- /dev/null
@@ -0,0 +1,12 @@
+qr_size = 45;
+qr_height = 2;
+
+wall_width = 3;
+
+wheel_width = 9;
+wheel_radius = sqrt(2 * pow(qr_size / 2, 2)) + wall_width / 2;
+
+motor_shaft_radius = 3.7;
+motor_shaft_flat_width = 4.8;
+
+tread_radius = 4 / 2;
index 1d1994e45b66b7a112d62e7324c46101c86d7026..a37008333ae1207805cfa88ead7d60b11277d41e 100644 (file)
 //  100 will make printing smooth
 $fn = 100;
 
+include <wheel-dimensions.scad>
 use <qr.scad>
 
-qr_size = 45;
-qr_height = 2;
+module mounting_screw_flat() {
+  circle(0.9); }
 
-wall_width = 3;
-
-wheel_width = 9;
-wheel_radius = sqrt(2 * pow(qr_size / 2, 2)) + wall_width / 2;
-
-motor_shaft_radius = 3.7;
-motor_shaft_flat_width = 4.8;
-
-tread_radius = 4 / 2;
-
-module mounting_screw_flat(){
-  circle(0.9);}
-
-module motor_shaft_flat(radius, flat_width){
-  intersection(){
+module motor_shaft_flat(radius, flat_width) {
+  intersection() {
     circle(radius);
-    square([flat_width, radius * 2], center = true);}}
+    square([flat_width, radius * 2], center = true); } }
 
 module motor_shaft(radius,
                    flat_width,
-                   shaft_length){
-  linear_extrude(height = shaft_length){
-    motor_shaft_flat(radius, flat_width);}}
+                   shaft_length) {
+  linear_extrude(height = shaft_length) {
+    motor_shaft_flat(radius, flat_width); } }
 
-module rim(radius, wall_width, wheel_width){
-  linear_extrude(height = wheel_width){
-    difference(){
+module rim(radius, wall_width, wheel_width) {
+  linear_extrude(height = wheel_width) {
+    difference() {
       circle(radius);
-      circle(radius - wall_width);}}}
+      circle(radius - wall_width); } } }
 
-module motor_shaft_holder_flat(radius, flat_width, wall_width){
-  difference(){
+module motor_shaft_holder_flat(radius, flat_width, wall_width) {
+  difference() {
     motor_shaft_flat(radius + wall_width,
                      flat_width + wall_width);
-    motor_shaft_flat(radius, flat_width);}}
+    motor_shaft_flat(radius, flat_width); } }
 
-module motor_shaft_holder(radius, flat_width, wall_width, height){
-  linear_extrude(height = height){
-    motor_shaft_holder_flat(radius, flat_width, wall_width);}}
+module motor_shaft_holder(radius, flat_width, wall_width, height) {
+  linear_extrude(height = height) {
+    motor_shaft_holder_flat(radius, flat_width, wall_width); } }
 
-module tread(wheel_radius, tread_radius){
-  rotate_extrude(convexity = 10){
-    translate([wheel_radius, 0]){
-      circle(tread_radius);}}}
+module tread(wheel_radius, tread_radius) {
+  rotate_extrude(convexity = 10) {
+    translate([wheel_radius, 0]) {
+      circle(tread_radius); } } }
 
 module wheel_black(radius,
                    width,
                    shaft_radius,
                    shaft_flat_width,
                    wall_width,
-                   tread_radius){
-  color("black"){
-    difference(){
+                   tread_radius) {
+  color("black") {
+    difference() {
       rim(radius, wall_width, width);
-      translate([0, 0, width / 2]){
-        tread(radius, tread_radius);}}
-    linear_extrude(height = qr_height){
-      difference(){
+      translate([0, 0, width / 2]) {
+        tread(radius, tread_radius); } }
+    linear_extrude(height = qr_height) {
+      difference() {
         qr_black_flat();
-        mounting_screw_flat();}}
-    translate([0, 0, qr_height]){
+        mounting_screw_flat(); } }
+    translate([0, 0, qr_height]) {
       motor_shaft_holder(shaft_radius,
                          shaft_flat_width,
                          wall_width,
-                         width - qr_height);}}}
+                         width - qr_height); } } }
 
-module wheel_white(){
-  color("white"){
-    linear_extrude(height = qr_height){
-      difference(){
+module wheel_white() {
+  color("white") {
+    linear_extrude(height = qr_height) {
+      difference() {
         qr_white_flat();
-        mounting_screw_flat();}}}}
+        mounting_screw_flat(); } } } }
 
 module wheel(radius,
              width,
              shaft_radius,
              shaft_flat_width,
              wall_width,
-             tread_radius){
+             tread_radius) {
   wheel_black(radius,
               width,
               shaft_radius,
               shaft_flat_width,
               wall_width,
               tread_radius);
-  wheel_white();}
+  wheel_white(); }
 
 module wheel_solid(radius,
                    width,
                    shaft_radius,
                    shaft_flat_width,
                    wall_width,
-                   tread_radius){
-  difference(){
+                   tread_radius) {
+  difference() {
     rim(radius, wall_width * 2, width);
-    translate([0, 0, width / 2]){
-      tread(radius, tread_radius);}}
-  linear_extrude(height = qr_height){
-    difference (){
+    translate([0, 0, width / 2]) {
+      tread(radius, tread_radius); } }
+  linear_extrude(height = qr_height) {
+    difference() {
       square(qr_size, center = true);
       mounting_screw_flat(); } }
-  translate([0, 0, qr_height]){
+  translate([0, 0, qr_height]) {
     motor_shaft_holder(shaft_radius,
                        shaft_flat_width,
                        wall_width,
-                       width - qr_height);}}
+                       width - qr_height); } }
 
 /*
 wheel(wheel_radius,
diff --git a/3d-printables/wire-jig-dimensions.scad b/3d-printables/wire-jig-dimensions.scad
new file mode 100644 (file)
index 0000000..69ea6f3
--- /dev/null
@@ -0,0 +1,15 @@
+wire_channel_width = 14;
+wire_channel_height = 14;
+
+wire_diameter_measured = 1.17;
+// some of this fudge is due to using a hexagon instead of a circle
+wire_diameter_fudge = 1.4;
+wire_diameter = wire_diameter_measured + wire_diameter_fudge;
+wire_radius = wire_diameter / 2;
+
+wire_lengths = [10, //strip wire this much
+                35, //short breadboard wire
+                63, //ground to ground
+                120, //arduino breadboard wire
+                180 //motor wire
+               ];
index dabde952366e44901e8218d84c4b82ee273131bf..3d1187ee8e6f61969247ad2f904e3a35ed5d4306 100644 (file)
@@ -4,29 +4,23 @@
 // https://gitorious.org/ozzloy/challenge-bot
 // https://github.com/waynegramlich/challenge-bot
 
-$fn = 20;
-
-wire_channel_width = 6;
-wire_channel_height = 6;
+include <wire-jig-dimensions.scad>
+use <nut.scad>
 
-wire_diameter_measured = 1.17;
-wire_diameter_fudge = 0.5;
-wire_diameter = wire_diameter_measured + wire_diameter_fudge;
-wire_radius = wire_diameter / 2;
-
-wire_lengths = [10, //strip wire this much
-                35, //short breadboard wire
-                63, //ground to ground
-                120, //arduino breadboard wire
-                180 //motor wire
-               ];
+$fn = 20;
 
 module wire_channel_groove_2d(width, height, wire_radius) {
   difference() {
     square([width, height]);
-    translate([width / 2, height]) {
-      circle(r = wire_radius); } } }
+    translate([width / 2, height / 2]) {
+      rotate(a = 90, v = [0, 0, 1]){
+        nut_2d(wire_diameter); } } } }
 
+/*
+wire_channel_groove_2d(wire_channel_width,
+                       wire_channel_height,
+                       wire_radius);
+                       */
 
 module wire_channel_groove(width, height, wire_radius, length){
   rotate(a = 90, v = [1, 0, 0]){
@@ -34,8 +28,8 @@ module wire_channel_groove(width, height, wire_radius, length){
       wire_channel_groove_2d(width, height, wire_radius); } } }
 
 for(ii = [0:len(wire_lengths) - 1]) {
-  translate([wire_channel_width * ii, 0, 0]) {
-    wire_channel_groove(wire_channel_width,
+  translate([ wire_channel_width * ii, 0, 0]) {
+    #wire_channel_groove(wire_channel_width,
                         wire_channel_height,
                         wire_radius,
                         wire_lengths[ii]); } }