I have been running WLED Toki on my ESP8266 D1 Mini clone for 9-10 months without any issues. I was trying to add UPD Sync via one of the SR firmwares (12.0). It didn’t work as expected because it doesnt have all the effects to sync with newer firmwares, so I reflashed it with Hoshi. Now the LED strip only lights up the first couple of LEDs and I need to add the 3.3K resistor between D4 and 3.3V. I tried to reflash to Toki and other firmwares, but regardless, now I need the resistor. Any ideas why I didn’t need the resistor before and now I do? I recall this same issue before when I was upgrading between the WLED firmware. All the sudden adding to add the resistors to the boards.
You should’ve used level shifter anyway.
You were just lucky that it worked before.
The length between my D1 Mini and first led is 50mm (2in), so I have been able to get away with not using level shifters. I have it mounted on my bike wheel and the leds run directly from it. Based on my limited research, I didn’t see the need to add a level shifter unless the length was a several feet due to voltage drop.
LED specifications call for 5V data line, ESP can only provide 3.3V.
If you are getting away without using one you are abusing input tolerances of LED strip. Regardless of wire length.
The other problem is (or better - are) strapping pin(s). For ESP8266 that includes GPIO2 (D4) which needs to be high at boot.
TTL High is anything above 2V. For very short lengths, six inches works for me, you can drive the Data-In on the WS2812. Longer wires adds voltage drop and your 3V3 data can go below 2V. I use WS28xx LEDS in lots of projects and I have never needed a level shifter.
Sometimes I use a sacrificial WS2812 on the controller board which acts as a level shifter since each WS2812 regenerates the data signal. In other words, only the first LED in the string needs to work with the 3V3 data signal from an ESP.
Note that WLED anticipates this when in the LED configuration you can ignore the first LED.
TTL High is commonly set at 2.4V and Low at 0.8V (depending on series/revisions/etc).
Unfortunately LEDs are not TTL devices and their specs commonly set High at VCC*0.7 or 3.5V for 5V supplies.
Voltage drop has nothing to do with data loss/corruption on longer wires as there is very little current required for the data signal. The problem comes from loss of the data “shape”, the sharp rise and fall of the data signal (and thereby it’s timing) gets mangled by capacitance/inductance over longer distances. Added to that, the 3.3V output of the ESP which is marginal for the LED in the first place. The addition of levelshifting raises the signal level so that distortion is not as big a factor. It will still distort over distance with a shifter, it’s just farther than without one. That’s why there’s long distance solutions like differential pairs.
Sacrificial pixels act as a “poor man’s” shifter and work in many cases, but long term reliability says: use the right tool for the job and follow mfg… spec.
The international standards bureau JEDEC (Joint Electron Device Engineering Council) created a 5 V logic standard which is illustrated in this document from Analog Devices.
Page 3, defines TTL High: “…this would be between 2 V and 5 V”
Driving a WS2812 from 3.3V logic would be out of spec The WS2812 spec for the minimum logic high is 0.7*Vdd, or 3.5V. In my experience, 3.3V has always been sufficient to drive the WS2812 data. I have a dozen displays running this way. Most recently using an ESP8266-01 just a few inches from the first LED. In my Xmas displays, the controller and power supply are in a waterproof box some 20 ft from the display itself. In these, the first LED is a sacrificial WS2812 in the box. It is not acting as a level shifter, it IS a level shifter. If the first WS2812 works, then its data-out is a 5V signal.
Problem is you are still relying on that first pixel to understand the 3.3v signal vs the 5v it was designed for. A true level shifter sends the 5v signal to that first pixel. There is no guessing ‘will my first pixel be ok with the 3.3v’ when using a true shifter.
@SteveMann if you claim that ESP output is adequate for LEDs take ESP electrical specifications and study it thoroughly. There is no guarantee that the output voltage will be above 2.4V as you say is TTL minimum “on” voltage.
I never said “guaranteed”. I did agree that this method of driving the WS2812 is just over the edge of the specs. I said that I have a dozen working projects that are fed data directly from an ESP chip (ESP8266-01 or Wemos D1 Mini). As long as the first LED is within a foot of the ESP, it has worked every time.
Even a foot may be enough for EMI to cause issues with 3.3V at input.
Back to my original question. Would not having a level loader put some type of stress on the board causing GPIO2 (D4) to no longer pull high when I updated to a new firmware? I understand new builds to put level shifters and not use GPIO2 without a resistor, but perplexed why it and several others worked find for so long without a resistor and now they need one.
The requirement for a PullUp resistor was likely there for some time.
You can get an idea of the potential issues with GPIOs from :ESP8266 Pins
You could try switching to a different GPIO (try GPIO4 or 5)
You may need to experiment with GPIOs and configurations. Unfortunatley the ESP8266’s are a little more limited than the ESP32’s.
ne way to tell is to switch to a different GPIO pin
Thanks. Yeah, I just added the resistor and was good to go. Again, just strange that I didn’t have the issue for almost a year and then all the sudden I had to add the resistor on the installation. I use a different GPIO on installs going forward.