[SOLVED] WLED and LOLIN D1 Mini v4.0.0

I have installed WLED on my LOLIN D1 Mini v4.0.0 but I am having problems getting it to control my LED strip (WS2812). The LED strip works, I have connected it to a Arduino UNO and animated and changed colors of it but with the D1 Mini I just can’t seem to get it to work.

The LED strip and D1 Mini are sharing the same GND and 5V VCC and there’s a capacitor between them as I have seen in a lot of tutorials. There’s also the 330 Ohm resistor after the data output pin which is labeled 2 (the one that says LED in the documentation and should also correspond to GPIO 2).

The first 20 or so LEDs turn on when I connect the D1 Mini but the patterns, colors and animations are seemingly random.

Since the LED strip works this seems to be a settings issue. Could someone please point me in the direction? Or is it simply so that v4.0.0 of the D1 Mini is not supported (the homepage says that the latest version of the hardware is 3.1.0)?

D1 Mini pinout: LOLIN D1 mini — WEMOS documentation
LED strip: Luxorparts Adresserbar RGB LED-list - Arduino-tillbehör | Kjell.com

I would try removing the resistor.

Hi, I am having a similar issue tonight with my d1 mini controller. The symptoms are similar of those of yours with random lighting like if the led is having a stroke. I tried to diagnose the issue and I found that the voltage of the gpio 2(d4 pin, next to gnd) is very low, like 0.056v on multimeter and no current flow. My multimeter works as it correctly shows the voltage of the 5v pin on the d1 mini as 5v.

Strangely, pressing the reset button does yield the expected 3.3v and even more strangely when I turn off the d1 mini using the web controller, gpio 2 also outputs 3.3v. I did not have enough time to test further as I had to go somewhere.

I have 2 working d1 mini and both are outputting the very low voltage stated above and in the morning, the d1 mini controller was working and the ws2812 eco led lit up properly.

So far, I have tried erasing the data of the d1 mini and even flashing it with the stable version of wled rather and a beta release and version 1.14 or whatever was also not showing on my browser Chrome.

I have yet to try the other pin like the tx pin which I believe is gpio1 but I plan to try it as my homemade board on a perforated board has another terminal for data out for tx connected to logic level booster.

Also, the controller sometimes work like today in the morning, the gpio 2 for data output. Not sure if that information help but nevertheless it is some information.

You can’t use a multimeter to measure data signal. You would need an oscilloscope. What level shifter are you using?

-A pic of either of y’all’s setups could help here.


My board. The pin d4 and tx are connected to the level shifter which is connected to the 2 blue screw terminals. The potentiometer is connected to a gpio pin, not analog so it probably won’t work.

The expected output of the d4 pin after going through level shifter is 5v, the real output is nowhere close to this value.

I have no effect on the led strip. It should be orange and 30 led should light up.
I unfortunately can’t upload more than 1 media per post so I will send the picture of led in the next reply.


The led looks like this and except for the 4 white led, the other led are just changing color randomly in small intervals. Pressing the reset button on the d1 mini does weird things.

The level shifter I am using is “level converter MH”. It is the common one used in the wled toturial on YouTube. The gnd, 3.3v and 5v are connected properly with no short.

About the occulascope, I don’t have one but the voltage of the data pin should at least 3.3v as it is an esp8226 board but I get close to 0v. The led ws2812b eco I am using also needs the data to be within a range of 3.3 to 5.x volts or something and my output is nowhere close.

What are the manufacturer docs on that level shifter?
It looks suspiciously like the I2C type units that are known to be too slow to work well with addressable LED data streams. YouTube videos on very often a poor source for reliable information.

I would suggest something based on a 74AHCTxxx device.
You could even try without a shifter at all as long as you keep the ESP very close to the strip.
You might also try a different GPIO pin, make sure you configure WLED to match what you choose.

You can’t reliably use a multimeter to measure the data pin because even when the signal to LEDs is “Off”, that’s often just a data stream of a bunch of 0 brightness numbers. That’s NOT the sames as all 0 bits, there’s a bunch of other stuff in there. The net effect to your multimeter is that it’s too slow to respond to the difference between only a few 1’s or a whole bunch of them.

I have tried without level shifter with both d2 and tx pin with no luck

Just for fun, can you try GPIO16 (make sure you config WLED for that as well)?

Make sure you have a good common ground between the MCU data line and the strip as well.
BTW, how are you powering up the LEDs?
Your pics only show what looks like a single USB connection to the MCU, that’s not going to drive too many LEDs.

1 Like

I am using a 5v 20a industrial type power supply with like the screw terminals. I have to lower than 5v so leds degrade slower.

The d1 mini is powered by USB for convenience and simplicity. The data pin and led don’t have a common ground tho I can try that.

I do have another perforated board with the d1 mini being powered by the above mentioned 5v 20a psu and something shorted I guess as I saw smoke and after some times of using that perforated board, the d1 mini died so it will be a while before I try same psu for both the led and the d1 mini.

The level shifter is good for the job and I have seen it work so far.

You must have common DC grounds between the d1 mini, the LEDs and the LEDs power supply.

As divsys said, that level shifter is likely one of the I2C shifters that are not recommended.

-Your main issue right now is not having common ground.

Also make sure you are setting the same GPIO pin in WLED that you are using. You will need to look at the documentation for your board to determine what pins are what. Most commonly on the d1 mini’s the pin labeled d4 is GPIO2 (sometimes labeled in the docs as IO2). With an esp8266 it is best to use gpio 2 or gpio 1, and if needed gpio 3 if not using too many LEDs.

There is loads of quality information at: Getting Started - WLED Project

Alright I will try to do that soon.

Thank you.

By the way, why do they need a common ground? Not sure if it is relevant but it seems like an interesting topic.

Btw has there been any progress with the first issue posted by hrnick

If they don’t have a common ground then there is no way to know what voltage the LEDs will actually see when the MCU and/or level shifter puts out a “High” signal.

If the level shifter outputs a logic “1” as 5V on some output pin “A”, that’s measured relative to its power supply ground (0V).
When you connect that pin “A” to the input of the LEDs, there’s nothing that says the LED power supply ground is at the same level as the MCU (and level shifter) power supply ground. So the data in might be at some completely different level al together. Without a common ground there’s also no “return path” for the (very small) current required by the LED input.

That’s why grounds must be common, so both circuits can measure digital Highs and Lows from the same reference point.

It was as easy as that, that resistor was still there from my previous Arduino-setup but with the D1 Mini it should obviously not be used. Thank you for your help, it’s very much appreciated! :slightly_smiling_face:

1 Like

Common ground fixed everything

Thank you divsys. :slight_smile:

1 Like