Author Topic: Can I level shift without inverting using a single NMOS?  (Read 1598 times)

0 Members and 1 Guest are viewing this topic.

Offline drakejestTopic starter

  • Regular Contributor
  • *
  • Posts: 200
  • Country: 00
Can I level shift without inverting using a single NMOS?
« on: August 02, 2021, 12:38:41 pm »
Is there anyway to reliably level shift without inverting the output signal using a single NMOS? Preferbly using the 2n7002 NMOS because i already have those on hand.

Can it be done like in sparkfuns schematics?



What would be the ratings of the level shifter? my highest voltage i can shift to is the DS rating on the NMOS? How about the drive capability, i would guess that i should limit the drive current on what my mCU gpio can signk right?
« Last Edit: August 02, 2021, 12:46:53 pm by drakejest »
 

Offline fcb

  • Super Contributor
  • ***
  • Posts: 2117
  • Country: gb
  • Test instrument designer/G1YWC
    • Electron Plus
Re: Can I level shift without inverting using a single NMOS?
« Reply #1 on: August 02, 2021, 12:55:16 pm »
Yes. That's a pretty common way of doing it, should work fine with 2N7002 if the supplies are say 3.3 and 5.

Can even work shifting between 1.8V and 10V although you are close to the lower borderline (defined by Vgs of the MOSFET, you are in (or close to) the linear region and speed will be an issue as well as temperature dependencies).
https://electron.plus Power Analysers, VI Signature Testers, Voltage References, Picoammeters, Curve Tracers.
 
The following users thanked this post: drakejest

Offline drakejestTopic starter

  • Regular Contributor
  • *
  • Posts: 200
  • Country: 00
Re: Can I level shift without inverting using a single NMOS?
« Reply #2 on: August 02, 2021, 01:14:20 pm »
Speed not much of an issue, im running it at relatively low speeds 100 - 400 kHz. what about its drive capabilities though?

Also im confused arent mosfets 'bi-directionnal' when turned on ? so what is preventing the high voltage going into the low voltage?
 

Offline razvan784

  • Regular Contributor
  • *
  • Posts: 90
  • Country: ro
Re: Can I level shift without inverting using a single NMOS?
« Reply #3 on: August 02, 2021, 01:39:57 pm »
Also im confused arent mosfets 'bi-directionnal' when turned on ? so what is preventing the high voltage going into the low voltage?
Yes, but the mosfet is only on when the signal is low. When the signal is high the mosfet is off, but mind the body diode, which is also off when connected from the side with the lower supply towards the one with the higher supply.
 

Offline jpanhalt

  • Super Contributor
  • ***
  • Posts: 3466
  • Country: us
Re: Can I level shift without inverting using a single NMOS?
« Reply #4 on: August 02, 2021, 01:47:28 pm »
This is my old link to the Philips/NXP (AN97055) shifter: https://www.nxp.com/docs/en/application-note/AN10441.pdf

It should go directly to the newer version of the application note, AN10441.  See section 2.1.1 of the new version.
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19494
  • Country: gb
  • 0999
Re: Can I level shift without inverting using a single NMOS?
« Reply #5 on: August 03, 2021, 08:05:35 am »
The circuit will also work with a BJT, but it gets run in reverse, so it can't level shift by more than 5V.
« Last Edit: August 03, 2021, 08:07:40 am by Zero999 »
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21658
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Can I level shift without inverting using a single NMOS?
« Reply #6 on: August 03, 2021, 01:55:51 pm »
Why invert the BJT? It works just fine in the normal way, and to much higher voltages.

Note that a speed-up cap (say 47pF across R2) may prove beneficial.  The input drive has to be symmetrical, which is usually the case (CMOS driving pin).

