1
0
mirror of https://github.com/nophead/Mendel90.git synced 2025-09-03 10:02:51 +02:00

first commit

This commit is contained in:
Chris Palmer
2012-03-12 01:13:07 +00:00
commit d22174869f
68 changed files with 90115 additions and 0 deletions

148
scad/conf/config.scad Normal file
View File

@@ -0,0 +1,148 @@
//
// Mendel90
//
// GNU GPL v2
// nop.head@gmail.com
// hydraraptor.blogspot.com
//
// Configuration file
//
bom = 2; // 0 no bom, 1 assemblies and stls, 2 vitamins as well
exploded = false; // true for exploded view
eta = 0.01; // small fudge factor to stop CSG barfing on coincident faces.
$fa = 5;
$fs = 0.5;
//
// Hole sizes
//
No2_pilot_radius = 1.7 / 2; // self tapper into ABS
No4_pilot_radius = 2.0 / 2; // wood screw into soft wood
No6_pilot_radius = 2.0 / 2; // wood screw into soft wood
No2_clearance_radius = 2.5 / 2;
No4_clearance_radius = 3.5 / 2;
No6_clearance_radius = 4.0 / 2;
M2p5_tap_radius = 2.05 / 2;
M2p5_clearance_radius= 2.8 / 2; // M2.5
M3_tap_radius = 2.5 / 2;
M3_clearance_radius = 3.3 / 2;
M3_nut_radius = 6.5 / 2;
M3_nut_trap_depth = 3;
M4_tap_radius = 3.3 / 2;
M4_clearance_radius = 2.2;
M4_nut_radius = 8.2 / 2;
M4_nut_trap_depth = 4.5;
M6_tap_radius = 5 / 2;
M6_clearance_radius = 6.4 / 2;
M6_nut_radius = 11.6 / 2;
M6_nut_depth = 5;
M8_tap_radius = 6.75 / 2;
M8_clearance_radius = 8.4 / 2;
M8_nut_radius = 15.4 / 2;
M8_nut_depth = 6.5;
layer_height = 0.4;
filament_width = layer_height * 1.5;
min_wall = 2 * filament_width + eta;
pcb_thickness = 1.6;
include <utils.scad>
include <vitamins.scad>
endstop_wires = [2, 1.4, "A"]; // 7 strands of 0.2
motor_wires = [4, 1.4, "B"];
bed_wires = [2, 2.8, "C"]; // 13A mains cable
fan_motor_wires = [6, 1.4, "D"]; // fan and motor wires along top of gantry
thermistor_wires = endstop_wires;
endstop_wires_hole_radius = wire_hole_radius(endstop_wires);
motor_wires_hole_radius = wire_hole_radius(motor_wires);
fan_motor_wires_hole_radius = wire_hole_radius(fan_motor_wires);
bed_wires_hole_radius = wire_hole_radius(bed_wires);
thermistor_wires_hole_radius = wire_hole_radius(thermistor_wires);
include <machine.scad> // this file is generated from the command line parameter to include one of the machine configs
screw_clearance_radius = screw_clearance_radius(cap_screw);
nut = screw_nut(cap_screw);
nut_radius = nut_radius(nut);
nut_trap_depth = nut_trap_depth(nut);
washer = screw_washer(cap_screw);
bearing_clamp_tab = washer_diameter(washer) + 2; // how much the lugs stick out and their width
bearing_clamp_tab_height = 4; // thickness of the lugs
hole_edge_clearance = 5; // how close a hole can be to the edge of a sheet
base_clearance = 2; // how close we get to the edge of the base
axis_endstop_clearance = 2; // how close we get to the end of an axis
X_carriage_clearance = 2; // how close the X carriage is to the XZ plane
// how close the Y carriage is to the window in the XZ plane
Y_carriage_clearance = 2 + bulldog_handle_length(small_bulldog) - (Y_carriage_width - bed_width) / 2;
Z_clearance = 10; // How close the top of the object gets to the gantry
belt_clearance = 0.2; // clearance of belt clamp slots
pulley_inner_radius = (14.4 / 2) - belt_thickness(T5x6); // measured from outer diameter
X_bar_dia = X_bearings[2]; // rod sizes to match the bearings
Y_bar_dia = Y_bearings[2];
Z_bar_dia = Z_bearings[2];
Y_idler_bearing = BB624;
X_idler_bearing = BB624;
extruder_ways = 4 + 4 + 2 + 1 + 1; // motor + heater(x2) + thermistor + probe + fan = 12
x_end_ways = extruder_ways + 4 + 2 + 2; // motor plus limit switch and two guards = 20
bed_ways = 20 + 2; // ten each way for the current plus a thermistor
function z_bar_offset() = round(NEMA_width(Z_motor)) / 2;
base_screw = sheet_is_soft(base) ? frame_soft_screw : frame_thick_screw;
base_screw_length = screw_shorter_than(sheet_thickness(base) + 5 + 2 * washer_thickness(screw_washer(base_screw)));
base_clip_screw = base_screw;
base_clip_screw_length = base_screw_length;
frame_screw = sheet_is_soft(frame) ? frame_soft_screw : frame_nuts ? frame_thin_screw : frame_thick_screw;
frame_clip_screw = frame_screw;
frame_screw_length = frame_nuts ? screw_longer_than(sheet_thickness(frame) + 5 + 2 * washer_thickness(screw_washer(frame_screw)) +
nut_thickness(screw_nut(frame_screw), true))
: screw_shorter_than(sheet_thickness(frame) + 5 + 2 * washer_thickness(screw_washer(frame_screw)));
frame_clip_screw_length = frame_screw_length;
echo("base screw length", base_screw_length);
echo("frame screw length",frame_screw_length);
module frame_screw(thickness) {
screw_and_washer(frame_screw, frame_screw_length, !frame_nuts);
if(frame_nuts)
translate([0, 0, -sheet_thickness(frame) - thickness])
rotate([180, 0, 0])
nut_and_washer(screw_nut(frame_screw), true);
}
module frame_screw_hole() {
cylinder(r = frame_nuts ? screw_clearance_radius(frame_screw) :
screw_pilot_hole(frame_screw), h = 100, center = true);
}
module base_screw() {
screw_and_washer(base_screw, base_screw_length, true);
}
module base_screw_hole() {
cylinder(r = screw_pilot_hole(base_screw), h = 100, center = true);
}
bar_clamp_depth = 4 + washer_diameter(screw_washer(base_screw)); // how thick the bar clamps are
bar_clamp_tab = 3 + washer_diameter(screw_washer(base_screw)); // how much the lugs stick out
bar_clamp_band = 3; // the thickness of the strap that clamps the bar.

