grab deck holder with sonar sensor arm really well
[challenge-bot] / 3d-printables / sonar-table-top-holder.scad
CommitLineData
dac38b58 1// challenge-bot
2// GNU AGPLv3 (or later at your option)
3// project available at these locations:
4// https://gitorious.org/ozzloy/challenge-bot
5// https://github.com/waynegramlich/challenge-bot
6
978bd219 7$fn = 60;
8
9// 3/16 inch in mm deck_depth = 4.7625;
be16f419 10// 1/4 inch in mm = 6.35
11// subtract a little to be a squeeze fit
8b340909 12deck_depth = 4.7625 - 0.4;
dac38b58 13sonar_plate_width = 20;
8ca271e9 14// sonar sensor measurements taken with calipers:
49bffb72 15// 10.82 in between, 42.33 outside, 15.82 diameter
8ca271e9 16// measured diameter of 15.82 with calipers,
17// but when printed ends up being too small
18sonar_sensor_radius = 15.82 / 2 + 0.3;
dac38b58 19sonar_sensor_height = 13.8;
4d9ff1c6 20between_sensor_centers = sonar_sensor_radius * 2 + 10.82;
21between_sensor_centers_variance = 2;
49bffb72 22sonar_plate_length = 3 + between_sensor_centers + sonar_sensor_radius + 3;
74f8c088 23sonar_holder_length = sonar_plate_length + 10;
24sonar_holder_width = sonar_plate_width + 3;
49bffb72 25sonar_holder_depth = 4;
8ca271e9 26
49bffb72 27deck_holder_length = 30;
74f8c088 28
29module sensors(){
30 translate([between_sensor_centers / 2, 0, 0]){
31 cylinder(r = sonar_sensor_radius, h = sonar_sensor_height);}
4d9ff1c6 32 translate([between_sensor_centers / 2 - between_sensor_centers_variance,
33 0,
34 0]){
35 cylinder(r = sonar_sensor_radius, h = sonar_sensor_height);
36 translate([0, -sonar_sensor_radius, 0]){
37 cube([between_sensor_centers_variance,
38 sonar_sensor_radius * 2,
39 sonar_sensor_height]);}}
74f8c088 40 translate([-between_sensor_centers / 2, 0, 0]){
41 cylinder(r = sonar_sensor_radius, h = sonar_sensor_height);}}
42
49bffb72 43module sensor_holder(){
60061640 44 // arm_depth is deck_depth minus a little bit to make it fit
45 arm_depth = deck_depth - 0.7;
46 elbow_length = deck_depth + 0.8;
49bffb72 47 difference(){
48 cube([sonar_holder_length, sonar_holder_width, sonar_holder_depth]);
49 translate([sonar_holder_length / 2, sonar_holder_width / 2, -0.05]){
50 sensors();}}
51 translate([sonar_holder_length, 0, 0]){
60061640 52 cube([elbow_length, deck_depth, arm_depth]);
53 translate([elbow_length, 0, 0]){
54 linear_extrude(height = arm_depth){
55 polygon([[0, 0],
56 [arm_depth, 0],
57 [arm_depth, sonar_holder_width / 2],
58 [0, sonar_holder_width / 2 + arm_depth]]);}
59 translate([0, (sonar_holder_width + arm_depth) / 2, 0]){
60 cube([arm_depth / 2,
61 (sonar_holder_width - arm_depth) / 2 + 0.8,
62 arm_depth]);}
63 translate([-1.7, sonar_holder_width + 0.8, 0]){
64 linear_extrude(height = arm_depth){
65 polygon([[0, 0],
66 [arm_depth / 2 + 1.7, 4],
67 [arm_depth / 2 + 1.7, 0]]);}}}}}
49bffb72 68
74f8c088 69module deck_holder(){
be16f419 70 deck_holder_width = sonar_holder_width - deck_depth;
71 cube([deck_holder_length, sonar_holder_depth, deck_holder_width]);
49bffb72 72 cube([sonar_holder_depth,
73 sonar_holder_depth * 2 + deck_depth,
be16f419 74 deck_holder_width]);
49bffb72 75 translate([0, sonar_holder_depth + deck_depth, 0]){
be16f419 76 cube([deck_holder_length, sonar_holder_depth, deck_holder_width]);}
49bffb72 77 translate([sonar_holder_depth + deck_depth, 0, 0]){
78 cube([sonar_holder_depth,
79 sonar_holder_depth * 2 + deck_depth,
be16f419 80 deck_holder_width]);}}
74f8c088 81
be16f419 82translate([0, sonar_holder_depth * 2 + deck_depth + 2, 0]){
83 sensor_holder();}
84deck_holder();