Skip to content

Commit

Permalink
initial import from sources
Browse files Browse the repository at this point in the history
  • Loading branch information
beckdac committed Jul 18, 2015
1 parent 4a6f75e commit dd48f8c
Show file tree
Hide file tree
Showing 6 changed files with 406 additions and 0 deletions.
31 changes: 31 additions & 0 deletions Bearing_6807-2RS.scad
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// Values from http://www.astbearings.com/product.html?product=6807-2RS
bearing6807_2RS_rs = 1.2; // lip width
bearing6807_2RS_d = 35; // ID
bearing6807_2RS_D = 47; // OD
bearing6807_2RS_B = 7; // width

module bearing6807_2RS() {
rs = bearing6807_2RS_rs;
d = bearing6807_2RS_d;
D = bearing6807_2RS_D;
B = bearing6807_2RS_B;
//render(convexity = 3)
translate([0, 0, B / 2])
union() {
// outer lip
difference() {
cylinder(h = B, d = D, center = true);
cylinder(h = B, d = D - rs, center = true);
}
// inner lip
difference() {
cylinder(h = B, d = d + rs, center = true);
cylinder(h = B, d = d, center = true);
}
// race
difference() {
cylinder(h = B - (rs * 2), d = D, center = true);
cylinder(h = B - (rs * 2), d = d, center = true);
};
}
}
20 changes: 20 additions & 0 deletions Hub_28BYJ-48.scad
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Hub for 28BYJ-48 stepper motor w/ set screw
// Example for 3mm set screw:
//stepperHub(10, 7, 6, 3.1, 1.5, 2.75);
module stepperHub(height, radius, shaftHeight, shaftRadius, setScrewRadius, setScrewHeight) {
//render(convexity = 3)
difference() {
// hub
cylinder(h = height, r = radius, center = false);
// shaft
intersection() {
cylinder(h = shaftHeight, r = shaftRadius, center = false);
translate([-shaftRadius, -shaftRadius/2, 0])
cube(size = [shaftRadius * 2., shaftRadius, shaftHeight], center = false);
}
// set screw hole
translate([0, 0, setScrewHeight])
rotate([90, 0, 0])
cylinder(h = (radius * 2) + radius, r = setScrewRadius, center = true);
}
}
24 changes: 24 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Copyright (c) 2014, beckdac
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# SCARA
====
Ultra low cost 3D printable SCARA arm
227 changes: 227 additions & 0 deletions SCARA.scad
Original file line number Diff line number Diff line change
@@ -0,0 +1,227 @@
use <StepMotor_28BYJ-48.scad>;
use <Hub_28BYJ-48.scad>;
include <Bearing_6807-2RS.scad>;

// global rendering parameters
$fn = 24;

// library examples
// translate([100, 100, 10]) { StepMotor28BYJ(); }
// stepperHub(10, 7, 6, 3.1, 1.5, 2.75);
//translate([0, 0, 8]) bearing6807_2RS();
// bearingInnerStep(bearing6807_2RS_d - iFitAdjust, 2, 2);
//shoulderBase(2, 55, 9.1, 3.1);

// interference fit adjustment for 3D printer
iFitAdjust = .6;

// size in mm of bearing interface step
bearingStep = 2;

// shoulder base parameters
shoulderBaseHeight = 3;
shoulderBaseDiameter = 55;
shaftBossDiameter = 9.1;
mountScrewDiameter = 3.1;
bearingStep = 2;
// joint parameters
hubHeight = 10;
hubRadius = 7;
shaftHeight = 6;
shaftRadius = 3.1;
setScrewRadius = 1.5;
setScrewHeight = 2.75;
spokeWidth = 3;
spokes = 6;
screwTabs = 4;
screwTabHeight = 4;
armLength = 200;

/* Pieces in this model
** Shoulder:
*** Base plate
*** Top plate
*** Lower arm
*** Upper arm
** Forearm:
*** ?
** Hand:
*** ?
*/

// shoulder base
color([.7, .7, 1]) shoulderBase(shoulderBaseHeight, shoulderBaseDiameter, shaftBossDiameter, mountScrewDiameter);
// shoulder stepper
rotate([0, 180, 0]) translate([-8, 0, 10]) StepMotor28BYJ();
// lower shoulder bearing
translate([0, 0, shoulderBaseHeight + bearingStep]) %bearing6807_2RS();
// shoulder - arm joint
color([1, .7, .7]) translate([0, 0, shoulderBaseHeight + 7]) armLower(bearing6807_2RS_D + iFitAdjust, bearingStep, bearingStep, hubHeight, hubRadius, shaftHeight, shaftRadius, setScrewRadius, setScrewHeight, spokeWidth, spokes, screwTabs, screwTabHeight, armLength);

