Author Topic: Switching 12V load with N-channel mosfet working with 5V  (Read 9577 times)

0 Members and 1 Guest are viewing this topic.

Offline newtekuserTopic starter

  • Frequent Contributor
  • **
  • Posts: 457
  • Country: us
Switching 12V load with N-channel mosfet working with 5V
« on: April 06, 2024, 12:07:37 am »
Hi All,

I'd like to use an n-channel MOSFET to switch a 12V load (1Amp max likely half) for less than 1 minute and drive it with 5V. Found this one on DigiKey but it's no longer being sold and the substitute parts can be driven by less than 5V: https://www.digikey.com/en/products/detail/onsemi/fqd30n06ltf/1054801
Can someone please recommend an alternative that can serve my purpose and work with 5V?

Thanks!
 

Offline DavidAlfa

  • Super Contributor
  • ***
  • Posts: 6819
  • Country: es
Re: Switching 12V load with N-channel mosfet working with 5V
« Reply #1 on: April 06, 2024, 12:33:14 am »
This fet is much better: 65V, 50A, 11 mOhms @ 4.5Vgs (11mV drop per amp).
https://www.digikey.com/en/products/detail/good-ark-semiconductor/GSFD0650/18648458

With a N-ch and 5V you can only switch the low side, that means the load will be floating at 12V all the time, this is not really a problem in most scenarios.

« Last Edit: April 06, 2024, 12:40:52 am by DavidAlfa »
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 
The following users thanked this post: newtekuser

Offline newtekuserTopic starter

  • Frequent Contributor
  • **
  • Posts: 457
  • Country: us
Re: Switching 12V load with N-channel mosfet working with 5V
« Reply #2 on: April 06, 2024, 12:48:38 am »
This fet is much better: 65V, 50A, 11 mOhms @ 4.5Vgs (11mV drop per amp).
https://www.digikey.com/en/products/detail/good-ark-semiconductor/GSFD0650/18648458

With a N-ch and 5V you can only switch the low side, that means the load will be floating at 12V all the time, this is not really a problem in most scenarios.



Should I use a P-channel MOSFET instead then?
 

Offline DavidAlfa

  • Super Contributor
  • ***
  • Posts: 6819
  • Country: es
Re: Switching 12V load with N-channel mosfet working with 5V
« Reply #3 on: April 06, 2024, 01:00:01 am »
Not really.
What are you switching and how? Locally or remotely (Through wires)?
Within an enclosed device, this should be just fine.
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 


Offline DavidAlfa

  • Super Contributor
  • ***
  • Posts: 6819
  • Country: es
Re: Switching 12V load with N-channel mosfet working with 5V
« Reply #5 on: April 06, 2024, 01:27:46 am »
Then a p-ch might be better here.
The good thing is the p-ch gate will see -12V when pulled to ground, so you don't need any specific fet having low GVS.
R1/3/4 can be 100K, not need for so low value except for fast PWM.

« Last Edit: April 06, 2024, 01:30:29 am by DavidAlfa »
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 
The following users thanked this post: newtekuser

Offline newtekuserTopic starter

  • Frequent Contributor
  • **
  • Posts: 457
  • Country: us
Re: Switching 12V load with N-channel mosfet working with 5V
« Reply #6 on: April 06, 2024, 01:31:33 am »
Thank you very much!  :-+
 

Offline DavidAlfa

  • Super Contributor
  • ***
  • Posts: 6819
  • Country: es
Re: Switching 12V load with N-channel mosfet working with 5V
« Reply #7 on: April 06, 2024, 01:40:02 am »
You don't need a large fet (Except for just in case, something changes in the future), there're pretty powerful fets in small packages, 5A in sot23:
https://www.digikey.com/en/products/detail/goford-semiconductor/G05P06L/16394401

But if you can afford the space and a little extra cost, it's never a bad idea to make it tough, 60A:
https://www.digikey.com/en/products/detail/good-ark-semiconductor/SSFD6025B/21724697
« Last Edit: April 06, 2024, 01:42:34 am by DavidAlfa »
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 

Offline newtekuserTopic starter

  • Frequent Contributor
  • **
  • Posts: 457
  • Country: us
Re: Switching 12V load with N-channel mosfet working with 5V
« Reply #8 on: April 06, 2024, 02:05:59 am »
Btw, is Q1 required? I thought I could get away with just the MOSFET without additional transistors.
 

