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

RPi + OSMC More than 255 leds?

Discussion in 'Hardware Support' started by themorb, 17 November 2016.

  1. Mackwhyte

    Mackwhyte New Member

    Messages:
    14
    Hardware:
    RPi1/Zero, RPi3, +Arduino
    yeah, i'm at a complete loss, there doesn't seem to be any reason for it at all. I'll post if i find a solution, hopefully sooner rather than later (or never!)
     
  2. Mackwhyte

    Mackwhyte New Member

    Messages:
    14
    Hardware:
    RPi1/Zero, RPi3, +Arduino
    Going to try a fresh install of each OS and Hyperion to see if anything changes, is there any way to emulate the bitstream into the Arduino to see if it is the Pi that isn't doing it's job? I've also tried communication through UART but someone might know a better way (I hope). I also have a Teensy 2.0 and 3.1 at my disposal but wasn't sure how to implement them. Looked at getting an Octows2811 and splitting the 392 into 4 strings of 98 but am not 100% sure how to go bout this, the hardware side is fine its the software side that i need to improve upon. I know there is a modified Ambibox capable of running 400 Leds but since seeing it I can no longer find it!
     
  3. Mackwhyte

    Mackwhyte New Member

    Messages:
    14
    Hardware:
    RPi1/Zero, RPi3, +Arduino
    Just remembered! I read a while ago that Penfold42 made a custom ws2801 to 2812 protocol converter, if he wouldn't mind sharing details i would easily give building one a go if it meant i could get this working. I worked as an Electronics Engineer for 5 years so the assembling part of the circuit wouldn't be an issue, it's usually the software side i'd need help with. I've only just broken into this side and I'm pretty much self taught so I know that I might not have the right info, it would be nice to be kept right.
     
  4. Mackwhyte

    Mackwhyte New Member

    Messages:
    14
    Hardware:
    RPi1/Zero, RPi3, +Arduino
    OK. one as i said above and started with a fresh install and done some testing, heres what i found;

    OSMC and Arduino sketch using Pin 51 (MOSI) (config file edited to match Baud rates etc.)
    Baud Rate=from 115200 to 460800 tried - Rx Light=ON - Arduino Intro plays=Yes (but only on fresh startup) - Lights respond=No

    OSMC with Arduino Ambilight sketch inc Prefix
    Baud rate-115200 - Rx Light on - Arduino Intro plays=Yes (but only on fresh startup) - Lights Respond No
    Initially tested with PWM pin 6, then 10

    I then tried each PWM pin on the Mega and FINALLY got the lights working on Pin 2.
    If Hyperion is stopped and restarted via SSH the lights will no longer respond until the Pi is rebooted

    After getting the Arduino talking at 115200 I increased the Baud rate to 460800 as the lights were lagging by around a second and a half
    At 460800 the lights were still lagging by just under a second.

    I tried increasing further but looks like hypercon only allows 1000000. This is not bad but there is still a 250-500ms delay.

    So any advice on eliminating the delay? I know the original Pi could handle a speed up to 4000000, although only up til 1500000 stably.
    I also know you can get 2000000 out of a Mega if you edit the UARTnA register
    But would this be the right way to go? Is there another approach I could take to get the lights a bit more synced up?

    Also would you think it would run any better on a different OS? now that I have the Arduino working I couldn't see the OS causing a problem now?
     
  5. Akriss

    Akriss Active Member

    Messages:
    330
    Hardware:
    RPi1/Zero, RPi2, RPi3, 32/64bit, +Arduino, +nodeMCU/ESP8266
    Awesome!

    reducing the "time" in smoothing may help. Or change the update frequency a little.
     
  6. Mackwhyte

    Mackwhyte New Member

    Messages:
    14
    Hardware:
    RPi1/Zero, RPi3, +Arduino
    Okay. New update, the ambilight has stopped working entirely! checked the WS2812 Strip and it works fine so the problem is not the LED's. I think OSMC has just stopped working with hyperion. Opened hypercon and in the SSH Traffic window keep getting the following message. "Unit hyperion.service entered failed state." Uninstalled and reinstalled hyperion but no luck. Initially i thought it was the sketch so stupidly i reuploaded it onto the arduino but forgot that my HDD had failed a few months ago, so i''m not 100% sure im using the same sketch I was originally. I made sure that the baud rates were matched at 1,000,000 in both the sketch and config file as i remember that being the last baud rate i tried successfully. However, i can't remember if i had an issue with the prefix, i think i got 0x41, 0x64, 0x61, 0x01, 0x87, 0xd3 for 392 leds but vaguely remember there being an issue involving this. When the arduino is on neither the Rx or Tx light at any time, i remember the Rx light flashing when the ambilight was operational, but i think this may be due to the fact hyperion doesn't seem to be working at all. I also can't currently find my MicroSD card adaptor to try a different Os so im currently stuck, I can't understand how OSMC would suddenly stop working with Hyperion as i have not updated or anything. It just doesn''t even attempt to work. any recommendstions of a working os and arduino sketch combo that works with more than 255 leds?
     
  7. Akriss

    Akriss Active Member

    Messages:
    330
    Hardware:
    RPi1/Zero, RPi2, RPi3, 32/64bit, +Arduino, +nodeMCU/ESP8266
    SD card corruption would be my guess/bet. That's if OSMC didn't auto update. I have a OSMC w/160-/+ WS2812 + arduino nano that's not been updated since it was made. I remember having some problems updating OSMC and just elected to keep that system as is and working. ( It's a TV in the garage that rarely used and Hyperion lights up the garage for other stuff :) )

    You have done it before. Chance's are you can do it again. =)
     
  8. Mackwhyte

    Mackwhyte New Member

    Messages:
    14
    Hardware:
    RPi1/Zero, RPi3, +Arduino
    Well i figured out my issue (well one at least), it appears the USB ports on the Pi have failed, but not in the traditional way! I discovered only 1 of the 4 ports appears to have communication, I had my keyboard/mouse plugged in, the grabber and the arduino and one spare for USB pens/HDD's etc, but when I disconnected everything I noticed one of the plastic tabs that locates the USB had broken. So I ordered some replacement USB Ports and soldered them in this morning. Got the Multimeter and measured each of the test points
    PP1: 5.1V
    PP2: 5.1V
    PP7: 5.1V
    PP8: 3.3V
    PP9: 1.8V
    PP10: 1.8V
    PP27: 5.1V

    PP27 is the USB 5v and all appears to be working, there appears to be a lot of mention of C97 but it appears perfectly fine , i also can't see this being an issue as the ports are all getting power. I confirmed this by plugging in the Arduino, it powers up in all ports but L only blinks in one specific port, I then tried the same with the Keyboard/Mouse and sure enough I get illumination in all ports but only get full functionality in one. Any idea how to proceed? I can only seem to find info that relates to power failure of the ports and not comms issues.

    Oh, the issue with OSMC, my first setup used OSMC pre 2015 and had no issues, I then updated to i think it was August 2017 and also never had issues even though I had read a lot about the incompatibility with Hyperion and OSMC with OS newer than 2015 so it might just be it finally caught up to me, what made it strange was that I had turned off auto update so nothing should have really changed between the two, the SD card checked out fine and I tried another OS with the same issue previous to finding the USB issue so I will have to investigate that if i get the USB working properly again.