0

Neopixel 60 RGB LED Strip Not Working?
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Neopixel 60 RGB LED Strip Not Working?

by StutteringJack on Thu Aug 29, 2019 3:59 pm

So for my wearables project I am learning on how to use LED RGB strips, so I purchased these neopixels and I am following this guide. Instead of a 5v power source, they said to use a 3.7v LiPo battery. After collecting all of the materials needed, and getting the battery to work, I hook it all up exactly as said in the tutorial, and hook up this code:
Code: Select all | TOGGLE FULL SIZE
#include <Adafruit_NeoPixel.h>

// Which pin on the Arduino is connected to the NeoPixels?
// On a Trinket or Gemma we suggest changing this to 1:
#define LED_PIN    5

// How many NeoPixels are attached to the Arduino?
#define LED_COUNT 11

// Declare our NeoPixel strip object:
Adafruit_NeoPixel strip(LED_COUNT, LED_PIN, NEO_RGB + NEO_KHZ800);
// Argument 1 = Number of pixels in NeoPixel strip
// Argument 2 = Arduino pin number (most are valid)
// Argument 3 = Pixel type flags, add together as needed:
//   NEO_KHZ800  800 KHz bitstream (most NeoPixel products w/WS2812 LEDs)
//   NEO_KHZ400  400 KHz (classic 'v1' (not v2) FLORA pixels, WS2811 drivers)
//   NEO_GRB     Pixels are wired for GRB bitstream (most NeoPixel products)
//   NEO_RGB     Pixels are wired for RGB bitstream (v1 FLORA pixels, not v2)
//   NEO_RGBW    Pixels are wired for RGBW bitstream (NeoPixel RGBW products)

void setup() {
  strip.begin();
  strip.show(); // Initialize all pixels to 'off'
}

void loop() {
  strip.setPixelColor(6, 255, 255, 0);
}


And yet it doesn't work, there is no errors, no short circuits, it just doesn't do anything. Is it a hardware thing or a code thing that is screwing this up?

StutteringJack
 
Posts: 16
Joined: Thu Aug 15, 2019 9:08 pm

Re: Neopixel 60 RGB LED Strip Not Working?

by adafruit_support_carter on Thu Aug 29, 2019 4:12 pm

Could be a connection issue. Post a photo showing your setup and how everything is wired together.

adafruit_support_carter
 
Posts: 12991
Joined: Tue Nov 29, 2016 2:45 pm

Re: Neopixel 60 RGB LED Strip Not Working?

by StutteringJack on Fri Aug 30, 2019 2:05 pm

Sorry I don't have any diagram making software, so I'll try to clear some things up, it is being powered through a 3.7v LiPo battery charger, and the theres a 1000uF capacitor in parallel with the power supply, and a 470ohm resistor connecting the arduino to the DIN terminal.
Attachments
Capture2.PNG
Capture2.PNG (793.38 KiB) Viewed 150 times
Capture1.PNG
Capture1.PNG (752.66 KiB) Viewed 150 times

StutteringJack
 
Posts: 16
Joined: Thu Aug 15, 2019 9:08 pm

Re: Neopixel 60 RGB LED Strip Not Working?

by kcl1s on Fri Aug 30, 2019 3:29 pm

Looks like you are missing a common ground between the controller and the pixel supply. Are you using the usb to power the controller?

Fellow hobbyist
Keith

kcl1s
 
Posts: 1256
Joined: Tue Aug 30, 2016 12:06 pm

Re: Neopixel 60 RGB LED Strip Not Working?

by kcl1s on Fri Aug 30, 2019 3:37 pm

Also you need to add a strip.show(); statement after the setpixel statement in your code to send the info to the pixels. I like to test new pixel strips with the strandtest example code first.

Keith

kcl1s
 
Posts: 1256
Joined: Tue Aug 30, 2016 12:06 pm

Re: Neopixel 60 RGB LED Strip Not Working?

by StutteringJack on Fri Aug 30, 2019 4:14 pm

The circuit should now be closed, I redirected the ground to the arduino ground, but it still doesn't work, I'm assuming it has something to do with this little line of code in the strandtest program you suggested:
Code: Select all | TOGGLE FULL SIZE
Adafruit_NeoPixel strip(LED_COUNT, LED_PIN, NEO_GRB + NEO_KHZ800);

How can I figure out what type of strip my neopixels are for the third argument?

StutteringJack
 
Posts: 16
Joined: Thu Aug 15, 2019 9:08 pm

Re: Neopixel 60 RGB LED Strip Not Working?

by kcl1s on Fri Aug 30, 2019 5:01 pm

One thing to check is that the arrows on the strip point away from your solder connections. The example definition line works for most pixels.

I would suggest just breadboarding this up in its simplest form just to get the pixels working. You don't need the capacitor, resistor or external power supply. You can make it portable once you have the pixels working. Just wire them like this
controller ---> strip
gnd ---> gnd (-)
5v ---> power (+)
pin 6 ---> signal

