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