Fix rail clearance issues, add PCB slot, more options for potentiometer spoke placement

This commit is contained in:
George Dorn 2022-08-21 01:37:25 -07:00
parent e8295830c4
commit 32ded0979b
2 changed files with 63 additions and 38 deletions

View file

@ -33,7 +33,7 @@ $fn=FN;
// Height of module (mm) - Would not change this if you are using Eurorack // Height of module (mm) - Would not change this if you are using Eurorack
height = 128.5; // A little less then 3U height = 128.5; // A little less then 3U
// Thickness of module (mm) - Would not change this if you are using Eurorack // Thickness of module (mm) - Would not change this if you are using Eurorack
thickness = 2; // Website specifies a thickness of 2mm thickness = 2; // Website specifies a thickness of 2mm - but adjust to fit printer specs - often the first layer will be thinner than this
// for inset labels, translating to this height controls label depth // for inset labels, translating to this height controls label depth
label_inset_height = thickness-1; label_inset_height = thickness-1;
@ -53,6 +53,8 @@ hole_dist_side = hp_mm(1.5);
// Hole distance from the top (mm) // Hole distance from the top (mm)
hole_dist_top = 2.5; hole_dist_top = 2.5;
rail_clearance = 9; // mm from very top/bottom edge and where it is safe to put reinforcing walls; i.e. the thickness of the rail + a safety margin
// margins from edges // margins from edges
h_margin = hole_dist_side + thickness; h_margin = hole_dist_side + thickness;
v_margin = hole_dist_top*2; v_margin = hole_dist_top*2;
@ -61,14 +63,14 @@ width_mm = hp_mm(width); // where to put the output jacks
output_column = width_mm - h_margin; output_column = width_mm - h_margin;
input_column = h_margin; input_column = h_margin;
working_height = height - v_margin*2 - title_font_size*1.5; working_height = height - v_margin*2 - title_font_size;
working_increment = working_height / 5; working_increment = working_height / 5;
row_1 = v_margin+12; row_1 = v_margin+12;
row_2 = working_increment*1 + row_1; row_2 = working_increment*1 + row_1;
row_3 = working_increment*2 + row_1; row_3 = working_increment*2 + row_1;
row_4 = working_increment*3 + row_1; row_4 = working_increment*3 + row_1;
//special-case the top knob //special-case the top knob
top_row = height - v_margin - title_font_size*1.5; top_row = height - v_margin - title_font_size*2;
working_width = width_mm - h_margin; working_width = width_mm - h_margin;
cv_in = [h_margin, row_1, 0]; cv_in = [h_margin, row_1, 0];
saw_out = [h_margin + working_width/4, row_1, 0]; saw_out = [h_margin + working_width/4, row_1, 0];
@ -88,8 +90,8 @@ c_tune = [width_mm/2, top_row, 0];
f_tune = [h_margin+working_width/8, row_4, 0]; f_tune = [h_margin+working_width/8, row_4, 0];
left_rib_x = thickness * 1.2; left_rib_x = thickness * 1;
right_rib_x = width_mm - thickness*2.2; right_rib_x = width_mm - thickness*2;
// draw panel, subtract holes // draw panel, subtract holes
union() { union() {
@ -108,12 +110,12 @@ union() {
translate(pwm_in) audio_jack_3_5mm(); // PWM duty in translate(pwm_in) audio_jack_3_5mm(); // PWM duty in
// pots // pots
translate(fm_lvl) pot_p160(); // fm lvl translate(fm_lvl) pot_p160(anchor_hole="both"); // fm lvl
translate(pwm_duty) pot_p160(); // pwm duty translate(pwm_duty) pot_p160(anchor_hole="both"); // pwm duty
translate(pwm_cv_lvl) pot_p160(); // pwm lvl translate(pwm_cv_lvl) pot_p160(anchor_hole="both"); // pwm lvl
translate(c_tune) pot_p160(); // coarse tuning translate(c_tune) pot_p160(anchor_hole="both"); // coarse tuning
translate(f_tune) pot_p160(); // fine tuning translate(f_tune) pot_p160(anchor_hole="both"); // fine tuning
/* /*
translate([61,height-title_font_size*1.67,label_inset_height]) translate([61,height-title_font_size*1.67,label_inset_height])
@ -147,30 +149,30 @@ union() {
// label the whole thing? // label the whole thing?
// translate([width_mm/2, height-hole_dist_top-10, 0]) label("Fireball VCO", size=10); // translate([width_mm/2, height-hole_dist_top-10, 0]) label("Fireball VCO", size=10);
// ribs? // ribs
//color([.1,.1,.1]) translate([left_rib_x, rail_clearance, 0])
translate([left_rib_x, hole_dist_top+4, 0]) wall(h=4, w=height-hole_dist_top*3-4); v_wall(h=4, l=height-rail_clearance*2-thickness);
//color([.1,.1,.1]) translate([right_rib_x, rail_clearance, 0])
translate([right_rib_x, hole_dist_top+4, 0]) wall(h=4, w=height-hole_dist_top*3-4); v_wall(h=4, l=height-rail_clearance*2-thickness);
// top/bottom ribs? // top horizontal rib
translate([width_mm-hole_dist_top, hole_dist_top+4, 0]) translate([left_rib_x, height-rail_clearance-thickness, 0])
rotate([0,0,90]) h_wall(h=4, l=right_rib_x);
wall(h=4, w=width_mm-hole_dist_top-4);
translate([width_mm-hole_dist_top, height-hole_dist_top-4.5, 0]) //4.5? // middle horizontal rib
rotate([0,0,90]) translate([left_rib_x, top_row-rail_clearance, 0])
wall(h=4, w=width_mm-hole_dist_top-4); h_wall(h=4, l=right_rib_x);
// bottom horizontal rib
translate([left_rib_x, rail_clearance, 0])
h_wall(h=4, l=right_rib_x);
translate([hole_dist_top, top_row-12, 0]) // one more vertical to mount the circuit board to, dead center
v_wall(h=4, w=width_mm-hole_dist_top*2); translate([width_mm/2-thickness/2, rail_clearance, 0])
v_wall(h=4, l=top_row-rail_clearance*2);
translate([width_mm/2-thickness/2+1.15/2, rail_clearance, 0])
// one more to mount the circuit board to, dead center pcb_holder(h=10, l=top_row-rail_clearance*2, th=1.15, wall_thickness=1);
//color([.1,.1,.1])
translate([width_mm/2-thickness/2, hole_dist_top+4, 0])
wall(h=6, w=top_row-16.5);
// color([1,0,0]) // color([1,0,0])
// translate([62,height-10,thickness-.1]) // translate([62,height-10,thickness-.1])
@ -252,10 +254,15 @@ module toggle_switch_6_8mm() {
translate([0, 0, -1]) cylinder(r=3.4, h=thickness*2+1); translate([0, 0, -1]) cylinder(r=3.4, h=thickness*2+1);
} }
// http://www.mouser.com/ds/2/414/Datasheet_RotaryPanelPot_P160series-1133272.pdf // http://www.mouser.com/ds/2/414/Datasheet_RotaryPanelPot_P160series-1133272.pdf
module pot_p160() { module pot_p160(anchor_hole="left") {
translate([0, 0, -1]) cylinder(r=3.75, h=thickness*2); translate([0, 0, -1]) cylinder(r=3.75, h=thickness*2);
// hole for anchor; with translate() ends up being h-1 deep // hole for anchor; with translate() ends up being h-1 deep
translate([7.8, 0, -1]) cylinder(r=1.5, h=thickness); if (anchor_hole=="left" || anchor_hole=="both") {
translate([7.8, 0, -1]) cylinder(r=1.5, h=thickness);
}
if (anchor_hole=="right" || anchor_hole=="both") {
translate([-7.8, 0, -1]) cylinder(r=1.5, h=thickness);
}
} }
module pot_wh148() { module pot_wh148() {
@ -277,14 +284,32 @@ module title(string, size=12, halign="center", font=font_for_title) {
text(string, size, halign=halign, font=font); text(string, size, halign=halign, font=font);
} }
// draw a "vertical" wall to mount a circuit board sideways on // draw a "vertical" wall
// h = z height, e.g. height of the board // h = z height, i.e. how tall the wall is coming out of the panel
module wall(h, w) { // l = length of the wall along the panel
translate([0, 0, -h]) cube(size = [thickness, w, h]); module v_wall(h, l, th=thickness) {
translate([0, 0, -h]) cube(size = [th, l, h]);
} }
module v_wall(h, w) { // draw a horizontal wall (across the panel)
translate([0, 0, -h]) cube(size = [w, thickness, h]); // h = z height, how far the wall comes out of the panel
// l = length of the wall along the panel
module h_wall(h, l, th=thickness) {
translate([0, 0, -h]) cube(size = [l, th, h]);
}
// draws two walls in parallel, close together so a PCB can fit between
// h = how deep to make the walls; a little extra is probably good
// l = length of the side of the board that will be seated in the slit, with tolerances
// th = thickness of the PCB, with tolerances
// wall_thickness = how thick to make each wall of the holder
// e.g.: Radio Shaek is 51mm x 70mm and 1.2mm thick
module pcb_holder(h, l, th, wall_thickness=thickness) {
translate([0-(wall_thickness+th)/2, 0, 0])
v_wall(h, l, wall_thickness);
translate([(wall_thickness+th)/2, 0, 0])
v_wall(h, l, wall_thickness);
} }

Binary file not shown.