-%.stl: %.scad
+%.stl: %.scad %-dimensions.scad
openscad $< -o $@
%.gcode: %.stl
--- /dev/null
+/* 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;
// 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(){
--- /dev/null
+// 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
$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;
--- /dev/null
+// 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;
$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]){
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]){
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();
--- /dev/null
+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;
// 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,
--- /dev/null
+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
+ ];
// 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]){
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]); } }