Offline MarkF

  • Super Contributor
  • ***
  • Posts: 3026
  • Country: us
Re: Switching 12V load with N-channel mosfet working with 5V
« Reply #9 on: April 06, 2024, 02:07:35 am »
And you don't need R3 to pull down the NPN base.
It's a NPN.  You need current to turn it ON.
Even if QA is floating, Q1 will not turn ON.
It's just adding an extra load to the MCU pin.
Besides, the LED will provide a pull down load without R3.

Also, R1 seems a bit large.  You want R1 to limit the current
from the MCU pin and still provide enough gain through Q1 to
turn on the MOSFET (Q2).  Actually, you might want to put the
LED and R2 from Vin and Q2 collector (i.e. in parallel with R4).
Start with R1 = 1K.
 

Offline MarkF

  • Super Contributor
  • ***
  • Posts: 3026
  • Country: us
Re: Switching 12V load with N-channel mosfet working with 5V
« Reply #10 on: April 06, 2024, 02:13:07 am »
Q1 is required because your MCU pin will not be able to go to 12V.
Additionally depending on the MOSFET, you may need another resistor
between the R4 and Q1 collector (providing a voltage divider) to
limit Vgs of the MOSFET.
 
The following users thanked this post: newtekuser

Offline newtekuserTopic starter

  • Frequent Contributor
  • **
  • Posts: 457
  • Country: us
Re: Switching 12V load with N-channel mosfet working with 5V
« Reply #11 on: April 06, 2024, 02:28:20 am »
Q1 is required because your MCU pin will not be able to go to 12V.
Additionally depending on the MOSFET, you may need another resistor
between the R4 and Q1 collector (providing a voltage divider) to
limit Vgs of the MOSFET.

Thank you! However, how is this guy pulling this off with just the MOSFET, or is this bad practice?
(at min 2:20)

I'm using a PIC16F887 btw.
 

Offline Kim Christensen

  • Super Contributor
  • ***
  • Posts: 1819
  • Country: ca
Re: Switching 12V load with N-channel mosfet working with 5V
« Reply #12 on: April 06, 2024, 03:24:36 am »
Thank you! However, how is this guy pulling this off with just the MOSFET, or is this bad practice?

He's getting away with it by using a second isolated power supply for the Arduino. It won't work with just a single 12V supply.
Use DavidAlfa's circuit instead. That way, you don't need a 2nd isolated power supply.
 
The following users thanked this post: newtekuser

Offline Psi

  • Super Contributor
  • ***
  • Posts: 11391
  • Country: nz
Re: Switching 12V load with N-channel mosfet working with 5V
« Reply #13 on: April 06, 2024, 03:36:30 am »
If only switching 1A max, either use a Nfet in ground feed or a Pfet in power feed.
The complexity of Nfet in power feed is only justifiable if you cant use a Pfet for some reason, like you need high current / low Rds on.
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline newtekuserTopic starter

  • Frequent Contributor
  • **
  • Posts: 457
  • Country: us
Re: Switching 12V load with N-channel mosfet working with 5V
« Reply #14 on: April 06, 2024, 03:42:22 pm »
Q1 is required because your MCU pin will not be able to go to 12V.
Additionally depending on the MOSFET, you may need another resistor
between the R4 and Q1 collector (providing a voltage divider) to
limit Vgs of the MOSFET.

