Author Topic: Polarized capacitor could be charged either way  (Read 1999 times)

0 Members and 1 Guest are viewing this topic.

Offline PeabodyTopic starter

  • Super Contributor
  • ***
  • Posts: 2302
  • Country: us
Polarized capacitor could be charged either way
« on: January 08, 2025, 04:09:33 pm »
Shown below is my circuit for a mailbox notifier.  The circuit is powered down when idle, and both sides of C2 are at V+, which is 5VDC or less.  Then when the door is opened, the switch closes, and the left side is grounded, which also lowers the right side to ground, turning on the mosfet.  The right side then starts to charge up, but is brought back down then the NPN turns on.

If the door is closed and the switch opens before the D1 Mini has finished transmitting, then the left side will start to charge through R3.  However, if the door is left open, or not properly closed, or the magnet is knocked off the door (all of which have happened), then the Mini will turn off the NPN while the door switch to ground remains closed, and then the right side of C2 will charge up to 5V.

I want to use reasonably available (through-hole) parts for this, which would not include a non-polarized electrolytic capacitor, so I'm wondering if I can get away with violating the polarity of even a tantalum capacitor at this voltage and with current limited by the 1Meg resistor.  I would put the positive side on the right since that would be correct polarity when the door is left open for an extended period.

Also, does the voltage rating of the capacitor affect the answer?

As a hobbyist, I just haven't dealt with this situation before.  So I would appreciate any guidance on this issue.
« Last Edit: January 08, 2025, 04:11:38 pm by Peabody »
 

Offline golden_labels

  • Super Contributor
  • ***
  • Posts: 1511
  • Country: pl
Re: Polarized capacitor could be charged either way
« Reply #1 on: January 08, 2025, 07:18:43 pm »
Damage from wrong polarity comes in two phases ways:(1)
  • Shorts are formed within the capacitor.
  • High current through those shorts boils the electrolyte, leading to explosion, spilling out electrolyte, or venting out fumes.
Placing high resistance in series with the capacitor prevents the second. If high current isn’t possible, there is no source of heat and nothing is boiled.

However, they don’t protect against the first: forming shorts. In correct polarization electric field pushes ions against insulation layer between electrodes, with the insulation layer itself being supported — in the most literal mechanical sense — by the solid electrode. If polarization is wrong, the insulation layer is pushed towards electrolyte, which provides no support, and the layer dissolves into electrolyte.

So while in your idea the capacitor will never explode, it will still slowly deteriorate. With time losing its capacitance and leaking charge.

But also note it’s not like the entire insulation layer disappers instantly. It’s gradual, comes with time and total charge passed. With infrequent events it may survive years. Capacitors rated for higher voltages (like 400 V death caps) have a thick insulation layer and laugh in your face, if you try to intentionally destroy them by applying voltage in reverse (as long as it is not too high).

I just don’t understand, why would you insist on using a polarized capacitor, instead of a dirt cheap film one.


(1) (Later edit) While writing the post my brain was stuck in OP’s specific problem. The poor choice of words came from thinking about this specific scenario and the general case at the same time. Of course deterioration wouldn’t happen without current being somewhat limited, because the capacitor first releases the magic smoke.
« Last Edit: January 09, 2025, 08:46:53 am by golden_labels »
People imagine AI as T1000. What we got so far is glorified T9.
 
The following users thanked this post: ledtester


Offline jpanhalt

  • Super Contributor
  • ***
  • Posts: 4080
  • Country: us
Re: Polarized capacitor could be charged either way
« Reply #3 on: January 08, 2025, 07:56:12 pm »
DigiKey has 411 radial lead 2.2 uF ceramic capacitors listed.  My experience with an exploding Tantalum (once) due to reverse polarity was not great.  But then, it wasn't designed for current limiting.
 

Offline PeabodyTopic starter

  • Super Contributor
  • ***
  • Posts: 2302
  • Country: us
Re: Polarized capacitor could be charged either way
« Reply #4 on: January 08, 2025, 10:29:19 pm »
I didn't think ceramic or even film capacitors as high as 2.2µF were widely used, or would be available in any hobbyist's stash.  I've never used one, or bought one.  Well, I'll look at those links.  Anyway, it appears using a polarized capacitor in that circuit isn't good for the long run, even with the low current.  Thanks very much for clarifying that.
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 20537
  • Country: gb
  • 0999
Re: Polarized capacitor could be charged either way
« Reply #5 on: January 08, 2025, 11:24:03 pm »
Two 4.7µF aluminium electrolytic capacitors connected back-to-back could well be the most cost effective solution.
 

Offline thm_w

  • Super Contributor
  • ***
  • Posts: 7663
  • Country: ca
  • Non-expert
Re: Polarized capacitor could be charged either way
« Reply #6 on: January 09, 2025, 12:07:02 am »
I didn't think ceramic or even film capacitors as high as 2.2µF were widely used, or would be available in any hobbyist's stash.  I've never used one, or bought one.  Well, I'll look at those links.  Anyway, it appears using a polarized capacitor in that circuit isn't good for the long run, even with the low current.  Thanks very much for clarifying that.

At these low voltages, 10uF and 22uF ceramic is common and cheap, used in lots of laptops.
https://www.lcsc.com/product-detail/Multilayer-Ceramic-Capacitors-MLCC-SMD-SMT_Samsung-Electro-Mechanics-CL21A226MAQNNNE_C45783.html
https://www.lcsc.com/product-detail/Multilayer-Ceramic-Capacitors-MLCC-SMD-SMT_Samsung-Electro-Mechanics-CL10A225KA8NNNC_C57895.html?s_z=n_2.2uf

Through hole obviously restricts available parts though
https://www.lcsc.com/product-detail/Multilayer-Ceramic-Capacitors-MLCC-Leaded_Dersonic-CD1E106MC9BER2F100_C2761733.html?s_z=n_10uf
Profile -> Modify profile -> Look and Layout ->  Don't show users' signatures
 
The following users thanked this post: sarahMCML

Offline CaptDon

  • Super Contributor
  • ***
  • Posts: 2255
  • Country: is
Re: Polarized capacitor could be charged either way
« Reply #7 on: January 09, 2025, 04:24:08 am »
Small non-polarized capacitors are used as tweeter crossover elements and are common. I have several dozen 1uf through hole mount capacitors that are non-polarized and used as bypass capacitors on digital logic boards. They are rated at 10vdc. Two back to back polarized capacitors DO NOT make the equivalent of a non-polarized capacitor and only the most dog shit design or craptastic manufacturer would make such a device. It can be done in very non-critical applications but makes a statement about the person or company that would do it!!
Collector and repairer of vintage and not so vintage electronic gadgets and test equipment. What's the difference between a pizza and a musician? A pizza can feed a family of four!! Classically trained guitarist. Sound engineer.
 

Offline PeabodyTopic starter

  • Super Contributor
  • ***
  • Posts: 2302
  • Country: us
Re: Polarized capacitor could be charged either way
« Reply #8 on: January 09, 2025, 05:17:49 am »
I have another version of the circuit (see below) which avoids the switch in polarity.  So a regular capacitor would work.  However, when the door is left open, the gate would be at the midpoint of the R1/R3 divider, and that can't be down more than the threshold voltage, or the Pro Mini could turn back on again and send out another notification.  But 100K and 2Meg yields 0.24V at 5V, and I don't think any mosfet would turn on at that voltage.
 

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 15244
  • Country: de
Re: Polarized capacitor could be charged either way
« Reply #9 on: January 09, 2025, 09:01:15 am »
2 µF film capacitors are already on the large side. Available, but no longer cheap and small.  2.2 µF ceramics are available with no problem, especially in SMD. One could also use 2 x 1 µF in parallel, as 1 µF is very common to get. With a little larger resistors for the 10 K the circuit should also work with a smaller capacitor, like 1 µF or if needed 100 nF.
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 20537
  • Country: gb
  • 0999
Re: Polarized capacitor could be charged either way
« Reply #10 on: January 09, 2025, 09:26:03 am »
Does the reed switch have to go to 0V? Can it go between +V and the BJT's base, via another RC circuit?
 

Offline golden_labels

  • Super Contributor
  • ***
  • Posts: 1511
  • Country: pl
Re: Polarized capacitor could be charged either way
« Reply #11 on: January 09, 2025, 09:34:45 am »
Two back to back polarized capacitors DO NOT make the equivalent of a non-polarized capacitor and only the most dog shit design or craptastic manufacturer would make such a device. It can be done in very non-critical applications but makes a statement about the person or company that would do it!!
Not opposing the opinion about a commercial product using back-to-back electrolytics, and an example surfaced recently.

But the first part, about not making the equivalent of a non-polarized capacitor, is IMO more nuanced. I don’t want to argue in favor of using them this way, just talking about accuracy.

Bipolar electrolytic caps exist. They are nothing more than two anodes submerged in the cathode, in a single can. Literally a back-to-back configuration. Everything is designed to assure sufficiently long operation despite the unfavourable conditions, so this is not identical to just wiring two random polarized caps together. But that already shifts us from strong “DO NOT make the equivalent” to asking “how much of the equivalent they are?”

From the purely electrical perspective, the idea always seemed sound to me. Of course ESR and capacitance suffer, but in principle we do get the equivalent of a polarized capacitor. Am I missing anything?

Each time polarity changes one of the caps gets the beating. I wouldn’t like to be in position of the poor capacitors from “Capacitors before bridge rectifier” thread. 50 hits a second must hurt. But I can’t see how this is not electrically equivalent, if used where electrolytics would normally be employed.
People imagine AI as T1000. What we got so far is glorified T9.
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 20537
  • Country: gb
  • 0999
Re: Polarized capacitor could be charged either way
« Reply #12 on: January 09, 2025, 11:15:22 am »
Two back to back polarized capacitors DO NOT make the equivalent of a non-polarized capacitor and only the most dog shit design or craptastic manufacturer would make such a device. It can be done in very non-critical applications but makes a statement about the person or company that would do it!!
Not opposing the opinion about a commercial product using back-to-back electrolytics, and an example surfaced recently.

But the first part, about not making the equivalent of a non-polarized capacitor, is IMO more nuanced. I don’t want to argue in favor of using them this way, just talking about accuracy.

Bipolar electrolytic caps exist. They are nothing more than two anodes submerged in the cathode, in a single can. Literally a back-to-back configuration. Everything is designed to assure sufficiently long operation despite the unfavourable conditions, so this is not identical to just wiring two random polarized caps together. But that already shifts us from strong “DO NOT make the equivalent” to asking “how much of the equivalent they are?”

From the purely electrical perspective, the idea always seemed sound to me. Of course ESR and capacitance suffer, but in principle we do get the equivalent of a polarized capacitor. Am I missing anything?

Each time polarity changes one of the caps gets the beating. I wouldn’t like to be in position of the poor capacitors from “Capacitors before bridge rectifier” thread. 50 hits a second must hurt. But I can’t see how this is not electrically equivalent, if used where electrolytics would normally be employed.
The problem with that rectifier circuit is the high ripple current, rather than the reverse bias.

This has also been discussed at the end of last year.
https://www.eevblog.com/forum/projects/simple-1-second-1ma-10ma-analog-oscillator-for-greenredwhiteblue-led-pulsing/msg5761537/#msg5761537

It works because the capacitors have parasistic diodes. Providing those diodes don't conduct for long, the capacitor will be fine.
 

Offline PeabodyTopic starter

  • Super Contributor
  • ***
  • Posts: 2302
  • Country: us
Re: Polarized capacitor could be charged either way
« Reply #13 on: January 09, 2025, 02:50:58 pm »
Does the reed switch have to go to 0V? Can it go between +V and the BJT's base, via another RC circuit?

I don't understand what you have in mind.  I don't see a way to do that.
 

Offline PeabodyTopic starter

  • Super Contributor
  • ***
  • Posts: 2302
  • Country: us
Re: Polarized capacitor could be charged either way
« Reply #14 on: January 09, 2025, 03:15:26 pm »
With a little larger resistors for the 10 K the circuit should also work with a smaller capacitor, like 1 µF or if needed 100 nF.

Did you mean the 100K G/S resistor?  I have to admit that the choice of the 100K was just my ballpark guess at what would reliably prevent noise or interference from triggering the mosfet.  If the MCU gets to the point of powering up, it's going to assert D2, then send a notification, and I don't want that to happen falsely.  And it didn't much matter if it was a lower value than necessary because current flows through it only for a few seconds twice a day.  But I would be interested in more educated views of how big that resistor might be and still work reliably.

 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 20537
  • Country: gb
  • 0999
Re: Polarized capacitor could be charged either way
« Reply #15 on: January 09, 2025, 07:30:25 pm »
Does the reed switch have to go to 0V? Can it go between +V and the BJT's base, via another RC circuit?

I don't understand what you have in mind.  I don't see a way to do that.
I made a schematic, but when I was nearly done, I realised your schematic contains a confusing error, so I had to stop.

Look at the reed switch. There's a note next to it which says, "Magnetic Reed Switch Normally Closed if no magnet". You then have NC written next to the the contact drawn as normally open, which is contradictory. Switch contacts should always be drawn in the non-energised state, which would be without a magnet, in the case of a reed switch.
 

Offline PeabodyTopic starter

  • Super Contributor
  • ***
  • Posts: 2302
  • Country: us
Re: Polarized capacitor could be charged either way
« Reply #16 on: January 09, 2025, 09:50:53 pm »
I don't think it's an error.  The magnet and the switch are mounted opposite each other, the magnet on the mailbox door, and the switch in the mailbox.  The switch is closed when the door is opened and the magnet is moved away from the switch.  That's what triggers the mosfet.

So I think that means it really is a normally closed switch, meaning that it's closed when no magnet is nearby.  I did ask Google AI what "normally closed" means for a magnetic switch, it not being necessarily obvious to me, and it said what you said.  So I think the schematic is right.  The magnet keeps the switch open.  Otherwise, normally, with no magnet, it's closed.

Maybe I drew it wrong.   I don't know if there's a standard  symbol for a magnetic switch.  I tried to show that the magnet keeps the switch open.

« Last Edit: January 09, 2025, 09:54:43 pm by Peabody »
 

Offline PeabodyTopic starter

  • Super Contributor
  • ***
  • Posts: 2302
  • Country: us
Re: Polarized capacitor could be charged either way
« Reply #17 on: January 09, 2025, 10:26:53 pm »
Digikey shows nine NC switches, and several dozen SPDT, which can be either NO or NC.

Anyway, I think @Zero999 wants me to draw it as shown below.
 

Offline golden_labels

  • Super Contributor
  • ***
  • Posts: 1511
  • Country: pl
Re: Polarized capacitor could be charged either way
« Reply #18 on: January 10, 2025, 04:04:37 pm »
I focused on the capacitor problem at first, without digging into what’s your goal. Looking at your problem now and assuming I understand it correctly, it may be decomposed into two parts:
  • Triggering the P-channel MOSFET to enable a microcontroller,
  • Letting the microcontroller shut down itself.

Did you consider using a pair of 555s to solve both?

In part I your trouble come from the latching circuit being level-triggered, while you want it to be edge-triggered. If an edge is detected, the MOSFET should be driven low for long enough for the microcontroller to take over the job. And after that it does nothing, until the switch returns to its original position and may produce another edge.

This is the standard 555 in monostable configuration. With high-pass filter on the input, so an edge is the trigger, not a level. And a transistor on the output to pull down the switching MOSFET, since 555 itself produces high level.

In part II you need a delay and something to hold signal long enough for the controller to be powered down. Doing that directly from controller’s I/O pin is usually unreliable. Again, another 555 in the same configuration may be used.


People imagine AI as T1000. What we got so far is glorified T9.
 

Offline PeabodyTopic starter

  • Super Contributor
  • ***
  • Posts: 2302
  • Country: us
Re: Polarized capacitor could be charged either way
« Reply #19 on: January 10, 2025, 06:57:09 pm »
My circuit draws zero current except during the 20 seconds it is powered up twice a day.  It seems that the 555s would have to be powered up all the time, or at least one of them.  Is that right?  If not, perhaps you could post a drawing of how they would be configured.

Edit:  I should also say that I think powering down from the GPIO is reliable here.  D2 will switch from output high to output low.  Then at some point the ESP8266 will shut down, and the active low output will cease.  But there's no way for it to go active high again.  It will go tristate, but there's still no current source to turn on the NPN, so it will stay off.  It actually did work that way for over a year, and I did not experience any problems.  But the original circuit just connected the switch directly to the gate, so if the door was left open, the power stayed on.  That's what I'm trying to correct by inserting the capacitor in that line.

« Last Edit: January 10, 2025, 07:08:03 pm by Peabody »
 

Offline golden_labels

  • Super Contributor
  • ***
  • Posts: 1511
  • Country: pl
Re: Polarized capacitor could be charged either way
« Reply #20 on: January 10, 2025, 08:24:31 pm »
My circuit draws zero current except during the 20 seconds it is powered up twice a day.  It seems that the 555s would have to be powered up all the time, or at least one of them.  Is that right?  If not, perhaps you could post a drawing of how they would be configured.
Depends on the model. ST’s TS555 and TI’s LMC555 advertise 100–200 µA.(1) That’s some orders of magnitude less than your circuit draws while active. Does current draw so low matter in your scenario?

Edit:  I should also say that I think powering down from the GPIO is reliable here.  D2 will switch from output high to output low.  Then at some point the ESP8266 will shut down, and the active low output will cease.  But there's no way for it to go active high again.  It will go tristate, but there's still no current source to turn on the NPN, so it will stay off.  It actually did work that way for over a year, and I did not experience any problems.  But the original circuit just connected the switch directly to the gate, so if the door was left open, the power stayed on.  That's what I'm trying to correct by inserting the capacitor in that line.
If you tested it and that level of reliability suffices your needs, I can’t argue against it. One circuit section less.


(1) https://www.st.com/resource/en/datasheet/ts555.pdf, https://www.ti.com/lit/ds/symlink/tlc555.pdf
People imagine AI as T1000. What we got so far is glorified T9.
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 20537
  • Country: gb
  • 0999
Re: Polarized capacitor could be charged either way
« Reply #21 on: January 10, 2025, 10:44:03 pm »
I don't think it's an error.  The magnet and the switch are mounted opposite each other, the magnet on the mailbox door, and the switch in the mailbox.  The switch is closed when the door is opened and the magnet is moved away from the switch.  That's what triggers the mosfet.

So I think that means it really is a normally closed switch, meaning that it's closed when no magnet is nearby.  I did ask Google AI what "normally closed" means for a magnetic switch, it not being necessarily obvious to me, and it said what you said.  So I think the schematic is right.  The magnet keeps the switch open.  Otherwise, normally, with no magnet, it's closed.

Maybe I drew it wrong.   I don't know if there's a standard  symbol for a magnetic switch.  I tried to show that the magnet keeps the switch open.
I see what you mean now. The drawing is correct, given the magnet is normally next to the contacts, which effectively become normally open.

