Author Topic: NMOS or NPN for inverting open drain signal, which is lower current?  (Read 750 times)

0 Members and 1 Guest are viewing this topic.

Offline luke-pTopic starter

  • Newbie
  • Posts: 6
  • Country: nl
I have an open drain input with an 115200 baud serial line, these are the two options (resistor values are placeholder): 2086535-0 or 2086541-1

I'd like to draw as little current from the +5V line as possible without distorting the signal but I'm not sure what the best choice is, a small signal mosfet like 2N7002H has very low gate capacitance so the rise time is probably acceptable with a 10k pull-up or even higher. The mosfet also doesn't need current to flow through the gate like the base of a BJT. I'm not sure how to calculate rise time for an NPN transistor?

I know some kind of schmitt trigger inverter would probably be the best solution but this is for an existing PCB with a SOT23 footprint.
 

Online iMo

  • Super Contributor
  • ***
  • Posts: 4790
  • Country: pm
  • It's important to try new things..
Re: NMOS or NPN for inverting open drain signal, which is lower current?
« Reply #1 on: March 27, 2024, 01:30:18 pm »
For 115k2 both schematics should work fine, no need to calculate r/f times (the input capacitancies for small signal bipolar transistors are well below say 200pF incl Miller's parasitic cap).
PS: say 200pF*10k=2usecs
« Last Edit: March 27, 2024, 02:20:10 pm by iMo »
 
The following users thanked this post: luke-p

Offline Peabody

  • Super Contributor
  • ***
  • Posts: 2007
  • Country: us
Re: NMOS or NPN for inverting open drain signal, which is lower current?
« Reply #2 on: March 27, 2024, 04:31:48 pm »
Why is it necessary to involve the 5V rail at all?  Wouldn't the 2N7002 work at 3.3V G/S?  And the bipolar certainly would.

Do you absolutely have to have inversion?  If not, you could connect the mosfet source to the open collector, and the gate to the 3.3V rail.  Eliminate the pullup resistor entirely.
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16620
  • Country: us
  • DavidH
Re: NMOS or NPN for inverting open drain signal, which is lower current?
« Reply #3 on: March 27, 2024, 11:07:40 pm »
The difference in current is somewhere between 0 and 500 microamps depending on the data pattern; they both draw the same current when the input is low.

I'm not sure how to calculate rise time for an NPN transistor?

The output capacitance determines the rise time, so the bipolar transistor is likely 5 times faster because of lower output capacitance, but in an RS-232 application it is irrelevant as both circuits are plenty fast.
 
The following users thanked this post: Nominal Animal

Offline luke-pTopic starter

  • Newbie
  • Posts: 6
  • Country: nl
Re: NMOS or NPN for inverting open drain signal, which is lower current?
« Reply #4 on: March 28, 2024, 12:19:49 pm »
For 115k2 both schematics should work fine, no need to calculate r/f times (the input capacitancies for small signal bipolar transistors are well below say 200pF incl Miller's parasitic cap).
PS: say 200pF*10k=2usecs

Thanks, I guess for this application it doesn't matter that much. I'm sort of interested in the theory but don't really have time, I'll install pspice and try some stuff later.

Why is it necessary to involve the 5V rail at all?  Wouldn't the 2N7002 work at 3.3V G/S?  And the bipolar certainly would.

Do you absolutely have to have inversion?  If not, you could connect the mosfet source to the open collector, and the gate to the 3.3V rail.  Eliminate the pullup resistor entirely.

Good point about the 5V rail, but this is an existing board, all I'd like to change are the component values.

The output capacitance determines the rise time, so the bipolar transistor is likely 5 times faster because of lower output capacitance, but in an RS-232 application it is irrelevant as both circuits are plenty fast.

I may be misunderstanding but the output capacitance would affect the 3.3V signal right? I was worried about the delay of the gate being pulled high introducing timing errors but I just realised a few µs delay on every falling edge of the output doesn't matter at all because they don't compound.
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19527
  • Country: gb
  • 0999
Re: NMOS or NPN for inverting open drain signal, which is lower current?
« Reply #5 on: March 28, 2024, 01:38:28 pm »
The difference in current is somewhere between 0 and 500 microamps depending on the data pattern; they both draw the same current when the input is low.

I'm not sure how to calculate rise time for an NPN transistor?

The output capacitance determines the rise time, so the bipolar transistor is likely 5 times faster because of lower output capacitance, but in an RS-232 application it is irrelevant as both circuits are plenty fast.
It depends on the device. A signal MOSFET such as 2SK1829 is comparable to small BJTs and it doesn't have any storage time.
https://docs.rs-online.com/3357/0900766b814b2fb8.pdf
 

Offline Terry Bites

  • Super Contributor
  • ***
  • Posts: 2393
  • Country: gb
  • Recovering Electrical Engineer
Re: NMOS or NPN for inverting open drain signal, which is lower current?
« Reply #6 on: March 29, 2024, 10:06:13 am »
You can add a second transistor in a common base (sadly neglected but handy amplifier) configuration to boost the speed bog standard devices.
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16620
  • Country: us
  • DavidH
Re: NMOS or NPN for inverting open drain signal, which is lower current?
« Reply #7 on: March 29, 2024, 08:44:31 pm »
Quote
I'm not sure how to calculate rise time for an NPN transistor?

The output capacitance determines the rise time, so the bipolar transistor is likely 5 times faster because of lower output capacitance, but in an RS-232 application it is irrelevant as both circuits are plenty fast.

It depends on the device. A signal MOSFET such as 2SK1829 is comparable to small BJTs and it doesn't have any storage time.
https://docs.rs-online.com/3357/0900766b814b2fb8.pdf

Even the 2SK1829 is slower, although I would worry more about availability.  Storage time can be removed with schottky diode baker clamp, or use a fast saturated switch, but for this application it will not matter.  Any of the options are sufficiently fast in all respects.

You can add a second transistor in a common base (sadly neglected but handy amplifier) configuration to boost the speed bog standard devices.

Hehe, you reinvented TTL.
« Last Edit: March 29, 2024, 08:46:25 pm by David Hess »
 

Online Nominal Animal

  • Super Contributor
  • ***
  • Posts: 6264
  • Country: fi
    • My home page and email address
Re: NMOS or NPN for inverting open drain signal, which is lower current?
« Reply #8 on: March 29, 2024, 10:03:39 pm »
this is for an existing PCB with a SOT23 footprint.
You could bodge a 74LVC1G14 in SOT25-5 (single Schmitt trigger inverter) in the SOT23-3 footprint for 2N7002H.  The two footprints have the same size, just a different number of pins,
       D      +   Y
    [SOT23]  [SOT25]
     G   S    * A -
so by shifting the SOT25 left by 0.95mm (half the distance between G and S) you get A=G (input) and Y=D (output, inverted).  -=S needs to be bridged (the pin is directly opposite to D, so very close to S), and you need to provide the VCC to the + pin, and you might even add a 100nF cap between + and - for supply noise induced in the VCC bodge wire.  * is not connected in the 74LVC1G14.

It is a bodge, but doable, I believe.  (This is the reason I like SOT23 and SOT25: small, but not so small you cannot bodge or dead-bug it.)

Personally, for open drain inputs and outputs, I prefer to use NXP NX138AK in SOT-23, like in this dual 12V PWM fan controller (where the tachometer output is two pulses per rotation with an open collector output with a pull-up to 12V, and PWM input is an open collector input at 25 kHz).  Simulating in KiCAD/ngspice indicates 125kHz yields very nice output using your nmos circuit.  The rise time I get with 10k pull-up to 3.3V is about 160ns; with a 4.7k pull-up to 3.3V, it halves to about 80ns.  I don't have suitable test equipment to actually measure it in real life, though.
 

Offline fourfathom

  • Super Contributor
  • ***
  • Posts: 1884
  • Country: us
Re: NMOS or NPN for inverting open drain signal, which is lower current?
« Reply #9 on: March 29, 2024, 10:46:22 pm »
You can add a second transistor in a common base (sadly neglected but handy amplifier) configuration to boost the speed bog standard devices.

What is D1 doing? (It's the 1N4148 between the common-base transistor emitter and ground)
We'll search out every place a sick, twisted, solitary misfit might run to! -- I'll start with Radio Shack.
 
The following users thanked this post: NaDobraNich


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf