2

I'm trying to use an ESP8266 powered by my computer through USB cable to control a WS2812B LED strip. I've read online that you're supposed to put a resistor before the data channel to help prevent noise but I'm struggling to figure out what the resistor value should be.

I've figured out so far that the LED strip will use a MAXIMUM of 25.8W and that the Vin pin that is powering the LED strip is outputting 5V. I also plan on putting a 470uF capacitor across power and ground.

drunkenspider
  • 41
  • 1
  • 4

3 Answers3

2

It seems like people generally just use a resistor around 300 - 500 ohms so I'll just use a 500 ohm resistor. Answer found on another thread. And here as well.

drunkenspider
  • 41
  • 1
  • 4
2

The majority of the time adding a resistor to the data line is completely pointless. It only has an effect if the Arduino and the first WS2812B chip are connected over a long cable. By "long" I'm talking meters, not centimeters. The length of the strip of LEDs is irrelevant as each LED generates a fresh signal to send to the next LED. It's only the length of cable between the Arduino and the LED strip that matters.

If that is long you can get "ringing" and reflections of the signal through poorly matched impedances. The resistor is there to absorb some of those reflections and reduce the ringing by increasing the impedance of the Arduino's output.

What is a good value? Well, that's hard to say, since it's dependent on the length and type of cable in use. Too low a value and it will do nothing. Too high a value and it will "round off" your signal too much and you'll lose data. A typically chosen value that fits many situations is 220Ω.

But of course for short connections it's irrelevant and you shouldn't add a resistor.

Majenko
  • 105,851
  • 5
  • 82
  • 139
-1

Strips of LEDs like WS2812Bs need a high current 5V supply, with NO current limiting resistor.

You'll need a very high current regulated 5V supply, and would probably be better off using a separate 5V supply for the Arduino and the LED strip so you don't get large voltage fluctuations in the power to the Arduino as the LEDs turn on and off. If you do you a single power supply for both, you should use a power supply with extra capacity. I'd suggest at least a 30W supply. And yeah, you should probably have a filter capacitor on the 5V rail right at the Arduino.

Edit:

Were you asking about a resistor on the power line, or one on the data pin?

Duncan C
  • 5,752
  • 3
  • 19
  • 30