Compare commits

..

No commits in common. "0cf6685eb9e5f23443c51265cb9a612b3d3fa4f8" and "ce505d83c6fc22e5ffe8eeda7a4a7ab823fdd35e" have entirely different histories.

18 changed files with 56571 additions and 149938 deletions

View File

@ -1,55 +0,0 @@
###################
#
# takeup module OpenSCAD Makefile
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
###################
PREFIX=takeup
OPENSCAD=openscad
OPENSCAD_OPTIONS=-D VERBOSE=false
OPENSCAD_IMAGE_OPTIONS=--imgsize=1024,1024 --colorscheme=DeepOcean --render
STL=./stl
IMG=./img
MODELS=$(shell bash ./parseVars.sh PART)
all: directories models
directories:
mkdir -p $(STL) $(IMG)
models: directories $(MODELS)
clean:
rm -f $(STL)/$(PREFIX)_*
rm -f $(IMG)/$(PREFIX)_*
cleanall:
rm -rf $(STL)
rm -rf $(IMG)
# Dependencies for models
$(MODELS) : $(STL)/$(PREFIX)_%.stl : $(PREFIX).scad
$(OPENSCAD) $(OPENSCAD_OPTIONS) -o $@ -D PART=\"$(subst $(PREFIX)_,,$(subst .stl,,$(@F)))\" $<
$(OPENSCAD) $(OPENSCAD_OPTIONS) $(OPENSCAD_IMAGE_OPTIONS) -o $(IMG)/$(subst $(STL),$(IMG)},$(subst .stl,.png,$(@F))) -D PART=\"$(subst $(PREFIX)_,,$(subst .stl,,$(@F)))\" $<

22
build.sh Normal file
View File

@ -0,0 +1,22 @@
#!/bin/bash
mkdir -p stl
mkdir -p img
SCAD="./takeup.scad"
PARTS=(
"slip_coupling"
"magnetic_coupling"
"mount_plate"
"daylight_spool_insert"
)
for part in "${PARTS[@]}"
do
stl="./stl/takeup_${part}.stl"
png="./img/takeup_${part}.png"
openscad -o "${stl}" -D "PART=\"${part}\";" "${SCAD}"
openscad -o "${png}" -D "PART=\"${part}\";" --imgsize=1024,1024 --colorscheme=DeepOcean "${SCAD}"
done
openscad --preview -o debug.png -D "PART=\"preview\";" "${SCAD}"

View File

