Huzzah + Neopixel stick

General project help for Adafruit customers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
Strex
 
Posts: 16
Joined: Fri Nov 20, 2015 6:20 pm

Huzzah + Neopixel stick

Post by Strex »

I’m working on a project to make a wirelessly controlled nightlight using a huzzah (ESP8266) and a neopixel stick (8 neopixels) but running into some issues.

For whatever reason I cannot get the neopixel stick to light up at all. I’ve tried 3x different huzzah’s and 2x different neopixel sticks, still nothing.

For software I’m using ESPhome, which I’m fully aware is not supported by Adafruit. Though it supports the huzzah’s & neopixels.

So, generally speaking, should a huzzah be able to control a neopixel stick?

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

Re: Huzzah + Neopixel stick

Post by dastels »


User avatar
Strex
 
Posts: 16
Joined: Fri Nov 20, 2015 6:20 pm

Re: Huzzah + Neopixel stick

Post by Strex »

Thank you, I was actually wondering if it would work with the original Huzzah: https://learn.adafruit.com/adafruit-huz ... 6-breakout

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

Re: Huzzah + Neopixel stick

Post by dastels »

I don't see why not.

Dave

User avatar
Strex
 
Posts: 16
Joined: Fri Nov 20, 2015 6:20 pm

Re: Huzzah + Neopixel stick

Post by Strex »

Are you aware what order the LEDs are in, for instance: GRBW
Also any idea what chipset variant the sticks might be using? Like, WS2812

Thanks!

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

Re: Huzzah + Neopixel stick

Post by dastels »

No & no. It depends on what you happen to get.

You might have to tweak the order parameter, but there shouldn't be any problems.

Dave

User avatar
Strex
 
Posts: 16
Joined: Fri Nov 20, 2015 6:20 pm

Re: Huzzah + Neopixel stick

Post by Strex »

… if I didn’t have any problems I wouldn’t be asking for help.

I’ve tried just about every variation of GRB I can find, and should the W always be at the end?

I’ve also tried about 12 different variations of the known chipsets, none of which do anything.

If this is a product Adafruit manufacturers wouldn’t they know what chipset or sequence is used?

Maybe there’s a list of led order and chipset combinations that are known to work?

I’m quite confused; I’m not sure why Adafruit wouldn’t know what components are in their products!?

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

Re: Huzzah + Neopixel stick

Post by dastels »

No, the W isn't always at the end. From the code:

Code: Select all

// RGB NeoPixel permutations; white and red offsets are always same
// Offset:         W        R        G        B
#define NEO_RGB ((0 << 6) | (0 << 4) | (1 << 2) | (2)) ///< Transmit as R,G,B
#define NEO_RBG ((0 << 6) | (0 << 4) | (2 << 2) | (1)) ///< Transmit as R,B,G
#define NEO_GRB ((1 << 6) | (1 << 4) | (0 << 2) | (2)) ///< Transmit as G,R,B
#define NEO_GBR ((2 << 6) | (2 << 4) | (0 << 2) | (1)) ///< Transmit as G,B,R
#define NEO_BRG ((1 << 6) | (1 << 4) | (2 << 2) | (0)) ///< Transmit as B,R,G
#define NEO_BGR ((2 << 6) | (2 << 4) | (1 << 2) | (0)) ///< Transmit as B,G,R

// RGBW NeoPixel permutations; all 4 offsets are distinct
// Offset:         W          R          G          B
#define NEO_WRGB ((0 << 6) | (1 << 4) | (2 << 2) | (3)) ///< Transmit as W,R,G,B
#define NEO_WRBG ((0 << 6) | (1 << 4) | (3 << 2) | (2)) ///< Transmit as W,R,B,G
#define NEO_WGRB ((0 << 6) | (2 << 4) | (1 << 2) | (3)) ///< Transmit as W,G,R,B
#define NEO_WGBR ((0 << 6) | (3 << 4) | (1 << 2) | (2)) ///< Transmit as W,G,B,R
#define NEO_WBRG ((0 << 6) | (2 << 4) | (3 << 2) | (1)) ///< Transmit as W,B,R,G
#define NEO_WBGR ((0 << 6) | (3 << 4) | (2 << 2) | (1)) ///< Transmit as W,B,G,R

#define NEO_RWGB ((1 << 6) | (0 << 4) | (2 << 2) | (3)) ///< Transmit as R,W,G,B
#define NEO_RWBG ((1 << 6) | (0 << 4) | (3 << 2) | (2)) ///< Transmit as R,W,B,G
#define NEO_RGWB ((2 << 6) | (0 << 4) | (1 << 2) | (3)) ///< Transmit as R,G,W,B
#define NEO_RGBW ((3 << 6) | (0 << 4) | (1 << 2) | (2)) ///< Transmit as R,G,B,W
#define NEO_RBWG ((2 << 6) | (0 << 4) | (3 << 2) | (1)) ///< Transmit as R,B,W,G
#define NEO_RBGW ((3 << 6) | (0 << 4) | (2 << 2) | (1)) ///< Transmit as R,B,G,W

