Close

Which smart LEDs to use?

A project log for CUBEx8

An 8x8x8 RGB LED cube kit using addressable LEDs!

burkethosburkethos 05/09/2019 at 01:570 Comments

The two primary smart LED types favored by makers are the WS2812 and the APA102. The WS2812 requires only a single 5V logic level signal to drive a daisy-chain of LEDs. Hundreds of LEDs can be controlled with a single GPIO pin. The downside is that this serial data signal is relatively slow which impacts how fast you can update individual LEDs and how many LEDs you can string together for a given update rate. The timing of this signal is also somewhat precise and not easy for simple microcontroller boards to handle.

The APA102 LED requires two 5V logic level signals to drive a chain of LEDs -- one serial data signal plus a corresponding clock signal. As with the WS2812 style, hundreds of LEDs can be controlled with two GPIO pins. One downside is doubling the number of GPIO pins required to drive the LEDs. A major upside is that adding the clock signal allows you to run at a substantially higher update rate.

So, tradeoffs.

A quick look at major suppliers in China showed that the WS2812 style is about half the price of the APA102 style. The WS2812 and its' variants such as the SK6812 family are readily available from numerous sources in the original 5050 package (5.0mm x 5.0mm) and the smaller 3535 (3.5mm) package sizes. Very tiny. Having secondary suppliers is important – you need alternate sources on the chance that components from your primary supplier become unavailable.

The APA102 style is also readily available in the larger 5050 size package, but can also be found in the smaller 2020 (2mm) size. Very, very tiny indeed! It was interesting to notice that some of the vendors claiming to have the APA102 2020 parts would advertise an incredibly low price then show a picture of a 4-pin smart LED.

APA102 style LEDs all have six pins!

Caveat emptor applies at all times when dealing with component suppliers. Pay attention! If most of the vendors are charging $0.15 to $0.18 per LED in bulk quantity and one vendor is offering them for $0.01, it is likely a scam. If it sounds too good to be true it probably is.

The color of the LED package may also be important. Most come in white packages but sometimes black can be found. This can play into the visual aesthetic of your product.

Digging further, it appears that many of the controller boards that makers favor, such as Arduino, Teensy, Raspberry Pi etc., have software libraries available to drive either type of LED. Therefore, I could choose either type of LED. Unfortunately these two types of LEDs are not interchangeable.

I had to choose one or the other to move forward.

It would be easy to argue back-and-forth about the merits for one type of LED over the other. Since my primary motivator for this kit is reduced cost, I chose to go with the less expensive WS2812 mini 3535 style LED. In large quantity the WS2812 style LEDs are about half the cost of the APA102 devices. Back of the napkin math suggested that a x8 cube with 512 LEDs, the raw LED costs for WS2812 would be more than $40 less expensive compared to the APA102 style. That is a significant price difference.

Discussions