//bearingInnerStep(bearing6807_2RS_d - iFitAdjust, 2, 2);
module bearingInnerStep(bearingID, stepHeight, stepWidth) {
difference() {
union() {
// this fits inside of the bearing
cylinder(h = stepHeight * 2, d = bearingID);
// this rests on the bearing inner lip
cylinder(h = stepHeight, d = bearingID + stepWidth);
}
// remove center
cylinder(h = stepHeight * 2, d = bearingID - (stepWidth * 2));
}
}

//translate([0, 0, 12]) bearingOuterStep(bearing6807_2RS_D + iFitAdjust, 2, 2);
module bearingOuterStep(bearingOD, stepHeight, stepWidth) {
//render(convexivity = 3)
difference() {
cylinder(h = stepHeight * 2, d = bearingOD + stepWidth);
cylinder(h = stepHeight * 2, d = bearingOD - stepWidth);
cylinder(h = stepHeight, d = bearingOD);
}
}

//shoulderBase(2, 55, 9.1, 3.1);
// WARNING: has some hard-coded non-parametric values in here!
module shoulderBase(shoulderBaseHeight, shoulderBaseDiameter, shaftBossDiameter, mountScrewDiameter) {
mountHoleDepth = shoulderBaseHeight;
// hardcoded values should be moved out
baseDeckExtension = 50;
// 8 is distance from shaft center to screw center on x axis
// 35 is screw center to screw center on y axis
shaftCenterToMountHoldCenterXAxis = 8;
mountHoleCenterToMountHoleCenter = 35;
leadScrewDiameter = 8;
// end
//render(convexivity = 3)
difference() {
union () {
cylinder(h = shoulderBaseHeight, d = shoulderBaseDiameter);
translate([0, 0, shoulderBaseHeight])
bearingInnerStep(bearing6807_2RS_d - iFitAdjust, bearingStep, bearingStep);
// 40 is the length of deck extension from the baseplate in x
translate([0, -shoulderBaseDiameter / 2, 0])
cube([baseDeckExtension, shoulderBaseDiameter, shoulderBaseHeight], center = false);
}
// motor shaft hole
cylinder(h = shoulderBaseHeight + (bearingStep * 2), d = shaftBossDiameter);
// mounting holes

translate([shaftCenterToMountHoldCenterXAxis, mountHoleCenterToMountHoleCenter/2, 0])
cylinder(h = mountHoleDepth, d = mountScrewDiameter);
translate([shaftCenterToMountHoldCenterXAxis, -mountHoleCenterToMountHoleCenter/2, 0])
cylinder(h = mountHoleDepth, d = mountScrewDiameter);
// lead screw hole
translate([baseDeckExtension - (leadScrewDiameter * 1.5), 0, 0])
cylinder(h = shoulderBaseHeight, d = leadScrewDiameter + (leadScrewDiameter / 2));
}
// NOTE: need to add LM8UU mounts
}



