WS2812B LED Strip Turning On Without Ground Connected

Hey everyone, so I have an old WS2812B 5V LED strip I am wiring up to an ATMEGA328 Arduino Nano. It has three wires: red (5V), green (DATA), and white (GND) I connected to 5V, D2, and GND on the Nano respectively. Here is the program I uploaded:

#include <FastLED.h>

#define LED_PIN 2
#define NUM_LEDS 6

CRGB leds[NUM_LEDS];

void setup() {
    FastLED.addLeds<WS2812B, LED_PIN, GRB>(leds, NUM_LEDS);
}

void loop() {
    leds[0] = CRGB::Red;
    FastLED.show();
    delay(1000);
}

For some reason the LED wasn't turning on, messed around a bit and pulled out the ground wire so only 5V and D2 were going to the LED strip. This fixed the problem and I'm wondering how this is possible without ground connected? Anyone know?

The Arduino is powered by 12V through Vin.

No, pulling live wires and not connecting the required wires did not fix anything.

You probably soldered the ground across the data pin, and removing the blob allowed data to flow. Re-solder the ground wire.

You will want to put a 1000uf electrolytic capacitor across power and ground and close to a 500 ohm resistor on the data wire.

I hear what you're saying, I'm not just randomly pulling wires I was moving the ground and when I pulled it out my program worked and the LED strip turned on. I Haven't soldered anything I am using a breadboard.

Post a picture of the hardware configuration.


Same thing just using power through usb-c

The Arduino isn´t a PSU.

Check some WS2812B tutorials how to.

It is up to 500mA. 6 LEDs, 20mA per color (RGB): 6 * 20 * 3 = 360mA. It has plenty of power for these LEDs. That's not really what I'm asking. I'm asking how the LEDs are receiving power and running the program I have uploaded to Arduino successfully without the ground wire attached. As you can see in the image, the white wire is just hanging there.

Never ever rewire a powered up circuit, that is the best way to damage your Arduino and the things you are trying to control.

Physics sees no difference at all in the two cases of randomly pulling wires and moving the ground. This is a big mistake many beginners make.

Because you are probably getting a parasitic ground through the signal wire. So wire it up correctly to avoid damaging you board and LEDs.

You should also have a series resistor between the driver pin and the data input to the LED strip, and a capacitor between power and ground at the start of the strip.

Thank you this is all I needed to know. I'm not a beginner I'm aware of all the other things needed I just threw this together real quick and uploaded the code I'm just testing something. I have like 10 boards never fried any which is why I really don't care about moving the ground wire.

So you like playing Russian roulette then?

Yes , the boards are like $1 each

@michaelberge
What happens when you try to set ALL the LED to brightest white?

1 Like

Please provide a reference for that 500 mA statement; it's either out of context, or lacking context.
Time for some math. (Don't run away, math is fun!) The SOT223 package of the 1117-5.0 package is 88 degrees C per watt*,**. Your 500 mA, by itself, with 12V source, is therefore resulting in 3.5W of dissipation, and will likely in short order cause thermal shutdown of your regulator. Let alone any current required for the rest of the Arduino.

** you can find other datasheets on the web that drop this number to as low as ~65 degrees C per watt.

They all get set to white

They all get set to white

Very strange.

https://www.st.com/resource/en/datasheet/ld1117.pdf

Yes, you're right it is very inefficient! It is still running though and I have had no issues

So you'd like me to search that 45 page document for a place that says it will source 500 mA unequivocally? No, thanks. First page, they weasel with "up to 800 mA", leaving the reader to understand the rest of the datasheet for context.

You may choose to ignore it, that's up to you., but with a 12V source on Vin, you are abusing the regulator if you actually draw 500 mA from the 5V pin for any length of time.

Six RGBLEDs on an unsoldered PWM pin? Do the colors ever flicker, fade or not light?

Get a "buck converter" (12vdc to 5vdc), a 1000uf electrolytic capacitor and a 470 ohm capacitor. Use the 5v output of the buck converter to power the LEDs while you have the USB connected. When the USB is not connected, power the Arduino from the buck converter to the 5vdc pin.

@michaelberge
Are you sure that the white wire is a ground wire?

They don't flicker and yes I will add that or change power supply voltage