How do i add reverse battery protection to a battery charger with common ground? - Page 1
Forum section: electronics / projects

author: Psi
author_rank: Super Contributor
timestamp: October 27, 2020, 09:25:43 am
content: Hi,I'm trying to add reverse battery protection to a switchmode SLA battery charger on the output (protection for if the battery to be charged is connected backwards).The thing confusing me is the direction of current and how to add protection for this.- When charging the battery, current is flowing from the switchmode IC output capacitor positive to the battery positive (which has slightly less potential, since battery voltage is lower).- But when the battery is connected backwards current flows battery positive onto the PSU negative wire, back through the switchmode IC and then back into the battery negative.But these are both the same direction of current in the positive wire to the battery. So normal reverse polarity protection seems impossible?The switchmode control IC actually has a system for protecting against this situation by letting you add a mosfet into the ground line between input and output GND. It controls the mosfet to isolate the input and output grounds if there's a reverse battery situation. However for my application the input and output grounds must be shorted elsewhere in the circuit and there are other safety concerns which mean I cannot decouple the grounds even in a fault situation.The only solution I've come up with so far is adding some sort of over current protection on the positive line to the battery.Can anyone think of other solutions?This is the switchmode controller i'm using.MPQ4480https://www.monolithicpower.com/en/documentview/productdocument/index/version/2/document_type/Datasheet/lang/en/sku/MPQ4480/document_id/5139/

author: sandalcandal
author_rank: Unknown
timestamp: October 27, 2020, 10:00:43 am
content: (Conventional) current goes out the positive and in the negative terminals of the charger in both cases but the difference is the potential across which this current flows. In normal operation voltage is such that (conventionally) power of the charger is negative i.e. the charger is supplying power, when connected in reverse polarity the voltage sign is flipped so the charger is sinking/dissipating power (blowing up).Reverse polarity protection generally relies on some sort of voltage sensitive device.The simplest is a rectifier in series which will obviously block current if the wrong polarity voltage is applied to the charger terminals. This can be a simple diode in series with the output oractive rectifier type circuits often involving a P-channel MOSFETbut both will incur some sort of power loss.Another option, often seen as the only means of reverse polarity protection on cheaper consumer grade chargers, is a diode "crowbar" and fuse/PTC on the charger output. Reverse polarity will short circuit through the diode rather than the charging circuitry and at the same time set off the fuse to avoid completely blowing up/starting a fire. Note: a fuse (or any safety device) should be as close as possible to the power source it is interrupting which in this case is the battery being connected.Edit: Was thinking of wrong type of polarity protection. MOSFET based systems still work as do anti-parallel diode plus fuse though.

author: xavier60
author_rank: Super Contributor
timestamp: October 27, 2020, 10:55:59 am
content: I did reverse protection using a relay on my 40A battery charger project.The relay's normally open contacts have a resistor across them so that the full regulated voltage is present at the the charger's output terminals.the relay's control circuit turns on the relay only if a connected load pulls the voltage down to between about 1V below regulation voltage and 1V above ground.The relay is kept on while there is more than some minimum charge current, 5A in my case.

author: Psi
author_rank: Super Contributor
timestamp: October 27, 2020, 10:57:27 am
content: I doubt the chip would survive long enough for a relay to disconnect the battery.

author: xavier60
author_rank: Super Contributor
timestamp: October 27, 2020, 11:09:57 am
content: The relay's contacts are normally open. When a battery is connected in reverse, the control circuit doesn't turn on the relay.A Pch MOSFET could be used. Current sensing adds to the complications.

author: Psi
author_rank: Super Contributor
timestamp: October 27, 2020, 11:15:34 am
content: Quote from: xavier60 on October 27, 2020, 11:09:57 amSorry, i misunderstood what you said.Yeah that is an interesting idea.

author: AndersJ
author_rank: Frequent Contributor
timestamp: October 27, 2020, 12:33:24 pm
content: Quote from: xavier60 on October 27, 2020, 11:09:57 amHow does your circuit behave if aemptybattery, is connected in reverse?Will it detect this, or attempt to charge the battery with reversed polarity?

