Will the circuit attached work as a switch?

Thread Starter

goutham1995

Joined Feb 18, 2018
104
Will the mosfet (bss138) attached in the image act as a switch? Drain is connected to 5 volts.
1) What happens when my gate input is 3.3 volts?
2)What happens when my gate input is 5 volts?
3) What happens when my gate input is 0 volts?
 

Attachments

ericgibbs

Joined Jan 29, 2010
18,664
hi 1995,
The problem is with a common source ie: the load in the source, is that as soon as the bss138 conducts the current thru the load will raise the Source voltage.
So the Gate to Source voltage becomes less than 3V and the bss138 will not fully turn On.

Connect the load in the Drain circuit.

E
 

Thread Starter

goutham1995

Joined Feb 18, 2018
104

ericgibbs

Joined Jan 29, 2010
18,664
hi,
Do you mean this bss138 circuit.?
It is used as 3v to 5v to 3v Logic level shifter.
It is not suitable as drawn for use as a 60mA driver.

E
AA1 29-Aug-18 12.32.gif
 

Thread Starter

goutham1995

Joined Feb 18, 2018
104
yes, so if I replace R4 with 5 ohms, and connect HV to 5 volts (LV to 3.3 volts), the drop would be 5-(60mA*5ohms) = 4.7 volts which will keep it operational right?
 

ericgibbs

Joined Jan 29, 2010
18,664
Thats a problem, the MCU output will have to supply/sink the 60mA, usually a MCU output limited to approx 20mA.

The circuit is not a current amplifier, its just a switch.
E

EDIT:

Do you have 2 bss138 that you could use.??
 

Thread Starter

goutham1995

Joined Feb 18, 2018
104
The output voltage and current are 4.7V/60mA.
Does your input have three voltage level as 0V, 3V and 5V?


What does this means?

And what's the real function that you want?
https://www.google.com/search?q=bss138+level+shifter&tbm=isch&source=iu&ictx=1&fir=4cczHczXlniJdM%3A%2CPmJ3IIb33sIQdM%2C_&usg=AFrqEzf0ROlxufWs3CNCmd6va8qcN3S_Gw&sa=X&ved=2ahUKEwjk9t7bk5LdAhXJM48KHcmIAYwQ9QEwAHoECAUQBA#imgrc=4cczHczXlniJdM:

In this image, 3.3 V is connect to LV and 5V to HV. TX_LV can vary from 0 to 3.3 volts.
I want to be able to supply 5 volts to my motor driver depending on wether my MCU is awake or asleep. When MCU is awake, I want to give 5 volts to my motor driver. When it is asleep, I want to stop supplying 5 volts power to it.
 

ScottWang

Joined Aug 23, 2012
7,397
This requires a MCU low to give a Vout high
When the output is high and the voltage drop through 82Ω will be Vdrop = 60mA * 82Ω = 4.92V, and then you only could output a high voltage less 0.1V, that's why the TS want to used 5Ω, because it is only has Vdrop=60mA*5Ω=0.3V voltage drop and he want the Vout is 4.7V ... ;)

On the other side, if you output low then the current can be output what the MOSFET can output, but the TS want is output high.
 

ScottWang

Joined Aug 23, 2012
7,397
okay, you are using two inverters. Is it possible to acheive this functionality using only one MOSFET?
Using two BJTs or one BJT and one P MOSFET to design should be ok, but why you only want to use one MOSFET, does the space to limits the circuit or a commercial product needed to be like that?
 

ericgibbs

Joined Jan 29, 2010
18,664
hi Scott,
I thought the TS wanted a 60mA source, he said. since my driver requires 60mA current when turned on.

The bss138 is only rated at 0.22A continuous, a 5R load would destroy a bss138.

He should really post a diagram of what he is trying to do.

E
 

ScottWang

Joined Aug 23, 2012
7,397
hi Scott,
I thought the TS wanted a 60mA source, he said. since my driver requires 60mA current when turned on.

The bss138 is only rated at 0.22A continuous, a 5R load would destroy a bss138.

He should really post a diagram of what he is trying to do.

E
5Ω is the current limiting resistor for the load and it is not the real load, so bss138 should be ok.

I think what the TS want is:
1. Mcu output 0V and the circuit output 0V.
2. Mcu output 3V(0r 3.3V) and the circuit output 4.7V/60mA(or more).

So this issue can be using one P MOSFET and one NPN bjt or using a PNP bjt and one NPN bjt to complete the circuit, of course the circuit still need some resistors.
 

Thread Starter

goutham1995

Joined Feb 18, 2018
104
sorry about the clarity but my source(PB8 pin) is input from my MCU and the source is pulled down to ground. Gate is at 3.3 volts and drain is connected to L293D motor driver. Essentially, I'm giving input to source through MCU pin. If input is 3.3 volts, Vgs = 0 and MOSFET is off. So, the drain is pulled up to 5 volts. If input is 0 volts, Vgs = 3.3 volts, the MOSFET is on and the drain is at 0 volts.

pic.jpg
 
Last edited by a moderator:
Top