fast and accurate 3.3V to 5V level shifter for NeoPixel addressable LED WS2812b WLED ESP32 project needed

Thread Starter

huramentzefix

Joined Dec 23, 2018
27
The WLED WS2812b wiring gude calls for a 74ahtc124n level shifter which doesn't seem to exist.
Available is the 74AHCT125
Most breadboard friendly is the 14-PDIP version.

SNx4AHCT125 Quadruple Bus Buffer Gates With 3-State Outputs
Can somebody help me with the PINOUT / wiring please?
My ESP WROOM ESP32 puts out 3.3V and for the WS2812b LED's this has to be shifted to 5V+

VCC = 5V
GND = -
1A = Gate 1 input
1Y = Gate 1 output

what is "X OE / Output enable for gate X" for?

some level shifter require low VCC and high VCC to be connected.
This level shifter just requires the high VCC of 5V (max 5.5V)?

I am not sure how to read the datasheet and if I can connect 3.3V input?
And the output is then VCC?
 

MisterBill2

Joined Jan 23, 2018
27,358
There is a CMOS level shifter, originally for linking TTL to CMOS. It has separate power connections for the input side and the output side. That is the CD4049 hex inverter/buffer and the CD4010 hex buffer. They may still be available,
 

Thread Starter

huramentzefix

Joined Dec 23, 2018
27
is my mentioned chip not suitabel?
amazon reviews also recommend the 74AHCT125 for the neopixel WS2812b
any input on the 74AHCT125 combined with the WS2812b?
 

Thread Starter

huramentzefix

Joined Dec 23, 2018
27
@ericgibbs thank you, you are the first one that read my question and tried to find a solution.
many people here seem to be on a comission or part of an affiliate programme?

The ESP8266 pin is 3.3V but the WS2812b requires 5V. A "quick" level shifter is requires and I came across site mentioning this 74AHCT125 chip.

I was struggling interpreting the datasheet.
Hi-Level input minimum 2V but no maximum.
Low level input maximum 0.8V.
VCC (input voltage is 5V). But my low level is 3.3V which is above 0.8V
output volatge 0V
My hi-level required output is 5V. Is this chip bi-directional?
 

nsaspook

Joined Aug 27, 2009
16,275
Did you really think it would not work with literally hundreds of easily searchable examples showing it does work, complete with wiring diagrams of connections?
 

ericgibbs

Joined Jan 29, 2010
21,420
hi huram,
I use these low cost, fast bi-directional shifters, refer link

Hi-Level input minimum 2V but no maximum.
With a Vcc of 5V. this means the input logic signal can be between 2V and 5V, which is considered a logical Hi.

Low level input maximum 0.8V.
This is typical for most Low logic levels

VCC (input voltage is 5V). But my low level is 3.3V which is above 0.8V
output volatge 0V

Where is this Low of 3.3v coming from?, it is not a regular logic Low?

My hi-level required output is 5V. Is this chip bi-directional?
No, the chip is not bi-directional.
The Vcc supply to the chip determines the Logic hi voltage output.

IE: If Vcc was 3.3V, it would give a 3.3v logic Hi out and if Vcc was 5V, it would give a 5V logic Hi output

E



EG 1665.png

https://www.amazon.co.uk/s?k=bi+directional+logic+shifter&crid=1KNLHI05EB4BR&sprefix=bi+directional+logic+shifter,aps,76&ref=nb_sb_noss
 

Attachments

Last edited:

Thread Starter

huramentzefix

Joined Dec 23, 2018
27
@ericgibbs I have those level shifters that you recommended. Thanks for the link, do they work for you with the WS2812b? The ones that I have are the ones that have printed LVx and HVx onto the circuit board. I want to install about 20 meters of WS2812b and have a stable configuration.
Many people say that this level sshifter that I currently have is to slow for this application and that I should go with the 74AHCT125


The WS2812b need 5V on the data line. My ESP32 running WSLED putss out a HI of only 3.3V
I appreciate your explanation, I understand better now.
 

ericgibbs

Joined Jan 29, 2010
21,420
hi huram,
Reading some background info on the WSLED with the ESP32
As you state, a step-up level shifter is required 3,3V to 5V

Why do you need a 5V down to 3.3V level shifter for the standard ESP32 to WSLED configuration?

You say your string is 20mtrs, the d/s for WSLED states not more than 3 mtrs, without increase circuit.

Please post a sketch showing the interconnections and the logic levels and switching times.

E
 

Thread Starter

huramentzefix

Joined Dec 23, 2018
27
@ericgibbs
I was probably confusing others with my own confusion?

