How do I get a high side switch to turn on when some voltage goes high?
Paul Andrews wrote 04/10/2018 at 03:43 • 0 pointsI have a board powered by USB with battery backup. It has several chips on it running at 3V3. When USB is removed, the battery takes over, but I want one of the 3V3 chips to shut down for as long as USB power is off. When USB power is off, The voltage on the +5V rail drops to around 1.5V, not zero, because of leakage through a couple of diodes.
So, I thought, time for a transistor to switch the power to the chip. However, it needs to be a high-side switch, because I want to switch the power going into the chip. High side switches (PNP or p-channel MOSFET) are turned ON when their base/gate voltage goes low. I want it to turn ON when the base/gate voltage goes high. Also, I think MOSFETs are out, because of the forward voltage drop - remember I want to switch the 3V3 supply going in to a 3V3 chip, otherwise maybe I could have looked at depletion mode MOSFETS(?).
I briefly wondered if I could use a NPN, as I can guarantee that the base voltage (5V) is higher than the emitter voltage (3V3) when I want it to turn on. However, it looks like the emitter voltage is roughly equal to the base voltage when the base voltage is low (1.5V), even though I thought it should be cleanly off at that point.
So, what do I do?
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.
Or you can combine the function in your LDO?
http://www.ti.com/product/tps2158 3.3V LDO + Dual Switch For USB Peripherals, Active-High Enables
The active high switches does exactly what you want.
Are you sure? yes | no
May I ask whether you can use any of the "always on" ICs as part of the solution? For example, a hardware interrupt could detect the 5V dropping to 1.5V, perhaps via a resistor divider depending on the logic threshold of the input. A second pin could then pull the PNP MOSFET gate high. When the interrupt goes high again, the gate is pulled low.
A second method developing from what salec said above: take a PNP MOSFET in high side switch configuration. 10k resistor from VCC to either a 1.5V zener or a pair of plain diodes (in the opposite direction to the zener, just to harness their forward voltage drop) in series, with their other end connected to GND. MOSFET gate connects via resistor to the node between 10k resistor and the zener/diodes. At 5V VCC the gate is pulled lower (1.4V - 1.5V) than the Vgs threshold and the IC can draw current. At VCC = 1.5V the gate is at 1.4V - 1.5V and the PNP does not allow current to flow.
Are you sure? yes | no
I already have a pin detect when VBus goes away on the microcontroller, and there is a spare output pin on it that I could use to control the PMOS. I was saving that pin (for a rainy day I guess), put I could at least use it to verify that disconnecting the IC does what I need. Sometimes I can't see the wood for the trees.
The PMOS idea is an intriguing one that I will have to try too!
Are you sure? yes | no
PNP transistor could have its emitter on V+ (5V when connected to USB, 1.5V when disconnected), its collector supplying Vcc to the IC, and its base connected through a resistor to the battery. When V+ is 5V, battery voltage (and base voltage) is lower than that and PNP transistor will be turned on (saturated). When V+ drops down to 1.5V, voltage on base of the PNP transistor will be higher then voltage on its emitter and transistor will be turned off.
If you are concerned about reverse current going into battery in base circuit, you can have a 3V Zener diode placed in base circuit instead of battery.
Are you sure? yes | no
I tried something with a PNP, but I might have messed it up. I will try this.
I am also intrigued about using depletion mode mosfets, but my brain just turns to mush as soon as I realy try to understand what is going on.
Are you sure? yes | no
Depletion mode fets work similar to vacuum tubes: you apply voltage to control electrode (in tube - grid, in fet - gate) to choke the current flowing through it, by electrically squeezing the cross section through which charge carriers can pass. It is different from transistors and enhancement mode mosfets where you enable and enhance the current flow when you intervene on their "command lever".
Are you sure? yes | no
@Ted Yapo Thanks, that looks perfect. My confusion about forward voltage drop was the body-drain diode voltage drop. I should have realized, having literally just measured the forward voltage drop of a p-channel mosfet to check it was turning on.
The spice model is useful, I will run one up so I can play with it.
BTW, is there a link missing? You say "You can get them in one package, like the one used here", but there is no indication of where "here" is. No biggie, I can search them out myself, but seeing examples of use is always educational.
Are you sure? yes | no
The FDS9934 is the device used in the LTspice model (see schematic image). There's nothing particularly special about this part except it happens to come in the default LTspice library. You might find it works for you, or choose a different one.
https://www.digikey.com/product-detail/en/on-semiconductor/FDS9934C/FDS9934CCT-ND/3042583
actually, since it costs more than a dollar and is not currently stocked, you're probably better off with a different part, but I have no solid recommendations.
Are you sure? yes | no
MOSFETs don't have an inherently high forward drop unless you've chosen them incorrectly. Use V=IR with the forward current and the Rds at the gate voltage, Vgs, you're driving them with. Check the datasheet, and be wary of variations with temperature.
Here's a first guess: use an N-channel MOSFET to switch a P-channel one. You can get them in one package, like the one used here. This may or may not be suitable for your design, but you can get the idea:
https://cdn.hackaday.io/files/470302012131520/mosfet_swicth_schematic.png
here is the switching action. It's a little soft, but if you're just looking at 1.5 vs 5V, it should work fine.
https://cdn.hackaday.io/files/470302012131520/mosfet_swicth_waves.png
V1 is the 5V supply and Rload is the 3V3 IC you're switching. You can change the threshold with R2 and R3.
I mis-understood the question at first and posted a solution that turned on the IC when the 5V supply was off :-)
Are you sure? yes | no
Hi,
Yes, I think you might have misunderstood, as I can't see any way the PNP could act as a switch in your scenario. Basically I have Vbus (+5V) and Vdd (3V3). Vdd powers the chip (amongst many other things). When Vbus is high (+5V), I want to pass Vdd to the chip so that it is on, when Vbus goes low, I want to cut Vdd to the chip.
I could stick a voltage regulator in there to get 3V3 from Vbus, but I would prefer to just switch Vdd. Unless the component count ends up too high!
- Paul
Are you sure? yes | no
Ah ok, my apologies. Then yes, @Ted Yapo has the right circuit. I was going to say that you could use a P channel as he has it there with an NPN instead of the N channel MOSFET driven by the 5V input. Collector connected to the gate of the P MOSFET and emitter connected to ground.
Regards,
Kartik
Are you sure? yes | no
A PNP transistor with its emitter connected to +V and its base+collector connected to you load should do the trick (? someone please confirm ?)..
Please also take a look at ideal diode circuits, there are a few companies that are making monolithic ICs for that.
Regards,
Kartik C. Jangam
PS. my apologies if I misunderstood the problem.
Are you sure? yes | no