RGB LED Strip without 5v power supply....

I Plugged a RGB LED 5v WS2812B LED Strip Into A Arduino Mega 2560 No Other Power Supply Just The Usb And A 9v battery to the Arduino. It worked fine but idk if its safe to keep doing this.

The Info Is:
Product Name: WS2812B
Model:HC-F57-60L-60LED-B
Working Voltage:DC5V
Power:18W/M(3.3ft)
Quantity:60LEDs/M(3.3ft)
Connection:
VCC:RED
DAT:GREEN
GND:WHITE
Length:3.3ft Long

I'm guessing you've only tested it with one LED on at a time. Certainly not at full power because if your battery is a little rectangular 9V thing then it can't supply anywhere near full power.

You didn't say how long the strip is and that's important. 18W/M at 5V is 3.6A/M. The 5V pin is capable of supplying around a 10th of that. So unless your LED strip is less than 10 cm long it ain't safe. If you ever switch all the LEDs on at once you can say goodbye to that Mega.

Steve

The Mega alone draws about 70mA, and that's already beyond the ability of most (cheap) 9volt smoke alarm batteries.
60 WS2812B LEDs could draw 60*60mA= 3.6Amp @ full white.
You need a 5volt power source that can deliver at least that current,
and don't assume you can power the LEDs through/from the Arduino.
Don't forget the resistor in the data line, and the cap across the supply of the strip.
Leo..

CodingWiz:
It worked fine but idk if its safe to keep doing this.

So, no! :astonished:

Echoing the others, just for emphasis.

Don't use "Vin" or the "barrel jack" for projects that require other parts (or shields) connected to the basic Arduino.

Don't use the USB jack to provide more than 450 mA out from the "5V" pin.

Use a proper, regulated 5 V supply ("phone chargers" are available for up to about 3.1 A, more than that you need one of those ones in the metal case) and feed the Arduino itself via the "5V" pin.

Example link only, not necessarily a recommendation!