Electronic – Identifying open switches in a serial circuit

serialswitches

I have an equipment that includes a circuit made of a bunch of NO switches arranged in serial. This circuit includes a LED that turns on when all the switches are closed. When one or more switches are open I need to identify which ones are open. The following image depicts the existing circuit:

schematic

simulate this circuit – Schematic created using CircuitLab

My first approach was to put resistors in parallel with each one of the switches and measure the voltage with an ADC input. This kinda works but I feel it will not be very reliable so I'm looking for a different way to do it.

Can anyone suggest a better way?

Best Answer

If you're using a uC that has enough IO, you can go ahead and wire in a small capacitor to each junction you're interested in connecting to one I/O pin. Then set one pin to Input, the other to Output. Send a short pulse by raising the output from 0 to 1 and back to 0 quickly. Have the Input pin detect whether it received that pulse. If the switch is closed the pulse will be seen through the two capacitors. If it's an open switch, no pulse will be seen. Then just sequentially run through each of the switches performing the same operation described using the two I/O pins on each side of it.

This doesn't give galvanic isolation, but it does eliminate any issue of messing with your original signal.

schematic

simulate this circuit – Schematic created using CircuitLab