I am designing a lamp based on neopixel leds and arduino. I'm designing the badge on Eagle and I've noticed a problem. I have noticed that with the consumption of the LEDs (5A) when the user tries to program the lamp Will try to turn on the leds of the usb and can be damaged. How can I make the lamp only turn on when the Power supply is connected and if the USB is not alone?
I have thought of a system based on MOSFET
Best Answer
You could just use a schottky diode, a large (1Mohm recommended) resistor to drain diode leakage to GND, and an N-channel FET to detect power supply power, and cut off all the LEDs any time the power supply isn't providing voltage.
Something like this:
simulate this circuit – Schematic created using CircuitLab