building a long-term capacitor PSU - Page 1
Forum section: electronics / projects

author: bernie79
author_rank: Contributor
timestamp: September 24, 2023, 04:43:26 pm
content: Hi,I'm trying to build a capacitor power supply for some small Atmel/Pic applications.For test proposes I came up with a LTspice schematic (see attachment. the .png is for readers, who dont want to check the .asc out)).V1 is the typical 230VAC 50Hz mains we all know here in Europe.C1,R1 and R2 is the core capacitive impedance, limited by the Zener D5.D1-D4 builds a standard rectifier that is supported by C2 for smoothing the voltage out.IC1, D4 and C3-C6 is the standard-circuit for the 7805.R6 and R7 simulates the AVR and a AVR switched small relay.L1 limits the burst from 630mA (without coil) to 310mA without starts a swinging.In the diagram, the upper part with the legend is hidden, so:Red = voltage at 7805 pin "in" (label "sec")Green= voltage at 7805 pin "out"(label "out")light blue= current out of 7805 "out"This looks as good as I want this, exept the current burst on the start.I peaks out at 310mA and thats well below the 1000mA, the D2Pack-7805 should able to deliver, but I'm not shure.This little PSU will be the basis of some diffrent Atmels/PICs PCBs around in my house and should working at least 10 years without failure.Yes I know there should be at least a fuse, a VDR and a TVS been added, but thats not for the Spice-simulation.The switch-on-burst are my main concern. The whole board (including the PSU) will be switched on and off about two times a day so it will see about 7000 switches in its expected lifetime. I think this 310mA its not good in the long run, but how bad will it be? Has someone more experience?P.S.For all readers concerning electric hazard: I know that also the low voltage parts are on mains potential. thats okay because:1. no outer connection besides connections that are considered as mains.2. to reach the PCB you have to unplug all cabling from the PCB first. and its closed in an isolated wall box.So that problem is fully covered.

author: jwet
author_rank: Frequent Contributor
timestamp: September 25, 2023, 02:56:28 am
content: 300 mA surge isn't a ton these days for a lot of AC powered devices. It will stress the input cap mainly. That should be an X/Y type film cap from a good supplier- Kemet is a safe bet. In order to get your ten year life, you should over design/de rate-components especially HV caps.The other thing to look at is a NTC type thermal surge device in place of or with R2. Since the steady state current will be very low eventually, you could have a considerable delay- make sure that your uC has a reset circuit that will work if 5v comes up slowly- most modern PICS have a UVLO type detector on board.As an FAE for Maxim, I saw a lot of this direct impedance type off line stuff in wall socket gadgets even in some fairly sophisticated size constrained gear. Maxim had a part for a while called the MAX610 that had a full wave bridge and linear regulator integrated on board for these circuits. All you had to do was provide a cap and a layout and you could make tiny AC-DC supplies for ~15 mA apps. It was discontinued not because it was unsafe but customers wouldn't follow the apps guidelines and could make some really scary stuff. You sound like you know what you're doing and know the pitfalls.Google the MAX610 data sheet, it had a lot of good advice in it and might give you some ideas.Good luck.

author: bernie79
author_rank: Contributor
timestamp: September 25, 2023, 07:42:11 am
content: > That should be an X/Y type film cap from a good supplier- Kemet is a safe bet. In order to get your ten year life, you should over design/de rate-components especially HV caps.Yes, thats the first point on my list. Even checking whats happening when each of the caps are loosing their value over time (thats the initial reason for putting this into LTspice).Replacing R2 with an NTC or a fuseable kind of resistor was also on my mind, and I havent got a decision to this question.I got the Max610 in my hands years ago, but havent find a case where I should use this. There was always another solution.Thats for your thoughts. Nice to see I'm on the right path.Yet I'm still unsure about the surge. Maybe I should build a prototype and burn it with nasty overvoltages that are possible in the mains supply and see whats happening.

