/* ******************************************* Objekt Info: Parametrierbarer Servo Arm ******************************************* Version: 24.09.2022 khf ******************************************* */ //*************** Auswahl ************* // keine //***************************************** //*************** Libraries ************ // keine //***************************************** //*************** Parameter ************* arm_length = 10; arm_count = 3; // [1,2,3,4,5,6,7,8] // PLA: 0.3, ABS 0.2 SERVO_HEAD_CLEAR = 0.3; // [0.2,0.3,0.4,0.5] $fn = 40 / 1; //***************************************** //************** Programm ************** /** * Erstes Array (Kopf): * 0. Kopf Aussendurchmesser * 1. Kopfhoehe * 2. Kopfstaerke * 3. Kopfschraubendurchmesser * * Zweites Array (Zahn): * 0. Zahnzahl * 1. Zahnhoehe * 2. Zahnlaenge * 3. Zahnbreite */ FUTABA_3F_SPLINE = [ [5.92, 4, 1.1, 2.5], [25, 0.3, 0.7, 0.1] ]; //******************************************* module servo_futaba_3f(length, count) { servo_arm(FUTABA_3F_SPLINE, [length, count]); } module servo_standard(length, count) { servo_futaba_3f(length, count); } /** * Zahn * * |<-w->| * |_____|___ * / \ ^h * _/ \_v * |<--l-->| * * - Zahn Laenge (l) * - Zahn Breite (w) * - Zahn Hoehe (h) * - Hoehe * */ module servo_head_tooth(length, width, height, head_height) { linear_extrude(height = head_height) { polygon([[-length / 2, 0], [-width / 2, height], [width / 2, height], [length / 2,0]]); } } /** * Servo Kopf */ module servo_head(params, clear = SERVO_HEAD_CLEAR) { head = params[0]; tooth = params[1]; head_diameter = head[0]; head_heigth = head[1]; tooth_count = tooth[0]; tooth_height = tooth[1]; tooth_length = tooth[2]; tooth_width = tooth[3]; % cylinder(r = head_diameter / 2, h = head_heigth + 1); cylinder(r = head_diameter / 2 - tooth_height + 0.03 + clear, h = head_heigth); for (i = [0 : tooth_count]) { rotate([0, 0, i * (360 / tooth_count)]) { translate([0, head_diameter / 2 - tooth_height + clear, 0]) { servo_head_tooth(tooth_length, tooth_width, tooth_height, head_heigth); } } } } /** * Servo * - Kopf-/Zahnparameter * - Armparameter (Laenge und Anzahl) */ module servo_arm(params, arms) { head = params[0]; tooth = params[1]; head_diameter = head[0]; head_heigth = head[1]; head_thickness = head[2]; head_screw_diameter = head[3]; tooth_length = tooth[2]; tooth_width = tooth[3]; arm_length = arms[0]; arm_count = arms[1]; /** * Servo Arm * Die Laenge reicht von der Mitte bis zum letzten Loch */ module arm(tooth_length, tooth_width, head_height, head_heigth, hole_count = 1) { arm_screw_diameter = 2; difference() { union() { cylinder(r = tooth_width / 2, h = head_heigth); linear_extrude(height = head_heigth) { polygon([ [-tooth_width / 2, 0], [-tooth_width / 3, tooth_length], [tooth_width / 3, tooth_length], [tooth_width / 2, 0] ]); } translate([0, tooth_length, 0]) { cylinder(r = tooth_width / 3, h = head_heigth); } if (tooth_length >= 12) { translate([-head_heigth / 2 + 2, 3.8, -4]) { rotate([90, 0, 0]) { rotate([0, -90, 0]) { linear_extrude(height = head_heigth) { polygon([ [-tooth_length / 1.7, 4], [0, 4], [0, - head_height + 5], [-2, - head_height + 5] ]); } } } } } } // Hole for (i = [0 : hole_count - 1]) { //translate([0, length - (length / hole_count * i), -1]) { translate([0, tooth_length - (4 * i), -1]) { cylinder(r = arm_screw_diameter / 2, h = 10); } } cylinder(r = head_screw_diameter / 2, h = 10); } } difference() { translate([0, 0, 0.1]) { cylinder(r = head_diameter / 2 + head_thickness, h = head_heigth + 1); } cylinder(r = head_screw_diameter / 2, h = 10); servo_head(params); } arm_thickness = head_thickness; // Arm translate([0, 0, head_heigth]) { for (i = [0 : arm_count - 1]) { rotate([0, 0, i * (360 / arm_count)]) { arm(arm_length, head_diameter + arm_thickness * 2, head_heigth, 2); } } } } module demo() { rotate([0, 180, 0]) servo_standard(arm_length, arm_count); } demo();