I'm building a board controlling external stepper motor drivers that have optoisolators (with integrated resistors, these are meant to be driven with 5V and consume 13mA then) on their inputs. As the external boards are connected via cables that may be accidentally disconnected or shorted, I'd like to verify that there is indeed a LED connected on the other side. The signals are generated from an FPGA, so I have a bit of flexibility in the implementation.
Idea 1: Constant-Current 16-Output LED Driver IC with Fault Detection
This integrates everything in a single package, but it seems all of these ICs need data to be shifted in serially (which reduces the number of I/Os required, but adds complexity in the FPGA design). These seem to detect faults only when the channel is active, which is probably good enough, but could be improved. I'm not sure how well these detect faults if a series resistor is present.
Idea 2: 16-Channel Driver, High-Impedance Current Measurement, Comparators
A driver outputs a 0 or 7V signal, 2V drop in a series resistor, then the voltage is compared to 6V and 4V. Above 6V, the connection appears to be open, below 4V, the connection appears to be shorted. The series resistance protects the driver.
Fairly simple logic, detects faults while the LED is on. Downside is that it requires 48 IO pins on the FPGA and 32 comparators (but banks of comparators should exist) for an error condition that should essentially never happen.
Idea 3: "Open-Collector"
A colleague suggested an open-collector system, where I would run the IO pins essentially in bidirectional mode, and drive either 0V or go high-Z, at which current would flow to the LED through a pull-up resistor, however I still haven't quite understood how I could detect a broken connection this way (shorts are easy: while not pulling down, I can set the IO to input mode and check that it is high). Broken connections are more likely than shorts in the wiring.
Are there simpler approaches how I could control 16 optoisolators and detect wiring faults on the way to them?