Please note: Friday June 18 is a holiday celebrating Juneteenth, please allow extra time for your order to arrive and plan accordingly.
0

NeoPixel 5050 SMD - Capacitor, resistor
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

NeoPixel 5050 SMD - Capacitor, resistor

by alivowles2861 on Wed Mar 17, 2021 4:51 pm

Hello,

I am designing a pcb and would like to include a neopixel onto it. Specifically : NeoPixel 5050 RGB LED with Integrated Driver Chip : https://www.adafruit.com/product/1655

I have worked with Ws2812b's in the past but never as SMD's, always as strips.

My question is, do i need to add any resistors/ capacitors to this led to have it function? On all the strip ws2812b's they seem to have some type of resistor or capacitor between each led, but i am not sure what its rating is or if it is even necessary. I only plan to have a single Led on the pcb.

For example this product : https://www.adafruit.com/product/4356 : NeoPixel Mini Button PCB , ---- Uses what appears to be the same ws2812b and has what appears to be a 750 resistor (R1) and some sort of Capacitor (C1)

If you have any advice and possibly how to include it in a circuit that would be great.

Thanks !

alivowles2861
 
Posts: 2
Joined: Thu Apr 23, 2020 12:47 pm

Re: NeoPixel 5050 SMD - Capacitor, resistor

by adafruit_support_mike on Wed Mar 17, 2021 10:43 pm

You don't really need anything for a single NeoPixel, but it can't hurt to put a 100nF capacitor between 5V and GND, and a 75 Ohm resistor in series with the DIN pin.

PWM'd LEDs put a choppy current load on the supply, so having a lot of them running at the same time can generate enough noise on the supply rails to cause signal problems. Putting a small capacitor next to each pixel keeps the noise from spreading.

The 75 Ohm resistor on DIN prevents voltage spikes that could potentially damage the input. That's mostly a problem when you have a long wire between pixels, but again, doesn't hurt.

adafruit_support_mike
 
Posts: 62799
Joined: Thu Feb 11, 2010 2:51 pm

Re: NeoPixel 5050 SMD - Capacitor, resistor

by jrmaker on Wed May 05, 2021 2:35 pm

This is very helpful to getting started, thank you.
I'm looking to make a PCB with 4 rows of 8 neopixels (for example, but maybe more in the future)
Would I want to use a capacitor for each connection to 5V and Ground and the resistor you mentioned, or is there a good pattern for building this out?
----
Separate but related path: The microcontroller is 3.3V and I have got neopixels to work with 3.3V but not sure how many. Do you recommend just using 3.3V digital logic and power? (with no step-up logic converter) If so, would the Capacitor and Resistor values be different here?
Thanks!

jrmaker
 
Posts: 1
Joined: Wed May 05, 2021 2:27 pm

Re: NeoPixel 5050 SMD - Capacitor, resistor

by adafruit_support_mike on Thu May 06, 2021 2:43 am

jrmaker wrote:Would I want to use a capacitor for each connection to 5V and Ground and the resistor you mentioned, or is there a good pattern for building this out?

The maximum current load for a 4x8 array of RGB NeoPixels would be about 1.5A, with the average load probably being around 500mA.

At the point where power connects to the board, leave room for a through-hole capacitor. A 10V 1500uF electrolytic capacitor would be a good choice to keep the PWM from the pixels from causing lots of line noise.

Connect a 75 Ohm resistor between the point where the data signal connects to the PCB and the input pin on the first NeoPixel. If any part of the board will be killed by signal problems, it's the first pixel's input. You don't need resistors between any of the other pixels though.

Put a 100nF capacitor between 5V and GND next to every NeoPixel. That will make the layout easiest.

jrmaker wrote:Separate but related path: The microcontroller is 3.3V and I have got neopixels to work with 3.3V but not sure how many. Do you recommend just using 3.3V digital logic and power?

The blue LEDs in the NeoPixels need at least 3.5V to work, so use a 5V power supply to the pixels.

Almost all the NeoPixels we carry will accept 3.3V data signals when they're getting 5V power. Sometimes a strip won't, but that's rare.

In all cases, the only pixel that matters will be the first one. Each pixel passes data to the next one, so the first pixel will level-shift the data signal to 5V for the second pixel.

If your first pixel doesn't happen to like 3.3V signals, you can work around the problem by lowering the supply voltage. Officially, the pixels should obey the 5V-CMOS signal protocol, which requires any signal more than 0.7xVCC to be recognized as a high input, and any signal below 0.3xVCC to be recognized as a low input. Assuming VCC=5V, the official thresholds are 3.5V and 1.5V.

Dropping the supply voltage to 4.5V lowers the thresholds to 3.15V and 1.35V.. low enough to put a 3.3V signal into the 'must be considered high' range.

You can design a failsafe into your board by putting the footprint for an 0805 component between the 5V rail and the first NeoPixel/capacitor's VCC connection. Leave the footprint open when you populate the rest of the board, then hold a chunk of wire across the pads as you test with 5V power and a 3.3V data signal. If the first pixel accepts the 3.3V data, solder a zero-Ohm 0805 resistor into the footprint. If the first pixel doesn't accept 3.3V data, connect a silicon diode in an SOD-323F-2 package:

https://www.mouser.com/ProductDetail/ON ... NvwQ%3D%3D

That's slightly longer than an 0805 component, but will fit the same footprint.

The diode will lower the first LED's supply voltage by about 0.7V, which should force it to accept 3.3V data.

jrmaker wrote:If so, would the Capacitor and Resistor values be different here?

Nope, not at all.

Capacitor values are generally figured in terms of current, not voltage. The only rule associated with voltage is to choose a cap whose maximum voltage rating is at least twice the nominal operating voltage you expect.

The resistor's job is to minimize signal reflections (equivalent to echoes) from high speed signals. The idea is to make the input resistance match the parasitic impedance of the wire the signals come through.

Back in 1929 a couple of scientists at Bell Labs calculated the voltage, power, and signal attenuation properties for signals running through long (hundreds of miles) wire. They found that the best impedance for power transmission was 30 Ohms, the best impedance for voltage was 60 Ohms, and the best value for low attenuation was 75 Ohms. Getting signals to travel hundreds of miles requires high voltage and high power, and the calculated voltage performance at 30 Ohms was terrible, and the calculated power transmission at 60 Ohms was even worse.

Good voltage performance was most important, because high voltage destroys cables.. when the first transatlantic cable was laid, a physicist named William Thompson (later Lord Kelvin) was working on that kind of problem, and warned them that setting the voltage too high would blow the cable. The head engineer of the company laying the cable dismissed the warning with some snarky comments about ivory-tower philosophers and real-world engineers. The cable operated for three weeks before it blew because they set the voltage too high. It's one of the more public "in your face" moments in scientific history.

At any rate, the scientists at Bell Labs decided to compromise at 50 Ohms, which would give nearly-optimal high voltage performance at a cost of 50% power loss (which is at least easy to calculate).

Since then, cables that need to carry high-voltage/high-power signals have an impedance of 50 Ohms, while cables that carry low-voltage/low-power data signals have an impedance of 75 Ohms.

adafruit_support_mike
 
Posts: 62799
Joined: Thu Feb 11, 2010 2:51 pm

Please be positive and constructive with your questions and comments.