I have a device that pulls power from a usb cable. This works most of the time.
After talking with the designer, I can increase the range it works if I use an external power supply.
I can cut the trace for power & solder in a wire for the external power source.
This works great... BUT
I wold like to automatically select the external source if it exists, otherwise use the usb power.
I had thought about using a couple diodes, but this wouldn't 'cut-off' the draw from the usb.
Is there a way to do this w/o a relay, which would be easy...
There may be a simple way to do it.
The key factor to make this work is certain kind of charging jack
(I think it is the opposite of this one)
that disconnects the load when the charger is plugged in. The USB would be connected to the "load" pin and the "device" is connected to the "battery" pin. The External P.S. substitutes for the "charger". When the "charger" is NOT connected, the "load" is CONNECTED to the "battery". When the "charger" is PLUGGED in, it separates the "load" (USB) , from the "battery" ("the device"). The "charger" (external P.S.) is now CONNECTED to the "battery" (the "device").
Understand ?
(please don't ask me where to find that connector). Everyone is familiar with them but very few people actually know where to find one. I can only think of one person who probably knows: Crossroads.
"Active" ? Active what ? (LOW, HIGH ?)
If you are going to talk about MOSFETs , you MUST FIRST understand the meaning of "Gate-Source Voltage" . ( Vgs) In order to do that you must FIRST understand the difference between N- channel mosfet and P- channel mosfet. In order to do that hou must FIRST understand that N- channel fets have a positively biased Drain, with respect to source. Typically the Source is connected to GND and the Drain SINKS the LOAD current , so the Gate- Source voltage is positive, with respect to the Source. If thd Load Vcc is +12 V , for example, the Gate-Source Voltage will be +12 V. A P- channel , on the other hand , will hace a negatively biased Drain ,with respect to Source, so the Source will be connected to +12V and the Gate-Source voltage will be negative , with respect to Vcc. If Vcc is +12V, the Source is connected DIRECTLY to +12V and the Drain SOURCES ( NOT SINKS) the current.
If you don't know the difference between SOURCING and SINKING, well then you are not ready to talk about MOSFETS, period. If you do , then the Gate-Source voltage for a P-channel with a +12V Source is -12V , (Gate to Source) . An arduino cannot supply +12V to turn on an N- channel mosfet. It can supply 0V to turn on a P- channel mosfet. It CAN supply 0 V to turn OFF an N-channel but it cannot supply +12V to turn OFF a P-channel. Do you see the relationship between GND , Vcc, Gate , and Source ? . If it's an N-channel, the Source is grounded, and the Gate needs to supply the Vcc voltage to turn it on and 0V to turn it off. If it is a P-channel, the Source is connected to Vcc and the gate needs to supply 0V (or less) to turn it on and +Vcc to turn it off.
N-channel P-channel
(Vcc = +12V) ON +12V 0 to -12V
OFF 0V to -12V +12V
So that's where mosfet gate drivers come in. They can accept 0 to +5V and output +/-12V ( assuminv , of cource you supply +/-12V to their +Vcc/-Vee pins. In short, if are using N-channel , you are in the current SINKING business. If you are using P-channel, you are in the current SOURCING business. And if you do NOT have mosfet drivers , you are OUT OF BUSINESS.
UNLESS, you are using a Logic Level N-channel , like the FQP30N06 ( Supplier: SPARKFUN)
An arduino can turn ON/OFF one of these with a 0V/ 5V logic signal on the gate, without any gate driver. They have Logic Level P -channels but 5V is not enough to turn them OFF with the source connected to +12V. If you stick with the logic level N-channel you don't need a gate driver.
THIS is the gate driver I use (Vcc = +12V) It comes in different flavors depending on your logic requirements.
If your Vcc is +12 to +15v , this should work for you.
It can supply 0V /+12V to turn ON/OFF P-channel mosfets and +12V/0V to turn ON/OFF N-channel mosfets.
Note: Mosfet Gate drivers are ALSO used to boost gate current for driving high power devices. Nothing I have said relate to this. I only mention them for their LEVEL-SHIFTING applications.