Skip to content

Research: custom PCB to replace V1 MCU COTS assembly (#208) - #209

Open
jantman wants to merge 2 commits into
mainfrom
robot-army/issue-208-research-custom-pcb-to-replace-the-cots
Open

jantman wants to merge 2 commits into
mainfrom
robot-army/issue-208-research-custom-pcb-to-replace-the-cots

Conversation

@jantman

@jantman jantman commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Research doc for #208: docs/features/custom-mcu-pcb.md. Documentation only: no firmware, ESPHome config or server code changes, and nothing ordered. Second revision, reworked after Jason's answers (recorded in section 0).

Headline recommendations

  • Architecture: one lid-mounted board carrying the LCD, RFID reader and status LED; the Oops button and the M12 panel socket are the only internal cables. M12 A-coded 8-pin and the V1 pinout are kept; IP54.
  • RFID reader (main sourcing risk): any reader must deliver the full 32-bit EM4100 ID, because ESPHome's wiegand truncates 26-bit frames to 24 bits, and it must report card presence. Rev A recommendation: ID Innovations ID-12LA (distributor-stocked; ASCII output parsed by ESPHome's built-in rdm6300; Tag-in-Range pin for card presence), plus a Wiegand fallback header. An on-board EM4095 with a PCB antenna is proposed as a separate cost-down study (about $27 per unit cheaper, but needs a new ESPHome component).
  • MCU: ESP32-WROOM-32E / -32UE soldered to the board (one footprint for plastic and metal housings), not a socketed dev board.
  • Load switching: gold-clad signal relay as a pilot contact (handles VFD inputs drawing a few mA); a fail-safe MOSFET driver; second-relay output ANDed with the primary drive; tamper moved off strapping pin GPIO12.
  • Cost: the board itself is cheaper than the V1 parts it replaces; the ID-12LA adds about $25 per unit.

Needs Jason

Section 14 lists the decisions needed: the reader path, the V1 reader bit format, module vs dev board, button/LED styles, pilot relay type, and OK for hardware/v2_mcu/.

Refs #208.

🤖 Generated with Claude Code

https://claude.ai/code/session_01KQ8DrLoknL3m1Wq3Um6vAe

Research doc for a custom PCB to replace the V1 COTS assembly in the
MAC MCU box, in the feature-doc format so its implementation plan can
follow once approved. No firmware, ESPHome config or server changes.

- Enclosure constraints first: base-mounted 90x70 mm board with keyed
  JST-XH cables to lid parts, keep M12 A-coded 8-pin and V1 pinout,
  IP54/IP65 and temperature targets, antenna/metal keep-outs.
- ESP32-WROOM-32E-N4 (WROOM-32D is NRND), same esp32dev pin map, so
  the existing config works unchanged.
- Relay stays a pilot contact only: M12 8-pin is rated 30 V / 2 A,
  so mains must not run through pins 3/4. Fail-safe low-side driver,
  second-relay output ANDed with primary drive in hardware.
- Tamper moved off strapping pin GPIO12 to GPIO35; CT input on GPIO36;
  DNP external watchdog footprint; EN supervisor; input/ESD protection.
- Draft BOM with LCSC prices looked up 2026-11-25, JLCPCB fees, and a
  cost comparison against V1 (roughly cost-neutral).
- Open questions for Jason (unit count, machine list, mains on M12,
  fob technology, outdoor scope, hardware/v2_mcu layout).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KQ8DrLoknL3m1Wq3Um6vAe

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code review
From Claude, via the Claude PR Review workflow -- hence github-actions[bot].

Documentation-only PR adding a research doc (docs/features/custom-mcu-pcb.md) for a custom MCU PCB. No code, firmware, or config changes; no bugs or CLAUDE.md violations found.

No issues found. Checked for bugs and CLAUDE.md compliance.


🔎 10s · 4 turns · $0.1018 · run log

@github-actions

github-actions Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Coverage

Coverage Report
FileStmtsMissBranchBrPartCoverMissing
src/dm_mac
   __init__.py1160280100% 
   cli_utils.py15000100% 
   neon_fob_adder.py2321560593%78->79, 79, 116–117, 124, 208->205, 269->270, 270, 333–334, 341, 364–367, 440->445, 454–456, 551->549
   neongetter.py231160399%313->314, 314, 455->459, 535->537
   slack_handler.py2200560100% 
   utils.py25040100% 
   webhook.py620100100% 
src/dm_mac/models
   __init__.py0000100% 
   api_schemas.py49000100% 
   machine.py658152181696%670->671, 671, 677->exit, 750->751, 751, 799->801, 1125->1126, 1126–1128, 1191->1193, 1243->1244, 1244–1253, 1416->exit
   users.py1030320100% 
src/dm_mac/views
   __init__.py0000100% 
   api.py41000100% 
   machine.py1030120100% 
   prometheus.py132012199%67->69
TOTAL1987314922598% 
Tests Skipped Failures Errors Time
379 0 💤 0 ❌ 0 🔥 26.125s ⏱️

Rework the V2 hardware research around Jason's 2026-11-25 answers:
single lid-mounted board (LCD, reader, LED on board; button and M12 on
short cables), M12 8-pin kept, IP54, 5 + 6 units with ~10 more,
<=1 A SELV pilot loads only, no mains on M12, 125 kHz EM4100 fobs.

- New reader section: any reader must deliver the full 32-bit EM4100
  ID (ESPHome wiegand truncates 26-bit frames to 24 bits) plus card
  presence. Compares the V1 AliExpress module, ID Innovations ID-12LA
  (ASCII output parsed by ESPHome rdm6300, Tag-in-Range pin) and an
  on-board EM4095 + PCB antenna. Recommends ID-12LA for rev A with a
  Wiegand fallback header, and EM4095 as a separate cost-down study.
- Module-vs-dev-board trade-off table; recommends soldered module
  (WROOM-32E / -32UE share a footprint for metal housings).
- Pilot relay changed to a gold-clad signal relay (G5V-1) for VFD
  dry-circuit inputs; button LED now MOSFET-driven for any LED voltage.
- Proposed (not applied) ESPHome diff for the ID-12LA; updated BOM,
  cost comparison at 10/25/50 units, open questions and milestones.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KQ8DrLoknL3m1Wq3Um6vAe

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code review
From Claude, via the Claude PR Review workflow -- hence github-actions[bot].

Documentation-only PR adding a research doc (docs/features/custom-mcu-pcb.md) for a custom MCU PCB. No code, config or CLAUDE.md-rule violations found; no new high-signal issues beyond earlier review coverage.

No issues found. Checked for bugs and CLAUDE.md compliance.


🔎 13s · 5 turns · $0.1038 · run log

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant