Тёмный

3.3v ESP8266 driving 5v WS2811 / WS2812 without level shifters or voltage regs 

LED Head
Подписаться 132
Просмотров 28 тыс.
50% 1

Driving 5v WS2811 / WS2812 with 3.3v ESP8266 without level shifters or voltage regulators

Опубликовано:

 

4 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 55   
4 года назад
Actual science. Thorough explanation. Why on earth aren't you doing more videos mate?
@NickTheHunter
@NickTheHunter Месяц назад
A brilliant idea and an amazing video! Thank you very much, sir!
@darkman19693
@darkman19693 3 года назад
I would really like to see more videos like this. You have a good way of explaining things.
@ephemeral0101
@ephemeral0101 3 года назад
Thank you! I hope to be able to some time soon :)
@jmize
@jmize 6 лет назад
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.
@ephemeral0101
@ephemeral0101 6 лет назад
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).
@ephemeral0101
@ephemeral0101 3 года назад
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 :)
@cpuchip
@cpuchip 4 года назад
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!
@MatSmithLondon
@MatSmithLondon 4 года назад
Basic electronics - simple solution to a common problem. Thanks!
@n3xs
@n3xs 4 года назад
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.
@ephemeral0101
@ephemeral0101 4 года назад
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.
@zaqwsx28
@zaqwsx28 9 месяцев назад
Thank you! It worked perfectly with 1n4007 diodes! I also had to put a 4.3 K ohm resistor to signal line.
@NickTheHunter
@NickTheHunter Месяц назад
Why? Does not the input have very high resistance anyway?!
@Change001
@Change001 3 года назад
Yes.....More videos Please.👍
@UCanDo
@UCanDo 5 лет назад
Спасибо! Очень хорошая идея!
@starmc26
@starmc26 3 года назад
Though it works, I think looking at it with an O-scope is where you'll see the difference. The signal probably degrades under faster data changes.
@DaleSchultz-mixmox
@DaleSchultz-mixmox 7 месяцев назад
nice work! Thanks.
@tjwatts100
@tjwatts100 2 года назад
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).
@hulkgqnissanpatrol6121
@hulkgqnissanpatrol6121 4 месяца назад
Nice work 👍
@EnergeticWaves
@EnergeticWaves 3 года назад
I don't see a problem with your diagrams. better than mine.
@krugtech
@krugtech 3 года назад
that's some tricky stuff! float the whole esp!
@FrankE417
@FrankE417 3 года назад
The explanation helped me! Thank you!!
@VargaKen
@VargaKen 3 года назад
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!
@ephemeral0101
@ephemeral0101 3 года назад
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!
@tjwatts100
@tjwatts100 2 года назад
Great idea.
@ZillionPrey
@ZillionPrey 4 года назад
My strip is running of a ESP-01 happily without any modifications
@ephemeral0101
@ephemeral0101 4 года назад
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! :)
@ephemeral0101
@ephemeral0101 3 года назад
...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.
@felixpollan
@felixpollan 27 дней назад
what about using open drain with a pull-up resistor?
@stevenb654
@stevenb654 2 года назад
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?
@moar_nightsong
@moar_nightsong 3 года назад
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.
@salta199
@salta199 3 года назад
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
@michaeltooley4504
@michaeltooley4504 Год назад
Hey what capacitor would i need for this thanks
@joetwo6735
@joetwo6735 5 лет назад
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.
@ephemeral0101
@ephemeral0101 3 года назад
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.
@jamessmirniotopoulos2615
@jamessmirniotopoulos2615 5 лет назад
Very, very clever!
@ephemeral0101
@ephemeral0101 5 лет назад
Thanks!
@jamessmirniotopoulos2615
@jamessmirniotopoulos2615 5 лет назад
@@ephemeral0101 What is the pattern you are running? Is it just a Rainbow Cycle with rapid changes - or is it more complex?
@ephemeral0101
@ephemeral0101 3 года назад
@@jamessmirniotopoulos2615 Hi. It's a 'plasma' effect that I wrote.
@procactus9109
@procactus9109 6 лет назад
Well I wonder if I just been lucky, I have never had a problem with APA102 or WS2812B from any MCU. This does look like a better way though.
@ephemeral0101
@ephemeral0101 5 лет назад
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 :)
@valociraptor
@valociraptor 5 лет назад
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.
@matthewmaxwell-burton4549
@matthewmaxwell-burton4549 5 лет назад
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.
@valociraptor
@valociraptor 5 лет назад
@@matthewmaxwell-burton4549 Gotta try this as soon as Amazon send me back the strip, it has 1 pixel defected. I'll let you know, thanks.!
@Tarex_
@Tarex_ 5 лет назад
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
@ephemeral0101
@ephemeral0101 5 лет назад
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...
@MatSmithLondon
@MatSmithLondon 4 года назад
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.
@MrDenisJoshua
@MrDenisJoshua 5 лет назад
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
@ephemeral0101
@ephemeral0101 3 года назад
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! :)
@starmc26
@starmc26 3 года назад
You may need to change the number of LED's parameter in your code.
@revrsr
@revrsr 5 лет назад
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?
@matthewmaxwell-burton4549
@matthewmaxwell-burton4549 5 лет назад
0.7mV is a bit small. He's talking about 0.7 V drop, which is a typical voltage drop for a diode.
@revrsr
@revrsr 5 лет назад
@@matthewmaxwell-burton4549 sorry, typo error, 0.7V or 700mV
@ephemeral0101
@ephemeral0101 5 лет назад
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?
Далее
Are I2C Level Shifters Really Too Slow?
15:56
Просмотров 13 тыс.
ЭТО НАСТОЯЩАЯ МАГИЯ😬😬😬
00:19
这位大哥以后恐怕都不敢再插队了吧…
00:16
ESP8266 vs ESP32 with WLED
24:01
Просмотров 193 тыс.
WS2812B LED Strip with ESPHome and Home Assistant
11:56
FastLED Basics Episode 1 - Getting started
17:59
Просмотров 278 тыс.
Developing a high fidelity LED Magnet Matrix
15:26
Просмотров 143 тыс.
ЭТО НАСТОЯЩАЯ МАГИЯ😬😬😬
00:19