author: jwet
author_rank: Frequent Contributor
timestamp: September 25, 2023, 01:14:06 pm
content: Definitely prototype it. You might also talk to a capacitor apps engineer about what you're doing. The reliability will be dominated by that cap.

author: Jon_S
author_rank: Contributor
timestamp: September 25, 2023, 01:58:40 pm
content: At a previous place we made a high-volume product with a capacitive-dropper style power supply, it had a 10 year warranty.Out of the returns with power-supply failure the overwhelming majority were failure (open-circuit) of the series resistor not the cap. From memory, we started off with a string of 2512 thin-film, switched to thick-film, and finally pulse-rated MELF.The designs were independently tested to EN61000-4-5 and also abused as part of our in-house accelerated life testing on our own surge generator, but it appears that the mains in some areas is exceedingly lumpy indeed!

author: Benta
author_rank: Super Contributor
timestamp: September 25, 2023, 06:45:35 pm
content: I designed something very similar around 15 years ago, it's still running fine.Some points to note:R1 has to be a high-voltage type. I used Vishay VR37.R2 has to tolerate a 1 A current surge, I used a wirewound type.C1 must be an X-type with as high a voltage rating as you have space for. 305 VAC is pretty common today.All this is bad for a SMD design, but I have no market visibility there.1N4001 is a very bad choice. 1N4006 is more like it.I don't understand your L1 coil and find it unnecessary.Main failure mode is punch-through of C1, lowering the capacitance over time. Mains voltage spikes from lightning or inductive loads in the house can cause this. X-caps are self-repairing, but the mechanism is that if there is a punch-through, that area of the dielectric/metallization evaporates.Second failure mode is degradation of C2 due to the high current (up to 1 A) spike at switch-on.Neither of these can really be avoided without overly complicating the circuit. The normal solution is to have large safety margins on those parts. A MOV on the input is also a good idea.

author: mariush
author_rank: Super Contributor
timestamp: September 25, 2023, 08:22:00 pm
content: Microchip makes some high voltage linear regulators, like for example LR8K4 :https://www.digikey.com/en/products/detail/microchip-technology/LR8K4-G/4902849Goes up to 450v input voltage, dropout voltage of 12v, minimum 10mA output current.So couldn't you do half wave rectification, a small capacitor just enough to guarantee the voltage will above let's say 60v at 10mA, and configure the linear regulator to output 50v . With a bridge rectifier, for 10mA of current probably half a uF would be plenty, with a single diode maybe a few uF.Then use a switching regulator to convert 45-55v to 5v, that 50v 10mA will convert to maybe 300-400mA at 5vHere's an example, MP4569 in SOIC footprint, up to 75v in, up to 300mA out with 80%+ efficiency.https://www.digikey.com/en/products/detail/monolithic-power-systems-inc/MP4569GN-Z/7361524I don't know about input current spikes, the regulator may have high input current peaks

author: wraper
author_rank: Unknown
timestamp: September 25, 2023, 08:36:33 pm
content: Quote from: bernie79 on September 25, 2023, 07:42:11 amEspecially if you buy exploding paper garbage they acquired from RIFA.

author: Benta
author_rank: Super Contributor
timestamp: September 25, 2023, 09:06:25 pm
content: Quote from: wraper on September 25, 2023, 08:36:33 pmHaha, I remember those. Quite loud when they went off.For X-caps I prefer EPCOS myself, never had an issue.

author: coppercone2
author_rank: Super Contributor
timestamp: September 25, 2023, 09:28:50 pm
content: I can sell you a old square clear RIFA cap that has some minor surface cracking

author: Benta
author_rank: Super Contributor
timestamp: September 25, 2023, 09:44:34 pm
content: Quote from: coppercone2 on September 25, 2023, 09:28:50 pmSave it for New Year.

author: DavidAlfa
author_rank: Super Contributor
timestamp: September 25, 2023, 09:50:14 pm
content: To me, L1 is very wrong. It will kill the regulator trasient response.Any fast current peak demand will be filtered out, the output voltage will drop instead.Same for a sudden-release load, that coil will want to release its energy, might damage the regulator.Better to put it between the rectifier and the capacitor, so it also filters inrush current.