Here's my idea. The capacitor will be exposed to reverse bias, but it's clamped to <0.6V by the transistor, so it's no longer an issue.
 

Offline PeabodyTopic starter

  • Super Contributor
  • ***
  • Posts: 2302
  • Country: us
Re: Polarized capacitor could be charged either way
« Reply #22 on: January 10, 2025, 10:47:49 pm »
Since this project may be powered by three Utimate Lithium primary AAs, which are expensive, I just don't want to draw any current during the 23 hours, 59 minutes and 20 seconds per day when nothing is going on if I don't have to, not counting Sundays and holidays when even the 40 seconds doesn't happen.  Even 100-200uA.  And if I were willing to accept that, it would be easier to just leave the power on all the time and put the ESP8266 into deep sleep instead, and do away with most of the circuit.  It varies by version, but my D1 Mini v3.0.1 sleeps at about 70uA, so that would be a better option than the 555.  But mainly it's just the principle of the thing that this kind of project shouldn't draw power when it's idle.

I'm still wondering about the value of the pullup resistor on the P-channel mosfet.  Everything I read says 100K is already at the high end of the acceptable range.  But certainly a higher value would let me use a smaller capacitor, so there's that.
 

Offline PeabodyTopic starter

  • Super Contributor
  • ***
  • Posts: 2302
  • Country: us
Re: Polarized capacitor could be charged either way
« Reply #23 on: January 10, 2025, 11:12:11 pm »
Thanks very much for the new circuit.  I'm gonna have to work through it, and breadboard it over the weekend to see how it works.  But I'm perplexed by the use of the 1Meg resistors.  If I can get away with them there, maybe I can get away with a 1Meg pulldown on the mosfet, and then I could use a normal non-polarized bypass capacitor.  But I guess the difference is that the mosfet gate is very high impedance, and the NPN base is not.

I also need to consider whether the protection diode on D2 affects any of this.

Anyway, thanks again for the suggestion.
 

Offline golden_labels

  • Super Contributor
  • ***
  • Posts: 1511
  • Country: pl
Re: Polarized capacitor could be charged either way
« Reply #24 on: January 11, 2025, 01:19:34 am »
Just to put that to numbers: if 100 µA is drawn for an entire day, that is 0.1 mA · 24 h = 2.4 mAh. I would still reconsider the position.

But ok, I’ll assume this is a hard, undebatable constraint. Let’s also skip the most obvious solution: adding another MOSFET controlling power to the 555.

Using as much as possible from your original idea, perhaps the circuit below will do? Not tested (only simulated in spice).



  • C1/R2 form a high-pass filter, for signal from the switch being closed. The delay time is determined by how long it takes to charge C1 through R2.
  • R1 provides a discharge path for C1, when the switch is opened. When the switch is closed, some current goes through it uselessly. mA range.
  • Q1 is an amplifier that separates the filter from R3 and Q2. This way there is no issue with both parts affecting each other. The transition is also quick.
  • When the switch is opened, a short spike is produced on Q1 base, going above the supply voltage. Given R3 limits current and the B-C junction should withstand much more than that, this shouldn’t cause trouble. But, if you feel better about that: a diode in parallel with R2, in reverse polarity, will take care of the spike.
  • Microcontroller and associated components not included in the schematic. In particular remember D2 output, if it’s actively driven, requires a series resistor.

If it happens that Q1 is not enough to pull gate of Q2 or the transition is too slow, perhaps a bit more complicated amplifier:



Note that in this circuit R5 must be at least an order of magnitude bigger than R2. Otherwise C1 will charge through it.


To be pedantic, you must accept some current draw. Real components have leakage. This is not an exception with the idea presented above.
« Last Edit: January 11, 2025, 01:29:39 am by golden_labels »
People imagine AI as T1000. What we got so far is glorified T9.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf