|
| 1 | +$fn=40; |
| 2 | + |
| 3 | +support_diameter = 15.6; |
| 4 | +radius = 13; |
| 5 | + |
| 6 | +top_ball_bearing = 1; |
| 7 | +top_bearing_diameter = 17.8; |
| 8 | +top_bearing_height = 6.4; |
| 9 | +top_bearing_spacing = 6; |
| 10 | +top_bearing_inside = 14; |
| 11 | + |
| 12 | +top_sleeve_size=6.5; |
| 13 | +top_sleeve_inside = 5.2; |
| 14 | + |
| 15 | +magnet_height = 15; |
| 16 | +magnet_diameter = 14; |
| 17 | + |
| 18 | +bottom_ball_bearing = 1; |
| 19 | +bottom_bearing_diameter = 17.8; |
| 20 | +bottom_bearing_height = 6.4; |
| 21 | +bottom_bearing_spacing = 6; |
| 22 | +bottom_bearing_inside = 14; |
| 23 | +bottom_nut_height = 1; |
| 24 | + |
| 25 | +bottom_sleeve_size=6.5; |
| 26 | +bottom_sleeve_inside = 5.2; |
| 27 | + |
| 28 | +bottom_bolt_height = 7; |
| 29 | +bottom_bolt_diameter = 14; |
| 30 | + |
| 31 | +reed_sensor=0; |
| 32 | +reed_offset=9.4; |
| 33 | +reed_diameter=2.8; |
| 34 | +reed_length=17; |
| 35 | + |
| 36 | +hall_sensor=1; |
| 37 | +hall_offset=8; |
| 38 | + |
| 39 | +height = 80; |
| 40 | + |
| 41 | + fit = 0.4; |
| 42 | + |
| 43 | +module screw_hole(h, r) { |
| 44 | + union() { |
| 45 | + cylinder(h=h, r=r); |
| 46 | + translate([0, 0, 12]) |
| 47 | + cylinder(h=7, r2=6, r1=r); |
| 48 | + } |
| 49 | +} |
| 50 | + |
| 51 | +module body() { |
| 52 | + difference() { |
| 53 | + union() { |
| 54 | + cylinder(h=height*2/3, r=radius, center=true); |
| 55 | + rotate(90, [1, 0, 0]) |
| 56 | + cylinder(h=support_diameter*2, r1=radius, r2=support_diameter/2+2); |
| 57 | + translate([0, 0, -height*7/18+1]) |
| 58 | + cylinder(h=height/9+1, r=radius*.9, center=true); |
| 59 | + translate([0, 0, -height*8/18-1.5]) |
| 60 | + cylinder(h=height/18+1, r=1*radius, center=true); |
| 61 | + |
| 62 | + // top cone |
| 63 | + translate([0, 0, height/3]) |
| 64 | + cylinder(h=height/5, r1=radius*1.1, r2=radius*.8 + .5); |
| 65 | + |
| 66 | + // support for speed wiring |
| 67 | + translate([0, -reed_offset, bottom_bearing_start + height/4+1]) |
| 68 | + cylinder(h=height/2, r=reed_diameter/2+1.2, center=true); |
| 69 | + } |
| 70 | + |
| 71 | + // vane bearing holder |
| 72 | + if(top_ball_bearing) { |
| 73 | + translate([0, 0, height/2-top_bearing_height/2+.1-1]) |
| 74 | + cylinder(h=top_bearing_height, r=top_bearing_diameter/2, center=true); |
| 75 | + translate([0, 0, height/2 - top_bearing_height*3/2 - top_bearing_spacing-1]) |
| 76 | + cylinder(h=top_bearing_height, r=top_bearing_diameter/2, center=true); |
| 77 | + translate([0, 0, height/2 - top_bearing_height - top_bearing_spacing/2-1]) { |
| 78 | + cylinder(h=top_bearing_spacing+2, r= top_bearing_diameter/2 - fit*2, center=true); |
| 79 | + cylinder(h=top_bearing_spacing+top_bearing_height*2+3, r= top_bearing_inside/2, center=true); |
| 80 | + } |
| 81 | + translate([0, 0, height/2 - top_bearing_height - top_bearing_spacing/2-1]) { |
| 82 | + cylinder(h=top_bearing_spacing+2, r= top_bearing_diameter/2 - fit*2, center=true); |
| 83 | + cylinder(h=top_bearing_spacing+top_bearing_height*2+3, r=top_bearing_inside/2, center=true); |
| 84 | + } |
| 85 | + } else { |
| 86 | + translate([0, 0, height/2 - top_bearing_height - top_bearing_spacing/2+1]) |
| 87 | + cylinder(h=top_bearing_spacing+top_bearing_height*2+3, r= top_sleeve_size/2, center=true); |
| 88 | + translate([0, 0, height/2 - top_bearing_height - top_bearing_spacing/2-1]) |
| 89 | + cylinder(h=top_bearing_spacing+top_bearing_height*2+3, r=top_sleeve_inside/2, center=true); |
| 90 | + } |
| 91 | + |
| 92 | + // magnet |
| 93 | + translate([0, 0, height/2 - top_bearing_height*2 - top_bearing_spacing - magnet_height/2 -2]) |
| 94 | + cylinder(h=magnet_height, r=magnet_diameter/2, center=true); |
| 95 | + |
| 96 | + // keyhole |
| 97 | + rotate(90, [0, 1, 0]) |
| 98 | + translate([0, -3/2*radius, 0]) |
| 99 | + cylinder(h=25, r=1.8, center=true); |
| 100 | + |
| 101 | + // main cutaway |
| 102 | + cylinder(h=support_diameter, r=support_diameter/2+1, center=true); |
| 103 | + |
| 104 | + bottom_bearing_start=-height/2; |
| 105 | + |
| 106 | + // circuit board |
| 107 | + translate([0, 0, 6]) |
| 108 | + cube([18.4, 12, 2], center=true); |
| 109 | + |
| 110 | + // cups bearing holders |
| 111 | + translate([0, 0, bottom_bearing_start+bottom_bearing_height*2+bottom_bearing_spacing+bottom_bolt_height/2+bottom_nut_height-.5]) |
| 112 | + cylinder(h=bottom_bolt_height+.1, r=bottom_bolt_diameter/2, center=true); |
| 113 | + |
| 114 | + if(bottom_ball_bearing) { |
| 115 | + translate([0, 0, bottom_bearing_start+bottom_bearing_height*3/2+bottom_bearing_spacing+bottom_nut_height-1]) |
| 116 | + cylinder(h=bottom_bearing_height, r=bottom_bearing_diameter/2, center=true); |
| 117 | + translate([0, 0, bottom_bearing_start+bottom_bearing_height+bottom_bearing_spacing/2+bottom_nut_height]) { |
| 118 | + cylinder(h=bottom_bearing_spacing+1, r=bottom_bearing_diameter/2 - 2*fit, center=true); |
| 119 | + cylinder(h=bottom_bearing_spacing+bottom_bearing_height*2+3, r=bottom_bearing_inside/2, center=true); |
| 120 | + } |
| 121 | + |
| 122 | + translate([0, 0, bottom_bearing_start+(bottom_bearing_height+bottom_nut_height)/2+1]) |
| 123 | + cylinder(h=bottom_bearing_height+bottom_nut_height+.1, r=bottom_bearing_diameter/2, center=true); |
| 124 | + } else { |
| 125 | + translate([0, 0, bottom_bearing_start+bottom_bearing_height+bottom_bearing_spacing/2+bottom_nut_height+2]) |
| 126 | + cylinder(h=bottom_bearing_spacing+bottom_bearing_height*2+3, r=bottom_sleeve_size/2, center=true); |
| 127 | + translate([0, 0, bottom_bearing_start+bottom_bearing_height+bottom_bearing_spacing/2+bottom_nut_height]) |
| 128 | + cylinder(h=bottom_bearing_spacing+bottom_bearing_height*2+3, r=bottom_sleeve_inside/2, center=true); |
| 129 | + } |
| 130 | + |
| 131 | + // slot for reed sensor |
| 132 | + if(reed_sensor) { |
| 133 | + translate([0, -reed_offset, bottom_bearing_start + height/4+.2+5]) |
| 134 | + cylinder(h=height/2, r=1.2, center=true); |
| 135 | + translate([0, -reed_offset, bottom_bearing_start+.8]) |
| 136 | + scale([1,1,1.4]) |
| 137 | + rotate([0,90,0]) |
| 138 | + cylinder(h=reed_length, r=reed_diameter/2, center=true); |
| 139 | + } |
| 140 | + |
| 141 | + if(hall_sensor) { |
| 142 | + translate([0, -reed_offset, bottom_bearing_start + height/4+.2+1]) |
| 143 | + cylinder(h=height/2, r=1.9, center=true); |
| 144 | + translate([0, -hall_offset, bottom_bearing_start+.8-2]) |
| 145 | + cube([4,4,4], center=true); |
| 146 | + } |
| 147 | + |
| 148 | + // screw holes |
| 149 | + rotate([90, 0, 0]) { |
| 150 | + translate([0, bottom_bearing_start+height/3-17*(1-bottom_ball_bearing), -7]) { |
| 151 | + translate([support_diameter/2, 0, 0]) |
| 152 | + screw_hole(h=20, r=1.2); |
| 153 | + translate([-support_diameter/2, 0, 0]) |
| 154 | + screw_hole(h=20, r=1.2); |
| 155 | + } |
| 156 | + translate([0, bottom_bearing_start+height*2/3+15*(1-top_ball_bearing), -7]) { |
| 157 | + translate([support_diameter/2+1, 0, 0]) |
| 158 | + screw_hole(h=20, r=1.2); |
| 159 | + translate([-support_diameter/2-1, 0, 0]) |
| 160 | + screw_hole(h=20, r=1.2); |
| 161 | + } |
| 162 | + } |
| 163 | + // screw holes |
| 164 | + if(0) |
| 165 | + for(i=[0:2]) |
| 166 | + rotate(i*120, [0, 0, 1]) { |
| 167 | + translate([0,-radius-1,bottom_bearing_start+bottom_bearing_height]) |
| 168 | + rotate(90, [1, 0, 0]) |
| 169 | + cylinder(h=10, r=1.6, center=true); |
| 170 | + } |
| 171 | + |
| 172 | + // cut away support |
| 173 | + translate([0, 6, 0]) |
| 174 | + rotate(90, [1, 0, 0]) |
| 175 | + cylinder(h=radius*3 + 6, r=support_diameter/2); |
| 176 | + } |
| 177 | +} |
| 178 | + |
| 179 | + |
| 180 | +module pegs(r) { |
| 181 | + for(i=[-1:1]) { |
| 182 | + translate([radius*.85, 0, height/4*i]) |
| 183 | + sphere(r, $fn=24); |
| 184 | + translate([-radius*.85, 0, height/4*i]) |
| 185 | + sphere(r, $fn=24); |
| 186 | + } |
| 187 | +} |
| 188 | + |
| 189 | +if(1) { |
| 190 | +// split in half |
| 191 | + union() { |
| 192 | + intersection() { |
| 193 | + body(); |
| 194 | + translate([0, -height/2, 0]) |
| 195 | + cube([height, height, height],center=true); |
| 196 | + } |
| 197 | + pegs(1.1); |
| 198 | + } |
| 199 | + translate([3*radius, 0, 0]) |
| 200 | + intersection() { |
| 201 | + rotate(180, [0, 0, 1]) |
| 202 | + difference() { |
| 203 | + body(); |
| 204 | + pegs(1.2); |
| 205 | + } |
| 206 | + translate([0, -height/2, 0]) |
| 207 | + cube([height, height, height],center=true); |
| 208 | + } |
| 209 | +} else { |
| 210 | + translate([30, 0, 0]) |
| 211 | + intersection() { |
| 212 | + body(); |
| 213 | + translate([0, 0, -height/2]) |
| 214 | + cylinder(h=12, r1=12.7, r=7.2); |
| 215 | + } |
| 216 | + |
| 217 | + difference() { |
| 218 | + body(); |
| 219 | + translate([0, 0, -height/2]) |
| 220 | + cylinder(h=13, r1=13, r2=7.5); |
| 221 | + } |
| 222 | +} |
0 commit comments