Another high-side current monitor like the Zetex ZXCTxx mentioned by LukeW is the
INA138/INA168. Example using INA138 for your situation:
The maximum recommended voltage over the shunt resistor for accurate current measurements with the INA138/INA168 is 0.5 V. Let's say that we want to measure up to 20 A accurately. In that case the shunt resistor should be:
Rshunt = Ushunt / Ishunt = 0.5 / 20 = 0.025 or 25 milliohmThe output voltage of the INA138/INA168 is given by following formula (see datasheet):
Vout = Ishunt * Rshunt * 0.0002 * RgainSay that you want the 20 A maximum current to correspond to an output voltage of 3.3 V, then you can calculate the gain resistor as follows:
Rgain = Vout / (Ishunt * Rshunt * 0.0002) = 3.3 / (20 * 0.025 * 0.0002) = 33000 or 33 kiloohmYou can then feed this output to the ADC input of your microcontroller. Note that the accuracy depends on the stability of the reference voltage (power supply) of your microcontroller. Depending on the desired accuracy using Vcc may not be the best reference.
I've used the INA138 before in automotive projects but never to protect MOSFETs. I would imagine that you need
very fast response if you want to protect a plain MOSFET against a dead short. If you're more concerned about protecting your MOSFETs than the actual current consumption, I would recommend to look at protected high-side switches instead as mentioned by Andreas and halexa.