Any guru in switch-mode PS?.. I've got some mystery happening..:) - Page 1
Forum section: electronics / repair

author: JimStar
author_rank: Contributor
timestamp: January 28, 2025, 05:03:01 am
content: Before going through a hassle of disassembling one of my devices to investigate what's the magic, I decided to ask here first...Maybe the issue istrivialand there are some power-supply gurus here who tells me the root cause of the mystery that's happening with all of my devices that have MeanWell and similar PS inside of them (at least a Lab power supply with 65V PS, and signal generator with 5V PS)...Recently I bought a couple of Zigbee smart plugs, that integrate into my Home Assistant, and used to switch off the power from a wall socket to anything connected.https://www.aliexpress.com/item/1005005636484995.html?spm=a2g0o.order_list.order_list_main.56.21ef1802pHgropOne of the problems of this Chinese thing - it disconnects a NEUTRAL line instead of Live. Not ideal, but it still works OK with simple devices like lamps or vacuum cleaner...But the magic happens with any device where a MeanWell (or similar) power supply is inside. For example I got this Lab PS:https://www.aliexpress.com/item/1005001488070904.html?spm=a2g0o.order_list.order_list_main.81.21ef1802pHgropwith this power supply inside:https://www.aliexpress.com/item/1005002282003550.html?spm=a2g0o.order_list.order_list_main.76.21ef1802pHgropAnd the mechanical switch on the back of if I keep switched OFF in my tests, which disconnects the LIVE line inside of it.When the new Zigbee plug inserted in between the wall-socket and this device is switched ON (the Neutral wire is connected) - no issues. As soon as I disable the Zigbee plug (it disconnects the NEUTRAL line when this happens, but the Live is still there) - the Lab PS starts to behave WEIRD. Every minute or two the 65V power supply inside of it lights up its LED, clicks with a relay and tries to start. Then it immediately switches off again... It looks like some capacitor inside of it gets charged, and the PS tries to start after it gets charged enough, but then immediately discharged...The same happens with my signal generator that has a 5V MeanWell inside - it blinks with a led on the front panel every minute, trying to start...BUT, the Live line is DISCONNECTED in this device by the manual switch on the back of the device. And the Neutral line is DISCONNECTED too in the Zigbee switch on the wall socket... So the only line that goes from the wall socket to the device uninterrupted - is the green GROUND wire.And this stops happening as soon as I switch ON the Zigbee plug which makes the Neutral line CONNECTED.I've measured the voltage right on the input of the 65V PS inside the Lab PS:- between the (disconnected) Live and the (disconnected) Neutral is about 4V AC.- between the (disconnected) Live and Ground 235V AC (the normal power line voltage). Even though the Live line is disconnected on the back of the device!Whenever I detach the green Ground wire inside the device, this "every minute start attempts" stop happening... So I can suspect it could be somehow related to a ground wire magic...But how this could happen? Even more, how this could happen with the Live wire DISCONNECTED by the manual switch on the back of the device, and the Neutral wire DISCONNECTED by Zigbee plug right after the wall socket?..

author: shabaz
author_rank: Frequent Contributor
timestamp: January 28, 2025, 06:19:17 am
content: Hi,You've put way too much faith in all this AliExpress mains-attached gear.It could well be a fire hazard, cause electrocution, harm others, or damage property.There's a mountain of other AliExpress products to explore, some will be bargains, but this is not it; not worth the risk at all. IoT mains sockets purchased in your own country are unlikely to be very expensive, and that no-name AC to DC mains PSU doesn't look all that much of a bargain either.

author: Poroit
author_rank: Frequent Contributor
timestamp: January 28, 2025, 07:12:23 am
content: G'day JimStar,In your country, is your Earth Bonded to the Neutral at the Buildings Meter Box?Can you rewire the Smart Plugs so that they switch the Active wire?

