I designed a 48-channel optoisolated digital input module, something having to do with a submarine. The customer wanted built-in-self-test, so I did this:
The idea is to transformer-couple in a positive pulse and force the opto on, then a negative pulse to force it off, and check those in the FPGA. The original pulse sequence was intended to be +24 volts, then immediately -24, so we could test fast, essentially invisible to the customer in normal operation. It tests everything but the input resistor, which is light-years ahead of the previous/obsolete design.
Here's the transformer driver:
But someone (not naming names here) screwed up. The transformers saturate in about 10 us at 24 volts, and that's not enough time for the optos to turn off if the customer has been driving them hard.
So we rescaled it to use 12 volt BIST pulses. That almost works but the OFF timing is marginal, 20 us pulses at +-12 volts. The only fix seemed to be to get new transformers with more volt-second saturation.
Then someone (no names) came up with this:
The idea is to pre-magnetize the transformers, almost to saturation, before making the real test pulses. That gets us 30 us test pulses, plenty good. We threw in the final 15 us blip to remove any residual circulating current. Karla did the FPGA spin in 15 minutes.