Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 12 of 12

Thread: WS2811 LEDs donít work with 5V power supply

  1. #1

    WS2811 LEDs donít work with 5V power supply

    We tried two different W2811 addressable LEDs, one SMD, the other one through hole. They are connected to a Teensy 3.2.

    Both work when power is drawn from the Teensyís 3.3V power supply pin.

    Both do not work when power is drawn from an external 5V power supply. Of course, the ground of the power supply is connected to the Teensyís ground.

    One of the through hole addressable LEDs that we used for testing even exploded, although polarization was correct, and voltage was below 5.5V, which is fine according to specs.

    If we swap the Teensy for an Arduino Mega, then everything works fine with the SMD LED. With the through hole LED, white is shown as black, which again is unexpected.

    Anyhow: Could it be that the WS2811 addressable LEDs need to have the same voltage for programming and for power?

  2. #2
    OK, we did some more tests, and if we swap the power adapter for 5V from the Arduino Mega or for another power adapter, then the SMD LED works.

    The through hole LED does only work with 5V supplied through the Arduino Mega. It fails with either power adapter.

    I assume that the power adapters do not provide a smooth 5V output. Maybe there’s an oscilloscope around here that we can use for testing them…

    And yes, ground was connected in all cases.

    The Mega and the Teensy are connected to my laptop.

  3. #3
    Senior Member
    Join Date
    Jan 2013
    Posts
    154
    Teensy 3.2 is a 3.3v device and the DO (data out) signal to the LEDs swings between around 0 and 3.3v. The LEDs are 5v devices.

    I think you have a situation where Teensy driving W2811 LEDs works sometimes, and sometimes not - possibly because the signal levels don't match. If you want it to work reliably, you should use a level-shifter to shift the Teensy DO level to 0-5v. More specifically, look at the 74HCT125 or the 74HCT245 (as used in the Teensy 3.2 OctoWS2811 Adaptor).

    Here's part of a circuit I've used before:
    Click image for larger version. 

Name:	Screen Shot 2018-10-03 at 9.57.23 AM.png 
Views:	5 
Size:	23.7 KB 
ID:	14883

    If this is not the problem then please show your circuit. There might be other issues.

  4. #4
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    18,367
    Quote Originally Posted by feklee View Post
    Anyhow: Could it be that the WS2811 addressable LEDs need to have the same voltage for programming and for power?
    Yes. According to the specs, all of them need 3.5V or more for logic high. So a 3.3V output is less than the minimum.

    However, many of them do work anyway. But not all.

  5. #5
    Thanks Paul, and thanks @markonian also for the circuit!

    However, I'm not sure that youíre right. According to the specs, 3.3V should be OK as long as it is used for both power and logic high:

    Click image for larger version. 

Name:	ratings.png 
Views:	4 
Size:	12.3 KB 
ID:	14887

    Those are the specs for four legged through hole LEDs:

    Click image for larger version. 

Name:	specs-intro.jpg 
Views:	5 
Size:	47.1 KB 
ID:	14886

    This also matches our experiments.

    (Had I read the specs before, I probably wouldnít have opened this threadÖ)

  6. #6
    Senior Member
    Join Date
    Jan 2013
    Posts
    154
    The first image titled Absolute Maximum Rating is about normal operating ranges for supply voltage, logic input voltage, working temperature, storage temperature and ESD pressure (whatever that is). This is not the information you need.

    The question to ask yourself is, "what voltage is required on the DIN signal to guarantee the the led reads it as a logical 0 (low) and a logical 1 (high) and how well does the Teensy meet this requirement when supplying that signal. People with training in electronics will recognize this as a question about adequate noise margin. Here's a google search of the PJRC Forum for the term "noise margin".

    Also, here a particularly interesting discussion with advice from Paul.

    In the past, I've used a Teensy 3.x to drive Adafruit NeoPixels without a level shifter and though it was working ok. Then I had some pixel that just did not work very well. The colors were not quite right, they's ficker some, not be as bright as they should be. When I inserted the level shifter, everything got brighter, more stable, more solid and reliable.

    To summarize, it might look like it's working fine (when it IS working) but our eyes are too slow to really judge. If you look at the signal with an oscilloscope you might be horrified by what you see There will be overshoot, undershoot, environmental noise, GND at Teensy and at LEDs will be slightly different voltage level, etc.

    What Library are you using to drive the LEDs?

  7. #7
    Quote Originally Posted by markonian View Post
    The first image titled Absolute Maximum Rating is about normal operating ranges for supply voltage, logic input voltage, working temperature, storage temperature and ESD pressure (whatever that is). This is not the information you need.
    Well, then why does it mention the logic input voltage in quantities of VDD? (VIN = -0.5~VDD+0.5)

    If the addressable LED was just specced for 5V, then they couldíve written VIN = 4.5V Ė 5.5V. Also keep in mind that with 3.3V for VDD and for VIN, things work perfectly fine. Anyhow, find the entire data sheet attached. (sorry, only have the screenshot, the original URL is not available anymore)

    The LED library that weíre using is FastLED.

    And, thanks for the links! Have yet to find the time to read through all the information.

    Click image for larger version. 

