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

OSX OrangePi or BananaPi w/ Arduino (adalight)?

Discussion in 'Hardware Support' started by gebn, 28 November 2016.

  1. gebn

    gebn New Member

    Messages:
    26
    Hardware:
    RPi3, +Arduino
    I was wondering if it was possible to use an OrangePi or BananaPi with a new setup i am attempting to do?

    I will be building a 450+ led setup using the WS2812B and an 'Arduino Nano' (CH340G models) by using an input from a UTV007 towards a Serial USB adalight output from Hyperion to Arduino.
    The reason ive wanted to ask is because i will be buying a Raspberry Pi strictly for hyperion, and i thought of buying a OrangePi or BananaPi with a SATA interface to also use as a media server via ethernet alongst with hyperion.
    I do not wish to resort to using USB 2.0 for my media server. Ill be sharing it between 3 computers.

    While i have done my research; i have only found a tutorial that explains a working BananaPi without the use of an Arduino and using WS2801's. I have also found a comment saying that 'Hyperion has certain Raspberry Pi libraries which do not allow it to run on other models'. I have also found an Openelec build with HW decoding working on the Orangepi.

    Just wanted to confirm if my little knowledge of linux is correct and Hyperion should technically run on any linux device/os as long as its within the same architecture and has the same distro and dependancies.

    Also, i will not be using the Pi as a media centre, i have a separate Amlogic s912 box for that. Just for Hyperion and possibly a media server

    sorry if i am posting in the wrong board, i didnt know where to post and what prefix to apply either :s
     
  2. penfold42

    penfold42 Active Member

    Messages:
    746
    Hardware:
    RPi1/Zero, RPi2, RPi3, 32/64bit, +Arduino, +nodeMCU/ESP8266
    I'm sure it will compile and (mostly) run fine on an alternative fruit based Pi.

    I don't know what frame buffer grabber will work, but a USB grabber should work the same.

    Led devices should all work EXCEPT the rpi specific PWM driver. The SPI based driver should work great for your 2812 strip.

    Why do you want to use an arduino ?
    450 leds is getting close to the limit it can support. Just use the SPI driver off the Pi
     
  3. gebn

    gebn New Member

    Messages:
    26
    Hardware:
    RPi3, +Arduino
    thanks for your quick reply penfold42!
    I was planning on getting an arduino because ive read that the Raspberry Pi has a 'limit' on leds it can handle due to a small amount of a specific memory, also was following this tutorial. Ive also read from the same tutorial that SPI to arduino will require logic level shifters, however i will read about SPI to the WS2812b strip; i think i saw some tutorials running around here.
     
  4. penfold42

    penfold42 Active Member

    Messages:
    746
    Hardware:
    RPi1/Zero, RPi2, RPi3, 32/64bit, +Arduino, +nodeMCU/ESP8266
    A level shifter is recommended (required in theory but many get away without one)

    The arduino used to be a requirement to drive the 2812 leds before people got creative with the Pi so lots of older tutorials still included them.

    All arduino with an atmega 328 have 2kB of ram so depending on the sketch you use the led limit will be about 600. They also slow down the max refresh rate as they have to buffer the data
     
  5. gebn

    gebn New Member

    Messages:
    26
    Hardware:
    RPi3, +Arduino
    sorry to rewake an old thread

    finally getting around to assembling the entire thing,
    Just wanted to ask if i need a logic shifter between the LEDs and the SPI on the Pi ?
    or if i completely misunderstood the above and i actually need a logic shifter if i connect the arduino and pi directly?
    (currently have an official raspberry pi 3 that i lent from a friend).

    I am currently using an "arduino nano" (328 / CH340G China Model) with the raspberry over usb serial, however would like to scrap the arduino since it would give a better refresh time from what i am supposing (although i did read interrups and other processes sharing cpu within linux will screw this up; somewhat already tackled by getting command line dirty and going for a raspbian lite installation)

    correcting the above posts however : its 264 leds total, must have miscalculated somewhere.

    Will write a tutorial and a preview when its all done, since there isnt one that i know of (and that my last month google searches) that connects the leds directly to the pi
     
  6. penfold42

    penfold42 Active Member

    Messages:
    746
    Hardware:
    RPi1/Zero, RPi2, RPi3, 32/64bit, +Arduino, +nodeMCU/ESP8266
    A level shifter is required if you want be to be within the requirements of the data sheet.

    74hct125 is my recommendation but many 74hct series chips will work also if you can get one of the output pins to copy an input pin.
     
  7. gebn

    gebn New Member

    Messages:
    26
    Hardware:
    RPi3, +Arduino
    then a level shifter it is, but until the shops open up from the holidays shutdown, arduino it is

    cant get a boot animation rainbow swirl however, just white, will experiment with baudrate and FastLED library instead.
    I am having an overflow on the const char prefix setting in a sketch based on adalight, maybe thats the problem (note bold/3 digit hex values at //Start prefix ada)

    Code:
    //Hyperion sends prefix characters based on number of LEDs in config file
    // e.g. for 181 LEDs it will send 0xB4 and cheksum 0xE1
    // keep in mind Hyperion led counts from 0
    // if you have problems try +1 or -1 diodes when generating prefix characters
    // values to save some time: 178 B1 E4, 180 B3E6, 181 B4E1, 182 B5E0
    //hyperion code
    //_ledBuffer[3] = ((ledValues.size() - 1) >> 8) & 0xFF; // LED count high byte
    //        _ledBuffer[4] = (ledValues.size() - 1) & 0xFF;        // LED count low byte
    //        _ledBuffer[5] = _ledBuffer[3] ^ _ledBuffer[4] ^ 0x55; // Checksum
    const char prefix[] = {0x41, 0x64, 0x61, 0x00, 0x106, 0x152};  // Start prefix ADA
    also just hit a bump with hyperion systemctl service, the 'UTV007' i got shipped wasnt a UTV007 but instead an 'arkmicro' grabber
    i also had another one of these arkmicro grabbers already and i was hoping to try either one or the other that i got, but having them the same isnt going to help
    (they arent exactly the same, both have different device id's [one is 0x5555 while the other is 0x5850], doesnt make much of a difference however because i cant find any documentation/drivers on either, people have had luck mounting it in an app called cheese however with very minor edits which i have tried to no avail.)

    dmesg gives an uvc non compliant device

    Code:
    [  163.959982] usb 1-1.3: new high-speed USB device number 8 using dwc_otg
    [  164.238902] usb 1-1.3: New USB device found, idVendor=18ec, idProduct=5850
    [  164.238924] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
    [  164.238937] usb 1-1.3: Product: USB2.0 PC CAMERA
    [  164.238949] usb 1-1.3: Manufacturer: ARKMICRO
    [  164.240170] uvcvideo: Found UVC 1.00 device USB2.0 PC CAMERA (18ec:5850)
    [  164.248890] uvcvideo: UVC non compliance - GET_DEF(PROBE) not supported. Enabling workaround.
    [  164.249821] input: USB2.0 PC CAMERA as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0/input/input4
    [  164.253176] usb 1-1.3: 3:1: cannot get freq at ep 0x82
    [  164.258030] usb 1-1.3: Warning! Unlikely big volume range (=11903), cval->res is probably wrong.
    [  164.258047] usb 1-1.3: [2] FU [Mic Capture Volume] ch = 2, val = 384/12287/1
    
    journalctl gives an inappropriate ioctl for device

    Code:
    Dec 31 13:05:12 raspberrypi hyperiond[1339]: started
    Dec 31 13:05:12 raspberrypi hyperiond[1339]: INFO: Json server created and started on port 19444
    Dec 31 13:05:12 raspberrypi hyperiond[1339]: INFO: Proto server created and started on port 19445
    Dec 31 13:05:12 raspberrypi hyperiond[1339]: terminate called after throwing an instance of 'std::runtime_error'
    Dec 31 13:05:12 raspberrypi hyperiond[1339]: what():  VIDIOC_S_STD ERROR 25, Inappropriate ioctl for device
    Dec 31 13:05:12 raspberrypi systemd[1]: hyperion.service: main process exited, code=killed, status=6/ABRT
    
    dmesg however previously also gives

    so go figure i tried setting up hyperion config with this; but journalctl gives

    Code:
    Dec 31 12:58:11 raspberrypi hyperiond[1275]: terminate called after throwing an instance of 'std::runtime_error'
    Dec 31 12:58:11 raspberrypi hyperiond[1275]: what():  '/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0/input/input4' is no device ERROR
    Dec 31 12:58:11 raspberrypi systemd[1]: hyperion.service holdoff time over, scheduling restart.
    
    is there anyway i can use these USB Capture cards or would i need another one (which is actually a UTV007 this time round)?

    ps. some extras

    also found a folder with by-path and by-id in some system folder which had the usb framegrabber device but i didnt bother trying those

    Hyperion Grabber Config
    Code:
    // V4L2 GRABBER CONFIG
        "grabber-v4l2" :
        {
            "device" : " /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0/input/input4 ",
            "input" : 0,
            "standard" : "PAL",
            "width" : -1,
            "height" : -1,
            "frameDecimation" : 2,
            "sizeDecimation" : 8,
            "priority" : 900,
            "mode" : "2D",
            "cropLeft" : 0,
            "cropRight" : 0,
            "cropTop" : 0,
            "cropBottom" : 0,
            "redSignalThreshold" : 0.0,
            "greenSignalThreshold" : 0.0,
            "blueSignalThreshold" : 0.0
        },
     
  8. penfold42

    penfold42 Active Member

    Messages:
    746
    Hardware:
    RPi1/Zero, RPi2, RPi3, 32/64bit, +Arduino, +nodeMCU/ESP8266
    You can't have a char/byte greater then 0xfff

    The 0x00 is the high byte of the led count

    0x01, 0x06, (0x01 ^ 0x06 ^ 0x55) )
     
  9. peter

    peter Member

    Messages:
    108
    Hardware:
    RPi1/Zero, RPi2, RPi3
    Friends, does somebody have a steps how to compile hyperion for orangepi please? I would like to try it. I saw there are some specific libraries for rpi (during hyperion compilation) but I have no idea how to customize it for orange. I 'd like to compile it directly on OPi (without arduino). Any idea please?
     
    Last edited: 18 January 2017