author: bernie79
author_rank: Contributor
timestamp: September 26, 2023, 03:06:29 pm
content: Wow, alot of feedback, thanks.I'm still reading and checking so if you feel unanswered, please have patience.concerning L1:On a first view, yes, L1 should be after the zener D5 and before C2. But on a closer look, this will lead to a nasty switch-on-surge not only to the regulator, but to C2 too. The simulation file is attached in the first post, you can try it by yourself.Some playing around:Without L1: the regulator goes slowly throuth the 2.5V-range and take a -610mA surge.(that way too close to the maximun rate for my taste.Even C2 gets a burst of -550mA. in other words: toasted on small fire.with L1 before (left from) C2: worse than without L1.IC1 gets a-680mA surge. Even C2 gets a burst of -550mA. toasted as well over time.with L1 after C2:The switch-on-burst for IC1 goes down to -300mA (just 1/3 of maximum rating) and C2 gets no burst. It only gets the ripple from the rectifier with 70mA peak and a single surge of 100mA at switching off R7 (simulated relay). Thats something I (and C2) can live with. Vout (Label "plus") stays in all moments above 4.85Volts, even with switching the relay load.About RIFA caps: I thought (hoped?) they are out of business. Seems the materials from them can still bite me.The breaking of a series resistor (here R2) is something at least once came on my desk long time ago in a commercial device. But thanks for the reminder.The LR8K4 is something, that I had not on my radar. still reading.But I found it interesting, that X2-caps >300VAC are rare in the listings of the big distributors (like digikey, TME) but can easy found in shops for low volume deals/ hobbyists/ part-time-repairmen (reichelt.de, conrad.com to name a few, mostly known in Central Europe, certainly unknown to the others).

author: coppice
author_rank: Super Contributor
timestamp: September 26, 2023, 04:23:40 pm
content: Quote from: Jon_S on September 25, 2023, 01:58:40 pmI assume most of those resistor failures were due to people running the product on power with high harmonics. Its good practice to use a large wire wound resistor which is WAY above the power rating needed to run on clean mains, mounted well above the PCB. Its fun to run products with a cap drop PSU from a triac light dimmer. You can often really get those resistors glowing with a heavily distorted mains waveform.

author: SeanB
author_rank: Super Contributor
timestamp: September 26, 2023, 05:57:10 pm
content: Make C6 100uF, and then L1 will not matter. On the input side you can simply use 2 class X capacitors in series, which will reduce the voltage across them. Will need to be 1u2 though, or use 2 of the 680n in parallel instead. so 4 capacitors, and you can derate to using 275VAC class X capacitors, just avoid the clear plastic case types. Yes gets big, but reliability is better, or you can simply replace the whole lot with a 2VA potted transformer with 8VAC output, and use a bridge, 1000uF 25V capacitor, and the 7805 as isolated transformer, as the 2VA transformer is both thermally protected and impedance protected, so will fail as open circuit on either continued short, or the mains going to 400VAC due to a fault.On the mains input place R2 before the capacitor, and make it at least a 2W fusible type, and then place the MOV between input of C1 and ground, so that the MOV both has to handle lower surge currents, and R2 will fuse open on prolonged overvoltage. Place an inductor, equal to L1, between C2 and C6, which will reduce common mode voltage spikes crashing your microcontroller, and place another D5 across C6 as clamp.

author: bernie79
author_rank: Contributor
timestamp: September 29, 2023, 02:16:18 am
content: @mariush: Interesting path to combine a HV reg with a buck converter. but I'm not familar enough with them. I think I need a lot of time to play around with some samples, but that breaks my time frame (doing all yC-devices + Power supply this winter in my spare time). but certainly noticed for further examination.@SeanB:Yes the swap of the usual 10yF to 100yF solve the spike, so L1 is not needed. I Have not considered to play around with c6-values.But re-inserting L1 for reducing voltages spikes had me thinking...

