I would like to protect an MCU from 12V being shorted either to IO or it's 5V supply.
This is very similar to the question asked by kamil here: How to protect microcontroller board 1-wire from accidental +12V connection? with the addition of protecting a 5V line as well.
I've come up with the following circuit (starting from Brendon Simpson's fantastic answer) but would like to know if it will work or there are better designs. I suspect that D3 may not be necessary and I don't know whether the placement of the R2 current limiting resistor will interfere with the operation of D2.
From my reading of the PSMF010X data sheet, at 12V R2 will allow 400mA which cause it to trip. And since we should never normally draw anything like 100mA on the 12V line the PSMF010X should reset on it's own after the short condition is removed. This also protects the power supply if 12V is shorted to ground.
Background: We use 1-wire sensors on fairly long run of up to around 500m. Due to the 5V supply dropping too much over this length to power the pressure sensors connected to the 1-wire boards, we also use a 12V line with an LDO (LP2950) at each sensor to provide them with a solid 5V input.
As we use 4 core cable we also pass 5V out on the remaining core so that we can use it to power less sensitive devices like DS18B20 temperature sensors without the need of an LDO.
As our original 1-wire master devices are no longer available to us I have been experimenting with using an ESP8266 MCU with a 5V level shifter as a master with great success. My only real concern is damage due to the 12V line being shorted to any of the other wires when sensors are being installed or due to some damage to the cables.