View File

@@ -0,0 +1,73 @@
//
// Mendel90
//
// GNU GPL v2
// nop.head@gmail.com
// hydraraptor.blogspot.com
//
// Configuration file
//
echo("Huxley:");
Z_bearings = LM6UU;
Y_bearings = LM6UU;
X_bearings = LM6UU;
X_motor = NEMA14;
Y_motor = NEMA14;
Z_motor = NEMA14;
X_travel = 140;
Y_travel = 140;
Z_travel = 110;
bed_depth = 150;
bed_width = 150;
bed_pillars = M3x20_pillar;
bed_thickness = 1.6 + sheet_thickness(glass); // PCB heater plus glass sheet
bed_holes = 146;
base = PMMA10; // Sheet material used for the base. Needs to be thick enough to screw into.
base_corners = 50;
frame = PMMA6;
frame_corners = 25;
frame_nuts = false;
case_fan = fan80x38;
single_piece_frame = true;
stays_from_window = false;
Y_carriage = PMMA6;
extruder_width = 30; // actually 28 but offset
nozzle_x_offset = 16; // offset from centre of the extruder
nozzle_length = 50; // from base of extruder to nozzle tip
X_belt = T5x6;
Y_belt = T5x6;
motor_shaft = 5;
Z_screw_dia = 6; // Studding for Z axis
Y_carriage_depth = bed_depth + 10;
Y_carriage_width = bed_width + 10;
Z_nut_radius = M6_nut_radius;
Z_nut_depth = M6_nut_depth;
Z_nut = M6_nut;
//
// Default screw use where size doesn't matter
//
cap_screw = M3_cap_screw;
hex_screw = M3_hex_screw;
//
// Screw for the frame and base
//
frame_soft_screw = No4_screw; // Used when sheet material is soft, e.g. wood
frame_thin_screw = M3_cap_screw; // Used with nuts when sheets are thin
frame_thick_screw = M3_pan_screw; // Used with tapped holes when sheets are thick and hard, e.g. plastic or metal
//
// Feature sizes
//
default_wall = 3;
thick_wall = 3;

