In this illustration we’re going to wire the 8bit WS2812B 50-50 which Chainable, addressable LED (Light Emitting Diode) A precise on any vivid colorful light mixing animation, these module as the example for this demonstration we going to control each WS2812B LED using Digital and serial communication. There are two types or version of WS2812 the WS2812 and the WS2812B see the diagram below the difference between the two of theme.

The WS2812 is a family of smart LED light source that control circuit and RGB chip are integrated in a package 50-50 component. It is an onboard intelligent digital port latch and signal reshaping implication drive circuit an effectively ensuring that the pixel point light color are HIGH and consistent.

The data transfer protocol uses a single NZR communication mode. When powering the pixel the D-IN port receive data from the microcontroller, the first pixel collect initial a 24bit of data then sent to the internal data latch, the other data which is 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 will reduce to 24bit. The pixel adopt an auto reshaping transmit technology, making the pixel cascade number is not limited the signal transmission only depend on the speed of the signal transmission.

The WS2812B is a new generation of the product based on WS2812. It is not only inherited from the WS2812 but also improve the Integrated Circuit from mechanical arrangement outside & inside to the structure and enhance the stability and efficiency.

Compared to the first version of WS2812 and the new WS2812B they added a reverse protection circuit. The circuit has been reverse the connection of the power supply without any damage to the device and to increase the stability which in effect.

As you can see the mechanical design. You can see the comparison between the two, it is very easy to find the difference between the WS281 and WS2812B the same size but difference is the PIN number they reduced to 4 pin, with the decrease of the spacing between adjacent legs is added.

WS2812 / WS2812B

WS2812-vs-WS2812B-Schematics-Diagram-Comparison-001

WS2812 Protocol

ws2812-ws2812b-led-rgb-chain-protocol-diagram-14core-schematics-wiring-guide

Wiring with Arduino

WS2812-vs-WS2812B-Schematics-Diagram-Comparison-Wiring-Diagram-Arduino-001

Predefined Colors in FastLED Library

Fedefined-WS2812-Color-Code-FastLed-Library

Arduino Sketch Code w/d Fast LED





Downloads

Download FASTLED Code Library | Zip
Download  Adafruit NeoPixel Code Library | Zip
Driving Thousand of LED Strip? Download OctoWS2811 | Zip

Wiring WS2812 8-Bit RGB LED Strip with Arduino
Facebooktwitterredditpinterestmail
Tagged on:             

JLCPCBPCBgogoPCBway4pcb

4 thoughts on “Wiring WS2812 8-Bit RGB LED Strip with Arduino

  • at
    Permalink

    Is diagram correct,
    Seems that you are showing vdd and vss connected together on 2 LEDs.
    I thought vdd would go to vdd and vss to vss , to ground and +5v respectively.

    Reply
    • at
      Permalink

      Diagram has been updated. please refer to the WS128 & WS128B datasheet for further details.
      Thanks & Regards

      Reply
  • at
    Permalink

    Hello,

    I would like to know how do you send the commands through the serial monitor.
    I know by typing m23 I get an led effect. But when I type l,100,255,000,255 I don’t see the color change.
    Could you please help me with this?
    Thanks!

    Reply
    • at
      Permalink

      Hi Wilson, just follow the code below. :)
      —————————————————
      #include
      #include

      #define signalOutRed 3 // Output Pin
      #define signalOutGreen 5 // Output Pin
      #define signalOutBlue 6 // Output Pin
      SerialCommand ownSerialCommand; // Your Serial Command object
      void setup()
      {
      Serial.begin(9600);
      pinMode(signalOutRed,OUTPUT);
      pinMode(signalOutGreen,OUTPUT);
      pinMode(signalOutBlue,OUTPUT);
      //This a callbacks for SerialCommand commands
      ownSerialCommand.addCommand(“ON”,sON); // Turns LED on
      ownSerialCommand.addCommand(“OFF”,sOFF); // Turns LED off
      ownSerialCommand.addCommand(“RED”, sRED); // Echos the string argument back
      ownSerialCommand.addCommand(“GREEN”,sGREEN);
      ownSerialCommand.addCommand(“RED”, sBLUE);
      ownSerialCommand.addDefaultHandler(noCommand); // Handler for command that isn’t matched
      Serial.println(“14CORE | Led Strip Serial Command Test Code”);
      delay(1000)
      }
      void loop()
      {
      ownSerialCommand.readSerial(); // We don’t do much, just process serial commands
      }
      void sON()
      {
      Serial.println(“Led Strip On”);
      analogWrite(signalOutRed, 0);
      analogWrite(signalOutGreen, 0);
      analogWrite(signalOutBlue, 0);
      }
      void sOFF()
      {
      Serial.println(“Led Strip On”);
      analogWrite(signalOutRed, 255);
      analogWrite(signalOutGreen, 255);
      analogWrite(signalOutBlue, 255);
      }
      // Change the value of each color from 0 to 255 to generate your own color of choice
      void sRED()
      {
      Serial.println(“Led Strip Color Blue”);
      analogWrite(signalOutRed, 255);
      analogWrite(signalOutGreen, 0);
      analogWrite(signalOutRed, 0);
      }
      void sGREEN()
      {
      Serial.println(“Led Strip Color Blue”);
      analogWrite(signalOutRed, 0);
      analogWrite(signalOutGreen, 255);
      analogWrite(signalOutBlue, 0);
      }
      void sBLUE()
      {
      Serial.println(“Led Strip Color Blue”);
      analogWrite(signalOutRed, 0);
      analogWrite(signalOutGreen, 0);
      analogWrite(signalOutRed, 255);
      }
      void noCommand()
      {
      Serial.println(“No Command Available”);
      }

      Reply

Leave a Reply to Nigel Cancel reply

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