5V rail connected to 12V via 10K resistor ok?

I'm trying to work out a power supply setup for my project, and I'm having a hard time wrapping my head around whether it's okay to do this...

I have a regulator with an enable pin. I want to connect that enable pin to +12V via a 10K resistor. I also want to connect it to GND via a switch.

I also have a N-MOSFET on my board. I want to connect the gate to the +5V input from the regulator via a 10K resistor. And I want to connect it to the same switch the regulator is connected to.

The idea here is that when I flip the switch, both the mosfet gate and regulator enable with be pulled to ground, and both would turn off. What concerns me is that my circuit would end up looking like this:

+5V --10K -- G -- 10K -- +12V

Where G is the pin on the switch that goes to ground. And the enable pin of the regulator. And the gate of the mosfet.
So my two voltage rails would be effectively connected together via 20K of resistance. And I don't know if this is okay or not.

Perhaps add a couple of schottky diodes to isolate the supplies:

+5V --10K -|>|- G -|<|- 10K -- +12V

G can still be connected to Gnd, but 12V current cannot flow to 5V and 5V current cannot flow to 12V.

Diodes would work, but the thing that's bugging me is that the grounds of the two circuits are connected, and 12V and 5V must both be connected to ground somewhere in their circuits with pullups like this. So why should it matter where the common ground point is?

I guess maybe the issue is that GND connection might not even be there if the switch is off.

So is it okay as long as the switch is on, but not okay when it's off?

Do you Not want the 5V circuit and the 12V circuit to have common ground?
In that case use an optoisolator.

LED power for the 2 otpo's can be the 12V source, don't forget current limit resistor.
Open collector/open drain output can pull the separate 10K resistors low to the 5V GND and the 12V GND.

Example:
http://www.digikey.com/product-detail/en/LTV-826/160-1362-5-ND/385832

I do want them to have a common ground. I'm just a bit confused is all.

If my two circuits have common ground, and I have a 10K pulldown somewhere in my 12V circuit and a 10K pulldown somewhere in my 5V circuit, then somewhere in my circuit this is happening:

+5V --10K -- GND -- 10K -- +12V

Which is not dissimilar to the circuit with the switch. The only difference is in the switch circuit I can break the connection to ground while leaving the 10K resistors connected. So assuming the setup above with two pulldowns is okay, is being able to break the connection to ground what makes the setup with the switch bad? (Without diodes in place.)

I would say no.
You would have (12V-5V)/20K = 0.35mA of current trying to flow from 12V side to 5V side.
The G would be at 8.5V when not grounded. Is that connected to an Arduino pin? Not good.

But when G is grounded, it's okay, correct?

But when G is grounded, it's okay, correct?

Yes but that gets you no where. As soon as you do not ground it you fry your pin.

Yeah, I realize that. I just wanted to be sure I understood things right. Thanks guys.

Hm, I wonder if I could use LEDs instead of diodes. I'd have to use a smaller resistor on my pullups if I wanted them to light brightly. I imagine that would increase the voltage the enable pin sees when being pulled down. Probably difficult to choose a proper value resistor for both mosfet and regulator that would still pull them down enough to turn them off.

Just thinking out loud. :slight_smile:

Wouldn't the Ground switch being closed turn them off?

Or were you planning to connect the Gate & Regulator to the anodes of the diodes/LEDs?

A picture here would really help.

Using your own schematic:
+5V --10K -|>|- G -|<|- 10K -- +12V

If the diodes were replaced with LEDs, then in theory when the switch is closed, one LED would be connected to 5V and GND with a 10K resistor in series, and the other with be connected to 12V and GND with a 10K resistor in series.

I suppose the first LED wouldn't light, because if the switch is closed, the regulator would shut off so there would be nothing to supply 5V. But the second should light. Even so, it now occurs to me that that would be the opposite of what one would want. :slight_smile: