Compare commits

...
2 Commits
Author SHA1 Message Date
mangavalkandClaude Opus 5.5 640ac243be Docs: WEMOS D1 R1 (ESP8266) instead of ESP32
The reference build now uses a D1 R1. The example config targets
esp8266/d1 and sends on GPIO2 (header pin D9, UART1 TX), which leaves
UART0 free for the USB logger. The README wiring and signal-level notes
are updated to match.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 18:19:24 +01:00
mangavalkandClaude Opus 5.5 4aaa1a4610 Case: two more body screws near the front
The base only screwed to the body at the back. New bosses in the side walls sit just behind the display, clear of the bezel's slide-in path; the base rim gets a gap around them and the feet part now has 6 feet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 21:24:44 +01:00
8 changed files with 65 additions and 35 deletions

No files matched your search

+1 -1
View File
@@ -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 ESP32 pin needs `inverted: true` on the UART TX in config); a directly wired ESP8266 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 =
+25 -10
View File
@@ -42,7 +42,7 @@ external_components:
uart: uart:
id: uart_vfd id: uart_vfd
tx_pin: GPIO17 tx_pin: GPIO2 # D1 R1 pin D9 (UART1 TX on the ESP8266)
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,6 +54,10 @@ 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
@@ -65,13 +69,16 @@ 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 ← ESP32 GPIO17), see below | | 2 | RXD | MAX3232 T1OUT (T1IN ← D1 R1 GPIO2), see below |
| 3 | GND | supply GND, MAX3232 GND **and** ESP32 GND | | 3 | GND | supply GND, MAX3232 GND **and** D1 R1 GND |
### Power ### Power
@@ -83,21 +90,21 @@ for example 12 V at 1 A, and connect the grounds together.
### 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 ESP32 pin idles at the negative level (mark). It tolerates ±30 V, so a 3.3 V ESP8266 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 ESP32's 3.3 V, then wire GPIO17 → T1IN and Power the MAX3232 from the D1's 3.3 V, then wire GPIO2 → 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: GPIO17`. inversion itself, so use the plain `tx_pin: GPIO2`.
- **Direct from the ESP32.** A plain TTL signal arrives inverted, so wire - **Direct from the ESP8266.** A plain TTL signal arrives inverted, so wire
GPIO17 straight to RXD and invert the pin in the UART config: GPIO2 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: GPIO17 number: GPIO2
inverted: true inverted: true
baud_rate: 9600 baud_rate: 9600
``` ```
@@ -109,6 +116,14 @@ 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
@@ -209,7 +224,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 ESP. | | `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.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
+4 -4
View File
@@ -20,23 +20,23 @@ 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) | 4 feet, print in **TPU**. Each clamps under one of the base screws, with a spigot that locates in the screw's counterbore. | | [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
- 12 × M3 heat-set inserts, CNC Kitchen M3 × 5.7 (about 4.6 mm OD; the holes - 14 × M3 heat-set inserts, CNC Kitchen M3 × 5.7 (about 4.6 mm OD; the holes
are 4.2 mm and 6 mm deep, set by `insert_d` if your printer runs tighter or are 4.2 mm and 6 mm deep, set by `insert_d` if your printer runs tighter or
looser): 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 - 2 in the body's rear corners and 2 in its side walls, behind the display
- 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×6 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
- 4 × M3×8 to hold the base on, from below (also with the TPU feet) - 6 × M3×8 to hold the base on, from below (also with the TPU feet)
## Assembly ## Assembly
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
+27 -11
View File
@@ -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 bosses in the body, 4 board standoffs on the base. // 2 rear corner + 2 front side 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 M3x6).
// 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 (4x M3x8). // 5. Wire up, put the body on the base and screw it together from below (6x 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",
@@ -107,9 +107,17 @@ 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]];
base_screws = concat([for (x = foot_xs) [x, foot_y]], rear_screws); // front side bosses: far enough back that the display's back stays clear while
// 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)"));
@@ -151,21 +159,25 @@ 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);
} }
// rear corner bosses for the base screws, chamfered up into the walls // bosses for the base screws, chamfered up into the walls
for (p = rear_screws) { for (p = rear_screws) body_boss(p, true);
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, depth - wall - rear_boss, 0]) cube([rear_boss, rear_boss, 10]); translate([x0, y0, 0]) cube([rear_boss, rear_boss, boss_h]);
translate([xw, depth - wall - 0.01, 0]) cube([0.01, 0.01, 10 + rear_boss]); translate([xw, y0, 0]) cube([0.01, rear_boss, boss_h + rear_boss]);
translate([x0, depth - wall - 0.01, 0]) cube([rear_boss, 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([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])
@@ -210,8 +222,12 @@ 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
@@ -314,7 +330,7 @@ if (part == "assembly") {
} 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") { } else if (part == "feet") {
for (i = [0 : len(base_screws) - 1]) // 4 feet, flat side down for (i = [0 : len(base_screws) - 1]) // 6 feet, flat side down
translate([i * (foot_d + 5), 0, foot_h]) foot(); 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();
+8 -9
View File
@@ -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 ESP32 regulator) # pin 1 VCC <- 5-24V supply, up to 1.2A at 5V (not the D1's regulator)
# pin 2 RXD <- MAX3232 T1OUT <- T1IN <- ESP32 GPIO17 (TX) # pin 2 RXD <- MAX3232 T1OUT <- T1IN <- WEMOS D1 R1 GPIO2 / D9 (UART1 TX)
# pin 3 GND <-> supply GND, MAX3232 GND and ESP32 GND # pin 3 GND <-> supply GND, MAX3232 GND and D1 GND
# #
# RXD is an RS-232 input. Without a MAX3232, wire GPIO17 straight to RXD and # RXD is an RS-232 input. Without a MAX3232, wire GPIO2 straight to RXD and
# set `inverted: true` under uart. # set `inverted: true` under uart.
esphome: esphome:
@@ -42,10 +42,9 @@ external_components:
# type: local # type: local
# path: ../components # path: ../components
esp32: # WEMOS D1 R1 (UNO-sized ESP8266 board).
board: esp32dev esp8266:
framework: board: d1
type: arduino
logger: logger:
level: INFO level: INFO
@@ -85,7 +84,7 @@ time:
uart: uart:
id: uart_vfd id: uart_vfd
tx_pin: tx_pin:
number: GPIO17 number: GPIO2 # UART1, TX-only; UART0 stays free for the USB logger
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