battery protection using diodes - Page 1
Forum section: electronics / beginners

author: DiDBoGDaN
author_rank: Contributor
timestamp: July 22, 2024, 05:15:22 pm
content: Hi, I need a little help with my project. I am trying to create an uninterruptible power supply for a router (9V 500mA) and a fiber optic modem (12V 500mA). I have already soldered the circuit using the following components 18650 lithium ion batteries 3 pcsMT3608 DC-DC step up modules - 2 pcsip2312 charger for lithium ion batteries 1s with fast charging function and current up to 3Abms 1s - battery protection moduleBelow is a diagram of the components.I also read on the Internet that such a scheme is bad, because the batteries are constantly connected to the load, regardless of whether there is power from the power supply unit or not. Accordingly, batteries are simultaneously charged and discharged, which is harmful to the batteries themselves. And I also read that with the help of two diodes connected by locks to each other, it is possible to make it so that when there is power from charging, the batteries only charge and do not give off energy, and when there is no charging, the batteries start feeding the load. I have several diodes with a maximum current of 10A.So the question is, where exactly should I connect such diodes, or is it possible that there are better (and necessarily simple and cheap) methods of battery protection?

author: PGPG
author_rank: Frequent Contributor
timestamp: July 22, 2024, 06:45:46 pm
content: In such task using MEAN WELL DRC-40A seems for me rationale.

author: DiDBoGDaN
author_rank: Contributor
timestamp: July 22, 2024, 07:06:34 pm
content: you're right, moreover, this module costs about as much as the whole assembly cost (all elements are purchased), but I decided to do something with my own hands and learn something new

author: ledtester
author_rank: Super Contributor
timestamp: July 22, 2024, 07:22:35 pm
content: Take a look at Microchip Application Note AN1149:Designing A Li-Ion Battery Charger and Load Sharing System WithMicrochip’s Stand-Alone Li-Ion Battery Charge Management Controllerhttps://ww1.microchip.com/downloads/aemDocuments/documents/OTH/ApplicationNotes/ApplicationNotes/01149c.pdfIt shows how to disconnect the battery from the load with a PMOSFET and diode when it is charging.You can use a TP4056 with this scheme as described here:https://www.best-microcontroller-projects.com/tp4056-page2.html

author: fourfathom
author_rank: Super Contributor
timestamp: July 22, 2024, 07:37:10 pm
content: QuoteLet's discuss this. I submit that as far as the battery is concerned, there is no such thing as "simultaneously charged and discharged". They are either charging, or discharging, or no current is flowing through the battery. There may be reasons to isolate the charging and load currents, but battery harm is not one of them.

author: J-R
author_rank: Super Contributor
timestamp: July 22, 2024, 09:01:52 pm
content: As mentioned in the linked article, the issue is that the load keeps the charger going which means the cells will be float charged at 4.2V all the time. This is bad for their health, although how bad can be a longer discussion and definitely revolves around the specific cell used.So float charging or constantly topping off Li-Ion should be avoided, but you can get away with it a bit longer if you reduce the voltage slightly. So I would suggest simply replacing the IP2312 charger with a power supply set for ~4V (and perhaps 2A). This will keep the cells full enough without causing much damage and no extra circuitry is needed, although you should have a blocking diode to prevent the cells from feeding into the supply.An alternate solution is to change up the design and go with something based on a lead acid chemistry, which enjoys float charging immensely.

author: SteveThackery
author_rank: Super Contributor
timestamp: July 22, 2024, 10:11:47 pm
content: Quote from: J-R on July 22, 2024, 09:01:52 pmOr LiFePO4 batteries, which are used as substitutes for lead acid and are also suitable for float charging.

author: Peabody
author_rank: Super Contributor
timestamp: July 22, 2024, 10:16:28 pm
content: I think the circuit below would be the app note version. But I don't have any information about the BMS, so I'm not sure about that. But otherwise, if the charge current is present, the charger will charge the battery, but the mosfet will be turned off, so the battery will be isolated from the load. If the charging current is not present, the mosfet will be turned on, allowing the battery to power the load, but the schottky diode will block current from flowing back into the charger. The mosfet is P-channel.

author: J-R
author_rank: Super Contributor
timestamp: July 23, 2024, 04:02:56 am
content: LiFePO4 shouldn't be float charged either, but due to how often they are used to replace lead acid, the manufacturers have come up with float charge voltage specs. There are a couple big reasons for this:- almost every proper lead acid charger has at least 2 stages so the float voltage can be set lower than the charge voltage, which means LiFePO4 can be a simple drop-in replacement in many cases with minimal changes- many customers want to be able to consume solar power when the batteries are full, and this requires a float voltage setting so that power flows to the inverter but only once the charge cycle is completeSo this decision is more marketing than technical. Ultimately, the amount of damage to the batteries is not overly large and the warranties have plenty of excuses in the fine print just in case.The almost universally agreed to stance for li-ion (and LiFePO4) is that if you fully charge your battery/cell then let it sit for 24 hours, the resting voltage could be used as float voltage and damage should be minimal.

author: DiDBoGDaN
author_rank: Contributor
timestamp: July 23, 2024, 05:14:51 am
content: Thanks, that's helpful, don't have any mosfets or shotky diodes right now, but can you explain me why it should be shotky diode? Why not just regular diodeAnd also why P-chanel, if i understand it right the curent flow is from source to drain in this oneFor some reason transistors is hard to understand for me

author: Refrigerator
author_rank: Super Contributor
timestamp: July 23, 2024, 07:24:06 am
content: Lithium cells are cheap enough to a point where you can afford a 10-20% higher deterioration rate from float charging, especially considering the application, which is a small UPS for two devices.I see many ways to avoid float charging, but i wouldn't consider it as a worthwhile improvement. Maybe as an engineering exercise.

author: SteveThackery
author_rank: Super Contributor
timestamp: July 23, 2024, 08:53:58 am
content: Quote from: J-R on July 23, 2024, 04:02:56 amThis is interesting. LiFePO4 batteries are sold as drop-in replacements for car and motorcycle batteries. I'm most familiar with motorcycles, so I can speak to this. The rectifier/regulator is usually very simple in operation: they simply float the battery at around 14.4V (the alternator output is current limited, obviously) and leave the battery to look after itself. In other words, standard motorcycle regulators are not multi-staged and don't really "manage" the battery at all.I've replaced a couple of lead acids with LiFePO4s, and they seem to work fine being floated in this way. It may well be that proper battery chargers treat LiFePO4s in a more sophisticated way, with multi-stage charging, but they seem to do fine just floated across a 14.4V supply.So, is this definitely the wrong way to treat LiFePO4s?

author: Peabody
author_rank: Super Contributor
timestamp: July 23, 2024, 05:13:38 pm
content: Quote from: DiDBoGDaN on July 23, 2024, 05:14:51 amSchottky diodes have a smaller forward voltage drop than regular diodes, so you don't waste as much power. The power dissipated as heat is equal to the voltage drop times the current. However, I think the schottky diode in my circuit could be replaced by a regular diode, like a 1N1007. Then the input voltage to the boost converters would be about 4.3V, which is abut the same as it would be in battery power mode. But you would have to test that.Current flows through a mosfet equally well in either direction. Its orientation in a circuit depends on which way you want the body diode to be oriented. In this case, my circuit is the same as the one described in the Microchip App Note linked to my @ledtester yesterday. You will see that it also uses a P-channel mosfet, oriented as I have done.The whole point in using the mosfet is to almost eliminate any voltage drop. Otherwise, you could just have two diodes, one in the battery path, and one in the charge current path, and the source with the higher voltage would supply the load. But paritcularly for the battery, that diode voltage drop wastes a significant portion of battery charge.

author: DiDBoGDaN
author_rank: Contributor
timestamp: July 23, 2024, 06:03:39 pm
content: Thanks for the great explanation, unfortunately I only have 2 N-channel mosfets (irf3205 and irf840), also I have an old TV that I'm about to take apart, maybe it has p-channel mosfets and zeners. As far as I understand, there is no difference with which reverse voltage the zener should be, the main thing is that it should be at least 5V and withstand a direct current of up to 1 A (I doubt that Wi-Fi consumes more)

author: Peabody
author_rank: Super Contributor
timestamp: July 23, 2024, 08:55:43 pm
content: Not zener. Schottky is what you want for this circuit.

author: DiDBoGDaN
author_rank: Contributor
timestamp: July 24, 2024, 01:59:55 am
content: Oh, yes, why did i even think about zener

author: Whales
author_rank: Super Contributor
timestamp: July 24, 2024, 02:34:58 am
content: I'm going to press a big X to doubt about this:QuoteIf placing an 18650 in parallel with a constant 4.2V is dangerous then whatever you do don't put two 18650's in parallel with each other!*explosion sfx*The TP4056 is designed to output 4.2V max regardless of load. Even if your battery is down a long PCB trace and you have a load attached: it shouldn't ever see more than 4.2V at its terminals. I'll say "shouldn't" because I'm assuming your loads are safe to use on the battery in the first place (no USB killer circuits please).Micro charging & discharging a cellmightbe bad for its life (I want to see papers before confirming this, I've only read it informally and there might be scenarios where this makes it last longer) but that's also the intentional usage profile in a lot of devices anyway.

