Connect ws2812b led strip to gnd & data pin only

Posted on
  • I am trying to connect the espruino to a ws2812 strip of 144 leds with external power supply, with arduino this is possible by only connecting gnd and Din (attached image). With espruino, I cant get it to run this way.

    Is it possible to only connect gnd and data this way, or is there something to change in the code? So far I only use code from the espruino led tutorials. Thanks!

    Markus


    1 Attachment

    • leds_Wiring-Diagram.png
  • The problem could be because Arduino has 5v IO and Espruino has 3.3v - WS2811/2 are quite picky. When running from Espruino's power supply, the diode drops the main voltage to 4.7v or so, which allows the lights to read the lower data voltage - but when you raise their main voltage, they become less sensitive to the data.

    To fix it, get a ~300 Ohm resistor (pretty much anything from 150 to 1k will work) and put it between DIN and 5V. Then use pinMode(DATA_PIN, 'af_opendrain') in Espruino.

    It basically allows the data pin to be pulled all the way up to 5v with the resistor, but can pull it down to 0 when needed - it basically turns it into a 5v output.

  • thank you, this opens the drain

  • so good, I also have a problem, if we use SK6805-2427 SMD led, so how can I control it, how to use SK6805-2427 to SMT, what kinds of thing do we notice? if I use a RF controller using in controller sk6812 led, it also can control sk6805-2427 led strip. It maybe is a big problem, and someone can help me.

  • Are you talking about controlling those LEDs from Espruino?

  • hello,

    I didn't pay attention and I bought a bunch of SK6812 RGBW instead of WS2812. I want to control it from an ESP826. Is there a way to do so using the official library ? thank you for your answer gents,

    require("neopixel")
    
  • Just give it a shot... Im reading different things about SK6812... 3 byte for RGB and 4 byte for RGBW. If it works, the SK6812 is just a 2812 clone. If it does not, you actually have 4 byte RGBW version. I do not know about configurability of built-in neopixel module... It would have to insert an extra byte for every pixel on the string for the W(hite) - 4th - LED. I doubt that a pixel built-in controller is configurable and does detect white pattern of different intensity within the 3-byte data that would control the W(hite) - forth LED - automatically. It is all up to the data feeder to make that decision and do the mix-in of respective switch to and from White.

    The module is built-in - and written natively - in order to meet the timing requirements for a smooth operation and also to leave some cycles to what you want to run in JavaScript.

    Under early WS2812 related forum entries you may find some that try to drive the LEDs purely in JavaScript. Modifying that code may give you some insight.

  • Just try it - it should work. Worst case your lights expect 4 bytes and the module will complain if the data isn't a multiple of 3 bytes long. In that case, just round up to the nearest multiple of 12 - any extra bytes sent just get ignored by the LEDs.

  • Hi ,i got sk6812 led strip,but it has 5 cables,how can i connect it to espruino?thanks.

  • @user83711, did you - a) get a (SPI) controller with it? - or b) get just the strip?

    The product description mentions something about SPI drivable controller, which could be the reason for the extra connections / cables... except power and ground are doubled to handle load with thin wires. What are the colors of the wires - if they have different colors? Can you take a pic and upload it as part of the next post?

    The strip itself has only three (3) in at one end and three (3) out at the other end (note that in is defined where data goes in, out is defined where you would connect / daisy-chain the next extending strip.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Connect ws2812b led strip to gnd & data pin only

Posted by Avatar for user69728 @user69728

Actions