#define NEO_GWRB ((1 << 6) | (2 << 4) | (0 << 2) | (3)) ///< Transmit as G,W,R,B
#define NEO_GWBR ((1 << 6) | (3 << 4) | (0 << 2) | (2)) ///< Transmit as G,W,B,R
#define NEO_GRWB ((2 << 6) | (1 << 4) | (0 << 2) | (3)) ///< Transmit as G,R,W,B
#define NEO_GRBW ((3 << 6) | (1 << 4) | (0 << 2) | (2)) ///< Transmit as G,R,B,W
#define NEO_GBWR ((2 << 6) | (3 << 4) | (0 << 2) | (1)) ///< Transmit as G,B,W,R
#define NEO_GBRW ((3 << 6) | (2 << 4) | (0 << 2) | (1)) ///< Transmit as G,B,R,W

#define NEO_BWRG ((1 << 6) | (2 << 4) | (3 << 2) | (0)) ///< Transmit as B,W,R,G
#define NEO_BWGR ((1 << 6) | (3 << 4) | (2 << 2) | (0)) ///< Transmit as B,W,G,R
#define NEO_BRWG ((2 << 6) | (1 << 4) | (3 << 2) | (0)) ///< Transmit as B,R,W,G
#define NEO_BRGW ((3 << 6) | (1 << 4) | (2 << 2) | (0)) ///< Transmit as B,R,G,W
#define NEO_BGWR ((2 << 6) | (3 << 4) | (1 << 2) | (0)) ///< Transmit as B,G,W,R
#define NEO_BGRW ((3 << 6) | (2 << 4) | (1 << 2) | (0)) ///< Transmit as B,G,R,W
I don't see that you actually said, but do you have RGB or RGBW pixels?

The actual parts have changed over time as I understand it.

Let's step back. How is the stick connected? i.e. What are the three wires connected to? Are the solder connection secure/good?

Dave

User avatar
Strex
 
Posts: 16
Joined: Fri Nov 20, 2015 6:20 pm

Re: Huzzah + Neopixel stick

Post by Strex »

Thanks for helping, just a little frustrated by all this.

These are the exact products I have.
Neopixel Stick: https://www.adafruit.com/product/2869
Huzzah: https://www.adafruit.com/product/2471

Current pinout:
Neopixel - Huzzah
GND -> GND
5VDC -> V+
DIN -> 12

I'm also using this: https://www.adafruit.com/product/1833 (to power everything)
USB - Huzzah
GND -> GND
5V -> V+

With everything plugged in, I just verified the stick is receiving 5.2V across GND + 5VDC. Also verified continuity between DIN (on the stick) + 12 (on the Huzzah)

So from what I can tell the Huzzah, and the stick are both getting power. Pin 12 on the Huzzah is also connected to DIN on the stick.

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

Re: Huzzah + Neopixel stick

Post by dastels »

OK, you're powering the stick with 5.2v which is higher than spec but should be ok. The ESP is a 3.3v device so the GPIO is 3.3v logic levels. There is often a problem using a 3.3v signal to drive pixels powered by 5v (5.2v will be more prone to problems). The quickest way to see if this is a problem is to power the stick with the 3.3v output, just keep the color values low to limit the current usage.

If you need more power (you have ~250mA available from the 3.3v output) you can go back to the 5v input and use a level shifter on the data line. See https://learn.adafruit.com/neopixel-levelshifter.

Dave

User avatar
Strex
 
Posts: 16
Joined: Fri Nov 20, 2015 6:20 pm

Re: Huzzah + Neopixel stick

Post by Strex »

Ah, ok, your explanation makes total sense! Thank you.

I've tried connecting the neopixel to the 3.3v pin on the Huzzah, and verified with a multimeter that the neopixels are now getting 3.3v. Kept everything else the same, and still having the same problem. No control over the neopixels at all.

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

Re: Huzzah + Neopixel stick

Post by dastels »

I think it's time to have a look at your code.

Dave

User avatar
Strex
 
Posts: 16
Joined: Fri Nov 20, 2015 6:20 pm

Re: Huzzah + Neopixel stick

Post by Strex »

Just to eliminate a few things here, I did the following:

Connected a huzzah32 (https://www.adafruit.com/product/3405) up to a breadboard.

Wired the Huzzah32 -> Neopixel strip as follows
GND -> GND
USB -> 5VDC
12 -> DIN

Then plugged the Huzzah32 into my mac, and installed the latest version of WLED (2212222).

Verifed the neopixel strip is getting 5V from USB, verified GND to GND, verified 12 to DIN, as well as 5V & GND on the strip with a multimeter. All connections are good, as well as power.

In WLED I set the outputs to SK6812 RGBW, set the order to GRB, pin to 12, length I've tried 8 & 13 (13 was referenced here: https://learn.adafruit.com/assets/31883). Also reduced the max brightness to 80, just in case.

Still... the strip does not turn on, no matter what I do in the WLED UI.
Even tried changing the chipset to WS281x, still nothing..

Yet, apparently this 25 lines of code will make the strip work? (https://learn.adafruit.com/assets/31883)

Does this strip ONLY work with the Adafruit_NeoPixel libarary, and nothing else? None of this makes any sense..

User avatar
Strex
 
Posts: 16
Joined: Fri Nov 20, 2015 6:20 pm

Re: Huzzah + Neopixel stick

Post by Strex »

Been 3 weeks, still trying to get my question answered.

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

Re: Huzzah + Neopixel stick

Post by dastels »

I'm still waiting to see your code.

Yes, that 25 line bit of code will light up the strip, one pixel at a time. As long as the strip constructor arguments match your hardware.

The strip will work with any NeoPixel driver code. The data signal and it's timing is has very high tolerances, so it has to be done right.

Dave

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

Return to “General Project help”