How to Use NeoPixel / WS2812 16-bit Ring Using Arduino Nano

by MrSottong in Circuits > Arduino

11895 Views, 17 Favorites, 0 Comments

How to Use NeoPixel / WS2812 16-bit Ring Using Arduino Nano

IMG_7169.JPG

WS2812 is an LED Module which consists of RGB LEDs and its control chip integrated in a 5050 component package.

Features and Benefits:

  • Control circuit and RGB chip are integrated in a package of 5050 components.
  • Built-in signal reshaping circuit.
  • Built-in electric reset circuit and power lost reset circuit.
  • Cascading port transmission signal by single line.
  • Send data at speeds of 800Kbps.

See the datasheet for more info WS2812

Required Components

IMG_7160.JPG
IMG_6883.JPG
IMG_6885.JPG
IMG_6886.JPG

The components you need for this tutorial :

Required Library :

To add a library to Arduino, see this article "How to Add an External Library to Arduino"

Connect the RGB Ring to Arduino

IMG_7163.JPG
IMG_7175.JPG

Follow the instructions below to connect WS2812 to Arduino Nano :

WS2812 to Arduino

IN ==> D6

VCC ==> +5V

GND ==> GND

Programing

Untitled.png

Open Arduino IDE

Click File > Examples > Adafruit NeoPixel > strandtest

You must change some values from this sketch,

What must be changed is as follows:

  • Pin used
#define LED_PIN    6
  • Number of LEDs
#define LED_COUNT 16
  • Set Brightness
strip.setBrightness(10);

Set the values above according to your needs

After that, upload the sketch to Arduino.

Results

WS8212

You can see the results on the video