WS2815 Programmable LED Strips Arduino Setup

Table of Contents

The WS2815 LED strip is one of the most popular addressable LED strips available today. This WS2815 programmable LED strips Arduino setup guide will show you how to control a WS2815 LED strip using Arduino. Follow these steps to create your own unique lighting designs.

1. Materials

Arduino Board

Arduino Control Board Area Pin Introduction
Arduino Control Board Area Pin Introduction

Arduino Uno R3 is a popular open-source microcontroller board. It is based on the ATmega328P chip and runs at 5V. The board has 14 digital pins and 6 analog inputs. With USB programming, it is easy for beginners to use.

In this system, Arduino acts as the main controller for the WS2815 LED strip. It sends data signals to set each LED’s color. Libraries like FastLED make coding effects simple. You can program patterns and respond to button presses or sensors.

Remember to provide a separate power source for the LED strip, as Arduino cannot supply enough current. Always connect the ground (GND) of the power supply, Arduino, and the strip together for stable performance.

DC5V And DC12V Power Supply

5V LED Driver

  • Output Voltage: DC5V
  • Current: Maximum 40A
  • Power Rating: 200W
  • Input Voltage Range: AC200V-AC240V
Arduino 5V LED Power Supply
5V Power Supply

12V LED Driver

  • Output Voltage: DC12V
  • Maximum Current: 33A
  • Power: 400W
  • Input Voltage Range: AC200V-AC240V/ AC100V-AC120V
Arduino 12V
12V Power Supply

Function:

  • 5V Power supply powers the Arduino UNO (via Vin&GND pin)
  • 12V power supply powers the WS2815 LED strip, separate power supply can connect longer WS2815 LED strips
  • High efficiency, long life and high reliability dissipation

WS2815 LED Strip

DA4 12V WS2815
60LEDs/m WS2815 LED Strip

Parameters of this LED strip:

Voltage: DC12V
LED Qty.: 60LEDs/m
Pixels Qty.: 60Pixels/m
Color: RGB
Break Continue
IC type: WS2815

The WS2815, WS2812, and WS2813 LED strips have many similarities as well as some differences. You can learn more through the blog below: WS2812 VS WS2813 VS WS2815.

Other Accessories

  • Connection cable: Connects the WS2815 LED strip to the Arduino and power supply.
  • Level shifter: used to protect the Arduino board

 

2. Wiring Diagram

Here’s a schematic wiring diagram of connecting the Arduino board, WS2815 LED strip, and LED power supply from LEDSuntech.

Arduino WS2815wire diagram
How to Control WS2815 LED Strip with Arduino Wiring Diagram

Note:

1.The current of the arduino board should be less than 500mA;
2.Without a level shifter, the DC3.3/5V in is the voltage output port of the control board and should not be connected to the power supply;
3.Pixel of addressable RGB LED strip should be less than 500 pixels, addressable RGBW LED strip <375 pixels, addressable RGBWW LED strip <300 pixels, the more points, the lower the refresh rate.

3. Connection Diagram

WS2815 Programmable LED Strips Arduino Setup
How to Control WS2815 LED Strip with Arduino LEDSuntech

How to wires:

  • Connect the Arduino board’s Vin pin to the positive terminal of the power supply, and the GND pin to the negative terminal to power the Arduino board.
  • Connect the data output pin you set in the code (such as D7 or D8) to the DIN of the WS2815 LED strip to send the signal.
  • Connect the positive terminal of the LED strip to the positive terminal of the 12V power supply. Connect the GND next to the Arduino’s Digital pins and the LED strip’s GND to the negative terminal of the 12V power supply to complete the circuit.

4. Code Upload

Here are some code examples for lighting effects provided to you by LEDSuntech for your reference.

				
					#include 

#define LED_PIN     19     // LED strip data pin
#define NUM_LEDS    80     // Number of LEDs
#define BRIGHTNESS  128    // Initial brightness (0-255)
#define LED_TYPE    WS2812B
#define COLOR_ORDER GRB    // Most WS2812 LEDs use GRB order

CRGB leds[NUM_LEDS];

// Effect mode enumeration
enum Effects {
  EFFECT_FLOW,     // Rainbow flow effect
  EFFECT_BLINK,    // Rainbow blink effect
  EFFECT_MARQUEE,  // Marquee effect
  EFFECT_COUNT
};

uint8_t currentEffect = EFFECT_FLOW;
unsigned long lastEffectChange = 0;
unsigned long lastUpdate = 0;

void setup() {
  delay(3000); // Startup safety delay
  FastLED.addLeds(leds, NUM_LEDS);
  FastLED.setBrightness(BRIGHTNESS);
  Serial.begin(115200);
}

// Rainbow flow effect
void flowEffect() {
  static uint8_t hue = 0;
  static uint8_t pos = 0;
  
  // Gradually fade out all LEDs
  fadeToBlackBy(leds, NUM_LEDS, 10);
  
  // Set a colored point at the current position
  leds[pos] = CHSV(hue, 255, 255);
  
  // Move to the next position
  pos = (pos + 1) % NUM_LEDS;
  
  // Change hue
  hue += 3;
  
  FastLED.show();
  delay(30);
}

// Rainbow blink effect
void blinkEffect() {
  static bool lightsOn = false;
  static uint8_t hue = 0;
  
  if(lightsOn) {
    // Fill the entire strip with a random color
    fill_solid(leds, NUM_LEDS, CHSV(hue, 255, 255));
    hue += 5;
  } else {
    // Turn all LEDs off
    fill_solid(leds, NUM_LEDS, CRGB::Black);
  }
  
  lightsOn = !lightsOn;
  FastLED.show();
  delay(lightsOn ? 200 : 800); // On for 200ms, off for 800ms
}

// Marquee effect
void marqueeEffect() {
  static uint8_t hue = 0;
  static int position = 0;
  static int tailLength = 15;
  
  // Gradually fade out LEDs
  fadeToBlackBy(leds, NUM_LEDS, 20);
  
  // Create the marquee head
  leds[position] = CHSV(hue, 255, 255);
  
  // Create gradient tail
  for(int i = 1; i  30000) {
    currentEffect = (currentEffect + 1) % EFFECT_COUNT;
    lastEffectChange = millis();
    FastLED.clear();
    FastLED.show();
  }
  
  // Run the current effect
  switch(currentEffect) {
    case EFFECT_FLOW:    flowEffect();    break;
    case EFFECT_BLINK:   blinkEffect();   break;
    case EFFECT_MARQUEE: marqueeEffect(); break;
  }
  
  // Optional: Brightness control
  // adjustBrightness();
}

// Optional: Switch effects via serial commands
void serialEvent() {
  while(Serial.available()) {
    char c = Serial.read();
    if(c &gt;= '0' &amp;&amp; c &lt;= &#039;2&#039;) {
      currentEffect = c - &#039;0&#039;;
      FastLED.clear();
      FastLED.show();
    }
  }
}

// Optional: Brightness adjustment function
void adjustBrightness() {
  int potValue = analogRead(A0); // Connect potentiometer to A0
  int newBrightness = map(potValue, 0, 1023, 0, 255);
  FastLED.setBrightness(newBrightness);
}
				
			

5.Lighting Effect Demonstration

This WS2815 LED strip lets you create many lighting effects. Use it with Arduino for your lighting projects.


Contact us if you need support with WS2815 LED strip control on Arduino.

Feel Free To Contact Us

We will reply your email within 12 hours.

Ask For A Quote