Switching between 5V and 3.3V

Thread Starter

ankursingh

Joined Feb 18, 2010
5
Hi,

For my hobby project, I am trying to design a connector interface where i should be able to plug-in 5V or a 3.3V device like MMC card, mobile LCD etc.

Connector pin-out.
---- Vcc
---- Gnd
---- MOSI
---- MISO
---- CLK
....
....
---- CS

I am confused on how can i switch my VCC from 3.3V to 5V at run-time (not through jumper) using a uC pin.
uC will be running on 5V through a adaptor.

I have done some uC programming but am newbie in electronics.
I am planning to use the attached circuit.

Would appreciate your comments on whether it would work or not and any suggestions for a better design.

cheers !!!




 

Attachments

beenthere

Joined Apr 20, 2004
15,819
How is that circuit supposed to work? Wouldn't you do better by having a voltage regulator get selected before the device insertion to preselect the correct Vcc?
 

Thread Starter

ankursingh

Joined Feb 18, 2010
5
@beenthere:
a. I was thinking that when uC outputs digital low then transistor would go off and output voltage will be (5V - voltage drop across R).
It should be roughly around 5V.

b. When uC outputs a digital high then output voltage would be Vce + voltage acros 2R. This would come to somewhere around 3.3V.

Looking at it again, i think it won't be able to drive enough current for 3.3V device in b.

@mik3 :
Any particular device ? A circuit would help.

Thanks for taking time to respond.
 

Thread Starter

ankursingh

Joined Feb 18, 2010
5
@beenthere:
>> Wouldn't you do better by having a voltage regulator get selected before the device insertion to preselect the correct Vcc?

Any suggestions for a device which can output two voltages ?
 

Markd77

Joined Sep 7, 2009
2,806
If you can get your hands on one a MAX756 / MAX757 might do the trick. It's a step up converter that has a logic selectable 3.3 / 5V output
 

t06afre

Joined May 11, 2009
5,934
Or this circuit from the National semiconductor LM117/317 datasheet.
Good Idea but then the OP should use a higher supply voltage. Now he is using 5 volt as input. And if I remember correct the 317 need at least 2 volt in input output difference
 

Thread Starter

ankursingh

Joined Feb 18, 2010
5
Thanks for quick response everyone.

@alberto:
I was thinking of supplying the generated Vcc (3.3V or 5V) to
BJT and then using it accordingly as a switch.

That way output on pins connected to device should be in range
of device supply.


0 (5V/3.3V)
|
<
>
<
|----------- MOSI/SCK (other pins)
|
/
uC--vvv---|
\
|
|
---
-

When uC will output zero then MISO pins will show 3.3V or 5V as per the Vcc.
When uC will output one then MOSI pins will show 0.7v which is TTL zero. So it should be fine.


cheers !!!

 

John Luciani

Joined Apr 3, 2007
475
Not sure if I understand the question but there are a variety of logic families that
have 5V tolerant inputs when powered at 3.3V.
For TH parts the AHC family. Power an AHC buffer with 3.3V and
the inputs can be either 5V or 3.3V.

(* jcl *)
 

davebee

Joined Oct 22, 2008
540
What if you made a connector with a common ground, but separate pins for the 3.3 and 5 volt power? Each device would wire its connector to the correct power pin.

That has the advantage of preventing mistakes like plugging a 3.3 volt device in while the supply is still set to 5 volts.
 
Top