What I want is to open the MOSFET once the current passing through it exceeds 3A. A fuse is already being used, but more protection is needed.
There are some options to do it. I could measure the voltage in the MOSFET since its resistance does not change so much (it is around 130mohms). That could be done using a subtractor circuit and reading it with the ADC of a microcontroller (STM32F030R8).
Also it could be used two ADC to measure the voltage directly, just passing by a voltage divider. But it is better to avoid this last option since the uC is almost at its full capacity.
I could also use a gate driver for the MOSFET, but I am not really sure which do use, since I have never worked with one before. Do I need to use one specifically for the p-channel?
If you have a different idea about how to solve the problem, please share with me. But keep in mind I need to solve this using the option with the best cost-benefit.
simulate this circuit – Schematic created using CircuitLab