I am building a lamp using 5 1-Watt LEDs, an 18V DC power supply and an Arduino for dimming/controlling it. Im using a simple design (below) for the constant current driver (as was used here for example). The MOSFET I have is not logic level (it's a FQP50N06) but it opens enough at 5V to pass the 350mA that feed the series of 5 LEDs.
This circuit works fine when the Arduino is On; my problem is when the MC is turned Off, and the PWM pin is (I guess) floating, the LEDs are still powered (though slightly dimmer). I am looking for a way to modify this circuit so that M1 shuts down when the MC is Off. (Assuming that the power supply V1 is still On.)
Any idea? thanks!
simulate this circuit – Schematic created using CircuitLab