[DIY] Amblight project/guide - Hyperion - WS2801/ WS2812B / APA102 (3 Viewers)

Lightning303

MP Donator
  • Premium Supporter
  • September 12, 2009
    798
    577
    Home Country
    Germany Germany
    Fyi, in a project for a friend of mine, i powered the rpi with the 5V psu that also drove the leds. However i did not connect 5V to the gpio, but rather cut a normal micro usb cable into half and simply connected the red and black wire to the psu. This way the rpi inbuild overvoltage protection is still being used. The arduino is powered through usb from the rpi as Rick mentioned.
     

    TheBatfink

    MP Donator
  • Premium Supporter
  • June 11, 2007
    1,288
    221
    Nottingham
    Home Country
    United Kingdom United Kingdom
    So I am trying to change the serial buffer on the arduino. I copied the folder AVR and not SAM to make the modification (I assume this is correct).

    In the file I see no mention of: #define SERIAL_BUFFER_SIZE 64; so what do I do?!

    Also one other question. My lights start going yellow half way down the line when on full brightness white. I guess this is the power issue mentioned in previous threads. I see the solution is to add power line at the other end. But what does that mean exactly.

    Like the below image 1: (imagine that rather than just two LEDs that is the entire 240 LED strip without any breaks)

    upload_2015-3-7_12-56-26.png


    Or 2 (once the breaks have been made to go around the TV corners):

    upload_2015-3-7_13-9-3.png


    I'll add not to assume that a resistor is on the data line from Kiwi. I got a full 4m strip with soldered clips on both ends, stripped the heatshrink off and there is no resistor..

    Thanks!
     

    Attachments

    • HardwareSerialcpp.zip
      2.9 KB
    Last edited:

    Rick164

    MP Donator
  • Premium Supporter
  • January 7, 2006
    1,335
    1,005
    Home Country
    Netherlands Netherlands
    Judging by the HardwareSerial.cpp file it seems you're using an different version of the Arduino IDE, mine doesn't contain the extra 2013 copyright mention at the top as well.
    Using Arduino 1.0.6 so would recommend using that version as that has the serial_buff option at the top, will add it to the FAQ :)

    The yellow at around half way is indeed an lack of power, you will need to add an resistor at both ends to protect them properly but its weird that your Kiwi strips doesn't have the resistor at the one end.
    Basically you connect the power lines at the beginning and end of the strip separately but from the same single power source, the thin strips and hardware parts used means it can't carry the voltage over the whole line from one end alone.
     

    TheBatfink

    MP Donator
  • Premium Supporter
  • June 11, 2007
    1,288
    221
    Nottingham
    Home Country
    United Kingdom United Kingdom
    But by end do you the very end or the start of the third strip. Can DC go in both directions??

    Btw the dataline and ground is only needed at the start isn't it and the dataline is what carries the resistor so do I really need a resister at both ends?

    Thanks for all your help :)
     

    Rick164

    MP Donator
  • Premium Supporter
  • January 7, 2006
    1,335
    1,005
    Home Country
    Netherlands Netherlands
    The resistor is mainly to protect your leds from power surges/fluctuations, as we connect them at both ends its recommended but for testing you could do without them so long as your power source is reliable.
    The data line is indeed only at the beginning i.e. where the arrows point away from the connector, both the red and black cable in the diagram needs to be connected at the beginning and end and connected them that way without issues :)
    So long as its from the same single power source it doesn't have any downsides that I know of, @Lightning303 might know more on the matter as he's our teams engineer aka master builder :D :cool:
     
    Last edited:

    TheBatfink

    MP Donator
  • Premium Supporter
  • June 11, 2007
    1,288
    221
    Nottingham
    Home Country
    United Kingdom United Kingdom
    But I've seen nothing that says to use a resistor on anything but the data line. Only thing for +5V was an optional capacitor.

    If you use a resistor, what rating is it?
     

    TheBatfink

    MP Donator
  • Premium Supporter
  • June 11, 2007
    1,288
    221
    Nottingham
    Home Country
    United Kingdom United Kingdom
    Judging by the HardwareSerial.cpp file it seems you're using an different version of the Arduino IDE, mine doesn't contain the extra 2013 copyright mention at the top as well.
    Using Arduino 1.0.6 so would recommend using that version as that has the serial_buff option at the top, will add it to the FAQ :)

    Code:
    ARDUINO 1.5.7 BETA - 2014.07.07
    
    [core]
    * Upgraded AVR toolchain: gcc 4.8.1, avr-libc 1.8.0
    * Upgraded ARM toolchain: gcc 4.8.3-2014q1
    * Upgraded avrdude to version 6.0.1
    * ARM gcc doesn't require ia32-libs anymore on 64 bits linux systems
    * avr: fixed typo in SerialEvent3 handling (Matthijs Kooijman)
    * avr: HardwareSerial support for different size of TX and RX buffer sizes (Jan Baeyens)
    * avr: HardwareSerial support for buffer sizes bigger than 256 bytes (Jan Baeyens)
    * sam: Added configuration (parity, data bits, stop bits) to Serial1/2/3 of Arduino Due (bluesign2k)
    * Removed a lot of compiler warnings from Arduino core
    * avr: Fix EXTERNAL_NUM_INTERRUPTS for atmega128rfa1 and atmega256rfr2 (Matthijs Kooijman)
    * sam: Fix to Wire::endTransmisson() return value (bluesign2k)
    * sam: Fix to Wire usage of TWI status register (bluesign2k)
    * avr: Fixed PROGMEM statements to be compatible with newer avr gcc (Scott Howard)

    Looks like it should be there?
    -----
    Found it in USBAPI.h

    So far I have noticed that even connecting at both ends of 4m it's still slightly off white in the middle at full power. I think I might connect up end of strip 2 and start of strip 3 once I have them on the TV. I downloaded an iPhone app from the App Store 'Hyperion' which lets you set colour and brightness, everything seems to work well. Time to have the TV off :)
     
    Last edited:

    Rick164

    MP Donator
  • Premium Supporter
  • January 7, 2006
    1,335
    1,005
    Home Country
    Netherlands Netherlands
    He means a capacitor on the power lines :)
    3rd correction and he buys the cake! :p

    But wasn't the resistor needed on the data line for power surges (feedback and such) and optionally the capacitor on power line for better constant power?
    You would indeed need 1 resistor, one more and I'll buy the cake :p

    Looks like it should be there?
    -----
    Found it in USBAPI.h

    Arduino IDE has undergone some mayor changes so might not be in the changelog, would have expected them to keep it configurable though so maybe its an option in the IDE somewhere now?
     
    Last edited:

    Users who are viewing this thread

    Top Bottom