From: Jeff Johnson on


"John Fields" <jfields(a)austininstruments.com> wrote in message
news:ugat56lah2i1c9d2c5mqkvcd8slj2pbmnq(a)4ax.com...
> On Sat, 7 Aug 2010 13:38:54 -0500, "Jeff Johnson"
> <Jeff_Johnson(a)Hotmail.com> wrote:
>
>>
>>
>>"ravi" <ravi2neha(a)gmail.com> wrote in message
>>news:dd623d43-6c24-4300-afd4-944764ccc40c(a)y11g2000yqm.googlegroups.com...
>>> How can design analog SPDT switch which switches VCC between +3.3V and
>>> 5V depending on application? I've an available pin on micro which can
>>> select the VCC. There are some ICs available to do this job but I
>>> would prefer to do it FET or Transistor. Anybody has idea or circuit?
>>>
>>
>>Must easier than you might think! A simple mosfet will do the trick.
>>
>>
>>
>>VL---MOSFET---+---Vout
>> |
>> R
>> |
>> VH
>>
>>If the gate of the mosfet is off then Vout = VH. If the mosfet is on then
>>Vout = VL.
>>
>>If VL = 3.3V and VH = 5V then applying 0V to the gate will give Vout = 5V
>>and supplying 5V to the gate will hopefully give you Vout = 3.3V.
>>
>>There are some issues with this as the mosfet R_DSON and R form a voltage
>>divider. If you cannot get a low enough turn on voltage then Vout may be
>>significantly degraded. Also if you need to source appreciable current
>>then
>>R may end up being to low. R can be replaced with a p-ch mosfet with
>>similar
>>effect.
>>
>>VL---MOSFET1---+---Vout
>> |
>>VH---MOSFET2---+
>>
>>looks very similar to a SPDT switch.
>
> ---
> Except that it won't work because of the MOSFET's body diode.


Huh? The body diode is in cutoff as it is reversed biased in both cases.
Maybe you are getting the orientation backwards.

Small signal mosfets are almost entirely symmeterical so one can reverse the
drain and source at will excluding the body diode polarity. Since the
maximum of 5V is well within the any maximum voltage requirements there
should be no problems.

In any case one simply has to choose the right combinations of p-ch and n-ch
to get the right combination of body diode orientations to prevent forward
conduction.

One can use two n-ch mosfets or two p-ch, etc...

If you have m branches such as

V1---Mosfet1---+
|
V2---Mosfet2---+
....... |
Vm---Mosfetm---+---Load

Then as long as the mosfet's body diode are forward conducting from the to
the load they will block all over branches. e.g., looks something like

Vk--|>|---+

Current can't flow into any source. It won't work with diodes but does with
mosfets. The biggest problem with a 5V or less system is driving the gates
enough to reduce R_dson.



From: Jamie on
Jeff Johnson wrote:
>
>
> "John Fields" <jfields(a)austininstruments.com> wrote in message
> news:ugat56lah2i1c9d2c5mqkvcd8slj2pbmnq(a)4ax.com...
>
>> On Sat, 7 Aug 2010 13:38:54 -0500, "Jeff Johnson"
>> <Jeff_Johnson(a)Hotmail.com> wrote:
>>
>>>
>>>
>>> "ravi" <ravi2neha(a)gmail.com> wrote in message
>>> news:dd623d43-6c24-4300-afd4-944764ccc40c(a)y11g2000yqm.googlegroups.com...
>>>
>>>
>>>> How can design analog SPDT switch which switches VCC between +3.3V and
>>>> 5V depending on application? I've an available pin on micro which can
>>>> select the VCC. There are some ICs available to do this job but I
>>>> would prefer to do it FET or Transistor. Anybody has idea or circuit?
>>>>
>>>
>>> Must easier than you might think! A simple mosfet will do the trick.
>>>
>>>
>>>
>>> VL---MOSFET---+---Vout
>>> |
>>> R
>>> |
>>> VH
>>>
>>> If the gate of the mosfet is off then Vout = VH. If the mosfet is on
>>> then
>>> Vout = VL.
>>>
>>> If VL = 3.3V and VH = 5V then applying 0V to the gate will give Vout
>>> = 5V
>>> and supplying 5V to the gate will hopefully give you Vout = 3.3V.
>>>
>>> There are some issues with this as the mosfet R_DSON and R form a
>>> voltage
>>> divider. If you cannot get a low enough turn on voltage then Vout may be
>>> significantly degraded. Also if you need to source appreciable
>>> current then
>>> R may end up being to low. R can be replaced with a p-ch mosfet with
>>> similar
>>> effect.
>>>
>>> VL---MOSFET1---+---Vout
>>> |
>>> VH---MOSFET2---+
>>>
>>> looks very similar to a SPDT switch.
>>
>>
>> ---
>> Except that it won't work because of the MOSFET's body diode.
>
>
>
> Huh? The body diode is in cutoff as it is reversed biased in both cases.
> Maybe you are getting the orientation backwards.
>
> Small signal mosfets are almost entirely symmeterical so one can reverse
> the drain and source at will excluding the body diode polarity. Since
> the maximum of 5V is well within the any maximum voltage requirements
> there should be no problems.
>
> In any case one simply has to choose the right combinations of p-ch and
> n-ch to get the right combination of body diode orientations to prevent
> forward conduction.
>
> One can use two n-ch mosfets or two p-ch, etc...
>
> If you have m branches such as
>
> V1---Mosfet1---+
> |
> V2---Mosfet2---+
> ....... |
> Vm---Mosfetm---+---Load
>
> Then as long as the mosfet's body diode are forward conducting from the
> to the load they will block all over branches. e.g., looks something like
>
> Vk--|>|---+
>
> Current can't flow into any source. It won't work with diodes but does
> with mosfets. The biggest problem with a 5V or less system is driving
> the gates enough to reduce R_dson.
>
>
>
Proper selection of components out of the junk box makes a nice 3.3 to 5
switch.. V2 would be the uC line to select voltage. The current source
is just a test load. PMOS selected to have its turn on Gate voltage in
range of this voltage window.. Op-amp selected where there is no rail
output and thus gives you the resulting drive voltage that is needed.
Run the sim, you'll see using these components, it comes close for what
I found in the libs.

