Interesting. I'll have to try this myself. Generally, all of my ESP-Neopixel projects involve a long line from the ESP to the first pixel so using the little TC4427 FET driver helps drive those wires to the first pixel. After the first pixel, the signal is regenerated anyway. Also: Using actual science to talk about something on RU-vid is something of a rarity, so thanks! PS: Looking forward to more videos.
Thanks! I've managed to drive really quite long lines directly from the ESP with this technique as well. Another option is place a single LED 'close' to the ESP, and then use that to drive the long line (this fixed a problem for me when using a Teensy & OctoWS2811).
Also - another aspect of this that I don't explain very clearly - using a couple of diodes on the power lines _also_ lets you drive a 3.3v MCU from the LED's 5v supply line - no extra PSU or converters needed :)
I love the fact that you used relative ground levels of potential to work for you. I learned about this is my basic electronics classes, but this is the first real world example I've seen. Excellent video and explanation thanks!
Nice Video! Just wanted to clarify, "Hysteresis is the dependence of the state of a system on its history." It is not simply the range between low and high voltages.
Thanks for watching the video & taking the time to make a comment :) You're absolutely right - the correct term that I should have been using is "hysteresis gap", not just "hysteresis". Thanks for pointing that out. For those readers who are curious to learn more, in the context of Schmitt triggers (which is typically how digital inputs (ie on the WS chip) are implemented) - the behaviour of having 'high' & 'low' thresholds, and only changing state when input voltage crosses the opposite threshold to that just crossed, (ie the trigger 'remembers' its current state until the opposite threshold is crossed) is called "hysteresis". The difference between the thresholds is the "hysteresis gap". Read more at en.wikipedia.org/wiki/Schmitt_trigger.
I just tried this. My preferred device, the Firebeetle ESP32, has a LDO regulator that drops 0.53V at a max. So I found it was quite happy with one 1N4001 on the ground side and 5V delivered to the VCC pin, where it was regulated down to 3.3V. My 1N4001 dropped 0.8V so the logic high was slightly out of spec (3.44V by the book vs the WS2811's requirement for 5.5V) but as you said, it's likely the GPIO probably put out a little more than the absolute minimum. Cool thing was, it worked better than a 74HTC125 that I'd tried first, which was being very ill behaved (lots of random glitches).
That's a great idea! You're selling yourself short though. This addresses not just the potential signaling problem, but lets you power both devices from the single 5V too! I'm an electronics newbie, so can't say I follow 100% of the details in the video, but nearly so. (That's on me, not you--this was presented very well). Two questions for you if you'd be so kind: 1) I got the impression from what you said that the capacitor might not be necessary, but you put it in there anyway--is it really needed and if so, why, and recommendations for specs? 2) Remember, newbie here--what is the D1 mini providing that you're using that a nearly bare esp8266 module couldn't provide? I guess what I'm asking is, assuming you've already programmed something like a ESP-WROOM-02 module (e.g., just the black pcb part of your d1 mini), could you just wire things up as shown directly to the module or would you need extra things/components that the D1 mini is providing? Thanks!
Hi Ken, thanks for the comments! You're right, though - I didn't make it clear enough that this technique is used for two reasons (both level shifting the data line _and_ providing supply voltage to the 3.3v part). To answer your questions: 1) The cap is not strictly necessary (unless you have a noisy PSU). Everything worked fine without - I just put it there as I kept on either disrupting the LED string or crashing the ESP due to all my prodding and poking with multimeter & CRO when I was making the video. I just grabbed whatever I had on hand (I think it was a 100uF 16v electrolytic). You may have to implement more/less/different depending on what MCU you're using & what supply decoupling it already has. 2) A bare ESP will do fine here (though will probably need some caps on supply lines to keep it stable). I just used the D1 as, again, it's what I had on hand (notice, I used the 3.3v supply pin on the board instead of the 5v supply (which has a 3.3v LDO linear voltage reg on it) in order to demonstrate diodes dropping 5v supply down to (close enough to) 3.3v in order to power the ESP). Good luck with your project!
Cool. Successfully driving WS LED strips directly seems to depend on several factors, including manufacturer (some LED chipsets seem to be more forgiving than others), cable lengths & impedance, power supply, and software doing the actual signalling (seems to be timing related as well). YMMV as they say :). If you're one of the unlucky ones however, then this trivially simple method to bring your signalling closer to spec as well as providing a power supply rail for your 3.3v mcu is worth a try! :)
...plus also, by putting diodes on the power lines, this method lets you drive 3.3v MCU from the LED's 5v supply without requiring an additional PSU, regulator, converter, etc.
I understand you used the 3.3v input rather than the 5v input on the wemos d1 for illustration purposes, but is it in fact beneficial to do what you did in "real life", in order to shift the logic levels upwards?
OMG I have actually been looking for video like this! I have a problem with my NodeMCU Esp8266 when it comes to driving Neopixel LEDs and I think this might be solution for it. Could you please give me name/values of all of the components used in this video so I can replicate it? Also, I really loved your explanation, it definitely cleared some questions that I had.
hello beautiful video. I wanted to ask you for help because I am desperate I have more than 200 euros of LED pixels that I cannot use. I'll explain, if I connect the very long data wire about 6 meters, the LEDs flashing abnormally, reading here and there is a problem with the ESP. how did you solve this problem? because from the video I don't understand why I don't speak your language. You need a level shifter module. can you solve my problem? thanks a lot
I have a 12V ws2811 strand that is suffering from horrible flickering. Would there be any different parts I should purchase for 12V (vs 5v)? Hoping to give this a go to resolve my issues.
How long is the string of LEDs? The data line should still be 5v. Make sure you have a common ground between the MCU and LEDs (with diode on the negative line to give the MCU the right offset), make sure you're giving the MCU the right supply voltage, and make sure the 12v power supply is sufficient for the number of LEDs. What happens if you reduce the length of the LED string to, say, 20 or 30. Does the flickering go away? If so, probably power.
Yeah, seems to be luck of the draw -- but keep in mind that this technique is being used to _both_ drop supply voltage from 5v sufficiently to power the ESP _and_ offset the signal. Two birds with one very cheap & simple stone :)
Great solution, but what about WS2813 strips? I'm driving directly from NodeMcu Esp8266MOD board. Connecting V+ and GND from both ends, sharing GND with NodeMcu and only B0 as DATA input. However connecting D0 has the same result.....Erratic leds powering on. Using McLighting library and declaring strip as WS2811.
Sounds like you are connecting the setup without the diodes ? The data signal will have no offset and won't fall into the parameters that the ws.. require.
The NodeMCU V3 only has 3.3v.. but on your Wemos there is a 5V pin.. on the bottom left, does it mean it actually has 5V? i am sure you only used it for demo purposes for the 3.3v which was cool to see, i am looking for an arduino nano alternative with remote control because of size restrictions on the project to get rid of a display and rotary encoder
Yes indeed, the Wemos board has a 5v input with a linear regulator to take it down to the required 3.3v for the ESP. The whole point of the demo, however, was to show a 3.3v device driving the WS2811 strip - which would normally require level shifters for data and a voltage reg for power - without those elements, just using diodes instead. Hence I'm using the 3.3v input...
Of course, Wemos has 5V input. Defeats the object of bringing the Wemos 3.3v input high relative to the 5V driving the LED strip though doesn’t it? Which is the whole point of this video.
Thanks for this great idea. I buy 6 boards with 8X8 LEDs and I found that on every board work only first few LEDs For example one of the board that I have now on table work only first 39 LEDs and the other until 64 is not work. So I try to see if with this great idea using 2 rectifier diodes will work... but it stop at same LED :-( Have an idea why all this please ? I use NodeMcu, but I also try using Arduino Mega(same error) and I use FastLed (but I also try the NoePixel) Thanks a lot
Hi, if it works for the first LED, then it should work for all subsequent LEDs (as each one regenerates the signal for the next). This 'trick' is not applicable in your case. At a guess, you have either got faulty boards, or insufficient power supply, or a software problem. Things to try: * Check to see if power & data lines are properly connected from one end to another. * Try injecting your data signal further down in the chain of LEDs. If less LEDs now light up, then it's probably a hardware issue. If the same number of LEDs light up, but now go further down the string, then it's probably a software issue or power issue. * If you see exactly the same issue for the same software/NodeMCU and multiple boards, then it is probably software & not faulty boards. * Try also running all the LEDS at, say, 15% brightness & only one colour. If more LEDs light up, then you're not providing them with enough power. *Otherwise, I'd say you have a software issue. Good luck! :)
I did it, but I havce some errores and seems it is not running smoothly. I confirmed the .7mV offset exists on the Data using an scope. I ma observing a kind of peeks noise, I am using an electrolitic cap 100uF. Any idea?
If you're driving data directly from digital output, then I would expect an exceptionally clean signal -- not sure where you're seeing the noise? Have you tried checking the power rails to make sure they're clean?