NeoPixel Digital RGBW LED Strip

EL Wire/Tape/Panels, LEDs, pixels and strips, LCDs and TFTs, etc products from Adafruit

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
kelly_z
 
Posts: 4
Joined: Mon Oct 21, 2013 9:38 am

NeoPixel Digital RGBW LED Strip

Post by kelly_z »

Hello,

I am using an Arduino Uno with a RGBW Neopixel strip- this is the model:
https://www.adafruit.com/product/2848

…and here is my order info:
• 1 x Adafruit NeoPixel Digital RGBW LED Strip - Black PCB 144 LED/m (1m)
• Order number: 1543346-5842510002
• Order date: 9/14/17

I am trying to use the "strandtest" code in Arduino to make it work but when I upload the code, nothing happens to the LEDs (the code uploads without any issues).

Attached here is the diagram of my circuit, some closeup photos, and my code.

Note that I am powering the LED strip before I power the Arduino (I was told powering the Arduino first may cause issues). There are 58 neopixels on my strip. I double checked my solders and all my breadboard connections to make sure they are secure. I also read that this Neopixel strip requires a 5V data signal, and I believe the Arduino Uno uses a 5V data signal from its pins.

I am not sure yet why the strip is not working, but any help you can offer is greatly appreciated.
lighthouse_led_strip_circuit_uno2_bb.png
lighthouse_led_strip_circuit_uno2_bb.png (320.39 KiB) Viewed 173 times
arduino_small.jpg
arduino_small.jpg (105.29 KiB) Viewed 173 times
breadboard_small.jpg
breadboard_small.jpg (87.05 KiB) Viewed 173 times

Code: Select all

#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
  #include <avr/power.h>
#endif

#define PIN 11

// Parameter 1 = number of pixels in strip
// Parameter 2 = Arduino pin number (most are valid)
// Parameter 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)
Adafruit_NeoPixel strip = Adafruit_NeoPixel(58, PIN, NEO_RGBW + NEO_KHZ800);

// IMPORTANT: To reduce NeoPixel burnout risk, add 1000 uF capacitor across
// pixel power leads, add 300 - 500 Ohm resistor on first pixel's data input
// and minimize distance between Arduino and first pixel.  Avoid connecting
// on a live circuit...if you must, connect GND first.

