Similar to UKHeliBob, I am having trouble getting an Arduino 33 IoT to talk to NeoPixel LEDs (actually WS2811's) using FastLED. I have FastLED 3.4.0 installed in the IoT cloud and my LEDs work great using a 5V ATMega328P based Arduino. The LEDs do not work correctly when I substitute a level-shifter connected to a 5V buck converter and an Arduino 33 IoT. I know they have different processors but the FastLED library is supposed to work with ARM 32bit processors. Just wondering if anyone else has had luck getting an Arduino 33 IoT to work with FastLED. I'd stick with the ATmega Nano, but I really wanted to control the LEDs using the cloud dashboard and Alexa. Let me know if you have any ideas.
I gave up my attempts an moved on but I will give it another go when I find time and the components
I found the components very easily, much to my surprise, but no change from the last time I tried it with the same symptoms I am afraid
Thanks Bob. Do you feel the problem is in the FastLED library? I can get the LEDs to light but the error rate is high with wrong colors and some LEDs skipped. Very frustrating playing around with the components thinking you've done something wrong. If it weren't for your original post, I wouldn't have tried the ATmega386 Nano and known my wiring was fine. I'd still be quadruple checking everything, swapping components, etc. etc
Addressable LEDs need extremely precise timing to make them work which is where the problem arises I suspect. A search for FastLED problems with the 33 IOT returns a list of many people with problems using the 2 together with no definitive solution that I have found
Not really an answer, but I suspect there would not be this sort of problem when using the APA102 (AKA "DotStar") style of addressable LED because these don't have the timing requirements.
Arduino's MKR RGB Shield uses that style of LED.
Well, I got it to work. I'm not sure why, but the bi-directional logic level shifter I choose is not reliable. I noticed that when I removed the logic level shifter and simply directly plugged the nano's output to the LED data input I had better, but not perfect, results. Luckily there's a lot of other ways of converting the Nano 3.3V output to the LED 5V input. Next-hack.com has a good summary with pros and cons here. One of the suggestions was to use a TTL compatible device. I looked through my spare parts and found an old (circa 1988!) SN74LS04N bipolar inverter IC. I ran the Nano's output through two of the four inverters on the SN74LS04N with the final output going to the LED data input.
Works great now! My circuit is a bit unwieldy with three ICs (5V regulator, SN74LS04N and Nano) so I doubt I'll be able to cram it into the small waterproof box I ordered for this project.
What I have found is that, even though it's not in spec, if I power the WS2812 style LEDs at 3.3 V then I'm able to use the 3.3 V logic to control the LEDs. I don't have success with 3.3 V logic if I power the LEDs at 5 V. This is mentioned in Adafruit's NeoPixel guide:
But I have not done extensive experimentation with this setup. but only connected up a short strip and ran one of the FastLED example sketches.
The project where I did do a lot of work with WS2812-ish LEDs, a 3.3 V microcontroller, and the FastLED library was with an ESP8266. In this case, I used the 74AHCT125 level shifter Adafruit recommends, I didn't have any problems with the 22 pixel LED strip used in that project.
This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.