In many microcontroller projects, we need to control loads such as relays, bulbs, or motors. From microcontroller side, we simply send a signal that turns the device on or off. Microcontrollers usually don’t care what’s going on further – is load switched on, or is it failing? Of course, we can build feedback and read voltage from sense resistor and switch load off in case it draws too much current. But sometimes, relying on the microcontroller to work reliably when it can be hung due to overload conditions is not accepted. We need to use passive methods of protection. Few additional discrete components can make a big difference. Anthony suggests a transistor-based overload protection circuit, which doesn’t do anything in normal conditions. But once the current exceeds the limit, it shuts off switching the MOSFET transistor immediately, thus probably saving the rest of the circuit from frying.
A straightforward solution is to use NPN transistor, which base is connected to the load current sense resistor. It value is selected so that voltage drop on load threshold current would open transistor and thus tie main switching transistor gate to ground. Such circuit breaker responds pretty fast. Initial tests show that it takes less than 150ns to respond. The main downside of this circuit is that once shut, it tries to switch load again and again even if it’s failed, as long as the control signal is “on” from microcontroller side. In this case, Anthony suggests using latching circuit made of NPN and PNP transistor pair. In that case, to restart load, the microcontroller needs to switch control signal to “off” and then to “on” to switch load again. If you feel that there is a chance of failure of load circuit – additional safety feature won’t hurt.