High-side N-channel FET Switch (100% duty cycle ?). - Page 1
Forum section: electronics / beginners

author: Dannyx
author_rank: Regular Contributor
timestamp: August 29, 2024, 08:09:28 pm
content: Good day folks. I'm currently working on building a kind of ghetto/poor man's UPS for a 12v DC system. Yes, yes, there ARE commercially ones available, but that's not the point, is it ?I like to tinker with stuff and build my own junkTL;DR: can aIR2117drive a high-side N-channel FET with 100% duty cycle (DC only) ? To tell you the truth, the datasheet doesn't make this clear.....to a newbie like me. This is the first time I attempt to use an N-channel FET to switch the HIGH side of anything, so I figured it's good place to learn.I kind-of understand why most boostrap circuits CANNOT stay 100% on all the time and I assumed that using a purpose-built IC for this would solve this problem by default, but not quite so. From what I've read, even ICs require a minimum "off" time to recharge the bootstrap cap. I was hoping I'd find one that has its own "charge pump" (?).Granted, the datasheet for the IR2117 doesn't SAY "charge pump" anywhere, BUT the block diagram does show a "pulse generator" and what appears to be a flip-flop (?)....so does this mean it takes care of the required "switching action" internally, even if the "in" pin is pulled high indefinitelyIf it turns out this one is not suitable, what would you recommend for the job....if such thing even exists ? Not many get mentioned out there.THIS is how I imagine this project should work. I only built it up to the batteries and I'm working on improving it. Schematic is far from "finished", so please bare with me.I found a 53v PSU in the trash for some reason. Still works though, so it's going in my projectThe DC/DC converter at the top-left is a random CV/CC module I picked up for 2 bucks off Aliexpress (because it arrived busted and I requested a refund. The fix cost me nothing). This guy acts as my "charger". When the 53v supply is powered by mains, the DC/DC converter also powers a second DC/DC converter (which I do not yet have) to supply the load with 12v, while also charging the batteries. Of course, the catch is that if the LOAD requires a higher current than the batteries, the CC aspect goes out the window, but through basic experiments I found it's not the case - the batteries ARE the highest load.Now for the fun part: I'm thinking of designing a crude cut-off for when the batteries are close to fully discharged. I thought: op-amp and MOSFET as switch. Still a lot of work to do there, but hopefully it makes some sense as to what I was picturing. There are probably MANY things wrong there - no caps, no protection mechanisms, op-amp is wired incorrectly for the job, I know.....I'm just pounding out the details for now. Thanks.

author: langwadt
author_rank: Super Contributor
timestamp: August 29, 2024, 08:34:08 pm
content: Quote from: Dannyx on August 29, 2024, 08:09:28 pmno ..

author: DavidAlfa
author_rank: Super Contributor
timestamp: August 29, 2024, 08:38:06 pm
content: Just use p-CH fet?

author: Zero999
author_rank: Super Contributor
timestamp: August 29, 2024, 09:49:15 pm
content: A bootstrap circuit works by charging a capacitor via the load, whilst the driver transistor is off, then connecting the capacitor to the transistor's gate to turn it on.If the transistor is turned on for too long, then the capacitor will discharge.It's possible to get quite a high duty cycle, but never 100% with a bootstrap circuit. Here's an example of a circuit I designed to give a high duty cycle but M1 still needs to be turned off to charge C1, via D1 and RL. Note it's inverting, so the transistor turns off, when the input goes high.

author: Benta
author_rank: Super Contributor
timestamp: August 29, 2024, 09:59:48 pm
content: If it's just static switching (and it seems to be) where you can live with some milliseconds of switching speed, use a photovoltaic optocoupler.Eg,https://www.vishay.com/docs/49262/49262_pt0314.pdf

author: DavidAlfa
author_rank: Super Contributor
timestamp: August 29, 2024, 10:20:56 pm
content: Also there're integrated charge pump gate drivers, like theLTC7100LTC7001(135V).Or use anauxiliar charge pump:

author: jmelson
author_rank: Super Contributor
timestamp: August 30, 2024, 01:59:48 am
content: Yes, it can, if you provide a separate, floating supply to keep the bootstrap capacitor charged. I built a full-bridge motor drive this way, it had a small, transformer coupled charge pump that created the bootstrap supply.Jon

author: BrianHG
author_rank: Super Contributor
timestamp: August 30, 2024, 02:40:05 am
content: Quote from: DavidAlfa on August 29, 2024, 10:20:56 pmWrong part number...High side gate driver with integrated boost converter:https://www.analog.com/media/en/technical-documentation/data-sheets/ltc7001.pdf

author: BrianHG
author_rank: Super Contributor
timestamp: August 30, 2024, 02:43:06 am
content: Quote from: Benta on August 29, 2024, 09:59:48 pmThis one has an improved gate voltage of 14v compared to the older 7-9v photovoltaics I used to use.Thanks.

author: Kim Christensen
author_rank: Super Contributor
timestamp: August 30, 2024, 03:29:56 am
content: If the 24V to 12V convertor will be the only load, then simply buy one that already has a low voltage cutoff feature.You can also get convertors with a remote on/off feature that you could control with your own low battery detector.

author: ArdWar
author_rank: Frequent Contributor
timestamp: August 30, 2024, 03:34:03 am
content: Quote from: Kim Christensen on August 30, 2024, 03:29:56 amOr use converter with ENable input, driven by the comparator.Tho a bit tricky if you really want to get rid of the quiescent draw.Also what's with the fuses? At what point it start to be counterproductive?

author: BrianHG
author_rank: Super Contributor
timestamp: August 30, 2024, 03:54:33 am
content: Quote from: ArdWar on August 30, 2024, 03:34:03 amThe aforementioned ltc7001 has a built in UVLO circuit.Need to double check the quiescent current draw when it is in shutdown mode.

author: Dannyx
author_rank: Regular Contributor
timestamp: August 30, 2024, 06:12:56 am
content: Thanks for all the replies.Let's review then:I WAS going to go with a P-channel FET, but I thought I'd try to improve my "design" by keeping the On resistance as low as possible, plus N-channels are cheaper AND I have a box full of themSomeone mentioned the IR2117 can be used after all, but I'm not sure I understand what would classify as a "floating" supply in this case. The datasheet shows the IC sharing a common GND with the load, so I assume that is NOT a floating supply, nor is my LDO idea which I featured in my crude schematic. To me, a floating supply sounds like it involves a separate GND entirely, so the "COM" pin of the IC would be tied to that and the GND of the load tied to the rest of the system. I don't think I want to start designing such a supply from the ground up, so.....Quote from: jmelson on August 30, 2024, 01:59:48 amThe LTC7001 seemed to show up the most during my searches indeed. The supplier I tend to get parts from doesn't carry it unfortunately, so I'll have to find something equivalent. It seems to make the most sense at the moment.Quote from: BrianHG on August 30, 2024, 02:40:05 amNot to sound like a smart@$$ - just askin' - but the internal block diagram of the LTC looks similar to the one of the IR2117 (save for the charge pump block in the middle, which might be the key difference - makes sense, since I need to drive the gate of the FET above the input voltage). Itseemedto me like the IR2117 would also "pump" the external cap via the diode using those two transistors in the block diagram, hence why I thought I was all set and rolled with it for a while until I decided to slow down and check. Unfortunately, the datasheet provides no details on this or what happens to the "VCC" pin inside the IC and whether it gets "boosted", so there's probably a good reason why it wasn't suggested anywhere......

