Skip to content

docs: the Cobalt has no free contact for point feedback - #22

Merged
bazauto merged 1 commit into
mainfrom
docs/point-feedback-s2-is-frog
Sep 22, 2026
Merged

bazauto merged 1 commit into
mainfrom
docs/point-feedback-s2-is-frog

Conversation

@bazauto

@bazauto bazauto commented Sep 22, 2026

Copy link
Copy Markdown
Owner

The board 3 (0x22) point feedback built in #15 assumed each Cobalt iP Digital's S2 changeover was free to read. It is not. This PR records why, so the research isn't lost a second time. An earlier session worked this out, but its findings were never saved.

What was wrong

  • S1 is tied to the motor's own power input. DCC Concepts describe it as "directly linked to the power input wires". Here the motors run from a separate accessory DCC bus, so a point can still be thrown to clear a track short caused by a loco hitting it while wrongly set. S1 would therefore feed the frog from the wrong bus.
  • So S2 powers the frogs from the track bus, which leaves no contact for feedback.

S2 must never be wired to the expander: its common is the frog, and taking it to 0 V shorts a stock rail to logic ground. That warning is now in CLAUDE.md's traps and in both point docs.

What this records

docs/point-position-feedback.md gains The Cobalt has no free contact, which lists the candidate sources:

  • A. Tie-bar sensors (microswitches or 3.3 V Hall switches). They read the blades, are isolated from DCC, and work with power off. They need mechanical fitting.
  • B. Optos across the frog. No mechanical work, and they fit the truth table directly. But they read frog polarity rather than the blades, and they read nothing without track power. That includes the exact short-clearing case the accessory bus exists for: the throw can't be confirmed, and a required point then times out and Safe-Stops. The backend's handling needs checking in bazauto/layout-orchestration before relying on this option.
  • C. An add-on changeover driven by the Cobalt's linkage.

The source is undecided. That choice depends on the physical layout.

Code

No behaviour change. Every candidate presents as two closures to 0 V, so the truth table, the pair allocation, POINTS_ACTIVE_LOW and point_wiring.py all stand. The only code edits generalise comments and test docstrings that named S2.

Verified

python -m pytest: 177 passed.

🤖 Generated with Claude Code

@bazauto
bazauto enabled auto-merge (squash) September 22, 2026 17:16
@bazauto
bazauto merged commit 0975c78 into main Sep 22, 2026
1 check passed
@bazauto
bazauto deleted the docs/point-feedback-s2-is-frog branch September 22, 2026 17:16
The board 3 design assumed each Cobalt iP Digital's S2 changeover was free to
read. It is not. S1 is tied to the motor's power input, which on this layout is
the accessory DCC bus (kept separate so a point can still be thrown to clear a
track short), so S1 cannot feed the frogs. S2 therefore powers them from the
track bus, and nothing is left for feedback.

Record that, warn against ever wiring S2 to the expander (its common is the
frog), and list the candidate feedback sources with their trade-offs: tie-bar
sensors, optos across the frog, or an add-on changeover. The firmware is
unchanged because every candidate presents as two closures to 0 V; only
comments and test docstrings that named S2 are generalised.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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