📬❄️📦Adafruit Holiday Shipping Deadlines 2019: Please place all UPS 3 Day orders by 11am ET Friday December 13 📬❄️📦
0

Stitched Neopixels 2 in line but light as 1 - wiring?
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Stitched Neopixels 2 in line but light as 1 - wiring?

by todkkuykendall on Wed Nov 20, 2019 1:54 am

I'm working with the Feather M0 and the Propmaker wing and I have successfully wired and programmed series of neopixels on a premade strip with alternating colors and brightnesses etc.

Now my wife as stitched up two Neopixels using the three strand ground and power lines zig-zag stitched and tried two Neopixels into it as an experiment. She has hand stitched to the IN on the first one and the OUT to the IN on the second.

But when I run code that should blink each light they blink the same. If I only address the first one they both blink and if I only address the second one nothing happens. Is there an obvious stitching/wiring/connection issue that leads to the controller only seeing one pixel to control?

I haven't seen any instructions that say the last pixel OUT needs to be connected to anything - did I miss something?

I tried alligator clipping directly to the first pixel and I tried alligator clipping the other IN/OUT connection (without clipping the thread) but the behavior always seems to be the same.

Any thoughts?
Thanks,
=Tod



I'll include my code but I don't think that's it.

Code: Select all | TOGGLE FULL SIZE
#include <Adafruit_NeoPixel.h>
 
// NeoPixel strip length, in pixels
#define NUM_PIXELS 2
 
#define NEOPIXEL_PIN 5
#define POWER_PIN    10
#define DEBUG 1
// create a neopixel strip
Adafruit_NeoPixel strip = Adafruit_NeoPixel(NUM_PIXELS, NEOPIXEL_PIN, NEO_GRB + NEO_KHZ800);
 
void setup() {
  if (DEBUG){
    Serial.begin(115200);
    while (!Serial) {
      ; // wait for serial port to connect. Needed for native USB port only
    }
    Serial.print("\nStarting Rain");
  }
  // Set power pin to output
  pinMode(POWER_PIN, OUTPUT);
  // Disable the pin, we're not currently writing to the neopixels.
  digitalWrite(POWER_PIN, LOW);
 
  // This initializes the NeoPixel library.
  strip.begin();
  digitalWrite(POWER_PIN, HIGH);
}

void loop() {
 
  if (DEBUG){
    Serial.print("\nLoop");
  }
  strip.setPixelColor(0, 100, 0, 0);
  strip.setPixelColor(1, 0, 0, 100);
  strip.show();
  delay(500);
  strip.setPixelColor(0, 0, 0, 100);
  strip.setPixelColor(1, 100, 0, 0);
  strip.show();
  delay(500);

}
Last edited by adafruit_support_bill on Wed Nov 20, 2019 6:58 am, edited 1 time in total.
Reason: Please use [code] tags when submitting code to the forums

todkkuykendall
 
Posts: 10
Joined: Sat Nov 16, 2019 2:59 pm

Re: Stitched Neopixels 2 in line but light as 1 - wiring?

by adafruit_support_bill on Wed Nov 20, 2019 7:01 am

Please post a link to the specific pixels you are using.

And also please post some photos showing your connections.

adafruit_support_bill
 
Posts: 75299
Joined: Sat Feb 07, 2009 10:11 am

Re: Stitched Neopixels 2 in line but light as 1 - wiring?

by todkkuykendall on Thu Nov 21, 2019 2:00 am

I'm using the sewable neopixels - https://www.adafruit.com/product/1260

Here are the images - not shown are alligator clips attaching jst connector on propmaker to sew neopixels.

The links to the images don't embed but the should work.

https://photos.app.goo.gl/jbzToUHRcr8Jm2717
https://photos.app.goo.gl/AWLmJSEo9ZJjaPiK9

Thanks,
=Tod

todkkuykendall
 
Posts: 10
Joined: Sat Nov 16, 2019 2:59 pm

Re: Stitched Neopixels 2 in line but light as 1 - wiring?

by adafruit_support_bill on Thu Nov 21, 2019 7:01 am

It looks like you are trying to power the Neopixels from GPIO pin 10. The maximum current for an M0 GPIO pin is 7 mA. https://cdn-shop.adafruit.com/product-f ... asheet.pdf

2 pixels with one channel active on each at a level of 100 out of 255 will be trying to draw 15mA.

adafruit_support_bill
 
Posts: 75299
Joined: Sat Feb 07, 2009 10:11 am

Re: Stitched Neopixels 2 in line but light as 1 - wiring?

by kcl1s on Thu Nov 21, 2019 11:43 am

adafruit_support_bill wrote:It looks like you are trying to power the Neopixels from GPIO pin 10. The maximum current for an M0 GPIO pin is 7 mA. https://cdn-shop.adafruit.com/product-f ... asheet.pdf

2 pixels with one channel active on each at a level of 100 out of 255 will be trying to draw 15mA.

Bill I believe he is using the Prop wing with pwr enable with d10.

Fellow hobbyist
Keith

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

Re: Stitched Neopixels 2 in line but light as 1 - wiring?

by kcl1s on Thu Nov 21, 2019 11:51 am

Just to check the conductive signal thread is cut and does not continue under pixel 0 to the out tab.

Keith
Last edited by kcl1s on Thu Nov 21, 2019 12:03 pm, edited 1 time in total.

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

Re: Stitched Neopixels 2 in line but light as 1 - wiring?

