I'm having trouble with Adafruit Circuit Playground CPX and WS2812B using FastLED.

fastled-support
gplus
(Toby Newman) #1

I’m having trouble with Adafruit Circuit Playground CPX and WS2812B using FastLED.

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’s just the ColorPalette example provided with FastLED but with modified start values as below)
https://pastebin.com/GRNVBFyA #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.

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.

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?

https://pastebin.com/GRNVBFyA

(Jeremy Spencer) #2

I’ve never used that board but it looks like it uses 3.3v logic, so the data pin will be 3.3v.

It may work without the resistor, you may need a level shifter to get your data to 5v.

(Toby Newman) #3

Yeah I think you’re right, makes sense. I’ve ordered one of these: TXB0104 https://ebay.us/v5r2bP I’ll follow up when it arrives from China in two months!

(Marc Miller) #4

@Toby_Newman Be aware that some level shifters are not fast enough. The one you picked might be fine, I did not try to look up it’s specs. If for some reason it doesn’t work the level shifters often recommended here are SN74HCT245N or the SN74HCT125N.

https://www.mouser.com/ProductDetail/Texas-Instruments/SN74HCT245N?qs=sGAEpiMZZMs9F6aVvY09bhKM8pCNgAvYDjaq/b7214g%3D

https://www.mouser.com/ProductDetail/Texas-Instruments/SN74HCT125N?qs=sGAEpiMZZMuiiWkaIwCK2YBcf8bvyFlOWmlPy37C3SQ%3D

Wiring for the 245N would be like this:

(Toby Newman) #5

Just to keep things together I’m uploading a sketch of the circuit. Nothing further to report at this time.
missing/deleted image from Google+