author: JimStar
author_rank: Contributor
timestamp: January 28, 2025, 07:33:39 am
content: QuoteI think so... I've measured the resistance between the Earth and Neutral on the wall socket - it's close to 0 Ohms...QuoteIt was the first thing I thought about... But the contacts are soldered directly to a board, so it's impossible to do without putting the board into completely different box, and solder wires to it. I will consider this way only if I can't find what's happening in these power supplies...My bet would be that the manual switch that disconnects the Live wire in the Lab PS has just contacts so close to each other that they could work as a capacitor, passing some of AC through...If so, then the only question would remain, how in the world it would be possible that the AC goes by the path from Live wire back through the Earth wire inside the PS, charging some big capacitor on its way... And this happens on a couple of different devices, at least one of them has a GENUINE branded MeanWell PS, not just some Chinese one... and it works absolutely the same, pulsing every minute when only Live and Earth wires are connected, but doesn't pulse as soon as the Neutral wire gets connected too...

author: ondraN
author_rank: Regular Contributor
timestamp: January 28, 2025, 09:18:26 am
content: This problem can arise in the input filter of the switching power supply. It is usually placed before the switch and is a system of inductors and capacitors. These are relatively small, but they can cause slow charging of the internal filter capacitors of the switching power supply.

author: Poroit
author_rank: Frequent Contributor
timestamp: January 29, 2025, 05:33:19 am
content: So you have 240V AC between Live (Active) to Neutral and Live to Earth.I think the problem relates to a mix up of Active and Neutrals.Is the household outlet (power point) you are using wired correctly.

author: JimStar
author_rank: Contributor
timestamp: January 29, 2025, 06:39:05 am
content: QuoteYes it's wired correctly.This is definitely something related to a power supply schematics... I looked at the schematics of some MeanWell PS, just a first one I've googled, to just try to understand overall idea... And I see the Earth only connects through some small filtering capacitors, I just can't see how the 230V AC could go between connected Live and Earth (while Neutral is disconnected) so that it charges some much bigger capacitor that in turn tries to start the PS every minute... And how this stops happening as soon as the Neutral wire gets connected too...

author: Kean
author_rank: Unknown
timestamp: January 29, 2025, 06:48:08 am
content: There are often Y capacitors for EMI suppression in an SMPS between Live and Earth, and Neutral and Earth, as well as across the main switching transformer isolation barrier. The one from neutral to earth could provide a leakage path from live to earth (through the PSU AC input) when neutral is disconnected, and a good reason why switching only neutral is a pretty bad idea. The leakage will be pretty small (e.g. a 2n2 cap at 50Hz is nearly 1.5Mohm), but could be enough to slowly charge the main bus capacitor to the point the PSU LED comes on for a moment.If neutral is connected but not live, then this wont happen as neutral is bonded to earth elsewhere.I doubt there is any significant leakage path when both live and neutral are switched off. The impedance between open switch contacts should be considerable. I wasn't clear if you were saying you still saw the same behaviour when the manual switch of both live & neutral was off.If neutral and live are both connected, then the PSU will obviously power on - irrespective of earth (apart from safety).Maybe I misunderstand the conditions under which you are saying this occurs.

author: JimStar
author_rank: Contributor
timestamp: January 29, 2025, 07:03:16 am
content: KeanThank you for a good explanation!QuoteSorry, I wasn't clear about that part: when the switch on the back of the Lab PS isdisconnectedand the SmartPlug on the wall socket disconnects Neutral - this every-minute startup is happening with the PS.But as soon as I switch-on the SmartPlug (which just connects Neutral in addition) - the every-minute startup stops happening. This all with the Live-wire switch still OFF on the back of the Lab PS...That was what puzzled me in the first place, as I see that the Neutral is disconnected on the SmartPlug level, the Live is disconnected by the back-switch, only Earth wire comes uninterrupted, and the PS still tries to start every minute with enough power to light up the LED and click by the relay... As soon as the SmartPlug connects the Neutral to the same setup - the PS stops this every-minute startup attempts...I even measured the resistance of the back-switch in the OFF state to be sure that it is really disconnected when off...

