Electronic – Detecting on- and off-state of a micro switch

current measurementreliabilityswitches

For safety reasons I need to make sure that I am still detecting the correct state of a micro switch and not for example a loss of power, broken cable, etc.

What are cheap and reliable ways of doing this?

To be clear, I need three kinds of signals (examples in parenthesis), on (I=5 mA), off (I=1mA), cable broken/etc. (I=0mA).

If possible I'd prefer some theory behind the solution(s), a book with the basics of such circuits for references would be greatly appreciated.

Best Answer

As I understand, you can't change the switch to a SPDT one, which would be the simplest.

Therefore, a possible solution (keeping the SPST switch you have now) is to add a resistor in parallel with the switch. Here is an example with a 5V supply and the currents you suggested in your example:

schematic

simulate this circuit – Schematic created using CircuitLab

Here, there are four possible states you can detect:

  • 5mA when the switch is closed
  • 1mA when the switch is opened
  • 0mA when one of the long wire is broken (fault)
  • 10mA when the long wires are shorted (fault)

Of course, you can't cover ALL kind of fault cases. For example, if the switch itself is broken (stays closed or opened all the time), you won't be able to detect this. Same if there is one faulty resistor. What you can detect here is when the long wires link is faulty.

Now, regarding the theory behind this: just Ohm's law.