Hello guys, today we are going to make this RGB ring using Neo pixel led's. we will learn, something new about Neo pixel, how to operate them, how to show different animations and how to make your own RGB neo pixel ring. In last we will control them using Arduino Nano board and make some cool stuff to show by combining all the rings.

Led specifications:

Here we are using 5mm*5mm WS2812 RGB addressable led's. These led have a special inbuild chip which give them address to glow. Using MCU we can generate an analog value between 0-255 in which is also defined in the code as 0- brightness.

mini_WS2812B-Addressable-RGB-LED-pinout-diagram.jpg

Now take 3 different value like (0,125,255) the first value represent the intensity of red color, second & third represent green and blue respectively. By changing the values we can represent different color scheme.

ice_screenshot_20211202-182114.png

This mini Led can be operated in the voltage of range of 3.3 to 5 volts without any external resistor. Although we can control the brightness through the code.

Components required:

1) Arduino Nano

2) Custom PCB's

3) Wires and all

4) Soldering equipments

Making of an RGB ring:

ice_screenshot_20220301-111135.png

I want to make a large one, which is not available in market, so JLCPCB comes to my mind and then I think to go with SMT service. So I made a schematics using EasyEDA and choose a proper component which is cheap and in stock.

Circuit diagram:

ice_screenshot_20220301-104528.png

Circuit description:

ice_screenshot_20211203-230331.png

I connected all the LED's in parallel and made the all the data connection in series. Keeping an eye on input and output, some headers are placed accordingly. Making all the power connection in parallel is easy and can be power directly through microcontroller line. One panel/ring has 20 Led's and in this manner you can connect them all.

Code:

1) Download all the libraries, link is given below or include them through manage libraries option under the tools menu in Arduino IDE.

#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
 #include <avr/power.h> // Required for 16 MHz Adafruit Trinket
#endif

2) Choose the Arduino digital pin from D2 to D13 and then the total number of LED's.

#define LED_PIN    6

// How many NeoPixels are attached to the Arduino?
#define LED_COUNT 60

3) See the datasheet of LED used in project and uncomment the line, In most case it will work on this: 

// Declare our NeoPixel strip object:
Adafruit_NeoPixel strip(LED_COUNT, LED_PIN, NEO_GRB + NEO_KHZ800);
// Argument 1 = Number of pixels in NeoPixel strip
// Argument 2 = Arduino pin number (most are valid)
// Argument 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)

4) Initialize the Led's and set the brightness from 0 to 255. More the brightness more the led will draw the current. 

strip.begin();           // INITIALIZE NeoPixel strip object (REQUIRED)
  strip.show();            // Turn OFF all pixels ASAP
  strip.setBrightness(50); // Set BRIGHTNESS to about 1/5 (max = 255)
}

5) In the loop section there are 3 piece of code, you can change them increase/ decrease the time of effect and speed. 

// Fill along the length of the strip in various colors...
  colorWipe(strip.Color(255,   0,   0), 50); // Red
  colorWipe(strip.Color(  0, 255,   0), 50); // Green
  colorWipe(strip.Color(  0,   0, 255), 50); // Blue

  // Do a theater marquee effect in various colors...
  theaterChase(strip.Color(127, 127, 127), 50); // White, half brightness
  theaterChase(strip.Color(127,   0,   0), 50); // Red, half brightness
  theaterChase(strip.Color(  0,   0, 127), 50); // Blue, half brightness

  rainbow(10);             // Flowing rainbow cycle along the whole strip
  theaterChaseRainbow(50); // Rainbow-enhanced theaterChase variant
}

6) In the code (127, 127, 127), 50) these number will define the color...

Read more »