Hello guys.
For a long time now i was thinking of getting myself a new project
Well recently i decided to start the ambilight project.
I ordered myself an arduino uno v3, a 5v 20a power supply and 3 meters of WS2812B (60 LEDS per meter, so a total of 180 LEDS).
Everything arrived and i decided to start working on it.
1st i connected all the cables and made sure my power supply is giving out 5 volts exactly. Then i connected the UNO v3 to my PC and installed 2 libraries on it. The latest Neopixel library downloaded from here and the FastLed library version 3.0.3 downloaded from here, ran tests from both libraries and they look great
Next step was to find the right sketch, i am amazed how hard it is to find one that is working, i am currently using this
After i was done with the sketch i uploaded it to my UNO v3 and run Atmowin (version 1.0.0.8 downloaded from our forums) with settings set to "Live" for testing purposes BUT when i open some YouTube ambilight demo videos my LEDS go crazy!!!
Each time there is fast color changing my LEDS start to blink and flicker like crazy.They are working ok when the video has smooth color changes but when the video colors start changing and blinking the LEDS acts as if they cannot keep up and start flashing random colors, sometimes they just hang out and i have to restart them, sometimes they just recover a couple of seconds later by themselves.Still they are working perfectly with the FastLed or Neopixel tests. What can be wrong guys? I tried different settings, i tried adding a 2nd power line at the end of the strip to make it more stable and this actually made it worse... i run out of ideas, please help
PS. Forgot to mention that i have a 16v 2200μf capacitor installed right at the power supply +/- 5v output and i also have a 450ohm resistance installed at PIN6 of UNO v3
PS2. The video that make my setup behave all nuts is https://www.youtube.com/watch?v=jV8IFZ5Sa_k.
For a long time now i was thinking of getting myself a new project
Well recently i decided to start the ambilight project.
I ordered myself an arduino uno v3, a 5v 20a power supply and 3 meters of WS2812B (60 LEDS per meter, so a total of 180 LEDS).
Everything arrived and i decided to start working on it.
1st i connected all the cables and made sure my power supply is giving out 5 volts exactly. Then i connected the UNO v3 to my PC and installed 2 libraries on it. The latest Neopixel library downloaded from here and the FastLed library version 3.0.3 downloaded from here, ran tests from both libraries and they look great
Next step was to find the right sketch, i am amazed how hard it is to find one that is working, i am currently using this
#include "FastLED.h"
// How many leds are in the strip?
#define NUM_LEDS 180
// Data pin that led data will be written out over
#define DATA_PIN 6
// This is an array of leds. One item for each led in your strip.
CRGB leds[NUM_LEDS];
void setup(){
Serial.begin(115200);
//sanity check delay - allows reprogramming if accidently blowing power w/leds
delay(3000);
// Change this to match your led strip
// Uncomment one of the following lines for your leds arrangement.
// FastLED.addLeds<WS2812, DATA_PIN, RGB>(leds, NUM_LEDS);
FastLED.addLeds<WS2812B, DATA_PIN, GRB>(leds, NUM_LEDS);
// FastLED.addLeds<NEOPIXEL, DATA_PIN, GRB>(leds, NUM_LEDS);
// blank out the LEDs
setupLEDs();
}
int readByte(){
while(Serial.available()==0){
}
return Serial.read();
}
// show colored LEDs for 500ms then blanks out ready to go
void setupLEDs(){
memset(leds,150, sizeof(leds));
FastLED.show();
delay(500);
memset(leds,0, sizeof(leds));
FastLED.show();
}
void loop(){
if(readByte() == 0xFF){
if(readByte() == 0x00){
if(readByte() == 0x00){
int channels = readByte();
for(int channel=0; channel<channels; channel++){
leds[channel].r = readByte();
leds[channel].g = readByte();
leds[channel].b = readByte();
}
FastLED.show();
}
}
}
}
// How many leds are in the strip?
#define NUM_LEDS 180
// Data pin that led data will be written out over
#define DATA_PIN 6
// This is an array of leds. One item for each led in your strip.
CRGB leds[NUM_LEDS];
void setup(){
Serial.begin(115200);
//sanity check delay - allows reprogramming if accidently blowing power w/leds
delay(3000);
// Change this to match your led strip
// Uncomment one of the following lines for your leds arrangement.
// FastLED.addLeds<WS2812, DATA_PIN, RGB>(leds, NUM_LEDS);
FastLED.addLeds<WS2812B, DATA_PIN, GRB>(leds, NUM_LEDS);
// FastLED.addLeds<NEOPIXEL, DATA_PIN, GRB>(leds, NUM_LEDS);
// blank out the LEDs
setupLEDs();
}
int readByte(){
while(Serial.available()==0){
}
return Serial.read();
}
// show colored LEDs for 500ms then blanks out ready to go
void setupLEDs(){
memset(leds,150, sizeof(leds));
FastLED.show();
delay(500);
memset(leds,0, sizeof(leds));
FastLED.show();
}
void loop(){
if(readByte() == 0xFF){
if(readByte() == 0x00){
if(readByte() == 0x00){
int channels = readByte();
for(int channel=0; channel<channels; channel++){
leds[channel].r = readByte();
leds[channel].g = readByte();
leds[channel].b = readByte();
}
FastLED.show();
}
}
}
}
Each time there is fast color changing my LEDS start to blink and flicker like crazy.They are working ok when the video has smooth color changes but when the video colors start changing and blinking the LEDS acts as if they cannot keep up and start flashing random colors, sometimes they just hang out and i have to restart them, sometimes they just recover a couple of seconds later by themselves.Still they are working perfectly with the FastLed or Neopixel tests. What can be wrong guys? I tried different settings, i tried adding a 2nd power line at the end of the strip to make it more stable and this actually made it worse... i run out of ideas, please help
PS. Forgot to mention that i have a 16v 2200μf capacitor installed right at the power supply +/- 5v output and i also have a 450ohm resistance installed at PIN6 of UNO v3
PS2. The video that make my setup behave all nuts is https://www.youtube.com/watch?v=jV8IFZ5Sa_k.
Last edited: