Wemos and addressable led strips

ey people!

I wanted to ask if there is anybody experimenting with Wemos and addressable led strips.

I would really like to use a Wemos D1 (https://www.wemos.cc/product/d1.html) to run a program based on neopixels library or fastled library, and instead of writing a pin, sending the information of this pin via wifi to several Wemos D1 mini (https://www.wemos.cc/product/d1-mini.html)

I havent yet done anything via wifi, so before getting into it wanted to ask if there is somebody with some knowledge from which I can grab myself.

:slight_smile:

My Beginner's guide to the ESP8266 should get you started.
Then just look for a Neopixel library that works with the ESP. Or if you want to get really fancy, you could use the I2S bus to drive the Neopixels, but that's going to be pretty hard for a complete beginner.

Pieter

thanks pieter!

I will start looking!

I've successfully used a WeMos D1 Mini with WS2812 addressable LED strips using the FastLED library:

I'm sure the NeoPixels library would also work fine.
I used a 74AHCT125 for shifting the 3.3 V logic of the ESP8266 up to the 5 V recommended for reliable operation of the WS2812. I put the recommended 470 Ohm resistor on the data line and 1000 uF capacitor on the power lines of the LED strip.

ey guys!

@PieterP

I2S looks like chinese to me. Nut I find your "Beginner's guide to the ESP8266" very helpful and I am going to check it out all with time.

@pert

-Could you guide me in how to connect a 74AHCT125 for this application? Would this do the job? link
-The 1000 uF capacitor goes between 5v and GND? What is its porpouse?

Thanks!

camilozk:
-Could you guide me in how to connect a 74AHCT125 for this application?

Refer to the pinout of the 74AHCT125 shown in the datasheet:
www.ti.com/lit/ds/symlink/sn74ahct125.pdf

1OE-5V 1OE-GND
1A-ESP8266 digital pin used to control the addressable LED strip
1Y-Data line of strip
2OE-GND 2OE-5V
2A-N/C*
2Y-N/C
GND-GND
3Y-N/C
3A-N/C
3OE-GND 3OE-5V
4Y-N/C
4A-N/C
4OE-GND 4OE-5V
Vcc-5V

*N/C=not connected

You can use any of the 4 channels that’s convenient, I just arbitrarily chose channel 1.

You will notice this is 4x the chip we actually need for controlling a single strip but it was recommended by Adafruit:

so I decided I’d just go with it. You may be able to find something cheaper and smaller that will do the job just as well.

camilozk:
Would this do the job? link

The items shown in the picture on that listing are not correct. You will see a listing of the available packages for the chip in the datasheet. It’s difficult to know whether the description of the listing or the photo is wrong. Safest approach is to find another listing that has a better chance of being right. You could also contact the seller about it, that could also save other buyers from confusion or disappointment. When a Chinese eBay seller does send the wrong item I’ve found they will usually want to give you a partial refund because they know it will cost more than the item is worth for the return shipping. That can be kind of cool if you end up getting a super good price for something you can use but it may also delay a project by months. I just ended up with a 5 MP Raspberry Pi camera for $4 after waiting 6 weeks for the 8 MP NoIR camera I ordered. Even though that’s a great price for the camera and I can use it for a different project, I really needed the other one.

camilozk:
-The 1000 uF capacitor goes between 5v and GND? What is its porpouse?

As you are blinking away with a whole strip of LEDs there are very significant changes in the current it’s drawing. A capacitor acts as a buffer to make it easier for your power supply to keep up with all this. Without it your strip might not work reliably. These things are different from a standard LED in that there is an IC built into each WS2812 that interprets the communication on the data line, passes it on to the next WS2812 on the strip, and generates the appropriate PWM signal for each of the color channels. Because of this they need a steady power supply.

thank you so much pert for this information!

I will check everything out in the next days.

pert:
Refer to the pinout of the 74AHCT125 shown in the datasheet:
www.ti.com/lit/ds/symlink/sn74ahct125.pdf

1OE-5V
1A-ESP8266 digital pin used to control the addressable LED strip
1Y-Data line of strip
2OE-GND
2A-N/C*
2Y-N/C
GND-GND
3Y-N/C
3A-N/C
3OE-GND
4Y-N/C
4A-N/C
4OE-GND
Vcc-5V

*N/C=not connected

You can use any of the 4 channels that's convenient, I just arbitrarily chose channel 1.

You will notice this is 4x the chip we actually need for controlling a single strip but it was recommended by Adafruit:
Best Practices | Adafruit NeoPixel Überguide | Adafruit Learning System
so I decided I'd just go with it. You may be able to find something cheaper and smaller that will do the job just as well.

I can see that they connected 1OE to ground (when you click the best practice link and open the wiring).
https://learn.adafruit.com/assets/64121
You said that you have to connect it to 5V. What is correct then?

I want to connect a D1 Mini do PL9823LEDs (similar to the strips). But as they behave strange I think I have to shift the logic level for the Data In from 3.3V from the Wemos to 5V for the LEDs.

From the datasheet:

Each output is disabled when the associated output-enable (OE) input is high. When OE is low, the respective
gate passes the data from the A input to its Y output.

So the diagram on the Adafruit site is correct. Good catch, thanks!

marcel151:
I want to connect a D1 Mini do PL9823LEDs (similar to the strips). But as they behave strange I think I have to shift the logic level for the Data In from 3.3V from the WeMOS to 5V for the LEDs.

True.

Use a 74HC04 - two of the inverters in cascade - to do the level conversion. Even better, a 74HCT14. Other chips could be used, but this is the most straightforward.

pert:
From the datasheet:So the diagram on the Adafruit site is correct. Good catch, thanks!

After two years. :smiley: Hope that someone didn't use this. But it will just don't work then.

Paul__B:
True.

Use a 74HC04 - two of the inverters in cascade - to do the level conversion. Even better, a 74HCT14. Other chips could be used, but this is the most straightforward. ;D

Just ordered the 74AHCT125 which is recommended on the Adafruit site, I think this one will do it's job too.

marcel151:
Just ordered the 74AHCT125 which is recommended on the Adafruit site, I think this one will do it's job too.

It will, but it is massive overkill, especially if it costs more. Ockham's engineering razor!

If it is just as cheap as a 74HCT14 it doesn't matter.