author: Andy Chee
author_rank: Super Contributor
timestamp: August 30, 2024, 06:26:50 am
content: For a brief glance at various high-side gate drive topologies, refer to the table on page 29.

author: Dannyx
author_rank: Regular Contributor
timestamp: August 30, 2024, 05:29:40 pm
content: Quote from: ArdWar on August 30, 2024, 03:34:03 amI was planning on usingTHISas the convertor on the far-right, which does actually have a "CTL" input and claims to have a current draw of only 120uA in standby......using its own pin to switch it off might not be a bad idea actually, but I still want to learn about driving a high-side MOSFET, even after the factThe fuses:.......well I just threw one wherever I felt was necessary. A TVS diode on the outputs might also prove necessary. I'm still working on that partNot sure if I should use a zener or a TVS as a means of blowing the fuse. Poor man's OVP protection, I know.....

author: Zero999
author_rank: Super Contributor
timestamp: August 30, 2024, 06:16:03 pm
content: Quote from: Dannyx on August 30, 2024, 06:12:56 amThe IR2117 has two power supplies. One which powers the logic, which is connected between VCCand COM and the MOSFET driver VBand VS. In the circuits given on the data sheet, VSis connected to the load, which connects it to COM, hopefully via a fairly low resistance. VBis connected to VCCvia a diode and to a capacitor. When the transistor is off, the capacitor charges via the diode and when the transistor turns on, the voltage on VSrises, because current flows through the load. which pushes the voltage up,The idea is to connect an isolated power supply, for example a DC:DC converter between VSand VB, so it can turn the MOSFET on all the time, without having to rely on the energy stored in a capacitor.

author: Dannyx
author_rank: Regular Contributor
timestamp: August 30, 2024, 06:40:54 pm
content: To make it easier to grasp, I like to think that "Isolated DC:DC converter" you added is a battery. Now, if this calls for an "isolated" DC-DC supply, it means a plain-@$$ buck converted won't work, because the "input" GND is the same as the "output" GND, so it looks like THIS, if I understand correctly. When the FET closes, the "load power" would get shorted to GND through the buck converter or LDO, whatever...In the meantime, I managed to locate what on first glanceappearsto be a charge pump-based driver. AnLM9061. I haven't gone through the entire datasheet - just scanned my eyes across it

author: Doctorandus_P
author_rank: Super Contributor
timestamp: September 01, 2024, 07:15:00 am
content: N-channel MOSfets, are in some qualities "better" then P-channel MOSfets. (Cost, Rdson), but they are easier to use as a high-side switch.VO1263 costs EUR5 at digikey in low quantities, I don't know the cost of IR2117 (Digikey lists them as obsolete) But I guess you can buy a really fancy P-channel MOSfet for that price, or put a bunch of them in parallel to each other.But you do not need to switch fast, (I don't know how slow you can tolerate) One option is to use an isolated DC-DC converter, connect the secondary side to the gate & source of your N-channel MOSfet, and then switch the primary side on or off.Another option is a charge pump. Just a few diodes and capacitors. As soon as you start putting an AC voltage (uC PWM pin, beefed up by an NE555 or similar) into it, it will start pumping the voltage above your output rail.

author: Postal2
author_rank: Frequent Contributor
timestamp: September 01, 2024, 08:49:10 am
content: Quote from: Dannyx on August 29, 2024, 08:09:28 pmIf one month is enough, then yes. Just increase the capacity of the capacitor. I can't say for sure about IR2117, but I saw such a solution on a chip from the same series. Just check the discharge rate of the capacitor, most likely it will work.

author: Dannyx
author_rank: Regular Contributor
timestamp: September 01, 2024, 08:50:55 am
content: I came across theLM9061which seems to fit the bill. People seem to have missed itThis is how the "new" schematic would look. One slight disadvantage is that the maximum VCC for the LM9061 is given as 60v, while therecommendedoperating voltage is 26v, which is at the very top of my "charger's" output for those 12v batteries is series, so I hope the IC doesn't complain too much.

author: Doctorandus_P
author_rank: Super Contributor
timestamp: September 01, 2024, 09:07:00 am
content: Your application is a battery protection / switch circuit, so using an IC that is designed for that seems to be a better option then an IC designed for motor controllers. But I have not looked into details.

author: Kim Christensen
author_rank: Super Contributor
timestamp: September 01, 2024, 03:24:56 pm
content: Quote from: Dannyx on September 01, 2024, 08:50:55 amAs per the datasheet:QuoteYou're 3v away from it going into overvoltage protection, so as long as there is not too much ripple coming from your first DC-DC, or spikes from other loads on the 27v line, it's marginal but probably OK for a hobbyist project.

author: Dannyx
author_rank: Regular Contributor
timestamp: September 01, 2024, 03:38:27 pm
content: Yes, that is true. I did miss that part. I'm not patient at reading through datasheetsI also learned that the time required for the protection to trip can be altered by the cap on pin 8, which is required to begin with, so I guess I should make it so that transients don't trip it. The load is rather light in this case: a DVR, (so a HDD), a NAS (2 more HDDs, but this will soon be removed), 2 cameras and 2 network switches. The highest load will be at startup, when all the caps charge and the hard drives spin up. The NAS appears to be smart enough to power up the drives one after the other, instead of both at the same time, so I estimate the maximum current draw to be around 4 A MAX.

author: Dannyx
author_rank: Regular Contributor
timestamp: September 02, 2024, 05:19:42 pm
content: Moving away from driving the FET for a moment, I started thinking about how it would be best to power my crude "logic", namely the op-amp I'll be using and reference.The most crude (and far from ideal) way I can think of is to go with an LM393 - it can technically run straight off the 24v rail. To generate a stable reference for it, I could either A) use a zener diode (and use a voltage divider from it to reference one of the inputs ?) or B) use a voltage reference like a TL431 (and use a voltage divider from it). I assume both are pretty horrendous in terms of temp-co and current draw. Probably equally as bad would be to power the op-amp itself FROM the TL431.Alternative C): an LDO to power the op-amp, with the reference also derived straight from it.Alternative D): an LDO to power the op-amp AND a TL431 to generate the reference separately (that's what the 431 is actually called: "voltagereference").Alternative E): any other suggestions for either of these parts, as always.

author: Kim Christensen
author_rank: Super Contributor
timestamp: September 02, 2024, 08:21:54 pm
content: A) Zener is fine for this. You really don't need much precision. You can get ones with built in temperature compensation or DIY in your own with an additional diode. ( See14.2.1 Zener diodes)B) TL431 would be more than good enough.C) You don't need a LDO... A plain old jellybean voltage regulator IC will work since you'll have lots of headroom.D) Using both a regulator and TL431 would be overkill in my opinion.

author: Zero999
author_rank: Super Contributor
timestamp: September 02, 2024, 09:42:38 pm
content: Quote from: Kim Christensen on September 02, 2024, 08:21:54 pmYes, the plain old LM78L12 will do.

author: ArdWar
author_rank: Frequent Contributor
timestamp: September 03, 2024, 12:28:07 am
content: 78x works, but if you're that concerned with power consumption then you may need to pick something else as its quiescent current is pretty brutal at 2-5mA. Not that LMx3 comparators are particularly low power either.I'm not sure what's considered jellybean at this performance level, but Diodes AP73xx are pretty popular and the one in SOT-23-5 (SOT-25) package with IN-GND-EN pinout are cross compatible with many other offering from various manufacturers. Do check your pinout however.

