WS2811 LEDS Arduino right resistors

Hello, guys,

For a uni project i am trying to control BTF-Lighting 5v Adressable LEDS with an Arduino Uno and the AdaFruit Neopixel Library.

I have a 5v/50W power supply and i am physically wiring it like this:

I know the picture isn't the best but i'll explain what i can: i have the power supply connected with jumper wires to the breadboard +ve and -ve "strips" together with a 1000uF capacitor, then i connect the arduino gnd pin to the -ve "strip" and the leds +ve and -ve to the respective on the breadboard, then i have the arduino pin ~6 connected to the data pin on the leds separated by a 470ohm resistor. All this based on what i have seen online.

However the leds aren't acting as they should even with simple code like this


const int DIN_PIN = 6; // D6

const int LED_COUNT = 50;

Adafruit_NeoPixel pixels(LED_COUNT, DIN_PIN, NEO_RGB + NEO_KHZ400);

uint32_t white = pixels.Color(255, 255, 255);

void setup() { 

pixels.begin();
pixels.clear();


} 

void loop() {

pixels.setPixelColor(1, white);

pixels.show();

}

Only some of them turn on, and with random colors, however when i touch the resistor (yes with my hand) they all light up and seem to at least try to do what the code tells them. I have thought it was because the resistor should have more resistance but even when i add two 470ohm resistors in series the result is the same unless i touch them. I have seen some people suggest not going below 500ohm so i believe the resistors are the problem. Shouldn't adding two resistors in series do the trick? Please help this project is for tuesday .

These are the LEDS
leds

Thanks for the time,
ariana

Hello ines_ariana

Take a search engine of your choice and ask the WWW for 'WS2811 LEDS +tutorial' to collect some data to be sorted out to get the needed information.

Have a nice day and enjoy coding in C++.

Try changing this to:

#define white pixels.Color(255,255,255);

link please - to the actual device you have connected as shown in the pic.

Hi, @ines_ariana

Then you should be able to supply a schematic of your project.

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?
Hand drawn and photographed is perfectly acceptable.
Please include ALL hardware, power supplies, component names and pin labels.

Thanks... Tom.. :grinning: :+1: :coffee: :australia:

Well, that's your main clue. And the breadboard.
You definitely have poor electrical connections. Try soldering it all together, so at least you have a reliable connection.

The WS2811 is normally 12V with the LEDs addressed/powered in groups of 3. But it might work with 5V and they may make 5V strips with individually addressed LEDs.

I wonder if you have a 470K resistor?

The resistor value isn't that critical (Adafruit recommends 100 Ohms) but 470K is too high and it would make it sensitive to noise, especially when touched.

Don't run the power through a solderless breadboard. Your LED strip may draw up to 3A, way to much for a breadboard.
In some cases you may not even need the resistor. Try connecting the arduino pin directly to the strip data pin without the breadboard.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.