blog

“Meet the King of Value: Why WS2812B Is the Smart Pixel You’ve Been Looking For”

1200 2

WS2812B Product Introduction

WS2812B is a intelligent control LED light source that the control circuit and RGB chip are integrated in a package of 5050 components. It internal include intelligent digital port data latch and signal reshaping ampli fication drive circuit. Also include a precision internal oscillator and a 12V voltage programmable constant curr e-nt control part, effectively ensuring the pixel point light color height consistent. The data transfer protocol use single NZR communication mode. After the pixel power-on reset, the DIN port receive data from controller, the first pixel collect initial 24bit data then sent to the internal data latch, the other data which reshaping by the internal signal reshaping amplification circuit sent to the next cascade pixel through the DO port. After transmission for each pixel,the signal to reduce 24bit. pixel adopt auto resha-ping transmit technology, making the pixel cascade number is not limited the signal transmission, only depend on the speed of signal transmission. LED with low driving voltage, environmental protection and energy saving, high brightness, scattering angl e is large, good consistency, low power, long life and other advantages. The control chip integrated in LED above becoming more simple circuit, small volume, convenient installation.

Features and Benefits

  • Intelligent reverse connect protection, the power supply reverse connection does not damage the IC.
  • Thecontrol circuit and the LED share the only power source.
  • Control circuit and RGB chip are integrated in a package of 5050 components, form a complete control of pixel point.
  • Built-in signal reshaping circuit, after wave reshaping to the next driver, ensure wave-form distortion not accumulate.
  • Built-in electric reset circuit and power lost reset circuit.
  • Each pixel of the three primary color can achieve 256 brightness display, completed 16777216 color full color display, and scan frequency not less than 400Hz/s.
  • Cascadingport transmission signal by single line.
  • Anytwopointthe distance more than 5m transmission signal without any increase circuit.
  • Whentherefresh rate is 30fps, cascade number are not less than1024 points.
  • Senddataatspeeds of 800Kbps.
  • Thecolorofthe light were highly consistent, cost-effective..

Applications

  •  Full-color module, Full color soft lights a lamp strip.
  • LEDdecorative lighting, Indoor/outdoor LED video irregular screen.

Hardware Architecture

Schematic Diagram

Schematic Diagram 10

PIN function

No. Symbol Pin Name Function Description
1 VDD Power Power supply pin
2 DOUT Data Output Control data signal output
3 VSS Ground Signal ground and power ground connection
4 DIN Data Input Control data signal input

Internal Cascading Circuitry

The WS2812B is equipped with a data input (DIN) and a data output (DOUT) port. Multiple pixels can be cascaded by linking the DOUT of one pixel to the DIN of the subsequent one. Consequently, regardless of the number of pixels in the chain, the entire string can be controlled via a single data line from a microcontroller unit (MCU). This architecture significantly minimizes the I/O pin overhead on the MCU, simplifying both hardware design and implementation.

Internal Cascading Circuitry

Multiple boards can also be cascaded through their I/O ports.

jilian

They can be freely arranged into any shape you desire and then controlled via programming. This greatly enhances their versatility and makes them incredibly fun to use.

LED Parameters

Parameter Reference Value
Static Current 0.7mA
RGB Channel Constant Current 16mA
Red Light Brightness (Typical) 600mcd
Green Light Brightness (Typical) 1200mcd
Blue Light Brightness (Typical) 300mcd
White Light Brightness (Typical) 2100mcd
Red Light Wavelength 620–630nm
Green Light Wavelength 520–530nm
Blue Light Wavelength 465–475nm

Each of the three primary colors (Red, Green, and Blue) within a single pixel can display 256 levels of brightness. This results in 16,777,216 distinct colors, achieving true 24-bit color performance. Essentially, any color you can imagine can be displayed.

Fun LED Projects

LED Chasing Light Ring

Circular Product Effects Demo

Arduino code

				
					#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
  #include <avr/power.h>
#endif

#define PIN 11
#define BUTAN 2

// Parameter 1 = number of pixels in strip
// Parameter 2 = Arduino pin number (most are valid)
// Parameter 3 = pixel type flags, add together as needed:
//   NEO_KHZ800  800 KHz bitstream (most NeoPixel products w/WS2812 LEDs)
//   NEO_KHZ400  400 KHz (classic 'v1' (not v2) FLORA pixels, WS2811 drivers)
//   NEO_GRB     Pixels are wired for GRB bitstream (most NeoPixel products)
//   NEO_RGB     Pixels are wired for RGB bitstream (v1 FLORA pixels, not v2)
//   NEO_RGBW    Pixels are wired for RGBW bitstream (NeoPixel RGBW products)
Adafruit_NeoPixel strip = Adafruit_NeoPixel(24, PIN, NEO_GRB + NEO_KHZ800);

// IMPORTANT: To reduce NeoPixel burnout risk, add 1000 uF capacitor across
// pixel power leads, add 300 - 500 Ohm resistor on first pixel's data input
// and minimize distance between Arduino and first pixel.  Avoid connecting
// on a live circuit...if you must, connect GND first.