I have been using the ESP32 with the WS2812b with 3.3V without level shifter previously and had no problem with 3 meters.
With 5 meters I had success in some cases and others I didn't. But the datasheet calls for 5V.

If you just run some effects it's achievable on 3.3V over 5m. But if you want to use them to illuminate the room and you talk to each of the 300 LED's (60 LED's per meter) at the same time.

I used the analog level shifter in the amazon link that you have sent me and this worked fine for 5 meters.
You are correct, I need to shift up the 3.3V signal to be 5V, not the other way. As of longer runs (15m), people have successfully done it with certain resistors (which depend on length of data wire). But for longer runs the data cable needs to be short, twisted with negative and the level-upshifter has to be fast and of high quality.

My strips have 60 LED per meter only, those are not the 144's

Yes they say not longer than 3 meters because the current gets too high for the small conductor on the strip.
Supposedly power consumption can go up to 36mA for each LED with all 3 colors on high. This is not good practice though because of heat and will damage the strips without a proper heatsink.
I have a 5V 60A power supply and inject power every 2 meters.

I am using WLED on an ESP32 and from what I remember, I can split the 20 meters and put the WLED controller in the middle and then use 2 output pins.
 

ericgibbs

Joined Jan 29, 2010
21,420
Hi huram,

Have you tried inserting a 74AHCT125, powered by 5V, between two of the 3 or 5 mtr strips, this would act as a repeater buffer for the data signal?

If this works OK, insert a 74AHCT125 between every 3mtr LED strip section, to square up and amplify the data signal between strips.

It is a common practice in data transmission to use a repeater buffer

Also, I guess you are aware of the ‘increasing Red tinge’ of an intended White LED which occurs due to the power losses which occurs in the longer LED stings?

E
 

Ian0

Joined Aug 7, 2020
13,117
74HCT125 would be ideal. Run it from a 5V supply. The maximum input is 5.5V (before the upper protection diode starts to conduct) The input threshold is ideal for 3.3V logic. Connect the output enable to 0V to enable the output. It is not bi-directional, but you don't need bi-directional to drive a WS2812.
 

joeyd999

Joined Jun 6, 2011
6,252
74HCT125 would be ideal. Run it from a 5V supply. The maximum input is 5.5V (before the upper protection diode starts to conduct) The input threshold is ideal for 3.3V logic. Connect the output enable to 0V to enable the output. It is not bi-directional, but you don't need bi-directional to drive a WS2812.
The TS5A3160 mentioned above works just as well, and in a much smaller package.
 

Thread Starter

huramentzefix

Joined Dec 23, 2018
27
I have watched a video about the WS2812b LED chips by a guy that explained it very in detail.
His information was that per pin for super performance should only be used 512 LED's.
That is 17 meters.
But the WLED controller can be in the middle and the strip will still funtion as one.
Several ESP32 controller can be synced.

I have a 5V 60A power supply. Whether you believe the data of each LED drawing 0.038A with all colors at high or 0.02A it's enough.
And I am injecting power every 2 meters. due to the high loss in the strip.

Have you tried inserting a 74AHCT125, powered by 5V, between two of the 3 or 5 mtr strips, this would act as a repeater buffer for the data signal?
No I haven't tried that yet. I wasn't aware of that option. Thanks a lot, I love to learn from you guys.
Since I am injecting power every 3 meters I won't have a problem of powering the 74AHCT125.
Thanks for the idea, I will try without and if I struggle then I will put in this repeater before the point where the LED's start to act up.

Also, I guess you are aware of the ‘increasing Red tinge’ of an intended White LED which occurs due to the power losses which occurs in the longer LED stings?
Yes thanks but I am "injecting" = injecting power to the strip every couple of meters.

I was under the impression that most addressable chips had "signal reforming" and all you really need is good power distribution.
If the string is short then you can just run it of the 3.3V pin of the ESP32 using WLED.
There are guys that run 15 meters (possibly of 3.3V?) data line without power injection.
like this guy here on youtube, fast forward to 07:15
If you only address a couple leds for effects then that's fine.
But if you want to also use them for illumination and talk to 1000 chips in 3 colors at the same time, then these strips can get "very funny".

And sometimes everything works fine for a while and then starts to do strange things.
thanks to you guys here I have confirmed that the 74AHCT125 is suitable for the job.
And in addition I have learned that I can even use it as repeater.


@Ian0 thanks for the hint with the SN74AHCT1G125 SOT26, that also would work well with a breadboard.

@joeyd999 Thanks, but I want something that works. Not smaller, not cheaper. If it's better that would be great. In the ceiling where I will be installing it is awkward to get to. I want to install it and move on onto something else, and not have then some close by led lights, transformer or the router disturbing it, what then would bother me.
 
Top