Go Down

Topic: Can't see to get ws2812 LED strip working (Read 588 times) previous topic - next topic

fleh777

I've tested the voltage on the strip with a multimeter and the green led does blink twice a second, but the strip leds do nothing.  Any ideas?

Picture attached... my code:

#include "FastLED.h"

// How many leds in your strip?
#define NUM_LEDS 4

// For led chips like Neopixels, which have a data line, ground, and power, you just
// need to define DATA_PIN.  For led chipsets that are SPI based (four wires - data, clock,
// ground, and power), like the LPD8806 define both DATA_PIN and CLOCK_PIN
#define DATA_PIN 5
#define CLOCK_PIN 13

// Define the array of leds
CRGB leds[NUM_LEDS];

void setup() {
      // Uncomment/edit one of the following lines for your leds arrangement.
      // FastLED.addLeds<TM1803, DATA_PIN, RGB>(leds, NUM_LEDS);
      // FastLED.addLeds<TM1804, DATA_PIN, RGB>(leds, NUM_LEDS);
      // FastLED.addLeds<TM1809, DATA_PIN, RGB>(leds, NUM_LEDS);
      // FastLED.addLeds<WS2811, DATA_PIN, RGB>(leds, NUM_LEDS);
      // FastLED.addLeds<WS2812, DATA_PIN, RGB>(leds, NUM_LEDS);
      FastLED.addLeds<WS2812B, DATA_PIN, RGB>(leds, NUM_LEDS);
      // FastLED.addLeds<NEOPIXEL, DATA_PIN>(leds, NUM_LEDS);
      // FastLED.addLeds<APA104, DATA_PIN, RGB>(leds, NUM_LEDS);
      // FastLED.addLeds<UCS1903, DATA_PIN, RGB>(leds, NUM_LEDS);
      // FastLED.addLeds<UCS1903B, DATA_PIN, RGB>(leds, NUM_LEDS);
      // FastLED.addLeds<GW6205, DATA_PIN, RGB>(leds, NUM_LEDS);
      // FastLED.addLeds<GW6205_400, DATA_PIN, RGB>(leds, NUM_LEDS);
     
      // FastLED.addLeds<WS2801, RGB>(leds, NUM_LEDS);
      // FastLED.addLeds<SM16716, RGB>(leds, NUM_LEDS);
      // FastLED.addLeds<LPD8806, RGB>(leds, NUM_LEDS);
      // FastLED.addLeds<P9813, RGB>(leds, NUM_LEDS);
      // FastLED.addLeds<APA102, RGB>(leds, NUM_LEDS);
      // FastLED.addLeds<DOTSTAR, RGB>(leds, NUM_LEDS);

      // FastLED.addLeds<WS2801, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS);
      // FastLED.addLeds<SM16716, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS);
      // FastLED.addLeds<LPD8806, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS);
      // FastLED.addLeds<P9813, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS);
      // FastLED.addLeds<APA102, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS);
      // FastLED.addLeds<DOTSTAR, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS);
}

void loop() {
  // Turn the LED on, then pause
  leds[0] = CRGB::Red;
  FastLED.show();
  delay(500);
  // Now turn the LED off, then pause
  leds[0] = CRGB::Black;
  FastLED.show();
  delay(500);
}

Wawa

#1
Dec 07, 2017, 10:14 pm Last Edit: Dec 07, 2017, 10:16 pm by Wawa
Why is there a green LED (without current limiting resistor) from the data line to ground.
That limits data signals to Vf of the LED (~2.2volt).
The strip needs a 5volt data signal to work.
Remove the LED.

Four WS2812 LEDs can be powered from Arduino's 5volt pin
They only draw 4*60mA (max), and that's ok on USB supply.
Leo..

P.S.
A common LED without current limiting resistor draws more than 40mA from a pin.
That is over the maximum limit of the pin, and will damage it.

fleh777

Thank you for the reply!  I've simplified the circuit (see pic), but still a no go.  I just had that led in there to confirm there was something coming out of pin 5.  I'm not using an external power supply now either.

Grumpy_Mike

Did you cut that short LED strip off the end or off the beginning?
From careful looking at your first photograph it looks like you cut it off the end and you are trying to feed a signal into the output of the last LED. That is not going to work.

You will have to inject the signal from your fake Arduino into the middle connection of the cut off end of the strip.

fleh777

That's it!  Thank you!!!  So, you have to send signal upstream from those arrows I presume

Grumpy_Mike

So, you have to send signal upstream from those arrows I presume
Yes, follow the arrows, even if you can't see the Indians .

Go Up