I do use a 0.7V drop diode in the neopixel vcc line. This shifts the neopixel input range enough to be 3.3V compatible. Never tried it but you could use "open drain" on the ESP output pin and R it up to 5V.
Another excellent video. Thanks Ralph. For the PCB/final project, I'd encourage you to avoid the complexity and size of the level shifting module and just use a MOSFET, since you're only shifting the one data pin.
I'm actually going to use 3 independent channels (and even tasks) for my 3 NeoPixel rings, Andrew, to reduce coding complexity so a smaller 4-channel Level Shifter I have will do the job. For a single channel, yes, a single MOSFET would do the trick in a more compact way.
I've seen this 'resistor' question asked many times before. Just lookup 'neopixel resistor waveform' and look at the waveform images that are shown with an oscilloscope. You'll see that without the resistor there is 'ringing' in the signal. The resistor cleans it up.
A few years ago I built a little gizmo with an Arduino pro-mini and a couple of NeoPixel circles, powered directly from a li-ion cell. It works quite happily down to about 3V.
Someone mentioned to look at WLED. That is the definitive pixel software. I drive 512 pixels with an ESP32. Also look at Tasmota and ESPHome. As others mentioned, don't try to drive all of your pixels from the microcontroller run a separate 5V line to power the pixels in parallel to the ESP32. Be sure to have a common ground. If you first pixel is physically close (i. e., short data wire) to the microcontroller, you likely won't need a level shifter.
Before Christmas I bought a batch of 100 neopixels each on their own board to play with, and make some decorative lights with. I have played with them a bit, but I went the other direction, I'm using an arduino Nano, and hope to port the code to an ATTINY85 for the final design, if I can slim the code down enough. I have been using the FastLED library, but I might look at the Adafruit one just in case it works better on the smaller chip. I've not had much time to play with it lately, but maybe your video ill spur me with getting on with it! There are various different makes of Neopixels devices, and some seem to be more sensitive to voltage levels than others, which is probably why some people are saying they are driving their neopixels from an ESP32 with no trouble. On other forums I've seen comments that seem to confirm this. In any case, getting the voltage levels right is good practice, even if sometimes you might get away with using 3.3v signals. I would imagine it would affect the noise immunity of what is, after all, a fairly high data rate signal.
The FastLED is quite a large library (especially if you hope to use it on a Tiny85) but Makuna's NeoPixel library is apparently smaller with all the same features. github.com/Makuna/NeoPixelBus
I run dozens of ESP8266 and ESP32 modules driving WS2812 strands and not one of them use a level shift or series resistor and they all work good. I have, however, used some neopixel libraries that give the very same effect you have (and those libraries work fine on arduino units) which tends to suggest the code rather than the hardware Try chucking WLED on one of the modules as a test, bet you it will work A1 without the level shifter
I to have no problem running ws2812b on either esp32 or 8266 with 3.3v dataline and 5 v power supply to the neo pixels strip. I mostly use fastled library, seams that fastled allways works best. Had some problems with adafruit library to work.
Good one mate love you're channel... I've for many many years now used a 74HCT245 octal buffer chip in all my multi channel ws2811/12b setups that use esp8266/32 they're ..ehem as cheap as chips.. sorry... And very fast ( they easily cope with the data rate of any type of argb LEDs), giving up to 8 channels of 'level' shifting plus on long data runs a 100ohm resistor in the data line ( as close to the MCU as possible) and a 1000uf 16v cap on the supply line. I have also used the 1 sacrificial ws2812b led trick which works well and acts as a 1 channel 'level shifter' Some esp boards work with out level shifters ...but to be sure the level shifter is a must if you're going for repeatability across many suppliers of esp boards. Basically the data signal has to >=80% of the supply voltage for ws2812b obviously not exceeding 5v
I have played with ESP32 and Neopixels some time back and did not have any problems with voltage, but if I had made a PCB it would have included a HCT chip as a voltage converter. I was mostly looking on longer strings (a couple of meters), there the problem is keeping the voltage high enough all the way, especially as I wanted a RGBW type leds. I have later seen that there are 12V Neopixels (only RGB), they run the 3 leds in series in each pixel, i.e. 1/3 the current and less issues with voltage You can also get "Neopixels" with two control wires, i.e. a data and a clock, they are much less critical in timing. Another type of two data wires is main data and backup date, that will continue to work if a pixel dies.
Hi Ralph I know your video is about 2 years old but you can update it with another new problem, if you connect a strand of neopixels to an ESP32 and use the Adafruit library it will work up to 70 LEDs but after 80 LEDs the ESP32 will crash at boot. you don't even need the LEDs connected, the problem is not the Adafruit Library but is the Ver 3.x of the board configuration.
Sigh. I see that Adafruit has a whole web page (or more) on how to get round various problems like this. Is it their software or a limitation of the hardware solution?
Hi Ralph, not sure why you had a problem, but I’ve been using Esp32 with neopixel strips and not had a problem triggering them with 3.3v. I followed Dave’s Garage UA-cam videos. Don’t know if I can show you what I’ve done but it’s similar to what Dave has done if you want to take a look. I’m not sure he adheres strictly to guidelines but it works 👍🏾🤓
Something to keep in mind is that large capacitors are not permitted on USB power lines, or when you plug the device into a hub, other devices will fall off of it. You're supposed to only have 10uF on there, up to 47uF are usually kinda tolerable if we ignore the spec hard enough. 470uF are not even close to tolerable, unless you have strict current limiting upstream of the capacitor. Or at least an inductor. As to a level shifter, a single transistor one should do it. Bss136 or 2n7002 is classic for such use.
Hmm. We all know that standards are great; there are so many to choose from 😲 As it happens on this circuit, the NeoPixel is being driven by a (logically) separate 5v supply, like a phone charger. Which I don't think is going to care about large capacitors. In the demo, I do connect the 5v from the incoming "USB" to the NeoPixels, that is true; but in the finished product it will be a phone charger-type wall-wart so it will be fine. He said. 🤞🏻
@@RalphBacon I haven't used WLED myself however I think I have the WLED implementation already installed on my Raspberry Pi, doesn't really matter because I can install it in a couple of seconds or so anyway. So I've been close to use WLED a couple times in the past but then I figured Fastled is the way to go for me because it's by far the easiest to understand and I found Fastled for my projects the most compatible with my hardware and Fastled supports integration with third-party software way better than the Adafruit Neopixel option. I would be very interested to see you struggle with WLED before I give it a try myself, I know there will come some little things that are very important to get it right, weird stuff, quirks that you don't think of right away and you normally share all that so I'm curious what I can learn from your mistakes. When are you going to give WLED a go and share that here on UA-cam?
Hi Ralph, to avoid any problems I always power my Neo's with a separate 5v supply anyway so thats no problem and I can't say I have ever had a problem with a 3.3v level for data either but it's good to see you have them going and nowadays the interwebs are saturated with projects for reference so no prob's there. Well, regarding your bin project I think it's time you put a lid on it !! Hahahah, I hope I'm the first in there ! lol...with the joke I mean Oh Hehehehe !!!!......stop me please !.........cheers.
I have no problem driving ws2812b's with the 3v3 signal from a esp8266, plus I don't use the arduino or fastLED libraries, just as easy to do it normal code. It could be that neopixles you have are closer to the Data sheet spec's than most others. I had a problem with fastled corrupting the first 24 bits of data on the esp8266, so the first led would not light.
I didn't have any issues with ws2812b strips/matrices either with various ESP32 modules. Ok, with Dave Plummer's night driver project, I did get some anomalies with LEDs in the strip I wasn't using, but generally wasn't a problem. Definitely did not have an issue with his tutorial series before Night Driver.
I have wanted to try different flash rates on different pins. think of a raceway or dragstrip one going faster than the other. Thanks for the video Ralph
Also have a look at Makuna his library. It uses I2S to shift out the data with DMA. Load on the processor is very low. And I always use a hct125 as level shifter, or just whatever good old TTL chip with AND or NAND or inverter ports I have. The level shifters who (mis)use a couple of fets don’t work for me on a esp8266. A ‘wordclock’ with 256 neopixels is something I made with a esp8266.
Ralph, do you use ws8212b? I never had to use levelshifter to make it work on either esp 32 or 8266. I connect led strip data line to the esp and use 5 v as power to the strip. But a resistor is allways good to have on the data line. And a cap on the power rail do help out if using many pixels.
Yes, mine are WS8212b (quite old now, a few years at least) but the new rings are brand, spanking new. I wonder if the spec has changed for Adafruit to specify a level shifter these days?
@@RalphBacon i don't know about that Ralph. But fastled seams to allways work. But sometimes you need to add some defines before using the fastled library, it is documented on fastled github. #define FASTLED_INTERNAL//This removes a compile warning. There is also FASTLED_ALLOW_INTERUPTS and FASTLED_INTERUPT_RETRY_COUNT After the required defines you include the fastled lib.
One thing you can do is use a sacrificial single neopixel to do the logic level conversion (which you could use as a more dim status LED), there's a hackaday article on it called Cheating at 5v WS2812 control to use 3.3v data. I'd link it, but UA-cam no likey links. It only needs a single signal diode, then the voltage will be high enough for the rest of the data pins. Check it out, it's a pretty ingenious workaround without a level shifter :)
I know about this 'hack' but I don't want to sacrifice my Neo Pixels, I love each and every one of them💕equally! On a long strip this can be done, I'm sure. Not so good on a 12 LED strip or ring though. I'd rather use a simple resistor to ensure I don't fry the Neo Pixel in the first place and then a level-shifter, if I need it.
@@RalphBacon I'd still use the resistor, definitely, possibly after the first sacrificial pixel, but... Was just something I thought I'd pass on because it's cool how it works :)
I've never had to use a logic level shifter for any of my ws2812b projects. Whenever I make it a final project though I always put a capacitor between Vcc and ground. Try WLED and load it on the esp with Esp home. I did however blowup oth power regulators on an arduino uno the other day testing out some 4 pin Pl9823 8mm leds hahahaha
I've never had a problem with an Arduino but this ESP32 certainly gave me pause for thought. But we have a solution. Unlike your power regulator on the UNO. Are you going to replace it (SMD job)?
@@RalphBacon it blew a hole through the board and was too far gone hahaha. First time it ever happened. I have the part to fix it as well but after cleaning it up the copper traces were gone. I bypassed it and powered the board and everything checked out on thr multimeter bit it wouldn't run the blink sketch so the cpu got zapped I think and the regulator is right beside it. Haha
@@RalphBacon I was half asleep when I replied. Effen medication makes me see double and stuff for a while so I hope it made sense. A custom led driver board where a cheap esp32 module not board is mounted would be cool. Or something teensy based. Do you have a teensy module? I'm going to buy the 4.1 I think and add 16mb of sram to it for making giant projects
Hi Ralph, this is strange. I am using from 1 up to 288 pcs Ws2812b strips with esp32 fastled library (based on the YT series of Dave Plummer from Dave's Garage) and never had to use a level shifter. Datasheet says minimum High-level is 0.7 VDD which starts from 3.5V. Could it be that your VDD is a tad high? Also, you are powering the LEDs directly from the ESP which, when increasing the numbers, is quickly frying the output diode or the voltage regulator on the board. External power is highly advised with bigger quantities. Cheers Armin
For this demo / proof-of-concept I used the USB 5v supply (it was only a ring plus a strip) but it could be a tad high as the USB hub is powered. I'll try the fastLED library to see if it makes any difference but I do have a 4-channel level shifter ready to use (and won't break the rulz).
I've never had this issue with a Wemos/Lolin D1 mini, all my neopixel projects are based on them and I drive the strips data line at 3.3v straight from the board
Ouch! That sounds suspiciously like "Works on my PC". 😲 But as I demonstrated, it most definitely did *not* work on mine unless I ran at 3v3 (poorly, as described) or with a level shifter (as per Adafruit's recommendation). So maybe your Wemos Mini had a higher pin output voltage (maybe 0.1v higher, or your VCC was a tad lower, or... who knows?
Another comment saying I've never had an issue driving neopixles from a 3.3v data pin (without resistor). I'd suspect an issue with the 5v rail especially if it's going through esp32 PCB. Only issues I've had is faulty data cabling. Just to check vcc is 5v, ground is ground, data is 3.3v from the esp32? Have you tried different data pins?
Yes, I tried every combination known to man (and Ralph). Once, just once, it started working and I was stunned until it all went Pete Wong again. I guess the NeoPixels I was using in the demo are less tolerant than some.
Hi Ralph, brilliant vid, was wondering if there was a way of private messaging you as I need to pick your brains about a sim steering wheel I'm having issues with. Many many thanks for any help Stu
How can I help you? Find my email address here ua-cam.com/users/RalphBaconabout and email me your question - but make sure you've done your homework first, my name is not Mr. Google!
Years ago, when I first started mucking about with electronics, I'm sure I read somewhere that you should match the voltage of an electrolytic capacitor to the circuit, choosing one that is higher voltage, but not too much. I seem to remember it said that, if the voltage rating of the capacitor was too high, the effectiveness of the capacitor would be reduced. It's not something that I ever hear these days, people seem to drop in any voltage as long as it is higher than the circuit voltage. Anyone else remember this, or did I dream it?
I second what The Embedded Hobbyist has said regarding voltage and headroom. 😜 You can always use a much higher voltage capacitor but as you saw it will be physically much larger.
@@RalphBacon That's not always the case Ralph, I have an assortiment of capacitors with values of 10V, 25V, 35V and 50V @ 4.7uF for example and all the 25V and 35V capacitors are much bigger than the 10V and 50V of the same capacitance and the same thing goes for the other shared capacitance values for the same voltage range. So to my opinion there's not really a consistency in your quote "the higher the voltage of a capacitor the bigger its physical size will be", that may be correct at some time in the past but nowadays that everything regarding electronics is shrunk down so much that you can't assume that anymore.
I have used two different ESP32 boards driving WS2812 neopixel strings of a meter or so and not encountered this problem (read the advice but never had a shifter so thought I would give it a go!). If you power separately does it repeat? Adafruit website is a good source of advice though!
I haven't tied powering entirely separately but the 5v I was using was directly from the USB plug (and that's the way I want to run it, off a wall wart). I guess some NeoPixels are more tolerant than others.
@@RalphBacon I see other commenters saying, as I would, that my ESP32 and 2812 combinations have always worked, never needed to think twice about it! I have always just connected my LED + line to the +3.3 and used that, after checking that the ESP development board had the higher-current-rated regulator fitted (there are several types). It's never failed to work, even in blue, and no problem up to 50 LEDs (never needed more). Maybe it's because I always buy generic LED strip, rather than posh expensive Neopixels! Same on the Arduino at 5V all round, of course. I wonder how "dirty" your 5V supply is...
Yes, I did (and mentioned this in a comment in the video, OMG you just weren't paying attention 😲) and it "sort of" worked: it lit the LEDs in the correct order, but they were very dim and the blue LEDs did not light at all (too low a voltage, I guess).
Nanoseconds? Do you _mean_ nano? A million Nanoseconds are in one millisecond. So 1ns is 0.000001ms. Even a microsecond is only 0.001ms (a thousandth). The microcontroller only measures microseconds or milliseconds. The ESP32 runs at 240MHz so one clock cycle is 4nS; in one μS you get ~250 cycles - too many? You could always execute a NOP command in assembler in your sketch for a 4mS delay: asm( "nop \t""nop \t"); What is it that you are trying to do? 🤷♀️
Yo uso matriz neopixel 8x32,y quiero hacerle una pregunta usted sabe porque a veces no siempre los mensajes están pasando en color rojo y de m9mento parpadean para verde y vuelven a rojo porque hará esto la matrix
Your corrupted colour information might be down to the power supply or noise on the data lines. Adafruit has some recommended steps to take to avoid data corruption on their website.
That's exactly what a level shifter is, Mike, but I need 3 channels so a 4-way, pre-built level shifter makes it easier to construct the project. Also, I emphasised the bi-directional nature of level shifters to ensure those unfamiliar with the technique did not get caught out when requiring such a feature (eg I2C or pretty much any other protocol rather than just one-way signalling like I'm doing here).
While I can't speak to NeoPixels, I know some other logic-level semiconductors' voltage thresholds change based on the supply voltage. That said, since NeoPixels only really need one direction of communication, I wonder if one couldn't simply use a buffer IC with Schottky-style triggering?
Short answer: yes! Longer answer, that's what the MOSFETs in the 'Level shifter' are doing. Others have suggested use of a simple buffer such as the 74HC245 transceiver but the Level Shifter is just as easy to use (and dirt cheap).
Yes, that's right. In glowing, pulsing red. The longer the lid remains open the faster it will pulse. Well, maybe, I haven't written the code for that yet.
Hello Ralph, thanks for your videos, i like. I am french, I make too electronic topic video. Is it possible to join automatic french subtitle? I do it in english on my videos.
As far as I know, YT only automatically generates English subtitles (for me, in the UK). It won't auto-translate into other languages (it's not smart enough to do that).
@@RalphBacon Who Tube does have a way to "auto translate" sort of. First turn on Close caption. Then click on the gear icon to the right of the CC icon. Click on the auto translate, and a list of languages will appear. Select the language of your choice. Enjoy! And I too love your content, as I am an electronics nerd, too.
You saying I'm over-engineering the solution a tad, Jorgo? Excellent, my work here is done! 😜 Hang on, it's not a _rubbish_ bin, they contain all my DIY tools and screws and stuff.
I do use a 0.7V drop diode in the neopixel vcc line. This shifts the neopixel input range enough to be 3.3V compatible.
Never tried it but you could use "open drain" on the ESP output pin and R it up to 5V.
Hmm, interesting idea. But I'll try a couple of other libraries out first and if none of them work reliably I'll use a 4-channel level shifter.
@@RalphBacon The open drain thing works.
I use "pinMode(PIN, OUTPUT_OPEN_DRAIN);" and 1k to +5V
Another excellent video. Thanks Ralph.
For the PCB/final project, I'd encourage you to avoid the complexity and size of the level shifting module and just use a MOSFET, since you're only shifting the one data pin.
I'm actually going to use 3 independent channels (and even tasks) for my 3 NeoPixel rings, Andrew, to reduce coding complexity so a smaller 4-channel Level Shifter I have will do the job. For a single channel, yes, a single MOSFET would do the trick in a more compact way.
Great walkthrough of the process 👍😀
Thanks for sharing your experience with all of us 👍😀
Glad you found it interesting and/or useful!
I've seen this 'resistor' question asked many times before. Just lookup 'neopixel resistor waveform' and look at the waveform images that are shown with an oscilloscope. You'll see that without the resistor there is 'ringing' in the signal. The resistor cleans it up.
Good to know, Matt, pity Adafruit didn't tell us _why_ they recommended that resistor, now we know. 👍🏻
A few years ago I built a little gizmo with an Arduino pro-mini and a couple of NeoPixel circles, powered directly from a li-ion cell. It works quite happily down to about 3V.
That's called Rubbing Salt into The Wound, Andy.
Someone mentioned to look at WLED. That is the definitive pixel software. I drive 512 pixels with an ESP32. Also look at Tasmota and ESPHome. As others mentioned, don't try to drive all of your pixels from the microcontroller run a separate 5V line to power the pixels in parallel to the ESP32. Be sure to have a common ground. If you first pixel is physically close (i. e., short data wire) to the microcontroller, you likely won't need a level shifter.
I'll deffo look at WLED as many of you have mentioned it. And thanks for the other tips too!
Before Christmas I bought a batch of 100 neopixels each on their own board to play with, and make some decorative lights with. I have played with them a bit, but I went the other direction, I'm using an arduino Nano, and hope to port the code to an ATTINY85 for the final design, if I can slim the code down enough. I have been using the FastLED library, but I might look at the Adafruit one just in case it works better on the smaller chip. I've not had much time to play with it lately, but maybe your video ill spur me with getting on with it!
There are various different makes of Neopixels devices, and some seem to be more sensitive to voltage levels than others, which is probably why some people are saying they are driving their neopixels from an ESP32 with no trouble. On other forums I've seen comments that seem to confirm this. In any case, getting the voltage levels right is good practice, even if sometimes you might get away with using 3.3v signals. I would imagine it would affect the noise immunity of what is, after all, a fairly high data rate signal.
The FastLED is quite a large library (especially if you hope to use it on a Tiny85) but Makuna's NeoPixel library is apparently smaller with all the same features. github.com/Makuna/NeoPixelBus
Sk6812 Neopixels seem to be less picky and often work well with a 3.3V signal. The WS2812 do need a level shifter almost always, as you found.
Yes, I'm using WS2812Bs in my project. Obviously a bit more picky.
I run dozens of ESP8266 and ESP32 modules driving WS2812 strands and not one of them use a level shift or series resistor and they all work good.
I have, however, used some neopixel libraries that give the very same effect you have (and those libraries work fine on arduino units) which tends to suggest the code rather than the hardware
Try chucking WLED on one of the modules as a test, bet you it will work A1 without the level shifter
I to have no problem running ws2812b on either esp32 or 8266 with 3.3v dataline and 5 v power supply to the neo pixels strip. I mostly use fastled library, seams that fastled allways works best. Had some problems with adafruit library to work.
I've had fastLED cause issues with the esp8266 data stream corrupting the first 24 bits by stuffing big gaps in the data bits.
Sounds like I ought to retry fastLED or Makuna's NeoPixel library that improved on that (he says).
Good one mate love you're channel... I've for many many years now used a 74HCT245 octal buffer chip in all my multi channel ws2811/12b setups that use esp8266/32 they're ..ehem as cheap as chips.. sorry... And very fast ( they easily cope with the data rate of any type of argb LEDs), giving up to 8 channels of 'level' shifting plus on long data runs a 100ohm resistor in the data line ( as close to the MCU as possible) and a 1000uf 16v cap on the supply line.
I have also used the 1 sacrificial ws2812b led trick which works well and acts as a 1 channel 'level shifter'
Some esp boards work with out level shifters ...but to be sure the level shifter is a must if you're going for repeatability across many suppliers of esp boards.
Basically the data signal has to >=80% of the supply voltage for ws2812b obviously not exceeding 5v
Interesting use of that octal transceiver buffer (bidirectional... sort of!). More info for others: www.hobbytronics.co.uk/74hc245-octal-transceiver
I have played with ESP32 and Neopixels some time back and did not have any problems with voltage, but if I had made a PCB it would have included a HCT chip as a voltage converter.
I was mostly looking on longer strings (a couple of meters), there the problem is keeping the voltage high enough all the way, especially as I wanted a RGBW type leds.
I have later seen that there are 12V Neopixels (only RGB), they run the 3 leds in series in each pixel, i.e. 1/3 the current and less issues with voltage
You can also get "Neopixels" with two control wires, i.e. a data and a clock, they are much less critical in timing.
Another type of two data wires is main data and backup date, that will continue to work if a pixel dies.
I've not seen 12v NeoPixels, I'll keep my eyes open. Yes, I've got a couple of the older, clock + data lines LEDs but never used them in anger.
For 12V search WS2815
The clock+data has two advantages: Update is not time critical and you can update them faster.
Hi Ralph I know your video is about 2 years old but you can update it with another new problem, if you connect a strand of neopixels to an ESP32 and use the Adafruit library it will work up to 70 LEDs but after 80 LEDs the ESP32 will crash at boot. you don't even need the LEDs connected, the problem is not the Adafruit Library but is the Ver 3.x of the board configuration.
Sigh. I see that Adafruit has a whole web page (or more) on how to get round various problems like this. Is it their software or a limitation of the hardware solution?
Hi Ralph, not sure why you had a problem, but I’ve been using Esp32 with neopixel strips and not had a problem triggering them with 3.3v. I followed Dave’s Garage UA-cam videos. Don’t know if I can show you what I’ve done but it’s similar to what Dave has done if you want to take a look. I’m not sure he adheres strictly to guidelines but it works 👍🏾🤓
For the sake of one level shifter (on a custom PCB) I will adhere to the guidelines as I don't want any 'issues' further down the line!
Something to keep in mind is that large capacitors are not permitted on USB power lines, or when you plug the device into a hub, other devices will fall off of it. You're supposed to only have 10uF on there, up to 47uF are usually kinda tolerable if we ignore the spec hard enough. 470uF are not even close to tolerable, unless you have strict current limiting upstream of the capacitor. Or at least an inductor.
As to a level shifter, a single transistor one should do it. Bss136 or 2n7002 is classic for such use.
Hmm. We all know that standards are great; there are so many to choose from 😲
As it happens on this circuit, the NeoPixel is being driven by a (logically) separate 5v supply, like a phone charger. Which I don't think is going to care about large capacitors.
In the demo, I do connect the 5v from the incoming "USB" to the NeoPixels, that is true; but in the finished product it will be a phone charger-type wall-wart so it will be fine. He said. 🤞🏻
@@RalphBacon yes, I don't mind plugging a 470uF capacitor into a charger. They've seen worse.
Have you explored WLED software? It sure does the job and pretty much has every feature you can think of...
I haven't, but will be looking at it for my project, Anthony 👍
@@RalphBacon I haven't used WLED myself however I think I have the WLED implementation already installed on my Raspberry Pi, doesn't really matter because I can install it in a couple of seconds or so anyway.
So I've been close to use WLED a couple times in the past but then I figured Fastled is the way to go for me because it's by far the easiest to understand and I found Fastled for my projects the most compatible with my hardware and Fastled supports integration with third-party software way better than the Adafruit Neopixel option.
I would be very interested to see you struggle with WLED before I give it a try myself, I know there will come some little things that are very important to get it right, weird stuff, quirks that you don't think of right away and you normally share all that so I'm curious what I can learn from your mistakes.
When are you going to give WLED a go and share that here on UA-cam?
Hi Ralph, to avoid any problems I always power my Neo's with a separate 5v supply anyway so thats no problem and I can't say I have ever had a problem with a 3.3v level for data either but it's good to see you have them going and nowadays the interwebs are saturated with projects for reference so no prob's there. Well, regarding your bin project I think it's time you put a lid on it !! Hahahah, I hope I'm the first in there ! lol...with the joke I mean Oh Hehehehe !!!!......stop me please !.........cheers.
Cheese!!!!!!!!!!!!!!!!!!!!!
Oh please, yes, please Andy. Stop the jokes I mean. 🤣
@@fredflintstone1 Squeak !
@@andymouse Facepalm....
I have no problem driving ws2812b's with the 3v3 signal from a esp8266, plus I don't use the arduino or fastLED libraries, just as easy to do it normal code. It could be that neopixles you have are closer to the Data sheet spec's than most others.
I had a problem with fastled corrupting the first 24 bits of data on the esp8266, so the first led would not light.
I didn't have any issues with ws2812b strips/matrices either with various ESP32 modules.
Ok, with Dave Plummer's night driver project, I did get some anomalies with LEDs in the strip I wasn't using, but generally wasn't a problem.
Definitely did not have an issue with his tutorial series before Night Driver.
I'll look at WLED to see if that works at 3v3.
I have wanted to try different flash rates on different pins. think of a raceway or dragstrip one going faster than the other. Thanks for the video Ralph
Yes, look at the demo code in the GitHub, it should give you ideas.
Also have a look at Makuna his library. It uses I2S to shift out the data with DMA. Load on the processor is very low. And I always use a hct125 as level shifter, or just whatever good old TTL chip with AND or NAND or inverter ports I have. The level shifters who (mis)use a couple of fets don’t work for me on a esp8266. A ‘wordclock’ with 256 neopixels is something I made with a esp8266.
It sounds interesting, and I will have a look. For others: github.com/Makuna/NeoPixelBus
Ralph, do you use ws8212b?
I never had to use levelshifter to make it work on either esp 32 or 8266.
I connect led strip data line to the esp and use 5 v as power to the strip. But a resistor is allways good to have on the data line. And a cap on the power rail do help out if using many pixels.
Yes, mine are WS8212b (quite old now, a few years at least) but the new rings are brand, spanking new.
I wonder if the spec has changed for Adafruit to specify a level shifter these days?
@@RalphBacon i don't know about that Ralph. But fastled seams to allways work. But sometimes you need to add some defines before using the fastled library, it is documented on fastled github.
#define FASTLED_INTERNAL//This removes a compile warning.
There is also FASTLED_ALLOW_INTERUPTS and FASTLED_INTERUPT_RETRY_COUNT
After the required defines you include the fastled lib.
Thanks, Hans, I'll give it a whirl!
One thing you can do is use a sacrificial single neopixel to do the logic level conversion (which you could use as a more dim status LED), there's a hackaday article on it called Cheating at 5v WS2812 control to use 3.3v data. I'd link it, but UA-cam no likey links. It only needs a single signal diode, then the voltage will be high enough for the rest of the data pins. Check it out, it's a pretty ingenious workaround without a level shifter :)
I know about this 'hack' but I don't want to sacrifice my Neo Pixels, I love each and every one of them💕equally!
On a long strip this can be done, I'm sure. Not so good on a 12 LED strip or ring though. I'd rather use a simple resistor to ensure I don't fry the Neo Pixel in the first place and then a level-shifter, if I need it.
@@RalphBacon I'd still use the resistor, definitely, possibly after the first sacrificial pixel, but... Was just something I thought I'd pass on because it's cool how it works :)
Great video Ralph! Thanks.
Glad you liked it!
I've never had to use a logic level shifter for any of my ws2812b projects. Whenever I make it a final project though I always put a capacitor between Vcc and ground. Try WLED and load it on the esp with Esp home. I did however blowup oth power regulators on an arduino uno the other day testing out some 4 pin Pl9823 8mm leds hahahaha
I've never had a problem with an Arduino but this ESP32 certainly gave me pause for thought. But we have a solution. Unlike your power regulator on the UNO. Are you going to replace it (SMD job)?
@@RalphBacon it blew a hole through the board and was too far gone hahaha. First time it ever happened. I have the part to fix it as well but after cleaning it up the copper traces were gone. I bypassed it and powered the board and everything checked out on thr multimeter bit it wouldn't run the blink sketch so the cpu got zapped I think and the regulator is right beside it. Haha
@@RalphBacon I was half asleep when I replied. Effen medication makes me see double and stuff for a while so I hope it made sense. A custom led driver board where a cheap esp32 module not board is mounted would be cool. Or something teensy based. Do you have a teensy module? I'm going to buy the 4.1 I think and add 16mb of sram to it for making giant projects
Hi Ralph,
this is strange. I am using from 1 up to 288 pcs Ws2812b strips with esp32 fastled library (based on the YT series of Dave Plummer from Dave's Garage) and never had to use a level shifter. Datasheet says minimum High-level is 0.7 VDD which starts from 3.5V.
Could it be that your VDD is a tad high?
Also, you are powering the LEDs directly from the ESP which, when increasing the numbers, is quickly frying the output diode or the voltage regulator on the board. External power is highly advised with bigger quantities.
Cheers
Armin
Sme here what I found that is it depends on the manufacturer mine don't need decoupling cap but on my pcb I did use level shifter just incase
For this demo / proof-of-concept I used the USB 5v supply (it was only a ring plus a strip) but it could be a tad high as the USB hub is powered.
I'll try the fastLED library to see if it makes any difference but I do have a 4-channel level shifter ready to use (and won't break the rulz).
I've never had this issue with a Wemos/Lolin D1 mini, all my neopixel projects are based on them and I drive the strips data line at 3.3v straight from the board
Ouch! That sounds suspiciously like "Works on my PC". 😲
But as I demonstrated, it most definitely did *not* work on mine unless I ran at 3v3 (poorly, as described) or with a level shifter (as per Adafruit's recommendation).
So maybe your Wemos Mini had a higher pin output voltage (maybe 0.1v higher, or your VCC was a tad lower, or... who knows?
@@RalphBacon I agree it's a curious difference, could that warrant some channel content for you?
I've had no issues driving neopixels with Wemos D1 mini boards. Shouldn't it exhibit the same problem?
Aren't they ESP8266 chips? Maybe they act slightly differently? But then again, 3v3 is 3v3 regardless of chip. Weird!
Another comment saying I've never had an issue driving neopixles from a 3.3v data pin (without resistor). I'd suspect an issue with the 5v rail especially if it's going through esp32 PCB. Only issues I've had is faulty data cabling. Just to check vcc is 5v, ground is ground, data is 3.3v from the esp32? Have you tried different data pins?
Yes, I tried every combination known to man (and Ralph). Once, just once, it started working and I was stunned until it all went Pete Wong again. I guess the NeoPixels I was using in the demo are less tolerant than some.
Hi Ralph, brilliant vid, was wondering if there was a way of private messaging you as I need to pick your brains about a sim steering wheel I'm having issues with. Many many thanks for any help Stu
How can I help you? Find my email address here ua-cam.com/users/RalphBaconabout and email me your question - but make sure you've done your homework first, my name is not Mr. Google!
Years ago, when I first started mucking about with electronics, I'm sure I read somewhere that you should match the voltage of an electrolytic capacitor to the circuit, choosing one that is higher voltage, but not too much. I seem to remember it said that, if the voltage rating of the capacitor was too high, the effectiveness of the capacitor would be reduced. It's not something that I ever hear these days, people seem to drop in any voltage as long as it is higher than the circuit voltage. Anyone else remember this, or did I dream it?
Normally would pick a cap's voltage so that the max voltage it would see is less than 80% of its rated voltage for a bit of headroom
I second what The Embedded Hobbyist has said regarding voltage and headroom. 😜 You can always use a much higher voltage capacitor but as you saw it will be physically much larger.
@@RalphBacon That's not always the case Ralph, I have an assortiment of capacitors with values of 10V, 25V, 35V and 50V @ 4.7uF for example and all the 25V and 35V capacitors are much bigger than the 10V and 50V of the same capacitance and the same thing goes for the other shared capacitance values for the same voltage range.
So to my opinion there's not really a consistency in your quote "the higher the voltage of a capacitor the bigger its physical size will be", that may be correct at some time in the past but nowadays that everything regarding electronics is shrunk down so much that you can't assume that anymore.
I have used two different ESP32 boards driving WS2812 neopixel strings of a meter or so and not encountered this problem (read the advice but never had a shifter so thought I would give it a go!). If you power separately does it repeat? Adafruit website is a good source of advice though!
I haven't tied powering entirely separately but the 5v I was using was directly from the USB plug (and that's the way I want to run it, off a wall wart). I guess some NeoPixels are more tolerant than others.
@@RalphBacon I see other commenters saying, as I would, that my ESP32 and 2812 combinations have always worked, never needed to think twice about it! I have always just connected my LED + line to the +3.3 and used that, after checking that the ESP development board had the higher-current-rated regulator fitted (there are several types). It's never failed to work, even in blue, and no problem up to 50 LEDs (never needed more).
Maybe it's because I always buy generic LED strip, rather than posh expensive Neopixels!
Same on the Arduino at 5V all round, of course.
I wonder how "dirty" your 5V supply is...
Did you try the NeoPixels with a supply voltage of 3.3V ?
Yes, I did (and mentioned this in a comment in the video, OMG you just weren't paying attention 😲) and it "sort of" worked: it lit the LEDs in the correct order, but they were very dim and the blue LEDs did not light at all (too low a voltage, I guess).
Would it work if you had a 5 volt supply for the neo pixels and the negative commoned and the data at 3.3 from the ESp32???
That works for me Fred,.
Definitely you do need a common ground. I'm sure he had it that way, it can't work any other way.
The 5v I used was from the USB socket (basically, Vin) so was independent in that sense.
Hello, is there a way to apply the delay using nanoseconds, thank you
Nanoseconds? Do you _mean_ nano? A million Nanoseconds are in one millisecond. So 1ns is 0.000001ms. Even a microsecond is only 0.001ms (a thousandth).
The microcontroller only measures microseconds or milliseconds. The ESP32 runs at 240MHz so one clock cycle is 4nS; in one μS you get ~250 cycles - too many?
You could always execute a NOP command in assembler in your sketch for a 4mS delay:
asm( "nop
\t""nop
\t");
What is it that you are trying to do? 🤷♀️
Yo uso matriz neopixel 8x32,y quiero hacerle una pregunta usted sabe porque a veces no siempre los mensajes están pasando en color rojo y de m9mento parpadean para verde y vuelven a rojo porque hará esto la matrix
Your corrupted colour information might be down to the power supply or noise on the data lines. Adafruit has some recommended steps to take to avoid data corruption on their website.
Another option would be a transistor with the esp32 output controling it
Well, yes, but that's what the MOSFET level shifter is doing, really.
Wouldn't an N-channel mosfet be a better solution since you only need two one-way connections?
That's exactly what a level shifter is, Mike, but I need 3 channels so a 4-way, pre-built level shifter makes it easier to construct the project.
Also, I emphasised the bi-directional nature of level shifters to ensure those unfamiliar with the technique did not get caught out when requiring such a feature (eg I2C or pretty much any other protocol rather than just one-way signalling like I'm doing here).
While I can't speak to NeoPixels, I know some other logic-level semiconductors' voltage thresholds change based on the supply voltage. That said, since NeoPixels only really need one direction of communication, I wonder if one couldn't simply use a buffer IC with Schottky-style triggering?
Short answer: yes! Longer answer, that's what the MOSFETs in the 'Level shifter' are doing. Others have suggested use of a simple buffer such as the 74HC245 transceiver but the Level Shifter is just as easy to use (and dirt cheap).
I love Neopixels.
Clever little things, aren't they?
are the neopixels going to warn you the lid is open???
Yes, that's right. In glowing, pulsing red. The longer the lid remains open the faster it will pulse. Well, maybe, I haven't written the code for that yet.
Hello Ralph, thanks for your videos, i like. I am french, I make too electronic topic video. Is it possible to join automatic french subtitle? I do it in english on my videos.
As far as I know, YT only automatically generates English subtitles (for me, in the UK). It won't auto-translate into other languages (it's not smart enough to do that).
@@RalphBacon Who Tube does have a way to "auto translate" sort of. First turn on Close caption. Then click on the gear icon to the right of the CC icon. Click on the auto translate, and a list of languages will appear. Select the language of your choice.
Enjoy! And I too love your content, as I am an electronics nerd, too.
Love it....fanciest rubbish bin ever....
You saying I'm over-engineering the solution a tad, Jorgo? Excellent, my work here is done! 😜
Hang on, it's not a _rubbish_ bin, they contain all my DIY tools and screws and stuff.
@@RalphBacon Ohhhh...soorrryyy....hehehehehe...well done mate.
:)
👍