NeoPixel LEDs Strip

NeoPixel led is a strip of LEDs with RGB combinations. The LED strip made by the Adafruit company to avoid the pins issue and complex circuitry. The whole strip has a total of max 144 LEDs in a series. The strip uses a 5050 RGB LEDs the whole LEDs to connect with the use of an IC WS2812/SK6812. However, the RGB LED strip gives the three output pins which can control the color and state of each LED. All LEDs are in series form in connection with each other. The LED strip is controllable with almost every board that is operated able with Arduino IDE because of its official library in the Arduino.

NeoPixel LEDs Pinout Diagram

The pin configuration of NeoPixel LEDs is simple and easy to use with the library of Arduino. However, the main reason for the introduction of the LED strip is due to the complex pins structure. When multiple LEDs connect, they come up with a larger circuit that has complex circuitry and a large number of pins. In the strip, the use of 5050 LED solves the issue and gives the 3 pins to control the whole LED strip of a total of 144 LEDs MAX. The pins of the LED strip are:

NeoPixel LED Pin configuration

Power Pins

The power pin is simply a power input pin for the whole strip. The volts of strip remains constant but the ampere needs to increase by each LED. To make it error-free and fully bright as same with all the LEDs always use a better power supply otherwise some LEDs may not glow properly.

GND

The ground pins to make the common ground with all the controlling devices. In the whole LED strip, all the grounds are common with IC WS2812/SK6812. Further, the IC gives a single ground pin to make the common ground.

Data Pins

The data pin is for the Microcontroller/Arduino. It takes the serial data input from the Arduino/Microcontroller and then displays the LED pattern on the strip according to the given data. The data pins are only one in the whole strip and help to control the color and state of any LED.

NeoPixel LED Feature

  • Each LED of the strip is programmable and addressable.
  • The strip shape is changeable to almost every design.
  • The whole strip operates at 3.3/5V but the power needs to adjust according to the number of LEDs.
  • Each LED consumes 0.3 to 0.35-Watt power. So, to make the LED full bright 60mA for each LED is enough.
  • The whole LED strip is controllable by only one pin which is because of the usage of driver IC WS2812/SK6812.
  • The strip is available in multiple packages too.

Note: You can always refer datasheet for more tutorials. The link of datasheet is available at the end of the article.

NeoPixel LED Applications

  • The LED helps in electronic advertisements, to generate different patterns for attraction.
  • The strip is also available in wearable electronics.
  • The strip is mostly available in decorations.
  • The LED strip is also used to design digital posters.

Internal Circuit

The internal structure of the LED strip is very simple because of its simple design in the market the original Adafruit LED strip is hard to find. The LED strip is just a combination of 5050 RGB LEDs in series but when LEDs connected in series otherwise, they don’t work. In the strip, each led first connects with the capacitor, then with driver WS2812/SK6812 internally. The driver is the one reason why all the LED works.

NeoPixel LED Driver

In the LED strip the driver solves the parallel input to each LED. Two types of drivers help to solve the issue of parallel input. Both drivers come within 5050 RGB led. In the RGB LED the driver WS2812B/SK6812 internally connects with the LED and comes out the two power pins and two data pins. The other driver is WS2812 which makes a total of six output pins. The LED with WS2812 also has two data pins but three pins are the power pin from which the one pin allows to provide the different power supply to the LED. However, the sixth pin is the NC (no connection) pin. Both the driver/IC diagram are:

NeoPixel LEDs SK6812 Pinout

LEDs SK6812 Pinout

NeoPixel LEDs WS2812 and WS2812B Pinout

NeoPixel LEDs WS2812 and WS2812B Pinout

 

The 5050 LED on the strip connects with the capacitor in a series. The data transfer from one pin and then come out from the data out pin. The power and ground are always in common with each other with the whole LED strip. The power pins use the capacitor and with every 5050 RGB. Here’s the circuit, that’s how the LEDs connects in the whole strip:

WS812

Data Transmission

In the LED strip the data transmitted in the series form. From the microcontroller/Arduino, only 24-bit data transmit. Then data goes into one LED and performs as it is instructed, then the data of the next LED gets reshape in the microcontroller according to the next LED. The next data will also be of 24-bits. Every time the data generates from the microcontroller will have the LED address which one it should operate. The LED strip with PIC microcontroller can also operate but there isn’t any official library or method by Adafruit.

How to use NeoPixel LEDs?

The Neo Pixel LEDs have a usage in both commercial and industrial applications. The Strip is easy to use the Arduino due to its official library but there are a bunch of new libraries besides official ones to control the whole LED strip. Here we will use the official library to control the LED strip. To use the LED strip with Arduino and Arduino board is useable even it has only one free pin. To use the LED strip here’s the following circuit:

NeoPixel LEDs interfacing with Arduino

NeoPixel LEDs with Arduino

NeoPixel LEDs Programming

Arduino Library

Download Arduino Library

After designing the circuit use the following official library:

#include <Adafruit_NeoPixel.h>

The library is useable with both 16 and 8 MHz clock Arduino.  After declaring the library, the Arduino needs to declare the strip pin on the Arduino, no of LEDs, the clock and LED combination type:

Adafruit_NeoPixel strip(LED_COUNT, LED_PIN, NEO_GRBW + NEO_KHZ800);

The LED_COUT needs to change with the total number of LEDs Arduino is going to control and LED_PIN is to describe the LED data pin on Arduino. The NEW_GRBW and NEW_KHZ800 are changeable according to the bitstream of the LED strip. Here’s the variable for each LED strip.

  • NEO_KHZ800 800 kHz bitstream NeoPixel products w/WS2812 LEDs
  • NEO_KHZ400 400 kHz bitstream v1 of FLORA pixels, WS2811
  • NEO_GRB for GRB bitstream in NeoPixel Mostly
  • NEO_RGB for RGB bitstream v1 FLORA pixels only
  • NEO_RGBW for RGBW bitstream NeoPixel RGBW

The LED strip is useable for mostly with 16MHz and 8MHz Arduino board. In the library, it needs to describe the clock.

#if defined(__AVR_ATtiny85__) && (F_CPU == 16000000)
clock_prescale_set(clock_div_1);
#endif

Initialization

In Arduino to use the LED strip, it should be initialized in the Arduino setup. The Arduino initialization has three kinds of commands. All three are:

strip.begin();
strip.show();
strip.setBrightness(50);

The strip.begin is to initialize strip for Arduino. It needs to describe otherwise the library won’t work. The strip.show command is to turn off all the LEDs once but it isn’t necessary. Then, there’s the third command strip.setBrightness whose value describes the intensity of each LED. The value needs to be from 0 to 255, 0 describes the minimum value and 255 describes the maximum value.

Data Display

To control each LED of the strip is controllable related to state and color. To control the color and state of each LED use the following command:

pixels.setPixelColor(LED, pixels.Color(0, 150, 0));

The LED number needs to change the “LED” variable and pixel color needs to change with the color of each LED. Then the Arduino needs to use the following command to send the data:

 pixels.show();

After sending the show command the Arduino will send the data to the specific LED. Therefore, the values change too much fast for each LED that it looks like that all LEDs change instantly. There are multiple functions the LED strip can perform which can be found on the internet.

Datasheet

NeoPixel LEDs Datasheet

Leave a Comment