Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Switching two circuits with MOSFET

Status
Not open for further replies.

Andy_123

Member
Need s little help here:

I have two circuits referenced to the same common.

One is output 16V 30mA fixed from TPS61040.
Second is variable 0-10V output from LM358.
Both connected to the same terminal but only one is active at any time controlled by a Microcontroller.

I want to use two N-channel MOSFET transistors to control them.
The issue is that MOSFET has internal Zener that feeds inactive power source back from the active circuit.
I can add a diode for 16V line, but I can't have any voltage drop in 0-10V circuit.

I am thinking to use two N-MOSFETs in opposite directions but this is not clean solution IMO

Any ideas how can I correct it?
 
Last edited:
How much current does the second circuit draw?
 
LM358 circuit provides less than 1mA.

I also need to correct that second circuit is actually 2-10V, I don't have to go below 2V and it is controlled by PWM from the microcontroller
 
Last edited:
For the +10V you can use a logic-level (5V gate voltage to be fully on) N-MOSFET with the gate switched between 16V and ground to turn it on and off.

For the +16V you can use a standard P-MOSFET with gate switched between ground and 16V to turn it on and off. (To use an N-MOSFET you would need a voltage of at least 21V to turn in on and I assume you don't have that available).

Two transistors back-to-back is likely the simplest way to switch each of your voltages while avoiding any feed-through from the opposite voltage (or a diode and 1 transistor for the 16V if you prefer).
 
For the +10V you can use a logic-level (5V gate voltage to be fully on) N-MOSFET with the gate switched between 16V and ground to turn it on and off.
-No sure if I understood: do you mean to use a n-MOSFET without an internal zener? Can you be more specific? And I am not sure how can I get if I can have 16V on the gate...
For the +16V you can use a standard P-MOSFET with gate switched between ground and 16V to turn it on and off. (To use an N-MOSFET you would need a voltage of at least 21V to turn in on and I assume you don't have that available).
Why do I need 21V for N-MOSFET? Where extra 5V are coming from?
 
I think I figured out a better solution:
Why not to have only one output from LM358 with range 2-16V and when I need 16V, simply switch PWM to 100%
LM358 is powered from 16V anyway and can handle up to 40mA and I realistically need not more than 21mA.
 
To turn on a logic level N-MOSFET the gate needs to be at least 5V above the source-drain voltage which in this case 16V. That's why I said you needed 21V but assumed you didn't have that available and that's why you needed to use a P-MOSFET.

Sounds like you solution to use the LM358 for everything is the best.
 
Last edited:
The output voltage of the LM358 won't reach 16V if powered from 16V; it will be couple of volts less. You can get around this by using a PMOSFET on the output of the LM358. Note that the mosfet will invert the output of the LM358, so you'll have to swap the inverting and non-inverting inputs.
 
LM358 won't reach 16V if powered from 16V
I know that, I really can live with 15V and I can bump tps61040 voltage up to 18V so I can get output voltage I need.
My only worry is the output limitations of LM358 at 16V, that at 20mA will be over 0.3W at the load.
It looks like I may need a transistor anyway.
 
I am not sure if I need MOSFET at this point, here is what I got for 2-10V and 16V output with 21mA capacity
PWM is coming from 3.3V Microcontroller

Voltage mode.JPG
 
Do you need D4? Presumably D2 is to prevent a capacitive load trying to drive current through the opamp if it's unpowered?
 
D2 and D4 needed to isolate this supply from the rest of the circuit.
This is actually part of multifunction device that also provides 4-20mA constant current source.
It will be using 16V power to power the loop.
The loop can be also externally powered and D2 will prevent an external power supply from backfeeding OP Amp
while D4 needed for loop to function with external power and 16V Amp off.

Here is a current regulator I am planning to use (not tested yet).
Load is always connected beween BLK and RED
GND never exposed outside

Current mode.jpg
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top