How to choose the correct MOSFET to control 5v LED strip with a 3.3v MCU?

I want to control a WS2812b LED strip with a WeMos D1 mini (ESP 8266). The LED stip operates at 5v and the MCU at 3.3v. Now I would like to use a MOSFET transistor to convert from a 3.3v signal to a 5v one. I would like to use a MOSFET instead of a Darlington Pair, because of the higher efficiency. However, it turned out to be quite difficult to find such a transistor. I made some research and I found out, that I have to look for MOSFETs which have RDS(on) or on-resistance rated at 3v or lower. But all the MOSFETS I could find have that rated at 10v. Could anyone recommend me a MOSFET which I can purchase on aliexpress or amazon (or at some other retailer that is available in Germany)?

A darlington would have been orders of magnitude too slow anyway.

Why not a 74HCTxx series logic chip, these run from 5V but accept 3V input signals happily? You can pick a non-inverting version such as AND or OR gates and avoid the signal inversion too.

How would that work? You supply 5V to one input pin and then apply the 3.3v digital signal pin to the other input and the outpin will provide a 5v signal then? Is that as fast and efficient as a MOSFET?

Also, do you have a more precise suggestion? All 74HCTxx series I could find have 10 pins or more. I just want to switch one signal from 3.3v to 5v.

Maybe this method.

I don't know. Seems sketchy to me and not suited for a permanent device. Also if you go to that article and go to the linked article "post on building level shifters", he also says, that he prefers the MOSFET version.

A 74HCT14 from your local electronics retailer.

Yes, it contains the necessary, correctly specified FETs for the purpose in the correct circuit for this specific purpose. Single FETs or BJTs or whatever will be useless.

You need to connect two of the inverters in cascade to invert the signal and invert it again to get the correct phase, the other four inverters must have their inputs connected to ground and outputs not connected.

OK so it has lots of pins (well, fourteen); there are chips that would perform the necessary function with fewer pins but you will find them much harder to obtain that this stock-standard one. (And I do not recall what they are for that very reason. :grin:)

You may find it easier to search for a "logic level" mosfet, which would have a Vgs threshold voltage of around 1-1.5V. Such a mosfet would be fully on with a gate voltage of 3.3V.

If you switch the high side, you will need a P-channel mosfet which is driven by an N-channel mosfet or NPN bipolar transistor. Or if you can switch the ground side of the LED string, you would only need an N-channel mosfet.

How much current will the mosfet be switching? Do you have a preference for the package type?

Also, you might want to read this thread:

You appear to have mis-read the OP. He is using a WS2812 strip. :face_with_raised_eyebrow:

Maybe, maybe not. It is completely irrelevant, and for the same reason. :roll_eyes:

Pretty much.

Check the datasheet, and you will find that the response time is somewhere in the order of 8ns. The Din of a WS2812 hardly draws any current, so yes.

The Dip versions of gates come standard in Dip-14 packages, but there are also smaller packages available in SMT. Those are of course not very practical to solder unless you have a PCB to put them on. I have some 74lvc1g32 's that do the trick and is the only single gate non-inverting ones i managed to find at a reasonable price. Other option would a 74lvc2g14. (dual inverter) Now one can discuss that lvc versions are not quite the same as hct, but the truth is, they work.

What do you mean? Why is a single FET not enough? Are you saying this circuit would not work?

Is this 74HCT14D.652 gonna do the trick? It's the only one that I could find, that I could actually buy here.

What does "switch the ground side of the LED string" mean? I want to switch the the signal (DIN) not the power connection.

So let me give you an example of how I think it would work and you confirm or tell me my mistake, ok? Looking at this datasheet of an 74HCT14 I would connect the VCC pin to a 5V power supply, GND to GND, Pin 1A to the signal pin of my MCU and Pin 1Y to the DIN pin of my LED strip. All the other pins would remain unconnected. Correct?

Nope. You would connect pin 1Y to 2A, and then pin 2Y to the Din of the LED strip.
The NOT-gate (Schmitt-trigger or not) will invert the signal, so you need to run it through another gate to get it back to normal.
There are of course also 'just buffers' available like the 74xx17 (also available in a 1 gate) but these are not as easily available as the NOT-gates.
7400 Series
Basically if you walk into an electronics parts shop that carries those kind of parts, you will for sure be able to walk out with a 74xx14 or a 74xx04, but a 74xx17 will probably have to be ordered.

1 Like

Ok, that makes sense. Thanks a lot.

I don't know any store that I might possibly walk in and find any of these parts. Conrad is the only one that I'm aware of that sells things like this and they don't have 74hct14 on stock. I'd have to order them via 'click & collect' in order to pick them up there.

That would be just fine it is clearly a 74HCT14, though it is in the SOIC package - "Small Outline" so small and tricky to solder to, but certainly compact.

As I explained before and Deva_Rishi has reiterated,

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.