A good way to level-translate from 3.3V ESP8266 to WS2812 on 5V is to use 74HCT series logic buffers (74HC has too high of a logic threshold). But if you don’t have a suitable chip on hand, you can use an intermediate LED by reducing the supply voltage with a diode. This will drop the WS2812’s threshold voltage enough that 3.3V inputs trigger it reliably, and the intermediate LED will then output a high enough logic value to trigger WS2812’s running on a full 5 volts.
I was wondering about this recently… so do you have to exclude the buffer chip in the code? Does it need to be separated from the strip for instance?
I did separate it from the array (just add 1 to your LED array writes). Using this one as a wifi connection status LED.missing/deleted image from Google+
Ah so it’s okay to still send it its own data? I wonder if I could use some burned out pixels- ones that started malfunctioning but still pass data on correctly. I’m just reorganizing the studio and was wondering why I’ve saved them and yet didn’t just throw them out. Probably not worth the risk… I’ll just maintain a tiny memorial drawer for them in the hardware cabinet
Can you explain with more detail what is “level-translate” and why it is needed?
@Jesus_Climent the ESP8266 and many other microcontrolers operate at 3.3V however pretty much all the popular pixels used operate at 5V. That means you sometimes need a way to translate the 3.3v logic to 5vlogic. 3.3v logic means…0v=0 and 3.3v=1 where as 5v logic 0v=0 and 5v=1. Thats very simplified but it gives you an idea
i confirm that it works very well. I use it very often. just keep this led as close as possible to the data_out pin and the the led string can be placed farther from the cpu (according to the max distance between pixels).
@Charity_Stolarz I think that you could use a burned out pixel. However you can’t be sure it’s 100% reliable…I would not bother. If you are designing a new project the best solution is still to use some 74HCT series buffer logic for level translation, using an extra LED with slightly dropped VCC is a hack
Aha, I just wrote up a project that uses that very same hack!
It’s a great hack, I’ve used it a few times. Here’s the diagram I made for it:
@Tod_Kurt Nicely done I do prefer a 74HCT1G125 but it’s also pretty hard to beat the price of one extra WS2812B (if you have the space!)
@Garrett_Mace I still have 3 sn74hct245n shifters left over from the Coon’s trees. So I’m good for now. But after organizing my stuff I found 9 esp8266 boards in various incarnations. So the hack may come in handy at some point. I need a hack to avoid ransacking my studio every time I get into a new piece
@Tod_Kurt There is a small bug in your diagram, it connects +5V between the first and second pixel (shorting out the dropping diode) when it should run only to the second pixel
@Garrett_Mace oh crud how embarrassing, you’re right. Here’s the fixed diagram.
missing/deleted image from Google+
Do some strips align the pins as gnd-5v-signal? All i have ever used were gnd-signal-5v… I’ve got a semi-production project going…I’d hate to order the wrong strips…
@Roger_Kolasinski For WS2812 and SK6812 they are always some combination of GND-DATA-5V or 5V-DATA-GND
I have several older strips that are DATA-5V-GND, but it seems like newer strips have standardized on having DATA in the middle.