Different LED colors per power supply

Posted on
  • Hello! I'm testing out a string of WS8211 LEDs. When powered by the USB data cable, I get an expected red on the first two LEDs ([255,0,0,255,0,0]), however when I switch to an external 5V power supply, the first two LEDs light up as a bright whitish blue. Here is a video

    showing this effect.

    Here is another video

    showing how it seems to be "off" by just a little while on the 5V psu.

    Any ideas?

    Note: This effect is lessened over the length of the string; unnoticeable by the time you reach the middle.

  • I think this could be to do with the voltage. The WS2811s data input voltage depends on the main voltage they're powered from. On PC USB it's 5v exactly, and the board's diode drops it by 0.4v(ish) to 4.6v. But mains USB chargers provide around 5.5v, so the LEDs get 5.1v.

    Unfortuntately 5v is at the limit of what 3.3v IO can provide, so you need to:

    • set the pin mode on the output to pinMode(B15, "af_opendrain")
    • Put a ~300 Ohm resistor between the output pin and the LED's VCC

    That'll let the resistor pull the voltage up to 5v so you get the full voltage swing needed for the LEDs, and it should behave a lot better

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

Different LED colors per power supply

Posted by Avatar for dbkingsb @dbkingsb

Actions