Can you make an 'ideal diode circuit' with voltage 'bias'? - Page 1
Forum section: electronics / beginners

author: No_Shorty
author_rank: Contributor
timestamp: March 07, 2024, 11:58:59 am
content: Hi,So I'm mulling over putting together a simple circuit using 'off the shelf' ideal diode circuits like this:I would like to two DC battery sources to be connected, and for when one runs out for the other to kick in. However, if the voltage ranges of the batteries cross over, I would assume (from the little I know) that once both batteries are at the same voltage, the diode would continuously switch back and forth.Is it possible to cause the diode to have a bias to one source? So one source needs to be +10v higher (for example) before the diode switches?

author: Berni
author_rank: Super Contributor
timestamp: March 07, 2024, 12:08:52 pm
content: Yep it is possible, put a 10V voltage source in series with the diode. That way when the voltage difference is below 10V the diode is seeing a negative voltage.But this is obviously not practical in a real life circuit since the voltage source has to pass all of the current.What you are actually looking for is so called 'ideal diode controllers' where it is a chip that switches a MOSFET on/off in a way that mimics a diode with a near 0V drop. Often these chips also have a control pin that could forcefully disable the transistor until some condition is met (like say the difference is 10V as detected using a external comparator)

author: No_Shorty
author_rank: Contributor
timestamp: March 07, 2024, 12:36:46 pm
content: Yea, I figured I could do the former, but that it wouldn't work in practice as you said. The current will be about 10A.I don't suppose there is a pre-made circuit for electronics-dummies is there? I can hook up a basic circuit but designing one isn't something I can do.I'm mulling other options like putting a voltage regulator in line with one of the sources to keep it constantly below the lowest voltage of the other source... but it's impractical and of course wasteful.

author: Berni
author_rank: Super Contributor
timestamp: March 07, 2024, 12:52:31 pm
content: You can often follow example schematics from the chip datasheets to get results quickly. Sometimes you just need to tweak a few things around to get the chip to do what you want.The big problem with this ideal diode circuit is that once the diode goes into the conducting stage the MOSFET is turned on, this makes the voltage across the MOSFET near 0V and so measuring the voltage across it becomes difficult. The ideal diode controller chips have special sensing circuits inside that detects any tiny negative voltage across the MOSFET, this means current wants to flow the opposite way and so the MOSFET must be turned off again. Doing this yourself out of jellybean analog circuitry is difficult.So for this reason you want to use an existing ideal diode controller or hot swap controller chip and add your 'switch at 10V' logic on top of it.Tho careful with closing switches across the 10V difference. You could cause large currents to flow when you suddenly short the two sides together (like connecting two differently charged batteries in parallel is a BAD idea)

author: No_Shorty
author_rank: Contributor
timestamp: March 07, 2024, 01:58:28 pm
content: Thanks,I have been looking over the analog website, but designing anything myself is out of the question - I simpyl dont have enough electronics knowledge. I may head to fiverr or similar if I can't find what I'm after "off the shelf".There seem to be plenty of ideal circuits that just favour the highest voltage, and I can find circuits that only switch when one source fails (i.e. VIN=0) but only in lower voltages/currents.If anyone happens to be able to direct me to an off the shelf solution that can handle up to 60v10a, but only switches when one source fails/falls below a threshold, then thats what I'm looking for!

author: Zero999
author_rank: Super Contributor
timestamp: March 07, 2024, 02:07:35 pm
content: I'm not sure what you're asking for.A circuit consisting of two voltage sources connected to the output via diodes, ideal, or otherwise, will always favour the higher voltage. If you want something else, then you're not looking for an ideal diode circuit.

author: No_Shorty
author_rank: Contributor
timestamp: March 07, 2024, 02:21:34 pm
content: Fair enough - that was my initial question, if the answer is that it isn't something I am going to find then that that's no problem, I'll ave to look for an alternative solution.As I said before, I can manage/regulate my DC sources to simply make an ideal diode circuit work, but is there anything else i should be looking at that would provide the switching function I'm looking for?

author: langwadt
author_rank: Super Contributor
timestamp: March 07, 2024, 02:36:36 pm
content: Quote from: Zero999 on March 07, 2024, 02:07:35 pmand if the inputs are the same voltage they'll just share the load

author: golden_labels
author_rank: Super Contributor
timestamp: March 07, 2024, 02:38:40 pm
content: The image address is invalid. Did you notice that?Since I don’t get the picture, I may be misunderstanding something. But why do you want to avoid the switching behavior in the first place? Diodes are not mechanical relays, they don’t wear out by being switched on and off. They are also not transistors with inefficient “partially open” state, which one wants to avoid in switching applications.The diode will also not switch back and forth, just settle in a single, stable state.

author: No_Shorty
author_rank: Contributor
timestamp: March 07, 2024, 02:46:32 pm
content: Thanks, fixed the link.Yes I realise the batteries will drain together when they are the same voltage,I want to avoid the use of the 'backup battery' at all unless the primary source fails/runs out. It would also provide system power when swapping out the other DC source (but the regular ideal diode circuit would obviously be fine for this)I want to keep the 'backup battery' at 55v, whilst allowing the main battery to brain from 58v down to 50v. At 50v it would cut out (bms controlled). With only the ideal diode circuit the backup battery would have also drained down to 50v, significantly reducing its remaining capacity.

author: tszaboo
author_rank: Super Contributor
timestamp: March 07, 2024, 02:49:21 pm
content: What you need is a prioritized diode OR circuit, or a power multiplexer. It's an ASIC, you can find it at TI or AD.

author: No_Shorty
author_rank: Contributor
timestamp: March 07, 2024, 03:06:02 pm
content: Thanks, I'll do some research!

author: golden_labels
author_rank: Super Contributor
timestamp: March 07, 2024, 03:42:09 pm
content: (Since I still can’t see the image, I’m answering based on the text only)If running batteries in sequence is your goal, follow tszaboo advice. Just pay attention to maximum voltage the chip can support: you want 58 V nominal (what is real max voltage?), while e.g. no Texas Instruments multiplexer go that high. If the current draw isn’t too big or you will not be able to find a part for 58 V, you may use a p-channel MOSFET to switch the backup battery on from a microcontroller. Be sure to place diodes to prevent charge from going between batteries. Also remember that MOSFET’s gate has to be driven up to the battery voltage to turn it off, which is not possible directly from a microcontroller I/O pin — even in open collector style driving.However, I would still consider, if it’s really your goal to switch batteries like that. I’m aware of situations, where this may indeed be desirable. But also remember that, if the current draw is constant, two batteries drained together last as long as two batteries drained in sequence. Avoiding overengineering will save you some pain, money, and potential failure points.Forum lets you post images. Please use this feature instead of broken and questionable 3rd-party services.

author: Peabody
author_rank: Super Contributor
timestamp: March 07, 2024, 04:05:23 pm
content: I've seen posts here and elsewhere in the past wanting a circuit that lets you switch in one battery at a time, or perhaps charge one battery while another is powering the load. But in the end there was never a good reason for doing that when you could just use two batteries in parallel as @golden_labels suggests. Is this another such case? Under what circumstances would you actually gain some battery life by switching batteries in and out?

author: schmitt trigger
author_rank: Super Contributor
timestamp: March 07, 2024, 04:07:47 pm
content: Unfortunately, then Ideal_Diode control IC has had its part number scratched. Otherwise, you could look at its datasheet to determine how to modify the circuit to meet your requirements.A while back I purchased a full bridge ideal rectifier built with individual control ICs for each Mosfet. Those ICs also had their part numbers scratched. I reverse-engineered the PWB, and attempted to figure out the IC part number based on the actual connections, and find a commercial IC that matched.I was unsuccessful to make a match with any device manufactured by western IC companies. I concluded that it must be a Chinese design IC, from one of the many companies that we in the west are unfamiliar with.

author: Zero999
author_rank: Super Contributor
timestamp: March 07, 2024, 06:42:26 pm
content: An ideal diode could be part of the solution, but there's more to it than that.Sounds like an X Y problem.Are the batteries the same?What voltage thresholds?Do you want any indication when it switches from one battery to the other?I doubt there's a simple off the shelf solution for this problem.

author: Siwastaja
author_rank: Super Contributor
timestamp: March 07, 2024, 07:14:16 pm
content: Whydo you want two batteries one of which is used first and then the other? Almost certainly a single larger battery - e.g. by permanently connecting the two in parallel - is not only simpler - and I meansignificantlysimpler, since a safe battery turnover switching system is far from trivial to engineer -, but also better (e.g., better efficiency, higher current capability).

author: BrianHG
author_rank: Super Contributor
timestamp: March 07, 2024, 08:08:38 pm
content: Quote from: Zero999 on March 07, 2024, 06:42:26 pmGoogle 'ideal diode ORing controller'.They have single multichannel, or separate discrete IC's designed just for this task, IE battery switcher with adjustable thresholds to drive the GATE of the mosfets you choose.Yes, some of the more complex ones have a 3 resistor power switch on good, switch out bad adjustable levels with a status line to pass between ICs to prevent rapid modulated switching if you only want 1 battery at a time logic.

author: Zero999
author_rank: Super Contributor
timestamp: March 08, 2024, 08:33:29 am
content: Quote from: BrianHG on March 07, 2024, 08:08:38 pmI've had a quick look and the ones I've found just power the circuit from the battery with the higher voltage, which isn't what the original poster wants.Can you please suggest a part which suits the original poster's application?

