Mutliple power supply led indication (diode OR, which diode is source?) - Page 1
Forum section: electronics / beginners

author: NaDobraNich
author_rank: Regular Contributor
timestamp: August 21, 2024, 07:37:01 pm
content: I'm having trouble with circuit to OR together two 12V power supply sources to a max load of 200mA. I want an LED to show me which one is being used.I have my two sources, a common cathode diode, a spot for a RC circuit to limit in-rush if needed. But then I fall apart. I think I only need an NPN, a small resistor to create a current difference, and my led/resistor.Either or both sources can be 0-18V, but 12V is highly likely. All I want to do is see which diode the current is coming from. Although, as I write this... I suspect the answer could be both even if one is 10V and the other is 12V?Now that I think about it. I'm not sure this is a simple deal without also putting at least an opamp in?

author: ledtester
author_rank: Super Contributor
timestamp: August 21, 2024, 08:11:24 pm
content: A sure fire solution is to buy two of these:https://www.amazon.com/YXQ-0-200mA-Current-Accuracy-Measurement/dp/B07JLRQ419With the NPN you were probably were looking for something like this:(Falstad Simulation)(Note that PNPs are used here.)The sliders can be used to adjust the two power supply voltages.However, there are drawbacks...* The 100R resistor was chosen for a threshold current of 0.7V/100R = 7mA. In particular, you have to decide on a threshold current to light up the LED.* In this case the 100R resistor will add to the output impedance of the active power supply. If the power supplies are linear or DC/DC converters (like a buck or boost converter) it could be possible to insert the detectors before the regulation circuitry which would eliminate this additional impedance.Note that this indicator will require at least a couple of volts from one of the power supplies to work.

author: NaDobraNich
author_rank: Regular Contributor
timestamp: August 21, 2024, 08:46:44 pm
content: Quote from: ledtester on August 21, 2024, 08:11:24 pmRight, thanks for that! Makes sense to me, and I like the adjustable limit at which the LED comes on.However... I don't love that the voltage that gets to my circuit is through two diodes. Cuts off a lot of voltage.Stupid question, but can I move the two diodes up before the PNP base junction?My thought is, that still prevents the one source from influencing the other. I still get reverse polarity protection (which shouldn't happen). And my device (that already has a reverse protection diode) is getting more than 10.3V of the 12V original.

author: mariush
author_rank: Super Contributor
timestamp: August 21, 2024, 08:49:42 pm
content: You have chips like TPS2120 or TPS2121 which take two inputs and output 1 , either auto select highest voltage or the one you select through a pin .... and they have a status pin which goes high if input 1 is selected or pulled low if output 2 is selecteddTPS2121 :https://www.digikey.com/en/products/detail/texas-instruments/TPS2121RUXR/9859001

author: NaDobraNich
author_rank: Regular Contributor
timestamp: August 21, 2024, 08:58:59 pm
content: Quote from: mariush on August 21, 2024, 08:49:42 pmLooks cool, but has two issue. Requires some knowledge of components and resistors to set settings I might not have time for. And also, it seems to have be a tiny part that wouldn't handle my 200mA and 12V typical (18V worst case) load according to the degrees per watt.

author: mariush
author_rank: Super Contributor
timestamp: August 21, 2024, 09:18:56 pm
content: It can handle up to 22v on both inputs, and it can do up to 4.5a , 3A for the tps2120.... It basically has 2 ideal diodes / p-channel mosfets inside and some logic glue to compare the inputs and select highest or let you override.Just skim the datasheet, it's pretty much no external parts.

author: PGPG
author_rank: Frequent Contributor
timestamp: August 21, 2024, 09:28:30 pm
content: Quote from: ledtester on August 21, 2024, 08:11:24 pmI don't know how you are doing your pretty pictures but...In your circuit from 200 mA declared by OP load 0.7/0.1=7mA will be going through 100R and 193mA will be going through transistor base. It is certainly not typical for transistor to have 193mA base current and 10mA collector current. I don't think it will like it.With your circuit do the following:1. Replace 100R resistors with wire.2. Disconnect bases.3. Connect bases together.4. Connect 100k from bases to GND.This will work better and not add extra voltage drop.Main diodes can be Schottky making voltage drop smaller.The only wrong with my circuit is that it is not protected against to big voltage difference between emitters making base-emitter being reverse polarized. So the task is to protect it. It can be done by limiting current with resistors from common base point to bases (in 70s I was using b-e junction as replacement for 9V Zener diode so it don't kills transistor). You can also connect Zeners across b-e junctions.

author: ledtester
author_rank: Super Contributor
timestamp: August 21, 2024, 09:37:39 pm
content: This video from TI is a good overview of various muxing solutions and the design decisions you have to take into account:https://www.ti.com/video/5397480497001It would be helpful to know more about under what circumstances you are going to have power switched from one supply to the other. Why do you need a power or-ing solution?

author: ledtester
author_rank: Super Contributor
timestamp: August 21, 2024, 09:48:00 pm
content: Quote from: PGPG on August 21, 2024, 09:28:30 pmSomething like this?(Falstad Simulation)The B labels are used to connect the bases.To add B-E protection it seems you could just connect the bases with a resistor (like 10k?) instead of a wire.

author: Alex Nikitin
author_rank: Super Contributor
timestamp: August 21, 2024, 10:44:21 pm
content: Is this what you need?CheersAlex

author: ArdWar
author_rank: Frequent Contributor
timestamp: August 21, 2024, 11:30:46 pm
content: I love the increasingly complex solutions... that still doesn't address the original requirement.Quote from: Na0DobraNich on August 21, 2024, 08:58:59 pmThe rating is for the power dissipated in the OR-ing controller, not in your load. Unless something went horribly wrong it only dissipate 20mW with 200mA load.

author: PGPG
author_rank: Frequent Contributor
timestamp: August 21, 2024, 11:39:19 pm
content: Quote from: ledtester on August 21, 2024, 09:48:00 pmYes.But only one resistor from bases to GND is needed.Quote from: ledtester on August 21, 2024, 09:48:00 pmIf you will have one, common 100k resistor than separate resistors (like 10k) to each base are enough protection, I think. This looks (only looks) more symmetric.It will be good to test it in border conditions.