Electronic – Safely detecting presence of 12v applied via exposed terminals for use with microcontroller

fetthermistor

I have a board which contains a microcontroller and a 10k NTC thermistor (B57421V2103J62) wired to two external terminals, one of which is common with the board ground plane. The terminals are exposed on the outside of the case and, when the case is docked with a host device, the thermistor is connected to 12v via a 10k series resistor (on the host side). Apart from it being common with VSS the thermistor is not otherwise wired into the logic on the board.

I want to use the presence of voltage across the thermistor to detect when the case is docked (as there's no other reliable means of doing so). Within the operating temperature range of the hardware the voltage I would normally see on the thermistor contact could be in the range of roughly 10v down to 3v.

What I need to do is pull a 2.5v line either high or low (doesn't matter which) when the above voltage is applied and hand that to the micro. In the process of doing so I cannot pull any meaningful current from the thermistor circuit as doing so would alter its behavior.

I expect this is pretty straightforward with a FET but given the terminals are exposed (can be touched for example) I need to ensure it's properly protected, and I'm unsure about the most appropriate approach.

I was thinking of using an e.g. BSS138 with S tied to VSS, D to the 2.5v rail via a 1M series resistor and a 10k resistor in series with the gate which is then tied to the thermistor.

Does this sound reasonable? If so is there anything else I could/should do (such as add a zener?)

Edit: The micro is a PIC24H running at 2.5v. Speed isn't an issue.

rough concept

Best Answer

This would probably work, but to be on the safe side, I'd use an optocoupler, or a similar electrical isolation device in place of using a single MOSFET. The problem is the GD capacitance of the MOSFET, which, if in a case of a high frequency gate voltage rise may result in a transient voltage rise on the microcontroller pin before this parasitic capacitor has a chance to charge up.

Using a series resistor to the gate will only make the gate capacitor charge slower, so I'd drop it completely. With a FET device, you almost never need a series resistor, since the gate is not composed of a diode which you need to protect from drawing too much current, as in a bipolar device. The size of the pullup resistor will dictate how fast the parasitic capacitance will charge, so choosing it to be as small as possible seems like a good option, but it'll increase the static power consumption of your circuit considerably.