Circuit Playground Express CPX and WS2812B Neopixels

Play with it! Please tell us which board you're using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
asktoby
 
Posts: 2
Joined: Wed Jan 30, 2019 6:59 am

Circuit Playground Express CPX and WS2812B Neopixels

Post by asktoby »

I'm having trouble with Adafruit Circuit Playground CPX and a string of WS2812B NeoPixels using the FastLED library.

Arduino IDE 1.8.8, Win10
FastLED version 3.2.1
LED chipset: WS2812B
Hardware: Adafruit Circuit Playground CPX

Full code is here: (but it is just the ColorPalette example provided with FastLED but with modified start values as below)
https://BANNED.com/GRNVBFyA

Code: Select all

#define LED_PIN     1
#define NUM_LEDS    15
#define LED_TYPE    WS2812B
The WS2812B strip is powered by a wall-wart PSU.
Pin A1 of the CPX is connected via a 330 Ohm resistor to the data pin of the strip.
I have a common ground between the CPX GND and the LED strip GND.
I have a 1000uF cap across the WS2812B's +5v and GND pins.

Illustration attached.

I've compiled and uploaded the code to the CPX.
When the CPX is powered by my PC's USB the first Neopixel on the CPX itself illuminates ORANGE (dunno why?), and none of the WS2812B illuminate.

When the CPX is powered by a battery pack the first Neopixel on the CPX itself illuminates ORANGE (dunno why?), and none of the WS2812B illuminate.

I've used a multimeter to confirm +5v across the strip at several points so it's definitely powered.

My questions would be:

[*]Why is one of my CPX on-board neopixels lighting up green or orange? I never asked for this!

[*]Why are none of the WS2812B strip neopixels lighting up? Someone suggested elsewhere that it may be because the CPX data pin is 3.3v and WS2812B expects 5v for data in. To that end I've ordered a TXB0104 (4-Bit Bidirectional Voltage-level Translator) from eBay. Does that sound correct?
Attachments
NeoPixel.JPG
NeoPixel.JPG (78.03 KiB) Viewed 147 times

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: Circuit Playground Express CPX and WS2812B Neopixels

Post by adafruit_support_mike »

For the sake of testing, drop back to the example sketches included with the fastLED library. Do those work?

Also, did you get the WS2812B strip from us? The ones we carry usually accept 3.3V data signals when running from a 5V supply. There are several other variants of the WS2812B in the wild though, and others are less flexible about the voltages.

User avatar
asktoby
 
Posts: 2
Joined: Wed Jan 30, 2019 6:59 am

Re: Circuit Playground Express CPX and WS2812B Neopixels

Post by asktoby »

The sketch I'm using is one of the examples. I've just modified the first few lines with the Pin number, number of LEDs, and LED type.

The WS2812B strip is not from Adafruit, it is this one from Amazon, which does show as needing 5v: https://www.amazon.co.uk/dp/BANNED/ ... cCbWFQCM4D (ALITOVE 5V Addressable WS2812B 5050 RGB LED Strip Light).
I guess it's less flexible about the voltages than your Adafruit strips.
Hopefully the TXB0104 I've ordered fixes things.

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: Circuit Playground Express CPX and WS2812B Neopixels

Post by adafruit_support_mike »

The TXB0104 might do the job, but could get flaky if there's too much cable between the microcontroller and the LED strip.

If you end up still having problems, try a 74AHCT125 like this one:

https://www.adafruit.com/product/1787

It uses 5V-TTL input voltages, which are exactly the same as 3V3-CMOS output voltages. Its output will be 0V and 5V, which should make the WS2182s happy.

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

Return to “Circuit Playground Classic, Circuit Playground Express, Circuit Playground Bluefruit”