Instructables

Upgrading Smart RGB LEDs: WS2812B vs. WS2812

The sheer number of projects we've seen making use of Smart RGB LEDs—whether it be strips, modules, or custom PCBs—over the past 3 years is quite astonishing.  This outbreak of RGB LED usage has gone hand-in-hand with a significant drop in pricing and an increased ease of use of these electronic devices.  

Amongst LED manufacturers, WorldSemi has seemingly become the de facto standard amongst DIYers, hobbyists, and wearable electronics designers.  The company's WS28XX family of Smart RGB LEDs includes an easy-to-use control protocol, a convenient pinout and footprint, and an incredibly bright luminescence, all within a tiny 5mm x 5mm package.   But, what really has made a difference in the products' DIY market success is the $0.30 to $0.40 unit pricing in small quantities.

In the latest version of these LEDs, the WS2812B, WorldSemi yet again has made significant improvements upon its predecessor, the WS2812.  Since there is very little information out there about this relatively new version, we decided to make a short Instructable to highlight the design upgrades, and advertise some of the already existing features of this nifty device!

Difficulty level: Beginner+ (some familiarity with smart RGB LEDs)
Time to completion: 5-10 Minutes


 
Remove these adsRemove these ads by Signing Up

Step 1: List of Materials

Picture of List of Materials
DSC_0560.jpg
To highlight the features of both the WS2812B and the WS2812 RGB LEDs, we can make use of the following parts:
1 x WS2812 RGB LED (pre-soldered onto a tiny breakout board)
1 x Solderless Breadboard
1 x Breakaway Pin Connector, 0.1" Pitch, 8-Pin Male
1 x Arduino Uno R3
1 x WS2812B Lumina Shield for Arduino
Solid Core Wire (assorted colors; 28 AWG) and Wire Strippers
Power Supply (Optional)

Both the WS2812 and WS2812B carry an embedded constant-current LED driver, as well as 3 individually controlled LEDs; one red, one green, and one blue.  The LED driver comprises:
- An internal oscillator
- A signal reshaping and amplification circuit
- A data latch
- A 3-channel, programmable constant current output drive
- 2 digital ports (serial output/input)

Note: the LED driver itself is also available in a 6-pin Integrated Circuit (IC) form, which we can use to connect directly to 'non-smart' RGB LEDs of our choice; the IC in question is non other than the WS2811.
jdavid223 months ago

Hello, I'm using Fubarino Sd, but do not understand how to translate your code
Arduino to Fubarino Sd.
I could help with this?
http://fubarino.org/sd/index.html

teejmeister4 months ago
Thank you for the very informative review. I shall order some of these beauties ASAP :-)
serhiyiv5 months ago

Hi. Could you tell me please is it possible to limit current used by WS2812B leds??? I found in a datasheet for WS2812 leds there is written - Current(mA) RED - 20, GREEN - 20, BLUE - 20. So if I set all the RGB to 255 the WS2812B will use 60mA? then how to limit it to 45mA???

acrobotic (author)  serhiyiv5 months ago
Thanks for the interest in our Instructable! You can use a current limiting resistor for that purpose. Each LED has a forward voltage of ~3V (check the datasheet). If you put a 40--50Ohm resistor between the power source and the VCC pins of the modules, you'd get a ~45mA current limit.

Remember that the more modules you have powered by the same supply, the more current that will pass through the resistor. Make sure that the wattage of the resistor is high enough for the *total* amount of current you'll be using.

Hi. Thank you for reply. I know adding a resistor works with simple LEDs but WS2812B has a built in IC, so I just wonder if the resistor won't interfere with the IC.????? Also, tell me please, as I've written above, if for example I set all the three (RGB) to half brightness (128, 128, 128), then will this WS2812B consume 30mA???? If so, then why the resistor????

acrobotic (author)  serhiyiv5 months ago

No problem, glad I can help.

The resistor won't interfere with the IC, as you're limiting the current supply only and not affecting the signal. The IC consumes little current, so it's negligible relative to the 20mA sourced to each LED.

The brightness scale isn't perfectly linear with current. Remember that a brightness of (1,1,1) will turn on the LEDs slightly, which means that current needs to be greater than the forward-current threshold (this value is on the datasheet). The best way to know how much current is needed for each intensity level, is to measure it. You can use your multimeter for this task!

I tried to measure the current used by one LED at full brightness (255, 255, 255) and my multimeter shower only 30 mA!!!! Also could you tell me please, in the datasheet I found the following:

"Also include a precision internal oscillator and a 12V voltage programmable constant current control part"

So it means that current usage can be programmed by 12V somehow, does not it?????