I was confused by this until I've done more reading and learned about higher voltage thresholds required for p-channel.
Btw, would this work in place of the 2N3904 NPN? MMBT3904-7-F (https://www.mouser.com/ProductDetail/621-MMBT3904-F)
 

Offline Kim Christensen

  • Super Contributor
  • ***
  • Posts: 1819
  • Country: ca
Re: Switching 12V load with N-channel mosfet working with 5V
« Reply #15 on: April 06, 2024, 04:04:47 pm »
Btw, would this work in place of the 2N3904 NPN? MMBT3904-7-F (https://www.mouser.com/ProductDetail/621-MMBT3904-F)

It will... Just be aware that the MMBT3904-7-F is the SOT23 surface mount version. A NPN transistor in a TO-92 package may be a better pick depending on your soldering skills, size requirements, etc.

« Last Edit: April 06, 2024, 04:06:50 pm by Kim Christensen »
 

Offline newtekuserTopic starter

  • Frequent Contributor
  • **
  • Posts: 457
  • Country: us
Re: Switching 12V load with N-channel mosfet working with 5V
« Reply #16 on: April 06, 2024, 04:15:54 pm »
Btw, would this work in place of the 2N3904 NPN? MMBT3904-7-F (https://www.mouser.com/ProductDetail/621-MMBT3904-F)

It will... Just be aware that the MMBT3904-7-F is the SOT23 surface mount version. A NPN transistor in a TO-92 package may be a better pick depending on your soldering skills, size requirements, etc.

Great!  :-+ I do know how painful SOT23s are to hot air solder. Fortunately this time I'll be using my pnp machine (YY1) for the board assembly as the rest of components are SMDs.
 

Offline xvr

  • Frequent Contributor
  • **
  • Posts: 771
  • Country: ie
    • LinkedIn
Re: Switching 12V load with N-channel mosfet working with 5V
« Reply #17 on: April 06, 2024, 04:28:21 pm »
Alternatively you can use Smart Switch (https://www.digikey.ie/en/products/detail/onsemi/NCV84090DR2G/16528514). It's a little bit expensive, but just 1 IC (+decoupling capacitor) for all

If you don't like SMD package, you can take more powerful Smart Switch in TO-220
 
The following users thanked this post: newtekuser

Offline MarkF

  • Super Contributor
  • ***
  • Posts: 3026
  • Country: us
Re: Switching 12V load with N-channel mosfet working with 5V
« Reply #18 on: April 06, 2024, 04:41:02 pm »
Q1 is required because your MCU pin will not be able to go to 12V.
Additionally depending on the MOSFET, you may need another resistor
between the R4 and Q1 collector (providing a voltage divider) to
limit Vgs of the MOSFET.

I was confused by this until I've done more reading and learned about higher voltage thresholds required for p-channel.
Btw, would this work in place of the 2N3904 NPN? MMBT3904-7-F (https://www.mouser.com/ProductDetail/621-MMBT3904-F)

I'm not sure what you mean by "higher voltage thresholds required for p-channel".  My comment was that you need to check the maximum Vgs limit is.  For the two p-channel MOSFET mentioned above, Vgs = (-/+20V) it is not a concern since your Vin = 12V.  (For example: If Vin=24V, you could not pull the gate down the gnd because it would exceed Vgs).

You mentioned Vgs threshold.  Which is the gate voltage required to turn on the MOSFET.  Your looking at the minimum voltage.  I'm talking about the maximum voltage.

As far as the MMBT3904-7-F, it should be fine.  In this circuit, pretty much any jellybean NPN will work.


Let me restate that the LED in @DavidAlfa's circuit will never turn ON.  The voltage across the NPN base/emitter is one diode drop which is not high enough to turn on the LED.  You could put the LED before R1 or on the NPN collector as I mentioned.

Overall, I think you're looking at something like this:
  2101808-0
 
The following users thanked this post: newtekuser

Offline newtekuserTopic starter

  • Frequent Contributor
  • **
  • Posts: 457
  • Country: us
Re: Switching 12V load with N-channel mosfet working with 5V
« Reply #19 on: April 06, 2024, 04:46:15 pm »
Q1 is required because your MCU pin will not be able to go to 12V.
Additionally depending on the MOSFET, you may need another resistor
between the R4 and Q1 collector (providing a voltage divider) to
limit Vgs of the MOSFET.

I was confused by this until I've done more reading and learned about higher voltage thresholds required for p-channel.
Btw, would this work in place of the 2N3904 NPN? MMBT3904-7-F (https://www.mouser.com/ProductDetail/621-MMBT3904-F)

I'm not sure what you mean by "higher voltage thresholds required for p-channel".  My comment was that you need to check the maximum Vgs limit is.  For the two p-channel MOSFET mentioned above, Vgs = (-/+20V) it is not a concern since your Vin = 12V.  (For example: If Vin=24V, you could not pull the gate down the gnd because it would exceed Vgs).

You mentioned Vgs threshold.  Which is the gate voltage required to turn on the MOSFET.  Your looking at the minimum voltage.  I'm talking about the maximum voltage.

As far as the MMBT3904-7-F, it should be fine.  In this circuit, pretty much any jellybean NPN will work.


Let me restate that the LED in @DavidAlfa's circuit will never turn ON.  The voltage across the NPN base/emitter is one diode drop which is not high enough to turn on the LED.  You could put the LED before R1 or on the NPN collector as I mentioned.

Overall, I think you're looking at something like this:
  (Attachment Link)

Thanks, still learning! :) Btw, is there a reason for having the LED other than visual cue, or is it for adding additional load?
 

Offline MarkF

  • Super Contributor
  • ***
  • Posts: 3026
  • Country: us
Re: Switching 12V load with N-channel mosfet working with 5V
« Reply #20 on: April 06, 2024, 04:52:15 pm »
I think it was put in just for a power indicator.
It's not needed for the circuit to switch on the load.
 
The following users thanked this post: newtekuser

Offline MarkF

  • Super Contributor
  • ***
  • Posts: 3026
  • Country: us
Re: Switching 12V load with N-channel mosfet working with 5V
« Reply #21 on: April 06, 2024, 05:04:29 pm »
Alternatively you can use Smart Switch (https://www.digikey.ie/en/products/detail/onsemi/NCV84090DR2G/16528514). It's a little bit expensive, but just 1 IC (+decoupling capacitor) for all

If you don't like SMD package, you can take more powerful Smart Switch in TO-220

For that matter, you could just use one of those Arduino Relay modules.
  5v Relay Module 5V Indicator Light LED 1 Channel Relay Module for Arduino ARM PIC AVR MCU

« Last Edit: April 06, 2024, 05:08:30 pm by MarkF »
 

Offline Kim Christensen

  • Super Contributor
  • ***
  • Posts: 1819
  • Country: ca
Re: Switching 12V load with N-channel mosfet working with 5V
« Reply #22 on: April 06, 2024, 07:36:53 pm »
Great!  :-+ I do know how painful SOT23s are to hot air solder. Fortunately this time I'll be using my pnp machine (YY1) for the board assembly as the rest of components are SMDs.

No offence, but I'm having a hard time squaring the fact that you have a $4000 pnp machine, yet are having difficulty with a relatively simple circuit. Does someone else normally design the circuits and PCBs for you?

 

Offline newtekuserTopic starter

  • Frequent Contributor
  • **
  • Posts: 457
  • Country: us
Re: Switching 12V load with N-channel mosfet working with 5V
« Reply #23 on: May 27, 2024, 05:22:22 pm »
Q1 is required because your MCU pin will not be able to go to 12V.
Additionally depending on the MOSFET, you may need another resistor
between the R4 and Q1 collector (providing a voltage divider) to
limit Vgs of the MOSFET.

I was confused by this until I've done more reading and learned about higher voltage thresholds required for p-channel.
Btw, would this work in place of the 2N3904 NPN? MMBT3904-7-F (https://www.mouser.com/ProductDetail/621-MMBT3904-F)

I'm not sure what you mean by "higher voltage thresholds required for p-channel".  My comment was that you need to check the maximum Vgs limit is.  For the two p-channel MOSFET mentioned above, Vgs = (-/+20V) it is not a concern since your Vin = 12V.  (For example: If Vin=24V, you could not pull the gate down the gnd because it would exceed Vgs).

You mentioned Vgs threshold.  Which is the gate voltage required to turn on the MOSFET.  Your looking at the minimum voltage.  I'm talking about the maximum voltage.

As far as the MMBT3904-7-F, it should be fine.  In this circuit, pretty much any jellybean NPN will work.


Let me restate that the LED in @DavidAlfa's circuit will never turn ON.  The voltage across the NPN base/emitter is one diode drop which is not high enough to turn on the LED.  You could put the LED before R1 or on the NPN collector as I mentioned.

Overall, I think you're looking at something like this:
  (Attachment Link)

I tried to replicate the suggested circuit, but the PMOS transistor Q2 in my diagram is causing a short (current draw is 2A - once I remove it the short is gone). Did I mess up the connections between components? I can't tell.
These are the transistors in use:

NPN: https://www.mouser.com/ProductDetail/621-MMBT3904-F
PMOS: https://www.mouser.com/ProductDetail/78-SI2347DS-T1-GE3
« Last Edit: May 27, 2024, 05:23:58 pm by newtekuser »
 

Offline xvr

  • Frequent Contributor
  • **
  • Posts: 771
  • Country: ie
    • LinkedIn
Re: Switching 12V load with N-channel mosfet working with 5V
« Reply #24 on: May 27, 2024, 05:29:27 pm »
Pinout of your PMOS is different from pinout in KiCAD (and PCB). Source and Drain swapped.
NPN also have different pinout (C and E swapped)

 
The following users thanked this post: newtekuser


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf