I have a question about how to control this simple LED circuit that is being driven by a battery. I am not using a microcontroller in the set up so the control will have to be something else. The conditions are that sometimes the D1 LED can be shorted (from an external condition) so that the only load will be R1. I would like to be able to detect when D1 is shorted and shut down the circuit and then reenable the circuit when the short is cleared.
I was thinking of using a comparator to sense the voltage between R1 and D1 to make sure it is the forward voltage of D1 but that wont work because when the mosfet turns off this just floats to Vbatt and you couldnt detect the short to know when to turn it back on. Im trying to come up with a simple solution because this seems easy but Im stuck. There is a control signal I will use out of another circuit but it isnt a microcontroller so I was thinking of using an and gate with some other logic signal to detect the presence of a short across D1. The LED has a Vth of about 2.7V. If you think there is an easier way to drive this LED thats helpful too, maybe using the nFET isnt the best way.
Thanks for your help