Author Topic: N-Channel MOSFET as a switch  (Read 5922 times)

0 Members and 1 Guest are viewing this topic.

Offline ChillanceTopic starter

  • Contributor
  • Posts: 44
  • Country: se
Re: N-Channel MOSFET as a switch
« Reply #25 on: May 04, 2020, 08:40:21 pm »
Wow, ok. Can you explain it? The idea with mine is the following:

Cell battery lowest priority. When connected, 3.3V is applied to the circuit.
As soon as LiPo or USB is connected, those take over and "disconnect" drainage from the Cell battery.

Next is LiPo. Take precedence over the cell battery, but when USB is connected neither Cell or Lipo is used. That is the idea here. The ideal diode schematics... I'm not sure that works like that.

Thanks!
 

Offline ChillanceTopic starter

  • Contributor
  • Posts: 44
  • Country: se
Re: N-Channel MOSFET as a switch
« Reply #26 on: May 04, 2020, 09:01:27 pm »
If you want to switch a node to 3.3V, use a pch transistor.  Connect the source to 3.3V and the drain to the node that you want to control.  When you drive the gate to ground, the drain will be driven to 3.3V.  When you drive the gate to 3.3V, the drain will float to whatever the load demands (to ground if the load is a resistor to ground).

If you want to switch a node to ground, use an nch transistor.  Connect the source to ground and the drain to the node you want to control..When you drive the gate to 3.3V, the drain will be driven to ground.  When you drive the gate to ground, the drain will float to whatever the load demands (to 3.3V if the load is a resistor to 3.3V).

And what if I want to switch a node to 3.3V when Gate goes to 5V? 0V when Gate is 0V. Essentially it will enable 3.3V to some part of the circuit (enable pin in this case). I guess this is how the n-channel works... with 3.3V on drain, 5V on gate and source then connected to the enable pin. This is why I was a bit surprised/confused when gate was 3.3V and source 2.35 V. But with 5V on the gate, I get 3.3 on source as wanted...
 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1135
  • Country: us
Re: N-Channel MOSFET as a switch
« Reply #27 on: May 04, 2020, 09:04:26 pm »
If you want to switch a node to 3.3V, use a pch transistor.  Connect the source to 3.3V and the drain to the node that you want to control.  When you drive the gate to ground, the drain will be driven to 3.3V.  When you drive the gate to 3.3V, the drain will float to whatever the load demands (to ground if the load is a resistor to ground).

If you want to switch a node to ground, use an nch transistor.  Connect the source to ground and the drain to the node you want to control..When you drive the gate to 3.3V, the drain will be driven to ground.  When you drive the gate to ground, the drain will float to whatever the load demands (to 3.3V if the load is a resistor to 3.3V).

Correct, the circuit I posted does not work like that.  Highest voltage wins in my circuit.  This is your first clear explanation of what you are trying to do  :clap:

Let me ponder

And what if I want to switch a node to 3.3V when Gate goes to 5V? 0V when Gate is 0V. Essentially it will enable 3.3V to some part of the circuit (enable pin in this case). I guess this is how the n-channel works... with 3.3V on drain, 5V on gate and source then connected to the enable pin. This is why I was a bit surprised/confused when gate was 3.3V and source 2.35 V. But with 5V on the gate, I get 3.3 on source as wanted...
[/quote]
« Last Edit: May 05, 2020, 12:21:38 pm by Wimberleytech »
 

Offline ChillanceTopic starter

  • Contributor
  • Posts: 44
  • Country: se
Re: N-Channel MOSFET as a switch
« Reply #28 on: May 05, 2020, 01:06:06 am »
Quote
Correct, the circuit I posted does not work like that.  Highest voltage wins in my circuit.  This is your first clear explanation of what you are trying to do  :clap:
Yeah, sorry about that. I do have a few scenarios I would like to understand using mosfets, but I think this "3 different powers" one is most important right now.

Not sure how involved the cell battery can be, as it's a 2032 one, at 3.3V already. Meaning, that can't go through diodes and other things to drop it's voltage. So it would need to be part of some smart circuit so it would be enabled/disabled properly like I explained earlier.
« Last Edit: May 05, 2020, 01:07:37 am by Chillance »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf