Decorative lighting industry has growing a lot these day as people interest on creative lighting increased. Previously there were single color serial bulbs and then after days LED lights were developed and then RGB LEDs were developed with low power consumption and intensity with 3 colors in a single bulb.
Then at present smart LED’s are ruling the lighting industry, in those Neopixels or pixels plays a vital role in decorative field. So here we are going to explain how the smart RGB led strips or chains work and what how is the internal circuitary in the pixels RGB leds. In this article, we took WS2812B a neopixel as consideration.
Table of Contents
Pixel or Neo Pixel:
Smart RGB led lights have various names, the most common one is Neopixels. Each light / section is controlled by an integrated circuit that processes the information and converts it into data to control the light, the data then passes to the next light / section, the name that receives the data used is called SPI which means Serial Peripheral Interface Bus .Which is a standard in data transfer developed by Motorola. The data is then sent across the line, the first light / section accepts the first piece of data, removes the information, re-generates the data signal before moving on to the second light / section, and so on. The directions of the lights do not necessarily have to be physically directed individually but they transmit the data in cascade which means that you can replace a light / section without worrying about assigning direction to the new one. Smart RGB led lights or pixels have 3 or 4 cables, 2 of them are used to pass the power to the light and the integrated circuit, the other 2 are for data and the “clock” but most do not use the cable. “Clock”.
How the Neopixel RGB LED works:
- All the neopixels LEDs have a dedicated integrated circuit chip inside each LED which stores 3 Bytes of storage.
- WS2812B has 3 X 5050 LEDs (5.0 x 5.0 mm) with the basic RGB (Red-Green-Blue) colors. Combining these colors we can represent them all.
- It has 3 wires connected, one for Vcc (power), one for ground, and another one for data. These three are replicated to the other end of the LED so that they are connected to another LEDs if available, so chain goes on.
As we have said that the integrated circuit in WS2812b stores 3 bytes (24 bits), the reason is because it uses 1 byte for each RGB color led/pixel. With one byte (or 8 bits) you can store values from 0 to 255, that means that each RGB microled / neopixel can have up to 256 levels. Therefore if we combine the three RGB colors, we can represent more than 16 million possible colors. isn’t it great???
Related article: Sound Reactive RGB LED strip with ESP8266 with screen reactive
Okay, but how can we tell each LED to have a certain color and all data goes through a single cable? The solution is super simple: when an LED receives a stream of bytes, it stores the last received bytes and transmits the ones it contained to the next LED. Finally, with a signal called “resetcode” each LED shows the last value it has stored. Do you understand ?, no, let’s see… with an example it may be easier:
Lets imagine that we have a strip of 5 LEDs and we want to light LED1 red, LED3 green and LED5 blue, leaving the rest off. Well, the idea is to launch a string of bits like this:
This means that we will always send all the information for each of the LEDs, even if they are off.
This great idea allows you to make multiple LED configurations, in which we only have to communicate with the first one and each LED acts as a transmitter of the sequence to the subsequent LEDs. It also allows us to chain or divide LED strips and any fragment will continue to work because all LEDs have exactly the same behavior. In addition, each LED when transmitting the signal to the next, performs a reconstruction, that is, in this way it does not distort or accumulates noise for the following LEDs. This also allows powering strips of more than 5m without the need for devices that amplify the signal.
- VDD Power supply LED
- DOUT Control datasignal output
- VSS Ground
- DIN Control datasignal input
Differences between Neopixel and simple RGB LED lights
The RGB led lights have three channels, one to control each of the colors, one for red, one for green, one for blue, by changing the intensity percentages of each of these leds, the color will be formed. RGB LED lights can be controlled individually or single line. We will classify RGB led lights into two basic types of control:
- Led lights with RGB single controlled
- Led lights with Smart RGB control, individually controlled. We sometimes refer to this guy as Smart Pixels or neo pixels.
The difference between single controlled 3-channel led lights (led strip, led series) and smart RGB led lights is that a small black integrated circuit (chip) is located in the smart pixels, in each of the sections of the led lights. The intelligent control is turned on when it receives the appropriate data and controls the RGB level. To physically identify the differences, I show you the following images.
The led which does not have a chip, the entire strip or line will light up in the color that we specify, it uses only 3 channels for the entire line. The led which has a Chip each light will consume 3 channels, each led or light is controlled individually.
The following diagram shows the differences in the control of led lights, the simple strip is controlled completely and only uses 3 channels, the neopixels, or smart leds are controlled individually by sections, depending on how many leds a chip is found and that will count as 3 channels individually. In general, the Pixel has 3 cables, two cables for current and an additional one to control data, Where as simple LED strip has 4 cables, one for each color, plus the current cable. You can view the difference from the below image.
Some times few Smart Led Strips have 4 cable where the 4th cable indicates the clock.
Advantages of NeoPixel LED Strips:
This smart LEDs are connected to development boards to make amazing projects like sound and screen reactive colorful lights as we made on our previous project. By connecting with some pre programmed ICs or Smart Led connector you can make pattern blinking lights for decoration in parties or for Christmas.