Hi! Great Library!  I will use no other,

Hi!

Great Library! I will use no other, however I have been frustrated lately. I am trying to use it with Particle Photon with an APA102c 5m strip (300 LEDs). Unfortunately the strip is very glitchy (mostly a lot of flickering reds), even with a logic level converter. When trying to adjust the Data Rate down using the addLeds() function like so:

FastLED.addLeds<APA102, DATA_PIN, CLOCK_PIN, RGB, DATA_RATE_MHZ(12)>(leds, NUM_LEDS);

I get the following build errors:

error: parse error in template argument list
error: statement cannot resolve address of overloaded function

When I try to use non SPI pins to use bit-banging (is hardware SPI support finished for Photon yet?), the situation is no better. Additionally I think the A5 Data pin output (which I was originally using) is fried now… not sure of cause. Arduino Uno running FastLed has no trouble with same strip.

Any guidance?

Thanks!

Make sure you are using version 3.1.5 of the library in the particle build environment - I just provided a bunch of SPI fixes for the photon. (There still is no hardware spi support, but bit-banged SPI pushes out over 12mbps, so I’m not in any rush to do it - besides, the particle development environment is a royal pain in the ass for library maintenance and work).

Also - because of a stupidism in particle’s libraries, to use an order of RGB you need to use EOrder::RGB or NSFastLED::RGB (I forget which) - because they stupidly #define’d RGB to something, breaking all the scoping rules.

Hey, how do you supply power to your LED strip? - I have one 4 meter APA 102c with 240 LEDs that had significant voltage drop over distance causing erratic behaviour. I ended up using extra wire pair to supply voltage (and ground) to both ends of the strip.

@Ward1 the flickering you are experiencing is a direct example of poor power delivery. I second what @Pasi_Takala said. If you are driving the pixels at full power, I suggest putting in a power tap every 100 pixels. This will depend on your power supply and how hard you drive the pixels

Hi guys thanks so much for the responses!

Daniel - After having issues I did update to using 3.1.5, but if anything it is worse. So it is going at a max rate of around 12 Mhz because hardware SPI isn’t supported yet? If I used the proper namespace for RGB (where can I find out which that is?), will the change in Data Rate work, or is that still a hardware SPI only thing? Thanks for all your time devoted to this project, PLUS direct and timely contact/support with its users - you’re a good guy.

I’m beginning to think the Photon is just outputting bad signals, not sure what I did to offend it. It was working Ok-ish (still faint red flickers at end, inconsistent color setting towards end as well) without a logic level converter at first. Then I breadboarded one with the photon and it worked better (flicker reduced, could consistently set color for whole strip). Then yesterday I started noticing errant pixels and more red flickering on supposedly “off” or dimmed pixels. Now like I said the A5 pin doesnt seem to output anything useable. Switching pins works, but still lots of flicker. I would just buy another Photon, but I want to know what happened before I potentially ruin another board.

As far as power supply. I am using 5V @ 15A run down a repurposed 15’ lamp wire (16AWG I believe) and powering the strip at both ends (which are physically close to each other due to how I have the strip setup). There is definitely some voltage drop (~ 0.5V and barely visibly noticeable with them all “on”) towards the middle, but as I said an Arduino runs it super clean with no red flicker and proper dimming. I am not usually running the pixels at full power either. Even when I have them all “on” I have them “color corrected” to a warm white color, which cuts down the power draw significantly.

Suggestions? Ideas on how Photon’s murder happened detectives? Any other boards with native 5v output, fast cpu, large memory, wifi, and small package (I mean I don’t ask for much… ) that I could try?

@Ward1 Add power tap every 1 meter from the same power supply with nice thick cables and try again

@Leon_Yuhanov Thank you for your suggestion. I know it would help the overall brightness and uniformity. However I don’t think it is the root cause here, primarily because when the arduino is driving it (with power supply and wiring the same) it has absolutely no issues. Perhaps though it is a combination of power issues coupled with timing or other signal issues from the photon. Whatever the case, I knew it CAN work with the current wiring and redoing the wiring is very difficult at this point so I would prefer to resolve the data signal issue whatever it might be.

@Ward1 I have seen this issue before myself. Try this as a test… Measure the voltage at 1M, 2M, 3M and 4M.

@Leon_Yuhanov I finally got back home and was able to try the namespaces Daniel suggested. Limited the data rate to 12 Mhz fixed it. Will up it until problems crop up again. Thank you though!

@Daniel_Garcia ​ Thanks! Using EOrder:: BGR let me limit to 12 Mhz, which fixed all of my problems. Not sure if unlimited data rate problems are actually a bug in combination with apa102c strips or just exacerbating an underlying problem with my setup…

@Ward1 good to hear, sorry that my suggestion was not the fix :frowning:

It’s setup dependent. Using a device with hardware spi (I only support software SPI on the photon at the moment) I’ve been able to run some apa102’s at over 24mhz (I’ve heard of folks getting as high as 32). However, code/wiring that works for my 768 led board of apa102’s will glitch out on a 200 led strip of apa102 - it’s why I have the mechanism in there for people to change the led speed.

@Daniel_Garcia I had the very same problem as @Ward1 driving 2300 APA102 pixels with a RPi. Anything above 6Mhz would cause the last 600 pixels to flicker red…But short strips of a few hundred i could drive at 10Mhz EASY! In most other cases I have seen this issue, an extra Power Tap has resolved it.

It’s not just about power - there’s also something about the quality of wiring. My board with its 768 apa102 LEDs has no problems being driven as fast as I can push things. However with the 144/meter strips, I can’t drive them over 12mhz even with injecting power at both ends of the strip.

@Daniel_Garcia Agreed, my issues were with 144PM Strips as well