NUC + Nodemcu + WS2813

  • Hello folks,
    After lot of reading i decided to start my thread as i do have few questions remaining before being able to finalize the setup.
    You can see enclosed a schema of my setup, right now only the "video" side is finished.

    I am now working on the Nodemcu and the LED.
    I have WS2813 LED, which has 4 wires (redundant signal data) and i have to connect it to the Nodemcu :

    This is the complicated part :
    I understand how to connect the +5V and the GND but how it is possible know which PIN of the nodemcu i have to use to connect the BO and DO ? According, to what i have already read, the DO and BO of the WS2813 is data signal and data backup signal, so there can be connected together on the same PIN.

    Ps : If you question regarding the video side, feel free.

  • Hi pendold42,
    To be honest i was not aware of that, after reading the datasheet of the ws2813 i undertand what you are saying.
    So i should considerer using a 74AHCT125 connected to my nodemcu logical ouput and connect the 74AHCT125 5V logical output to the WS2813.
    Using this kind of wiring method :

    It might works without it but it can can cause so weird behavior as the logical level are not going to be exactly the same on both sides (nodemcu side and ws2813 side) and it can lead to incorrect logical level on one side, is it my understanding correct ?

    Thanks again.

    EDIT : new image with the 74HCT but not nodemcu but the concept is the same.

  • Hi , i have

    You should consider a level shifter between the nodemcu and “DI”.

    The nodemcu is a 3v3 logic level but the leds specs claim it needs 0.7 * 5v = 3.5v

    I prefer 74HCT series chips rather than those cheap mosfet based shifters on eBay

    Hi , a question maybe you can help me , i have a level shifter SN74HCT125N…dp/68K1116?st=SN74HCT125N
    this can work or i bought an incorrect?

  • Thanks Akriss ! Do we really need to connect the 2/3/4 inputs PIN to GND as they not used at all ?

    Regarding the dual data of the WS2813, i found this :
    "For Ws2813 Both Data lines should be connected together to the same data pin on the Arduino etc. Ws2813 strip will work ok if only the DI line is connected and BI left disconnected, but in this config the first LED will not work as the chip expects the same data on both inputs. After each LED chip the BI line from the input of the first chip is directly connected to the DI input of the next chip (which is also connected to the D0 of the first chip. Therefore only one Data pin is needed to feed both inputs and is connected to both DI and BI inputs."

  • Thanks Akriss,
    I think i will try both as my led strip will be to longer and i another nodemcu so i will try both and compare the results.
    I think in most cases it is going to work but the best approach is to connect all pins properly.

  • Thanks penfold42 ! Ok so lets do it properly directly..

    I am now working on the sketch on my nodemcu lua v3. (if you think it is better to open a new topic i can do it but it still hardware related).
    I found some exemples on internet so i think i will be able to figure out how to produce a fist draft sketch.
    I think i am going to use the WifiManager and NeoPixelsBus libraries.
    Regarding the sketch :
    Half of the time the baudrate is defined in the sketch and the other part of the time is not defined at all (the word baud is not present in the whole sketchfile).
    Do we need to define the baudrate, is it a good practice or it is useless as the default baudrate will be used ?


  • Thanks penfold.
    I will read it carefully, it add another choice and I have to read again to understand better.
    This is the one you are using for your ambilight system ?
    The WS2813 is not part of the led supported unfortunately.

  • Thanks Penfold !
    I will try to do the same thing as you.
    I have successfully installed all libraries and plugins needed to compile and then upload the files needed.
    Before uploading it, can you confirm that this is supported to work on the Nodemcu lua ?( i saw ESP8266 and also ESP01 on the documentation).
    Last but least, i saw that it is possible to define the WIFI parameters in the sketch but nothing about how to set up the led used (ws2812, ws2813 and so son) and how to define the PIN that should be used to control the led.
    May i miss something.


  • Yep - nodemcu is fine.
    Esp8266 is the micro controller used on a variety of boards.

    Nodemcu, esp-01, esp-12, Wemos d1 are just some of the boards out there.

    GPIO 2 is the pin used for the leds.

    When it’s working, you point a browser at it to configure the number of leds and the led type. Use ws2811 (it’s the same as 2813 but with a shorter reset pulse which was altered to cater for the 2813)

  • Thanks again!
    I was reading and found many answers to my questions on the github issues page (answers from you also) and I wanted to edit my post with this new findings but you answered too fast, with additional clarifications, thanks !
    So it's perfect I will flash my nodemcu and follow the steps and share the result.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!