author: xavier60
author_rank: Super Contributor
timestamp: October 27, 2020, 12:41:31 pm
content: Quote from: AndersJ on October 27, 2020, 12:33:24 pmIt needs to see some positive voltage to turn on. I built the charger over 20 years ago, I'm a bit fuzzy on the details.I know it wont turn on with the output shorted.

author: akimpowerscr
author_rank: Regular Contributor
timestamp: October 27, 2020, 12:43:42 pm
content: The solutions may be different depending on the type of charger and the waveform of the current it supplies.I had developed a conventional charger with a transformer like a MOT transformer but without magnetic shunt with center tapped secondary .The rectification was made by 2 thyristors without output filter circuit.The reverse polarity protection blocked the thyristor pulses.Provided that the following sequence was observed: connect the battery before starting the charger, protection was ensured.An output circuit breaker was added to protect against connection in reverse polarity with the charger operating.For a charger supplying perfectly filtered current (SMPS charger), one could use a very simple protection circuit using a thyristor in series with the output.To initiate the charge, a single initial pulse is sent to the thyristor by a start push button.This pulse is inhibited if there is a reverse polarity at the output and so, scr stay off and nothing happens.If the polarity is correct, the thyristor turns on and remains on as long as the load current is greater than the holding current, even without new gate pulses.But there is a voltage drop on the thyristor and output voltage is lower than nominal.

author: akimpowerscr
author_rank: Regular Contributor
timestamp: October 27, 2020, 12:53:33 pm
content: Smart battery charger often use a relay, but with a resistor in parallel with the contacts.Analysing the value of the current in this resistor, whe can know if there is a battery connected or not and if it is connected with the correct polarity or if output connections are short circuited.

author: xavier60
author_rank: Super Contributor
timestamp: October 27, 2020, 12:57:46 pm
content: Quote from: xavier60 on October 27, 2020, 12:41:31 pmThe resistors across the contacts would supply about 2mA into a 0V load and 4mA into a reverse connected and charged battery.So it will eventually reverse charge a battery whether empty or charged.

author: SilverSolder
author_rank: Super Contributor
timestamp: October 27, 2020, 01:21:18 pm
content: Smart chargers can be a little too smart sometimes... e.g. if you have a battery depleted to zero, some smart chargers won't even attempt to charge them. I keep a "dumb" charger around just to get the battery going in that situation, then hand over the job to the smart charger to complete the task...I wish smart chargers had an "override" function to force charging at some suitably low voltage/current even if they don't detect the presence of a battery.

author: David Hess
author_rank: Super Contributor
timestamp: October 29, 2020, 01:57:33 am
content: Fold-back current limiting like that found in a regulator or power supply can protect a battery charger output from a reverse connected battery, with the restriction that the power pass element must support the increased input to output voltage and the control circuits must handle a negative output voltage but these requirements are not difficult to meet.

author: sandalcandal
author_rank: Unknown
timestamp: October 29, 2020, 04:45:40 am
content: Sorry, I realised I completely missed the mark on your question. You can still use anti-parallel diode plus fuse/PTC or you can use some different P MOSFET circuits that conditionally short out the source-gate of a blocking P channel MOSFET or pull the gate to ground.http://blog.deconinck.info/post/2017/12/22/18650-Battery-charger-reverse-polarity-protectionhttps://www.edn.com/reverse-voltage-protection-for-battery-chargers/Edit: Replaced bad example schematic and LTspice that was missing D1, now just the same as the first link example.

author: xavier60
author_rank: Super Contributor
timestamp: October 29, 2020, 06:07:02 am
content: Quote from: Psi on October 27, 2020, 11:15:34 amInstead of current sensing, maybe control derived from the regulator's error amp could be used to hold the relay or MOSFET on while charging.

author: SilverSolder
author_rank: Super Contributor
timestamp: October 29, 2020, 03:22:42 pm
content: Quote from: sandalcandal on October 29, 2020, 04:45:40 amNot sure I understand how this circuit charges the battery - why is the battery polarity positive ground?

