[SOLVED] Logic Level Shifter with 2N7000 not working

I have been using one of the commonly available 4-channel logic level shifter boards between a Wemos Mini and a string of 50 ws2811 leds. Works great, all leds animating as desired, but I don't have any use for the other 3 channels in this circuit, so a bit of a waste.

Instead, I have attempted to level shift with a 2N7000 mosfet. The leds are resolutely dark. If I swap back to the 4-channel level shifter, everything works as before.

I am using a 5A 5V external PSU.

I don't have a 'scope, but I probed around a bit with my multimeter:

The mosfet gate is at 3.3V. Good.
The 5V supply reads 5.15V. Fine.
The mosfet source is around 0.58~0.60V. Obviously I am reading the average of a data stream.
The mosfet drain is at around 0.62~0.64V. Again, the average of a data stream. Higher than the source, but I expected something higher still, maybe around 0.85~0.90V, i.e. higher than the source by 5/3.3 = ~150%.

So, can anyone suggest what I'm doing wrong?

Thanks!

PS. I swapped the 2N7000 for a couple of others, in case the original was duff. No change. I suppose I could have an batch of 20 duff ones...

Here is another question that just came to me.

The 4-channel logic level shifter seems to contain only 4 mosfets (I assume that's what they are, labels say "J1Y" with the "Y" written sideways) and a few 10K resistors.

The board has ground pins in addition to pins for the 3V3 and 5V supplies. If it uses a similar circuit to the above, why does it need ground pins?

I have not seen a schematic of that board.
The GNDs on both sides of the board, would be convenient soldering pads to connect the commons between circuits.

Are you using TO92s?

Maybe recheck pin out.

larryd:
I have not seen a schematic of that board.
The GNDs on both sides of the board, would be convenient soldering pads to connect the commons between circuits.

Thanks for replying Larry. I haven't seen a schematic of them either. I suppose the ground pins might be there for the sole purpose of grounding the ground plane, for safety reasons or for interference prevention at higher frequencies.

Anyway, the important question is why my 2N7000 shifter is not working!

larryd:
Are you using TO92s?

Maybe recheck pin out.

Yes. And I did!

I even tried reversing the to92 just in case. I didn't measure with the multimeter with it like that, though.

Pinout-of-2N7000-N-channel-MOSFET.png

Bad transistor?

Ground plain, maybe, probably just convenient soldering pads for connecting circuits.

Link to PDF level conversion board from Sparkfun:

Let us check you wiring image.

Hook up the 2N7000 as a simple inverter driving a LED to see if that works.

larryd:
Bad transistor?

I tried replacing with a couple of others. I could, of course, have 20 bad ones! Purchased x20 from eBay...

larryd:
Let us check you wiring image.

I will re-build and photograph soon, maybe tomorrow evening.

Here is the circuit with the 4-channel board.

Your average voltage measurements are pretty meaningless.
Get a scope.

Or write a solid '0' and '1' to D5 and see what you get.

Allan.

PaulRB:
I tried replacing with a couple of others. I could, of course, have 20 bad ones! Purchased x20 from eBay...
I will re-build and photograph soon, maybe tomorrow evening.

Here is the circuit with the 4-channel board.

I do not see a wire connecting the two black GND busbars. :o

So, can anyone suggest what I'm doing wrong?

That circuit is based on level shifters for I2C buses.
See the attached application note.

Now what happens with an I2C bus is that the active device pulls down the bus line. However what you have here is that the pull down signal has the 300R resistor in series with it. I would try removing that for the time being.

The only time I use a FET for a WS2812 LED strip was in the Magnetic Bounce article in MagPi 69, but that was in a conventional configuration. It was successful in that the LEDs were turned on but I wasn't impressed with the waveform it produced. I used the option of an inverted clock the the Adafruit library gives you.

I think the problem with the 2N7000 is that the gate threshold can be anywhere between 0.8 and 3V, with a typical value of 2.1V with a drain current of 1mA. So I don't think that the FET you used is up to the job.

Video of project here:-

AN10441.pdf (52.4 KB)

Here's the circuit with the 2n7000

allanhurst:
Your average voltage measurements are pretty meaningless.

Agreed, in absolute voltage terms, but I would imagine that with the same data signal going in and out, the logic level shifter should give a rise in the average voltage corresponding to 3V3 vs 5V.

allanhurst:
Get a scope.

Well, I have one on my Amazon wish list...

allanhurst:
Or write a solid '0' and '1' to D5 and see what you get.

Good suggestion, will try that asap.

larryd:
I do not see a wire connecting the two black GND busbars.

The red busbar has a gap which needs a wire link to bridge it, but the black one is continuous.

Grumpy_Mike:
That circuit is based on level shifters for I2C buses.
See the attached application note.

Will study that. Thanks Mike.

Grumpy_Mike:
...the 300R resistor... try removing that

Unfortunately, no difference.

Grumpy_Mike:
I don't think that the FET you used is up to the job

Can you suggest something in to-92? Can you identify the mosfets on the 4-channel board? They seem to work OK. Perhaps they are available in to-92.

The arduino scope + pc software is amazingly good up to a few KHz - 0-5v input range - I downloaded it free from somewhere but have forgotten where.

Could someone remind me and help the OP?

Allan

Perhaps you can find a logic level MOSFET in a TO-92 package.

allanhurst:
The arduino scope + pc software is amazingly good up to a few KHz - 0-5v input range - I downloaded it free from somewhere but have forgotten where.

This is my Raspberry Pi / Arduino oscilloscope, with a 58KHz sample rate you can measure up to about 20KHz waveforms.

PaulRB:
Can you identify the mosfets on the 4-channel board? They seem to work OK. Perhaps they are available in to-92.

Seems it's BSS138. Gate threshold voltage is max 1.5V, typically 1.3V. Does not appear to be available in to-92.

Grumpy_Mike:
This is my Raspberry Pi / Arduino oscilloscope, with a 58KHz sample rate you can measure up to about 20KHz waveforms.

The ws2811 signal is around 400KHz I think. Ws2812 is twice that. So, ideally, I would need a 'scope with around 2.5GHz sample rate?