author: Kean
author_rank: Unknown
timestamp: January 29, 2025, 07:24:06 am
content: That sounds weird.Are you sure the switch on the back of the Lab PS switching the AC input into the fake Meanwell SMPS?

author: JimStar
author_rank: Contributor
timestamp: January 29, 2025, 07:33:33 am
content: QuoteAbsolutely. ;)As I said - I even measured the resistance of it in the OFF state, because I couldn't believe my eyes...And the fact that the PSdoes not startupwhen the SmartPlug connects the Neutral - confirms that the back-switch is OFF. Otherwise, as you mentioned earlier - the PS would just start because it would have all the Live, Neutral and Earth... But it only starts for sure when the Neutral is on by the SmartPlug and Iswitch ONthe back-switch...

author: Kean
author_rank: Unknown
timestamp: January 29, 2025, 08:12:24 am
content: I'm stumped then. I can't imagine there is enough parallel wiring inside the unit to capacitively couple some AC power (as sometimes seen with LED lighting).Maybe some photos or a video might give us some additional insight.

author: ondraN
author_rank: Regular Contributor
timestamp: January 29, 2025, 08:39:03 am
content: High-quality switching power supplies have a power switch that switches live and neutral simultaneously. This eliminates this very phenomenon. If power supplies that have this behavior were modified to use a two-section switch and both AC inputs were disconnected, the problem would disappear.

author: Pfriemler
author_rank: Regular Contributor
timestamp: January 29, 2025, 09:04:45 pm
content: I have an idea to this. Sounds weired. To the given schematics, look at the two capacitors from AC/L (I interprete as C22) and AC/N to PG (C23) - Earth.If the zigbee is off (N) and PS switch is off, the cable from the wallplug to the PS works as an capacitor, coupling L into the floating N, coming through AC/n into the PS. Whereas C23 is parallel to N and PG and works as a load to the cable coupler, there's a second path running through filters and rectifier and C22, loading the primary PS capacitor a bit -> PS tries to start. If the PS switch is on, this coupling cable condenser is almost shortened, phase is different, whatorever, it lowers the parasite voltage.If the PS switch is off and the wallplug switch is on, the coupling cable condenser is shortend to N with no potential left to PG -> no parasite path.If the PS switch is a dual type switching AC/L and AC/N, as ondraN mentioned, the parasite path is disconnected, too.Lucky continental European users: they simply turn the wallplug by 180 degrees to get L switched. No chance to do this here.

author: JimStar
author_rank: Contributor
timestamp: January 30, 2025, 12:36:59 am
content: Thank you so much guys for all your input! I really appreciate such an interest to this "mystery magic"...It's not a show-stopper issue, I can always solve it just rerouting all the SmartPlug boards properly (I got 12 of them) and 3D-print new cases for them... It's just really interesting for me to find out the possible cause...Quote from: Pfriemler on January 29, 2025, 09:04:45 pmI just need to mention, that when the switch at the back of Lab PS is ON - it still behavesthe sameas when it is OFF: it still tries to start every minute when no Neutral is present. So this switch doesn't affect this behavior, it just makes everything even more weird when it's OFF...Just for fun, I've made a video that should provide a little hope that I'm not crazy...Sorry, there is some ~1 minute part where I'm just waiting for it to attempt-to-start, but I decided to not cut it off - to just provide an estimate of how long it takes to happen.YouTube link:https://youtu.be/IiMgAzLzfMs

author: Poroit
author_rank: Frequent Contributor
timestamp: January 30, 2025, 02:45:50 am
content: Thank you for the video.I guess SMPS designers never plan for incorrect mains switching.