View File

@@ -0,0 +1,76 @@
//
// Mendel90
//
// GNU GPL v2
// nop.head@gmail.com
// hydraraptor.blogspot.com
//
// Configuration file
//
echo("Mendel:");
Z_bearings = LM8UU;
Y_bearings = LM8UU;
X_bearings = LM8UU;
X_motor = NEMA17;
Y_motor = NEMA17;
Z_motor = NEMA17;
X_travel = 200;
Y_travel = 200;
Z_travel = 140;
bed_depth = 214;
bed_width = 214;
bed_pillars = M3x20_pillar;
bed_thickness = 1.6 + sheet_thickness(glass); // PCB heater plus glass sheet
bed_holes = 209;
base = PMMA10; // Sheet material used for the base. Needs to be thick enough to screw into.
base_corners = 50;
frame = PMMA6;
frame_corners = 25;
frame_nuts = false;
case_fan = fan80x38;
psu = KY240W;
single_piece_frame = true;
stays_from_window = false;
Y_carriage = PMMA6;
extruder_width = 30; // actually 28 but offset
nozzle_x_offset = 16; // offset from centre of the extruder
nozzle_length = 50; // from base of extruder to nozzle tip
X_belt = T5x6;
Y_belt = T5x6;
motor_shaft = 5;
Z_screw_dia = 8; // Studding for Z axis
Y_carriage_depth = bed_depth + 10;
Y_carriage_width = bed_width + 10;
Z_nut_radius = M8_nut_radius;
Z_nut_depth = M8_nut_depth;
Z_nut = M8_nut;
//
// Default screw use where size doesn't matter
//
cap_screw = M3_cap_screw;
hex_screw = M3_hex_screw;
//
// Screw for the frame and base
//
frame_soft_screw = No6_screw; // Used when sheet material is soft, e.g. wood
frame_thin_screw = M4_cap_screw; // Used with nuts when sheets are thin
frame_thick_screw = M4_pan_screw; // Used with tapped holes when sheets are thick and hard, e.g. plastic or metal
//
// Feature sizes
//
default_wall = 3;
thick_wall = 4;

48
scad/conf/positions.scad Normal file
View File

