add notes for some wheel measurements
[challenge-bot] / wheel.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 wheel_depth = 6;
8 wheel_radius = 68/2;
9
10 module encoder_shaft(){
11 // measured with calipers, checked against the motor shaft
12 motor_shaft_big = 3.7; // radius, gets doubled in cylinder
13 motor_shaft_small = 4.8; // total length of box
14 motor_shaft_length = wheel_depth * 3 / 4;
15
16 intersection(){
17 cylinder(h = motor_shaft_length,
18 r = motor_shaft_big,
19 center = true,
20 $fn = 30);
21 // x direction is multiplied by 2 because the radius of the cylinder
22 // goes in both directions. the extra .1 is for overlap
23 cube([motor_shaft_big * 2.1, motor_shaft_small, motor_shaft_length],
24 center = true);}}
25
26 module mounting_screw(){
27 cylinder(h = wheel_depth * 1.1, r = 1, $fn = 30, center = true);}
28
29 module wheel(){
30 translate([0, 0, wheel_depth / 2]){
31 difference(){
32 cylinder(h = wheel_depth, r = wheel_radius, center = true, $fn = 30);
33 translate([0, 0, wheel_depth / 4]){
34 scale([1, 1, 1.1]){
35 encoder_shaft();}}
36 mounting_screw();
37 for(i = [1 : 5]){
38 rotate(i * 360/5, [0, 0, 1]){
39 translate([0, 0, -0.6 * wheel_depth])
40 between_spokes();}}
41 translate([0, 0, wheel_depth / 4]){
42 difference(){
43 cylinder(h = wheel_depth / 1.2,
44 r = 0.85 * wheel_radius,
45 center = true);
46 cylinder(h = wheel_depth / 1.2,
47 r = 0.23 * wheel_radius,
48 center = true);}}}}}
49
50 module wheel_block(){
51 cube([wheel_radius, wheel_radius, wheel_depth]);}
52
53 module pie_slice(){
54 intersection(){
55 translate([0, 0, wheel_depth / 2]){
56 cylinder(h = wheel_depth,
57 r = 0.85 * wheel_radius,
58 center = true);}
59 translate([0, wheel_radius * 0.3, 0]){
60 rotate([0, 0, (360 / 5) / 2]){
61 intersection(){
62 wheel_block();
63 rotate([0, 0, 90 - 360 / 5])
64 wheel_block();}}}}}
65
66 module between_spokes(){
67 minkowski(){
68 pie_slice();
69 cylinder(h = wheel_depth / 2, r = 1, $fn = 30);}}
70
71 wheel();