1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

RPi + LibreELEC Hyperion colour shift/error when colour not fully saturated

Discussion in 'Software Support' started by Ben Clarke, 19 April 2019.

  1. Ben Clarke

    Ben Clarke New Member

    Messages:
    2
    Hardware:
    RPi3, +Arduino
    Hi, I'm at a bit of a loss - I can't figure out what's wrong with my setup.

    I have a Raspberry Pi 3B+ with LibreELEC 9.0.1 installed, powered via micro USB
    Hyperion version 1.03.4 installed through HyperCon
    I have an Arduino Uno connected to the Pi via USB
    Arduino connected to 180 WS2812B LEDs,
    LEDs powered from both ends with 5V 10A DC, ground connected to Arduino

    Eventually intending to use a screen grabber (which seems to work - I can get screenshots through HyperCon) to control my LEDs but have got stuck at this hurdle... to be clear this is plugged in the videos but not being used. I have also tried unplugging this - no change in behaviour.

    Hyperion config file here:
    Ardunio code here:
    Hyperion log here:

    The way the Arduino is interpreting the colour codes that Hyperion is sending appears to be changing every time a colour code is sent. Except for when intensity is full (one or all colour values are 255).

    Video examples:
    Arduino just plugged into laptop: https://photos.app.goo.gl/NcFimgqvgNfivbTW8
    Arduino booting up plugged into Pi running Hyperion (WARNING strobe-like): https://photos.app.goo.gl/bmNueNBpomyPgeDj6
    Testing through HyperCon colour wheel: https://photos.app.goo.gl/jgzwn1YxgLZv9S276

    The fist video is the "INITIAL_LED_TEST" running without the Arduino being connected to he Pi.
    Second video is the same thing connected to the Pi.
    In the third video I set the colour to 255 blue and click a few times - no change - working fine.
    I then set the value to ~135 blue and click repeatedly - you can see the intensity changes every time I click and sometimes the colour changes. Not sure how to correct. I'm guessing there's either something wrong with the way I've set Hyperion up or the Arduino code for interpreting the Adalight "Magic Word".

    Have tried messing around with baud rate to no avail. And changing pin on the Arduino. And changing rgb order in arduino and hyperion configuration files. I've run loads of fast-LED examples just from the Arduino and some custom ones myself sending the same colour loads of times in a row and they all work fine so I don't think there's anything wrong with the Uno.

    Have been stuck troubleshooting for ages now so any help would be greatly appreciated! I'm quite new to this so may be doing something stupid but I can't find anything...

    Cheers,
    Ben
     
  2. Akriss

    Akriss Active Member

    Messages:
    495
    Hardware:
    RPi1/Zero, RPi2, RPi3, 32/64bit, +Arduino, +nodeMCU/ESP8266
    Hi,

    The serial rates must match values in the .ino sketch and in the config.

    It appears to match in the posted config and sketch.
    However the log file shows a rate of "500000". ("ssh in: "rate" : 500000,").
    And the port for the usb is off. in that log file. Not the correct log?

    Hope it helps.
     
    Last edited: 19 April 2019
  3. Ben Clarke

    Ben Clarke New Member

    Messages:
    2
    Hardware:
    RPi3, +Arduino
    Hi Akriss,

    Thanks for the suggestion

    I think that was from earlier when I was changing baud rate / rgb order - the port defaults to that value. When I copied and pasted I don't think I got the whole thing somehow.

    Here are the most recent log files:


    Cheers,
    Ben
     
  4. Akriss

    Akriss Active Member

    Messages:
    495
    Hardware:
    RPi1/Zero, RPi2, RPi3, 32/64bit, +Arduino, +nodeMCU/ESP8266
    Could be the data lines to/from the Uno and strip are to long and picking up cross talk. the shorter the better.

    Have you tried putting a resistor on the data line between the Uno and strip. a resistor with a value of 330 - 470 ohm works is some cases.

    Sometime a level shifter is needed to bump the data voltage up to a more acceptable value. The Uno spits out data at 3.3v, the strip want's closer to 5v. a 74AHCT125 is the level shifter most used.

    Hope it helps.
     
    Last edited: 20 April 2019