Can You Live Without The WS2812?

As near as we can tell, the popular WS2812 individually addressable RGB LED was released to the world sometime around the last half of 2013. This wasn’t long ago, or maybe it was an eternity; the ESP8266, the WiFi microcontroller we all know and love was only released a year or so later. If you call these things “Neopixels”, there’s a good reason: Adafruit introduced the WS28212 to the maker community, with no small effort expended on software support, and branding.

The WS2812 is produced by WorldSemi, who made a name for themselves earlier with LED driver solutions, especially the WS2811, an SOIC chip that would turn a common anode RGB LED into one that’s serially controllable. When they stuffed the brains from the WS2811 into a small package with a few LEDs, they created what is probably the most common programmable LED lighting solution available today.

A lot has changed in the six years that the WS2812 has been on the market. The computer modding scene hasn’t heard the words ‘cold cathode’ in years. Christmas lights are much cooler, and anyone who wants to add blinky to their bling has an easy way to do that.

But in the years since the WS2812 came on the market, there are a lot of follow-up products that do the same thing better. You now have serially addressable LEDs that won’t bring down the rest of the string when they fail. You have RGBW LEDs. There are LEDs with a wider color gamut and more. This is a look at the current state of serially addressable RGB LEDs, and what the future might have in store.

WS2813

The WS2812 and WS2812B LED has four pins: power, ground, data in, and data out. The idea is to feed a string of these LEDs some power, send data in, and the LEDs will light up. The WS2812 and WS2812B are nearly identical, with the ~B version having reverse current protection, just in case you forget red is positive and black is negative. It’s pretty simple for a 4-pin device.

One downside of the WS2812 is that when they’re wired in serial, if one goes down, the rest of the string goes down. Sure, the failure rate might only be a quarter of one percent in the worst case, but we’ve seen strings with hundreds of WS2812s hanging off of it. This sort of reliability is not something you want when you’re dealing with hundreds or thousands of a thing.

The WS2813 fixes the problem of dead strings of LEDs with a ‘BI’ pin. In a string of LEDs, this pin is connected to the DI pin of the previous LED.

The WS2813 is the solution to one LED bringing down the rest of the string. There are six pins in this package, and two data signals. There are integrated caps for simplifying the layout, and the refresh frequency can reach up to 2 kHz. Basically, if you’re doing something with WS2812s, do it with WS2813s instead. This is especially true if you’re putting these RGB LEDs through a reflow oven, just trust me on this.

You Wanted Smaller LEDs?

While the WS2812B, 2813, and associated LEDs are great for adding blinky, there’s only so much you can do with a large, 5 mm x 5 mm square package. For some applications, pixel pitch is important, and if you’ve ever seen a high density LED matrix made with small LEDs, you’ll know what I’m talking about. Just look at the screen that’s displaying this text.

What if there were an individaully addressable RGB LED that were smaller? That’s where the WS2812B-2020 comes in. Instead of 5 mm square, it’s 2 mm square. How big of a difference does that make? Check out the graphic to the right. That’s the footprint for a regular 2812B and a 2020-sized version, scaled to the correct relative dimensions. You can fit four of them in the footprint of a WS2182.

WS2815

While the WS2812 plays well with five volts, ohm’s law is a thing and RGB LEDs draw a lot of current. It would be nice if there were an individually addressable RGB LED that worked with higher voltages. It’s like how electric kettles aren’t a thing with 120 V mains power. Sometimes more voltage is better.

Enter the WS2815. Running at 12 V decreases the current, decreases resistive losses, and if you’re running really long strands of LEDs, makes mixing LED colors more consistent.

APA-109B

The APA-109B. The ‘B’ stands for ‘white’.

As much as we enjoy shouting “WorldSemi” as often and as loudly as possible, there are other manufacturers of serially addressable LEDs, and some of these chips have some interesting features.

I’d like to tell you a story about why engineers and marketers should never mix. A few years ago, an engineer at Sharp was reading the relevant literature on wide color gamut displays and discovered a vast amount of research into producing more vivid colors. The literature said there was a deficiency in traditional RGB color spaces, and the human eye is incredibly sensitive to green. If you want to create a display with a wide color gamut, you need to make a display with four colors: red, green, blue, and what’s best described as ’emerald’. The emerald is deeper, and not as ‘neon’ as a traditional green sub-pixel on an LCD TV.