author: Dannyx
author_rank: Regular Contributor
timestamp: September 03, 2024, 05:47:50 pm
content: Thanks for the replies once again. Quiescent current IS important in this application (at least on paper), so the 78XX family was pretty much out. Keeping that in mind, I sifted through some LDOs and picked one with the lowest quiescent current that I could possibly find on the supplier's website, which is aMCP1804. The input voltage is at the very top of the limit (might not survive due to transients) and the output current is fairly low at 150mA, so I don't know if that's going to be an issue in practice, since I don't know how much current the comparator typically draws. "Low" in this case might be plenty.The AP73XX suggestion appears to be better in just about every aspect, but the supplier doesn't carry any of themI'm pretty sure I'd have to go with a 12v output though (I mistakenly linked to the 5v version and realised that might be too low for this particular application, so I scrapped it, lest someone read it).Setting that aside for now, once I DO have an LDO ready to go, there's the matter of deciding if I should power the comparator itself from the LDO, or just use the LDO for the resistive divider that will serve as the reference.Jellybean or not, I still want to keep it "somewhat professional" (or "industry standard"), but DIY at the same time

author: Kim Christensen
author_rank: Super Contributor
timestamp: September 03, 2024, 07:52:59 pm
content: A quick search of Digikey turns up 172 linear regulators in stock that can tolerate more than 36V on their inputs and have less than 100uA of quiescent current draw. That'd be my 1st choice. (Find a better regulator)Since you have plenty of headroom, you could use a resistor to drop the input voltage to the regulator down a few volts. Size it so that there's enough voltage at max load and low battery voltage, but that it still drops enough voltage at minimum loading and max battery voltage. Combined with the obligatory capacitor on the regulator's input, this should mitigate any short duration voltage spikes from being an issue.Another option is to use a zener instead of a resistor to drop the required voltage if the current variation is too broad. (in series with the input)Assuming low quiescent current only really matters when the batteries are depleted, you could make a simple preregulator with a transistor, resistor, and zener. But choose a zener voltage well above your battery's low voltage cutout. That way the zener is only conducting when the battery voltage is high. (Charging)QuoteIf the battery voltage is close to the comparator's limit, then power it from the regulator. You can use the LDO to do both: Be the reference and power the comparator since there's no need for super accuracy here.One plus for using the LDO for the reference only is that the LDO's current draw will be pretty much fixed. That'll facilitate the resistor voltage dropper method.

author: BrianHG
author_rank: Super Contributor
timestamp: September 04, 2024, 01:52:50 am
content: I wonder if you could use a standard high side driver for the speed with an always-on photovoltaic as your charge pump.IE: the photovoltaic is your isolated DC-DC supply.When the mosfet is off, you have the normal diode charging the gate voltage supply.When the mosfet is on, the photovoltaic across the bootstrap capacitor to hold the gate supply 12v above the source.

author: Zero999
author_rank: Super Contributor
timestamp: September 04, 2024, 01:12:12 pm
content: If a tiny amount of voltage ripple is acceptable, you could switch the load off for tens of µs, every second or so and put a large capacitor across the load to power it, whilst it's off. Another MOSFET will need to be added to discharge the capacitor, when the load is off.Here's an example of how to do it with the IR2117. The 1000µF capacitor will power the load for a short period of time after the MOSFET is off and the 2N7002 provides a path for the bootstrap capacitor to charge, when it's off. It can't charge though the load, because the big capacitor keeps the load voltage high, so there would be no potential difference to charge it.Bad circuit attached. Don't use. Corrected versionhere.

author: BrianHG
author_rank: Super Contributor
timestamp: September 04, 2024, 03:21:38 pm
content: @Zero999, wont your circuit potentially send a negative voltage into the Gate if a turn off happens while the 2N7002 is on?Also, the pins VB-VS can only be maximum 25v. If you want a 48v high-side switch, wont you over drive the 25v max?Also, according to the data sheet, you will still be dragging down the top of the cap with the bottom, so you will still be turning off the top mosfet when the requirement was 100% on time.I still like my idea. Copy the example in the IR2117 data sheet, and across the VB-VS cap, place a photo-voltaic optocoupler. When the IR2117 is turned off, the diode between Vcc and VB provides a high current fast charge for the cap between VB and VS. When turned on, the photo-voltaic optocoupler keeps a 12v continuous 12v charge on that cap allowing 100% on operation.In this circuit, the only purpose for the IR2117 is the high speed switching. Otherwise, just using a photo-voltaic optocoupler all on it's own would be fine.

author: Dannyx
author_rank: Regular Contributor
timestamp: September 04, 2024, 03:57:29 pm
content: Thanks for the feedback once again. Lots of great ideas in here. One in particular caught my attention:Quote from: BrianHG on September 04, 2024, 01:52:50 amAlthough it increases the complexity quite a lot, I guess it should work, so perhaps someone can provide some pros and cons to this, if it's at all possible.On the comparator side, adding a resistor in series with the input to the regulator sounds like the simplest possible solution and a decent compromise. It's only going to be using a meager amount of current anyway. I can't imagine the comparator + resistive divider drawing that much current as to cause that input resistor to heat up.Taking it one step further would be to also use a zener there to clamp to 30v. This was among the suggestions as well, if I understood it correctly. I already have the resistor - why not add a zener to GND as well ? Makes sense. Unless the overvoltage is significant, the zener doesn't even need to be on all the time.Is an adjustable LDO typically a good idea for this kind of application, or are they considered "less stable" ? It greatly increases the variety, because most of the ones the supplier carries ARE adjustable...

author: BrianHG
author_rank: Super Contributor
timestamp: September 04, 2024, 09:00:53 pm
content: Quote from: Dannyx on September 04, 2024, 03:57:29 pmNo it doesn't. You follow the bottom end example circuit in the IR2117 data sheet.Then, you take your photo-voltaic's output side and tie it in parallel with the cap across pins VB and VS.It will keep the cap charged at a minimum of +12v.On the LED side, just tie your 5v or 3.3v via series resistor to the LED.Yes, the photo-voltaic is always on always delivering +12v into the cap.You drive your IR2117 normally with your high speed digital PWM control signal.Again, if you do not need the super high speed PWM, ignore everything else and just use the photo-voltaic directly between source and gate on the mosfet. No other parts needed anywhere. Just a resistor on the LED side of the photo-voltaic.Yes, there exist photot-voltaics with 10x faster turn off times than the one listed earlier in this thread, however, the turn on time is identical.

author: BrianHG
author_rank: Super Contributor
timestamp: September 04, 2024, 09:21:32 pm
content: High speed voltaic: 8.4v, 53us on, 65us off.https://www.vishay.com/docs/83469/vom1271.pdfHowever, with 8.4v output, this guy need logic level mosfets.Slower speed, but higher voltage: 13.9v, 35us on, 90us off. Times 2. Needs external p-channel j-fet.https://www.vishay.com/docs/83802/lh1262ca.pdf

