hardware: every lamp becomes a neon, and the CELL rule is clear of the dial
ci / linux-arm64 (push) Successful in 4m45s

The dial was overlapping the CELL group rule: it is smaller and lower now, with the
buttons under it, and the rule runs clear above the top lamp.

The real question was cost of going all neon.  The panel has 22 lamps -- eight on the
cell dial, eight instruction lamps, six on the dp row -- so it is about 65 CNY with
NE-2 and about 150 with 10 mm NH-4 lamps and illuminated buttons, against roughly 35
for 6 V filament bulbs.  The money is not the issue; the high voltage is.

Notes recorded in panel.md: 65 to 90 V strike, 0.3 to 1 mA hold, so all 22 lit draw
two watts; ULN2803 is only rated for 50 V, so the drivers have to be MPSA42; and DC
electroplates the cathode until one side blackens, which is why old equipment lit
neons from AC -- either the rail or a reverse diode across each lamp.  NE-2 glow dots
are 2 mm, which is small on a 200 mm panel, so the bigger domestic neons are the ones
that actually look impressive.
This commit is contained in:
dsh committed 2026-11-24 19:18:00 +08:00
1 parent fded52f0b0
commit da57096dc9
3 files changed
+37 -15

No files matched your search

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 58 KiB

+31 -9
View File
@@ -54,18 +54,40 @@
| 项 | 值 |
|---|---|
| 灯环 | 8 × 6 V 灯丝灯泡,ULN2803 驱动(8 路),一个 74LS273 锁存当前格 |
| 指令灯 | 8 × 6 V,另一片 ULN2803 + 74LS138 译码 |
| **`dp` 显示** | 6 颗红氖泡,直接接计数器 `Q` 输出(74LS07/ULN2803 缓冲),见 §3.1 |
| 灯环 | 8 × 氖灯,MPSA42 驱动,一个 74LS273 锁存当前格 |
| 指令灯 | 8 × 氖灯,另一组 MPSA42 + 74LS138 译码 |
| `dp` 显示 | 6 颗氖灯,直接接计数器 `Q` 输出,见 §3.1 |
| 拨码 | 8 位 → 74LS244 → 输入字节总线;SEND = 一个按钮 → `,` 的握手 |
| 按钮 | **STEP · START · HALT · RESET** 四个,74LS14 去抖 |
| 电源 | 5 V(TTL)· 6 V(灯)· 12 V(可选),外置 5 V 2 A 适配器 |
| 电源 | 5 V(TTL)· **90~120 V(氖灯)**,外置 5 V 2 A 适配器 + 高压小模块 |
## 4.1 全氖灯:要多少钱(22 颗)
面板一共 **22 颗灯**:CELL 灯环 8 + 指令灯 8 + `dp` 6。
| 件 | 数量 | 单价 | 小计 |
|---|---|---|---|
| 氖灯 NE-2(6 mm,光点 ~2 mm) | 22 | ¥1 | ¥22 |
| 或 大号氖灯 NH-4/NH-6(10~12 mm,光晕大得多) | 22 | ¥3 | ¥66 |
| 限流电阻 220 kΩ 1/4 W | 22 | ¥0.07 | ¥1.5 |
| 高压驱动三极管 MPSA42(300 V) | 22 | ¥0.4 | ¥9 |
| 灯座 / 焊片 | 22 | ¥0.5 | ¥11 |
| 高压电源 90 V / 20 mA(小反激模块,或变压器 + 倍压) | 1 | ¥20~40 | ¥20~40 |
| 可选:按钮内置氖灯(SEND + 四个键) | 5 | ¥5 | ¥25 |
| **合计** | | | **约 ¥65(NE-2)~ ¥150(大氖灯 + 亮按钮)** |
对比白炽灯方案(22 × 6 V 小灯泡 ≈ ¥33 + ULN2803 ¥2)贵 ¥30~110 —— 在这个项目里可以忽略,
**真正要花心思的不是钱,是高压**:
* **点火电压 65~90 V,维持电流 0.3~1 mA**:22 颗全亮也才 22 mA / 2 W,高压电源很小 ✓。
* **别用 ULN2803 驱动**:它只耐 50 V ✗ —— 用 **MPSA42/MPSA92**(300 V,TO-92,¥0.4)✓。
* **直流会让阴极溅射**(单侧发黑,寿命 ~5~10 kh)。老机器都用**交流**点氖灯:90 V AC 直接驱动,
或者每颗串一个反向并列的二极管让极性交替。这是唯一要认真对待的一条。
* **亮度/大小**:NE-2 的光点只有 2 mm,200 mm 面板上偏小;**NH-4 那种 10 mm 大氖灯**才有
"拉风"的光晕,价格也就 +¥45。
* 氖灯**灭的时候是深色玻璃、能看见电极** —— 这本身就是复古感的一部分,比黑漆漆的灯泡壳好看。
## 5. 待定 / 注意
* **STEP 要不要留**:`START / HALT / RESET` 是 GPT 那版的三键;单步对"训练机"很重要,
我建议保留成四键(**STEP · START · HALT · RESET**),或者把 START 做成"按住 = 连续、
点按 = 单步"。定下来再开孔。
* 卡带上的 27C512 用 UV 版还是 EEPROM 版:UV 有仪式感(擦 20 分钟),EEPROM 调试快。
* 灯色:琥珀最复古;矩阵里"亮"的灯和"灭"的灯对比要够,否则 8×8 看不清。
* 氖灯尺寸(NE-2 / NH-4)要在开孔前定,孔位按实物直径留 0.5 mm 余量。
+6 -6
View File
@@ -28,8 +28,8 @@ INK_DIM = (116, 108, 96)
STEEL = (150, 148, 144)
DARK = (30, 27, 24)
LAMP_OFF = (58, 44, 32)
LAMP_ON = (255, 178, 56)
CURSOR = (232, 66, 44) # red neon: the crosshair that marks dp
LAMP_ON = (255, 116, 44) # neon orange-red
CURSOR = (255, 96, 36) # same neon for the dp lamps
RED_BUTTON = (122, 40, 32)
# one module grid: three columns, two rows, 4 mm gutters
@@ -150,7 +150,7 @@ def main():
# ---- CELL: eight lamps on a dial, LSB at nine o'clock -------------------
section(d, COL[0], 24.6, "CELL", 44)
ccx, ccy, cr = COL[0] + 26.0, 40.4, 10.4
ccx, ccy, cr = COL[0] + 26.0, 42.4, 9.2
d.ellipse([p(ccx - cr), p(ccy - cr), p(ccx + cr), p(ccy + cr)],
outline=(178, 172, 160), width=p(0.25))
bits = [1, 0, 0, 1, 1, 0, 1, 0] # bit 0 .. bit 7
@@ -203,12 +203,12 @@ def main():
(30.0, (52, 92, 58), "START"),
(43.0, (146, 60, 44), "HALT"),
(56.0, (58, 56, 52), "RESET")):
d.ellipse([p(cx_ - 4.0), p(59.2 - 4.0), p(cx_ + 4.0), p(59.2 + 4.0)],
d.ellipse([p(cx_ - 4.0), p(59.3 - 3.9), p(cx_ + 3.9), p(59.3 + 3.9)],
fill=STEEL, outline=(104, 100, 94), width=p(0.22))
d.ellipse([p(cx_ - 3.2), p(59.2 - 3.2), p(cx_ + 3.2), p(59.2 + 3.2)],
d.ellipse([p(cx_ - 3.2), p(59.3 - 3.1), p(cx_ + 3.1), p(59.3 + 3.1)],
fill=colour, outline=(66, 60, 54), width=p(0.22))
tw = d.textlength(label, font=font(1.15))
d.text((p(cx_) - tw / 2, p(64.0)), label, font=font(1.15), fill=INK_DIM)
d.text((p(cx_) - tw / 2, p(63.9)), label, font=font(1.1), fill=INK_DIM)
# ---- lower row ---------------------------------------------------------
d.line([p(12), p(65.4), p(RIGHT), p(65.4)], fill=ORANGE, width=max(1, p(0.3)))
d.text((p(COL[0]), p(ROW_B)), "PROGRAM / 27C512", font=font(1.6), fill=INK)