Handy capacity? Or: My hand drives my WS2812s crazy

Posted on
  • I got a nice STM32F4 Discovery board for quite a while. Recently installing Espruino (1v80) on it and having a significant amount of fun learning JavaScript. But now I got an electronical problem (unlikely Espruino, but maybe STM32 related):

    See here

    for what happens.

    Connections: STM32F4 board connecting to PC (for terminal) and a LiPo and switched regulator to the 5V input. B15 is connected via a jumper cable to Din of the WS2812 chain. GND too. Vcc of the LEDs is not using 5V as that gives me those high intensity colors I get too when I touch the LiPo. So I know that 3.3V is not sufficient to drive a 5V WS2812. Fine. No issue. I should drive it with 5V after all.

    The problem is that I'd like to understand the mechanism why when I touch the LiPo, the light intensity is reproduceable different. It's still working as sending data to the WS2812 still makes the lights move in circles. The colors change:
    Low intensity blue gets high intensity red. High intensity blue gets low intensity green.
    Low intensity red get high intensity green. High intensity red gets black.

    My understanding of R and C and transient spikes cannot explain this at all. The WS2812 is after all a digital device.

    Anyone an idea what happens?

    I know the fix is to drive the WS2812 with 5V, or drive them with 3.3V and have Vcc on the WS2812 get 3.3V (or less than 3.8V). That's not the problem. I'd like to understand why those LEDs behave odd when I touch the LiPo.

  • Yikes! I'd say there's definitely a bad connection in the lipo battery pack, or in the connector.

  • The LiPo is fine. The connectors too. The voltage (measured with a simple multimeter) is fine too.
    And I don't even have to touch anything. It reacts slightly by just nearing my hand near the LiPo.
    Which is why I think this is a capacitance thing, but I cannot explain this.

    What could make a WS2812 think that blue data should be sent to the red LED, and at high intensity (ike shifts 3 bits left)? Consistently.

  • Wow - I have no idea why it'd do it consistently like that. Is all your grounding correct?

    The WS2811/WS2812 are a little tricky in that the 3.3v data signal isn't quite enough when running off 5v. You could definitely do with putting the SPI output into opendrain mode, and then adding a ~500 Ohm pullup resistor to 5v.

    That'd give you a much bigger voltage swing on the output, and might solve the problem.

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

Handy capacity? Or: My hand drives my WS2812s crazy

Posted by Avatar for HaraldK @HaraldK

Actions