author: Kim Christensen
author_rank: Super Contributor
timestamp: September 04, 2024, 11:29:34 pm
content: Quote from: Dannyx on September 04, 2024, 03:57:29 pmIf you need a bit more current capability, you can add a transistor to the zener circuit like the circuit on the left. Then you can get away with a max zener current that is only 5-10% of the barebones zener circuit on the right. (LDO still needs it's own bypass capacitors)What kind of a battery will you be using? Lead acid?

author: BennoG
author_rank: Frequent Contributor
timestamp: September 05, 2024, 05:44:57 pm
content: A completely different approach.Integrated power rail switchers.VN7050ASTRhttps://nl.mouser.com/datasheet/2/389/vn7050aj-1852754.pdfBTS5010https://nl.mouser.com/datasheet/2/196/Infineon_BTS5010_1EKB_DS_v02_00_EN-1511519.pdfBenno

author: Dannyx
author_rank: Regular Contributor
timestamp: September 05, 2024, 06:30:09 pm
content: Thanks for the input again. Some more info:Quote from: BrianHG on September 04, 2024, 09:00:53 pmI saw someone mentioned PWM. I won't be doing any PWM, nor involve a micro in this project - just a basic on/off control straight from a comparator output when the battery drops below a certain value.....at least that's the plan. The idea is to prevent erratic behavior on the downstream devices when the voltage drops below a certain threshold and also prevent too deep a discharge.Then:Quote from: Kim Christensen on September 04, 2024, 11:29:34 pmYes, I'm planning on using 2 12v/20Ah SLAs in series, since I already have them on hand. I know SLAs are fairly resilient and can take some abuse with little to no risks, esp. when compared to LiIon cells, but I wouldn't want to abuse them and go ham on them either.TheLM9061also seems a viable option for driving the cut-off FET, all things considered.As far as photovoltaics are concerned (whether on their own or in combination with a separate driver), during my searches I came across aFDA217. I haven't done any deep dives into the datasheets to work out how it performs vs. the suggestedVOM121, but what the FDA has going for it is definitely the package: a DIP is MUCH more suited for my particular case, since I will be hand-assembling onto perfboard. I CAN technically botch-solder SMDs there as well somehow, but......y'know......EDIT: I may be wrong after all.....the speed difference between the FDA and the VOM is significant and I suppose it's directly proportional to the output voltage each produces. 8.4v is a tad on the low side, but it's faster....makes sense.

author: Kim Christensen
author_rank: Super Contributor
timestamp: September 05, 2024, 07:37:34 pm
content: Quote from: Dannyx on September 05, 2024, 06:30:09 pmDon't forget that SOIC to DIP adapter boards are pretty cheap to buy.

author: Zero999
author_rank: Super Contributor
timestamp: September 05, 2024, 09:28:21 pm
content: Quote from: BrianHG on September 04, 2024, 03:21:38 pmI messed the circuit up because I missed a transistor off. Here's the corrected version.Quote from: Kim Christensen on September 05, 2024, 07:37:34 pmI wouldn't bother with those adaptor boards for ⅟20" pitch 8 pin parts. Bend two of the middle pins opposite one another (2 or 3 and 6 or 7) up, then you can solder the other pins to the tracks and the middle pins can be connected to the necessary parts of the circuit via thin enamelled wire.

author: langwadt
author_rank: Super Contributor
timestamp: September 05, 2024, 10:12:41 pm
content: Quote from: Kim Christensen on September 05, 2024, 07:37:34 pmsomething like this:https://www.lcsc.com/product-detail/Power-Distribution-Switches_Infineon-Technologies-BTS6133DAUMA1_C2680389.htmlwouldn't be too hard to fit on a perf board, just lift the two center legs

author: BrianHG
author_rank: Super Contributor
timestamp: September 05, 2024, 11:36:32 pm
content: Quote from: Dannyx on September 05, 2024, 06:30:09 pmOk, just use a singlehttps://www.vishay.com/docs/83802/lh1262ca.pdfand be done with it.No high side switch.No J-Fet needed as you do not care about it being ultra fast.Just 1 photovoltaic optocoupler and a series resistor for the LED side.As for the low voltage comparator, just use a CMOS input micro-power one and wire it for some hysteresis with a voltage reference on the inputs. The output should drive the LED on the photovoltaic.When in undervoltage shutdown, your circuit should draw a few microamps of current, IE, power just the comparator.When turned on, your circuit should draw the 10ma it takes to power the led on the photovoltaic.If you decide to use a P-Channel Mosfet instead (You can have 2 or more in parallel for huge currents, low on resistance), IE: No gate driver needed, the output of the comparator goes directly to the mosfet's gate with a series resistor. With this circuit, whether on or off, the quiescent current will be the same few microamps. For a P-Channel mosfet in a 12v circuit, make sure the chosen one has a gate which can survive at least 15v, maybe 24v.Example 16v comparator with a quiescent current at around ~2ua.https://www.digikey.com/en/products/detail/texas-instruments/TLV3702IDR/1669452Note that a 40v version of a ~1ua quiescent comparators exist in the 2.25$ each range like this one:https://www.digikey.com/en/products/detail/texas-instruments/TLV1861DBVR/17748398(This one needs a pull-up resistor when used with a P-Channel mosfet...)These guys would be useful for a battery system operating in the 24v-30v range.For the P-Channel mosfets, you might need a series resistor to the gate with a ~15v protection zener diode.

author: Dannyx
author_rank: Regular Contributor
timestamp: September 06, 2024, 06:11:05 pm
content: The last post made me reconsider my options. I started off with a basic On/Off control which I was going to accomplish the easiest way possible: a LOW side N-channel driven by the comparator. I then kicked it up a notch with a HIGH side P-channel FET (still relatively easy to accomplish, but unsatisfactory in terms of resistance). I then kicked it up once more with a HIGH sideN-channelFET AND a driver. This increased the part count and complexity.I now realize I missed one in-between option, which was mentioned just now: 2 (or more !) HIGH side P-channel FETs. Would this be feasible ? Can a comparator drive such a gate capacitance reliably ?The TLV family is unobtanium unfortunately....What I WAS able to source based on suggestions so far are:-IR2117-FDA217-VOM1271-MCP1804 as the LDO I mentioned-LP2901as a "ultra low power comparator". Not sure if this last one is relevant/good/useful in any way. It's also a VERY old part....

author: BrianHG
author_rank: Super Contributor
timestamp: September 06, 2024, 09:45:55 pm
content: Quote from: Dannyx on September 06, 2024, 06:11:05 pmUse the TLV1861DBVR. This one's supply current is 440na per channel, not the ~100x 60ua of your bipolar one. (x2 and x4 versions exist, in dip 8 and dip 14 packages.)You get 40v so that charging a 24v cell close to your 30v would break your chosen comparator.Also, it has CMOS inputs, so, when dividing the battery voltage to test against your voltage reference or regulator, you may use higher resistance resistors keeping you batteries load to a minimal and your resistor divider cool. (IE: less input current, measured in the picoamp range compared to your bipolar comparator nanoamp range.)QuoteThe more capacitance just means a slower turn on/off. So long as you meet 0v for off and a good -12v to -15v for on, you will be fine. It will probably operate at the speed of the photovoltaic if you use a big series gate resistor like over 1k ohm.

author: BrianHG
author_rank: Super Contributor
timestamp: September 06, 2024, 09:54:46 pm
content: Try this comparator:https://www.digikey.com/en/products/detail/texas-instruments/TLV1812QDRQ1/18716516With push-pull output, all you need is a series resistor from the comparator's output to the P-Mosfet gates.It has +/- 30ma output drive.Use 1 resistor per P-Mosfet.If you choose a P-Mosfet with a built in gate zener diode protection, that is all you will need, otherwise, you will need 24v zener diodes. (Choosing a P-mosfet which can handle 24v at the gate means 0 current with a 24v battery supply. Or, very little when using a 100k or 10k series resistor.)

author: BrianHG
author_rank: Super Contributor
timestamp: September 06, 2024, 10:21:30 pm
content: Find a low quiescent negative voltage regulator of -12v or -15v and all you need is the comparator, a few resistors and caps with the P-Mosfets. No zener gate protections. You can also drive the gates with the full 30ma drive.Basically, the comparator's VCC is tied to the bat + once again, but the comparators GND is tied to the output of the regulator giving it a false ground 12v down from the batteries 24v. The comparators push-pull output will swing between the batteries V+ and down to 12v below, perfect for the gate.You voltage sense will be a resistor divider going all the way down to the true 0v, 24v below, divided so you will see around +15v at it's - input. The + input will be a fixed voltage divided reference between the -12v regulators output and the bat V+.I know this is a little up-side-down, but when the battery voltage drops, that +15v also drops and once it goes below the + input reference, the comparator's output will go high turning off the P-Mosfet.

author: Postal2
author_rank: Frequent Contributor
timestamp: September 06, 2024, 10:41:45 pm
content: Quote from: BennoG on September 05, 2024, 05:44:57 pmThese (above) are very unreliable chips, do not use them. Use something like BTS432E2.https://www.farnell.com/datasheets/1836336.pdf

author: Kim Christensen
author_rank: Super Contributor
timestamp: September 07, 2024, 12:15:11 am
content: Quote from: BrianHG on September 06, 2024, 10:21:30 pmYup... That's how I'd do it with a P-FET. Simple circuit.

author: Dannyx
author_rank: Regular Contributor
timestamp: September 07, 2024, 08:59:20 am
content: Thanks for the info.Like I said, I cannot source a TLVxx comparator anywhere unfortunately. Shipping is way too expensive.With that in mind, what should I look out for in a comparator ?-maximum operating voltage, that's probably at the top of the list as #1-maximum sink current (or source current if it's a push-pull), that's #2-whether it's a push-pull or open-collector config, that's #3-other more intricate stuff like bias or offset ?If a comparator appears to be suitable in all other aspects but fails the voltage range, it's probably not necessarily a deal-breaker, since I could use the LDO to act as both the supply AND the reference, as previously discussed.Actually, let's try this:HERE'S a linkto the website where I get my sh!t from. I linked the comparator section. That way, you can see what I'm seeing. The results may differ because of your location, but it should be good enough to play around with the filters...