@@ -0,0 +1,48 @@
//
// Mendel90
//
// GNU GPL v2
// nop.head@gmail.com
// hydraraptor.blogspot.com
//
// Work out the positions and size of things
//
use <y-motor-bracket.scad>
use <x-carriage.scad>
use <x-end.scad>
Y_carriage_height = y_motor_bracket_height() + X_carriage_clearance + sheet_thickness(Y_carriage) / 2;
bed_height = Y_carriage_height + sheet_thickness(Y_carriage) / 2 + pillar_height(bed_pillars) + washer_thickness(M3_washer) + bed_thickness;
Z0 = floor(bed_height + nozzle_length - x_carriage_offset());
height = Z0 + Z_travel + x_end_height() + bar_clamp_depth + axis_endstop_clearance + base_clearance;
gantry_thickness = height - max(bed_height + Z_travel + Z_clearance, Y_carriage_depth + 1);
gantry_setback = X_carriage_clearance + x_carriage_width() / 2;
Z_bar_spacing = X_travel + x_carriage_length() + 2 * (axis_endstop_clearance + Z_bearings[1] / 2);
base_width = base_clearance - x_idler_overhang() + Z_bar_spacing -x_motor_overhang() + base_clearance;
base_depth = Y_travel + Y_carriage_depth + 2 * base_clearance + 2 * axis_endstop_clearance;
window_width = Y_carriage_width + Y_carriage_clearance * 2;
stay_depth = stays_from_window ? window_width / 2 : base_depth / 2 - (gantry_setback + sheet_thickness(frame));
stay_height = single_piece_frame && !stays_from_window ? height : height - gantry_thickness - 1;
idler_end = -base_width / 2 + base_clearance - x_idler_overhang();
motor_end = base_width / 2 - base_clearance + x_motor_overhang();
X_origin = (idler_end + motor_end) / 2 + nozzle_x_offset;
left_w = (base_width - window_width)/2 + X_origin;
right_w = (base_width - window_width)/2 - X_origin;
Y_belt_height = y_motor_height() + pulley_inner_radius + belt_thickness(Y_belt);
Y_bar_height = Y_belt_height;
Y_belt_clamp_height = Y_carriage_height - Y_belt_height - sheet_thickness(Y_carriage) / 2;
Y_bearing_holder_height = Y_carriage_height - Y_bar_height - sheet_thickness(Y_carriage) / 2;

View File

@@ -0,0 +1,76 @@
//
// Mendel90
//
// GNU GPL v2
// nop.head@gmail.com
// hydraraptor.blogspot.com
//
// Configuration file
//
echo("Sturdy:");
Z_bearings = LM10UU;
Y_bearings = LM10UU;
X_bearings = LM10UU;
X_motor = NEMA17;
Y_motor = NEMA17;
Z_motor = NEMA17;
X_travel = 214;
Y_travel = 218;
Z_travel = 150;
bed_depth = 214;
bed_width = 214;
bed_pillars = M3x20_pillar;
bed_thickness = 1.6 + sheet_thickness(glass); // PCB heater plus glass sheet
bed_holes = 209;
base = MDF12;
base_corners = 0;
frame = MDF12;
frame_corners = 0;
frame_nuts = false;
case_fan = fan80x38;
psu = KY240W;
single_piece_frame = true;
stays_from_window = false;
Y_carriage = DiBond;
extruder_width = 30; // actually 28 but offset
nozzle_x_offset = 16; // offset from centre of the extruder
nozzle_length = 50; // from base of extruder to nozzle tip
X_belt = T5x6;
Y_belt = T5x6;
motor_shaft = 5;
Z_screw_dia = 8; // Studding for Z axis
Y_carriage_depth = bed_depth + 10;
Y_carriage_width = bed_width + 10;
Z_nut_radius = M8_nut_radius;
Z_nut_depth = M8_nut_depth;
Z_nut = M8_nut;
//
// Default screw use where size doesn't matter
//
cap_screw = M4_cap_screw;
hex_screw = M4_hex_screw;
//
// Screw for the frame and base
//
frame_soft_screw = No6_screw; // Used when sheet material is soft, e.g. wood
frame_thin_screw = M4_cap_screw; // Used with nuts when sheets are thin
frame_thick_screw = M4_pan_screw; // Used with tapped holes when sheets are thick and hard, e.g. plastic or metal
//
// Feature sizes
//
default_wall = 4;
thick_wall = 4;

119
scad/conf/utils.scad Normal file
View File

