I have a Arduino Mega hooked up to a WS2812B light strip and am using FastLED to control it. I have a 330 ohm resistor on the data line of the light strip. I also have an IR Receiver on another data port and a sound sensor on an analogue port.
When I draw power for the led light from the Arduino itself (via USA port of computer) everything works as I expect. The led lights turn on and off according to the program. However, as soon as I switch the led strip over to an external power supply (5V40A) and the the Arduino sends a signal to turn on the led lights the whole string lights up with random colors.
I initially didn't have the 330 ohm resistor on the led data line so I added that thinking maybe this was a noise issue but it give the same results. Does anyone have any idea what I might be doing wrong?
If groundFungus suggestion does not work, I expect it will, post a schematic, not a frizzy thing and links to the technical information on all the hardware devices. Also go back to ground zero and remove the 330 Ohm resistor.
Why would you do that against the standard advice?
This must be a very short WS2812B light strip if you can connect it to the "5V" pin on the Arduino to derive power from the USB connection without "blowing" the polyswitch! You could only light maybe ten LEDs to full white before it shuts down, and do bear in mind that the WS2812/ "Neopixels" draw 1 mA each even when dark.
I issue resolved itself when I powered the Arduino from the same power supply as the led light strip instead of powering the Arduino from the usb port.
So it presumably was failure to connect the power supply and Arduino ground together.
Powering the Arduino "5V" pin and ground from the same 5 V supply as the LED strip is indeed the correct way to do it however you need to disconnect (just) the "5V" pin whenever you connect the USB port to a PC.