A couple of things i noticed:
- My zener voltage reference was not compatible with the feedback resistor resistor. I had to remove it, but for my application i guess a regular voltage divider is acceptable.
The zener is fine, you don't need the cap. If it's noisy, so what, it'll randomly trigger at a slightly higher threshold, just tweak the resistor divider by the same margin to get the same DC value.
BTW, low voltage zeners are terrible voltage regulators anyway, not much better than a diode junction. Looks like that "3.3V" zener is dropping only a volt? No, it's worse than that, it's not conducting at all, the divider to the zener is only making a volt...
You'd have to change R5 to about 470, to get the specified voltage (1N5226 rated 3.3V at 20mA).
For a fuse sort of thing, I'd be fine with a diode junction, with dividers set so it meets the minimum threshold at maximum operating temperature (diode Vf varies inversely with T, so it'll also handle more current at low temperatures...which maybe isn't a bad thing anyway?). Next step up from that is a luxurious band gap voltage reference, such as TLV431 -- accurate within a few percent, but still pretty cheap.
Or, if your supply is stable (maybe a 12V switching supply, or a battery), the bare divider really isn't going to be much of a problem.
- I was not able to to place the feedback resistor to the input on the negative input of the opamp. (i'm new to adding hysteresis to comparators)
Duh, put a series resistor between shunt and comp pin.
- This system triggers VERY fast when a over current happens. This can be a problem for capacitive loads which WILL be pressent. Therefore i need a delay before it triggers. R11,C4, D1 and R12 take care of this. The delay is appox. 30ms.
Hmm, again the 1N5226 won't do much, and it would be helpful to have some biasing on it, and also some turn-off current -- both served by a B-E resistor on Q2.
The sucky part is, you need a high resistance for the divider, to get a reasonable time constant without loading the output (which only has R8 pulling it up). So the B-E resistor can't be much, and you can't get more than a tiny amount of bias through the zener.
If you don't mind that the delay is temp dependent, just set the R11-R12 divider for 1-1.5V (assuming no D1/Q2 load) and use the BJT's Vbe as threshold, no zener needed. (Again, it's inversely proportional to T, same as diode Vf. So, it'll be shorter delay at high temp... which again seems maybe actually useful?)
Oh, also supply dependent, in much the same way as the threshold divider is. You could mitigate that by clamping the comparator's "high" level -- a 1N5231 from GND to pin 1, say. This changes the hysteresis band, so adjust the feedback resistor as well.
So my main questions are:
1) Do you think my schematic is optimal, or should i improve things? Am i still at risk the FET will go into the linear region?
Optimal in what sense? You've provided very few specifications for this; if "optimal" is "it works", I think you've struck it, but it is a rather wide target.
3) What do you think about my solution for the inrush current. Any ways to improve this? Maybe without a zener?
4) What is sensible time for the circuit to wait before it triggers?
Basically the circuit should trigger at currents above 1A. High currents are allowed up to 30ms. The circuit retries after 1 second.
Well I guess you answered your own question -- is that a new specification, 30ms overload tolerance?
Also if it's fully 30ms, why not use -- *drumroll* -- a polyfuse? Far higher energy handling than the MOSFET, and will take about that much time to open.
Regarding the transistor,
https://www.infineon.com/dgdl/irf7404pbf.pdf?fileId=5546d462533600a4015355fa31be1ba0 Fig.8 SOA shows full current handling for 10ms, up to only 2V. So it would seem you will need a considerably larger transistor to handle complete short-circuit conditions.
Quite possibly, your supply won't even be able to maintain its output under such loads, in which case Vgs(on) will even drop during the fault (which can help limit current, but again puts the transistor in its linear range?).
So, the problem is poorly specified -- you need source characteristics, load characteristics, response time, what kind of peak currents are allowable under which conditions, etc.
It can be practical to design load switches with a relatively high Rds(on), so that peak fault current is limited by the transistor, and the transistor has a relatively large tab compared to its peak power rating, so that it's able to survive it. Example, 12V * 100mA = 1.2W, easily handled by a SOT-89 or SOT-223 part; 12V / 100mA = 120 ohms, which you aren't going to find in an Rds(on) in a transistor that size, but a current limiting circuit (like a "ring of two" type) would do a fine job, or a depletion mode MOSFET could be used (which can limit current passively by itself; downside, they're harder to turn off, requiring negative bias).
Whereas with a very low Rds(on) and a small package, like the 40mohm SO-8 shown above, the peak fault current up to 27A or so (essentially the pulsed drain current) has basically no hope of survival, for any length of time (evidently, around 200us).
Oh, also, the situation is a little better due to the current shunt, which acts as source degeneration here. Hm, at 27A, the 50mohm is only dropping 1.35V, basically nothing. If it were more like 5V, it would act to reduce Vgs(on), limiting current -- but much more resistance is needed to do that.
Tim