EEVblog Electronics Community Forum
Electronics => Beginners => Topic started by: onemanonelaptop on November 14, 2023, 07:07:20 pm
-
Hi all,
I am designing a power supply and want to be able to turn it on and off using a switch.
I have wired 2 P channel mosfets into the circuit which (according to circuitlab) will do what i want, but I am doubting myself. I was wondering if anyone would be so kind as to give it an eyes over for obvious mistakes.
The power supply uses USB as its primary power source and batteries if and only if the usb power is disconnected. (At least that is what it should do)
Turning on the switch should connect the gates of both mosfets to ground, pulling the voltage to zero thus allowing the power to pass through. Am i correct here?
[attachimg=1]
-
Why not simply connect the switch between the battery/USB rail and the inputs of U7? Unless I'm missing something (very possible!), that would achieve the same objective with fewer parts. Also, U7 is a pretty pricey component… you could replace that with a Mosfet and a couple diodes.
-
Thanks for the reply.... So the switch (which is the only one that fits the application) has a max current of 100ma and the circuit is likely to draw around 300ma.
The chip is $2.67 from LcSC, while still expensive, space is at a bit of a premium.
-
OK, understood. Then this looks like it would work. You could increase R27, R29, R1, and R2 100k to reduce waste when you're on battery (though be careful not to fall below the minimum current rating of the switch). Also, I don't think you need R15, and R14 should probably be smaller—with a 10k resistor, that LED is… unlikely to be very bright ;)
BTW, if space is at a premium, Q3 and Q4 seem a bit overkill for your application… they are rated for up to 7A at 60V! You could switch to a SOT-23 like this one (https://jlcpcb.com/partdetail/Alpha_OmegaSemicon-AO3401A/C15127), which also happens to be in JLC's basic parts list.
In case you change your mind on omitting U7 (which would save even more space), I've attached an alternative for you to consider.
HTH,
—CC
-
Thankyou for the reply, turns out that chip is way too expensive when it actually came down to trying to order it.
I have switched the mosfets as you are correct they were way too big for the task at hand.