2
\$\begingroup\$

I'm planning to drive the input of a WS2811 based LED strip (total approx 450 LEDs) from a microcontroller/arduino, as per the diagram below.

Do I need a transistor, buffer or anything else between the microcontroller GPIO and the WS2811 DIN? Or can I safely hook it up directly? enter image description here

Also am I correct in reading from the WS2811 datasheet that even though the LED strip takes 12v, the WS2811 itself will run at 5v, and as a result the Din voltage should be at 5v too?

\$\endgroup\$
3
\$\begingroup\$

An ATmega pin will happily drive the WS2811 DIN pin, it expects 5V and unless you are driving an obscenely long cable between the ATmega and the first WS2811, you are fine with a direct connection.

The LED strip power depends on how the strip is constructed, but is typically 12V; see the datasheet for examples of both 12V and 5V situations.

\$\endgroup\$
  • \$\begingroup\$ Am I right in assuming that the length of the LED strip (ie. the number of WS2811s chained together) shouldnt have any impact on the current required at Din? (IIUC, the WS2811s amplify the signal down the chain using their local 12v power supply) \$\endgroup\$ – steve cook Jan 8 '16 at 17:15
  • 1
    \$\begingroup\$ you are correct, each WS2811 buffers the signal for the next, so you only neet enough power to get the signal to the first one. \$\endgroup\$ – Jasen Jan 8 '16 at 19:37
1
\$\begingroup\$

Note that if you're going to be using a 3.3V microcontroller, you would be best off to use a level shifting circuit between the digital output pin and the WS2811 DIN pin. Quite often the 3.3V output can drive the 5V DIN pin. But, I've had issues with some combinations 3.3V Arduino compatibles and WS2811's.

I've had success using the approach described in Phillip's AN10441: Level shifting techniques in I2C-bus design:

More specifically, I use a 2N7000 N-channel MOSFET:

  • the microcontroller's GPIO pin is connected directly to the source
  • the WS2811 DBIN pin is connected directly to the drain
  • +3.3 Vdc is connected directly to the gate
  • a 10k pull-up resistor (R1) is connected between source and gate
  • a 1k pull-up resistor (R2) is connected between drain and +5 Vdc

Note: I had spotty success when using a 10k resistor for R2. The sweet spot is somewhere between 1k and 10k.

\$\endgroup\$

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.