by adafruit_support_bill on Thu Nov 21, 2019 11:58 am

Bill I believe he is using the Prop wing with pwr enable with d10.

Thanks Keith. That makes sense.

@todkkuykendall -
I tried alligator clipping the other IN/OUT connection (without clipping the thread) but the behavior always seems to be the same.

Exactly the same? When connected to the input of the second pixel, does the first one still light? That would indicate a connection between the IN and OUT pins on the first pixel.

adafruit_support_bill
 
Posts: 75299
Joined: Sat Feb 07, 2009 10:11 am

Re: Stitched Neopixels 2 in line but light as 1 - wiring?

by todkkuykendall on Thu Nov 21, 2019 11:58 am

I have reviewed my code and wiring and I believe it follows the learning guide:

Top Row
[]
Power (PWR) - This pin is used to enable power to the NeoPixels, audio amplifier and RGB LED. By default it is pulled low so you must set high to turn on the NeoPixels/Audio/RGB. Connected to D10 on Feather M0 or M4.


Does my wiring not match this instruction?
From the examples on the Propmaker page (below) this code indicates the POW pin is a digitally controlled switch to powering the various Propmaker elements.

#include <Adafruit_NeoPixel.h>
// NeoPixel strip length, in pixels
#define NUM_PIXELS 30

#if defined(__SAMD21G18A__) || defined(__AVR_ATmega32U4__)
#define NEOPIXEL_PIN 5
#define POWER_PIN 10
[]
// Set power pin to output
pinMode(POWER_PIN, OUTPUT);
// Disable the pin, we're not currently writing to the neopixels.
digitalWrite(POWER_PIN, LOW);
[]
digitalWrite(POWER_PIN, HIGH);
// write the pixel values
strip.show();
delay(wait);


I also hooked up the sewn Neopixels to my old Duemilanova board - just power, ground, control pin - and the lights appear to work in the same way with the simplest of lighting code.

Code: Select all | TOGGLE FULL SIZE
#include <Adafruit_NeoPixel.h>
 
// NeoPixel strip length, in pixels
#define NUM_PIXELS 2
 
#define NEOPIXEL_PIN 5
#define DEBUG 1

Adafruit_NeoPixel strip = Adafruit_NeoPixel(NUM_PIXELS, NEOPIXEL_PIN, NEO_GRB + NEO_KHZ800);

// the setup function runs once when you press reset or power the board
void setup() {
 if (DEBUG){
    Serial.begin(115200);
    while (!Serial) {
      ; // wait for serial port to connect. Needed for native USB port only
    }
    Serial.print("\nTest");
  }
  // Set power pin to output
 
  // This initializes the NeoPixel library.
  strip.begin();
}

// the loop function runs over and over again forever
void loop() {
 if (DEBUG){
    Serial.print("\nLoop");
  }
  strip.setPixelColor(0, 100, 0, 0);
  strip.setPixelColor(1, 0, 0, 100);
  strip.show();
  delay(500);
  strip.setPixelColor(0, 0, 0, 100);
  strip.setPixelColor(1, 100, 0, 0);
  strip.show();
  delay(500);
}


Thanks for the help,
=Tod

todkkuykendall
 
Posts: 10
Joined: Sat Nov 16, 2019 2:59 pm

Re: Stitched Neopixels 2 in line but light as 1 - wiring?

by todkkuykendall on Thu Nov 21, 2019 12:05 pm

Just to double check after I posted I attached 2 loose Neopixels to the Duemilanova with alligator clips and they lit independently as expected.
I moved the loose Neopixel set-up to the Propwing and they lit independently as expected as well.

Then I hooked up the sewn fabric and they blink together again as before. So the stitched Neopixels are the only common point of issue here.
At this point I think there has to be something wrong with the wiring or the controller on one of the Neopixels.

I'm going to have my wife stitch two more and test yet again. If there is any common wiring issues that could lead to this kind of pixel behavior I'd appreciate a heads up so I/we can avoid this in the future but at this point it seems to be an oddity so I'm going to forge ahead.

=Tod

todkkuykendall
 
Posts: 10
Joined: Sat Nov 16, 2019 2:59 pm

Re: Stitched Neopixels 2 in line but light as 1 - wiring?

by kcl1s on Thu Nov 21, 2019 12:09 pm

Again as Bill and I have said make sure there is no electrical connection between the in and out on the first pixel (pixel 0). With normal sewing this is a common practice to just keep using your thread.

Keith

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

Re: Stitched Neopixels 2 in line but light as 1 - wiring?

by todkkuykendall on Thu Nov 21, 2019 12:13 pm

Unfortunately I didn't see Keith's replies until after I did all my testing.

kcl1s wrote:Just to check the conductive signal thread is cut and does not continue under pixel 0 to the out tab.
Keith


Yep, she stitched the control circuit so it jumped the first control under the cloth in over to the control out and onto the second pixel which confused everything.

Great catch, Keith, I owe you a beer!
=Tod

todkkuykendall
 
Posts: 10
Joined: Sat Nov 16, 2019 2:59 pm

Re: Stitched Neopixels 2 in line but light as 1 - wiring?

by kcl1s on Thu Nov 21, 2019 12:50 pm

Great catch, Keith, I owe you a beer!
=Tod

"Cheers!" <CLINK> "Ahhhh... Thanks for sharing a tasty pint of micro-brew"

Keith

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

Please be positive and constructive with your questions and comments.