module armLower(bearingOD, stepHeight, stepWidth, hubHeight, hubRadius, shaftHeight, shaftRadius, setScrewRadius, setScrewHeight, spokeWidth, spokes, screwTabs, screwTabHeight, armLength) {
boundingBox = 12;
boundingBoxHalf = boundingBox / 2;
//
armWidth = bearingOD + bearingStep;
//render(convexivity = 3)
union() {
armInnerJoint(bearingOD, bearingStep, bearingStep, hubHeight, hubRadius, shaftHeight, shaftRadius, setScrewRadius, setScrewHeight, spokeWidth, spokes, screwTabs, screwTabHeight);
//translate([-armLength, 0, 2 * bearingStep])
// rotate([180, 0, 0])
// armInnerJoint(bearingOD, bearingStep, bearingStep, hubHeight, hubRadius, shaftHeight, shaftRadius, setScrewRadius, setScrewHeight, spokeWidth, spokes, screwTabs, screwTabHeight);
difference() {
translate([-armLength, -armWidth / 2, 0])
cube([armLength, armWidth, bearingStep * 2], center=false);
cylinder(h = bearingStep * 2, d = bearingOD);
translate([-armLength, 0, 0])
cylinder(h = bearingStep * 2, d = bearingOD);
translate([-armLength + (bearingOD / 2) + (boundingBox / 2), -(armWidth / 2) + boundingBoxHalf, 0])
cube([armLength - bearingOD - boundingBox, armWidth - boundingBox, bearingStep * 2], center = false);
}
difference() {
intersection() {

translate([-armLength + (bearingOD / 2) + (boundingBox / 2), -(armWidth / 2) + boundingBoxHalf, 0])
cube([armLength - bearingOD - boundingBox, armWidth - boundingBox, bearingStep * 2], center = false);
for (i = [ bearingOD / 2 : armWidth / 2 : armLength]) {
translate([ -i, 0, bearingStep])
rotate([0, 0, 45])
cube([spokeWidth, armWidth + boundingBoxHalf, bearingStep * 2], center = true);
translate([ -i, 0, bearingStep])
rotate([0, 0, -45])
cube([spokeWidth, armWidth + boundingBoxHalf, bearingStep * 2], center = true);
}
}
}
/*
difference() {
linear_extrude(height = bearingStep * 2, center = false, convexivity = 10, twist = 0)
polygon(points = [ [0, -armWidth/2], [0, armWidth/2], [-armLength, armWidth/2], [-armLength, -armWidth/2] ]);
cylinder(h = bearingStep * 2, d = bearingOD);
translate([-armLength + boundingBox, -(armWidth / 2) + boundingBoxHalf, 0])
cube([armLength - boundingBox, armWidth - boundingBox, bearingStep * 2], center = false);
translate([-armLength, 0, 0])
cylinder(h = bearingStep * 2, d = bearingOD);
}
intersection() {
translate([-armLength + bearingOD / 2, -(armWidth / 2) + boundingBoxHalf, 0])
cube([armLength - bearingOD - boundingBox, armWidth - boundingBox, bearingStep * 2], center = false);
for (i = [ bearingOD / 2 : armWidth / 2 : armLength]) {
translate([ -i, 0, bearingStep])
rotate([0, 0, 45])
cube([spokeWidth, armWidth + boundingBoxHalf, bearingStep * 2], center = true);
translate([ -i, 0, bearingStep])
rotate([0, 0, -45])
cube([spokeWidth, armWidth + boundingBoxHalf, bearingStep * 2], center = true);
}
}
*/

}
}

//armInnerJoint(bearing6807_2RS_D + iFitAdjust, bearingStep, bearingStep, hubHeight, hubRadius, shaftHeight, shaftRadius, setScrewRadius, setScrewHeight, spokeWidth, spokes, screwTabs, screwTabHeight);
module armInnerJoint(bearingOD, stepHeight, stepWidth, hubHeight, hubRadius, shaftHeight, shaftRadius, setScrewRadius, setScrewHeight, spokeWidth, spokes, screwTabs, screwTabHeight) {
//translate([0, 0, hubHeight - (2 * stepHeight)])
union() {
bearingOuterStep(bearingOD, stepHeight, stepWidth);
// hub
translate([0, 0, -(hubHeight - (2 * stepHeight))])
stepperHub(hubHeight, hubRadius, shaftHeight, shaftRadius, setScrewRadius, setScrewHeight);
// spokes
radial_array(vec=[0, 0, 1], n = spokes)
translate([hubRadius - (stepWidth / 2), -(spokeWidth / 2), stepHeight])
cube([(bearingOD / 2) - hubRadius, spokeWidth, stepHeight], center = false);
// screw holes for joining to upper
radial_array(vec = [0, 0, 1], n = screwTabs)
translate([bearingOD / 2 + (setScrewRadius * 2), 0, (2 * stepHeight) - screwTabHeight])
difference() {
union () {
cylinder(h = screwTabHeight, r = setScrewRadius * 2);
translate([-2 * setScrewRadius, - 2 * setScrewRadius, 0])
cube([setScrewRadius * 2, 4 * setScrewRadius, screwTabHeight], center = false);
}
cylinder(h = screwTabHeight, r = setScrewRadius);
}
}
}


module copy_mirror(vec=[0,1,0]) {
children();
mirror(vec)
children();
}

module radial_array(vec = [0,0,1], n = 4) {
for ( i = [0 : n - 1] )
{
rotate( i * 360 / n, vec)
children();
}
}
Loading

0 comments on commit dd48f8c

Please sign in to comment.