Other Parts Discussed in Thread: LM339, LM393, LM2901, TLV7011
Hello,
Background
I have a "digital" signal that I need to monitor on a 5V microcontroller input pin. The signal has a value of ~12V for OFF and ~60V for ON, so I'm dividing this signal down such that 60V == 5V.
However, since the OFF state is at 12V, this results in a value of 1V after the divider, which is above the ON threshold for my microcontroller input.
So, my plan is to use a comparator with a threshold of 2.5V to handle this.
Issue
It is possible for this input to be powered while my microcontroller board is not. I see a lot of comparators and microcontroller inputs that specify the maximum input voltage in terms of X+Vcc, but in this case, Vcc would be 0.
I know that if I limit the current, I can probably get away with allowing it to just conduct through the intrinsic body diodes, but I feel uneasy about this approach since it has the potential of actually powering up the board though the input or maybe causing latchup!
I was thinking about using one of those analog switches with "powered off protection", but it would be better if I could just find a comparator that can handle this natively.
A bonus would be if the comparator could tolerate some over/under voltage on the input so that it can be used as a clamp. Right now, I have a small cap and a zener after my resistor divider so try and clamp any voltage spikes, but it would still be nice to have a little tolerance on the comparator.
- Are there any comparators that can tolerate overvoltage on the input by means other than conducting it to Vcc though the body diode?
- Should I just use an analog switch in front of the comparator?
Any advice or suggestions would be appreciated!
Thanks!