Change strandtest line from #define LED_COUNT 60 to #define LED_COUNT 11 and load it. You can run the 11 pixels on USB power with no problem.

Let us know how it goes.

Keith

kcl1s
 
Posts: 1256
Joined: Tue Aug 30, 2016 12:06 pm

Re: Neopixel 60 RGB LED Strip Not Working?

by StutteringJack on Fri Aug 30, 2019 8:19 pm

Isn't connecting the strip to the 5 volt power supply on the Arduino drawing too much current? Also, how can I figure out the third argument or that line of code? Is it RGB or GRB? Is it 800Khz or 400Khz? Thanks.

StutteringJack
 
Posts: 16
Joined: Thu Aug 15, 2019 9:08 pm

Re: Neopixel 60 RGB LED Strip Not Working?

by kcl1s on Fri Aug 30, 2019 10:32 pm

You are only lighting 11 pixels the Arduino 5v pin powered by the usb can handle that. You had 11 pixels in your first code but even if you have the whole strip attached you can still just declare 11 and that is how many it will light. I teach Arduino to teens using a 16 pixel ring and have never had a problem using the wiring as I have described. The capacitor and resistor is best practice but I only add them to projects if I am using lots of pixels (60 or more). If you bought the pixels from Adafruit I bet they will work with the example declaration. The pixels you linked to are normal 3 element pixels. If you happen to have 4 element pixels (rgbw) they would still light just in an odd way.

Please try the wiring and code in my last post. Start simple with easy wiring and known good example code, get good results, then tailor it to what your project needs.

Keith

kcl1s
 
Posts: 1256
Joined: Tue Aug 30, 2016 12:06 pm

Re: Neopixel 60 RGB LED Strip Not Working?

by StutteringJack on Sat Aug 31, 2019 9:29 am

So I hooked up the data terminal from the strip to the D5, hooked up ground to the Arduino, plugged in the power to the 5v on the arduino, I hooked up the code, set it to 11, and it still appears to not turn on. Is it possible to break my LED lights?

StutteringJack
 
Posts: 16
Joined: Thu Aug 15, 2019 9:08 pm

Re: Neopixel 60 RGB LED Strip Not Working?

by kcl1s on Sat Aug 31, 2019 12:16 pm

The example code uses pin 6. Either change the code to pin 5 or move the data pin to D6. Can you post a close up of the solder connection and the first couple pixels on your strip so we can rule out problems there.

Keith

kcl1s
 
Posts: 1256
Joined: Tue Aug 30, 2016 12:06 pm

Re: Neopixel 60 RGB LED Strip Not Working?

by StutteringJack on Sat Aug 31, 2019 12:28 pm

White wire to D6, red wire to 5v, and theres two black wires that go to ground.
Attachments
Capture1.PNG
Capture1.PNG (285.43 KiB) Viewed 80 times

StutteringJack
 
Posts: 16
Joined: Thu Aug 15, 2019 9:08 pm

Re: Neopixel 60 RGB LED Strip Not Working?

by kcl1s on Sat Aug 31, 2019 1:26 pm

Assuming the solder is good under the silicone and that you get the message done uploading when you load your code to the controller you probably have a hardware issue. Things to check...
You can check that you have 5 volts across the gnd / 5 v oval pads between the 1st and 2nd pixels.
You can check that the controller is functioning by loading the 'blink' example code to blink the onboard LED.
You can try to cut one pixel off your strip and re-solder.

After that I am out of ideas.

Keith

kcl1s
 
Posts: 1256
Joined: Tue Aug 30, 2016 12:06 pm

Re: Neopixel 60 RGB LED Strip Not Working?

by StutteringJack on Sat Aug 31, 2019 2:38 pm

It works!!! I guess the problem was a faulty connection beneath the silicone when I peeled off the silicone covering, cause I cut off the very first neopixel, soldered on some fresh wires, and it worked! Thanks for all the help!

Now that I have that done, in my project I'm going to need 6 of these strips with 10-12 neopixels on each strip, should I use the capacitor (with an external power source obviously) to power the neopixels?
Attachments
Capture3.PNG
Capture3.PNG (246.33 KiB) Viewed 65 times

StutteringJack
 
Posts: 16
Joined: Thu Aug 15, 2019 9:08 pm

Re: Neopixel 60 RGB LED Strip Not Working?

by kcl1s on Sat Aug 31, 2019 3:29 pm

Great to see it working. I would try it without the capacitor and resistor, you can always add them later if need be. I would move forward in small steps.

-Power the pixels from the battery charge board

-Figure out how you are going to power the controller at 5 volts or consider one of the 3.3 volt boards from Adafruit. A Feather board like this can be powered with and charge a LiPo battery https://www.adafruit.com/product/3403

-Wire your strips daisy chain style to get your project going.

Good luck
Keith

kcl1s
 
Posts: 1256
Joined: Tue Aug 30, 2016 12:06 pm

Please be positive and constructive with your questions and comments.