1

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.

3
  • If a chicken-and-a-half lays an egg-and-a-half in a day-and-a-half, how long does it take a grasshopper with one wooden leg to kick all the seeds out of a dill pickle?
    – Duncan C
    Sep 27 '20 at 1:30
  • 1
    I don't know if it does, I was just trying to provide as much information as possible. Sep 27 '20 at 1:30
  • @drunkenspider you really need to ask a question ... it is not clear to everyone what the implied question actually is
    – jsotola
    Sep 28 '20 at 0:23
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.

1
  • From your second link: NeoPixels (WS2812B) powered by 5v require a 5V data signal. If using a 3.3V microcontroller you must use a logic level shifter such as a 74AHCT125 or 74HCT245. (If you are powering your NeoPixels with 3.7v like from a LiPoly, a 3.3v data signal is OK)
    – Gerben
    Sep 27 '20 at 14:16
1

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.

2
  • Would a meter be considered too short to put a resistor before the data line? Sep 28 '20 at 21:24
  • Depends on the wire.
    – Majenko
    Sep 28 '20 at 21:36
-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?

4
  • 1
    the OP is talking about the data pin, not the power supply pin
    – jsotola
    Sep 27 '20 at 1:55
  • How do you know that? The OPs question asks "...what resistor value to use for LED strip" and then all the details provided are about power. Re-reading the question, I still think they are asking about a current limiting resistor. ("Bare" LEDs do need current limiting resistors, so somebody might think that a digital LED strip needs one too.) I'm not familiar with WS2812B LED strips and had to google them. Do they use I2C or some other serial interface? I take it the serial line needs a pull-up resistor?
    – Duncan C
    Sep 27 '20 at 23:28
  • 1
    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.
    – jsotola
    Sep 28 '20 at 0:21
  • Sorry. To clarify, yes I was asking about the resistor for the data channel and not a current limiting resistor. Sep 28 '20 at 21:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.