Mercurial > henk
changeset 5:b7c1996d6cbd
Add scad file
| author | Radomir Dopieralski <sheep-devel@sheep.art.pl> |
|---|---|
| date | Tue, 30 Dec 2014 13:43:24 +0100 |
| parents | d6d7d21bd0dd |
| children | 39d4dddef65f |
| files | README henk.scad |
| diffstat | 2 files changed, 159 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/README Tue Dec 30 13:03:05 2014 +0100 +++ b/README Tue Dec 30 13:43:24 2014 +0100 @@ -1,6 +1,6 @@ Henk the Hexapod -**************** +================ This is code and other files for Henk, a six-legged walking robot, which used PyBoard for its brains. Henk is programmed in Micropython, a version of Python @@ -8,7 +8,7 @@ Bill of Materials ------------------ +================= +-----------------+-------+ | Part Name | Count | @@ -49,7 +49,7 @@ Assembly Instructions ---------------------- +===================== Connect all servos and the UBEC to the servo controller. Connect the UART 3, VIN and GND pins of PyBoard to the servo controller with dupont cables. @@ -87,9 +87,10 @@ Connect the buzzer to a DAC and GND pins on the PyBoard with the dupont cables. Put everything except for the servos inside the box. Make a hole in the box for -the servo cables. Make legs out of the servos, screws and servo horns, and -attach them to the bottom of the box. Make a hole for the switch and edge of -PyBoard to stick out, so that you have access to the SD card slot and USB -socket. +the servo cables. Make a hole for the switch and edge of PyBoard to stick out, +so that you have access to the SD card slot and USB socket. + +Make legs out of the servos, screws and servo horns, according to the henk.scad +file, and attach them to the bottom of the box. Enjoy!
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/henk.scad Tue Dec 30 13:43:24 2014 +0100 @@ -0,0 +1,151 @@ +module SG90() { + servo_height = 22.6; + servo_width = 12.2; + servo_depth = 22.8; + servo_ear_depth = 4.8; + servo_big_tip_r = 6.05; + + translate([-6.0, -16.9, -servo_height - 5.8 - 1]) union() { + color("MediumSlateBlue", 0.75) 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, 16.9, servo_height]) { + cylinder(r=servo_big_tip_r, h=5.8, $fn=20); + } + translate([6.0, 16.9 - servo_big_tip_r, servo_height]) { + cylinder(r=2.75, h=5.8, $fn=10); + } + } + color("Snow") translate([6.0, 16.9, servo_height + 5.8]) difference() { + cylinder(r=2.275, h=3.9, $fn=6); + cylinder(r=0.8, h=5, $fn=10); + } + } + 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); + } +} + +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]); + } + translate([0,-2,0]) rotate([0,0,86]) { + cube([4, 13.8, 1.3]); + } + } + for(i=[0:5]) { + translate([13.8 - i * 2,0,0]) { + cylinder(r=0.6, h=8, $fn=8); + } + } + } +} + +module SG90_single_horn(angle) { + rotate(angle) color("Snow") { + difference() { + union() { + cylinder(r=3.3, h=4.4, $fn=20); + _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); + } + } + } +} + +module SG90_double_horn(angle) { + rotate(angle) color("Snow") { + difference() { + union() { + cylinder(r=3.3, h=4.4, $fn=20); + _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); + } + } + } +} + +module SG90_horn_screw() { + color("DarkGray") union() { + translate([0, 0, 3.4]) difference() { + union() { + cylinder(r=1.4, h=0.9, $fn=6); + translate([0, 0, -3.4]) cylinder(r=0.8, h=4, $fn=8); + } + translate([-0.25, -2, 0.4]) cube([0.5, 4, 1]); + } + } +} + +module leg(hip, knee, ankle, $explode=0) { + SG90_single_horn(); + translate([0, 0, $explode]) SG90_horn_screw(); + translate([6, 0, 7 - $explode]) rotate([0, 180, 0]) SG90_horn_screw(); + translate([12, 0, 7 - $explode]) rotate([0, 180, 0]) SG90_horn_screw(); + translate([0, 0, -$explode]) rotate(hip - 90) { + SG90(); + translate([18, -34 - $explode, -18]) rotate([90, -90, 90]) { + SG90(); + translate([0, 0, $explode]) rotate(knee + 90) { + SG90_single_horn(); + translate([0, 0, $explode]) SG90_horn_screw(); + translate([19.6, 0, 0]) { + translate([0, 0, 6 - $explode]) rotate([0, 180, 0]) + SG90_double_horn(); + translate([-6, 0, 5 - $explode * 2]) rotate([0, 180, 0]) + SG90_horn_screw(); + translate([-14, 0, 5 - $explode * 2]) rotate([0, 180, 0]) + SG90_horn_screw(); + translate([6, 0, 5 - $explode * 2]) rotate([0, 180, 0]) + SG90_horn_screw(); + translate([14, 0, 5 - $explode * 2]) rotate([0, 180, 0]) + SG90_horn_screw(); + } + translate([39.2, 0, 0]) rotate([0, 0, 180]) { + SG90_single_horn(); + translate([0, 0, $explode]) SG90_horn_screw(); + translate([0, 0, -$explode]) rotate(ankle - 90) { + SG90(); + translate([10, -20, -9 - $explode]) + rotate([0, 180, 0]) { + SG90_double_horn(); + translate([10, 0, 4 - $explode * 2]) + rotate([0, 180, 0]) SG90_horn_screw(); + rotate([180, 0, 0]) translate([-19.6, 0, -15]) { + translate([0, 0, 6 - $explode]) + SG90_double_horn(); + translate([6, 0, 12 - $explode * 2]) rotate([0, 180, 0]) + SG90_horn_screw(); + translate([14, 0, 12 - $explode * 2]) rotate([0, 180, 0]) + SG90_horn_screw(); + } + } + } + } + } + } + } +} + +leg(0, 0, 0, 0);
