So I got this ‘Tuya Smart’ LED strip, with 200 lights on it, and decided it would be a lot more fun if I disconnected it from its standard controller and hooked it up to an ESP32…
But it’s just pumping out garbage. Does this mean the WS2812 protocol I’m using is wrong? What’s the search term I need?
Here’s a quick vid showing how it’s behaving when I tell it to just flash the tenth light white, half a second on, half a second off (delete the .zip from the filename) 20240130_184543.mp4.zip (5.8 MB)
After some light research I can’t find anything that describes a protocol. Perhaps the assumption that these are WS2812-compatible is wrong. and/or a different sub protocol might be needed eg. RGBW instead of RGB.
Perhaps the best way to find out what is required is to reverse engineer the original controller. Even just a close look at the way it was connected to the strip would be helpful. For instance there is a fairly common protocol that mutiplexes the LEDs while inverting the polarity, so only those LEDs with matching polarity light. If you are seeing that some LEDS light randomly and some never light at all then that protocol is a possibility.
There are three wires; 5V, ground, and signal, which shows about 0.3V on the multimeter, but my cheap scope says is about 4.8V. I was hoping to see a square wave I could begin to try and interpret, but it just shows spikes, which don’t change as much as I would expect…
How did you confirm that? Can you confirm from the original controller circuitry that 5V and/or ‘Ground’ are not also being adjusted as part of the protocol?
That would happen if the multimeter is reading DC. The 4.8V is peak.
That might be a square wave originally. How square it remains depends on the driver and the load.
Is this with the original controller? If you are just flashing the tenth light on and off then the signal should be stable. If you are using the original controller then the signal will depend on how that has been set up.
You said you were flashing the tenth light white, so the assumption is that your string includes white LEDs. Is this not the case? Show a very close up photo of the string so that the physical arrangement of the LEDS and the connectors can be examined. Also a good photo of the inside of the original controller.
Not necessarily. There are LED strips that operate with tristate multiplexing, which uses isolated pairs in different combinations with no common ground. Three control lines could control 6 groups with any number of LEDs per group. A good photo of the strip might indicate whether or not that is used in this case.
After mucking around trying another one of those basic controllers on it, I realised it should work…
Then I realised I didn’t have a common ground first time round. Sorted.
Turns out it’s BGR… Does this narrow down which chip is in these? Do I even need to know, if it seems to work okay? I tried a diagnostic sketch and it seemed to work the same out of a dozen or more chip types I tried, with only a couple not working…
Is there any functional difference between most of them?
Also, the brightness, and especially the colour (white fades to yellow), changes from one end to the other - I realise this indicates I need more amps, but in the absence of more power, and since I have the whole strip bunched up in one place, would connecting the 5V and ground from one end to the other help?
Yes. That indicates a fair voltage drop along the strip. Having more amps at your disposal won’t help this but feeding the 5V from both ends will. DO NOT do this with the Data connection though.