How to Drive SK6812 RGBW Addressable Strips with Arduino

SuntechLite is a top manufacturer and supplier that focuses on pixel LED strips and LED neon lights.

This blog will show you how to drive SK6812 RGBW addressable strips with Arduino. Including wiring, code uploading, and how to create your own unique lighting effects. Even beginners can do it.

1.Materials Required

Power Supply

power supply 5V
5V Power Supply

Select a power supply that accepts either AC110V or 220V and outputs a steady DC5V. Power capacity should match your LED strip’s needs. This power supply will powers both the SK6812 RGBW strip and Arduino board. Its open-frame design enhances cooling and reliability.

Arduino Board

suntechlite arduino 1 1
Arduino Pin Introduction

The Arduino UNO R3, powered directly from the supply’s 5V line, uses an ATmega328P chip and operates at 16 MHz. It features 14 digital I/O pins (6 with PWM) and 6 analog inputs. Use the USB port for programming. The Arduino will send signals to control the SK6812 strip.

SK6812 LED Strip

DA6 5V RGBW SK6812
60LEDs/m SK6812 RGBW LED Strip

This SK6812 LED strip runs at DC5V. Each meter contains 60 RGBW LEDs in an individually addressable LED strip. Every pixel can produce any color. Data transmission uses a single-wire protocol for smooth effect control. SK6812 RGBW strips are popular for displays, ambient lighting, and project builds.

Other Accessories

Wires: For connecting the power supply, Arduino board, and SK6812 RGBW LED strip.
Logic-Level Shifter : For protecting the Arduino board(Optional).

2.Wiring Diagram

Arduino SK6812 wire diagram
How to Control SK6812 RGBW LED Strip with Arduino Wiring Diagram

The above is the wring diagram of Arduino, SK6812 RGBW LED strip, and power supply.

Please keep these points in mind:

  • The control board draws less than 500mA of current.
  • Do not connect power to the 5V or 3.3V pins directly—these are outputs only. Supply power through the VIN and GND pins or DC jack.
  • While wiring is similar for RGB, RGBW, and RGBWW strips, their control software is different and not interchangeable.
  • To ensure smooth effects, keep total pixel count below 375 for addressable RGBW LED strips.

3. Connection Diagram

How to Drive SK6812 RGBW Addressable Strips with Arduino
How to Control SK6812 LED Strip with Arduino Suntechlite

Wiring Tips

  • Keep the data wire short and direct from Arduino to DI on the LED strip.
  • Double-check that power supply terminals are securely tightened.
  • Always turn off power before making any changes to your setup.

4. Code Upload

You will need sample code to operate your SK6812 RGBW strip with Arduino. Example codes offer different lighting effects. Contact us if you need help or run into any problems.

				
					#include 

// Hardware Configuration
#define LED_PIN     11      // Control pin
#define NUM_LEDS    80      // Number of LEDs
#define BRIGHTNESS  64      // Initial brightness (0-255)

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

// Effect Parameters
uint8_t effect = 0;         // Current effect (0-2)
uint16_t speedDelay = 50;   // Effect speed (ms)
unsigned long prevMillis = 0;

void setup() {
  Serial.begin(115200);
  strip.begin();
  strip.setBrightness(BRIGHTNESS);
  strip.show(); // Turn off all LEDs after initialization

  Serial.println("Input commands to control effects:");
  Serial.println("1: Rainbow flow effect");
  Serial.println("2: Blink effect");
  Serial.println("3: Chase effect");
  Serial.println("+: Increase speed");
  Serial.println("-: Decrease speed");
}

void loop() {
  // Serial control
  if (Serial.available()) {
    char cmd = Serial.read();
    switch(cmd) {
      case '1': effect = 0; Serial.println("Rainbow flow effect"); break;
      case '2': effect = 1; Serial.println("Blink effect"); break;
      case '3': effect = 2; Serial.println("Chase effect"); break;
      case '+': speedDelay = max(20, speedDelay-10); break;
      case '-': speedDelay = min(500, speedDelay+10); break;
    }
    Serial.print("Current speed: "); Serial.println(speedDelay);
  }

  // Timed effect execution
  if (millis() - prevMillis >= speedDelay) {
    prevMillis = millis();
    
    switch(effect) {
      case 0: rainbowFlow(); break;
      case 1: blinkEffect(); break;
      case 2: chaseEffect(); break;
    }
    strip.show();
  }
}

// ================== Effect Implementations ==================
// Rainbow Flow Effect
void rainbowFlow() {
  static uint16_t hue = 0;
  for(int i=0; i<strip.numPixels(); i++) {
    // Calculate rainbow color (using RGB channels only)
    uint32_t color = strip.ColorHSV((hue + i*65536L/strip.numPixels()) % 65536);
    // Convert RGB to RGBW (keep white channel at 0)
    strip.setPixelColor(i, color);
  }
  hue += 256; // Adjust hue change speed
}

// Blink Effect
void blinkEffect() {
  static bool state = false;
  if(state) {
    // Random RGBW color
    strip.fill(strip.Color(random(256), random(256), random(256), random(256)));
  } else {
    strip.fill(0);
  }
  state = !state;
}

// Chase Effect
void chaseEffect() {
  static int pos = 0;
  strip.fill(0); // Clear all LEDs
  
  // Set current LED color (with white channel)
  strip.setPixelColor(pos, strip.Color(0, 255, 0, 100)); // RGBW: Green + White
  
  pos = (pos + 1) % strip.numPixels();
}
				
			

5.Lighting Effect Demonstration

This video shows how to use Arduino to control SK6812 RGBW LED strips and achieve various lighting effects. For reliable performance, make sure to use the correct power supply, secure all wiring, and choose a compatible code library. These steps allow you to customize lighting patterns on your SK6812 RGBW LED strips.

If you have any questions or need support with Arduino UNO and SK6812 RGBW LED strips, feel free to reach out to us.

Share To

Enquiry