changeset 18:ae252a588be2

More servo horns
author Radomir Dopieralski <sheep-devel@sheep.art.pl>
date Sun, 26 Jun 2016 21:18:43 +0200
parents 44ca00aab5a9
children e28844f436b8
files servos/sg90.scad
diffstat 1 files changed, 100 insertions(+), 31 deletions(-) [+]
line wrap: on
line diff
--- a/servos/sg90.scad	Mon Dec 22 21:30:50 2014 +0100
+++ b/servos/sg90.scad	Sun Jun 26 21:18:43 2016 +0200
@@ -1,7 +1,6 @@
 use <../passives/connectors.scad>;
-use <../fasteners/screws.scad>;
 
-module SG90() {
+module SG90(body_color="SlateBlue") {
     servo_height = 22.6;
     servo_width = 12.2;
     servo_depth = 22.8;
@@ -9,20 +8,22 @@
     servo_big_tip_r = 6.05;
 
     translate([-6.0, -16.9, -servo_height - 5.8 - 1]) union() {
-        color("MediumSlateBlue", 0.75) union () {
+        color(body_color, 0.8) union () {
             cube([servo_width, servo_depth, servo_height]);
             translate([0, -4.8, 17.6]) {
                 difference () {
                     cube([12.0, 32.3, 2.4]);
-                    translate([6.0, 1.5, -0.1]) cylinder(r=2, h=2.6, $fn=10);
-                    translate([6.0, 30.8, -0.1]) cylinder(r=2, h=2.6, $fn=10);
+                    translate([6.0, 2.5, -0.1]) cylinder(r=1, h=2.6, $fn=6);
+                    translate([5.5, -0.5, -0.1]) cube([1, 3, 2.6]);
+                    translate([6.0, 29.8, -0.1]) cylinder(r=1, h=2.6, $fn=6);
+                    translate([5.5, 29.8, -0.1]) cube([1, 3, 2.6]);
                 }
             }
             translate([6.0, 16.9, servo_height]) {
-                cylinder(r=servo_big_tip_r, h=5.8, $fn=20);
+                cylinder(r=servo_big_tip_r, h=5.8, $fn=10);
             }
             translate([6.0, 16.9 - servo_big_tip_r, servo_height]) {
-                cylinder(r=2.75, h=5.8, $fn=10);
+                cylinder(r=2.75, h=5.8, $fn=6);
             }
         }
         color("Snow") translate([6.0, 16.9, servo_height + 5.8]) difference() {
@@ -31,26 +32,49 @@
         }
     }
     translate([1, -10, -25]) rotate([0, 90, 90]) {
-        color("Orange") translate([1.27, 0, 12]) cylinder(r1=0.75, r2=0, h=20);
-        color("Red") translate([1.27, 1, 12]) cylinder(r1=0.75, r2=0, h=20);
-        color("Brown") translate([1.27, 2, 12]) cylinder(r1=0.75, r2=0, h=20);
+        color("Orange") translate([1.27, 0, 12]) cylinder(r1=0.75, r2=0, h=20, $fn=4);
+        color("Red") translate([1.27, 1, 12]) cylinder(r1=0.75, r2=0, h=20, $fn=4);
+        color("Brown") translate([1.27, 2, 12]) cylinder(r1=0.75, r2=0, h=20, $fn=4);
+    }
+}
+
+module SG90_horn_screw() {
+    color("DarkGray") union() {
+        translate([0, 0, 3.4]) difference() {
+            union() {
+                cylinder(r=1.3, h=0.9, $fn=8);
+                translate([0, 0, -4.4]) cylinder(r1=0, r2=0.8, h=5, $fn=8);
+            }
+            translate([-0.25, -1, 0.4]) cube([0.5, 2, 1]);
+            translate([1, -0.25, 0.4]) rotate(90) cube([0.5, 2, 1]);
+        }
     }
 }
 
-module _SG90_horn_arm() {
-    difference() {
-        translate([13.8, 0, 3.1]) {
-            cylinder(r=1.85, h=1.3, $fn=10);
-            translate([0,-2,0]) rotate([0,0,94]) {
-                cube([4, 13.8, 1.3]);
+module SG90_mount_screw() {
+    color("DarkGray") union() {
+        translate([0, 0, 3.4]) difference() {
+            union() {
+                cylinder(r=1.4, h=0.9, $fn=8);
+                translate([0, 0, -7.4]) cylinder(r1=0, r2=0.8, h=8, $fn=8);
+                cylinder(r=1.8, h=0.2, $fn=8);
             }
-            translate([0,-2,0]) rotate([0,0,86]) {
-                cube([4, 13.8, 1.3]);
-            }
+            translate([-0.25, -1, 0.4]) cube([0.5, 2, 1]);
+            translate([1, -0.25, 0.4]) rotate(90) cube([0.5, 2, 1]);
         }
-        for(i=[0:5]) {
-            translate([13.8 - i * 2,0,0]) {
-                cylinder(r=0.6, h=8, $fn=8);
+    }
+}
+
+
+module _SG90_horn_arm(holes=6, base=3.3) {
+    difference() {
+        hull() {
+            translate([0, 0, 3.1]) cylinder(r=base, h=1.3, $fn=5);
+            translate([2*holes+1.8, 0, 3.1]) cylinder(r=1.85, h=1.3, $fn=8);
+        }
+        for(i=[0:holes-1]) {
+            translate([2*holes + 1.8 - i * 2,0,0]) {
+                cylinder(r=0.6, h=8, $fn=6);
             }
         }
     }
@@ -60,13 +84,13 @@
     rotate(angle) color("Snow") {
         difference() {
             union() {
-                cylinder(r=3.3, h=4.4, $fn=20);
+                cylinder(r=3.3, h=4.4, $fn=8);
                 _SG90_horn_arm();
             }
             translate([0,0,-1]) {
                 cylinder(r=2.275, h=3.2, $fn=6);
-                cylinder(r=1, h=8, $fn=10);
-                translate([0, 0, 4.4]) cylinder(r=2.35, h=2, $fn=10);
+                cylinder(r=1, h=8, $fn=8);
+                translate([0, 0, 4.4]) cylinder(r=2.35, h=2, $fn=8);
             }
         }
     }
@@ -76,14 +100,57 @@
     rotate(angle) color("Snow") {
         difference() {
             union() {
-                cylinder(r=3.3, h=4.4, $fn=20);
+                cylinder(r=3.3, h=4.4, $fn=8);
                 _SG90_horn_arm();
                 rotate(180) _SG90_horn_arm();
             }
             translate([0,0,-1]) {
                 cylinder(r=2.275, h=3.2, $fn=6);
-                cylinder(r=1, h=8, $fn=10);
-                translate([0, 0, 4.4]) cylinder(r=2.35, h=2, $fn=10);
+                cylinder(r=1, h=8, $fn=8);
+                translate([0, 0, 4.4]) cylinder(r=2.35, h=2, $fn=8);
+            }
+        }
+    }
+}
+
+module SG90_round_horn(angle) {
+    rotate(angle) color("Snow") {
+        difference() {
+            union() {
+                translate([0, 0, 3.3]) cylinder(r=11.7, h=1.3, $fn=16);
+                cylinder(r=3.3, h=4.4, $fn=8);
+            }
+            translate([0,0,-1]) {
+                cylinder(r=2.275, h=3.2, $fn=6);
+                cylinder(r=1, h=8, $fn=8);
+                translate([0, 0, 4.4]) cylinder(r=2.35, h=2, $fn=8);
+            }
+            for(i=[-1:1]) rotate([0, 0, i*20]) {
+                translate([10, 0 ,0]) cylinder(r=0.6, h=8, $fn=6);
+                translate([8, 0 ,0]) cylinder(r=0.6, h=8, $fn=6);
+                translate([-10, 0 ,0]) cylinder(r=0.6, h=8, $fn=6);
+                translate([-8, 0 ,0]) cylinder(r=0.6, h=8, $fn=6);
+                translate([0, 9 ,0]) cylinder(r=0.6, h=8, $fn=6);
+                translate([0, -9 ,0]) cylinder(r=0.6, h=8, $fn=6);
+            }
+        }
+    }
+}
+
+module SG90_cross_horn(angle) {
+    rotate(angle) color("Snow") {
+        difference() {
+            union() {
+                cylinder(r=3.3, h=4.4, $fn=8);
+                _SG90_horn_arm();
+                rotate(180) _SG90_horn_arm(7, 3.9);
+                rotate(90) _SG90_horn_arm(2, 1.85);
+                rotate(-90) _SG90_horn_arm(2, 1.85);
+            }
+            translate([0,0,-1]) {
+                cylinder(r=2.275, h=3.2, $fn=6);
+                cylinder(r=1, h=8, $fn=8);
+                translate([0, 0, 4.4]) cylinder(r=2.35, h=2, $fn=8);
             }
         }
     }
@@ -95,6 +162,8 @@
 
 SG90();
 SG90_double_horn(90);
-translate([0, 0, 10]) SG90_single_horn(90);
-translate([0, 0, 20]) SG90_horn_screw();
-translate([0, -20, 10]) SG90_plug();
+translate([0, 0, 10]) SG90_cross_horn(90);
+translate([0, 0, 20]) SG90_round_horn(90);
+translate([0, 0, 30]) SG90_single_horn(90);
+translate([0, 0, 40]) SG90_horn_screw();
+translate([0, -20, 30]) SG90_plug();