diff --git a/case/README.md b/case/README.md index b95b313..ba1f32e 100644 --- a/case/README.md +++ b/case/README.md @@ -61,6 +61,12 @@ check these against yours and change the values at the top of - `usb_pos`: where the micro-USB port is along the D1's back edge (38 mm from the jack side is a guess based on the UNO layout). Also check `jack_pos`. +- `disp_rotated`: the glass is off-centre on the display's PCB, so the bezel + depends on which way up the display is mounted. `true` (the default) is the + orientation the display reads correctly in: turned 180° from the + datasheet's front view, with the jumper header on the left seen from the + front. + If only the display is off, it's enough to reprint the bezel. ## Changing the design diff --git a/case/stl/bezel.stl b/case/stl/bezel.stl index 3267851..3e00e96 100644 Binary files a/case/stl/bezel.stl and b/case/stl/bezel.stl differ diff --git a/case/vfd-case.scad b/case/vfd-case.scad index f657615..2584851 100644 --- a/case/vfd-case.scad +++ b/case/vfd-case.scad @@ -35,8 +35,8 @@ top_margin = 4; // bezel above the display's top edge (along the panel) disp_w = 190; disp_h = 64; disp_hole_inset = 4; // hole centres from the PCB edges (182 x 56 spacing) -glass_x0 = 3.0; // glass left edge from PCB left edge (front view) -glass_y0 = 7.85; // glass bottom edge from PCB bottom edge +glass_x0 = 3.0; // glass left edge from PCB left edge (datasheet front view) +glass_y0 = 7.85; // glass bottom edge from PCB bottom edge (datasheet front view) glass_w = 175.2; glass_h = 48.3; glass_depth = 12.0; // glass front face to PCB front face @@ -44,6 +44,9 @@ glass_gap = 0.5; // air gap between bezel and glass (datasheet asks for o pcb_t = 1.6; disp_back = 11; // components behind the display PCB disp_raise = 14; // PCB bottom edge, measured along the panel from the bottom +disp_rotated = true; // display turned 180 deg from the datasheet's front view + // (jumper header on the left seen from the front); the + // glass is off-centre, so this moves the bosses 8.8 mm /* [Window] */ win_w = 156; @@ -76,7 +79,10 @@ board_comp_h = 10; // tallest part on the board (dummy for the collision ch $fn = 48; // ---------- derived ---------- -gx_c = glass_x0 + glass_w / 2; // glass centre from PCB left +// glass position from the PCB's bottom-left corner as mounted (front view) +gl_x = disp_rotated ? disp_w - glass_x0 - glass_w : glass_x0; +gl_y = disp_rotated ? disp_h - glass_y0 - glass_h : glass_y0; +gx_c = gl_x + glass_w / 2; // glass centre from PCB left inner_w = 2 * (max(gx_c, disp_w - gx_c) + 1.5); // window centred, 1.5 mm side clearance outer_w = inner_w + 2 * wall; disp_x0 = inner_w / 2 - gx_c; // PCB left edge, x @@ -85,7 +91,7 @@ height = z_top_in + wall; n_bezel_in = lip + bezel_t; // bezel inner face (local N) n_glass = n_bezel_in + glass_gap; n_pcb = n_glass + glass_depth; -win_s = disp_raise + glass_y0 + glass_h / 2; // window centre along the panel +win_s = disp_raise + gl_y + glass_h / 2; // window centre along the panel board_x0 = inner_w / 2 - board_w / 2; board_conn_y = depth - wall - board_gap; // y of the board's connector edge pcb_top_z = standoff_h + pcb_t; @@ -231,7 +237,7 @@ module tie_anchor() { // ---------- dummies for the preview and the collision checks ---------- module display_dummy() { panel() { - translate([disp_x0 + glass_x0, disp_raise + glass_y0, n_glass + 0.01]) + translate([disp_x0 + gl_x, disp_raise + gl_y, n_glass + 0.01]) cube([glass_w, glass_h, glass_depth - 0.02]); translate([disp_x0, disp_raise, n_pcb + 0.01]) difference() { cube([disp_w, disp_h, pcb_t + disp_back]);