author: BrianHG
author_rank: Super Contributor
timestamp: September 07, 2024, 11:30:32 am
content: If you use my negative LDO regulator trick, then your comparator only need to operate up to 12 to 15v.Does Aliexpress ship to you in a cheap manner?Also, if you can do microcontrollers, thing like cheap 8bit PIC guys have built in voltage reference and ADCs if you want to software manage your battery, but, that's a whole other can of worms.

author: Dannyx
author_rank: Regular Contributor
timestamp: September 07, 2024, 01:04:23 pm
content: Yes, I do use Ali a lot (hundreds of orders now), but when it comes to small parts like these, I only use it as a last option because word has it that they may not always be genuine, despite what some sellers claim. How they perform in the long run may be questionable...Quote from: BrianHG on September 07, 2024, 11:30:32 amIf I end up using P-channel FETs after all, why is it necessary to use a negative voltage like that ? I must admit, I haven't quite dug into your example and draw it in order to fully understand it. I always assumed pulling the gate to GND opens a P-channel FET and pulling it back to the supply rail "closes" it and that's it.To try and answer my own question: is it because of the Vgs rating ? In my high-side switch setup, the SOURCE would be connected to 24v, meaning when the gate is "ON" (0v), Vgs is 24v (even 27v when "charging"). I see the typical Vgs rating is around 15v for most P-channels. Is this the limiting factor ?Speaking of FETs: the P-FET with the lowest RDSon on this particular supplier is 7.5mOhms and it's really expensive for a FET. The cheaper runner-up is 9ohms, although still not that cheap. The thing is, save for the complexity, the price of a single P-channel FET doesn't balance out the N-channel+driver variant, even the most involved one where I use a driver AND a photovoltaic "supply". I have a ton of N-channels on hand I salvaged from various boards, so that will cost me nothing. I'm sure I can pick one out of all of them.

author: BrianHG
author_rank: Super Contributor
timestamp: September 07, 2024, 04:00:27 pm
content: Quote from: Dannyx on September 07, 2024, 01:04:23 pmIt is not necessary.It just bring your entire project down to 1 comparator ic, 1 regulator, a few caps and a few resistors.Remember, the P-Channel gate when turnedoffis tied to your batteriesV+.When you want to turn on the P-Channel, the gate needs to be lowered towards the battery GND, but not more that 18v or 24v depending on the chosen mosfet.So, with a 12v battery system, no needed gate protection or regulator.With a 24v or higher system, to be safe, you need to protect the gate from going too low towards GND.Your other option is using a Zener diode with series resistor. But, that series resistor slows down the gate drive as you increase it's value. The Zener diode voltage and bat voltage determines how much current may be lost when you pull the gate down towards GND.

author: Dannyx
author_rank: Regular Contributor
timestamp: September 07, 2024, 04:17:35 pm
content: Quote from: BrianHG on September 07, 2024, 04:00:27 pmOk, so I WAS right in my understanding of it, though my wording was differentIt IS a 24v system, so to be honest, it's a good thing I took a moment to slow down and ask about it, otherwise I would've lived my whole life under the impression that simply grounding the gate of a P-channel is all you need to do to get it going, without any precautions or limits whatsoeverNot sure why it finally makes sense so late. I mean, I KNEW about the Vgs rating of FETs in general, but I guess the upside-down nature of P-FETs made it tough for me to apply it.Like I said, I probably won't be using a P-FET after all. The idea I like the most so far is the N-channel+driver+photovoltaic thing.I just need to settle on a suitable comparator.....

author: Kim Christensen
author_rank: Super Contributor
timestamp: September 07, 2024, 07:43:47 pm
content: Since this is all about protecting the battery from over-discharge, why not switch the battery's negative lead with an N-FET? (MOSFETS drain-source also work in reverse.)I've drawn the body diode for clarity, but no extra diode should be required. Plus, things like decoupling capacitors and pre-regulator for the LDO are not shown for simplicity.

author: Dannyx
author_rank: Regular Contributor
timestamp: September 07, 2024, 08:12:21 pm
content: Well, that WAS how I was going to do it initially (plain and simple), but then I figured you don't normally cut off the GND to a device, while leaving "hot" connected - doesn't seem industry-standard.*tangent* Same way you don't cut the neutral wire and leave live connected in a mains-powered circuit, which is why here in the EU all mains switches cut off both terminals, since plugs are not polarized, so there's only a 50% chance one of them is live and the other neutral.....*tangent over*Besides, it's all a learning experience. It's not all about the end result.

author: Kim Christensen
author_rank: Super Contributor
timestamp: September 07, 2024, 09:28:14 pm
content: Mains circuits are different because the neutral is not isolated from the ground.If you ran your 240V mains through an isolation transformer, then it wouldn't matter which side of the transformer's output winding you put the fuse or switch in.A battery is completely isolated so there's no "hot" or "neutral". You can make a circuit positive "ground", like they did in old cars or circuits with PNP transistors by grounding the positive battery terminal, or negative ground by grounding the negative terminal. The circuit I posted is functionally the same as 1/2 of the protection circuits (Discharge) that you see on all Lithium batteries.Check out how theDW01A protection ICworks. It switches the battery negative with two N-FETs to protect against both over-charge and over-discharge.

author: Dannyx
author_rank: Regular Contributor
timestamp: September 07, 2024, 09:47:37 pm
content: Ok, that makes sense I guess....I was always "taught" not to lift the GND to cut power to devices in general.Are there any possible side-effects to doing this ? It would sure simplify the project by a lot if I can just get away with using an N-channel on the GND like I originally intended and not kill something like a hard drive or brick the firmware of some device