An executive at Sharp ran with the idea until a marketer stepped in and said that nobody can sell two greens. What would you call it, “other green”. The engineer went back to the drawing board, crossed out ’emerald’, and wrote in ‘yellow’. This was Sharp’s Quattron technology, found in their Aquos line of TVs, and yes, each pixel had four subpixels: red, green, blue, and yellow. There were ads starring the captain of the Excelsior. Yes, there was a television ad (that you would watch on a TV) showing off the capabilities of a television with a wider color gamut enabled by a fourth primary color in the display. It’s around this time that your mind undergoes liquefaction under the intense pressure of attempting to comprehend reality. Don’t worry, the feeling won’t pass, but you do get used to it.

The APA-109B is the solution to trying to display white with red, green, and blue LEDs. If you’ve ever tried to put white on a panel of WS2812s, you’ll notice it isn’t quite right. It’s an electric Monet, with visible pastels swirling about, or at least that’s what it looks like when you’re staring into five hundred watts of RGB LEDs. The APA-109B adds a fourth LED in a 5 mm package, in this case a white LED. It takes up literally half the package, but if you need a white serially addressable LED, this is the one you go for.

91 thoughts on “Can You Live Without The WS2812?

  1. How about the other APA addressable LEDs? In particular the ones that use an SPI protocol, with a proper clock pin, and thus don’t have ridiculous timing requirements for the signal?

      1. The WS28xx protocol is pretty robust. Why would the APA102 be faster? Just the SPI clock speed? what about FPS for 600 led’s? Why would the WS28xx be sensitive to interrupts? With proper DMA programming there is no issue at all.

        1. Faster chip/protocol. On the LED end, the APA102 uses a simple two wire (clock/data) protocol which can transfer data bits speeds from very slow up to 10 Mbps or higher, versus a fixed speed of 800 Kbps for the WS281x family.

          The timing for this protocol is not critical; if the uC needs to pause for anything (to service an interrupt, to handle another software thread, to garbage collect), it can do so, then resume sending the rest of the data. With the WS281x, data timing is tight and critical and cannot be slowed down or speeded up; often interrupts need to be disabled during data transfer to the chips.

          Faster uC interfaces. On the uC side, this protocol is SPI compatible, so one can use SPI chip interfaces with support for buffering, interrupts and sometimes DMA data transfer, which can keep up with the faster potential of the chip’s data protocol. (For some uC and libraries, SPI hardware can be used to drive WS28xx through a clever hack (as can PWM or Serial hardware in other libaries), but the pixel data is still going out at 800 Kbps).

          Faster on-chip PWM. The APA102 uses a much faster PWM cycle. Some people are sensitive and see some flicker in WS28xx (the originals of which use 400 Hz PWM, tho some derivaties use 2K Hz).

          Where these advantages particularly come together is in moving displays, like POV (persistence of vision) wands; the APA 102 won’t show the highly visible “dotted line” trace of the WS28ax, and can be updated many more times per second as the wand moves.

  2. “CAN YOU LIVE WITHOUT THE WS2812?” Hmmm… Yes, I think so considering I just recently bought my first 2812’s and I haven’t even hooked them up to anything yet. But I have to admit that they are kinda cool so they might end up somewhere in a project someday.

      1. There is an occasional thing that pops up on sites like Reddit that Americans don’t know what electric kettles are, and one of the common reasons given for why they don’t use electric kettles is that their power is 120V.

        There is sort of some truth to this. 120V doesn’t prevent electric kettles from existing but reduces their usefulness. Typical electric kettles in 240V land would draw 2400 Watts or more, as allowed by typical 13A (UK) or 10A (some other places, like Australia) household outlets. This would not be possible for a 120V outlet limited to 15A or below as may be the case in North America, where electric kettles would be drawing maybe 1500 to 1800 Watts. They would boil slower, giving less of an advantage over using the stove.

        I would suspect the true reason would have more to do with cultural differences / types of hot drink consumed. Or that the “Americans don’t know what an electric kettle is” may be slightly overblown.

  3. I just wish mainstream LED and driver companies like Osram and TI would get together to make a quality addressable LED that I could have enough confidence in to design into permanent installations.

      1. That’s the exact reason why the WS2812B is still popular. With some energy spent talking to reps on Ali Express, you can get bulk strips of WS2812Bs for less than $0.10 each, including shipping. It’s the only reason we were able to make some of the huge portable displays we made for Burning Man. The price here drove the design.
        If anyone knows about another addressable RGB(W) LED that can be had in strips for less, speak up!

        1. “With some energy spent talking to reps on Ali Express, you can get bulk strips of WS2812Bs for less than $0.10 each, including shipping.”

          https://www.aliexpress.com/item/32877299440.html?spm=a2g0o.productlist.0.0.2c384a64DoAi3w&algo_pvid=0afc9f0e-1ce0-422e-9ac5-a8d80a70a948&algo_expid=0afc9f0e-1ce0-422e-9ac5-a8d80a70a948-28&btsid=0ab6fa8115876755415641021ee993&ws_ab_test=searchweb0_0,searchweb201602_,searchweb201603_

          What am I missing? That’s a 96/m strip (96/m seems to be the highest pixel density when laying out a square grid based on normal/average strip width) for $0.08125/LED in a 1m length, free shipping and a quick search. Didn’t take any “energy spent talking” to anyone, didn’t require buying in huge bulk amounts and is 81% of your price point. Did pricing come down that much since you bought them?

        2. “With some energy spent talking to reps on Ali Express, you can get bulk strips of WS2812Bs for less than $0.10 each, including shipping.”

          https://www.aliexpress.com/item/32877299440.html ($7.80/m for 96/m IP30. $8.80 for IP65 or IP67.)

          What am I missing? That’s a 96/m strip (96/m seems to be the highest pixel density when laying out a square grid based on normal/average strip width) for $0.08125/LED in a 1m length, free shipping and a quick search. Didn’t take any “energy spent talking” to anyone, didn’t require buying in huge bulk amounts and is 81% of your price point. Did pricing come down that much since you bought them?

    1. https://iseled.com/technology/iseled.html

      I wondered why these haven’t been addressed… (no pun intended)
      They are soon available in masses, are already calibrated for color, superior in quality, stable in harsh em environments, a bit more expensive. But I think not much more, than at adafruit!

      THE LED CONTROLLER
      RGB LED Controller
      Calibration-Free Use
      Simple 2-Wire Interface
      Embedded Temperature Compensation
      Daisy Chaining of up to 4.096 LED
      Complete Ecosystem – Software, Controller, LED
      Full Diagnostic Capability for Functional Lighting
      Designed for Automotive

        1. This is the price for the very first samples available, as a development piece.
          If it were this expensive, it wouldn’t be pursued by the automotive industry. They are very price sensitive, although the high prices for cars…

      1. “a bit more expensive. But I think not much more, than at adafruit!”

        How is a couple hundred bucks for a strip of 16 “a bit more” and “not much more”?

  4. Having done one project with the 2812, each product with 350 of them I can’t say i will be using them anytime soon. The problem is the catastrophic failure if any one device or comms lines goes down. I prefer products that limp to products that entirely fail. In the end I redesigned produced and delivered the product free of charge using traditional LEDs and driving techniques. Lesson learned.

          1. Mine does 7 cups, but it’s still a 1500 watt affair. A kettle in the UK is 2800 watts and will boil water around 187% faster.

            In my opinion the ability to walk away from the electric kettle and still have hot water when I eventually remember it’s on beats putting a kettle on the stove and setting a timer or risk boiling all the water off. I don’t really mind that it takes longer plus having temperature control is quite nice.

    1. If you have ever used a tea kettle in a country with 240V mains you will never consider a 120V kettle a serious affair again. Yes, you can eventually get warm tea in the US if you’re determined, but when I was in the UK my kettle could bring a cup to a rolling boil in less than a minute. Remember it’s v squared in that equation.

      1. No it isn’t V squared.

        It would be if R remained constant and I was unbounded, but that’s not the case here.

        European outlets have about the same current limit as Freedom outlets. Their voltage is 2x, so they get about 3kW max whereas we get about 1.5kW max.

        So their kettles heat about twice as fast.

        1. my supply voltage was a notional 240V (Aus) – though states are now dropping it down to 230v because the mess of our power market due to political nonsense – however I’m still getting 252V – 254V most days… The toaster certainly works well… But you really don’t want to put cheap crappy computer power supplies on, as they tend not to last more than a year or so…
          It always seems odd to us that the USA picked such a low voltage, and thus require higher current in all their tools and appliances.. I can plug some pretty decent stuff into to a 15amp 240v standard plug, and imagine the wires to run a decent oven at 110v!

          1. We have 240V service in the US but it’s split phase and most things use 120V. Ovens, dryers, water heaters, etc use 240V with two 120 legs and one neutral.

          2. We were one of the first nations in the world to have a power grid. The UK and most of europe got a later start and got to start over after WWII.

            That said, we also don’t use 120v for stoves or other high current appliances. We use 220-240v. And all homes have 240v coming into the circuit breaker from the power company. If we installed the proper outlets we could easily have 240v all over the house and in many ways it would actually be safer than the UKs 230v setup.

            I honestly expect we would see a switch to DC inside homes before we would see a switch to all outlets being 240v just because in most homes very few things use lots of amps anymore anyway. Still, the power bug in me would love to have 240v plugs all over the house for overpowered PC setups, fast boiling “kettles” etc etc.

  5. Anyone know of a good addressable driver for 12V LEDs that don’t have them integrated? I’m looking at doing some custom taillights with programmable animations(ie turn) and want to drive Amber/White/Red trios(I cannot find that in a 3 colour LED package, unsurprisingly) with a micro. The WS2815 without the integrated LEDs would work, but I have not found one.

    Optimally, I wish I could find this with through hold parts, to help with the environment of being in a car, but I suspect that’s not happening.

      1. TLC5971 is my favorite – 12 channels so good multiple for both RGB and RGBW, 2-wire SPI control, infinitely cascadeable, 16-bit scrambled PWM, internal PWM clock and 7 bit global current control. Has internal logic supply regulator, you can use a series zener to reduce from higher rails like 24v.
        Remember the voltage drop across the LEDs – you don’t need a 24v-capable driver if there are 6 LEDs in series.

          1. Normally you connect them in parallel, like in a bus structure. Or with the WS2812 (self clocking PWM data format you have only one line. Each WS2812 takes away the first 24bits and sends out the rest. In this process it repeats and reshapes the signal.

          2. Right but then the power is in parallel. If you’re powering them in series, with a voltage-drop across each one, how do you arrange for a corresponding voltage-drop on the clock/data line(s)? Is that where the series zenner comes into the picture?

          1. I’m confused too, as I know Mike knows his stuff so I can’t just ignore what he said. Even though it sounds dead wrong. As far as I know, the driver output still sees nearly 24v when the LEDs are off. So what did he mean by that?

    1. Dear [Geek42],
      The WS2811 is designed to be powered in 5V, but to use 12V leds.
      You can see in the description of this vendor that the schematics is what you want.
      https://www.aliexpress.com/item/10-1000pcs-WS2811-IC-SMD-chip-led-driver-WS2811-SMD-IC-100-new-original-WS2811-Chip/32844615804.html
      I don’t know if the image will display correctly :
      https://ae01.alicdn.com/img/pb/620/460/655/655460620_958.jpg
      So, you can put Red on Red, Amber on Green and White on Blue, and the driver will (theoretically) work fine.

      1. Ah I see, then you’re powering 3x the LEDs, but not 3x the pixels. You’re also assuming you can find R with similar voltage-drop to G or B? Or is that what the extra “RR” is helping with? And what’s a safe value for R1? Is it safe to assume the WS2811 is a fairly resistive load, and/or will it tolerate over/undervoltage conditions when operating at different currents?

      1. You keep using that word. I do not think it means what you think it means.

        Why would anyone want to drink LED drivers?

        ..or are you just using a word you recently heard someone else use?

          1. Really ancient slang. From Psalm 63: “O God, You are my God, earnestly I seek You; my soul thirsts for You; my body yearns for You in a dry and weary land without water.”

    1. That would require acknowledging a product other than Adafruit’s, and this article is basically a giant PR piece for Adafruit.

      Adafruit didn’t “introduce the WS28212 to the maker community.” What a bunch of revisionist bullcrap. Makers were importing them, libraries were written and published…and then Adafruit jumped on the bandwagon by giving them a name and charging ten times what they’re worth.

      1. Yes, we _know_, not the first, but among them, and if you count their work with the previous WS2801s, which are very similar…suffice it to say that Limor is as big a fan of the blinky as anyone.

        Anyway, Adafruit spent considerable (successful) effort branding them, making accessible and stunning demo projects, and putting out an Arduino lib. That’s why they get the big bucks. And that’s why a good percentage of our readership thinks of these as “Neopixels”. I’d bet 1000x times more projects used branded “Neopixels” than WS2812’s in 2014 and 2015.

        Also note the success of “Neopixels” vs their previous, similar LED product: “Digital RGB LED pixels” if you’re uncertain of the value of clever branding.

        But still, it’s fun to play the neopixel drinking game with that video. Take a shot every time she says “neopixel”. I’ll call the ambulance.

        1. I dunno. Adafruit libraries are truly a gift to humankind, but I think the worst thing they did here was mute the knowledge that someone had released an LED with an integrated microcontroller and driver.

          I heard about neopixels years ago, saw the price, understood that they had put an LED and microcontroller on a tiny board, and moved on. Years later I’m now learning that the microcontroller was embedded in the LED and the whole package was available from the manufacturer all along.

          I like adafruit but I think they missed an opportunity here to shout to the world that an LED with integrated addressable driver was now a thing. I’m certain I’d have heard about these LEDs sooner if neopixel hadn’t been a thing.

          1. The problem with Adafruit is that they’re trying to sell you hardware, but what they’re really providing is software and support. They’ve only got so long before their hardware designs are copied and sold for 10x cheaper on Alibaba.

            And that’s for the best case when they’ve done the engineering work themselves. (Which they do a lot of, and making breakout boards is a great service to a wide swath of the community.) When they’re just reselling something that’s already a commodity good, like WS2812 strips, they don’t even have a second — as soon as the secret is out, some portion of their sales will take the direct route.

            I don’t know the solution to their problem. I’m sure that they would like to say “Go buy these bits directly from China b/c we want to see more blinky projects!” but I’m also sure that they want to keep the company profitable and making the actually innovative stuff and providing great tutorials.

  6. The one thing about the WS2812 that pretty much dominates any of my applications is the cost of about $0.07 per pixel. That’s about what I would pay for a single plain old LED at Digi-Key.

    If any of these alternatives incur a much higher cost, I’m out. My 900-LED Christmas tree is right about at the budget limit.

  7. Still waiting that someone will make 24V or even 48V pixel leds. Our latest system use WS2811 controller @ 24V. 6 leds at each controller. Even with 24V that installation needs total 600A current so power planning is quite pain in ass.

    1. That’d require internal voltage regulators due to the nature of LED’s, and anything but switchmode tends to do double duty as a heater and unintended ballast.
      Or putting LED’s themselves in series, which increases the chances of failure.

      1. That’s much less than my estimation for a full-HD WS2812 screen: about 400kW to 500kW peak power (full white). But with nearly 20m width it could be seen from some distance and the brightness could be in the magnitude of direct sunlight

        1. Thats only, oh, 2-4% of the total output of some natural gas generation facilities. The cost, paperwork, and general effort of just connecting that to the grid would be substantial.

  8. WS2801 – Separate clock and data lines (but that’s only N+1 pins not 2N pins for N chains). SPI experts will mumble something about ring topologies but I’m going to say it anyway, WS2801 are TECHNICALLY SPI-compatible, or at least you can use ANY microcontroller’s SPI output to control them (honestly, as long as you don’t care about the ring topology technicality you’ll be absolutely fine). This frequently also brings the advantages of SPI DMA – On the raspberry pi it’s basically as simple as “cat rgb_file > /dev/spidev0.0”. SO much nicer than all the stooooopid timing issues you get with the WS2812 family. It feels like such a no-brainer… So I guess it’s inevitable that WS2812 is winning the race like VHS and Blu-Ray :-D

    1. WS2801 are not really SPI compatible (unless you’re willing to use 4 bits to to clock out a 1 or 0 to account for the weird timing). So, you would need to use 4 bytes over SPI to clock out 8 bits to a WS2801.

      Some of us don’t have DMA features on the controllers we use.

      APA102 or SK9822 can be driven very effectively using SPI due to that SCK line.

      SPI doesn’t have to be a closed loop – many SPI devices lack either SDI or SDO pins. Just try to “close” that loop.

  9. 307200 That’s the number of pixels in a 640×480 VGA display. Even if the price per multicolor LED is one cent, that’s 3072 dollars. Would make a decent video display for fairly long range viewing, but still expensive.

  10. How about some addressable LEDs in a more Christmas-tree-light like package? I recently wanted something like “micro wire” lights (thin flexible wire, and LEDs having an effectively 360deg visible angle via some diffuser on them) for an artwork.

    The nearest I could find were huge ~10mm LEDs on a big chunky wire, and still a tight viewing angle.

    I ended up going a different direction using standard WS2812 strips and wrapping them in a homemade diffuser.

      1. In the US almost all of our kettles use 120V, in Japan they’re 100V and they work fine even though they aren’t as fast. I don’t know how large the ones are where you are but mine is 1.75 liters.

  11. I’m going to give the APA102-2020 a shot for my next project. Mainly chose them for the small package (2.0 x 2.0 x 0.9mm). Specifications seem pretty low on the speed (400Hz), but on the other hand, having a seperate clock and data line might help a lot in applications where the controller does not just drive LEDs, but has other tasks to do at the same time.

  12. A reflow oven. What the heck was a string of LED’s doing in a reflow oven? Coincidentally I just pulled three super crispy boards out of a reflow oven I was PMing tonight. Apparently the operator set the guide track a little too far apart.

    1. I put 600 2812s on the front of the house last christmas – and ran them from a esp8266 so we could change what they were doing over wifi.. You could see the reflected light off the house opposite from 200m down the street, so it was a bit overkill….

      1. I bet that LED to some “interesting” conversations with the people in your neighborhood, hopefully none of them actively in uniform. :-) (one wouldn’t want to compel a visit from either police or fireman. :-) )

        Your project sounds like hackaday material. It would be great to see posted somewhere. I’m not too proud to copy someone else’s handiwork and I’m sure there are many other readers here with the same sentiment. :-)

        The project would be fun to play with. I bet it could shave 30 seconds off of delivery if you made it light up saying “Deliver Pizza Here” (might be hard to do with just 600 pixels without scrolling :-) )

        1. I did 4 rows of 150 pixels (in the plastic sleaves, each 5m long) with power fed into each end of each string. Then got my son – who I’ve been teaching programming – to write effects ie everything from bouncing leds to cylon eyes etc.. I was probably lucky that the lady opposite was in her mid 90’s and slept at the back of the house… .
          On the Pizza – you could always do something moving and pointing to the door.

          If we do it again this year I might take pictures of the process and put it up. But I’m not joking, you really could see it from a long way away… :-)

          1. 4 rows…hmmmm…It seems you could do text with 5 rows. Having looked at the spools of LED strips using the WS2812, the more sparsely populated ones seem more useful. If they were cheap enough one could run strips that are the same distance from each other as the chips are from each other on the strips. The cost and power use adds up quickly. (not to mention the brightness) I hope things go well with your possible redeployment. :-)

          2. I had fun with a small array of RGB leds. I had the traditional Cylon/Kitt red eye on black background, but also had the Valentine Cylon (Red on White), Christmas Cylon (Red on Green), and Halloween Cylon (Orange on Violet – a bit of a stretch). B)

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.