Neopixel - difficulty in driving individual LEDs

Hi all

Here’s an interesting issue. I’m trying to get my new Photo to drive a string of 20 individual neopixel LEDs without any joy. The LEDs flash randomly around as the Photo boots up and then stick steadfastedly in a single random colour (if they come on at all) despite any control signals sent to it using the Photon neopixel library.

What’s interesting (i.e. frustrating) is that:

a) my code works perfectly with the Photon and a pre-made Neopixel strip strip (1m of 60 LEDs)
b) the homebrew hardware works perfectly with an Arduino and exactly the same coding

I initially suspected it was all to do with the 3.3v versus 5v logic level difference between the two controllers (Photon vs Arduino) although this wouldn’t explain why the Photon can drive the pre-made strip perfectly unless such strips are more tolerant to lower logic voltage than individual neopixel LEDs. However, I bought and connected a logic level converter to rule this out and it still won’t work.

I’ve inserted hyperlinks so you can see the precise hardware I bought and played with. Other suppliers are available.

Anyone had any luck with individual Neopixel LEDs? Any hints?

Many thanks again.

Do you have a common ground between your neopixels and the photon? Another possibility is signal noise. Have you tried adding a ~220ohm resistor before the first neopixel?

1 Like

Aha! This (above) seems to work! Thank you! I put a 220ohm resistor in on the 5v LED pin and it now works! It still has the occasional glitch showing unexpected colours now and then but at least it is responsive to commands now.

It’s so much more sensitive to noise than the Arduino isn’t it?

Oops - actually not solved after all :(. On redeployment of the proper application (rather than the testbed in a breadboard) it still doesn’t work. I’m all out of ideas now - I’m guessing the Photon just isn’t suitable for controlling a string of through-hole neopixel LEDs. I think I’l have to revert to the Arduino solution, and work out a way to get the Photon to talk to the Arduino to send it messages from the internet.

How are the LEDs wired up can you attach a picture of your setup? I’ve soldered together neopixels with no issue on the photon. Is it possible you have an LED wired up backwards? Also you mentioned it works With the LEDs in a breadboard is that correct?

Hi Gavin. No problems with the LEDs wiring - the hardware all works perfectly with a different controller. I’ll just keep persevering.
It worked with LEDs mounted in a breadboard but not 100% reliably. I was still getting the odd glitch (see above). I suspect it’s signal noise like you suggested. I wonder how else I can reduce this? The resistor isn’t sufficient in this case I guess.