86 lines
4.8 KiB
Markdown
86 lines
4.8 KiB
Markdown
# Architecture diagram sources
|
|
|
|
The architecture Markdown embeds these 23 SVG figures. Matching PNG previews
|
|
are provided for viewers that do not support SVG. Diagrams describe the working
|
|
architecture; component qualification and schematic-release requirements remain
|
|
in the parent documents.
|
|
|
|
## Figures
|
|
|
|
| Topic | Figures |
|
|
| --- | --- |
|
|
| Power | [Sources](power-sources.svg), [protected branches](power-branches.svg) |
|
|
| Analogue acquisition | [Passive input](analog-input.svg), [thermistor](thermistor.svg), [ratiometric acquisition](ratiometric.svg) |
|
|
| Vehicle CAN FD | [Trunk, termination and service access](can-topology.svg) |
|
|
| Timing inputs | [Crank/cam interface](trigger-input.svg) |
|
|
| Deadman | [Contacts and diagnostics](deadman-inputs.svg), [permit gates](deadman-permit.svg), [output gates](deadman-outputs.svg) |
|
|
| Ignition | [Power](ignition-power.svg), [commands](ignition-command.svg), [current flag](ignition-flag.svg), [grounding](ignition-ground.svg) |
|
|
| Injection | [Power](injector-power.svg), [command](injector-command.svg), [status](injector-status.svg), [grounding](injector-ground.svg) |
|
|
| Generic outputs | [5 V logic](logic-output.svg), [low-side power](sink-power.svg), [supplies and SPI](sink-interfaces.svg), [command bias](sink-command.svg) |
|
|
| Optional DAC | [Output provision](dac-output.svg) |
|
|
|
|
## Editing and regeneration
|
|
|
|
- The 13 block figures have editable `.drawio` sources. Open them in draw.io.
|
|
`build_blocks.py` recreates the original 12 block layouts and `block-connections.json`.
|
|
The CAN topology is maintained directly in `can-topology.drawio`, with its
|
|
own `can-topology.connections.json` manifest; the builder does not overwrite it.
|
|
Running it overwrites manual layout edits, so update the generator when those
|
|
edits should be reproducible, or export the edited `.drawio` directly.
|
|
- The 10 circuit/logic figures are generated by `build_circuits.py`, with a
|
|
separate `*.topology.json` connection manifest for each figure. Change the
|
|
relevant component/net definitions and layout together in that script;
|
|
rerunning it overwrites the generated topology and images. JSON is a review
|
|
manifest, not an independently interpreted rendering input.
|
|
- Reference designators introduced by these drawings are documentation labels,
|
|
not KiCad assignments. Named continuation ports are electrically identical
|
|
only when their names match within the documented domain.
|
|
|
|
Run from this directory using the configured schematic environment:
|
|
|
|
```bash
|
|
python build_blocks.py
|
|
~/.venvs/codex-schematics/bin/python export_blocks.py
|
|
~/.venvs/codex-schematics/bin/python build_circuits.py
|
|
```
|
|
|
|
`export_blocks.py` requires the installed draw.io desktop renderer; restricted
|
|
Electron sandboxes may require an authorized external execution. It exports
|
|
only `.drawio` inputs, keeps editable sources, checks for native SVG text, and
|
|
creates PNG previews. The circuit builder uses Schemdraw and CairoSVG.
|
|
Inspect changed figures at their intended embedded size after rebuilding.
|
|
|
|
Validate each circuit manifest with the installed topology validator:
|
|
|
|
```bash
|
|
~/.venvs/codex-schematics/bin/python \
|
|
~/.codex/skills/electronics-schematic-rendering/scripts/validate_topology.py \
|
|
analog-input.topology.json
|
|
```
|
|
|
|
## Source clarifications in this redraw
|
|
|
|
- The former power-tree branch labelled `+5V_AUX` after 3.3 V filtering is now
|
|
`+3V3_ANA`, matching the dedicated rail description. `+5V_AUX` remains a
|
|
protected branch of `+5V_MAIN`.
|
|
- The passive ADC drawing now shows `C_HOLD` as a shunt capacitor after the
|
|
small isolation resistor specified in the prose. It does not add a separate
|
|
connector-side `R_PROT`. Exact values remain unspecified.
|
|
- The Hall-input drawing separates sensor supply, sensor return and signal;
|
|
the original ASCII alignment could suggest an unintended join. The pull-up,
|
|
divider and parallel filter follow the existing prose.
|
|
- The steering-wheel deadman switches are wired in parallel and present one
|
|
shared `DEADMAN_IN` to the ECU. Either switch can assert permission. One
|
|
`DEADMAN_STATUS` input reports the combined state; the ECU has no per-switch
|
|
observations. The permission and output gates use the single `DEADMAN_OK`
|
|
signal. See the module document for release and stuck-high fault behavior.
|
|
- `VBG_LOCAL_KELVIN` labels the documented local ignition reference at the
|
|
`IGN_PGND` joining point. `LOCAL_GND` in the sink-command figure denotes the
|
|
TLE9104SH local ground reference. Neither denotes a new remote ground path.
|
|
- The obsolete reference to a missing figure in `DIGITAL_INPUTS.md` was removed.
|
|
That module remains described by its existing component-level prose.
|
|
|
|
Protection blocks whose devices or ratings remain unselected are deliberately
|
|
functional. Supply-loss behavior, real pin mappings, ratings and physical fault
|
|
responses still require the validation specified in the module documents.
|