Version 4
SHEET 1 892 680
WIRE 80 32 0 32
WIRE 192 32 80 32
WIRE 448 32 288 32
WIRE 0 48 0 32
WIRE 448 96 448 32
WIRE 208 112 208 80
WIRE 208 112 160 112
WIRE 80 144 80 32
WIRE 192 144 80 144
WIRE 288 144 288 32
WIRE 128 192 16 192
WIRE 80 208 80 144
WIRE 160 208 160 192
WIRE 240 208 160 208
WIRE 448 208 448 160
WIRE 16 224 16 192
WIRE 48 224 16 224
WIRE 128 240 128 192
WIRE 128 240 112 240
WIRE 240 240 240 208
WIRE 240 240 128 240
WIRE 48 256 -96 256
WIRE 80 288 80 272
FLAG 0 128 0
FLAG 448 208 0
FLAG 80 288 0
FLAG -96 336 0
SYMBOL voltage 0 32 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V1
SYMATTR Value 5
SYMBOL pmos 288 80 M270
SYMATTR InstName M1
SYMATTR Value FQB11P06
SYMBOL npn 192 208 R270
WINDOW 0 48 54 Left 0
WINDOW 3 -8 122 Left 0
SYMATTR InstName Q1
SYMATTR Value 2N2222
SYMBOL load 432 96 R0
WINDOW 3 48 56 Invisible 0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName I1
SYMATTR Value PULSE(.010 .050 0 500us 500us 20ms 20ms 60)
SYMBOL Opamps\\LT1006 80 176 R0
SYMATTR InstName U1
SYMBOL voltage -96 240 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V2
SYMATTR Value PULSE(0 5 0 1ms 1ms .100 .200)
SYMBOL res 144 96 R0
WINDOW 0 -7 -23 Left 0
WINDOW 3 -9 4 Left 0
SYMATTR InstName R1
SYMATTR Value 47
TEXT 326 302 Left 0 !.tran 1 startup


From: John Fields on
On Sun, 8 Aug 2010 12:37:37 -0500, "Jeff Johnson"
<Jeff_Johnson(a)Hotmail.com> wrote:

>
>
>"John Fields" <jfields(a)austininstruments.com> wrote in message
>news:ugat56lah2i1c9d2c5mqkvcd8slj2pbmnq(a)4ax.com...
>> On Sat, 7 Aug 2010 13:38:54 -0500, "Jeff Johnson"
>> <Jeff_Johnson(a)Hotmail.com> wrote:
>>
>>>
>>>
>>>"ravi" <ravi2neha(a)gmail.com> wrote in message
>>>news:dd623d43-6c24-4300-afd4-944764ccc40c(a)y11g2000yqm.googlegroups.com...
>>>> How can design analog SPDT switch which switches VCC between +3.3V and
>>>> 5V depending on application? I've an available pin on micro which can
>>>> select the VCC. There are some ICs available to do this job but I
>>>> would prefer to do it FET or Transistor. Anybody has idea or circuit?
>>>>
>>>
>>>Must easier than you might think! A simple mosfet will do the trick.
>>>
>>>
>>>
>>>VL---MOSFET---+---Vout
>>> |
>>> R
>>> |
>>> VH
>>>
>>>If the gate of the mosfet is off then Vout = VH. If the mosfet is on then
>>>Vout = VL.
>>>
>>>If VL = 3.3V and VH = 5V then applying 0V to the gate will give Vout = 5V
>>>and supplying 5V to the gate will hopefully give you Vout = 3.3V.
>>>
>>>There are some issues with this as the mosfet R_DSON and R form a voltage
>>>divider. If you cannot get a low enough turn on voltage then Vout may be
>>>significantly degraded. Also if you need to source appreciable current
>>>then
>>>R may end up being to low. R can be replaced with a p-ch mosfet with
>>>similar
>>>effect.
>>>
>>>VL---MOSFET1---+---Vout
>>> |
>>>VH---MOSFET2---+
>>>
>>>looks very similar to a SPDT switch.
>>
>> ---
>> Except that it won't work because of the MOSFET's body diode.
>
>
>Huh? The body diode is in cutoff as it is reversed biased in both cases.
>Maybe you are getting the orientation backwards.
>
>Small signal mosfets are almost entirely symmeterical so one can reverse the
>drain and source at will excluding the body diode polarity. Since the
>maximum of 5V is well within the any maximum voltage requirements there
>should be no problems.


---
Good point.

This seems to work quite well:


Version 4
SHEET 1 880 724
WIRE 224 80 -144 80
WIRE 224 96 224 80
WIRE 176 112 0 112
WIRE 0 144 0 112
WIRE 224 224 224 192
WIRE 496 224 224 224
WIRE 224 256 224 224
WIRE 0 272 0 208
WIRE 176 272 0 272
WIRE 496 320 496 224
WIRE -144 400 -144 80
WIRE 0 400 0 272
WIRE 224 400 224 352
WIRE -144 512 -144 480
WIRE 0 512 0 480
WIRE 0 512 -144 512
WIRE 224 512 224 480
WIRE 224 512 0 512
WIRE 496 512 496 400
WIRE 496 512 224 512
WIRE -144 592 -144 512
FLAG -144 592 0
SYMBOL voltage 224 384 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V1
SYMATTR Value 3.3
SYMBOL voltage 0 384 R0
WINDOW 3 24 104 Invisible 0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR Value PULSE(0 5 0 1e-6 1e-6 .1 .2)
SYMATTR InstName V2
SYMBOL voltage -144 384 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V3
SYMATTR Value 5
SYMBOL res 480 304 R0
SYMATTR InstName R1
SYMATTR Value 10
SYMBOL Digital\\inv -64 208 R270
WINDOW 3 8 104 Invisible 0
SYMATTR Value trise 1e-7 tfall 1e-7 vhigh 5V
SYMATTR InstName A1
SYMBOL pmos 176 352 M180
WINDOW 0 -42 25 Left 0
WINDOW 3 -97 58 Left 0
SYMATTR InstName M1
SYMATTR Value FDS4465
SYMBOL pmos 176 192 M180
WINDOW 0 -49 31 Left 0
WINDOW 3 -101 58 Left 0
SYMATTR InstName M2
SYMATTR Value FDS4465
TEXT -88 544 Left 0 !.tran 1


--
JF
From: Jeff Johnson on


