Go Down

Topic: [SOLVED] Logic Level Shifter with 2N7000 not working (Read 2324 times) previous topic - next topic

allanhurst

#15
Aug 19, 2018, 11:37 pm Last Edit: Aug 19, 2018, 11:40 pm by 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.

Could someone remind me and help the OP?

Allan

jremington

#16
Aug 19, 2018, 11:41 pm Last Edit: Aug 19, 2018, 11:48 pm by jremington
Perhaps you can find a logic level MOSFET in a TO-92 package.
No PM's please.

Grumpy_Mike

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.

PaulRB

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?

allanhurst

#20
Aug 20, 2018, 12:57 am Last Edit: Aug 20, 2018, 01:07 am by allanhurst
2.5GHz sampling - yep - that'd be plenty. But 10x oversampling is generally considered adequate.

Allan

Grumpy_Mike

#21
Aug 20, 2018, 12:59 am Last Edit: Aug 20, 2018, 12:59 am by Grumpy_Mike
Can you identify the mosfets on the 4-channel board? They seem to work OK. Perhaps they are available in to-92.
They are BSS138. They don't come in TO-92

Quote
Can you suggest something in to-92?
I think you will struggle to find one. However the BSS138 is easy enough to solder on strip board.


ReverseEMF

Looking at the level shifter provided by Adafruit, their description of the device recommends applications with signaling frequencies at or below 2MHz.  And, level shifting on those addressable RGB LED modules is rather finicky.  So, I'm guessing there just isn't enough bandwidth to convey a proper signal.

So, I recommend the following:
  • Change your 10k pull-ups [R1 and R2] to something more like 4.7k or even as low as 2.2k.  This may speed the thing up.
  • As Grumpy_Mike suggested, a MOSFET designed for lower voltages might help [the Adafruit version uses BSS138 -- but that's not to92, so something similar in a through-hole package--like, maybe VN3205 or VN10K].
  • If none of that works, then. As larry_d suggested, do this in a common Source arrangement -- since it doesn't need to be bidirectional.
"It's a big galaxy, Mr. Scott"

Please DON'T Private Message to me, what should be part of the Public Conversation -- especially if it's to correct a mistake, or contradict a statement!  Let it ALL hang out!!

Wawa

#23
Aug 20, 2018, 01:10 am Last Edit: Aug 20, 2018, 01:22 am by Wawa
The 2N7000s you have might have a threshold voltage of >=3volt, making them useless for a 3.3volt level shifter.

Try to measure threshold voltage with a DMM.
Connect (short) gate to drain, and measure between drain (+ lead) and source (-lead) with the meter set to diode test.
You should get the threshold voltage on the meter, or nothing at all if Vgs(th) is >3volt.
Leo..

Grumpy_Mike

Remember the threshold voltage is just the point where it starts to switch on. Or more precisely the point where it turns off. You need to be able to exceed the threshold voltage not just match it.

The 2N7000 data sheet says the threshold voltage is lower for lower currents than 1mA so you need to increase that pull up resistor not decrease it.

PaulRB

2.5GHz sampling - yep - that'd be plenty.
I made a typo, I meant to say 2.5MHz!

MarkT

The 2N7000s you have might have a threshold voltage of >=3volt, making them useless for a 3.3volt level shifter.
Its the plateau voltage that counts, the threshold voltage is a useless parameter for switching use.
Quote
Try to measure threshold voltage with a DMM.
Connect (short) gate to drain, and measure between drain (+ lead) and source (-lead) with the meter set to diode test.
You should get the threshold voltage on the meter, or nothing at all if Vgs(th) is >3volt.
Leo..

That's not the threshold voltage, that's probably somewhere close to the plateau, but the current is probably
too low for reliable value.

Normally you've drive the gate with about twice the plateau voltage for good solid switching.

If you don't understand "plateau", just looking at the gate charge graph in any MOSFET datasheet will
explain.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

Wawa

That's not the threshold voltage, that's probably somewhere close to the plateau, but the current is probably
too low for reliable value.
The DMMs I have measure diodes with a constant current of about 1mA.
Vgs(th) of many mosfets (including the 2N7000) are specified at that current.

Was wrong about the maximum measuring voltage of those DMMs. It's 2volt max.
So you can't measure Vgs(th) of a 2N7000 (2.1volt typical).

Several other true logic level mosfets I have do measure Vgs(th) correctly, at about 1.5-1.8volt.
Could be a crude/easy way to test for logic level or not.
Leo..

PaulRB

#28
Aug 20, 2018, 08:26 pm Last Edit: Aug 20, 2018, 08:33 pm by PaulRB
Thanks everyone for the guidance and component suggestions.

I have known about the difference between logic level and other MOSFETs for years when it comes to power MOSFETs (to-220). Don't know why I did not think that difference would be equally important in lower current MOSFETs also.

I still don't quite understand why 2n7000 is so often used for 3.3-5V level conversion in i2c bus lines but does not work with ws2811 signal conversion. Data rates are if anything lower, and currents are also small.

I am considering buying a few bss138 and sot-23 breadboard adaptors for prototyping work. All readily available and cheap on eBay. On the other hand, I can buy the 4-channel adaptors for £4 for 4 also, from UK suppliers, and no fiddly soldering to do.

I looked up vn3205. 14A through a to-92 package? I didn't think it possible! Only 1W dissipation, so need to be very careful about minimising the on-resistance. But still, the thought of 14A through those tiny pins...

Wawa

#29
Aug 20, 2018, 10:11 pm Last Edit: Aug 20, 2018, 10:23 pm by Wawa
I wonder if you could cut one of those addressable LEDs from the strip, and power it from say 4-4.2volt.
Then the first LED is driven within specs, and translates levels for the first pixel in the string also within specs.

One normal diode or two schottky diodes on series between strip 5volt and single pixel VCC,
with a (~330ohm) resistor between single pixel VCC and ground could do it.
Leo..

Go Up