Compare commits
3
Commits
main
..
17d0c1be3b
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
17d0c1be3b | ||
|
|
49546ce3b3 | ||
|
|
a4e5694a1d |
No files matched your search
@@ -48,7 +48,7 @@ server, so `type: git` with a URL, not `github://`). The layout must stay
|
|||||||
to line 2 and from the end of line 2 back home, and nothing scrolls. The
|
to line 2 and from the end of line 2 back home, and nothing scrolls. The
|
||||||
buffered text API depends on this; the scroll modes are only for raw writes.
|
buffered text API depends on this; the scroll modes are only for raw writes.
|
||||||
- The RXD input is RS-232. The reference build uses a MAX3232 (no inversion
|
- The RXD input is RS-232. The reference build uses a MAX3232 (no inversion
|
||||||
in config); a directly wired ESP8266 pin needs `inverted: true` on the UART TX
|
in config); a directly wired ESP32 pin needs `inverted: true` on the UART TX
|
||||||
pin. Baud rate and parity come from the board's jumpers, so they are not
|
pin. Baud rate and parity come from the board's jumpers, so they are not
|
||||||
validated by the component.
|
validated by the component.
|
||||||
- User characters: up to 4, codes 0x20–0x7E. Each is 5 column bytes, bit 6 =
|
- User characters: up to 4, codes 0x20–0x7E. Each is 5 column bytes, bit 6 =
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ external_components:
|
|||||||
|
|
||||||
uart:
|
uart:
|
||||||
id: uart_vfd
|
id: uart_vfd
|
||||||
tx_pin: GPIO2 # D1 R1 pin D9 (UART1 TX on the ESP8266)
|
tx_pin: GPIO17
|
||||||
baud_rate: 9600 # match the display's jumpers (factory default: 9600, no parity)
|
baud_rate: 9600 # match the display's jumpers (factory default: 9600, no parity)
|
||||||
|
|
||||||
time: # required by the component (used by samsung_vfd.printf)
|
time: # required by the component (used by samsung_vfd.printf)
|
||||||
@@ -54,10 +54,6 @@ samsung_vfd:
|
|||||||
uart_id: uart_vfd
|
uart_id: uart_vfd
|
||||||
```
|
```
|
||||||
|
|
||||||
The `uart:` block above uses the pin from the reference build, a WEMOS D1 R1
|
|
||||||
(ESP8266); see [Hardware](#hardware). Any ESPHome board with a free TX pin
|
|
||||||
works.
|
|
||||||
|
|
||||||
For a complete device, copy [examples/samsung-vfd.yaml](examples/samsung-vfd.yaml)
|
For a complete device, copy [examples/samsung-vfd.yaml](examples/samsung-vfd.yaml)
|
||||||
into your ESPHome config folder. Add the keys from
|
into your ESPHome config folder. Add the keys from
|
||||||
[examples/secrets.yaml.example](examples/secrets.yaml.example) to your
|
[examples/secrets.yaml.example](examples/secrets.yaml.example) to your
|
||||||
@@ -69,58 +65,39 @@ The board in the photos is a 20L203DA5 (rev A). The included
|
|||||||
[datasheet](docs/20L203DA12-datasheet.pdf) is for the 20L203DA12, a variant
|
[datasheet](docs/20L203DA12-datasheet.pdf) is for the 20L203DA12, a variant
|
||||||
with the same command set.
|
with the same command set.
|
||||||
|
|
||||||
The reference build drives it from a WEMOS D1 R1, an UNO-sized ESP8266 board,
|
|
||||||
through a MAX3232. The [desk case](case/README.md) is made for that board.
|
|
||||||
|
|
||||||
### Connector (3-pin Molex 5046-03A)
|
### Connector (3-pin Molex 5046-03A)
|
||||||
|
|
||||||
| Pin | Signal | Connect to |
|
| Pin | Signal | Connect to |
|
||||||
|-----|--------|------------|
|
|-----|--------|------------|
|
||||||
| 1 | VCC | 5–24 V DC supply |
|
| 1 | VCC | 5–24 V DC supply |
|
||||||
| 2 | RXD | MAX3232 T1OUT (T1IN ← D1 R1 GPIO2), see below |
|
| 2 | RXD | MAX3232 T1OUT (T1IN ← ESP32 GPIO17), see below |
|
||||||
| 3 | GND | supply GND, MAX3232 GND **and** D1 R1 GND |
|
| 3 | GND | supply GND, MAX3232 GND **and** ESP32 GND |
|
||||||
|
|
||||||
### Power
|
### Power
|
||||||
|
|
||||||
The display takes 4.5–26 V. Its supply current with all dots lit (datasheet
|
The display takes 5–24 V. At 5 V it draws about 0.8 A typical and 1.2 A
|
||||||
section 4.6):
|
maximum, and the inrush current at power-on can be up to five times that. A
|
||||||
|
dev-board regulator can't supply this, so give the display its own supply,
|
||||||
| Supply | Typical | Maximum | Inrush at power-on (5 × max) |
|
for example 12 V at 1 A, and connect the grounds together.
|
||||||
|--------|---------|---------|------------------------------|
|
|
||||||
| 5 V | 0.8 A | 1.2 A | up to 6 A |
|
|
||||||
| 12 V | 0.35 A | 0.55 A | up to 2.75 A |
|
|
||||||
| 24 V | 0.2 A | 0.3 A | up to 1.5 A |
|
|
||||||
|
|
||||||
The inrush current sets the size of the supply, not the running current. A
|
|
||||||
12 V 1 A adapter is **not enough**: it current-limits at power-on and the
|
|
||||||
display browns out during start-up. A dev-board regulator can't supply this
|
|
||||||
either, so give the display its own supply and connect the grounds together:
|
|
||||||
|
|
||||||
- **12 V, 3 A or more** (recommended). The D1 R1 can share it through its
|
|
||||||
barrel jack, which accepts up to 12 V.
|
|
||||||
- **12 V, 2 A plus a bulk capacitor** of 2200 µF / 25 V or more across VCC and
|
|
||||||
GND at the display connector, so the capacitor supplies the inrush peak.
|
|
||||||
- **24 V, 2 A.** This has the lowest current, but don't feed it to the D1 R1's
|
|
||||||
barrel jack: power the board separately, e.g. over USB.
|
|
||||||
|
|
||||||
### Signal levels
|
### Signal levels
|
||||||
|
|
||||||
The RXD input goes through an RS-232 receiver: it expects ±3 to ±15 V and
|
The RXD input goes through an RS-232 receiver: it expects ±3 to ±15 V and
|
||||||
idles at the negative level (mark). It tolerates ±30 V, so a 3.3 V ESP8266 pin
|
idles at the negative level (mark). It tolerates ±30 V, so a 3.3 V ESP32 pin
|
||||||
can't damage it. There are two ways to connect it:
|
can't damage it. There are two ways to connect it:
|
||||||
|
|
||||||
- **Through a MAX3232 (recommended, and how the original build is wired).**
|
- **Through a MAX3232 (recommended, and how the original build is wired).**
|
||||||
Power the MAX3232 from the D1's 3.3 V, then wire GPIO2 → T1IN and
|
Power the MAX3232 from the ESP32's 3.3 V, then wire GPIO17 → T1IN and
|
||||||
T1OUT → display RXD. The MAX3232 produces real RS-232 levels and does the
|
T1OUT → display RXD. The MAX3232 produces real RS-232 levels and does the
|
||||||
inversion itself, so use the plain `tx_pin: GPIO2`.
|
inversion itself, so use the plain `tx_pin: GPIO17`.
|
||||||
- **Direct from the ESP8266.** A plain TTL signal arrives inverted, so wire
|
- **Direct from the ESP32.** A plain TTL signal arrives inverted, so wire
|
||||||
GPIO2 straight to RXD and invert the pin in the UART config:
|
GPIO17 straight to RXD and invert the pin in the UART config:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
uart:
|
uart:
|
||||||
id: uart_vfd
|
id: uart_vfd
|
||||||
tx_pin:
|
tx_pin:
|
||||||
number: GPIO2
|
number: GPIO17
|
||||||
inverted: true
|
inverted: true
|
||||||
baud_rate: 9600
|
baud_rate: 9600
|
||||||
```
|
```
|
||||||
@@ -132,14 +109,6 @@ can't damage it. There are two ways to connect it:
|
|||||||
If the display shows garbage or nothing at all, the inversion setting is the
|
If the display shows garbage or nothing at all, the inversion setting is the
|
||||||
first thing to check: off with a MAX3232, on without one.
|
first thing to check: off with a MAX3232, on without one.
|
||||||
|
|
||||||
### Why GPIO2
|
|
||||||
|
|
||||||
The ESP8266 has two hardware UARTs. UART0 (GPIO1/GPIO3) is the USB serial
|
|
||||||
port that ESPHome's logger uses. UART1 can only transmit, and only on GPIO2,
|
|
||||||
which is all this display needs. On the D1 R1, GPIO2 is the pin labelled D9.
|
|
||||||
GPIO2 must be high at boot; the MAX3232's input doesn't pull it low, so that
|
|
||||||
is fine.
|
|
||||||
|
|
||||||
### Jumpers
|
### Jumpers
|
||||||
|
|
||||||
The 2×8 pin header on the board selects the following. Jumpers are read only
|
The 2×8 pin header on the board selects the following. Jumpers are read only
|
||||||
@@ -240,7 +209,7 @@ table, character set and user characters. It sends them again after
|
|||||||
| `samsung_vfd.set_blink` | `interval:` (templatable time): on for that long, off for that long, in 13 ms steps up to 3.3 s. `0ms` stops blinking. |
|
| `samsung_vfd.set_blink` | `interval:` (templatable time): on for that long, off for that long, in 13 ms steps up to 3.3 s. `0ms` stops blinking. |
|
||||||
| `samsung_vfd.turn_off` / `turn_on` | Blanks the screen and brings it back without losing its contents. |
|
| `samsung_vfd.turn_off` / `turn_on` | Blanks the screen and brings it back without losing its contents. |
|
||||||
| `samsung_vfd.set_annunciator` | `column:` 1–20, or 0 for all; `state:` true/false (both templatable). Switches the triangle under that column. |
|
| `samsung_vfd.set_annunciator` | `column:` 1–20, or 0 for all; `state:` true/false (both templatable). Switches the triangle under that column. |
|
||||||
| `samsung_vfd.reinit` | Resets the display, re-applies all settings and redraws the screen. Use it when the display was power-cycled without the ESP8266. |
|
| `samsung_vfd.reinit` | Resets the display, re-applies all settings and redraws the screen. Use it when the display was power-cycled without the ESP. |
|
||||||
| `samsung_vfd.self_test` | Runs the built-in self-test (about 20 s), then restores settings and the screen. |
|
| `samsung_vfd.self_test` | Runs the built-in self-test (about 20 s), then restores settings and the screen. |
|
||||||
|
|
||||||
### Raw control
|
### Raw control
|
||||||
|
|||||||
+7
-25
@@ -10,14 +10,6 @@ back wall.
|
|||||||
<img src="section.png" alt="Cross-section: display on the bezel, board on the base" width="49%">
|
<img src="section.png" alt="Cross-section: display on the bezel, board on the base" width="49%">
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
The printed build, assembled and with the body removed (D1 R1 with a
|
|
||||||
proto shield carrying the MAX3232):
|
|
||||||
|
|
||||||
<p>
|
|
||||||
<img src="build-front.jpg" alt="Printed case, assembled" width="49%">
|
|
||||||
<img src="build-inside.jpg" alt="Inside the case: display on the bezel, D1 R1 on the base" width="49%">
|
|
||||||
</p>
|
|
||||||
|
|
||||||
Outer size: about 208 × 112 × 86 mm (W × D × H). The parts need a print bed of
|
Outer size: about 208 × 112 × 86 mm (W × D × H). The parts need a print bed of
|
||||||
at least 210 × 115 mm.
|
at least 210 × 115 mm.
|
||||||
|
|
||||||
@@ -28,23 +20,21 @@ at least 210 × 115 mm.
|
|||||||
| [stl/body.stl](stl/body.stl) | upside down, top on the bed (as exported) | Sides, top and back wall. No supports needed. |
|
| [stl/body.stl](stl/body.stl) | upside down, top on the bed (as exported) | Sides, top and back wall. No supports needed. |
|
||||||
| [stl/bezel.stl](stl/bezel.stl) | face down (as exported) | Front panel with the window and the display bosses. |
|
| [stl/bezel.stl](stl/bezel.stl) | face down (as exported) | Front panel with the window and the display bosses. |
|
||||||
| [stl/base.stl](stl/base.stl) | flat (as exported) | Floor with the board standoffs and the screw holes. |
|
| [stl/base.stl](stl/base.stl) | flat (as exported) | Floor with the board standoffs and the screw holes. |
|
||||||
| [stl/feet.stl](stl/feet.stl) | flat side down (as exported) | 6 feet, print in **TPU**. Each clamps under one of the base screws, with a spigot that locates in the screw's counterbore. |
|
|
||||||
|
|
||||||
PETG is a good choice: the display warms the inside by a few degrees. PLA
|
PETG is a good choice: the display warms the inside by a few degrees. PLA
|
||||||
works if the case stays out of the sun.
|
works if the case stays out of the sun.
|
||||||
|
|
||||||
## Hardware
|
## Hardware
|
||||||
|
|
||||||
- 14 × M3 heat-set inserts, CNC Kitchen M3 × 5.7 (about 4.6 mm OD; the holes
|
- 10 × M3 heat-set inserts (about 4.6 mm OD, 5.7 mm long; the holes are 4.0 mm
|
||||||
are 4.2 mm and 6 mm deep, set by `insert_d` if your printer runs tighter or
|
and 6 mm deep):
|
||||||
looser):
|
|
||||||
- 4 in the bezel's display bosses
|
- 4 in the bezel's display bosses
|
||||||
- 2 in the bezel's feet
|
- 2 in the bezel's feet
|
||||||
- 2 in the body's rear corners and 2 in its side walls, behind the display
|
- 2 in the body's rear corners
|
||||||
- 4 on the base's board standoffs
|
- 4 on the base's board standoffs
|
||||||
- 4 × M3×6 to bolt the display to the bezel
|
- 4 × M3×8 to bolt the display to the bezel
|
||||||
- 4 × M3×6 to hold the D1 board on its standoffs
|
- 4 × M3×6 to hold the D1 board on its standoffs
|
||||||
- 6 × M3×8 to hold the base on, from below (also with the TPU feet)
|
- 4 × M3×8 to hold the base on, from below
|
||||||
|
|
||||||
## Assembly
|
## Assembly
|
||||||
|
|
||||||
@@ -56,9 +46,7 @@ works if the case stays out of the sun.
|
|||||||
5. Connect the display cable. The MAX3232 sits inline in the cable; tie it to
|
5. Connect the display cable. The MAX3232 sits inline in the cable; tie it to
|
||||||
the anchor on the base.
|
the anchor on the base.
|
||||||
6. Put the body on the base and screw it together from below. The base holds
|
6. Put the body on the base and screw it together from below. The base holds
|
||||||
the bezel in place. With the feet, put a foot on each screw first (the
|
the bezel in place.
|
||||||
spigot faces the base); M3×8 is still long enough. Tighten until the foot
|
|
||||||
is snug; the TPU only needs light compression.
|
|
||||||
|
|
||||||
## Measure before printing
|
## Measure before printing
|
||||||
|
|
||||||
@@ -72,11 +60,6 @@ check these against yours and change the values at the top of
|
|||||||
position and the distance from its front face to the PCB.
|
position and the distance from its front face to the PCB.
|
||||||
- `usb_pos`: where the micro-USB port is along the D1's back edge (38 mm from
|
- `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`.
|
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.
|
If only the display is off, it's enough to reprint the bezel.
|
||||||
|
|
||||||
@@ -90,7 +73,6 @@ with:
|
|||||||
openscad -D 'part="body"' --export-format binstl -o stl/body.stl vfd-case.scad
|
openscad -D 'part="body"' --export-format binstl -o stl/body.stl vfd-case.scad
|
||||||
openscad -D 'part="bezel"' --export-format binstl -o stl/bezel.stl vfd-case.scad
|
openscad -D 'part="bezel"' --export-format binstl -o stl/bezel.stl vfd-case.scad
|
||||||
openscad -D 'part="base"' --export-format binstl -o stl/base.stl vfd-case.scad
|
openscad -D 'part="base"' --export-format binstl -o stl/base.stl vfd-case.scad
|
||||||
openscad -D 'part="feet"' --export-format binstl -o stl/feet.stl vfd-case.scad
|
|
||||||
```
|
```
|
||||||
|
|
||||||
`part="assembly"` shows everything with dummy display and board models, and
|
`part="assembly"` shows everything with dummy display and board models, and
|
||||||
@@ -98,7 +80,7 @@ openscad -D 'part="feet"' --export-format binstl -o stl/feet.stl vfd-case.scad
|
|||||||
each one must render as an empty object:
|
each one must render as an empty object:
|
||||||
|
|
||||||
- `check_body_bezel`, `check_body_display`, `check_bezel_display`
|
- `check_body_bezel`, `check_body_display`, `check_bezel_display`
|
||||||
- `check_body_base`, `check_bezel_base`, `check_display_base`, `check_feet_base`
|
- `check_body_base`, `check_bezel_base`, `check_display_base`
|
||||||
- `check_board`
|
- `check_board`
|
||||||
- `check_insertion`: sweeps the bezel and display along their slide-in path
|
- `check_insertion`: sweeps the bezel and display along their slide-in path
|
||||||
through the body.
|
through the body.
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 3.3 MiB |
Binary file not shown.
|
Before Width: | Height: | Size: 2.5 MiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+17
-73
@@ -7,11 +7,11 @@
|
|||||||
//
|
//
|
||||||
// Assembly:
|
// Assembly:
|
||||||
// 1. Melt M3 heat-set inserts into: 4 display bosses + 2 feet on the bezel,
|
// 1. Melt M3 heat-set inserts into: 4 display bosses + 2 feet on the bezel,
|
||||||
// 2 rear corner + 2 front side bosses in the body, 4 board standoffs on the base.
|
// 2 rear corner bosses in the body, 4 board standoffs on the base.
|
||||||
// 2. Bolt the display to the bezel from behind (4x M3x6).
|
// 2. Bolt the display to the bezel from behind (4x M3x8).
|
||||||
// 3. Screw the D1 board onto the base (4x M3x6).
|
// 3. Screw the D1 board onto the base (4x M3x6).
|
||||||
// 4. Slide the bezel (with display) up into the body's side grooves from below.
|
// 4. Slide the bezel (with display) up into the body's side grooves from below.
|
||||||
// 5. Wire up, put the body on the base and screw it together from below (6x M3x8).
|
// 5. Wire up, put the body on the base and screw it together from below (4x M3x8).
|
||||||
//
|
//
|
||||||
// Render one part: openscad -D 'part="body"' -o body.stl vfd-case.scad
|
// Render one part: openscad -D 'part="body"' -o body.stl vfd-case.scad
|
||||||
// Parts: "assembly" (preview with dummy display + board), "body", "bezel", "base",
|
// Parts: "assembly" (preview with dummy display + board), "body", "bezel", "base",
|
||||||
@@ -35,8 +35,8 @@ top_margin = 4; // bezel above the display's top edge (along the panel)
|
|||||||
disp_w = 190;
|
disp_w = 190;
|
||||||
disp_h = 64;
|
disp_h = 64;
|
||||||
disp_hole_inset = 4; // hole centres from the PCB edges (182 x 56 spacing)
|
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 (datasheet front view)
|
glass_x0 = 3.0; // glass left edge from PCB left edge (front view)
|
||||||
glass_y0 = 7.85; // glass bottom edge from PCB bottom edge (datasheet front view)
|
glass_y0 = 7.85; // glass bottom edge from PCB bottom edge
|
||||||
glass_w = 175.2;
|
glass_w = 175.2;
|
||||||
glass_h = 48.3;
|
glass_h = 48.3;
|
||||||
glass_depth = 12.0; // glass front face to PCB front face
|
glass_depth = 12.0; // glass front face to PCB front face
|
||||||
@@ -44,9 +44,6 @@ glass_gap = 0.5; // air gap between bezel and glass (datasheet asks for o
|
|||||||
pcb_t = 1.6;
|
pcb_t = 1.6;
|
||||||
disp_back = 11; // components behind the display PCB
|
disp_back = 11; // components behind the display PCB
|
||||||
disp_raise = 14; // PCB bottom edge, measured along the panel from the bottom
|
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] */
|
/* [Window] */
|
||||||
win_w = 156;
|
win_w = 156;
|
||||||
@@ -55,21 +52,13 @@ win_r = 2;
|
|||||||
win_chamfer = 1.5;
|
win_chamfer = 1.5;
|
||||||
|
|
||||||
/* [Heat-set inserts, M3] */
|
/* [Heat-set inserts, M3] */
|
||||||
insert_d = 4.2; // hole for the insert (CNC Kitchen M3x5.7; 4.0 printed too tight)
|
insert_d = 4.0; // hole for the insert
|
||||||
insert_depth = 6;
|
insert_depth = 6;
|
||||||
boss_d = 7; // display bosses (larger would touch the glass)
|
boss_d = 7; // display bosses (larger would touch the glass)
|
||||||
screw_d = 3.4; // M3 clearance
|
screw_d = 3.4; // M3 clearance
|
||||||
head_d = 6.2; // M3 head counterbore in the base
|
head_d = 6.2; // M3 head counterbore in the base
|
||||||
head_depth = 2;
|
head_depth = 2;
|
||||||
|
|
||||||
/* [TPU feet, held by the base screws (M3x8 still fits)] */
|
|
||||||
foot_d = 14; // fits inside the base outline at the rear corners
|
|
||||||
foot_h = 4.5; // below the base
|
|
||||||
foot_spigot_h = 1.8; // locates in the base's screw counterbore
|
|
||||||
foot_spigot_d = head_d - 0.2;
|
|
||||||
foot_head_d = 6.6; // pocket for the screw head (from below)
|
|
||||||
foot_head_depth = 3.5; // M3 socket head is 3 mm tall
|
|
||||||
|
|
||||||
/* [WEMOS D1 R1 (Arduino UNO footprint)] */
|
/* [WEMOS D1 R1 (Arduino UNO footprint)] */
|
||||||
board_l = 68.58; // along the case depth, connector edge at the back
|
board_l = 68.58; // along the case depth, connector edge at the back
|
||||||
board_w = 53.34;
|
board_w = 53.34;
|
||||||
@@ -87,10 +76,7 @@ board_comp_h = 10; // tallest part on the board (dummy for the collision ch
|
|||||||
$fn = 48;
|
$fn = 48;
|
||||||
|
|
||||||
// ---------- derived ----------
|
// ---------- derived ----------
|
||||||
// glass position from the PCB's bottom-left corner as mounted (front view)
|
gx_c = glass_x0 + glass_w / 2; // glass centre from PCB left
|
||||||
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
|
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;
|
outer_w = inner_w + 2 * wall;
|
||||||
disp_x0 = inner_w / 2 - gx_c; // PCB left edge, x
|
disp_x0 = inner_w / 2 - gx_c; // PCB left edge, x
|
||||||
@@ -99,7 +85,7 @@ height = z_top_in + wall;
|
|||||||
n_bezel_in = lip + bezel_t; // bezel inner face (local N)
|
n_bezel_in = lip + bezel_t; // bezel inner face (local N)
|
||||||
n_glass = n_bezel_in + glass_gap;
|
n_glass = n_bezel_in + glass_gap;
|
||||||
n_pcb = n_glass + glass_depth;
|
n_pcb = n_glass + glass_depth;
|
||||||
win_s = disp_raise + gl_y + glass_h / 2; // window centre along the panel
|
win_s = disp_raise + glass_y0 + glass_h / 2; // window centre along the panel
|
||||||
board_x0 = inner_w / 2 - board_w / 2;
|
board_x0 = inner_w / 2 - board_w / 2;
|
||||||
board_conn_y = depth - wall - board_gap; // y of the board's connector edge
|
board_conn_y = depth - wall - board_gap; // y of the board's connector edge
|
||||||
pcb_top_z = standoff_h + pcb_t;
|
pcb_top_z = standoff_h + pcb_t;
|
||||||
@@ -107,17 +93,9 @@ foot_n = n_bezel_in + 6; // insert axis in the beze
|
|||||||
foot_y = foot_n / cos(tilt);
|
foot_y = foot_n / cos(tilt);
|
||||||
foot_xs = [inner_w * 0.25, inner_w * 0.75];
|
foot_xs = [inner_w * 0.25, inner_w * 0.75];
|
||||||
rear_boss = 9; // rear corner boss block size
|
rear_boss = 9; // rear corner boss block size
|
||||||
boss_h = 10; // body boss height before the chamfer
|
|
||||||
rear_screws = [[rear_boss / 2, depth - wall - rear_boss / 2],
|
rear_screws = [[rear_boss / 2, depth - wall - rear_boss / 2],
|
||||||
[inner_w - rear_boss / 2, depth - wall - rear_boss / 2]];
|
[inner_w - rear_boss / 2, depth - wall - rear_boss / 2]];
|
||||||
// front side bosses: far enough back that the display's back stays clear while
|
base_screws = concat([for (x = foot_xs) [x, foot_y]], rear_screws);
|
||||||
// the bezel slides in along the panel
|
|
||||||
n_disp_back = n_pcb + pcb_t + disp_back;
|
|
||||||
front_boss_y = ceil((n_disp_back + 2 + (boss_h + rear_boss) * sin(tilt)) / cos(tilt));
|
|
||||||
front_screws = [[rear_boss / 2, front_boss_y + rear_boss / 2],
|
|
||||||
[inner_w - rear_boss / 2, front_boss_y + rear_boss / 2]];
|
|
||||||
body_screws = concat(front_screws, rear_screws);
|
|
||||||
base_screws = concat([for (x = foot_xs) [x, foot_y]], body_screws);
|
|
||||||
|
|
||||||
echo(str("Outer size: ", outer_w, " x ", depth, " x ", height + base_t, " mm (W x D x H)"));
|
echo(str("Outer size: ", outer_w, " x ", depth, " x ", height + base_t, " mm (W x D x H)"));
|
||||||
|
|
||||||
@@ -159,25 +137,21 @@ module body() {
|
|||||||
for (i = [0 : 3]) translate([inner_w / 2, depth - wall - 14 - i * 8, height - wall / 2])
|
for (i = [0 : 3]) translate([inner_w / 2, depth - wall - 14 - i * 8, height - wall / 2])
|
||||||
linear_extrude(wall + 2, center = true) rrect(inner_w - 50, 3, 1.4);
|
linear_extrude(wall + 2, center = true) rrect(inner_w - 50, 3, 1.4);
|
||||||
}
|
}
|
||||||
// bosses for the base screws, chamfered up into the walls
|
// rear corner bosses for the base screws, chamfered up into the walls
|
||||||
for (p = rear_screws) body_boss(p, true);
|
for (p = rear_screws) {
|
||||||
for (p = front_screws) body_boss(p, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
// rear: in the corner, chamfered into the side and back walls; front: side wall only
|
|
||||||
module body_boss(p, rear) {
|
|
||||||
x0 = p[0] < inner_w / 2 ? 0 : inner_w - rear_boss;
|
x0 = p[0] < inner_w / 2 ? 0 : inner_w - rear_boss;
|
||||||
xw = p[0] < inner_w / 2 ? 0 : inner_w - 0.01;
|
xw = p[0] < inner_w / 2 ? 0 : inner_w - 0.01;
|
||||||
y0 = p[1] - rear_boss / 2;
|
|
||||||
difference() {
|
difference() {
|
||||||
hull() {
|
hull() {
|
||||||
translate([x0, y0, 0]) cube([rear_boss, rear_boss, boss_h]);
|
translate([x0, depth - wall - rear_boss, 0]) cube([rear_boss, rear_boss, 10]);
|
||||||
translate([xw, y0, 0]) cube([0.01, rear_boss, boss_h + rear_boss]);
|
translate([xw, depth - wall - 0.01, 0]) cube([0.01, 0.01, 10 + rear_boss]);
|
||||||
if (rear) translate([x0, y0 + rear_boss - 0.01, 0]) cube([rear_boss, 0.01, boss_h + rear_boss]);
|
translate([x0, depth - wall - 0.01, 0]) cube([rear_boss, 0.01, 10 + rear_boss]);
|
||||||
|
translate([xw, depth - wall - rear_boss, 0]) cube([0.01, rear_boss, 10 + rear_boss]);
|
||||||
}
|
}
|
||||||
translate([p[0], p[1], -1]) cylinder(d = insert_d, h = insert_depth + 1);
|
translate([p[0], p[1], -1]) cylinder(d = insert_d, h = insert_depth + 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// ---------- bezel ----------
|
// ---------- bezel ----------
|
||||||
display_holes = [for (hx = [disp_hole_inset, disp_w - disp_hole_inset])
|
display_holes = [for (hx = [disp_hole_inset, disp_w - disp_hole_inset])
|
||||||
@@ -222,12 +196,8 @@ module base() {
|
|||||||
translate([-wall, 0, -base_t]) cube([outer_w, depth, base_t]);
|
translate([-wall, 0, -base_t]) cube([outer_w, depth, base_t]);
|
||||||
// locating rim inside the side and back walls (stops short of the bezel and bosses)
|
// locating rim inside the side and back walls (stops short of the bezel and bosses)
|
||||||
rim_y0 = 20;
|
rim_y0 = 20;
|
||||||
difference() {
|
|
||||||
for (x = [clr, inner_w - clr - 1.6])
|
for (x = [clr, inner_w - clr - 1.6])
|
||||||
translate([x, rim_y0, -0.01]) cube([1.6, depth - wall - rear_boss - clr - rim_y0, 2]);
|
translate([x, rim_y0, -0.01]) cube([1.6, depth - wall - rear_boss - clr - rim_y0, 2]);
|
||||||
for (p = front_screws) translate([p[0], p[1], 1])
|
|
||||||
cube([rear_boss + 2 * clr, rear_boss + 2 * clr, 4], center = true);
|
|
||||||
}
|
|
||||||
translate([rear_boss + clr, depth - wall - clr - 1.6, -0.01])
|
translate([rear_boss + clr, depth - wall - clr - 1.6, -0.01])
|
||||||
cube([inner_w - 2 * (rear_boss + clr), 1.6, 2]);
|
cube([inner_w - 2 * (rear_boss + clr), 1.6, 2]);
|
||||||
// board standoffs
|
// board standoffs
|
||||||
@@ -251,27 +221,6 @@ module base() {
|
|||||||
|
|
||||||
function board_xy(h) = [board_x0 + h[1], board_conn_y - h[0], 0];
|
function board_xy(h) = [board_x0 + h[1], board_conn_y - h[0], 0];
|
||||||
|
|
||||||
// One foot, top face at z = 0 (against the base's underside), centred on a screw.
|
|
||||||
module foot() {
|
|
||||||
difference() {
|
|
||||||
union() {
|
|
||||||
translate([0, 0, -foot_h]) cylinder(d = foot_d, h = foot_h);
|
|
||||||
translate([0, 0, -0.01]) cylinder(d = foot_spigot_d, h = foot_spigot_h + 0.01);
|
|
||||||
}
|
|
||||||
translate([0, 0, -foot_h - 1]) cylinder(d = screw_d, h = foot_h + foot_spigot_h + 2);
|
|
||||||
translate([0, 0, -foot_h - 1]) cylinder(d = foot_head_d, h = foot_head_depth + 1);
|
|
||||||
// soften the bottom edge
|
|
||||||
translate([0, 0, -foot_h - 0.01]) difference() {
|
|
||||||
cylinder(d = foot_d + 1, h = 1);
|
|
||||||
cylinder(d1 = foot_d - 2, d2 = foot_d + 0.01, h = 1.01);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module feet_in_place() {
|
|
||||||
for (p = base_screws) translate([p[0], p[1], -base_t]) foot();
|
|
||||||
}
|
|
||||||
|
|
||||||
module tie_anchor() {
|
module tie_anchor() {
|
||||||
difference() {
|
difference() {
|
||||||
translate([-5, -3, 0]) cube([10, 6, 5]);
|
translate([-5, -3, 0]) cube([10, 6, 5]);
|
||||||
@@ -282,7 +231,7 @@ module tie_anchor() {
|
|||||||
// ---------- dummies for the preview and the collision checks ----------
|
// ---------- dummies for the preview and the collision checks ----------
|
||||||
module display_dummy() {
|
module display_dummy() {
|
||||||
panel() {
|
panel() {
|
||||||
translate([disp_x0 + gl_x, disp_raise + gl_y, n_glass + 0.01])
|
translate([disp_x0 + glass_x0, disp_raise + glass_y0, n_glass + 0.01])
|
||||||
cube([glass_w, glass_h, glass_depth - 0.02]);
|
cube([glass_w, glass_h, glass_depth - 0.02]);
|
||||||
translate([disp_x0, disp_raise, n_pcb + 0.01]) difference() {
|
translate([disp_x0, disp_raise, n_pcb + 0.01]) difference() {
|
||||||
cube([disp_w, disp_h, pcb_t + disp_back]);
|
cube([disp_w, disp_h, pcb_t + disp_back]);
|
||||||
@@ -310,7 +259,6 @@ if (part == "assembly") {
|
|||||||
color("SlateGray", 0.5) body();
|
color("SlateGray", 0.5) body();
|
||||||
color("DimGray") bezel();
|
color("DimGray") bezel();
|
||||||
color("Gainsboro") base();
|
color("Gainsboro") base();
|
||||||
color("Black") feet_in_place();
|
|
||||||
color("SeaGreen") display_dummy();
|
color("SeaGreen") display_dummy();
|
||||||
color("SteelBlue") board_dummy();
|
color("SteelBlue") board_dummy();
|
||||||
} else if (part == "section") {
|
} else if (part == "section") {
|
||||||
@@ -329,9 +277,6 @@ if (part == "assembly") {
|
|||||||
translate([0, depth, height]) rotate([180, 0, 0]) body(); // top on the bed
|
translate([0, depth, height]) rotate([180, 0, 0]) body(); // top on the bed
|
||||||
} else if (part == "bezel") {
|
} else if (part == "bezel") {
|
||||||
translate([0, 0, -lip]) multmatrix(M) bezel(); // front face on the bed
|
translate([0, 0, -lip]) multmatrix(M) bezel(); // front face on the bed
|
||||||
} else if (part == "feet") {
|
|
||||||
for (i = [0 : len(base_screws) - 1]) // 6 feet, flat side down
|
|
||||||
translate([i * (foot_d + 5), 0, foot_h]) foot();
|
|
||||||
} else if (part == "base") {
|
} else if (part == "base") {
|
||||||
translate([0, 0, base_t]) base();
|
translate([0, 0, base_t]) base();
|
||||||
}
|
}
|
||||||
@@ -343,7 +288,6 @@ else if (part == "check_body_base") intersection() { body(); base(); }
|
|||||||
else if (part == "check_bezel_base") intersection() { bezel(); base(); }
|
else if (part == "check_bezel_base") intersection() { bezel(); base(); }
|
||||||
else if (part == "check_board") intersection() { union() { body(); bezel(); base(); display_dummy(); } board_dummy(); }
|
else if (part == "check_board") intersection() { union() { body(); bezel(); base(); display_dummy(); } board_dummy(); }
|
||||||
else if (part == "check_display_base") intersection() { base(); display_dummy(); }
|
else if (part == "check_display_base") intersection() { base(); display_dummy(); }
|
||||||
else if (part == "check_feet_base") intersection() { base(); feet_in_place(); }
|
|
||||||
// The bezel slides in from below along the panel: sweep it (with the display) down and check.
|
// The bezel slides in from below along the panel: sweep it (with the display) down and check.
|
||||||
else if (part == "check_insertion") intersection() {
|
else if (part == "check_insertion") intersection() {
|
||||||
body();
|
body();
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.4 MiB After Width: | Height: | Size: 1.4 MiB |
Binary file not shown.
|
Before Width: | Height: | Size: 3.1 MiB After Width: | Height: | Size: 3.1 MiB |
@@ -4,11 +4,11 @@
|
|||||||
# your secrets.yaml), or use it as a reference for your own device config.
|
# your secrets.yaml), or use it as a reference for your own device config.
|
||||||
#
|
#
|
||||||
# Wiring (3-pin connector on the display, 9600 8N1):
|
# Wiring (3-pin connector on the display, 9600 8N1):
|
||||||
# pin 1 VCC <- 5-24V supply, up to 1.2A at 5V (not the D1's regulator)
|
# pin 1 VCC <- 5-24V supply, up to 1.2A at 5V (not the ESP32 regulator)
|
||||||
# pin 2 RXD <- MAX3232 T1OUT <- T1IN <- WEMOS D1 R1 GPIO2 / D9 (UART1 TX)
|
# pin 2 RXD <- MAX3232 T1OUT <- T1IN <- ESP32 GPIO17 (TX)
|
||||||
# pin 3 GND <-> supply GND, MAX3232 GND and D1 GND
|
# pin 3 GND <-> supply GND, MAX3232 GND and ESP32 GND
|
||||||
#
|
#
|
||||||
# RXD is an RS-232 input. Without a MAX3232, wire GPIO2 straight to RXD and
|
# RXD is an RS-232 input. Without a MAX3232, wire GPIO17 straight to RXD and
|
||||||
# set `inverted: true` under uart.
|
# set `inverted: true` under uart.
|
||||||
|
|
||||||
esphome:
|
esphome:
|
||||||
@@ -42,9 +42,10 @@ external_components:
|
|||||||
# type: local
|
# type: local
|
||||||
# path: ../components
|
# path: ../components
|
||||||
|
|
||||||
# WEMOS D1 R1 (UNO-sized ESP8266 board).
|
esp32:
|
||||||
esp8266:
|
board: esp32dev
|
||||||
board: d1
|
framework:
|
||||||
|
type: arduino
|
||||||
|
|
||||||
logger:
|
logger:
|
||||||
level: INFO
|
level: INFO
|
||||||
@@ -84,7 +85,7 @@ time:
|
|||||||
uart:
|
uart:
|
||||||
id: uart_vfd
|
id: uart_vfd
|
||||||
tx_pin:
|
tx_pin:
|
||||||
number: GPIO2 # UART1, TX-only; UART0 stays free for the USB logger
|
number: GPIO17
|
||||||
inverted: false # true when wired directly, without a MAX3232
|
inverted: false # true when wired directly, without a MAX3232
|
||||||
baud_rate: 9600
|
baud_rate: 9600
|
||||||
parity: NONE
|
parity: NONE
|
||||||
|
|||||||
Reference in new issue
Block a user