Added optional jst connector to stepper motors.

This commit is contained in:
Martin Budden 2020-11-08 12:20:15 +00:00
parent 34b58e3b64
commit 0b035dbd15
3 changed files with 24 additions and 12 deletions

View File

@ -25,7 +25,7 @@
// c
//
2p54header = ["2p54header", 2.54, 11.6, 3.2, 0.66, "gold", grey(20), 8.5];
jst_xh_header = ["JST XH header",2.5, 10, 3.4, 0.64, "gold", grey(90), 7];
jst_xh_header = ["JST XH header",2.5, 10, 3.2, 0.64, "gold", grey(90), 7];
pin_headers = [ 2p54header ];

View File

@ -23,6 +23,7 @@
include <../core.scad>
include <ring_terminals.scad>
include <../vitamins/pin_headers.scad>
use <../utils/tube.scad>
use <../utils/thread.scad>
use <washer.scad>
@ -39,7 +40,7 @@ function NEMA_shaft_length(type)= type[8]; //! Shaft length above the face, if a
function NEMA_hole_pitch(type) = type[9]; //! Screw hole pitch
function NEMA_holes(type) = [-NEMA_hole_pitch(type) / 2, NEMA_hole_pitch(type) / 2]; //! Screw positions for for loop
function NEMA_big_hole(type) = NEMA_boss_radius(type) + 0.2; //! Clearance hole for the big boss
function NEMA_jst_connector(type)= type[10]; //! True if motor has JST connector
stepper_body_colour = "black";
stepper_cap_colour = grey(50);
stepper_machined_colour = grey(90);
@ -92,12 +93,23 @@ module NEMA(type, shaft_angle = 0) { //! Draw specified NEMA stepper motor
cap_shape(1);
}
color(stepper_cap_colour) // aluminium end caps
tabSize = [16, 4, 2.5];
color(stepper_cap_colour) { // aluminium end caps
for(end = [-1, 1])
translate_z(-length / 2 + end * (length - cap) / 2)
linear_extrude(cap, center = true)
cap_shape(end);
if(NEMA_jst_connector(type))
translate([-tabSize.x / 2, side / 2, -length])
cube(tabSize);
}
if(NEMA_jst_connector(type))
translate([0, side / 2 - 2, -length + tabSize.z + 0.75])
rotate(180)
jst_xh_header(jst_xh_header, 6, true);
if(show_threads)
for(x = NEMA_holes(type), y = NEMA_holes(type))
translate([x, y, -cap / 2])

View File

@ -21,15 +21,15 @@
// NEMA stepper motor model
//
// corner body boss boss shaft
// side, length, radius, radius, radius, depth, shaft, length, holes
NEMA17 = ["NEMA17", 42.3, 47, 53.6/2, 25, 11, 2, 5, 24, 31 ];
NEMA17M = ["NEMA17M", 42.3, 40, 53.6/2, 25, 11, 2, 5, 20, 31 ];
NEMA17M8= ["NEMA17M8", 42.3, 40, 53.6/2, 25, 11, 2, 8, [280, 8, 4], 31 ];
NEMA17S = ["NEMA17S", 42.3, 34, 53.6/2, 25, 11, 2, 5, 24, 31 ];
NEMA16 = ["NEMA16", 39.5, 19.2, 50.6/2, 50.6/2, 11, 2, 5, 12, 31 ];
NEMA14 = ["NEMA14", 35.2, 36, 46.4/2, 21, 11, 2, 5, 21, 26 ];
NEMA23 = ["NEMA23", 56.4, 51.2, 75.7/2, 35, 38.1/2, 1.6, 6.35, 24, 47.1 ];
// corner body boss boss shaft jst
// side, length, radius, radius, radius, depth, shaft, length, holes, connector
NEMA17 = ["NEMA17", 42.3, 47, 53.6/2, 25, 11, 2, 5, 24, 31, true ];
NEMA17M = ["NEMA17M", 42.3, 40, 53.6/2, 25, 11, 2, 5, 20, 31, true ];
NEMA17M8= ["NEMA17M8", 42.3, 40, 53.6/2, 25, 11, 2, 8, [280, 8, 4], 31, true ];
NEMA17S = ["NEMA17S", 42.3, 34, 53.6/2, 25, 11, 2, 5, 24, 31, true ];
NEMA16 = ["NEMA16", 39.5, 19.2, 50.6/2, 50.6/2, 11, 2, 5, 12, 31, false ];
NEMA14 = ["NEMA14", 35.2, 36, 46.4/2, 21, 11, 2, 5, 21, 26, false ];
NEMA23 = ["NEMA23", 56.4, 51.2, 75.7/2, 35, 38.1/2, 1.6, 6.35, 24, 47.1, false ];
stepper_motors = [NEMA14, NEMA16, NEMA17S, NEMA17M, NEMA17, NEMA23];