Back to engineering archive

Record 022 / Sensing and instrumentation

Three-channel cable contact indicator draft

An archived draft uses a keypad matrix to track three contact states, displays GOOD/BAD flags on an SSD1306 OLED and drives an all-good output.

Archived firmware draft
Keypad matrixSSD1306 OLEDI2CContact indication

Archived source flow

Selected cable-contact loop: scan matrix state changes; for each key slot update cached key/state when changed and apply cached HOLD/RELEASED mapping to three flags. Display GOOD/BAD and drive an output from the AND of all three flags. This is not calibrated fault measurement.
Matrix-contact handling reconstructed from archived source. Three contact states are indicated; physical hookup and hardware operation are unverified. View diagram at full size

Technical notes

Matrix contact handling

The Keypad scanner uses a 4×4 matrix with a 50 ms HOLD setting. HOLD and RELEASED events for three mapped contacts set or clear the cable1, cable2 and cable3 flags.

Local indication

The I2C SSD1306 view shows GOOD/BAD for each flag. One output is high only when all three flags are true; the loop then delays 5 ms. Serial is used only for setup and an allocation-error diagnostic, not an application data-transport path.

Measurement and state limits

The implemented input is library-scanned contact closure. No resistance, cross-wire or calibrated fault-analysis routine is present. Cached key/state variables are reused outside the stateChanged block, so multi-contact updates and physical cable behaviour remain unverified.

Engineering archiveArchive record

Project enquiries

Discuss your project.

Tell us what you’re developing and where you need engineering support.

Discuss your project