author: Kean
author_rank: Unknown
timestamp: January 30, 2025, 09:19:47 am
content: Thanks for the video. I'm guessing you are in AU or NZ based on the style of AC plug, AC supply voltage, and the Digitech branded DMM.If you are measuring 230V between live and earth at the PSU input, then I believe the rear power switch must be faulty and high leakage.When neutral is connected properly, any leakage current through the switch would be "consumed" by the the low input impedance of the PSU AC input so the voltage reading is low, but when neutral is disconnected there is those high impedance EMI suppression caps between earth and neutral allowing some leakage. As the leakage current is so low, it isn't surprising it takes more than a minute to charge up the capacitor enough before the PSU SMPS controller tries to start up.I did a quick setup using a little 4W PSU I had handy, and added some external EMI suppression caps to earth. I then simulated both live and neutral disconnected in various combinations with the PSU connected or disconnected. The only way I could reproduce your problem was by adding some capacitance across the switch on the live. And the capacitance had to be more than an order of magnitude higher than the EMI suppression caps, else they acted as a voltage divider. As expected, the PSU being connected via neutral stopped the voltage rising.We can confirm it is the switch in your case by disconnecting (with mains unplugged) the brown? wire from the switch going to the PSU, and re do your tests. If the switch had good isolation when off, then that disconnected wire shouldn't make any difference to operation. Maybe you have another switch of similar rating you can swap with?A few notes... be very careful measuring the connections on that switch with the power cable connected. You were measuring continuity when the Zigbee switch is on and off, but maybe are forgetting it still has live power! I don't know if you have your bench on any kind of RCD. I use medical grade RCDs at my electronics benches, which trip with 10mA or less earth leakage instead of the typical 30mA.You absolutely should not be using these smart plugs that switch neutral instead of live. Even if they appear to work they are not conformant or safe, and you are screwed if anything goes wrong and causes injury or fire. The same applies with any non-RCM marked parts source from AliExpress or ebay - like fake Meanwell PSU - but for a different reason to the smart plug design flaw.

author: JimStar
author_rank: Contributor
timestamp: January 30, 2025, 10:47:29 am
content: Quote from: Kean on January 30, 2025, 09:19:47 amYeah, I wrote in some of my first posts here, that I suspect it could be some parasite capacitance in the switch because of close-to-each-other contacts... Actually this could be the only reason of such behavior with the switch off. BTW I wrote here that when I disconnect the Earth wire in the PS - this behavior stops happening.The PS behavior is the same with the switch ON, so the switch is just as side-issue here, just adding to the effect of weirdness... But the main question here - is still some issue with the PS schematics that allows it to behave that way when just the Neutral gets disconnected. It could become suddenly disconnected for some other reason, and the PS behaving like this just because the Neutral got disconnected - is not a good design and might be not safe anyway.If that was the only one acting like this - then I would just write it off as a badly designed model. But the fact that different SMPS behave same way shows that many of them are designed the same way. So I will probably try to investigate this further if I have some time to disassemble and play with it later...

author: Kean
author_rank: Unknown
timestamp: January 30, 2025, 11:13:45 am
content: Please do not disconnect the earth wire!!! While it might seem to avoid the problem, it is especially dangerous on a device with neutral switched instead of live and metal chassis.With the switch on it makes more sense than with the switch off, so I'd really like to know if removing/replacing the switch has any effect.There is nothing wrong with the PSU design, it is just a side effect of expected leakage current and incorrect wiring (missing neutral).I cannot recommend a PSU without proper EMC & safety certification (RCM in AU/NZ) - but that wont change this issue.

author: JimStar
author_rank: Contributor
timestamp: January 30, 2025, 11:30:29 am
content: I never thought of disconnecting the Earth on a device that is in use, I like to remain a living creature...Actually I reckonPfriemleris right with his analysis here. It looks like C22/C23 (and the similar pair in the next stage) could be the path of charging the bigger capacitors...

author: Kean
author_rank: Unknown
timestamp: January 30, 2025, 11:48:01 am
content: Quote from: JimStar on January 30, 2025, 11:30:29 amSorry I had not reviewed that schematic as the PNG linked was unreadable - but I just downloaded the PDF from the elektrotanya site.Yes, 100% those are the EMI suppression caps I was talking about (C23 in particular, and C3 will also have the same effect).Oh, and also C30 via the diode bridge - all those caps will provide a decent capacitive path to the missing neutral via earth.