@@ -0,0 +1,119 @@
//
// Mendel90
//
// GNU GPL v2
// nop.head@gmail.com
// hydraraptor.blogspot.com
//
// Utilities
//
include <../utils/bom.scad>
include <../utils/polyholes.scad>
include <../utils/teardrops.scad>
include <../utils/cables.scad>
module slot(h, r, l, center = true)
linear_extrude(height = h, convexity = 6, center = center)
hull() {
translate([l/2,0,0])
circle(r = r, center = true);
translate([-l/2,0,0])
circle(r = r, center = true);
}
module nut_trap(screw_r, nut_r, depth, horizontal = false) {
union() {
if(horizontal) {
teardrop_plus(r = screw_r, h = 200, center = true);
cylinder(r = nut_r + layer_height / 4, h = depth * 2, center = true, $fn = 6);
}
else {
poly_cylinder(r = screw_r, h = 200, center = true);
cylinder(r = nut_r, h = depth * 2, center = true, $fn = 6);
}
}
}
module fillet(r, h) {
translate([r / 2, r / 2, 0])
difference() {
cube([r + eta, r + eta, h], center = true);
translate([r/2, r/2, 0])
cylinder(r = r, h = h + 1, center = true);
}
}
module right_triangle(width, height, h, center = true) {
linear_extrude(height = h, center = center)
polygon(points = [[0,0], [width, 0], [0, height]]);
}
module rounded_square(w, h, r)
{
union() {
square([w - 2 * r, h], center = true);
square([w, h - 2 * r], center = true);
for(x = [-w/2 + r, w/2 - r])
for(y = [-h/2 + r, h/2 - r])
translate([x, y])
circle(r = r);
}
}
module rounded_rectangle(size, r, center = true)
{
w = size[0];
h = size[1];
linear_extrude(height = size[2], center = center)
rounded_square(size[0], size[1], r);
}
//
// Cylinder with rounded ends
//
module rounded_cylinder(r, h, r2)
{
rotate_extrude()
union() {
square([r - r2, h]);
square([r, h - r2]);
translate([r - r2, h - r2])
circle(r = r2);
}
}
module sector(r, a, h, , center = true) {
linear_extrude(height = h, center = center)
intersection() {
circle(r = r, center = true);
polygon(points = [
[0, 0],
[2 * r * cos(a / 2), 2 * r * sin(a / 2)],
[2 * r * cos(a / 2), -2 * r * sin(a / 2)],
]);
}
}
module tube(or, ir, h, center = true) {
difference() {
cylinder(r = or, h = h, center = center);
cylinder(r = ir, h = h + 1, center = center);
}
}
//
// Exploded view helper
//
module explode(v, offset = [0,0,0]) {
if(exploded) {
translate(v)
child();
render() hull() {
sphere(0.2);
translate(v + offset)
sphere(0.2);
}
}
else
child();
}

48
scad/conf/vitamins.scad Normal file
View File

@@ -0,0 +1,48 @@
//
// Mendel90
//
// GNU GPL v2
// nop.head@gmail.com
// hydraraptor.blogspot.com
//
// Off the shelf parts
//
include <../vitamins/washers.scad>
include <../vitamins/nuts.scad>
include <../vitamins/screws.scad>
include <../vitamins/microswitch.scad>
include <../vitamins/stepper-motors.scad>
include <../vitamins/ball-bearings.scad>
include <../vitamins/linear-bearings.scad>
include <../vitamins/pillars.scad>
include <../vitamins/belts.scad>
include <../vitamins/sheet.scad>
include <../vitamins/springs.scad>
include <../vitamins/d-connectors.scad>
include <../vitamins/ziptie.scad>
include <../vitamins/bulldog.scad>
include <../vitamins/cable_strip.scad>
include <../vitamins/fans.scad>
include <../vitamins/electronics.scad>
module rod(d , l) {
vitamin(str("RD", d, round(l), ": Smooth rod ", d, " x ", round(l)));
color([0.8,0.8,0.8])
cylinder(r = d / 2, h = l, center = true);
}
module studding(d , l) {
vitamin(str("ST", d, round(l),": Threaded rod ", d, " x ", round(l)));
color([0.5,0.5,0.5])
cylinder(r = d / 2, h = l, center = true);
}
module tubing(od, id, length) {
vitamin(str("TB", od, id, length,": Tubing OD ",od, " ID ", id," x ",length));
color([0.8, 0.8, 0.8, 0.75]) render() difference() {
cylinder(r = od / 2, h = length, center = true);
cylinder(r = id / 2, h = length + 1, center = true);
}
}