wheel_radius = 68/2;
module encoder_shaft(){
- motor_shaft_big = 3.7;
- motor_shaft_small = 4.8;
- motor_shaft_length = wheel_depth / 2;
+ // measured with calipers, checked against the motor shaft
+ motor_shaft_big = 3.7; // radius, gets doubled in cylinder
+ motor_shaft_small = 4.8; // total length of box
+ motor_shaft_length = wheel_depth * 3 / 4;
intersection(){
cylinder(h = motor_shaft_length,
r = motor_shaft_big,
center = true,
- $fn=30);
+ $fn = 30);
+ // x direction is multiplied by 2 because the radius of the cylinder
+ // goes in both directions. the extra .1 is for overlap
cube([motor_shaft_big * 2.1, motor_shaft_small, motor_shaft_length],
center = true);}}
difference(){
cylinder(h = wheel_depth, r = wheel_radius, center = true, $fn = 30);
translate([0, 0, wheel_depth / 4]){
- scale([1, 1, 2]){
+ scale([1, 1, 1.1]){
encoder_shaft();}}
mounting_screw();
for(i = [1 : 5]){