author: sandalcandal
author_rank: Unknown
timestamp: October 29, 2020, 03:37:20 pm
content: Quote from: SilverSolder on October 29, 2020, 03:22:42 pmIts a simulation demonstrating the reverse polarity protection mechanism. The Vbat voltage source is set to switch between -5V and +5V to emulate a battery being connected in reverse (Vout=-5V) and correctly (Vout=5V). The sim output shows when the battery is connected in reverse, Vgate is pulled to the PMOS (Q1) source thus turning the PMOS off, Is(M1) (current through the PMOS source) is zero. When the "battery" is connected correctly, Q1 is forward biased pulling the PMOS gate to ground and turning it on, Is(M1) quickly rises as soon as Q1 is biased demonstrating current is now free to flow into the "battery".Some notes on jankyness of the sim and setup. I didn't setup a CC-CV limited "charger" instead I just used a voltage source with a series resistor (I could have thrown a zenar in anti-parallel with a current source I guess?) so once the PMOS gets turned on the battery voltage is still low so a lot of current flows and then reduces as the "battery" climbs closer to the charger voltage. I limited the voltage of the "battery" so that the difference in current between right when the PMOS turns on vs when the battery sits at full voltage isn't so big the traces are hard to read. Honestly not a great setup, just something I threw together because I wanted to check how it works and thought I might as well post it. I'm sure other people here could make a much better demo.

author: sandalcandal
author_rank: Unknown
timestamp: October 29, 2020, 03:56:35 pm
content: Hopefully this is more legible.

author: akimpowerscr
author_rank: Regular Contributor
timestamp: October 29, 2020, 04:32:40 pm
content: This circuit has a serious flaw: if you disconnect the battery with the charger energized, the output continues energized.A discharged battery mostly has high internal resistance.If you then connect a discharged battery with reverse polarity while the MOSFET is conductive, the voltage on the battery will be immediately reversed, the MOSFET will remain conductive, and the battery will be charged with the polarities reversed, which will damage the battery.

author: sandalcandal
author_rank: Unknown
timestamp: October 29, 2020, 04:38:21 pm
content: Quote from: akimpowerscr on October 29, 2020, 04:32:40 pmIt doesn't? There's no current to forward bias Q1 and M1 has source-gate passively shorted?Never mind you're completely correct!Never mind you're partially correct!

author: akimpowerscr
author_rank: Regular Contributor
timestamp: October 29, 2020, 04:57:44 pm
content: The real problem is not only to detect whether the battery is correctly connected, but also to detect whether there is a battery connected or not.The normal sequence would be to connect the battery with the charger turned off.But we cannot hope that the user will respect this sequence, nor that he will not do other maneuvers such as transferring the charger from one battery to another without disconnecting the charger.The output should therefore be automatically disconnected if there is no battery connected, even if a battery was connected shortly before.This is where the difficulty lies because you cannot rely on current to detect this because a badly discharged battery only absorbs a very low recharge current.

author: SilverSolder
author_rank: Super Contributor
timestamp: October 29, 2020, 05:10:05 pm
content: I would say that for clarity, the battery "emulator" voltage should have negative ground (when charging, the charger is forcing current through the battery "backwards" by overpowering the battery voltage).If you do that, you see that there is a path for the current to flow from a fully charged battery via D2. Can that cause problems e.g. if the charger is not on?

author: sandalcandal
author_rank: Unknown
timestamp: October 29, 2020, 05:12:07 pm
content: The PMOS will stay energised after removal of correctly connected battery but reverse voltage is sufficient to shut down the MOSFET although there is a small current burst.t=0.0 to 0.2, Battery is reverse polarity but rising, switch is on (battery is connected)t=0.2 to 0.4, Battery voltage goes positive PMOS is energised and charging occurst=0.4 to 1.0, Switch is open (battery disconnected), PMOS remains energised, Battery starts falling to reverse polarityt=1.0 to 1.4, Switch is opened with reverse connected battery, brief current pulse while PMOS is deenergised and battery voltage mains blocked while it reverses to forward polarity again.Definitely would not work with 0V battery and a bit iffy if using large low impedance or high voltage batteries. Seems best suited for smaller consumer devices?