void setup() {
  // This is for Trinket 5V 16MHz, you can remove these three lines if you are not using a Trinket
  #if defined (__AVR_ATtiny85__)
    if (F_CPU == 16000000) clock_prescale_set(clock_div_1);
  #endif
  // End of trinket special code
pinMode(BUTAN, INPUT_PULLUP);

  strip.begin();
  strip.show(); // Initialize all pixels to 'off'

}

void loop() {
  // Some example procedures showing how to display to the pixels:
  colorWipe(strip.Color(255, 0, 0), 50); // Red
  colorWipe(strip.Color(0, 255, 0), 50); // Green
  colorWipe(strip.Color(0, 0, 255), 50); // Blue
//colorWipe(strip.Color(0, 0, 0, 255), 50); // White RGBW
  // Send a theater pixel chase in...
  theaterChase(strip.Color(127, 127, 127), 50); // White
  theaterChase(strip.Color(127, 0, 0), 50); // Red
  theaterChase(strip.Color(0, 0, 127), 50); // Blue

  rainbow(20);
  rainbowCycle(20);
  theaterChaseRainbow(50);
}

// Fill the dots one after the other with a color
void colorWipe(uint32_t c, uint8_t wait) {
  for(uint16_t i=0; i<strip.numPixels(); i++) {
    if(BUTAN!=1)
    {
    strip.setPixelColor(i, c);
    strip.show();
    delay(wait);
    }
    else
    {strip.begin();
     strip.show();
    }
  }
}

void rainbow(uint8_t wait) {
  uint16_t i, j;

  for(j=0; j<256; j++) {
    for(i=0; i<strip.numPixels(); i++) {
      strip.setPixelColor(i, Wheel((i+j) & 255));
    }
    strip.show();
    delay(wait);
  }
}

// Slightly different, this makes the rainbow equally distributed throughout
void rainbowCycle(uint8_t wait) {
  uint16_t i, j;

  for(j=0; j<256*5; j++) { // 5 cycles of all colors on wheel
    for(i=0; i< strip.numPixels(); i++) {
      strip.setPixelColor(i, Wheel(((i * 256 / strip.numPixels()) + j) & 255));
    }
    strip.show();
    delay(wait);
  }
}

//Theatre-style crawling lights.
void theaterChase(uint32_t c, uint8_t wait) {
  for (int j=0; j<10; j++) {  //do 10 cycles of chasing
    for (int q=0; q < 3; q++) {
      for (uint16_t i=0; i < strip.numPixels(); i=i+3) {
        strip.setPixelColor(i+q, c);    //turn every third pixel on
      }
      strip.show();

      delay(wait);

      for (uint16_t i=0; i < strip.numPixels(); i=i+3) {
        strip.setPixelColor(i+q, 0);        //turn every third pixel off
      }
    }
  }
}

//Theatre-style crawling lights with rainbow effect
void theaterChaseRainbow(uint8_t wait) {
  for (int j=0; j < 256; j++) {     // cycle all 256 colors in the wheel
    for (int q=0; q < 3; q++) {
      for (uint16_t i=0; i < strip.numPixels(); i=i+3) {
        strip.setPixelColor(i+q, Wheel( (i+j) % 255));    //turn every third pixel on
      }
      strip.show();

      delay(wait);

      for (uint16_t i=0; i < strip.numPixels(); i=i+3) {
        strip.setPixelColor(i+q, 0);        //turn every third pixel off
      }
    }
  }
}

// Input a value 0 to 255 to get a color value.
// The colours are a transition r - g - b - back to r.
uint32_t Wheel(byte WheelPos) {
  WheelPos = 255 - WheelPos;
  if(WheelPos < 85) {
    return strip.Color(255 - WheelPos * 3, 0, WheelPos * 3);
  }
  if(WheelPos < 170) {
    WheelPos -= 85;
    return strip.Color(0, WheelPos * 3, 255 - WheelPos * 3);
  }
  WheelPos -= 170;
  return strip.Color(WheelPos * 3, 255 - WheelPos * 3, 0);
}
				
			

video

FAQ

What are the differences between WS2812 and WS2812B?

The WS2812 uses a 6-pin package, whereas the WS2812B uses a 4-pin package. The WS2812B is an upgraded version of the WS2812, making it more convenient to use. Additionally, the WS2812B adds reverse polarity protection, along with more stable and faster signal transmission, higher brightness, and better color uniformity.

Can WS2812B LEDs be individually addressed?

Yes, they can. One of the key features of the WS2812B is that it is individually addressable. This is because the WS2812B is an RGB LED with an integrated driver chip. Each LED contains an RGB diode and a driver chip, which allows every single LED to be controlled independently through the data input pin.

If one WS2812B LED fails, will it affect the other LEDs that come after it?

Yes, it will. This is because the signal between WS2812B LEDs is transmitted in a cascading (or daisy-chain) manner. If a preceding LED in the chain fails, the subsequent LEDs will no longer receive the data signal and, as a result, cannot be controlled.

Great Deal! Click to Buy

Leave a Reply

Your email address will not be published. Required fields are marked *