[DIY] Selfmade AmbiLight using LED Strings (1 Viewer)

HomeY

Test Group
  • Team MediaPortal
  • February 23, 2008
    6,475
    4,645
    49
    ::1
    Home Country
    Netherlands Netherlands
    Well.... I'm about to give up :(

    Started over again and tried multiple connections. First connection made 'normal' on the correct side:
    ConnectionsDefault.jpg
    That didn't work. When i connect the power, the LEDs blink shortly, that's it.
    After that i tried to connect the other end of the Data, which also didn't work.

    Then connected the power to the other end of the strip:
    ConnectionReversed.jpg
    Also no joy. Now when i connect the power, the LEDs also don't blink.
    The WS2812B have a Reversed Connection protection, so not sure if connecting the other end is useful, but i've tried it.

    I've copied all files from the FastLED 2.1 repo into my library folder and using the following FirstLight sketch:
    [hide]
    Code:
    // Use if you want to force the software SPI subsystem to be used for some reason (generally, you don't)
    // #define FORCE_SOFTWARE_SPI
    // Use if you want to force non-accelerated pin access (hint: you really don't, it breaks lots of things)
    // #define FORCE_SOFTWARE_SPI
    // #define FORCE_SOFTWARE_PINS
    #include "FastLED.h"
    
    ///////////////////////////////////////////////////////////////////////////////////////////
    //
    // Move a white dot along the strip of leds.  This program simply shows how to configure the leds,
    // and then how to turn a single pixel white and then off, moving down the line of pixels.
    // 
    
    // How many leds are in the strip?
    #define NUM_LEDS 240
    
    // Data pin that led data will be written out over
    #define DATA_PIN 6
    
    // Clock pin only needed for SPI based chipsets when not using hardware SPI
    //#define CLOCK_PIN 8
    
    // This is an array of leds.  One item for each led in your strip.
    CRGB leds[NUM_LEDS];
    
    // This function sets up the ledsand tells the controller about them
    void setup() {
        // sanity check delay - allows reprogramming if accidently blowing power w/leds
          delay(2000);
    
          // Uncomment 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, GRB>(leds, NUM_LEDS);
          // FastLED.addLeds<NEOPIXEL, DATA_PIN, RGB>(leds, NUM_LEDS);
          // FastLED.addLeds<WS2811_400, 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<UCS1903, DATA_PIN, RGB>(leds, NUM_LEDS);
          // FastLED.addLeds<UCS1903B, 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<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);
    }
    
    // This function runs over and over, and is where you do the magic to light
    // your leds.
    void loop() {
       // Move a single white led 
       for(int whiteLed = 0; whiteLed < NUM_LEDS; whiteLed = whiteLed + 1) {
          // Turn our current led on to white, then show the leds
          leds[whiteLed] = CRGB::White;
    
          // Show the leds (only one of which is set to white, from above)
          FastLED.show();
    
          // Wait a little bit
          delay(100);
    
          // Turn our current led back to black for the next loop around
          leds[whiteLed] = CRGB::Black;
       }
    }
    [/hide]

    I've tested the following 3 AddLeds options:
    Code:
          // FastLED.addLeds<WS2812, DATA_PIN, RGB>(leds, NUM_LEDS);
          FastLED.addLeds<WS2812B, DATA_PIN, GRB>(leds, NUM_LEDS);
          // FastLED.addLeds<NEOPIXEL, DATA_PIN, RGB>(leds, NUM_LEDS);

    No joy :( I really have no clue what else to test.
    The most logical problem would be that the data simply isn't read or something. Since the LED strip blinks when i connect power, i assume that's still good.
    Assuming when the Arduino IDE says the code is uploaded, it should be good. During transfer is see the TX/RX LEDs light up, but never a response from the LEDs.
    It could be possible that i have a 'faulty' Arduino, but then i would suspect the Basis Led blink stuff to fail also. Since that works fine (with the onboard LED), i'm assuming the data transfer to the arduino is working properly.
     

    Lightning303

    MP Donator
  • Premium Supporter
  • September 12, 2009
    798
    577
    Home Country
    Germany Germany
    You could test if the arduino and pin 6 work in general, by running some test code like this

    Code:
    int ledPin = 6;               // LED connected to digital pin 13
    
    void setup()
    {
    pinMode(ledPin,OUTPUT);     // sets the digital pin as output
    }
    
    void loop()
    {
    digitalWrite(ledPin,HIGH);// sets the LED on
    delay(1000);                 // waits for a second
    digitalWrite(ledPin,LOW);   // sets the LED off
    delay(1000);                 // waits for a second
    }
    found that here: http://arduino.cc/en/Reference/PinMode#.Uwdjz_T-vXx

    Then you run the code and use your mutlimeter to check that pin 6 outputs 5v for 1 second, then 0v for a second and so on. That way we can determain that the code is running and that pin 6 is outputing like it should. And we can rule out arduino malfunction.

    Atleast thats what i would do ;)
     

    HomeY

    Test Group
  • Team MediaPortal
  • February 23, 2008
    6,475
    4,645
    49
    ::1
    Home Country
    Netherlands Netherlands
    Like your idea :) i was just doing something similar and i'm wondering if i found the culprit:
    PinTest.PNG
    Ran the Pintest from the FastLED library, and the above output confirms that data transfer between PC <> Arduino is working fine.
    But look @ the results for PIN 23....

    Leonardo PinMapping can be found here, but i can tell you: PIN 23 = GND
    Will give your example a try also.

    Then you run the code and use your mutlimeter to check that pin 6 outputs 5v for 1 second, then 0v for a second and so on. That way we can determain that the code is running and that pin 6 is outputing like it should. And we can rule out arduino malfunction.
    Tried that with delay(2000); and that's working fine. 2 seconds +5V, then 0, and so on :D
    So, a good thing we can rule out the Arduino so far.

    The above 'mask invalid' message has me wondering...
     
    Last edited:

    Lightning303

    MP Donator
  • Premium Supporter
  • September 12, 2009
    798
    577
    Home Country
    Germany Germany
    Tried that with delay(2000); and that's working fine. 2 seconds +5V, then 0, and so on
    So, a good thing we can rule out the Arduino so far.
    The above 'mask invalid' message has me wondering...

    Great to hear. So, an oscilloscope would be nice, to check if the output is also right when running the FirstLight code, but i guess you dont have one right? :p

    Yeah i have no clue about pin 23. Normally you mask pins to be in or output, but gnd schould be neither? No idea, never masked a pin that is predefined as gnd before ^^, or even tought about it. Also didnt find anything about it on google. So cant help you there :(.
     

    HomeY

    Test Group
  • Team MediaPortal
  • February 23, 2008
    6,475
    4,645
    49
    ::1
    Home Country
    Netherlands Netherlands
    but i guess you dont have one right?
    Nope, don't have 1. :(

    never masked a pin that is predefined as gnd before ^^, or even tought about it.
    I also can't find anything about that PIN 23, but since it's GND... Btw: i didn't do anything either, just ran the Pintest. Would be interesting to know the results of others with the same board.
    I noticed there are 3 GND pins on the Leonardo, tried them all without results.

    When i upload 'Atmoduino_by_Olli123', and then start AtmoWin, the RX LED lights up, so that would also suggest it's receiving something, but again, LEDstrip does nothing. Wish i had another strip to test with...

    ** EDIT **
    Email sent so supplier of the LEDs. Hopefully they can inform me how to test the strip or if the strip might be faulty, based on my experiences.
     
    Last edited:

    kenwonders

    MP Donator
  • Premium Supporter
  • January 19, 2007
    791
    741
    Home Country
    England England
    I wish you luck, sadly it all looks like you should have had lights at some point.

    You know it's going to be something daft don't you ;)
     

    HomeY

    Test Group
  • Team MediaPortal
  • February 23, 2008
    6,475
    4,645
    49
    ::1
    Home Country
    Netherlands Netherlands
    You know it's going to be something daft don't you
    I truly hope that, but if you have any clue what we missed ;)
    Gonna give it another try tomorrow. Maybe it's just the code of the sketch, not sure.
    Also really curious what the results of the Pintest for Azzuro will be, since he uses the same Leonardo.
     

    HomeY

    Test Group
  • Team MediaPortal
  • February 23, 2008
    6,475
    4,645
    49
    ::1
    Home Country
    Netherlands Netherlands
    OK, for those that have been following this topic, and might have gotten demotivated by my problems, look @ this:
    IMG_20140223_165816.jpg
    Now this REALLY puts a smile on my face!
    Long story short: the FIRST LED is damaged, which prevents the DATA to run through the strip!

    I found a website with exactly the same LEDs as i have (WS2812B), which explains really nice how to hook it up, etc. AND came with a hint about the strip not responding, often because the first LED is broken. Then you simply cut it of, and continue ;)
    I manually connected the DATA to LED 3 (and then also blew that probably, since they're really sensitive).
    The final setup will have 1000 uF capacitors on the power line & 470 Ohm resistor on the DATA line to prevent further damage.

    Now i only need to test of the other libraries (FastLED) work properly with this strip and then.... well ;) i think you can figure out what's next!
    Remove the TV from the wall, double check the math for the amount of LEDs and connect the strip to the TV.

    BIG TNX to @Lightning303 @kenwonders @azzuro and the rest that helped out ;)

    Will report back the finding with the FastLED library with this strip.
     

    HomeY

    Test Group
  • Team MediaPortal
  • February 23, 2008
    6,475
    4,645
    49
    ::1
    Home Country
    Netherlands Netherlands
    FastLED.addLeds<WS2812B, DATA_PIN, GRB>(leds, NUM_LEDS);

    after bypassing the first LED, using FastLED FirstLight example with the above addLeds parameter works fine ;)
     

    Users who are viewing this thread

    Top Bottom