author: Kim Christensen
author_rank: Super Contributor
timestamp: September 07, 2024, 10:00:36 pm
content: As long as both DC-DC convertors don't care if there's no battery in circuit, then all should be OK.It does bring up one issue: The 1st DC-DC that charges the battery. Will this be set up like a proper battery charger where it raises the voltage to around 29V and then cuts it back once the battery is fully charged? Or will it just be a "dumb" float charger maintaining a steady voltage of 27V with current limiting? Most smart battery charger schemes don't like loads on the battery they are charging. With a dumb float charger, it won't matter but a fully discharged battery will never get fully recharged with that.

author: Dannyx
author_rank: Regular Contributor
timestamp: September 08, 2024, 09:14:34 am
content: The "charger" isTHIS. I adjusted the output voltage to around 27.5v and the current limit to around 4A. I ran a couple of tests by running a moderate load on the batteries using some light bulbs until the batteries reached around 11v (each) and then connected them up to this module. The "slope" seemed to be what you'd expect: it stayed in CC mode for a while and then switched to CV ("float"). Probably good enough for my purposes...

author: Dannyx
author_rank: Regular Contributor
timestamp: September 09, 2024, 04:11:39 pm
content: Speaking of which: is there any benefit to trying to implementsome form of balancing for SLAs in series, or is it superfluous (more hassle than it's worth) ?

author: Kim Christensen
author_rank: Super Contributor
timestamp: September 09, 2024, 10:34:50 pm
content: I wouldn't think it would be worth it since you don't have access to each 2V cell individually.What was quite common for flooded lead acid was to periodically use anequalization charge(10% higher charge voltage) to balance out the cells. You can do it with Gel and SLA batteries, but you have to be much more careful with those.I still think you should implement some sort of stepped charging voltage rather than a steady float voltage charge. Even something "dumb" that raises the charge voltage to 28.4V* for a set time, after a power outage, and then returns to float charging at a lower 27.5V* (The proper way is to monitor battery charge current & voltage to decide when to switch between bulk, absorption, and float charge modes)* = Voltages depend on battery type.. GEL, AGM, flooded...

author: Dannyx
author_rank: Regular Contributor
timestamp: September 10, 2024, 05:23:43 am
content: Ok, just in case I should've been a bit more clear about what I meant when I say "balancing" (hence why I linked that device on Ali): I was referring to balancing the two 12v batteries, but I believe what you said still applies.Fun fact: the 12v/18Ah batteries I'm experimenting with are not new - they're moderately used and I noticed one of them drops off a lot quicker than the other, especially once they reach that "knee point" of around 11v when the voltage drops abruptly. Of course, this is far from scientific, but in my lightbulb test, they both performed fine for around 30m, holding steady at 23-23.5v, then the voltage suddenly went down rather abruptly to 20v - one of the cells was only 9v under load. It went back up to around 11v once I removed the load and it "relaxed". THIS is where I got the idea that such a balancer might help (slightly)...About charging: true, the ideal way would be to have a micro that watches voltage AND current and I WAS going to do it this way with an Arduino, but I thought it's a bit too much hassle for what I'm trying to accomplish - I have no idea how I'd go about interfacing a micro with some sort of DC-DC converter, aside from just connecting it and disconnecting it from the battery entirely - so one step back from that was to (try and) follow a typical curve for charging SLAs. The general consensus seems to be that you start with a CC charge and THEN CV, which sounds like something that can be accomplished relatively well even with a basic DC-DC converter like this, even if it doesn't completely cut out when the battery is full. It makes sense: you set the upper current limit (that's your CC) and the maximum voltage (that's CV). When in CC, the voltage lowers and as the battery charges, current drops, voltage goes up, if my understanding is correct.

author: Kim Christensen
author_rank: Super Contributor
timestamp: September 10, 2024, 03:12:06 pm
content: Using an active balancer seems pointless for two 12V lead acid batteries when what really "needs" balancing are the twelve individual 2V cells.ie: While you may see one of your 12V batteries collapsing before the other, what you're not seeing is one of the 2V cells within that battery collapsing before the other 5. Your active balancer can't help that 2V cell so it seems like a waste of money to me. Besides, you really shouldn't discharge a lead acid below 50% capacity on a regular basis anyway.As for float charging, it is OK to maintain a battery with a 13.8V float voltage indefinitely. But trying to recharge one, from dead to fully charged with a 13.8V terminal voltage, will result in reduced battery life and a battery that never becomes fully recharged.If you float charge at a higher voltage for extended periods, then this also damages the battery, but in a different, more dangerous, way.So if I was to choose, I'd go with the 13.8V float charge voltage method rather than a higher voltage.You could modify the DC-DC to switch in/out another resistor across the adjustment POT (or other resistor in the divider chain) via your Arduino. (With suitable circuitry) Thus make a better charger.

author: Dannyx
author_rank: Regular Contributor
timestamp: September 10, 2024, 04:09:43 pm
content: Quote from: Kim Christensen on September 10, 2024, 03:12:06 pmHmmm.....that's definitely tempting for sure, though I'd have to go down the micro route to achieve that and I'd also need some form of current sensing (I have something on hand for that, left over from a different project).Hacking this particular DC-DC converter would be really tough, if not impossible, because they felt the need to cover the daughter board in black epoxy - the kind used to cover on-board chips and it's hard as b@llz ! I tried scraping some of it off, but it's not happening - not without destroying whatever's underneath, so the next best thing would be to tap into where the trimmers are soldered, since that's easily doable.I'll have to figure out what the charge curve for AGMs looks like and what the voltage should looks like...

author: Kim Christensen
author_rank: Super Contributor
timestamp: September 10, 2024, 07:44:26 pm
content: If you can trace out the voltage adjustment pot wiring, you'll probably find it's something like one of those pictured below. ? = other mystery circuitry in your DC-DC.Then you simply add a resistance that can be switched in/out with a transistor as needed. With the transistor off, you'd set the float voltage using the module's voltage set POT. With the transistor on, you'd adjust the newly added POT to set the higher bulk/absorption voltage. The POTs will interact which is why you set the module's POT first.Crude, but it'll work. You'd need to experiment to figure out the resistance ranges.If you're worried about ground loops or damage to the Arduino, you could use a Optocoupler (Not a darlington type) in place of the transistor.

author: Dannyx
author_rank: Regular Contributor
timestamp: September 10, 2024, 07:59:35 pm
content: I just realized there are virtually NO DC-DC converters with adjustable current made by any big name brands and well known manufacturers (Meanwell, etc). I tried tracking down something as off-the-shelf as possible and with decent specs from the start, but couldn't find anything (save of just getting a whole power supply with battery backup, but that's not fully DIY ghetto that we love). I'm sure none of these cheap-@$$ converters from Ali perform anything more than "satisfactory" (at best !), regardless of what they claim or how they look. The quality of the components is probably questionable at best, the output noise is probably horrendous and the circuit itself may not be fully optimized from a design perspective, but without a scope, I can't run any tests to know just how good or terrible they are. With nothing better available (for a decent price !), I might just look into hacking something after all and roll with it.....The closest thing I could find from reputable brands were DC-DC converters with a "sense" or some form of "trim". That would allow me to "nudge" the voltage up/down in relation to the current, but the problem is they're crazy expensive (for a decent current), they're often too large in size AND I'm not entirely sure how I'd go about sensing the current. I DID mess with one kind of current sensor in the past for a different project (an ACS712), but I'm sure there are far better pre-made stuffz available for this task....

