Issues with APA102 LEDs do not light up with RPi3+

  • Hi all


    I have been trying to get my TV ambient lighting working for nearly 2 years now, I previously only just managed to get the WS2812B working with Arduino but it suddenly stopped so I gave up on it – then I was told APA102 is a better LED & can be controlled directly with the RPi so I bought it & connected it up but still have no luck – I only get 1 LED lit up & that’s it, I feel like jumping off the cliff so any help would be most appreciated.


    This is my set up


    • DC 5V 20A 100W Universal Regulated Switching Power Supply
    • 1x LED Strip 5m APA102 60LED/M LED
    • Digital video audio HDMI to AV CVBS Converter Support 4Kx2K L/R stereo NTSC PAL
    • Easycap USB 2.0 VHS VCR to Win PC DVD Video Audio Converter Grabber Capture Card
    • Raspberry Pi 3 Model B+ B Plus
    • HDMI switch


    - I have the latest version (2020-11-19-HyperBian-lite) image installed (I think Beta9 image) on RPi
    - I have connected the RPi pin 19 to LED’s Green data & pin 21 to LED’s Yellow data pin (in fact I swapped them around & no change)
    - I have also attached the Pi pin 34 (GRD) to the power supply cable’s -ve
    - I also have a capacitor across the power input to the LEDs in one end only
    - I have connected both ends of the LEDs to my power supply (1 has the capacitor the other doesn’t)


    https://pinout.xyz/


    I have checked the SPI & its enabled & working



    pi@HyperBian:~/spi_test/spidev-test $ ./spidev_test -v
    spi mode: 0x4
    bits per word: 8
    max speed: 500000 Hz (500 KHz)
    TX | FF FF FF FF FF FF 40 00 00 00 00 95 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0D | ......@....?..................?.
    RX | FF FF FF FF FF FF 40 00 00 00 00 95 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0D | ......@....?..................?.


    Well I need to get the LEDs working first as there is no sign of life but One other thing – my video capture doesn’t show anything either but it used to work – I get a green screen or Grey flicker – I changed from Auto to PAL & still nothing but its recognised as below:



    pi@HyperBian:~ $ lsusb


    Bus 001 Device 004: ID 1b71:3002 Fushicai USBTV007 Video Grabber [EasyCAP]
    Bus 001 Device 005: ID 0424:7800 Standard Microsystems Corp.
    Bus 001 Device 003: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
    Bus 001 Device 002: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


    My Config File attached


    I appreciate any help you can give me to get this working I just cant think of anything else to try


    Thank you!

  • I have been trying to get my TV ambient lighting working for nearly 2 years now, I previously only just managed to get the WS2812B working with Arduino but it suddenly stopped so I gave up on it – then I was told APA102 is a better LED & can be controlled directly with the RPi so I bought it & connected it up but still have no luck – I only get 1 LED lit up & that’s it, I feel like jumping off the cliff so any help would be most appreciated.


    device": {
    "colorOrder": "bgr",
    "hardwareLedCount": 226, set to 1
    "invert": false,
    "latchTime": 0, set to 1
    "output": "/dev/spidev0.0",
    "rate": 500000, set to 1750000
    "rewriteTime": 1000, set to 6000
    "type": "apa102"
    },



    pin 19 (GPIO10) has to go to data
    pin 23 (GPIO11) has to go to clk


    I have connected the RPi pin 19 to LED’s Green data & pin 21 to LED’s Yellow data pin (in fact I swapped them around & no change)



    its not 21>>>>>>> its 23 (GPIO11)



    remove the capacitor


    use more GND pin then only one, at least 2 and connect them to GND of ledstrip and PSU
    solder directly to the pins, better to use no jumperconnector cables ( because of resistance)


    while you are at it, for the grabber problem.


    it seems that Raspberry is picking up livefeed video, so i think increase USB port power should do it.


    go to config.txt ( pull out SD card ) and ad the rule anywhere or under a rule that excists;


    max_usb_current=1



    for more CPU power alter lines there to this:


    arm_freq=900
    force_turbo=1



    this makes sure the PI runs higher in ARM ,
    then save the file

  • Thank you so much for your response @jeroen warmerdam
    I did what you said changed the settings - (updated file attached)


    -Changed the RPi pins, now Pin 19 goes to Data (Green) - Pin 23 goes to CLK=Yellow
    -GRD still connected to Pin 34 from the power supply to the start of the LED in direction of --> arrow
    -I added another GRD pin to the other end of the LED & into the power supply -ve & connected it to Pin 30
    -Removed the capacitor


    Nothing happened - I have to admit I'm still using the jumperconnectors for GRD connections but if you think it MUST be soldered then I will have a go but Im not great at soldering especially so tiny areas


    I'm surprised on your recommendation for Hardware LED count = 1 - I always thought the total no. LEDs should go there but I changed as per your instructions anyway
    I havent tried the Video Capture yet but will do as soon as I manage to get the LEDs going 1st
    Any other idea's I can try out please?

  • Just put the hardware count back to 226 & still nothing no LED -
    what next please?


    Are you in WebUI hyperion when you make the modifications?


    Can you post that ledstrip here, what's the connection under the heat shrink? Maybe its corrupt so you have to cut a led or two and solder from that point.


    I think you need a multimeter to measure the strip and PSU

  • Are you sure the data direction arrows is correct on the ledstrip? It has to go AWAY from the PI gpio



    Does login into WebUI environment give any warnings?
    Are you logged in there as a expert?
    Can you provide a debug log from there, it's at tab Logs 》 debug.

  • Please see your answeres below


    Are you sure the data direction arrows is correct on the ledstrip? It has to go AWAY from the PI gpio
    If I understand correctly - I have the RPi gpio pin going to the start of the LED strip direction of the arrow i.e. pin -->. Not pin <--


    Does login into WebUI environment give any warnings?
    no it doesnt works well
    I sometime get the following error which I have to unplug the RPi power supply & plug it back in but not often
    ssh: connect to host 192.168.1.68 port 22: Connection refused


    Are you logged in there as a expert?
    Yes Im logged in as expert


    Can you provide a debug log from there, it's at tab Logs 》 debug.


    Debug attached

  • Ledstrip device is enabled in WebUI? Green dot..


    If warning or anything, SPI is working so I think you should inspect your LEDstrip.


    Just for the fun of it, can you before we go into depth of malfunction do a simple test? Just connect the strip at the other side (the end of it or maybe begin??) and see what happens, sometimes you have a faulty strip thats connected the wrong way, happening before here on the forum.. If that don't work....


    Get the measurements with multimeter of voltage from begin to end and... start with a new led ( cut one or begin in the middle of the strip ) because it makes no sense why LEDstrip doesn't do anything at all.
    Solder the pads new and try again.
    Settings looks good to me so do this
    and then come back here with hopefully results.


    Its possible the LEDstrip fails completely but to make sure the whole thing is checked before we throw it


    :classy: wiggle the LEDstrip a little at the beginning when Hyperion is running, at effects set a idle effect so when you have no grabbing signal still you can see leds respond to a fix. We hope...



    Good luck!

  • sorry where can I find "Ledstrip device is enabled in WebUI? Green dot.."


    I measured the voltage across an LED in the middle of the strip & get 5.2V


    not sure where to Solder the pads new and try again.??
    do you mean cut the LED strip & solder it back - if I do this I wont be able to return it if its faulty...

  • Green dot has to be visible in WebUI, means that LEDstrip controller is active, you can find it in dashboard.


    That's the gamble, it surely looks like the LEDstrip is faulty anyway. So go for a solution or simply go for a return


    we need to know if the ledstrip is okay because i think that Hyperion.NG is not at fault here.

  • Hi Jeroen hope all is well
    I have returned the old LEDs & bought a new one - before I open this I just wanted to confirm
    its actually :
    BTF-LIGHTING DC5V 16.4ft 5m SK9822 (Similar APA102C) 300 Pixels/LEDs IP30 Non-Waterproof White PCB Data and Clock Seperately Individual Adressable Full Color


    https://www.amazon.co.uk/gp/pr…tle_o00_s00?ie=UTF8&psc=1


    Its says SK9822 (Similar APA102C) I hope that doesnt make a difference?



    use SK9822 or APA102 SPI controller and you are okay :omg:

  • Hey Jeroen
    Good news is I got my new SK9822 (Similar APA102C) LEDs & as soon as I plugged them in they started to work I could even control them with my iPhone Hyperian app I had so much relief
    However my capture as mentioned before is showing green even after I edited the config file with your suggestion so I added the lines below in but no change - I have attached my config file - any suggestions would be much appreciated I know I'm close but just need to get this bit working, please - Thanks!


    max_usb_current=1
    for more CPU power alter lines there to this:
    arm_freq=900
    force_turbo=1


  • your config.txt is fine you can't change colours of grabbers there..


    i didnt know you had grabber problems, but APA102 SK9822 >>>> RGB byte order has to set as NOT RGB but BGR

  • Hey Jeroen I managed to get the capture going by pluging it & out seems ok - all working fine now - the Hyperion crashed on me couple of times & would let me access the. Web UI even though I could ssh into RPi - thank so much for your support much apprciated
    1 more thing when I reboot the RPi I get the following
    % ssh pi@192.168.1.68
    ssh: connect to host 192.168.1.68 port 22: Connection refused
    & thats it not sure why this is happening so I have to unplug power which is not good for RPi

  • Hey Jeroen I managed to get the capture going by pluging it & out seems ok - all working fine now - the Hyperion crashed on me couple of times & would let me access the. Web UI even though I could ssh into RPi - thank so much for your support much apprciated
    1 more thing when I reboot the RPi I get the following
    % ssh pi@192.168.1.68
    ssh: connect to host 192.168.1.68 port 22: Connection refused
    & thats it not sure why this is happening so I have to unplug power which is not good for RPi



    you can always unplug power to the PI, my setup is just a relais that switch of the PI when not needed. ( i have 2 Pi's in the box, possible with switch)
    motto is; equipment that doesnt need to run goes off...
    When booting up, Hyperion.NG starts automatically by a start script, with a click of the button PI is completely off...


    i have this relais for my leds/pi's/TVip/cabinet lights and a lot of other things



    SSH problems is a software thing of OS, not Hyperion.NG

  • Hey Jeroen thx again for all your advice its working fine it may need some fine-tuning which I need to find out how


    here is a tip from me to you about switching them on/off - Im using the unit below to power an extension lead & have connected the RPi & LEDs & the video capture to it
    I can use the app or Alexa to turn it on & it works great remotely its called SONOFF



    https://uk.banggood.com/SONOFF…=myorder&cur_warehouse=CN


    Thanks again for all your help

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!