@ -1,115 +0,0 @@
echo("common.scad - rounded_cube()");
module rounded_cube (cube_arr = [1, 1, 1], d = 0, center = false) {
off_x = 0;
off_y = 0;
r = d/2;
union () {
cube([cube_arr[0] - d, cube_arr[1], cube_arr[2]], center = center);
cube([cube_arr[0], cube_arr[1] - d, cube_arr[2]], center = center);
translate ([1 * (cube_arr[0] / 2) - r , 1 * (cube_arr[1] / 2)- r, 0]) cylinder(r = r, h = cube_arr[2], center = center);
translate ([-1 * (cube_arr[0] / 2) + r, -1 * (cube_arr[1] / 2) + r, 0]) cylinder(r = r, h = cube_arr[2], center = center);
translate ([1 * (cube_arr[0] / 2) - r, -1 * (cube_arr[1] / 2) + r, 0]) cylinder(r = r, h = cube_arr[2], center = center);
translate ([-1 * (cube_arr[0] / 2) + r, 1 * (cube_arr[1] / 2)- r, 0]) cylinder(r = r, h = cube_arr[2], center = center);
}
}
echo("common.scad - trap_cube()");
module trap_cube(height = 19, top_x = 30, top_y = 34, bottom_x = 45, bottom_y = 65, wall_thickness = 2) {
difference(){
hull(){
translate([0,0,height])
cube([top_x, top_y, 0.1], center=true);
cube([bottom_x, bottom_y, 0.1], center=true);
}
hull(){
translate([0,0,height])
cube([top_x - wall_thickness, top_y - wall_thickness, 0.1], center=true);
cube([bottom_x - wall_thickness, bottom_y - wall_thickness, 0.1], center=true);
}
}
}
echo("common.scad - R()");
function R (diameter) = diameter / 2.0;
echo("common.scad - m3_nut");
module m3_nut (H = 5) {
cylinder(r=R(6.6), h=H, center=true, $fn=6);
}
module opto_endstop(){
difference(){
union(){
// base PCB
color("green") cube([33.0,1.6,10.5]);
// add the switch module
translate([8.4,1.6,10.5/2-6.4/2]) optoswitch();
// connector
translate([0.2,-7,0]) color("white") cube([5.8,7,10.5]);
// led
translate([3.5,1.6,10.5/2-1.5/2]) color("red") cube([2,0.7,1.5]);
}
translate([8.4,0,10.5/2-6.4/2]) {
for ( hole = [2.75,24.5-2.75] ){
rotate([90,0,0]) translate([hole,6.4/2,-4]) cylinder(r=1.5, h=4.5,$fn=40);
}
}
}
}
// switch module
module optoswitch() {
difference(){
union (){
color("gray") cube([24.5,3.5,6.4]);
color("gray")translate([6.63,0,0]) cube([4.45,11.3,6.3]);
color("gray")translate([13.63,0,0]) cube([4.45,11.3,6.3]);
}
for ( hole = [2.75,24.5-2.75] ){
rotate([90,0,0]) translate([hole,6.4/2,-4]) cylinder(r=1.5, h=4.5,$fn=40);
}
}
}
module hex (diag = 10, h = 1) {
cylinder(r = diag / 2, h = h, center = true, $fn = 6);
}
//NEMA17 Stepper
module NEMA17 ( H = 33 ) { //alt = 47.5
difference () {
cube([42, 42, H], center = true);
for (i = [0 : 3]) {
rotate([0, 0, (i * 90) + 45]) translate([29.7, 0, 0]) cube([5.5, 5.5, H + 1], center = true);
}
translate([31/2, 31/2, (H/2)-1.9]) cylinder(r = R(3), h = 4, center = true, $fn=30);
translate([-31/2, 31/2, (H/2)-1.9]) cylinder(r = R(3), h = 4, center = true, $fn=30);
translate([31/2, -31/2, (H/2)-1.9]) cylinder(r = R(3), h = 4, center = true, $fn=30);
translate([-31/2, -31/2, (H/2)-1.9]) cylinder(r = R(3), h = 4, center = true, $fn=30);
}
//pad
translate([0, 0, (H/2) + (1.9/2)]) {
cylinder(r = R(22), h = 1.9, center = true, $fn = 100);
}
//shaft
translate([0, 0, (H/2) + (22.75/2)]) {
difference () {
cylinder(r = R(5), h = 22.75, center = true, $fn = 30);
translate([0, 4.5, 4.7]) cube([5, 5, 22.75], center = true);
}
}
}
//Geartisan Worm Gear Motor - JSX40-370
module geared_motor () {
cube([46, 32, 21], center = true);
translate([(46 / 2) + (30 / 2), 0, 1.5]) rotate([0, 90, 0]) cylinder(r = 24 / 2, h = 30, center = true, $fn = 80);
translate([-(46 / 2) + 14.5, 0, -18.5]) rotate([0, 0, 90]) motor_shaft();
//pad
translate([-(46 / 2) + 14.5, 0, -(1 / 2) - 10.5]) cylinder(r = 13 / 2, h = 1, center = true, $fn = 60);
//mount pads
translate([-0.5, 0, -(1.5 / 2) - 10.5]) motor_mounts();
}

BIN
debug.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 24 KiB

View File

@ -1,12 +0,0 @@
#!/bin/bash
STOPWORD="${1}"
FILE=$(mktemp)
TMPFILE=$(mktemp)
cat takeup.scad | grep -e "${STOPWORD} ==" | awk -F'== "' '{print $2}' | awk -F'"' '{print $1}' > ${TMPFILE}
cat ${TMPFILE} | sed 's/^/.\/stl\/takeup_/' | sed 's/$/.stl/' > ${FILE}
rm -f ${TMPFILE}
cat ${FILE} | tr '\n' ' '
rm -f ${FILE}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

18132
stl/takeup_magnetic_coupling.stl Normal file → Executable file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,3 @@
include <common.scad>;
include <daylight_spool_mount.scad>;
COUPLING_D = 37;
@ -17,6 +16,17 @@ module hex (diag = 10, h = 1) {
cylinder(r = diag / 2, h = h, center = true, $fn = 6);
}
//Geartisan Worm Gear Motor - JSX40-370
module motor () {
cube([46, 32, 21], center = true);
translate([(46 / 2) + (30 / 2), 0, 1.5]) rotate([0, 90, 0]) cylinder(r = 24 / 2, h = 30, center = true, $fn = 80);
translate([-(46 / 2) + 14.5, 0, -18.5]) rotate([0, 0, 90]) motor_shaft();
//pad
translate([-(46 / 2) + 14.5, 0, -(1 / 2) - 10.5]) cylinder(r = 13 / 2, h = 1, center = true, $fn = 60);
//mount pads
translate([-0.5, 0, -(1.5 / 2) - 10.5]) motor_mounts();
}
module motor_shaft () {
difference () {
cylinder(r = MOTOR_SHAFT_D / 2, h = MOTOR_SHAFT_H, center = true, $fn = 60);
@ -144,12 +154,12 @@ module mount_plate () {
//motor void (centered)
translate([7, 0, 0]) {
translate([-(46 / 2) + 15 + 1, 0, 0]) cylinder(r = 15 / 2, h = 20, center = true, $fn = 60);
translate([(MOTOR_MOUNT_X / 2)+1, (MOTOR_MOUNT_Y / 2), 0]) motor_mount_void(D, Z);
translate([-(MOTOR_MOUNT_X / 2)+1, (MOTOR_MOUNT_Y / 2), 0]) motor_mount_void(D, Z);
translate([(MOTOR_MOUNT_X / 2)+1, -(MOTOR_MOUNT_Y / 2), 0]) motor_mount_void(D, Z);
translate([-(MOTOR_MOUNT_X / 2)+1, -(MOTOR_MOUNT_Y / 2), 0]) motor_mount_void(D, Z);
translate([MOTOR_MOUNT_X / 2, MOTOR_MOUNT_Y / 2, 0]) motor_mount_void(D, Z);
translate([-MOTOR_MOUNT_X / 2, MOTOR_MOUNT_Y / 2, 0]) motor_mount_void(D, Z);
translate([MOTOR_MOUNT_X / 2, -MOTOR_MOUNT_Y / 2, 0]) motor_mount_void(D, Z);
translate([-MOTOR_MOUNT_X / 2, -MOTOR_MOUNT_Y / 2, 0]) motor_mount_void(D, Z);
translate([-8 + 12.5 + 1, 0, 0]) cube([7.5, 17, Z], center = true);
translate([-8 + 12.5, 0, 0]) cube([7.5, 17, Z], center = true);
}
translate([MOUNT_X / 2, MOUNT_Y / 2, 0]) mount_plate_void();
@ -182,9 +192,9 @@ module minimal_mount () {
}
module debug_assembled () {
translate([(46 / 2) - 14.5, 0, 0]) rotate([180, 0, 0]) geared_motor();
color("green") translate([0, 0, 11]) mount_plate();
color("blue") translate([0, 0, 23]) rotate([0, 0, -90]) //magnetic_coupling();
translate([(46 / 2) - 14.5, 0, 0]) rotate([180, 0, 0]) motor();
color("green") translate([1, 0, 11]) mount_plate();
color("blue") translate([0, 0, 23]) rotate([0, 0, -90]) magnetic_coupling();
difference () {
translate([0, 0, 26.5]) slip_coupling();
translate([-50, 0, 0]) cube([100, 100, 150], center = true);
@ -192,19 +202,18 @@ module debug_assembled () {
color("red") translate([0, 0, 34]) daylight_spool_insert();
}
PART = "mount_plate";
PART = "magnetic_coupling";
if (PART == "slip_coupling") {
slip_coupling();
} else if (PART == "magnetic_coupling") {
magnetic_coupling();
} else if (PART == "mount_plate") {
//42x42 M4 mounting holes
mount_plate();
} else if (PART == "daylight_spool_insert") {
daylight_spool_insert();
} else if (PART == "minimal_mount") {
minimal_mount();
} else if (PART == "debug") {
debug_assembled();
} else if (PART == "minimal_mount") {
minimal_mount();
}