void setup() {
  // This is for Trinket 5V 16MHz, you can remove these three lines if you are not using a Trinket
 // #if defined (__AVR_ATtiny85__)
   // if (F_CPU == 16000000) clock_prescale_set(clock_div_1);
 // #endif
  // End of trinket special code


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

void loop() {
  // Some example procedures showing how to display to the pixels:
  colorWipe(strip.Color(255, 0, 0), 50); // Red
  colorWipe(strip.Color(0, 255, 0), 50); // Green
  colorWipe(strip.Color(0, 0, 255), 50); // Blue
//colorWipe(strip.Color(0, 0, 0, 255), 50); // White RGBW
  // Send a theater pixel chase in...
  theaterChase(strip.Color(127, 127, 127), 50); // White
  theaterChase(strip.Color(127, 0, 0), 50); // Red
  theaterChase(strip.Color(0, 0, 127), 50); // Blue

  rainbow(20);
  rainbowCycle(20);
  theaterChaseRainbow(50);
}

// Fill the dots one after the other with a color
void colorWipe(uint32_t c, uint8_t wait) {
  for(uint16_t i=0; i<strip.numPixels(); i++) {
    strip.setPixelColor(i, c);
    strip.show();
    delay(wait);
  }
}

void rainbow(uint8_t wait) {
  uint16_t i, j;

  for(j=0; j<256; j++) {
    for(i=0; i<strip.numPixels(); i++) {
      strip.setPixelColor(i, Wheel((i+j) & 255));
    }
    strip.show();
    delay(wait);
  }
}

// Slightly different, this makes the rainbow equally distributed throughout
void rainbowCycle(uint8_t wait) {
  uint16_t i, j;

  for(j=0; j<256*5; j++) { // 5 cycles of all colors on wheel
    for(i=0; i< strip.numPixels(); i++) {
      strip.setPixelColor(i, Wheel(((i * 256 / strip.numPixels()) + j) & 255));
    }
    strip.show();
    delay(wait);
  }
}

//Theatre-style crawling lights.
void theaterChase(uint32_t c, uint8_t wait) {
  for (int j=0; j<10; j++) {  //do 10 cycles of chasing
    for (int q=0; q < 3; q++) {
      for (uint16_t i=0; i < strip.numPixels(); i=i+3) {
        strip.setPixelColor(i+q, c);    //turn every third pixel on
      }
      strip.show();

      delay(wait);

      for (uint16_t i=0; i < strip.numPixels(); i=i+3) {
        strip.setPixelColor(i+q, 0);        //turn every third pixel off
      }
    }
  }
}

//Theatre-style crawling lights with rainbow effect
void theaterChaseRainbow(uint8_t wait) {
  for (int j=0; j < 256; j++) {     // cycle all 256 colors in the wheel
    for (int q=0; q < 3; q++) {
      for (uint16_t i=0; i < strip.numPixels(); i=i+3) {
        strip.setPixelColor(i+q, Wheel( (i+j) % 255));    //turn every third pixel on
      }
      strip.show();

      delay(wait);

      for (uint16_t i=0; i < strip.numPixels(); i=i+3) {
        strip.setPixelColor(i+q, 0);        //turn every third pixel off
      }
    }
  }
}

// Input a value 0 to 255 to get a color value.
// The colours are a transition r - g - b - back to r.
uint32_t Wheel(byte WheelPos) {
  WheelPos = 255 - WheelPos;
  if(WheelPos < 85) {
    return strip.Color(255 - WheelPos * 3, 0, WheelPos * 3);
  }
  if(WheelPos < 170) {
    WheelPos -= 85;
    return strip.Color(0, WheelPos * 3, 255 - WheelPos * 3);
  }
  WheelPos -= 170;
  return strip.Color(WheelPos * 3, 255 - WheelPos * 3, 0);
}

User avatar
dastels
 
Posts: 15667
Joined: Tue Oct 20, 2015 3:22 pm

Re: NeoPixel Digital RGBW LED Strip

Post by dastels »

Hmmm... all looks good. Out of curiosity, try lowering the number of pixels.. to 8 maybe. The UNO has a very limited amount of RAM and if the buffer can't be allocated it will act as if there are no pixels.

Dave

User avatar
kelly_z
 
Posts: 4
Joined: Mon Oct 21, 2013 9:38 am

Re: NeoPixel Digital RGBW LED Strip

Post by kelly_z »

Thank you, Dave. I tried it with 8 pixels (I also made sure to update that in the code) but still no luck. Was a good thought and I appreciate the input.

Kelly

User avatar
caitlinsdad
 
Posts: 627
Joined: Fri Feb 24, 2012 4:23 pm

Re: NeoPixel Digital RGBW LED Strip

Post by caitlinsdad »

It looks like the black jumper is plugged into the Vin pin header spot. The ground wire needs to be connected to the GND pin on the UNO. Look closely to see you have the correct spot as the plastic obscures where the pin is actually wired up, Good luck.

User avatar
kelly_z
 
Posts: 4
Joined: Mon Oct 21, 2013 9:38 am

Re: NeoPixel Digital RGBW LED Strip

Post by kelly_z »

Thank you, @caitlinsdad

I double checked and the black jumper wire is connected to the GND pin of the Arduino.

User avatar
caitlinsdad
 
Posts: 627
Joined: Fri Feb 24, 2012 4:23 pm

Re: NeoPixel Digital RGBW LED Strip

Post by caitlinsdad »

I don't see a pic of the actual neopixel strip you are using but sometimes the wiring on that may be mixed up from the manufacturer who may not be going by the color of the wires. Also, any wiring that comes with the strip may be at the input end or output end to connect to another strip. Look for the arrows printed on the strip, the UNO's signal wire should be attached to the strip's Din pad. Try another pin on the uno and be sure to change it in the code configuration line. Your code compiles ok and uploads to the board? - make sure you have the latest neopixel library. Those protoboards sometimes have bad connections too, move where you connect, the row or column might be bad. The jumper wires can also be suspect. I guess this is where a simple multimeter would help troubleshoot if still not working.

User avatar
caitlinsdad
 
Posts: 627
Joined: Fri Feb 24, 2012 4:23 pm

Re: NeoPixel Digital RGBW LED Strip

Post by caitlinsdad »

Last thought is the capacitor is in the wrong way. The electrolytic capacitor should have markings for the leads to connect to + and gnd(-)

User avatar
dastels
 
Posts: 15667
Joined: Tue Oct 20, 2015 3:22 pm

Re: NeoPixel Digital RGBW LED Strip

Post by dastels »

Cap looks good. You can see the polarity stripe on the top.

Dave

User avatar
dastels
 
Posts: 15667
Joined: Tue Oct 20, 2015 3:22 pm

Re: NeoPixel Digital RGBW LED Strip

Post by dastels »

Have you tried other pins on the UNO?

Dave

User avatar
kelly_z
 
Posts: 4
Joined: Mon Oct 21, 2013 9:38 am

Re: NeoPixel Digital RGBW LED Strip

Post by kelly_z »

Thank you both for your help. So I made sure that I am using the latest NeoPixel library, and I believe the wiring on the strip is correct. I soldered the red wire to the side marked "+" and the ground wire to the side marked "-", and the signal wire is in the middle. I also made sure to solder the wires to the left of the arrow (arrow is pointing to the right). Photo attached.
LEDstrip_closeup.jpg
LEDstrip_closeup.jpg (678.19 KiB) Viewed 128 times
I am currently using PWM pin 11, but have also tried other PWM pins (and made sure to update the pin number in the code).

I will check later today with a multimeter to see if that can help track down the issue.

I am wondering if maybe anyone could recommend another neopixel strip that they have worked with?

User avatar
caitlinsdad
 
Posts: 627
Joined: Fri Feb 24, 2012 4:23 pm

Re: NeoPixel Digital RGBW LED Strip

Post by caitlinsdad »

The last resort is to cut off that first neopixel. It could have been bad for some reason preventing it from passing on all the signals or power. Leaving the neopixel on the strip and just connecting to the next set of solder pads may not root out the problem pixel. Cut the next set of pads in half and solder to the remaining bit. If still not working, you may have to sacrifice another one, resolder the wires and see if it works. I have a collection of odd length strips from my experience.

Locked
Please be positive and constructive with your questions and comments.

Return to “Glowy things (LCD, LED, TFT, EL) purchased at Adafruit”