123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388 |
-
- // #######################################################
- // ################## Config Parameters ##################
- // #######################################################
-
- slot = 30; // or 20
- slot_off = 1; // distance between adjacent slots
-
- // print area / volume
- heatbed_width = 400;
- heatbed_length = 400;
-
- heatbed_height = 6;
-
- // distance between heatbed edge and inner t-slot frame edge
- frame_off_x = 20;
- frame_off_y = 20;
-
- outer_width = heatbed_width + (2 * (slot + frame_off_x));
- outer_length = heatbed_length + (2 * (slot + frame_off_y));
-
- // TODO depend on print area height
- outer_height = 500;
-
- // display heatbed centered in print volume
- bed_draw_height = (outer_height - heatbed_height) / 2;
-
- echo(print_x=heatbed_width, print_y=heatbed_length);
- echo(frame_x=outer_width, frame_y=outer_length, frame_z=outer_height);
-
- // #######################################################
- // ###################### Libraries ######################
- // #######################################################
-
- include <lib/tslot_xy.scad>
- include <lib/nema.scad>
- include <lib/Belt_Generator.scad>
- include <lib/Pulley_T-MXL-XL-HTD-GT2_N-tooth.scad>
- include <lib/bearing_idler.scad>
- include <lib/rail_mount.scad>
- include <lib/linear_bearing.scad>
-
- module gt2_belt(length) {
- difference() {
- belting("straight", "GT2_2mm", belt_length = length);
- translate([-5, -5, 6])
- cube([length + 10, 10, 10]);
- }
- }
-
- // #######################################################
- // ######################## Frame ########################
- // #######################################################
-
- module slot_angle_connector() {
- color("gray")
- translate([slot, 0, 0])
- rotate([0, -90, 0])
- difference() {
- cube([slot, slot, slot]);
- translate([0, -5, 0])
- rotate([0, 45, 0])
- cube([2 * slot, 2 * slot, 2 * slot]);
- }
- }
-
- module foot() {
- color("yellow")
- translate([0, 0, 10])
- cylinder(d = 6, h = 20);
-
- color("yellow")
- difference() {
- sphere(d = 20);
- translate([-15, -15, -30])
- cube([30, 30, 30]);
- }
- }
-
- module lower_frame(double) {
- // bottom frame
- translate([slot + slot_off, 0, 0])
- tslot_x(slot, outer_width - (2 * (slot + slot_off)));
-
- if (double) {
- translate([slot + slot_off, outer_length - slot, slot])
- rotate([-90, 0, 0])
- tslot_2_x(slot, outer_width - (2 * (slot + slot_off)));
-
- translate([0, slot + slot_off, 0])
- tslot_2_y(slot, outer_width - (2 * (slot + slot_off)));
- translate([outer_width - slot, slot + slot_off, 0])
- tslot_2_y(slot, outer_width - (2 * (slot + slot_off)));
- } else {
- translate([slot + slot_off, outer_length - slot, 0])
- tslot_x(slot, outer_width - (2 * (slot + slot_off)));
-
- translate([0, slot + slot_off, 0])
- tslot_y(slot, outer_width - (2 * (slot + slot_off)));
- translate([outer_width - slot, slot + slot_off, 0])
- tslot_y(slot, outer_width - (2 * (slot + slot_off)));
- }
- }
-
- module frame() {
- // outer corner pillars
- tslot_z(slot, outer_height);
- translate([outer_width - slot, 0, 0])
- tslot_z(slot, outer_height);
- translate([0, outer_length - slot, 0])
- tslot_z(slot, outer_height);
- translate([outer_width - slot, outer_length - slot, 0])
- tslot_z(slot, outer_height);
-
- lower_frame(false);
-
- // top frame
- translate([0, 0, outer_height - slot])
- lower_frame(true);
-
- // end caps
- color("black")
- translate([0, 0, outer_height]) {
- cube([slot, slot, 2]);
- translate([outer_width - slot, 0, 0])
- cube([slot, slot, 2]);
- translate([0, outer_length - slot, 0])
- cube([slot, slot, 2]);
- translate([outer_width - slot, outer_length - slot, 0])
- cube([slot, slot, 2]);
- }
-
- // feet
- translate([slot / 2, slot / 2, -30])
- foot();
- translate([outer_width - slot / 2, slot / 2, -30])
- foot();
- translate([slot / 2, outer_length - slot / 2, -30])
- foot();
- translate([outer_width - slot / 2, outer_length - slot / 2, -30])
- foot();
-
- // connecting elements
- translate([slot + slot_off, 0, slot + slot_off])
- slot_angle_connector();
- translate([slot + slot_off, outer_length - slot, slot + slot_off])
- slot_angle_connector();
- translate([slot + slot_off, 0, outer_height - slot - slot_off])
- rotate([0, 90, 0])
- slot_angle_connector();
- translate([slot + slot_off, outer_length - slot, outer_height - slot - slot_off - slot])
- rotate([0, 90, 0])
- slot_angle_connector();
- translate([outer_width - slot - slot_off, 0, slot + slot_off])
- rotate([0, -90, 0])
- slot_angle_connector();
- translate([outer_width - slot - slot_off, outer_length - slot, slot + slot_off])
- rotate([0, -90, 0])
- slot_angle_connector();
- translate([outer_width - slot - slot_off, 0, outer_height - slot - slot_off])
- rotate([0, 180, 0])
- slot_angle_connector();
- translate([outer_width - slot - slot_off, outer_length - slot, outer_height - slot - slot_off - slot])
- rotate([0, 180, 0])
- slot_angle_connector();
- translate([slot, slot + slot_off, slot + slot_off])
- rotate([0, 0, 90])
- slot_angle_connector();
- translate([slot, slot + slot_off, outer_height - slot - slot_off - slot])
- rotate([0, 90, 90])
- slot_angle_connector();
- translate([0, outer_length - slot - slot_off, slot + slot_off])
- rotate([0, 0, -90])
- slot_angle_connector();
- translate([0, outer_length - slot - slot_off, outer_height - slot - slot_off - slot])
- rotate([0, 90, -90])
- slot_angle_connector();
- translate([outer_width, slot + slot_off, slot + slot_off])
- rotate([0, 0, 90])
- slot_angle_connector();
- translate([outer_width, slot + slot_off, outer_height - slot - slot_off - slot])
- rotate([0, 90, 90])
- slot_angle_connector();
- translate([outer_width - slot, outer_length - slot - slot_off, slot + slot_off])
- rotate([0, 0, -90])
- slot_angle_connector();
- translate([outer_width - slot, outer_length - slot - slot_off, outer_height - slot - slot_off - slot])
- rotate([0, 90, -90])
- slot_angle_connector();
- translate([slot + slot_off, slot + slot_off, slot])
- rotate([-90, 0, 0])
- slot_angle_connector();
- translate([outer_width - slot - slot_off, slot + slot_off, slot])
- rotate([-90, 0, 90])
- slot_angle_connector();
- translate([slot + slot_off, outer_length - slot - slot_off, 0])
- rotate([90, 0, 0])
- slot_angle_connector();
- translate([outer_width - slot - slot_off, outer_length - slot - slot_off, 0])
- rotate([90, 0, -90])
- slot_angle_connector();
- /*
- translate([slot + slot_off, slot + slot_off, outer_height])
- rotate([-90, 0, 0])
- slot_angle_connector();
- translate([outer_width - slot - slot_off, slot + slot_off, outer_height])
- rotate([-90, 0, 90])
- slot_angle_connector();
- translate([slot + slot_off, outer_length - slot - slot_off, outer_height - slot])
- rotate([90, 0, 0])
- slot_angle_connector();
- translate([outer_width - slot - slot_off, outer_length - slot - slot_off, outer_height - slot])
- rotate([90, 0, -90])
- slot_angle_connector();
- */
- }
-
- // #######################################################
- // ###################### Mechanics ######################
- // #######################################################
-
- rail_mount_dist = 12;
- y_carriage_pos = 175;
-
- module rail(length) {
- cylinder(d = rail_dia, h = length);
- echo(rail_dia=rail_dia, rail_len=length);
- }
-
- module y_rails() {
- // y smooth rail on blue side
- color("cyan")
- translate([rail_dia / 2 + rail_y_off_1, 18, -30])
- rotate([-90, 0, 0])
- rail(outer_length - slot - nema17_size - (2 * rail_mount_dist));
-
- // y carriage on blue side
- translate([rail_y_off_1 - (lm8uu_outer + lm8uu_dia_add) / 2 + y_carriage_rail_support, y_carriage_pos, -slot])
- y_carriage();
-
- // rail mounts for blue side
- color("green")
- translate([0, 2 * rail_mount_dist, -2 * slot])
- rail_mount(slot);
- color("green")
- translate([0, outer_length - (2 * slot) - nema17_size - rail_mount_dist + 5, -2 * slot])
- rail_mount(slot);
-
- // y smooth rail on red side
- color("cyan")
- translate([outer_width - (2 * slot) - rail_dia / 2 - rail_y_off_1, 18, -30])
- rotate([-90, 0, 0])
- rail(outer_length - slot - nema17_size - (2 * rail_mount_dist));
-
- // y carriage on red side
- translate([outer_width - slot - y_carriage_width - y_carriage_block_width, y_carriage_pos + y_carriage_length, -slot])
- rotate([0, 0, 180])
- y_carriage();
-
- // rail mounts for red side
- color("green")
- translate([outer_width - (2 * slot), 2 * rail_mount_dist + rail_mount_len, -2 * slot])
- rotate([0, 0, 180])
- rail_mount(slot);
- color("green")
- translate([outer_width - (2 * slot), outer_length - (2 * slot) - nema17_size - rail_mount_dist + 5 + rail_mount_len, -2 * slot])
- rotate([0, 0, 180])
- rail_mount(slot);
- }
-
- module x_rails() {
- // TODO length calculate properly!
- translate([30, y_carriage_pos, 15])
- rotate([0, 90, 0])
- rail(outer_length - (4 * slot));
- translate([30, y_carriage_pos + x_rail_dist, 15])
- rotate([0, 90, 0])
- rail(outer_length - (4 * slot));
- }
-
- module motion_xy() {
- translate([slot, slot, outer_height])
- y_rails();
-
- color("cyan")
- translate([slot, slot + y_carriage_len_add, outer_height - (1.5 * slot)])
- x_rails();
-
- // left ("blue") motor
- translate([slot, outer_length - slot - nema17_size - nema17_mount_wall, outer_height + nema17_mount_wall])
- rotate([180, 0, 90]) {
- color("blue")
- translate([0, 0, -65])
- nema17(65);
-
- color("green")
- nema17_mount(slot);
-
- // blue motor pulley
- color("magenta")
- translate([nema17_size / 2, nema17_size / 2, 22.4])
- rotate([180, 0, 0])
- gt2_pulley();
-
- // blue gt2 belt at motor
- color("blue")
- translate([nema17_size / 2, nema17_size / 2 + 6.5, nema17_mount_wall + 1])
- rotate([0, 0, 180])
- gt2_belt(200);
- color("blue")
- translate([-outer_length + (3 * slot) + 10 + nema17_size / 2, nema17_size / 2 - 6.5, nema17_mount_wall + 1])
- gt2_belt(outer_length - (3 * slot) - 10);
- }
-
- // right ("red") motor
- translate([outer_width - slot - nema17_size, outer_length - slot - nema17_size - nema17_mount_wall, outer_height + nema17_mount_wall])
- rotate([180, 0, 90]) {
- color("red")
- translate([0, 0, -65])
- nema17(65);
-
- color("green")
- nema17_mount(slot);
-
- // red motor pulley
- color("cyan")
- translate([nema17_size / 2, nema17_size / 2, 8.2])
- gt2_pulley();
-
- // red gt2 belt at motor
- color("red")
- translate([nema17_size / 2, nema17_size / 2 + 6.5, nema17_mount_wall + 8])
- rotate([0, 0, 180])
- gt2_belt(outer_length - (3 * slot) - 10);
- color("red")
- translate([-200 + nema17_size / 2, nema17_size / 2 - 6.5, nema17_mount_wall + 8])
- gt2_belt(200);
- }
-
- // long back belts
- color("blue")
- translate([slot + 15, slot + 10, outer_height - 7])
- gt2_belt(outer_width - nema17_size - (2 * slot) + 13);
- color("red")
- translate([slot + 15, slot + 10, outer_height - 14])
- gt2_belt(outer_width - nema17_size - (2 * slot) + 13);
-
- // blue belt on red side
- color("blue")
- translate([outer_width - slot - 15, slot + 10, outer_height - 7])
- rotate([0, 0, 90])
- gt2_belt(200);
-
- // red belt on blue side
- color("red")
- translate([slot + 15, slot + 209, outer_height - 14])
- rotate([0, 0, -90])
- gt2_belt(200);
-
- // idler on blue side
- translate([slot + bearing_mount_width + 15, 0, outer_height - slot])
- rotate([0, 0, 90])
- slot_mount_bracket(slot, true);
-
- // idler on red side
- translate([outer_width - slot - 15, 0, outer_height - slot])
- rotate([0, 0, 90])
- slot_mount_bracket(slot, true);
- }
-
- // #######################################################
- // ####################### Heatbed #######################
- // #######################################################
-
- module heatbed() {
- color("yellow")
- translate([slot + frame_off_x, slot + frame_off_y, bed_draw_height])
- cube([heatbed_width, heatbed_length, heatbed_height]);
- }
-
- // ########################################################
- // ####################### Assembly #######################
- // ########################################################
-
- frame();
- motion_xy();
- heatbed();
|