Dear Members,
I discovered FastLED a few month ago and have successfully played with a 5 meters 300 Leds strip (WS2812b) connected to a UNO.
Now, I would like to replace the UNO with a huzzah (esp8266). I thought it would be straightforward, but it doesn’t want to light at all !
The code compiles with no problem in the arduino ide and is succesfully uploaded to the huzzah.
the setup is :
FastLED.addLeds<WS2812B,14,GRB>(leds, 10)
the loop is only leds[0]=CRGB::White; FastLED.show();
The wiring is simple :
external 5V PSU connected to 5V and GND of the strip
GPIO14 goes to the strip DATA Line with a 470 resistor in between
GND of the huzzah also goes to GND of the strip.
for now the huzzah is powered by the computer through its micro usb port.
I can measure 1V in the data line with my basic voltmeter (just to check that the right GPIO is used)
Is there something evident I am missing ?
Try a 100ohm resistor, or no resistor. The controller is only 3.3v not 5v like the Uno. You may even need a level shifter.
I already tried to remove the resistor with no success. I thought ws2812b should work at 3.3v.
Other than that, the setup I described is correct ?
Is it what I need ?
5x 4-channel Bi-Directionnel Logique Niveau Shifter Convertisseur 3.3 V 5 V pour Arduino TE291
http://s.aliexpress.com/MZFZVr6b
(from AliExpress Android)
@Jean-Baptiste_ROBERT the ws2812 doesn’t always work with 3.3V. It’s always best to use a level shifter like 74HCT245N. Alternatively you can use a single ws2812 led to level shift for you - see http://hackaday.com/2017/01/20/cheating-at-5v-ws2812-control-to-use-a-3-3v-data-line/
@Jean-Baptiste_ROBERT the ones you linked won’t work. They’re too slow.
The ESP8266 also seems to drive LEDs better with some pins than others. GPIO14 is normally okay, but have you tried any others? See this post https://plus.google.com/+HarmvanVugt/posts/XfHYQF2PjoF
@Jeremy_Spencer Ok, Thanks, I wil try GPIO12
Also look at how he’s defined the pin
@Dushyant_Ahuja Thanks for the link. It states that the high level is triggered when v > 0.7*vcc
So I checked my Vcc. It was 5.2V. I have been able to lower it to 4.9 and suddenly, all is working just fine (without the resistor).
Thanks every one for your help !
Anyway, I would like to try the spare led. Sorry to ask, but what is a diode ? I imagine there is plenty of different ones. What excatly should I use / buy ?
Look out for 1N40001 - it’s one of the common diodes. In this case what it does is drop the voltage to the first LED by 0.7 volts so that it considers 3.3 V as high.
I have some spare 1N4007. Can it do the job ?