2

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?

steve cook
  • 123
  • 1
  • 6

2 Answers2

3

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.

uint128_t
  • 8,664
  • 6
  • 26
  • 28
  • 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) – steve cook Jan 08 '16 at 17:15
  • 2
    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. – Jasen Слава Україні Jan 08 '16 at 19:37
1

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.

Passerby
  • 72,580
  • 7
  • 90
  • 202
John vS
  • 11
  • 1