analog switch

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?

Thanks

Reply to
ravi
Loading thread data ...

I wold use an adjustable regulator like an LM317 and use the FET switch to add a second resistor in parallel for the lower voltage so that the voltage will never exceed the higher of the two selections. The resistor calculation is slightly more complicated but you can handle it.

G=B2

Reply to
stratus46

--
The problem with that approach, if the OP is trying to switch between
a 5V and a 3.3V supply, is the LM 317's dropout voltage, which will
vary from about 1.3V at 75C with 20mA out, to about 2.2V at 75C with
1.5A out:

http://www.national.com/ds/LM/LM117.pdf
Reply to
John Fields

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.

You can do similar things with BJT's.

Reply to
Jeff Johnson

You want a 'high-side switch'; either a PNP or PMOS switch device will do it. This assumes that your intent is to create a voltage source to a load (the load always draws current), not an analog switch.

Two sources, so two PMOS devices; they'll work better if you can bias 'em with -5V on the gate to turn them fully ON, otherwise you'll have to spend extra money (or use PNP and expect 0.1V drop).

Reply to
whit3rd

Unless you're switching between regulating down from a higher voltage, then the LN317 approach is useful. But OP asked to switch between two voltages, not control a regulator. So obviously an SDPT switch is either two p-channel or pnp devices forming high side switch, or perhaps an 'hc405{2,3} if the load is in the mA range.

Grant.

Reply to
Grant

Feed the 5V through a couple or 3 diodes for the low side and bridge this link with a PMOS high side to deliver the full 5? Depending on the selected diodes, they can drop your voltage on the average of .3 to .6 volts each.

I don't know how stable your circuit must be but, its a simple solution and the diodes will give you some kind of reg over a R net work. How ever, if you know your load is constant, then use a R inplace of the Diodes..

etc..

Just a thought..

Reply to
Jamie

Is the application the availability of two different supplies and something makes it desirable to have the ability to switch between them, or a necessity to HAVE two different supplies?

Reply to
default

--
Except that it won't work because of the MOSFET's body diode.
Reply to
John Fields

On Sun, 08 Aug 2010 08:03:10 -0500, John Fields wrote:

--- Snip...

Even better:

Version 4 SHEET 1 880 724 WIRE -176 -32 -304 -32 WIRE 288 -32 -176 -32 WIRE -176 0 -176 -32 WIRE 288 96 288 -32 WIRE -176 144 -176 80 WIRE -112 144 -176 144 WIRE 224 144 -32 144 WIRE 288 224 288 192 WIRE 416 224 288 224 WIRE -176 256 -176 144 WIRE 288 256 288 224 WIRE -80 304 -112 304 WIRE 48 304 0 304 WIRE 112 304 48 304 WIRE 224 304 192 304 WIRE -304 432 -304 -32 WIRE 48 432 48 304 WIRE 288 432 288 352 WIRE 416 432 416 224 WIRE -304 624 -304 512 WIRE -176 624 -176 352 WIRE -176 624 -304 624 WIRE 48 624 48 512 WIRE 48 624 -176 624 WIRE 288 624 288 512 WIRE 288 624 48 624 WIRE 416 624 416 512 WIRE 416 624 288 624 WIRE -304 704 -304 624 FLAG -304 704 0 SYMBOL pnp 224 192 M180 SYMATTR InstName Q1 SYMATTR Value 2N3906 SYMBOL pnp 224 256 R0 SYMATTR InstName Q2 SYMATTR Value 2N3906 SYMBOL voltage 288 416 R0 WINDOW 123 0 0 Left 0 WINDOW 39 0 0 Left 0 SYMATTR InstName V1 SYMATTR Value 3.3 SYMBOL voltage 48 416 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 -304 416 R0 WINDOW 123 0 0 Left 0 WINDOW 39 0 0 Left 0 SYMATTR InstName V3 SYMATTR Value 5 SYMBOL res 400 416 R0 SYMATTR InstName R1 SYMATTR Value 100 SYMBOL npn -112 256 M0 SYMATTR InstName Q3 SYMATTR Value 2N3904 SYMBOL res -192 -16 R0 SYMATTR InstName R2 SYMATTR Value 1000 SYMBOL res -16 128 R90 WINDOW 0 0 56 VBottom 0 WINDOW 3 32 56 VTop 0 SYMATTR InstName R3 SYMATTR Value 1000 SYMBOL res 208 288 R90 WINDOW 0 0 56 VBottom 0 WINDOW 3 32 56 VTop 0 SYMATTR InstName R4 SYMATTR Value 1000 SYMBOL res 16 288 R90 WINDOW 0 0 56 VBottom 0 WINDOW 3 32 56 VTop 0 SYMATTR InstName R5 SYMATTR Value 1000 TEXT -264 656 Left 0 !.tran 1

JF

Reply to
John Fields

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.

Reply to
Jeff Johnson

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

Reply to
Jamie

--
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
Reply to
John Fields

What program to you use to view the circuit?

Reply to
Jeff Johnson

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

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

formatting link

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

formatting link

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

-- JF

Reply to
John Fields

I tried to use it once but it's interface is so 60's...

Reply to
Jeff Johnson

Well, stop using the 60's version then!

Reply to
Jamie

What SPICE program were you using in the '60s, 'Pencil & Paper 1.0'?

Reply to
Michael A. Terrell

Well, if you want to read the stuff JF posts that way (always highly recommended reading, by the way) it's the solution. The content/capability is worth overcoming whatever negative(s) you think about the interface.

Ed

Reply to
ehsjr

--
Thanks Ed, that's very kind of you! :-)
Reply to
John Fields

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.