I have a question about wiring up a string of WS2813 led's.

I have a question about wiring up a string of WS2813 led’s. I have these as I didn’t read the ebay listing, and now I can’t get any of the basic programs to work. This is the first time I’ve tried working with this sort of LED and I’m stuck.

I’m using a nodemcu devkit 0.9, connected to my imac via USB running the arduino dev environment for the esp2866.

The LED strip is connected to a separate 5v supply (sourced from a powered hub. Multimeter tests show that the power is getting through to the strip. The nodemcu is on a breadboard, the GND pin linked to the USB power GND.
I’ve connected GPIO5 (D1) on the nodemcu to the DI pad on the WS2813 strip. Nothing is connected to the BI pad.

As this seems such a new device, there are no real examples to be found, even on this forum.

The blink code I’ve been trying is here so I’m using WS2813 as the type, and the FASTLED_ESP8266_NODEMCU_PIN_ORDER constant

I’d really like this to work - but if it doesn’t then it’s back to ebay for some 2812’s

LED Strip ground must be tied to esp8266 ground would actually tie all grounds together.

There are also pin numbering complications with the ESP8266…

Can you get the good old blink sketch to blink the onboard led? When that works, use that pin as the data pin for the strip as you’ll be certain that you have the right one.

Thanks for the input guys. I’ve already tied the grounds together, and I discovered on a Chinese selling site that the Bi pad should be also connected to the ESP8266 ground.

I’ll try the blink sketch later - great​ idea!

:frowning:
blink with onboard ok
blink with another LED (pin 13==D7) ok
WS2813 - still no luck. Time to resolder the headers, or perhaps ditch the first LED in case it’s damaged?

Well done for making progress, I don’t suppose you have any other addressable LEDs? Have you tried the demoreel100 sketch? I always use that as a tester…

I’ve also been having problems with FastLED, ESP8266, and WS2813 LEDs. But the WS2813 strip works fine with Arduino+FastLED or ESP8266+Neopixel so it looks like the combination is problematic.

Have you tried declaring them as WS2812B or SK6822, I`m pretty sure that the data protocol is very similar…

@Amar_Shah
that’s interesting - I have an aged Arduino so I will try to see if I can get that to work.
@Jeremy_Spencer - yes, I tried the WS2812B orginally, as I couldn’t find any fastled doc for the WS2813, but havn’t tried the SK6822

I’ve now ordered some WS2812b’s - so at least I should be able to get something working before Christmas :slight_smile: This is my first dabble into addressable LEDs

Long update, though I hope it helps someone

Physical fixes: I’ve cut the first LED off, and re-soldered the header wires. Also checked the 5v power supply which appeared to be giving trouble.

I’ve now also got 4xD1 mini wsp8266 boards just arrived from China, and I’ve wired one of those up to my WS2813 strip (tested using some MQTT stuff)
Going on @Amar_Shah 's post, I tried the Neopixel library first. Their blink sketch, and their strand test both work correctly (Big hurrah here - though Mrs Jones asked what I was playing at :wink: )

Switched to the FastLED library sketches:

  • Blink - only the first LED lights, and 1 random LED now and then.
  • FirstLight - works but LEDs not in proper order, fails to reach the end of the strip etc.
  • Tried firstlight using WS2812B as the definition, and first loop works, then goes wrong

Now I switched to an Arduino (Pro mini - had a very hard time getting sketches to load on this). But blink and firstlight both work correctly on the arduino

So I know where I stand now, though I really want to use the ESP2866 based boards as they’ve got Wifi built in, and the Mini is difficult to use.

Should I raise an issue on GitHub describing these issues with esp2866 based boards and the 2813 leds??

It sounds like you might need a level shifter, the nano is 5v and the D1 mini is 3.3v. The 74HCT245 or 74HCT175 are best.

Might do - but then why would the 2813’s work with the neopixel library, but not the FastLED library on the same board?

Yes, you’re right, I missed that, sorry.

I wouldn’t raise it on github as development is on hold at the moment, see the pinned post…