"John Fields" <jfields(a)austininstruments.com> wrote in message
news:d6du565r15g56mgo8n6b2b50tbmi5s3mde(a)4ax.com...
> On Sun, 8 Aug 2010 12:37:37 -0500, "Jeff Johnson"
> <Jeff_Johnson(a)Hotmail.com> wrote:
>
>>
>>
>>"John Fields" <jfields(a)austininstruments.com> wrote in message
>>news:ugat56lah2i1c9d2c5mqkvcd8slj2pbmnq(a)4ax.com...
>>> On Sat, 7 Aug 2010 13:38:54 -0500, "Jeff Johnson"
>>> <Jeff_Johnson(a)Hotmail.com> wrote:
>>>
>>>>
>>>>
>>>>"ravi" <ravi2neha(a)gmail.com> wrote in message
>>>>news:dd623d43-6c24-4300-afd4-944764ccc40c(a)y11g2000yqm.googlegroups.com...
>>>>> How can design analog SPDT switch which switches VCC between +3.3V and
>>>>> 5V depending on application? I've an available pin on micro which can
>>>>> select the VCC. There are some ICs available to do this job but I
>>>>> would prefer to do it FET or Transistor. Anybody has idea or circuit?
>>>>>
>>>>
>>>>Must easier than you might think! A simple mosfet will do the trick.
>>>>
>>>>
>>>>
>>>>VL---MOSFET---+---Vout
>>>> |
>>>> R
>>>> |
>>>> VH
>>>>
>>>>If the gate of the mosfet is off then Vout = VH. If the mosfet is on
>>>>then
>>>>Vout = VL.
>>>>
>>>>If VL = 3.3V and VH = 5V then applying 0V to the gate will give Vout =
>>>>5V
>>>>and supplying 5V to the gate will hopefully give you Vout = 3.3V.
>>>>
>>>>There are some issues with this as the mosfet R_DSON and R form a
>>>>voltage
>>>>divider. If you cannot get a low enough turn on voltage then Vout may be
>>>>significantly degraded. Also if you need to source appreciable current
>>>>then
>>>>R may end up being to low. R can be replaced with a p-ch mosfet with
>>>>similar
>>>>effect.
>>>>
>>>>VL---MOSFET1---+---Vout
>>>> |
>>>>VH---MOSFET2---+
>>>>
>>>>looks very similar to a SPDT switch.
>>>
>>> ---
>>> Except that it won't work because of the MOSFET's body diode.
>>
>>
>>Huh? The body diode is in cutoff as it is reversed biased in both cases.
>>Maybe you are getting the orientation backwards.
>>
>>Small signal mosfets are almost entirely symmeterical so one can reverse
>>the
>>drain and source at will excluding the body diode polarity. Since the
>>maximum of 5V is well within the any maximum voltage requirements there
>>should be no problems.
>
>
> ---
> Good point.
>
> This seems to work quite well:
>
>
> Version 4
> SHEET 1 880 724
> WIRE 224 80 -144 80
> WIRE 224 96 224 80
> WIRE 176 112 0 112
> WIRE 0 144 0 112
> WIRE 224 224 224 192
> WIRE 496 224 224 224
> WIRE 224 256 224 224
> WIRE 0 272 0 208
> WIRE 176 272 0 272
> WIRE 496 320 496 224
> WIRE -144 400 -144 80
> WIRE 0 400 0 272
> WIRE 224 400 224 352
> WIRE -144 512 -144 480
> WIRE 0 512 0 480
> WIRE 0 512 -144 512
> WIRE 224 512 224 480
> WIRE 224 512 0 512
> WIRE 496 512 496 400
> WIRE 496 512 224 512
> WIRE -144 592 -144 512
> FLAG -144 592 0
> SYMBOL voltage 224 384 R0
> WINDOW 123 0 0 Left 0
> WINDOW 39 0 0 Left 0
> SYMATTR InstName V1
> SYMATTR Value 3.3
> SYMBOL voltage 0 384 R0
> WINDOW 3 24 104 Invisible 0
> WINDOW 123 0 0 Left 0
> WINDOW 39 0 0 Left 0
> SYMATTR Value PULSE(0 5 0 1e-6 1e-6 .1 .2)
> SYMATTR InstName V2
> SYMBOL voltage -144 384 R0
> WINDOW 123 0 0 Left 0
> WINDOW 39 0 0 Left 0
> SYMATTR InstName V3
> SYMATTR Value 5
> SYMBOL res 480 304 R0
> SYMATTR InstName R1
> SYMATTR Value 10
> SYMBOL Digital\\inv -64 208 R270
> WINDOW 3 8 104 Invisible 0
> SYMATTR Value trise 1e-7 tfall 1e-7 vhigh 5V
> SYMATTR InstName A1
> SYMBOL pmos 176 352 M180
> WINDOW 0 -42 25 Left 0
> WINDOW 3 -97 58 Left 0
> SYMATTR InstName M1
> SYMATTR Value FDS4465
> SYMBOL pmos 176 192 M180
> WINDOW 0 -49 31 Left 0
> WINDOW 3 -101 58 Left 0
> SYMATTR InstName M2
> SYMATTR Value FDS4465
> TEXT -88 544 Left 0 !.tran 1
>
>
> --
> JF

What program to you use to view the circuit?

From: John Fields on
On Mon, 9 Aug 2010 17:08:13 -0500, "Jeff Johnson"
<Jeff_Johnson(a)Hotmail.com> wrote:


>What program to you use to view the circuit?

---
Not only just view, but also draw and simulate.

A beautiful piece of work available free from Linear Technologies at:

http://www.linear.com/designtools/software/


and, if you can't figure it out all by yourself, a wonderful support
group at:

http://groups.yahoo.com/group/LTspice/


If you enjoy this kind of thing, they'll get you pretty close to
nirvana.

--
JF