simplify wiring, keep right and left separated
[challenge-bot] / motor-mount-drill-jig.scad
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
7 // use this drill jig for putting holes in a motor mount for screws
8 // and motor shaft. the four tabs at the bottom are for clamping
9 // the jig down.
10
11 mm_per_inch = 25.4;
12
13 material_width = (1 / 8) * mm_per_inch;
14
15 board_length = 1.75 * mm_per_inch;
16 board_width = 1.5 * mm_per_inch;
17 board_depth = (3 / 16) * mm_per_inch;
18 tab_length = 3 * mm_per_inch;
19 tab_width = (1 / 4) * mm_per_inch;
20
21 union(){
22 rotate(a = 90, v = [1, 0, 0]) {
23 cube([board_length + material_width,
24 1.75 * mm_per_inch + material_width,
25 material_width]);}
26
27 translate(v = [0, -material_width, 0]){
28 rotate(a = -90, v = [0, 1, 0]) {
29 cube( [1.75 * mm_per_inch + material_width,
30 1.5 * mm_per_inch + 2 * material_width,
31 material_width]);}}
32
33 translate(v = [(1.75 * mm_per_inch + material_width) / 2 + tab_width,
34 -tab_length,
35 0]){
36 rotate(a = 90, v = [0 ,0 ,1 ]){
37 cube([3 * mm_per_inch, 0.5 * mm_per_inch , material_width]);}}
38
39 translate(v = [-tab_length,
40 (1.5 * mm_per_inch + material_width) / 2 - tab_width,
41 0]){
42 cube([3 * mm_per_inch, 0.5 * mm_per_inch , material_width]);}
43
44 translate(v = [(1.75 * mm_per_inch + material_width) / 2 + tab_width,
45 (1.5 * mm_per_inch),
46 0]){
47 rotate(a = 90, v = [0, 0, 1]){
48 cube([3 * mm_per_inch, 0.5 * mm_per_inch , material_width]);}}
49
50 translate(v = [(1.75 * mm_per_inch),
51 (1.5 * mm_per_inch + material_width) / 2 - tab_width,
52 0]){
53 cube([3 * mm_per_inch, 0.5 * mm_per_inch , material_width]);}}
54
55 _4_40 = 0.1285 * mm_per_inch / 2; // size of hole for 4x40
56 _6_32 = 0.1495 * mm_per_inch / 2; // size of hole for 6x32
57
58 module collar_hole(){
59 cylinder(h = board_depth, r = 2 * _6_32, $fn = 20);}
60
61 module nubbin_hole(){
62 cylinder(h = board_depth, r = _6_32, $fn = 20);}
63
64 module mounting_screw_hole(){
65 cylinder(h = board_depth, r = _6_32, $fn = 20);}
66
67 module bracket_screw_hole(){
68 cylinder(h = board_depth, r = _6_32, $fn = 20);}
69
70 module wheel_motor_holes(scale){
71 translate([51 - 26.78, 38 - 10.8, 0] * scale) {
72 collar_hole();}
73 translate([51 - 26.78, 38 - 22.23, 0] * scale){
74 nubbin_hole();}
75 translate([51 - 18.05 - 17.45, 38 - 30.81, 0] * scale){
76 mounting_screw_hole();}
77 translate([51 - 18.05, 38 - 30.81, 0] * scale){
78 mounting_screw_hole();}
79 translate([7.5, 8.5, 0] * scale){
80 bracket_screw_hole();}
81 translate([7.5, 21 + 8.5, 0] * scale){
82 bracket_screw_hole();}}
83
84 module wheel_mount(scale){
85 difference(){
86 cube(scale * [board_length + material_width,
87 board_width + material_width,
88 material_width]);
89 wheel_motor_holes(scale);}}
90
91 wheel_mount(1);
92
93 translate(v = [0, 0, board_length]) jig_lid();
94
95 module jig_lid() {
96 union() {
97 wheel_mount(1);
98 translate(v = [0, -2.1 * material_width, material_width]){
99 cube([board_length + material_width,
100 3.1 * material_width,
101 material_width]);}
102 translate(v = [0, -2.1 * material_width, 0]){
103 cube([board_length + material_width, material_width, material_width]);}
104 translate(v = [-2.1 * material_width, 0, material_width]){
105 cube([3.1 * material_width,
106 board_width + material_width,
107 material_width]);}
108 translate(v = [-2.1 * material_width, 0, 0]){
109 cube([material_width, board_width+material_width, material_width]);}}}