author: Swainster
author_rank: Frequent Contributor
timestamp: September 29, 2023, 04:42:58 am
content: I think an important thing to note is that an X2 (or X1) safety rating does not imply that it is suitable for this application. In fact, it used to be the case that in general, X rated caps were not suitable, however these days there seems to be a significant overlap in functionality. The important thing is to check that the particular X cap selected for this application is explicitely stated in the datasheet as being suitable for series impedance or dropping applications. Part of the problem is that long term stability of capacitance is not a requirement for the safety rating. As an example, page 15 of the attached TDK X-cap datasheet lists which of their capacitor series are suitable for a particular application (across the line suppression vs series dropper). Note that for the dropper caps, some are safety rated while some are not.

author: PCB.Wiz
author_rank: Super Contributor
timestamp: September 29, 2023, 05:08:27 am
content: Quote from: bernie79 on September 24, 2023, 04:43:26 pmAs mentioned R2 certainly needs to be pulse rated and grossly over spec'd. It wears any spikes on the mains.In this type of design you would usually pick a lower current regulator than a 7805 - it may mean you can go down a CAP size.If you have uncertain loads, especially ones that may brown-out the supply if not timed carefully, you may want to pick a LDO that has PowerGOOD/RESET signal. eg LP2951 or similar ?

author: coppercone2
author_rank: Super Contributor
timestamp: September 29, 2023, 05:22:01 am
content: I have a solution to this problem, you might be interested in the iron core transformer.

author: bernie79
author_rank: Contributor
timestamp: September 29, 2023, 11:19:36 am
content: @Swainster: Yes, I have read also this advise while looking at datasheets. I'm not sure if I part C1 across multiple caps. But I'm sure to use caps with not less than 330VAC. this gives enough headroom for wearing out the capacitance by overvoltage based holes in the cap-foils.R2 has to be indeed a special selected kind of resistor. I haven't deceided yet if its a fusable type or a regular wired with an extra fuse before. But we all can agree on this: A 0805 is ... not the best solutionSomething less aged than a 7805 is also I'm going to look. The 7805 was just the first vreg I spotted in the parts list of LTspice.@coppercone2: an old fashioned iron transformer is something that really should work for a long time, but the efficiency of a transformer in the range of 2-5Watts are worse that many capacitance PSU or Buck-converters. I can look for special transformers that are designed for better efficience, but they cost so much, all the gain is absorbed by the price.But a transformer solution should at least mentioned in this collection of thoughts.

author: PCB.Wiz
author_rank: Super Contributor
timestamp: September 29, 2023, 08:14:29 pm
content: Someone mentioned standby standards, of sub 1W, which raises an interesting point.It may be better to approach like #6 with a higher intermediate rail, that allows a smaller & cheaper CAP dropperHigher voltage switchers, (~45V here) allow a 8x current ratio, and Iq is 100~200uA region.A couple of low cost examples :LGS5200https://www.lcsc.com/product-detail/DC-DC-Converters_Legend-Si-LGS5200_C5370935.html6.5c/140 45V 200mA No boost, but needs Stky diodeLGS5148https://www.lcsc.com/product-detail/DC-DC-Converters_Legend-Si-LGS5148LF_C5818956.html11c/150 48V 600mA Sync P+N, saves Stky, has boost cap.low cost bridges MB10F-B $0.0077/50+https://www.lcsc.com/product-detail/span-style-background-color-ff0-Bridge-span-Rectifiers_GOODWORK-MB10F-B_C908754.htmlAddit: if you need enough power for many relays, Microchip haveInductorless Offline Switching Regulator ProductsA more expensive BOM, but good to 100mAhttps://www.microchip.com/en-us/products/power-management/dc-dc-converters-and-voltage-regulators/switching-regulators/inductorless-offline-switching-regulatorsQuote from: bernie79 on September 29, 2023, 11:19:36 amOnce you over-rate R2, you can also increase the voltage drop across it, to lower the peak possible currents. IIRC we used ~1.2k parts.