Case: mount the display the right way up
The glass is 4.4 mm off-centre on the display PCB. Turning the display 180 degrees so the text reads correctly moved the glass partly behind the window edge. New disp_rotated option (default on) moves the bezel bosses to match. Only the bezel changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
0cf5df9b6e
commit
4a533af37a
3 files changed
+17
-5
No files matched your search
+11
-5
@@ -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]);
|
||||
|
||||
Reference in new issue
Block a user