I'm working on a small group project of 25 units using ESP-12F controllers that I need to fit into a relatively tight space. The project communicates with some WS2812b LEDs and takes a 5V power source due to brightness needed. Got in a bit over my head as I know enough to be dangerous, but haven't done as much soldering since the late 90s.

The ESP8266 in the ESP-12F outputs 3.3V logic, and while this "can" work on the WS2812B LEDs, it's out of spec and I've found it to be very touchy, so I need to bump the logic up to 5V (technically 3.5 to meet the LED specs, but that would mean handling a third voltage).

WS2812B LED data takes 1uA at 70% of the 5V VDD LED input (3.5v minimum on logic) by spec, 800kbps data rate with a rise and fall required for each bit and bit data determined by the duration high, so switching needs to be at 0.4us as the minimum required flip. Latency is not an issue as long as the timing between switching is fine. Specs for considering the line level low require a voltage below 30% of the 5V LED input voltage, or 1.5V. if I drop VDD for 70% of it to be 3.3v or less (4.7V VDD), I lose the brightness it needs.

I have found plenty of multi-channel logic level shifters on boards, but they come at 15mm or more of board size. I've also found non-inverting buffers, and found that I need a TC version to deal with input at 3.3v and output at five, but the TSOP-5 package (0.65mm pin pitch SMC) is a bit beyond my capability to solder to wires by hand. I might be able to do a SOT-23 package by hand, but unsure, and I didn't find such a package with appropriate logic specs anywhere. From there it appears to leap to DIP14 with 4+ channels, which is too big to fit in the project.

Is there any good way to get the 3.3v output of the ESP-12F bumped to 5V for the LED data lines but in a package that is somewhere in between the way-too-small TSOP-5 and the too-big 12x15mm board? I'm open to multiple components and have a bit more depth to work with, but in general need to keep the package as small as workably-possible within 10x10x10mm with connections included.

Edit: Trying to get the question within the specs of this community so that I don't have to give up on this project for the kids. I am not asking for a specific part from a specific vendor, just asking for insight on a way to do it between the physical size limit and old man eyesight soldering capability limits. Prior to looking at a number of other questions here, I did not know about non-inverting buffers for example, so there is probably plenty more I don't know about in my quest to get this project working for these kids. Unfortunately every question/answer set that I found regarding logic level shifting here on this site was very specific to a particular precise requirement problem and the solutions provided could not be extrapolated or generalized to my particular problems because there is nothing on how or why it works, making them a black box to me and with very few spare parts of certain things I'm not keen on frying parts. Then the few questions whose answers would have helped me not have to ask were closed so they couldn't get answers.

I'm also trying to get answers that are more generalized to "bump up the high speed data logic level in a medium-sized package" rather than just the fact that the specific chip can handle 3.6v and thus would put out logic at 3.6V (which is honestly probably what I'll do at this point, despite the over-voltage putting the component on the edge of specs with no margin for error to pad against premature failure that would break a kid's heart), since anybody else looking for a medium-sized converter might have something that can't handle 3.6V and the general information could be useful for them. I didn't know about line buffers until I found a general answer here for example.

There are a few comment reply items that sound promising and I will try to ask for an understanding of why/how it works in reply to those comments. A huge thanks to the folks who are trying to help. It's greatly appreciated.

If this question is still not good enough, could somebody at least refer me to a place that is able to help hobbyist neophytes with this level of lack of understanding and no official training?


Note that the original poster is asking how to translate a 3.3V logic signal to something greater than 3.5V. Everyone is commenting on the lack of LED specifications because they don't realize that WS2812B LED data input is a logic signal and thus does NOT drive the LED directly.


closed as off-topic by The Photon, Chris Stratton, Dmitry Grigoryev, Voltage Spike, Charles Cowie Jul 18 '18 at 21:30

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

  • \$\begingroup\$ TXS0102QDCURQ1 works pretty well \$\endgroup\$ – Luke Gary Jul 15 '18 at 1:48
  • 1
    \$\begingroup\$ This is pretty tricky because it is a fairly high speed signal. I mean, the usual FET level shifter is not going to work for you. You need to use some kind of logic gate. If you don't want to use the DIP part you found, then you may have to figure out how to solder the SOT-23. Check this part: 74LV1T34. \$\endgroup\$ – mkeith Jul 15 '18 at 2:18
  • \$\begingroup\$ Most of these circuits are available in a wide range of channel counts, but without specifying the input requirement of the LEDs (ie impedance or how much current) the question is formally unanswerable. \$\endgroup\$ – Chris Stratton Jul 15 '18 at 6:22
  • 1
    \$\begingroup\$ @ChrisStratton The WS2812b specs available online indicate the input current is +/-1μA - For my future reference, should I transcribe specs for standard parts into the question rather than assuming that anybody can/will look them up? \$\endgroup\$ – TechVulp Jul 16 '18 at 1:42
  • \$\begingroup\$ @TechVulp questions are indeed required to stand on their own without requiring external references. \$\endgroup\$ – Chris Stratton Jul 16 '18 at 3:52

You generally only need a unidirectional level translator to drive those LEDs, just use an HCT series buffer (like a 74HCT244). They typically have a high level threshold on the inputs of about 2V so they will switch reliably on the 3.3V outputs of the ESP8266. Power the HCT gate from 5V and it will generate 5V output swings.
There are other HCT gates that have fewer than 8 channels but give the 244 a try first, they are cheap and easy to get.


Here is one way I have done it in the past. This circuit forms a bi-directional level translator with no need for a direction control pin.

3V to 5V translator with 5V side at high impedance:

When the 3V signal is driven high then the MOSFET turns off and the 1K pullup drives the 5V signal all the way to 5V.

When the 3V signal is driven low then the FET turns on and the 5V signal is driven low.

5V to 3V translator with 3V side at high impedance:

If the 5V signal is driven high and the 3V side is high-impedance. Then the FET will be off and R2 will pull up the 3.3V side to a high logic level.

If the 5V signal is driven low then it will pull the 3V side low through the body diode of the FET. This will turn on the FET and then the 3V side will go all the way low.

When I tested this circuit the propagation delay was very low (I believe less than 10ns). The requirements for picking the FET is that it has very low capacitance and that the gate threshold is less than 3.3V by some margin.


simulate this circuit – Schematic created using CircuitLab

You can also try a ready made translator chip such as the GTL2002D,118.

The SOIC 8 package should be a little larger and easier to solder.

  • 2
    \$\begingroup\$ It's worth noting that you don't need R2. \$\endgroup\$ – Jack Creasey Jul 15 '18 at 3:38
  • \$\begingroup\$ The potential issue here is that it is not clear that a 1k pullup resistor is suitable for driving the LED specs. In fact the question is defective because it fails to state what the LEDs require. Generally speaking with an unknown load a complementary or totem poll output is preferable to a pullup resistor. \$\endgroup\$ – Chris Stratton Jul 15 '18 at 6:21
  • 1
    \$\begingroup\$ I would not bet money that this will work at the 800 kHz signalling rate required by the LED modules. \$\endgroup\$ – mkeith Jul 17 '18 at 1:05
  • 1
    \$\begingroup\$ @mkeith I tested this particular circuit and measured it on a scope. The propagation delay was around 10ns in my setup. \$\endgroup\$ – user4574 Jul 17 '18 at 15:51
  • 1
    \$\begingroup\$ I am not worried about the propagation delay. I am worried about the rise time and fall time and whether the duty cycle is faithfully reproduced. The LED's use duty cycle to determine if a bit is a one or a zero. \$\endgroup\$ – mkeith Jul 17 '18 at 16:16

You can often get the logic HI level of a 3.3V device up to about 3.9 - 4V simply by adding a pullup resistor from the pin to your 5V rail.

This is dependent on the device but it is a possible solution that is easy to try. Might work, might not.

I'd start with 4k7 pullup resistor.

  • \$\begingroup\$ Maybe, maybe not. This depends on the input requirements of the LEDs, without specifying which the question is defective. \$\endgroup\$ – Chris Stratton Jul 15 '18 at 6:21
  • \$\begingroup\$ Added specs (<=1.5V low, >=3.5V high, switching at 0.4us, +/-1uA). \$\endgroup\$ – TechVulp Jul 19 '18 at 21:43
  • \$\begingroup\$ Please help me understand this (searching pullup resistors on Google just find a bunch of pages that say they put it to a known level): The pullup brings it to a higher low so the addition of the signal bumps it high sufficiently? By my (poor) understanding, the data draw of 1uA and trying to drop 5V to, for example, 1V, would require R = V/I, so 4 / 0.0000001 or 40M. This number makes me think I am very, very wrong. \$\endgroup\$ – TechVulp Jul 19 '18 at 21:53
  • \$\begingroup\$ 4k7 * 25pF is about 100ns. Just about right for 800kHz operation. \$\endgroup\$ – Dmitry Grigoryev Jul 31 '18 at 12:46

Not the answer you're looking for? Browse other questions tagged or ask your own question.