author: Peabody
author_rank: Super Contributor
timestamp: July 24, 2024, 04:31:40 pm
content: Here's an 18650 "UPS" module that uses two 18650s in parallel.https://www.aliexpress.us/item/3256806674283828.htmlYou have to make sure the cells are at the same voltage when you connect them together, and then never disconnect them after that. And the cells should not have built-in protection.This module has the full load sharing circuit. In fact it uses four P-channel mosfets in parallel. And it has a boost converter, which can be ordered as 5V, 9V or 12V.My only complaint about this module is that it doesn't have any provision for an On/Off switch just ahead of the boost converter. So the only way to turn it off is to remove the batteries, which you don't want to do. They do make a single-cell version that provides for a switch, but no switch is included with the part.Anyway, I think parallel cells can be made to work quite well, but you do have to pay attention.

author: mariush
author_rank: Super Contributor
timestamp: July 24, 2024, 05:38:29 pm
content: Have a look at a charger IC likeMP2672A:https://www.monolithicpower.com/en/mp2672a.htmlDatasheet :https://www.monolithicpower.com/en/documentview/productdocument/index/version/2/document_type/Datasheet/lang/en/sku/MP2672AGD/document_id/9059/Linkhttps://www.digikey.com/en/products/detail/monolithic-power-systems-inc/MP2672AGD-0000-Z/13572801orhttps://www.digikey.com/en/products/detail/monolithic-power-systems-inc/MP2672GD-0000-Z/13159530It's a 2 cell charger IC that works with 5v input - it boosts the input voltage to whatever voltage is needed to charge the 2 cells (at least around 6.7v, at most around 8.4v) and makes this voltage available on a system out pin while there's DC in present and the battery is charged at the same time.When the DC input is gone, the chip connects the battery to the system out pin.So you still need your step-up regulators but you don't need to complicate your life with diodes, you can just use the system out pin all the time.So basically you could use 4 cells, 2 cells in parallel, connected in series with another 2 cells in parallel ... boosting 6v ..8.4 to 9v would be very efficient , boosting to 12v would be a bit less.Another option ... useMP2759 / MP2759A:https://www.monolithicpower.com/en/products/battery-management/chargers/1-series-cell-chargers/mp2759a.htmlLink :https://www.digikey.com/en/products/detail/monolithic-power-systems-inc/MP2759AGQ-0000-Z/15861759Datasheet:https://www.monolithicpower.com/en/documentview/productdocument/index/version/2/document_type/Datasheet/lang/en/sku/MP2759AGQ/document_id/9670/It's a charger IC that can charge up to 6 cells in series. It can take up to 36v input, and has a built in step-down regulator to produce the voltage required to charge the cells.You can set the number of cells and the charge voltage per cell using resistors so it's very easy to use (no i2c or programming eeprom/flash inside chip)The way I'd use it would be with 4 cells in series and a 18-20v laptop adapter to power it, or 20v from a usb charger if it supports it . The battery charger IC would buck the 18-20v to 4x4.2 = ~17v and charge the batteries.You could use it with only 3 cells in series, in which case you could go down to maybe 15v as you only need more than 13v to charge 3 cells in series. But, you'd need a buck-boost regulator to produce 12v in that case.There's no system out pin, but you could use a power switch like TPS2120 or TPS2121 to automatically switch between two inputs, selecting the highest voltage or a giving priority to one input if both inputs are presentTPS2120 : 2 inputs, up to 22v input , up to 3A output, switches within 100us :https://www.digikey.com/short/r82t8v84TPS2121 : same but up to 4.5A output, switches between 5us :https://www.digikey.com/short/trnwm3j8The TPS2121 makes more sense especially as it's easier to solder on a board (TPS2121 is only available as WCSP package, very small)So you could have the power adapter as one input, battery voltage as second input - while the adapter is plugged in, the 18v-20v is higher than battery voltage so it will be powering everything. When input is gone (power loss), it switches to battery.As the battery pack is always higher than 12v (if you use 4 cells in series), you could use more efficient step-down regulators for 9v , 12v and 5v.

author: J-R
author_rank: Super Contributor
timestamp: July 24, 2024, 08:07:15 pm
content: For maximum lithium rechargeable life, the data I've seen points to a 30% charge level for long-term storage, although depending on BMS drain you might want a little higher to avoid accidental deep discharge. Then for active use there is a big reduction in capacity loss over time by designing your system to only cycle the batteries between 20% and 70%.Of course the immediate joke is that if you want your batteries to last, then don't use them. So it's a balance and designing things properly is a big part of this.Fire is still a concern with lithium rechargeables, and the risk is higher with packs. Even a standard sized cordless drill pack can burn your house down and this actually happened last year to a friend of mine. He literally brought the tool home from the store and put it on the charger in his garage and an hour later his house was gone. Yes, he should have been monitoring it, but still, the risk is undeniable. Reputable manufacturers can reduce the risk greatly, but it can still happen even with the best quality cells.I have a ~15kWhr SLA/AGM battery bank in my house and there is no way I'd ever go lithium chemistry on that.