Added stepper motors and motor mounts

This commit is contained in:
2022-02-23 03:09:39 +01:00
parent 39a0d379d1
commit 23d70a6724
3 changed files with 127 additions and 45 deletions

View File

@@ -1,16 +1,24 @@
use_colors = true;
xsize = 500;
xsize = 450;
ysize = 400;
sled_ysize = 5 * 25.4;
sled_xsize = 6 * 25.4;
sled_ysize = 7 * 25.4;
sled_xsize = 8 * 25.4;
cur_xpos = 250;
cur_ypos = 200;
xmin = 155;
ymin = 140;
// 130..320
cur_xpos = 155;
// 140..260
cur_ypos = 140;
echo(str("Range = ", [ xsize - xmin * 2, ysize - ymin*2 ]));
$fs = 1.5;
$include_substock = true;
include <parts.scad>;
csize = 15;
module frame() {
@@ -31,12 +39,10 @@ module frame() {
tslot(ysize - 2*corner_offset);
}
module corners() {
render() {
translate([0,0]) flcorner();
translate([xsize, 0, 0]) frcorner();
translate([xsize, ysize, 0]) brcorner();
translate([0, ysize, 0]) blcorner();
}
}
module rails() {
@@ -65,37 +71,29 @@ module ysled_rails() {
module xsled() {
xdiff = sled_xsize / 2 + frame_size / 2;
*for(ypos = [-ysled_rail_spacing/2, ysled_rail_spacing/2]) {
translate([-xdiff, ypos, 0])
xsled_slider();
translate([xdiff, ypos, 0])
rotate([0,0,180])
xsled_slider();
}
translate([0, 0, frame_size])
xsled_frame();
xsled_frame();
}
module moving_parts(xpos = cur_xpos, ypos = cur_ypos) {
translate([frame_size / 2 + corner_size / 2,
cur_ypos, 0]) {
ysled_slider(spread = sled_ysize, associated_parts = true);
translate([xsize - frame_size - corner_size, 0, 0])
rotate([0, 180, 0])
ysled_slider(spread = sled_ysize, associated_parts = true);
ysled_rails();
}
translate([cur_xpos, cur_ypos, 0])
xsled();
}
union() {
frame();
rails();
corners();
moving_parts();
}
translate([frame_size / 2 + corner_size / 2, cur_ypos, 0]) {
ysled_slider(spread = sled_ysize, associated_parts = true);
translate([xsize - frame_size - corner_size, 0, 0])
rotate([0, 180, 0])
ysled_slider(spread = sled_ysize, associated_parts = true);
ysled_rails();
translate([cur_xpos, 0, 0])
xsled();
}
//translate([0, 0, -1000]) cube(2000, center=true);

View File

@@ -114,12 +114,48 @@ module ysled_slider(spread, associated_parts = false) {
}
}
module nema17_housing() {
hwidth = corner_size + frame_size + wall_thickness;
hheight = nema17_face + wall_thickness * 2;
hdepth = frame_size + wall_thickness * 2;
screw_dxy = 31 / 2;
translate([0,
-nema17_face/2 - frame_size/2 - wall_thickness,
0])
render()
difference() {
cube([hwidth, hheight, hdepth],
center=true);
translate([0,0,-2])
cube([nema17_face+1, nema17_face+1, hdepth],
center=true);
cylinder(d=23, frame_size);
for (x = [-screw_dxy, screw_dxy],
y = [-screw_dxy, screw_dxy])
translate([x, y, frame_size/2 + wall_thickness])
rotate([180, 0, 0]){
cylinder(d=5,h=3);
}
}
}
module flcorner() {
translate([0, 0, 0])
rotate([0, 0, 0]) {
corner_base();
rail_holder(false);
}
translate([(corner_size-wall_thickness)/2, 0, 0])
nema17_housing();
translate([(corner_size - wall_thickness) / 2,
-nema17_face/2 - frame_size/2 - wall_thickness,
frame_size/2]) {
nema17();
}
}
module frcorner() {
@@ -127,6 +163,13 @@ module frcorner() {
corner_base();
rail_holder(true);
}
translate([-(corner_size-wall_thickness)/2, 0, 0])
nema17_housing();
translate([-(corner_size - wall_thickness) / 2,
-nema17_face/2 - frame_size/2 - wall_thickness,
frame_size/2]) {
nema17();
}
}
module blcorner() {
@@ -169,7 +212,7 @@ module xsled_slider() {
}
rotate([0, 90, 0])
*bushing();
bushing();
}
module sled_cornera() {
@@ -211,5 +254,16 @@ module xsled_frame() {
translate([-sled_xsize / 2, sled_ysize / 2, 0])
rotate([0,0,270])
sled_cornerb();
// simulate a piece of film
if (false) {
color("#0008")
cube([
5*inch,
4*inch,
1
],
center=true);
}
}

View File

@@ -1,18 +1,10 @@
stock_color = "lightgray";
stock_color = "#aaa4";
bushing_od = 12;
bushing_id = 8;
bushing_len = 8;
module bushing() {
colorize(stock_color) {
difference() {
cylinder(d = bushing_od, h = bushing_len);
translate([0,0,-1])
cylinder(d = bushing_id, h = bushing_len + 2);
}
}
}
nema17_face = 42.3;
module colorize(colorname) {
if (use_colors) {
@@ -21,3 +13,41 @@ module colorize(colorname) {
children();
}
}
module bushing() {
colorize(stock_color) render() {
difference() {
cylinder(d = bushing_od, h = bushing_len);
translate([0,0,-1])
cylinder(d = bushing_id, h = bushing_len + 2);
}
}
}
// located with the shaft in +z, face on the XY plane
module nema17(depth = 23.5) {
face = 42.3;
screw_pitch = 31 / 2;
color(stock_color)
render()
difference() {
union() {
translate([-face/2, -face/2, -depth])
cube([face, face, depth]);
translate([0,0,-1]) {
cylinder(d=22, h=2+1);
cylinder(d=5, h=22+1);
}
}
translate([1.25, -5, 4])
cube([10, 10, 20]);
// screw holes
for (x = [-screw_pitch, screw_pitch],
y = [-screw_pitch, screw_pitch]) {
translate([x,y,-10])
cylinder(d=5,h=20);
}
}
}