I've used a similar mechanism in other circuits before; here's a complementary 12V level shifter for example:
https://www.seventransistorlabs.com/Class_D_Amp.pdf
Specifically, after IC1B; note that its output only pulls up to 2*Vbe, and it can pull down towards zero (at a few mA).  When pulling down, C2 quickly shunts off Q3, and D3+D4 biases Q4 on.  Q4 turns off a bit slower (it does go into saturation) but Q3 only turns on after Q4's storage time is done, so the timing is fairly close (within 20ns I think it was).  The pull-ups are CCS for speed, but they're not plain old CCS; in fact as one side saturates, base bias is shunted (D6-D7 drop less then 2*Vbe) saving bias current into the low side.  More specifically, it acts as a current mirror, so the wasted bias current will about equal the load current.  (Which as this is a gate driver, DC bias is about zero, so it's pretty efficient.)

When a similar cross-coupling drive is used with PMOS, you have a very similar circuit as used in actual CMOS level shifters.  (The difference there is, the PMOS Rds(on) is made relatively large so they act as conditional pull-ups that the NMOS can still pull down, and the gate and drain are cross connected so they act as a flip-flop, which removes static current draw.)

The main trouble with discrete MOS is -- besides the obligatory* body diode -- the capacitance is just so high.  They're all made for switching modest loads, not light logic signals.  Mostly super old types too (like BSS138 and 2N7002).  And RF transistors don't offer anything, as they've been cycled through regularly as technology and applications advance; you can get a 60GHz transistor today, but nothing for just a few.

*There are very few devices available with separate substrate pin anymore; mostly for odd edge cases like battery switching, so rated for much more current (higher capacitance) than is useful for logic signals.

So if you do need speed, and can't afford the lower pull-up resistors and everything, BJTs may be an option.  You do need the extra resistor(s) though.

Tim
« Last Edit: August 03, 2021, 01:57:45 pm by T3sl4co1l »
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline langwadt

  • Super Contributor
  • ***
  • Posts: 4414
  • Country: dk
Re: Can I level shift without inverting using a single NMOS?
« Reply #7 on: August 03, 2021, 03:38:16 pm »
The circuit will also work with a BJT, but it gets run in reverse, so it can't level shift by more than 5V.


I'd think the MOS version has a slight advantage in that the body diode speeds up the first part of the rising edge
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21658
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Can I level shift without inverting using a single NMOS?
« Reply #8 on: August 03, 2021, 06:25:53 pm »
I'd think the MOS version has a slight advantage in that the body diode speeds up the first part of the rising edge

Sure.  Though the BJT will remain saturated for a moment, while the input rises.  Good enough to drive 10s of pF through the same voltage range I'd guess?

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19494
  • Country: gb
  • 0999
Re: Can I level shift without inverting using a single NMOS?
« Reply #9 on: August 03, 2021, 06:37:53 pm »
Duh, there was no need for the BJT to be reversed.  :palm:
« Last Edit: November 10, 2021, 09:44:38 am by Zero999 »
 

Online MarkF

  • Super Contributor
  • ***
  • Posts: 2542
  • Country: us
Re: Can I level shift without inverting using a single NMOS?
« Reply #10 on: August 03, 2021, 07:07:58 pm »
Two interesting videos I found:

  1)  This first one describes using the body diode of the MOSFET to provide bi-directional operation



  2)  This second video has a detailed description and demo with the effects of frequency and source output impedance effecting the low level voltage


« Last Edit: August 04, 2021, 09:46:59 am by MarkF »
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19494
  • Country: gb
  • 0999
Re: Can I level shift without inverting using a single NMOS?
« Reply #11 on: August 03, 2021, 10:00:40 pm »
The circuit will also work with a BJT, but it gets run in reverse, so it can't level shift by more than 5V.


I'd think the MOS version has a slight advantage in that the body diode speeds up the first part of the rising edge
I agree that the MOSFET version is generally better in most applications, but BJTs are generally cheaper. The only other advantage of the BJT version is it will work at a lower voltage.

 

Offline NiHaoMike

  • Super Contributor
  • ***
  • Posts: 9008
  • Country: us
  • "Don't turn it on - Take it apart!"
    • Facebook Page
Re: Can I level shift without inverting using a single NMOS?
« Reply #12 on: August 04, 2021, 02:35:50 am »
A short video about level translation:
Cryptocurrency has taught me to love math and at the same time be baffled by it.

Cryptocurrency lesson 0: Altcoins and Bitcoin are not the same thing.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf