Hi,
Long time lurker, finally come across a problem that I've been tearing my hair out trying to fix and can't find a solution - mainly because I think I'm doing everything the way I should so have drawn a blank. Apologies in advance for the slightly shoddy diagrams.
Basically, I'm trying to power a long strip (up to 720) of APA102 LEDs from an Arduino. I'm using the FastLED library but the problem occurs with other libraries too.
Have tried with an Uno and Leonardo, over USB and Barrel Jack power, both behave the same.
Firstly, a setup that works as expected - no issues at all with this, other than obviously I can't drive the whole strip with just the Arduino 5v Pin:
(Diagram 1)
Next up, I gave this a go but, predictably this didn't work as no common ground:
(Diagram 2)
Most tutorials suggest something along these lines. This is where I'm really stumped. Am I missing something really obvious here?:
(Diagram 3)
And finally, I tried this after seeing a suggestion on a forum (I can't for the life of me find the link). The Arduinos both die the second I join the grounds. As soon as I disconnect, it comes back to life. But no LEDs light up.
(Diagram 4)
To clarify, only with layout 1 do any LEDs on the strip light up, and then they do exactly as expected, animating etc. as per the code examples.
Option 3 seems to be the 'right' way to do it, but no LEDs.
I'm hoping that I'm just missing something simple - any suggestions of things to try would be very much appreciated - thanks!
Matt
(Other info in case useful)
Using Arduino IDE 18.3.13 on MacOS
Images added as attachments, as when I preview the embedded ones don't seem to show.
This code works in option 1:
#include <FastLED.h>
#define NUM_LEDS 1
CRGB leds[NUM_LEDS];
void setup() {
FastLED.addLeds<APA102, RGB>(leds, NUM_LEDS); // BGR ordering is typical
}
void loop() {
leds[0] = CRGB::Red;
FastLED.show();
delay(500);
leds[0] = CRGB::Black;
FastLED.show();
delay(500);
}