author: Dannyx
author_rank: Regular Contributor
timestamp: September 11, 2024, 05:09:10 pm
content: Today I decided to take another crack at removing the black epoxy off the daughter board to see what all the fuss is about, mostly out of curiosity. I read somewhere that it's possible to remove it by heating it up and attacking it with a hobby knife or something similar, so I did just that: I used the hot air station and chipped away at it with a blade until I brought the board down to what you see in the picture. It looks pretty horrendous, I know, and what's more, I somehow broke it: the converter no longer outputs anything.....only a blue "power" LED comes on.....It's entirely my fault for being a bit too aggressive with the hot air at first, when I had it set to 400+ degrees C ! It DID help loosen the epoxy and give me a starting edge, but I soon heard some tiny crackles and pops and noticed some solder balls forming near some of the components, so that was no good ! I definitely killed something, so I lowered the temperature to like 180 C which was still enough to scrape away the rest of the black stuff. My biggest worry at the time was that I also scraped off the markings on most of the resistors, so there's no way to know what value they are now. Luckily, I checked most of them with a DMM and they all report standard values, like 10k, 100k, etc, so they probably survived.As for the 3 ICs: after a lot of struggling with several magnifiers and careful lighting, I managed to work out what they are.From LEFT to RIGHT these are:1) AIR2104SMOSFET driver (somewhat ironic, since a similar IC started this whole thread)2) ALM358op-amp3) AUC384x. Unfortunately, I'm unable to make out the last digit. The UC384x are all part of the same family and even share the same datasheet, so a bit of guesswork is required here.I measured VCC across all 3 ICs and it was 10v, so where is this coming from ?On the far right there's a large darlington NPN. I did this back at the shop and don't have the device on hand right now to check what it is and I don't remember, but I know for sure this is part of a zener regulator, which takes whatever voltage you apply to the input terminals and steps it down to a lower voltage for the ICs. I was expecting the voltage to be closer to 12v, since 10v is too low, it could be the ICs are actually OK and something happened to the zener diode. I believe they are sensitive to heat and since I went ham the first time around, I may have killed it. The resistor on the far right which is no doubt in series with the zener reads 10k, which seems like a standard enough value to call it "functional", so it's between the zener and the UC384x.One thing I noticed from the very first time I powered up this converter is that the NPN gets HOT....I mean VERY hot: you can't touch it ! This means something is pulling quite a significant current, which is not confidence-inspiring. Not only it wastes power, but it leads to premature failure of the components, so I need to also figure out what's drawing all that current.

author: BrianHG
author_rank: Super Contributor
timestamp: September 12, 2024, 03:31:53 am
content: For you N-Channel fet switch, have you considered an 'Ideal Diode' controller?The use an external N-Channel Mosfet.They have an internal charge pump.Some models have an 'enable' input pin which would allow you to turn them off and on.Others have 2 mosfets back-to-back for reverse polarity protection.Then others have battery threshold and under/over voltage comparators built in, and over current protection built in as well.Read up here:https://www.ti.com/power-management/power-switches/ideal-diodes-oring-controllers/overview.htmlHere is your entire circuit in 1 chip...https://www.ti.com/lit/ds/symlink/lm74930-q1.pdf?ts=1726062821772&ref_url=https%253A%252F%252Fwww.ti.com%252Fpower-management%252Fpower-switches%252Fideal-diodes-oring-controllers%252Fproducts.html

author: Dannyx
author_rank: Regular Contributor
timestamp: September 12, 2024, 05:07:31 pm
content: Wow...those are definitely something else. Pretty complex stuff. I must admit I have a hard time wrapping my head around what it does exactly and how I'd go about integrating it in my humble application here.I haven't deciphered the whole datasheet yet, but I wonder if I can somehow implement it to completely cut off the battery from the DC-DC converter once it reaches "float" level, instead of ACTUALLY trying to mod the DC-DC converter to actively change voltage....I might look into it.Another significant problem is the package: those QFNs are tough sh!t to hand-assemble....

author: BrianHG
author_rank: Super Contributor
timestamp: September 12, 2024, 05:22:14 pm
content: Quote from: Dannyx on September 12, 2024, 05:07:31 pmThey simulate a diode using a mosfet to turn it off when the current runs in one direction, on in the other.The have an off/on enable disable input.The more complex ones have 3-4 built in comparators with a built in voltage reference. So, for the OV over voltage protection and UVLO under voltage lock out protection, you set the voltages you like with 3 external resistors. (I would use resistors with 2 trimpots so you can adjust your tripping points after the fact with ease just feeding the device from an adjustable bench supply and fine tuning when the device shuts on and off.)They can turn off the mosfets really fast as their gate drivers can pull the gate down by 2-3amp. This is to prevent the mosfet from staying on any amount of time if your power input reverses polarity or surges.As for soldering, a little paste and a hot air gun does the trick. Maybe you can find a tiny breakout PCB for QFN.

author: Dannyx
author_rank: Regular Contributor
timestamp: September 12, 2024, 06:49:59 pm
content: I decided to back up a bit and review the layout of my "project", without using actual components yet, but rather "building-blocks".I came up with something that looks like this in my head:CHG_EN is some sort of switch to enable or completely disable the battery DC-DC converter. I don't know the details yet - I WAS going to try and do this with an Arduino, so I'll need some sort of current and voltage reading on the battery to determine when to cut them off - when the current drops below a certain value. IDEALLY, I'd periodically re-enable the charger once the voltage drops naturally overtime as they sit idle.BAT_EN is another switch and serves two purposes: when running on mains, it prevents the HV supply from killing the batteries, so it's critical this works perfectly ! It also connects the battery bank to the output DC-DC converter when mains fails. Again, I haven't pounded out the details on how this should work in practice, especially since the timing has to be pretty spot on ! Close the switch too SOON and the HV supply destroys the batteries. Close it too LATE when mains fails and the devices on the output might power-cycle or glitch. I imagine a spinning hard drive wouldn't like its 12v briefly cut off.Two diodes D1 and D2:D1 blocks the battery voltage from flowing back into the HV PSU to prevent unnecessary drain when running on batteries.D2 blocks the battery voltage from feeding back into the DC-DC converter. I noticed in my particular use case, using this particular converter that when the batteries are connected to the output, the voltage feeds back into the converter and keeps it on. It makes sense, because of the body diode of the N-channel FET it probably uses. This results in a stray 15v at the input terminals, leading to wasted power. D2 looks like an application for the LM74930 or something similar, as it allows flow in one direction, but blocks it once the DC-DC converter is switched off and current no longer flows to the batteries.In fact, the LM74930 appears to be able to take place of BOTH diodes AND switches (using FETs for each of them)....correct me if I'm wrong. Sure the part count would dramatically increase, but it would be more reliable and power-efficient....well...reasonably so.

author: BrianHG
author_rank: Super Contributor
timestamp: September 13, 2024, 02:28:17 am
content: In the place of BAT_EN, all you need is one of these eval board modules:https://www.ti.com/lit/ug/sluucw6/sluucw6.pdf?ts=1726193043321&ref_url=https%253A%252F%252Fwww.ti.com%252Fproduct%252FLM74930-Q1Also, cheaper ones exist with a few fewer functions.Read the data sheet first to see if it does everything for you.Remember, you can always change a part on the data sheet.And, if you generate an official request to TI's purchasing, you might get one of those 99$ eval boards as a free sample if you are a first time buyer creating a new account at TI.In the place of your D1, you can use a regular or better a schottky diode.Depending on your switcher, D2 might or might not be needed.If you want your own comparator, then use this circuit:https://www.ti.com/product/LM5050-1-Q1It only uses 1 mosfet with a digital logic input off and on.Aliexpress has the IC for less than 2$ each.You can use each one with a mosfet as your ideal diodes instead of the lossy schottky diodes.This one you can solder.Another cheap one,https://www.ti.com/product/LM74700D-Q1SO-8 package for this one.again, aliexpress has these.

