A while ago, I used transient current analysis to understand the behavior of the WS2812 a bit better (and to play around with my new oscilloscope). One intersting finding was that the translation of the 8 bit input value for the PWM register is mapped in a nonlinear way to the output duty cycle. This behavior is not documented in the data sheet or anywhere else. Reason enough to revisit this topic.Continue reading “Does the WS2812 have integrated Gamma-Correction?”
Power analysis is a technique to probe the inner workings of an integrated circuit by measuring changes in the supply current. Whenever a logic gate switches, it will cause a tiny current spike that can be measured externally. By inspecting the temporal variation, especially in reaction to an external signal, it is often possible to deduce information about the construction of the IC.
A few years ago I used a logic analyzer to investigate the protocol of the, then new, WS2812 RGB LED. So, why not revisit this topic to test my newly acquired deep sampling oscilloscope?Continue reading “Power Analysis: Probing WS2812 RGB LEDs”
After clones and variations of the venerable WS2812, there finally seems to be a new RGB-LED with integrated controller that actually improves on several characteristics: The APA102, also known as “Superled”. There are two versions on the market, the APA102 and the APA102C, as shown below.
The WS2812 RGB LEDs with integrated controller are fairly successful devices that come in a variety of packages. Recently, similar devices by other manufacturers started to appear.
I managed to get my hands on a few samples of LEDs with PD9823 controller, courtesy of Soldering Sunday, and was able to subject them to more scrutiny. The manufacturer of the IC seems to be “BaiCheng”. You can find it in several LEDs with different package types. There is a single page “datasheet”, linked here, but little else is known to me.
The given timing values are, again, completely different from any other device. So are these really compatible to the WS2812? Only one way to find out: I used the same setup to extract the timing as described earlier for the WS2812. You can find the results below.
There is a new addition to the popular WS2812 family of RGB LEDs with integrated controller: A 8mm through hole version. Right now they seem to be in pilot production stage. The only place that has them is Soldering Sunday where they are called PixelBits. My understanding is that they will also be available at the usual sources later this year. I got a couple of them to test for compatibility with my light_ws2812 library.
What’s pretty cool about these LEDs is that they are diffuse – no more blinding unidirectional light. This might be very useful for indicator lights. Furthermore, you can easily wire them freeform without a pcb. I see a lot of RGB LED cubes coming up…
After investigating the timing of the WS2812 protocol in the previous part, the question is now how to use this knowledge for an optimized software implementation of a controller. An obvious approach would be to use an inner loop that uses a switch statement to branch into separate functions to emit either a “0” symbol or a “1” symbol. But as it is often, there is another solution that is both more elegant and more simple. Continue reading “Light_WS2812 library V2.0 – Part II: The Code”