author: Peabody
author_rank: Super Contributor
timestamp: March 08, 2024, 03:11:36 pm
content: It appears that TI refers to them as power mux ICs. An example is the TPS2117, but it won't handle the OP's voltage and current needs.

author: No_Shorty
author_rank: Contributor
timestamp: March 10, 2024, 12:36:59 pm
content: Hi all, thanks for the further advice, I actually didn't have a chance to look into this more. There is good reason I don't want the second battery to drain at the same time - it will be acting as a UPS.Basically I run computer kit often away from mains AC for long durations, I am looking to make an 'all in one' DC power distro and UPS. AC should be the primary source of power, with an exterior battery the second source (so the distro would switch to the battery if AC is pulled or not present). However when running on the external battery, if this battery runs out or fails I need there to be a backup to switch to - hence not wanting to drain these batteries at the same time. This will also allow the main exterior battery to be switched out without AC power and without losing power to the system.Here is a rough diagram:*I would note that total power consumption will be significantly lower that the upper end of what I am speccing it for.In an attempt to keep this 'simple' and try to steer clear of circuit design which I would have to pay someone else to do I think... I am considering just have a 13s2p 18650 bank, but limiting the charge voltage to 40-50v, I would lose some capacity but would still be enough for switching power sources (as well as being high enough to allow the DCAC to work), and would work with the 'off-the-shelf' ideal diode circuits as its voltage range would consistently be lower than either primary source.Although I have been looking at the Analog/TI websites, I couldn't find anything that seemed suitable. It is well possible that I am missing things based on lack of understanding of the terminology in the data sheets.

author: wraper
author_rank: Unknown
timestamp: March 10, 2024, 01:04:24 pm
content: Note that such two terminal "ideal diodes" are not really ideal. The issue is that they still need voltage for internal operation. So they either charge internal capacitor with reverse voltage and can only work with AC voltage, or part of the time become a "normal diode" and charge internal capacitor from forward voltage like this onehttps://www.ti.com/lit/ds/symlink/lm74670-q1.pdfthus you get pulsating voltage and increased loss.For OR-ing operation you should prefer 3 terminal part that has GND connection like this onehttps://www.diodes.com/assets/Datasheets/ZXGD3111N7.pdf

author: Zero999
author_rank: Super Contributor
timestamp: March 10, 2024, 01:08:07 pm
content: Ideal diodes will will work, so long as:VPriority 1> VPriority 2> VPriority 3Going by your block diagram, Priority 1 and Priority 2 meet the above criteria. All you need to do is select a lower battery voltage than Priority 2, for Priority 3

author: No_Shorty
author_rank: Contributor
timestamp: March 10, 2024, 01:25:12 pm
content: @Wraper - I did just pick the image in the first post at random, but it does in fact have a GND connection (bottom left) and is supposedly for a DC solar circuit.@Zero999 - Indeed, this I understand at least. My only problem is that I would like AC output, and the only reputable DCAC inverter I can find for a reasonable price is the Meanwell NTS-400p, which has a voltage range of 40-60v. This works for my other sources, but means my 'UPS' source has to be above 40v and below the low end of the other battery source.I did consider either a lower voltage UPS battery with a DCDC boost converter, but couldn't find anything that looked decent and could handle the current, or a higher voltage UPS battery with a step down converter, but again couldn't find anything that looked good and could handle the current - whilst not being too big for the remaining space I have.

author: Peabody
author_rank: Super Contributor
timestamp: March 10, 2024, 02:37:36 pm
content: It's not clear to me how charging would work for both battery packs. They would need separate chargers it seems.It's also still not clear that the combined run time on the two battery packs in sequence would be any longer than just moving the priority-3 cells to the priority-2 pack in parallel, and having one UPS backup instead of two. Can you, or anyone, explain why that would be the case?

author: No_Shorty
author_rank: Contributor
timestamp: March 10, 2024, 03:10:58 pm
content: The 'priority-2' source battery is outside on an enclosure. It is charged elsewhere. It is a primary source of power that would primarily be used when away from AC power for running the entire system it is plugged in to.The 'priority-3' battery is for a UPS function only, it should only kick in when there is power loss/failure of the primary sources of power (priority 1 and 2)

author: Siwastaja
author_rank: Super Contributor
timestamp: March 10, 2024, 06:18:56 pm
content: You are not describing "ideal diode" at all. You are describing a power switch. Typically something constructed from two back-to-back MOSFETs. There are power switch ICs that handle all the ugly details like overcurrent and SOA protection. You still need to provide idiot-proof control logic so that the two batteries are never connected in parallel (well, unless that is intendedandthe battery voltages are qualified to be very close to each other before enabling the switches). And of course, battery management. All of this is significant amount of engineering work.

author: Konkedout
author_rank: Frequent Contributor
timestamp: March 10, 2024, 06:34:05 pm
content: Read the attached which I wrote years ago. Let me know if you are interested in building something like this. It would PROBABLY be possible to add hysteresis so that a few tenths of a volt differential would be needed before it switches.

author: No_Shorty
author_rank: Contributor
timestamp: March 10, 2024, 09:51:08 pm
content: Thanks @Siwastaja. This is all learning for me, I would love to have a better understanding than I do of electronics as it so often crops up in my desires for completing projects.@KonkedoutThanks, am I right to say you are echoing roughly what Siwastaja is saying?If that is an offer of developing this for me, I would be interested to know what that would cost. My assumption is that the cost would be too great to make it worth it in comparison to the 'keeping it simple' approach of just keeping the internal UPS battery at the lower voltage range to make it work the ideal diodes. But nevertheless I would be interested to know so I can make that decision with facts as opposed to guesses on my part, please do PM me if I haven't go that wrong and I don't sound too much like a dead end to bother!

author: golden_labels
author_rank: Super Contributor
timestamp: March 11, 2024, 01:42:46 am
content: No_Shorty, once again: the forum has an attachment feature. Please us it, instead of 3rd party services.The image now works, but it doesn’t give the answer to what I asked you earlier about running batteries in sequence. You never addressed that, even despite others also asked you about this. Youmentioned batteries above, but this is really just repeating the same statement. A description of how you want it to work, without explaining why you want it this way. And it’s focused on physical appearance and being (or not) in the same enclosure, while we ask you about a completely unrelated thing: the behavior of the circuit.My guess is that you are focused on some particular picture, which appeared in your head, but you never questioned its sense. So please stop for a moment and rethink it.Under constant current discharge there is not difference in how long the load will be powered in either scenario:Even if the backup battery is smaller (2:1 for this illustration).If it’s not constant-current discharge (e.g. a linear load), there will be some difference, though which will win depends on the situation.I’m not saying that there certainly is no advantage or no reason to run them this way. There may be. But implementing all this without a good reason is a waste of time and money, making everything less reliable, and even causing a slighly higher energy losses. This is a forum and people try to provide best advice, hence the questions.

author: Konkedout
author_rank: Frequent Contributor
timestamp: March 11, 2024, 02:09:53 am
content: I am working FT and I do not have the time to do a design. But if you or anyone else has enough knowledge to engineer a reasonable circuit board, I can offer guidance.

author: Berni
author_rank: Super Contributor
timestamp: March 11, 2024, 07:13:43 am
content: Sometimes there are reasons to switch batteries in and out.For example in aviation there are often two batteries for redundancy, so that one battery is used at a time, but if that drains or goes bad there is the option of switching over to the other battery. (Similar to how it is done with fuel tanks in aviation)Another example is if you have two different battery chemistries combined. In a solar installation it could make sense to have a smaller expensive lithium pack that can survive a lot of cycles, so it is primarly used to handle day/night cycles. Then you have a bigger lead acid battery pack that is there to cover bad weather situations, so this way the lead acid pack can sit fully charged most of the time, only getting cycles when it is absolutely required.

author: No_Shorty
author_rank: Contributor
timestamp: March 11, 2024, 08:44:46 am
content: @Golden LabelsI'll use the forum attachment feature in the future, I didn't recognise any of the buttons as being picture attachment so didn't realise there was one.I'm sorry I'm not communicating properly, I am describing it visually to try and be sure that I do...I am unsure how to describe it differently to clarify my point.If you imagine a UPS where the main source of power is a large external DC battery (with no AC at all, for simplicity), the UPS would contain a battery that you essentially don't want to use unless there was power loss from the main DC source, at which point you would want to switch to it fast enough to not disturb any load.I fully understand the rest of your post, but it is not relevant for my use case here.@Konkedout - thanks, if I have a circuit designed or try to wrap my head around it I'll certainly take you up on that kind offer.

author: golden_labels
author_rank: Super Contributor
timestamp: March 11, 2024, 08:44:23 pm
content: No_Shorty: but why would you like to not use this battery? What’s the goal of not using it?Berni: yes, as noted earlier, I know there may be reasons. Hence nobody is saying that the idea is outright wrong. But it may be pointless and wasteful, if the solution is literally just two Schottky diodes.

author: No_Shorty
author_rank: Contributor
timestamp: March 12, 2024, 09:00:44 am
content: @golden_labels:The goal is to always have a backup. The clearest example in my mind I can refer you to again is a UPS: it has an internal battery that is not used unless there is power loss. This is the purpose of this battery. To provide an amount of time following power loss where the primary source of power can be replaced.