Name:	full-specs.jpg 
Views:	4 
Size:	17.2 KB 
ID:	14891

  8. #8
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    18,367
    Quote Originally Posted by feklee View Post
    Also keep in mind that with 3.3V for VDD and for VIN, things work perfectly fine.
    This is pretty typical for these types of LEDs. Even though most of them have datasheets that say 4.5V minimum for VDD (3.5V min for VDD in the datasheet is unusual), most of them do actually work when run from lower voltage.

    Also very typical is the need for level shifting. Some of these addressable LEDs can accept 3.3V signals when running at 5 volts. Others can't. We've seen this over and over on this forum and pretty much every maker/electronics forum. Countless people have experienced this same issue.


    Anyhow, find the entire data sheet attached.
    The image is unreadable. The forum software automatically limits the max width and height. I believe the maximums are 1280 and 1024 pixels. If you want to share this here as images, you'll need to post several images.

    You can also attach a PDF to your message. If using "Quick Reply", click "Go Advanced" for the fully featured editor that lets you attach PDF and other file types.


    If you *really* want to discuss datasheet specs, that's certainly allowed here. But is that really going to help? The reality of pretty much all WS2811/WS2812 addressable LEDs is poor documentation from Chinese companies. Even World Semi initially published several datasheets in the early days of WS2811 (around 2011-2012) with obvious errors and contradictory info. The documentation & specs of these Chinese datasheets isn't anywhere near the caliber & quality of datasheets from very reputable semiconductor companies like Texas Instruments or Analog Devices.

    Regardless of what the datasheet claims, the fact remains that you have some LEDs that require a certain level signal, relative to this power supply voltage. Maybe you can convince whoever sold you these LEDs to exchange or replace them, if they don't meet the published specs? But since the link to the datasheet doesn't even work, maybe that's an extreme longshot?

    If you're actually going to make use of them, not matter what's in the datasheet, the hard reality is you have a physical object with a chip inside that requires a certain level signal. The electrons don't know or care what's printed in some PDF file.

  9. #9
    Quote Originally Posted by PaulStoffregen View Post
    The image is unreadable.
    Find the full PNG attached in a separate ZIP file, for completeness.

    The reality of pretty much all WS2811/WS2812 addressable LEDs is poor documentation from Chinese companies. Even World Semi initially published several datasheets in the early days of WS2811 (around 2011-2012) with obvious errors and contradictory info.
    Thatís totally believable. In fact, the first image in the data sheet showing the pinout is wrong and was responsible for me frying a bunch of LEDs when I first connected them.

    The electrons don't know or care what's printed in some PDF file.
    No discipline, those electrons!

    The easiest way out in this case could be switching to a 5V Arduino. I was thinking the Teensy is nice for the project as it offers a bit more CPU power, and as price is not an issue here (one little Teensy in a large light art installation). However, a 328/5V/16MHz Arduino may be totally sufficient. Iíll have to do some tests.
    Attached Files Attached Files
    Last edited by feklee; 10-05-2018 at 01:19 PM.

  10. #10
    Member
    Join Date
    May 2018
    Location
    Land between two rivers
    Posts
    36
    Quote Originally Posted by feklee View Post
    Well, then why does it mention the logic input voltage in quantities of VDD? (VIN = -0.5~VDD+0.5)
    That is the absolute maximum allowable range for voltages going into the input IO pin. This is important for circuits for protecting the IO pin from voltages outside that range, like in an ESD discharge. It isn't what will work for actually communicating data to the chip. For that you need to look for the specifications for high and low logic level input voltages.

  11. #11
    Senior Member
    Join Date
    Jan 2013
    Posts
    154
    @feklee, Paul is right. One can't put a lot of trust in the accuracy of those spec sheets. Also, from post #7, I don't think you've quite got the concept of noise margin or why the level-shifter is helpful (necessary?).

    So, for the sake of my argument, let's assume for the moment that the spec sheet is correct. The relevant spec is listed as "The signal input flip threshold" (even though I've never heard it called that). That spec is saying: the minimum input signal voltage that will be recognized as a logical 1 (high) is 3.4v. The minimum for a logical 0 (low) is 1.6v. Note that these are specified when VDD = 5.0v. If VDD is lower, the both thresholds will be different, probably lower. In-between 1.6v and 3.4v, that's the region where the LED driver is indeterminate.

    Next, look at the output spec for a Teensy 3.2 digital output pin...
    Taken from here (I hope that's right), see page 13.

    Output High Voltage minimum is VDD-0.5v = 3.3 - .5 = 2.8v. This is in the indeterminate region for the LED driver.
    Output Low Voltage maximum is 0.5v. This is a solid LOW for the LED, so no problem here.

    Here's a tutorial that might do a better job of explaining the concept of noise margin than I can.

    You are considering using an Arduino because it is a 5v device. That will definitely work if you don't want to use a level-shifter. However, you'll have much more limited performance, RAM size, Flash size.

    Other alternatives are:
    - the Teensy LC... still 32-bit arm plus has a 1-channel level-shifter built in already.
    - Prop Shield, Low Cost (no Motion Sensors). Has 2 level-shifters.
    - OctoWS2811 Adaptor for Teensy 3.2. Has 8 level-shifters.

  12. #12
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    2,786
    Or by a 74AHT125 chip and connect it up between the Teensy and the LEDS:

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •