Using a transistor to power LED light strip

I'm currently trying to use a transistor to power some LED lights as the Arduino board doesn't supply enough power to run them. here is what I've made so far but nothing is working.

Please post a wiring diagram, not a Fritzing picture.

The transistor is not necessary for WS2812 strips. I doubt that the strip would like having its ground switched, anyway.

Connect the external 5V power supply to the 5V and ground of the strip. Connect the Din and ground to the Uno.

It is recommended that you connect a 330 - 470 Ohm resistor in series between the Uno output pin and the Din of the strip and a 1000uF cap across the strip power connections (observe polarity).

See this page for more information.

I understand that I don’t need it just running from the board but I have a small project that requires external power to be switched on to power the lights using a transistor because without it the light strip drains the 5v portable power supply even when the lights are off

Then use a PNP transistor or P channel MOSFET to switch V+ instead of switching ground. Set the output pin to INPUT before powering down the strip so that the output will not "back power" the strip.

What are you using the transistor for?
If you want to turn ALL the LEDs off, just command them OFF.

Tom... :grinning: :+1: :coffee: :australia:

And that is indeed correct. The "NeoPixels" or whatever you choose to call them, have a "dark" current of about 1 mA each, so a strip of 100 will draw 100 mA with all turned "off".

Hi Tom, I’ve already done that in my project but even when the lights are off they still draw power so I wanted the transistor to only supply power when I needed it