I already soldered all LEDs into place and bought a fitting power supply (see attachement 3).
I then tried running a simple test code
#include <FastLED.h>
#define NUM_LEDS 100
#define DATA_PIN 6
CRGB leds[NUM_LEDS];
void setup() {
// put your setup code here, to run once:
FastLED.addLeds<WS2812B, DATA_PIN>(leds, NUM_LEDS);
}
void loop() {
// put your main code here, to run repeatedly:
for(int dot = 0; dot < NUM_LEDS; dot++) {
leds[dot] = CRGB::Blue;
FastLED.show();
// clear this led for the next time around the loop
leds[dot] = CRGB::Black;
delay(30);
}
}
which works just fine, all LEDs light up after each other.
But if I change the color to for example red, all LEDs light up after each other, but in green.
If I change the color to green, they just go crazy:
I first tried to power the with my PSU (see attachment 3 and 5) , but they only started blinking and doing random stuff, the PSU also made weird noises, so I power them now with my arduino and USB until the capacitor and resistor arrives (which I read about here FastLED WS2812B not displaying correct LEDs - LEDs and Multiplexing - Arduino Forum).
I hope you can help me solving this problem and could explain, why blue works and red gives me problems which I absolutely don't understand.
Most instructables are crap and this is no exception. There is no resistor between the data pin and the LEDs, also there is no large capacitor across the supply.
Do you have a ground wire from your power supply connected to Arduino ground?
Thanks for the tip, I also noticed that when I ran an example script by FastLED, but this also doesn't solve my problem unfortunately.
Grumpy_Mike:
Most instructables are crap and this is no exception. There is no resistor between the data pin and the LEDs, also there is no large capacitor across the supply.
I also read about the resistor and capacitor on another thread in this forum and already ordered them. Is it likely that this will solve my problem, or could my WS2812B LEDs already have been damaged by running the project without these components?
I frankly wouldn't pin too much hope on that, the power brick should have enough regulation in it. How are you physically plugging/unplugging the power to the leds, brick to wall or brick to leds?
Okay, gonna have to take it really slow then.
Remove the for loop from the code, extend the delay, and manually manipulate the led number and colors.
So, be able to turn on an led to different colors. It's a good learning exercise to lead into making your own animations, but can help with troubleshooting, too.
Hi,
sorry for the late response, I had to wait for the resistors and capacitors to arrive.
I already figured out a solution by powering each LED after each other and when I toggled one LED, others changed their colors and went crazy. After replacing the failing LEDs, everything works fine now.
Thanks for your answers!
Btw: Soldering in the capacitors worked fine, but when I add a resistor, the LEDs receive no signal from my Arduino..
The purpose of the resistor is to keep component and board manufacturers from making more money when you have to buy new components because you run too much current through them.
To limit the current if the drive signal is above the LED strip's supply voltage. This happens frequently because most people do not use a correctly rated power supply.
To absorb reflections due to the rapid changing output signal and impedance discontinuity.
If putting a 470R resistor in line with the data signal stops the strip working you have something else seriously wrong with your setup.