author: sandalcandal
author_rank: Unknown
timestamp: October 29, 2020, 05:16:02 pm
content: Quote from: SilverSolder on October 29, 2020, 05:10:05 pmI think I see what you mean. This circuit certainly does not provide protection from positive voltage back feeding of current if battery voltage is higher than charger output. Would need an additonal series rectifier.

author: SilverSolder
author_rank: Super Contributor
timestamp: October 29, 2020, 05:18:59 pm
content: Quote from: sandalcandal on October 29, 2020, 05:16:02 pmThe polarity was fixed in your latest diagram, I see. - Yes, yet another possible failure mode is the user connecting the charger to the battery, while the charger is not plugged in, or switched off...I have actually never seen a smart charger that deals correctly with a zero volt battery. I'm beginning to think there is no way around a manual switch to tell the charger that there is a zero volt battery connected... which would then simply apply a small voltage and very limited current to "kick start" the battery, so the smart circuits can take over.

author: akimpowerscr
author_rank: Regular Contributor
timestamp: October 29, 2020, 05:29:03 pm
content: For better understanding of what I mean:Let's think you have a 10A battery charger protected by this circuit against reversed polarities.You want to recharge a deep descharged 12V battery with a 7V no load voltage.This battery has an internal resistance of for example 1R.When you connect this battery with inverted polarities with the MOSFET conducting, current is internally limited by the charger at 10A, this will produce a positive voltage of 10V on the internal resistance of the battery and the voltage at the output of the charger will be 10-7V = 3V, what is enough to maintain Q1 conducting.

author: sandalcandal
author_rank: Unknown
timestamp: October 29, 2020, 05:58:41 pm
content: Quote from: akimpowerscr on October 29, 2020, 05:29:03 pm1R seems a very excessive for a battery getting charged at 10A. I think in most cases the it will be much less and the battery will be able to slam the PMOS shut. Vout>0.7V is required to maintain forward bias on Q1.I do agree a faulty battery and high current charger could be a problem though.

author: akimpowerscr
author_rank: Regular Contributor
timestamp: October 29, 2020, 06:18:05 pm
content: When a lead battery is deep discharged, his internal resistance is quite higher than 1R.....You often need to apply 2 or 3 times the nominal voltage to succeed to let some current flow.No need of a high current charger.

author: sandalcandal
author_rank: Unknown
timestamp: October 29, 2020, 06:22:53 pm
content: Quote from: akimpowerscr on October 29, 2020, 06:18:05 pmThanksI'll admit my knowledge and experience with lead acid technology is very limited. Most of my knowledge is all geared towards newer li ion tech.

author: Psi
author_rank: Super Contributor
timestamp: November 01, 2020, 01:31:33 am
content: Thanks everyone, I have been reading through everyone's posts and I understand the issues better now.Here's a bit more information about this exact use case.- Charge current is limited to around 3 Amps and charge voltage limited to around 15V (less diode drop)- The two most common situations for this system are1. Input voltage with battery connected (system active and charging)2. No input voltage with battery connected (system in standby)-The battery charger is for a fixed installation, the user will not be continuously swapping batteries in/out for charging.99.99% of it's life it will have the same battery connected and only get disconnected when the SLA is replaced, maybe every 5-8 years.- I don't think I really need to protect against both an extremely discharged SLA AND a reverse polarity event at the same time.It's possible but unlikely for this application.I am currently looking at something similar to sandalcandal's approach using a p-channel to connect the battery only when polarity is correct. Except I also have a Schottky diode as well to prevent getting discharged by backfeeding into the switchmode controller and onto the input side.One issue though is making sure the SLA is doesn't discharge through any part of the circuit. It will be connected to the charger all the time, even when not being charged.