// sockets: // saw out // square out // triangle out // fm in // CV in // PWM duty // pots (all p160s): // coarse tuning // fine tuning // FM attenuation // PWM duty // PWM duty attenuation /* [Default values] */ // Line segments for circles FN = 100; // [1:1:360] // Unit size (mm) U = 44.45; // Horizontal pitch size (mm) HP = 5.07; // 5.07 for a little bit of margin $fn=FN; /* [Panel] */ // Height of module (mm) - Would not change this if you are using Eurorack height = 128.5; // A little less then 3U // Thickness of module (mm) - Would not change this if you are using Eurorack thickness = 2; // Website specifies a thickness of 2mm // Width of module (HP) width = 24; // [1:1:84] /* [Holes] */ // Four hole threshold (HP) four_hole_threshold = 10; // Center two holes two_holes_type = "opposite"; // [center, opposite, mirror] // Hole radius (mm) hole_r = 1.7; // Hole distance from the side (HP) hole_dist_side = hp_mm(1.5); // Hole distance from the top (mm) hole_dist_top = 2.5; // margins from edges h_margin = hole_dist_side*4; v_margin = hole_dist_top*5; width_mm = hp_mm(width); // where to put the output jacks output_column = width_mm - h_margin; input_column = h_margin; bottom_row = v_margin + 12; row_1 = bottom_row + v_margin + 12; row_2 = row_1 + v_margin + 12; title_font = 10; label_font = 6; //knob_radius top_row = height - v_margin - title_font; saw_out = [output_column, row_2, 0]; triangle_out = [output_column, row_1, 0]; square_out = [output_column, bottom_row, 0]; cv_in = [input_column, row_2, 0]; fm_in = [input_column - h_margin/2, row_1, 0]; fm_pot = [input_column + h_margin/2, row_1, 0]; pwm_in = [input_column - h_margin/2, bottom_row, 0]; pwm_duty = [input_column, bottom_row, 0]; pwm_pot = [input_column + h_margin/2, bottom_row, 0]; c_tune = [width_mm/2 - h_margin, top_row, 0]; f_tune = [width_mm/2 + h_margin, top_row, 0]; left_rib_x = hole_dist_side + thickness; right_rib_x = width_mm - hole_dist_side - thickness; // draw panel, subtract holes union() { difference(){ color([.1,.1,.1]) panel(width); // waves out translate(saw_out) audio_jack_3_5mm(); // saw out translate(square_out) audio_jack_3_5mm(); // square out translate(triangle_out) audio_jack_3_5mm(); // triangle out // input sockets translate(fm_in) audio_jack_3_5mm(); // fm in translate(cv_in) audio_jack_3_5mm(); // CV in translate(pwm_in) audio_jack_3_5mm(); // PWM duty in // pots translate(fm_pot) pot_p160(); // fm lvl translate(pwm_duty) pot_p160(); // pwm duty translate(pwm_pot) pot_p160(); // pwm lvl translate(c_tune) pot_p160(); // coarse tuning translate(f_tune) pot_p160(); // fine tuning } // additives - labels, etc translate([0, -12, 0]) translate(saw_out) label("[SAW]", size=6); translate([0, -12, 0]) translate(square_out) label("[SQ]", size=6); translate([0, -12, 0]) translate(triangle_out) label("[TRI]", size=6); translate([h_margin/2, -12, 0]) translate(fm_in) label("[FM]", size=6); translate([0, -12, 0]) translate(cv_in) label("[CV]", size=6); translate([h_margin/2, -12, 0]) translate(pwm_in) label("[PWM]", size=6); translate([0, -12, 0]) translate(c_tune) label("[Coarse]", size=6); translate([0, -12, 0]) translate(f_tune) label("[Fine]", size=6); // label the whole thing? translate([width_mm/2, height-hole_dist_top-10, 0]) label("Fireball VCO", size=10); // ribs? color([.1,.1,.1]) translate([left_rib_x, hole_dist_top+4, 0]) wall(h=25, w=height-hole_dist_top*2-4); color([.1,.1,.1]) translate([right_rib_x, hole_dist_top+4, 0]) wall(h=25, w=height-hole_dist_top*2-4); // one more to mount the circuit board to translate([width_mm/2-thickness/2, hole_dist_top+16, 0]) wall(h=10, w=height-hole_dist_top*2-32); // decoration? // color([1,0,0]) // translate([53,height-5,thickness]) // rotate([0,0,-120]) // scale([.5,.5,.5]) // linear_extrude(height=thickness-1, scale=1) // import("FireballSpell.dxf"); color([1,0,0]) translate([62,height-60,thickness-.01]) rotate([0,0,-120]) scale([.2,.2,.025]) surface("FireballSpellSmall.png", center=true, invert=false); } module make_surface(filename, h) { for (a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]) linear_extrude(height=a/h, convexity=10) projection(cut = true) surface(filename, center=true); } // h[p] module panel(h) { width_mm = hp_mm(h); difference() { cube(size = [width_mm, height, thickness]); if (h < four_hole_threshold) { if (two_holes_type == "center") { translate([width_mm/2, hole_dist_top, -1]) cylinder(r=hole_r, h=thickness*2); translate([width_mm/2, height-hole_dist_top, -1]) cylinder(r=hole_r, h=thickness*2); } else if (two_holes_type == "opposite") { translate([hole_dist_side, hole_dist_top, -1]) cylinder(r=hole_r, h=thickness*2); translate([width_mm - hole_dist_side, height-hole_dist_top, -1]) cylinder(r=hole_r, h=thickness*2); } else if (two_holes_type == "mirror") { translate([hole_dist_side, hole_dist_top, -1]) cylinder(r=hole_r, h=thickness*2); translate([hole_dist_side, height-hole_dist_top, -1]) cylinder(r=hole_r, h=thickness*2); } } else { translate([hole_dist_side, hole_dist_top, -1]) cylinder(r=hole_r, h=thickness*2); translate([hole_dist_side, height - hole_dist_top, -1]) cylinder(r=hole_r, h=thickness*2); translate([width_mm - hole_dist_side, hole_dist_top, -1]) cylinder(r=hole_r, h=thickness*2); translate([width_mm - hole_dist_side, height - hole_dist_top, -1]) cylinder(r=hole_r, h=thickness*2); } } } // http://www.rean-connectors.com/en/products/din-chassis-connectors/nys325 module nys325_midi_socket() { cylinder(r=7.55, h=thickness*2+1); translate([0, 11.3, -1]) cylinder(r=1.6, h=thickness*2+1); translate([0, -11.3, -1]) cylinder(r=1.6, h=thickness*2+1); } module audio_jack_3_5mm() { translate([0, 0, -1]) cylinder(r=3, h=thickness*2+1); } module toggle_switch_6_8mm() { translate([0, 0, -1]) cylinder(r=3.4, h=thickness*2+1); } // http://www.mouser.com/ds/2/414/Datasheet_RotaryPanelPot_P160series-1133272.pdf module pot_p160() { translate([0, 0, -1]) cylinder(r=3.75, h=thickness*2); translate([7.8, 0, -1]) cylinder(r=1.5, h=thickness+.5); } module pot_wh148() { translate([0, 0, -1]) cylinder(r=3.6, h=thickness*2); translate([7.8, 0, -1]) cylinder(r=1.3, h=thickness+.5); } module label(string, size=4, halign="center") { color([1,0,0]) linear_extrude(thickness+1) text(string, size, halign=halign); } // draw a "vertical" wall to mount a circuit board sideways on // h = z height, e.g. height of the board module wall(h, w) { translate([0, 0, -h]) cube(size = [thickness, w, h]); } // https://www.elfa.se/Web/Downloads/_t/ds/els-511sygwa-s530-e1_eng_tds.pdf module x1_7seg_14_22mm_display() { cube([12.25, 19.25, thickness]); } module x2_7seg_14_22mm_display() { cube([25, 19.25, thickness]); } // https://www.elfa.se/Web/Downloads/2e/wa/qmCC56-12EWA.pdf module x4_7seg_14_22mm_display() { cube([50.5, 19.25, thickness]); } // https://cdn.sparkfun.com/datasheets/Components/Switches/MX%20Series.pdf module cherry_mx_button() { union(){ cube([14,14,thickness]); translate([-1,1,0]) cube([14+2*1,thickness,thickness]); translate([-1,14-1-3,0]) cube([14+2*1,3,thickness]); } } // 1U = 1.75" = 44.45mm // 1HP = 1/5" = 5.08mm // u[nits] function units_mm(u) = u * U; // h[p] function hp_mm(h) = h * HP;