author: BrianHG
author_rank: Super Contributor
timestamp: September 13, 2024, 02:35:14 am
content: Just go here:https://www.aliexpress.com/w/wholesale-ideal-diode.html?spm=a2g0o.productlist.search.0Buy the ones you want which use one of those TI parts and pull-up the enable input pin so you can control the unit.Make sure the unit has a GND pin on it as well.Example which uses the 6 pin TI's LM5050:Aliexpress LM5050 board

author: BrianHG
author_rank: Super Contributor
timestamp: September 13, 2024, 02:51:48 am
content: This 50 amp module requires a GND connection. It may be using TI's 8 pin diode oring controller:Aliexpress 8pin IC ideal diode oring controller which needs a GND connection.If so, you can see if the pinouts match which oring controller, from TI or another manufacturers.The find the enable/disable input pin and use it...

author: Dannyx
author_rank: Regular Contributor
timestamp: September 13, 2024, 04:46:56 pm
content: I DID find the eval board for the LM74930, which appears the most fancy of them all, but it's crazy expensive, so that's a no-go. The IC by itself is cheaper, with the aforementioned shortcoming of having to somehow solder it to a breakout and then build the other stuff around it, either with discrete components or a micro, which I'm sure is something I can pull off, but soldering QFNs always makes me hot around the collar, since I never seem to get consistent results - some behave really well and solder nicely, while others are a nightmare. They slip, they slide, they misalign, pads don't make contact - ANYTHING but go how it should !Touching up the joints with the iron is also tough sh!t, since I don't have a micro-soldering iron. The smallest tip I have is humongous compared to that package...Anyway.....One question I have about the other recommended ICs (the ones that drive a single N-channel): The body diode of the FET is forward biased (source is connected to the supply). Won't the supply power the load THROUGH the diode, defeating the purpose ? There HAS to be an explanation for this, since they wouldn't release something that doesn't work....we're talking about a product made by TI here ! Not somethingIthrew together in my shop.....The datasheet even mentions this on page 13:"When the LM74700D-Q1 is in shutdown mode, forward current flow through the external MOSFET is not interrupted but is conducted through the MOSFET body diode."So how does this work ? Is it like a high-value resistor and it only allows a small amount of current to flow, hence the "load" doesn't ACTUALLY power upQuote from: BrianHG on September 13, 2024, 02:28:17 amFor D1 I dug through my parts bin and foundTHISfor D1: it seems to have a fairly low Vf Forward Voltage Drop.I also explained the purpose of D2, but you probably missed itIf I leave a battery connected to the output of this particular DC-DC converter, the current flowing back through the body diode of the FET into the "input" side of the converter is enough to keep it powered on, so to say, which wastes power and causes a voltage of 15v to be present at the input terminals.EDIT: I cleaned up my MS-Paint-CAD, as it had one random diode in the middle there......no idea where that came from

author: Kim Christensen
author_rank: Super Contributor
timestamp: September 13, 2024, 06:49:20 pm
content: Quote from: Dannyx on September 13, 2024, 04:46:56 pmWell, here's the thing. Thatisit's purpose!The LM74700D-Q1circuit is supposed to act like an ideal diode. Disabling the chip simply makes the MOSFET behave like a regular diode.

author: Dannyx
author_rank: Regular Contributor
timestamp: September 13, 2024, 06:57:03 pm
content: Ok, that's a bit of an odd feature, but apparently it was needed and hence became a thing

author: Kim Christensen
author_rank: Super Contributor
timestamp: September 13, 2024, 08:05:06 pm
content: Turning the IC off saves power: 1uA vs 80uA quiescent current. This would be the main reason to toggle the enable pin.The IC has a max 0.75µs response to reverse current blocking. The body diode reverse recovery time will typically be much quicker than that. (Don't know in what application you'd disable the IC for this reason)

author: Dannyx
author_rank: Regular Contributor
timestamp: September 13, 2024, 09:32:29 pm
content: Ok, so this means they are not quite suitable for driving the two "switches" in my "design", but rather for replacing D1/D2 since I'd need two back to back N-channels to achieve the cut-off switch effect, like the LM74930 does.EDIT: actually, what if I replace BAT_SW with one of these OR-ing FET driver ICs (via the FET of course)...instead of two N-channels, back to back, like I originally planned, it'd be like having a diode there. The only question is what would happen to the common "node" where the HV supply and the battery/charger voltage would meet a.k.a. the + input of the "downstream" DC-DC converter. It will be like having two separate potentials there.....not sure that's a good idea, hence why I imagined the battery should be keptcompletelyseparate until needed....

author: Dannyx
author_rank: Regular Contributor
timestamp: September 19, 2024, 06:23:28 pm
content: Ok guys, I didn't abandon this project - I just took my sweet time to finally come up with a "schematic". It's one of those things that's either a complete train-wreck or a stroke of geniusI brainstormed and came up with this madness: it uses a little bit of everything we've discussed so far. I don't claim it's the right solution - over-engineered for sure and there are probably many things wrong with it - but at least it's a good discussion topic.Have a look:I based the "design" on twoLM74930: one to connect/disconnect the DC-DC converter ("charger") and another one to connect/disconnect the batteries.This is where I took some creative liberties and tried thinking outside the box. In this case, I used the first LM74930 in an unofficial manner, which doesn't automatically mean it wouldn't work this way - it's just not a use case covered by the datasheet: remember how in the original block diagram I needed a diode (D2 in that diagram) to stop the battery from feeding back into the DC-DC converter's output. I figured with the LM74930 I can just plop the entire DC-DC converter rightin betweenthe two back-to-back FETs like this, thereby Q2 now acts as the blocking diode that was D2. There's nothing prohibiting me from doing that, is there ? As far as the IC is concerned, everything should be just fine.....on paper at least, as in practice it may have some totally unexpected results.The second IC on the right is more like what you'd expect, with both FETs between the source and the load, as the datasheet intended it to be.I added some passives around the two ICs to do various "things". I don't want to add a wall of text here, so I'll only go into the details of the thought process behind them if something about my idea doesn't seem to make sense or it's flat-out incorrect...which it probably is, like I said. A picture should be worth a thousand words, so I'm sure you fine people will be able to make some assumptions simply based on this schematic I threw together in like 5 minutes

author: Kim Christensen
author_rank: Super Contributor
timestamp: September 20, 2024, 03:16:28 am
content: Without looking at it too hard and finding any other faults:The way Q7 is wired will cause the 2nd LM74930 to disable itself as soon as it connects the battery to the output. (TO DC-DC)

author: Dannyx
author_rank: Regular Contributor
timestamp: September 20, 2024, 05:52:21 pm
content: Good call. It's stuff like that I may have overlookedI was certain I got it right, but now I see why: I failed to take into account the battery voltage will travel "up and over" and back into the same gate of Q7 that's meant to stay off when on "mains". I'll try coming up with a solution...

author: Dannyx
author_rank: Regular Contributor
timestamp: September 23, 2024, 02:31:23 pm
content: I figured the easiest thing to do is to move that connection before the "diode" at the top, represented by Q4.