0

schematic

simulate this circuit – Schematic created using CircuitLab

I am using an Arduino Uno, and WS2813 led strip (60 leds).

It seems like a default schematics (except I did use a 470 uF (electrolytical) cap instead of 1000 uF electrolytical cap.

(I accidantally marked the VCC pin of U1 VSS).

I don't get any LED of the LED strip glowing.

The program I used is:

#include <FastLED.h>

#define NUM_LEDS 60
#define DATA_PIN 7

CRGB leds[NUM_LEDS];
bool led = false;

void setup() { 
    //FastLED.addLeds<WS2813, DATA_PIN>(leds, NUM_LEDS);
    FastLED.addLeds<WS2813, DATA_PIN>(leds, NUM_LEDS);
    pinMode(LED_BUILTIN, OUTPUT);
}

void loop() 
{
    for (int i = 0; i < NUM_LEDS; i++)
    {
      leds[i] = CRGB::Red;
    }
    FastLED.show();
    led = !led;
    digitalWrite(LED_BUILTIN, led ? HIGH : LOW);
    delay(1000);
}

What I tried was:

  • Checking different data pins on the Arduino
  • Checking different wires
  • Checking that over D7 and after the resistor there is indeed 330 Ohm resistance (it was 345 Ohm)
  • Tried different data pins (and adapted the scene to use a different data pin)
  • Checking that LED D1 is on (5V is flowing)
  • Checking that at the end of the WS2813 there the VCC and GND 5V difference (it is about 5.1 V)
  • Checking that there is indeed 5 V difference between the adapter + and - (was 5.2 V, unloaded).
  • Tried with WS2813's BI grounded and unconnected
  • Tried without the 330 ohm resistor.
  • Checked with a the same circuit but WS2812B (and adapting the code to use WS2812B)
  • Used different timings for the builtin LED to see that the sketch is actually uploaded.
  • Tried with , RGB) added in line: FastLED.addLeds<WS2812B, DATA_PIN, RGB>(leds, NUM_LEDS);
  • With a logic analyzer I see that every second there is a short burst of data (not analayzed exactly what, I assume FastLed is reliable).

All no difference.

However, what I did see, is the logic analyzer data AFTER the 330 ohm resistor mostly removes the data, while the data before the resistor is ok. However, when remove the resistance, still the LED strip does not light up.

Channel 0 is before the resistor, channel 1 after:

enter image description What did I do wrong?

  • 1
    did you connect to the correct end of the LED strip? – jsotola Jun 1 at 22:27
  • @jsotola YES ... I should have asked earlier :-); If you put it as answer, I upvote/accept it. – Michel Keijzers Jun 1 at 22:33
2

It is important to connect the Arduino digital pin to the correct end of the LED strip.

LED strips have a unidirectional data line.

The power and ground connections can be made from either end, but the data IN is at one end and data OUT is at the other end.

That arrangement is for the purpose of daisychaining the LED strips.

The LEDs themselves also have data IN and data OUT, and are also daisychained with their neighbouring LEDs.

The LEDs are serially connected to each other through the data line, and are connected in parallel to the power and ground lines.

| improve this answer | |
  • Yes, I noticed there is a direction (which is logical). Guess when I tried it before it worked instantly, probably because I randomly selected at that time the right side, and now the wrong one. – Michel Keijzers Jun 2 at 9:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.