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

Ardruino or GPIO

Discussion in 'Hyperion General' started by davieboy, 18 February 2021.

?

Do you run your LED's directly from the Pi or via a microcontroller?

  1. Yeah, Directly from the Pi

  2. No, Always via a microcontroller

Results are only viewable after voting.
  1. davieboy

    davieboy Active Member

    Messages:
    195
    Hardware:
    RPi1/Zero, RPi2, RPi3, RPi4
    So this has always been on the back of my mind and when i originally ordered my parts i grabbed a Uno just in case and a few spare Micro Pro Leonardo's, Never used them and opted for hooking the WS2812B up directly to the GPiO - everything worked and the other parts just sat there collecting dust until last night when i fired up the Uno, They worked but i noticed the colours were way off compared to default Hyperion settings using Rpi PWM, blues were more purple etc but no big deal as i saw a section in the sketch to calibrate them.

    Question is with Hardware constantly increasing on the Pi, are there any advantages over using an Ardruino or similar board rather than using GPIO/SPI, 1 of the main reasons i can see from my google searches would be my current LED Strip cannot handle PWM for the lights along with on board Audio, whether this is still the case on the Pi4 i do not know.

    I will be upgrading the LEDS in the near future to the APA102's so can run them via the Pi's SPI or I could use an Ardruino, so in 2021 what is the best option or the pros and cons?

    Or is that question like the amd or intel one?
     
    Last edited: 18 February 2021
  2. wladi

    wladi Member

    Messages:
    69
    Hardware:
    RPi3
    APA102 works fine with RPi, for LED Strips having only data but no clock signal, I would recommend Arduino with WLED SW or similar.
     
  3. davieboy

    davieboy Active Member

    Messages:
    195
    Hardware:
    RPi1/Zero, RPi2, RPi3, RPi4
    appreciate the comment @wladi , Your pcb looks sweet, very clean :thumbsup:
     
  4. TPmodding

    TPmodding Administrator Staff Member Administrator

    Messages:
    2,087
    Hardware:
    RPi1/Zero, RPi2, RPi3, +Arduino, +WLED, RPi4
    definitely not. you should better ask: WHY should I drive leds from an mcu rather then from rpi...

    it is more about the timing...

    you get good info from the github repo, which we use in hyperion to controll leds

    https://github.com/jgarff/rpi_ws281x#spi

    and a good source for general timing for the neopixels you can find here

    https://cpldcpu.wordpress.com/2014/01/14/light_ws2812-library-v2-0-part-i-understanding-the-ws2812/

    also the library for the mcus are important

    https://blog.ja-ke.tech/2019/06/02/neopixel-performance.html

    and you should also read this one
    https://github.com/FastLED/FastLED/wiki/Interrupt-problems

    then you may understand the "WHY mcu"
     
    • Informative Informative x 1
  5. davieboy

    davieboy Active Member

    Messages:
    195
    Hardware:
    RPi1/Zero, RPi2, RPi3, RPi4
    Last message got deleted but thatnks for the links @TPmodding :thumbsup:

    Ended up going with the default Hyperion FastLED as it scored good and compatible with the Micro

    One of the really cool things I like about it is the size of the Micro, small enough to solder right up at the original connection and small enough to hide it in a bit of heatshrink then a usb plug to the device.

    First few days i felt the colours were a bit washed out and I did have to tweak my colours a bit as I had the gamma a bit high when using the GPIO but im nearly 90% sure i can see a more wider range of colours right across the board. Switching to that has had no other impact on capture settings or reduced performance so happy days but i was hoping id of hit the 1080 :LOL: