Electronic – arduino – Why does a resistor in the Neopixel data line work at all

arduinoledled striprgb

Adafruit's best practices for their Neopixel LED strings say, "Place a 300 to 500 Ohm resistor between the Arduino data output pin and the input to the first NeoPixel."

Someone asked about the purpose of that resistor here and I'm reading about parasitic diodes and termination resistors to understand that more, but in a nutshell, why doesn't adding this resistor also drop voltage? In other words, if I had a 5V logic signal touching my Neopixel data line, won't adding this resistor in series make that signal fewer volts?

For example, if the Neopixel data circuit doesn't have any resistance then now I would expect 5V on one side of the resistor and 0V on the other… right? And if I have 0V going to the Neopixel data in, then how does signaling work at all? I'm super new to electronics but it just seems like this is the definition of a voltage divider circuit.

Also, if you didn't know about the 300-500 Ohm resistor, how would you choose that value? Is that based on an equation or just looking at something under a scope until it seems stable?

Thanks for helping, this is really puzzling me =)

Best Answer

The resistor is there to limit the current into the input pin. The input likely has a very high DC resistance (more than 1 megohm) so negligible current flows (on the order uA) and a negligible voltage drop is produced (on the order uV or mV). The resistor is likely used to slow the slew rate of the connection (the input pin will have some capacitance, so adding a series resistor forms an RC circuit) to prevent overshoot and ringing which could cause issues with the communication. It also prevents the I/O signal from trying to power the LED string through the ESD protection diodes by limiting the current to something that will not damage the internal diodes.

Related Topic