Sonoff 4CH suddenly half-dead!

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
manjh
Normal user
Posts: 516
Joined: 08 Feb 2016, 11:22

Sonoff 4CH suddenly half-dead!

#1 Post by manjh » 08 Jan 2022, 15:10

I have a Sonoff 4CH unit switching four devices, has been running for a very long time.
It has suddenly developed a very strange behaviour:
- when I power it up, it responds by switching on one of the outputs that I had set to be "on" by default, so the unit works OK
- when I press one of the buttons, the corresponding output switches OK
- when I "ping" the IP address, it responds OK
So far, so good.
Now the weird thing:
- when I try to switch the unit from domoticz (using a http msg for on/off) it does not react
- when I try to access the GUI via a browser, the unit does not respond

So it looks like it does connect to Wifi, and internally it runs, but does not respond to anything coming in from Wifi (except ping).
Before I start getting the unit out, and dig up the instructions for connecting it to my computer, does this sound familiar to anyone?

User avatar
Ath
Normal user
Posts: 3416
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Sonoff 4CH suddenly half-dead!

#2 Post by Ath » 08 Jan 2022, 16:11

Do you have a clue on what version/release of ESPEasy is active on that unit?
Can you improve the WiFi signal for the unit, f.e. by re-orienting an antenna of a router, or adding a repeater? When the WiFi signal is weak, this kind of behavior could be the result.
/Ton (PayPal.me)

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Sonoff 4CH suddenly half-dead!

#3 Post by TD-er » 08 Jan 2022, 16:38

I think you may also want to check the power supply of the Sonoff.
This is not the first "My Sonoff suddenly no longer works" topic I see the last few months.
It seems like the used capacitors of Sonoff age to such a point that the power supply no longer is stable.
They weren't really overpowered to begin with, so even slight degradation can already lead to instable voltages.

manjh
Normal user
Posts: 516
Joined: 08 Feb 2016, 11:22

Re: Sonoff 4CH suddenly half-dead!

#4 Post by manjh » 08 Jan 2022, 19:21

Ath wrote: 08 Jan 2022, 16:11 Do you have a clue on what version/release of ESPEasy is active on that unit?
Can you improve the WiFi signal for the unit, f.e. by re-orienting an antenna of a router, or adding a repeater? When the WiFi signal is weak, this kind of behavior could be the result.
I tried moving sonoff right next to an access point, no change.

manjh
Normal user
Posts: 516
Joined: 08 Feb 2016, 11:22

Re: Sonoff 4CH suddenly half-dead!

#5 Post by manjh » 08 Jan 2022, 19:21

TD-er wrote: 08 Jan 2022, 16:38 I think you may also want to check the power supply of the Sonoff.
This is not the first "My Sonoff suddenly no longer works" topic I see the last few months.
It seems like the used capacitors of Sonoff age to such a point that the power supply no longer is stable.
They weren't really overpowered to begin with, so even slight degradation can already lead to instable voltages.
Power supply? It is powered right off the 230V mails...

User avatar
Ath
Normal user
Posts: 3416
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Sonoff 4CH suddenly half-dead!

#6 Post by Ath » 08 Jan 2022, 19:29

manjh wrote: 08 Jan 2022, 19:21 Power supply? It is powered right off the 230V mails...
Yes, but that mains power is converted to the 3.3V the controller needs, and that circuitry is quite poorly (or cheaply) designed on most Sonoff devices... as TD-er suggests, probably the (electrolytic) capacitors are partly gone/worn out, and should best be replaced.
/Ton (PayPal.me)

manjh
Normal user
Posts: 516
Joined: 08 Feb 2016, 11:22

Re: Sonoff 4CH suddenly half-dead!

#7 Post by manjh » 08 Jan 2022, 21:58

Ath wrote: 08 Jan 2022, 19:29
manjh wrote: 08 Jan 2022, 19:21 Power supply? It is powered right off the 230V mails...
Yes, but that mains power is converted to the 3.3V the controller needs, and that circuitry is quite poorly (or cheaply) designed on most Sonoff devices... as TD-er suggests, probably the (electrolytic) capacitors are partly gone/worn out, and should best be replaced.
Hmmm... sounds far fetched. The system works, except for the GUI.
I think I'll ditch the Sonoff and go for a bew COCO ACM3500...

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Sonoff 4CH suddenly half-dead!

#8 Post by TD-er » 08 Jan 2022, 22:11

My suggestion is based on the fact that there are multiple reports from Sonoff devices running fine for years, but not any more.
No changes in settings or firmware, just not working well/reliable any more.

Most capacitors have a lifetime of X hours at Y degree C specified by the manufacturer.
Per 10 degree lower temperature the X doubles.
But given that the nr. of hours isn't that high (1000 hours is very common at 105C for example) See: https://en.cosel.co.jp/technical/qanda/a0057.html

I wouldn't be surprised if the caps in Sonoff units have a lower expected lifetime. Also the "lifetime" of a cap isn't the moment when it will stop working.
It will gradually loose capacity.
So it may very well be that this drop in capacity already is enough at a fraction of the given lifetime, when it was already on the lower end of the needed capacitance to begin with.

If the caps have a given lifetime of 1000h at 105C then you would expect roughly 32'000 - 64'000 hours. That's 4 - 8 years.
But as I said, if it was already underdimensioned, it might hit this limit before this estimated lifetime.

manjh
Normal user
Posts: 516
Joined: 08 Feb 2016, 11:22

Re: Sonoff 4CH suddenly half-dead!

#9 Post by manjh » 09 Jan 2022, 11:04

OK, thanks. That makes sense.
What puzzles me is why the core still works OK (it switches based on rules), and it connects to Wifi. It responds to pings. But the GUI does not work. I assume all of these functions are handled by the same processor, right?

I can give it a try, since the only alternative is to throw the Sonoff in the recycle-bin. I hope the value of the caps are clearly marked so I will know what to replace them with.
Will have a look today.

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Sonoff 4CH suddenly half-dead!

#10 Post by TD-er » 09 Jan 2022, 12:06

The WiFi related code in ESPEasy is loaded with exception handling code to overcome issues within the closed source WiFi code.
This can lead to the situation where the WiFi events are not handled (or even sent) and thus ESPEasy never reaches a point where it can conclude it is fully connected.
Most situations I saw these things happen, the web interface does work, but not sending data to controllers.

It is also possible that your unit just reboots without you knowing when you try to do things which require a bit more energy.

manjh
Normal user
Posts: 516
Joined: 08 Feb 2016, 11:22

Re: Sonoff 4CH suddenly half-dead!

#11 Post by manjh » 09 Jan 2022, 13:56

OK... I had a close look at the board, it has three electrolytic condensors. Two seem to be on the "hot" side, the other is on the low voltage side of the transformer.
Values are: two 3.3uF 400V, and one 470uF 16V.
Next challenge is where to get them. I found them at Conrad, cost is about 50 cents... but the shipping ruins the deal. Even when I order double the required number (since my other Sonoff 4CH is still running OK, but based on what you say I might as well replace those caps as well)

Any hints?

Edit: I found a source for the 16V caps with a reasonable shipping cost, but the 400V caps are harder to find.
Which of these two types are most likely to be the problem? The low voltage, since that would directly effect EspEasy?

Also, if the 3.3uF 400V cannot be found, would it hurt to use a higher uF value?
Last edited by manjh on 09 Jan 2022, 14:11, edited 1 time in total.

manjh
Normal user
Posts: 516
Joined: 08 Feb 2016, 11:22

Re: Sonoff 4CH suddenly half-dead!

#12 Post by manjh » 09 Jan 2022, 13:57

TD-er wrote: 09 Jan 2022, 12:06 The WiFi related code in ESPEasy is loaded with exception handling code to overcome issues within the closed source WiFi code.
This can lead to the situation where the WiFi events are not handled (or even sent) and thus ESPEasy never reaches a point where it can conclude it is fully connected.
Most situations I saw these things happen, the web interface does work, but not sending data to controllers.

It is also possible that your unit just reboots without you knowing when you try to do things which require a bit more energy.
Would that explain why it does reply to ping, but will not do any EspEasy related stuff like logging in, or handling commands?

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Sonoff 4CH suddenly half-dead!

#13 Post by TD-er » 09 Jan 2022, 15:24

If you have a multimeter capable of measuring capacity, you can check them first.
Just make sure the caps are discharged before handling them. (!!!)

470 uF/16V does seem a bit overkill to be honest, so I wonder if they might be what is stated on the caps as they are also quite bulky.
Just google for some examples to see if those match the dimensions of what is placed on your board.

3.3uF at 400V is also quite big (physical dimensions), so maybe check the dimensions of that one too based on what you can find here: https://nl.farnell.com/c/passive-compon ... ating=400v

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Sonoff 4CH suddenly half-dead!

#14 Post by TD-er » 09 Jan 2022, 15:26

manjh wrote: 09 Jan 2022, 13:57 [...]

Would that explain why it does reply to ping, but will not do any EspEasy related stuff like logging in, or handling commands?
Yep. Controllers that need network access use the same function to check whether ESPEasy is connected.
Other commands should work fine, but I can imagine that switching a relay may be a bit too much for an almost failing power supply.

manjh
Normal user
Posts: 516
Joined: 08 Feb 2016, 11:22

Re: Sonoff 4CH suddenly half-dead!

#15 Post by manjh » 09 Jan 2022, 19:20

TD-er wrote: 09 Jan 2022, 15:24 If you have a multimeter capable of measuring capacity, you can check them first.
Just make sure the caps are discharged before handling them. (!!!)

470 uF/16V does seem a bit overkill to be honest, so I wonder if they might be what is stated on the caps as they are also quite bulky.
Just google for some examples to see if those match the dimensions of what is placed on your board.

3.3uF at 400V is also quite big (physical dimensions), so maybe check the dimensions of that one too based on what you can find here: https://nl.farnell.com/c/passive-compon ... ating=400v
All are about 8mm diameter, 12 mm height. So not too bulky,,

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Sonoff 4CH suddenly half-dead!

#16 Post by TD-er » 09 Jan 2022, 19:28

That's a believable size. See random first hit on Google: https://www.tinytronics.nl/shop/nl/comp ... ondensator

If you have some multimeter to test the capacity, you can verify whether they are roughly the same capacity as stated on the label.

When you don't have such a meter, you can still check it yourself.
See: https://www.digikey.nl/nl/resources/con ... e-constant
For example, when charging the capacitor via a 100k resistor, you have a RC time of 47 sec.
Meaning at 0.7xRC you should measure half the charging voltage over the capacitor. (starting at 0V)

manjh
Normal user
Posts: 516
Joined: 08 Feb 2016, 11:22

Re: Sonoff 4CH suddenly half-dead!

#17 Post by manjh » 10 Jan 2022, 15:47

TD-er wrote: 09 Jan 2022, 19:28 See random first hit on Google: https://www.tinytronics.nl/shop/nl/comp ... ondensator
That's the easy one to find... I have a much harder time finding the 3,3 uF 400V caps!

manjh
Normal user
Posts: 516
Joined: 08 Feb 2016, 11:22

Re: Sonoff 4CH suddenly half-dead!

#18 Post by manjh » 10 Jan 2022, 15:49

Also: how strict should I hold on to the capacity?
If the current cap is labeled 3,3uF, and I decide to squeeze in a 100uF (just to take a value), what would that do?

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Sonoff 4CH suddenly half-dead!

#19 Post by TD-er » 10 Jan 2022, 16:38

An empty capacitor acts as a short circuit when charging, starting at 0V.
So increasing the capacity will also draw a high current for a longer time.
Often there is some resistor in series with the capacitor just to limit the peak current. But its max. power dissipation is designed with the 3.3uF cap in mind, so it may blow if the peak current is maintained for a longer time.
Doubling capacity is often not an issue, but 30x as much may be too much.
It may also blow a fuse (if present).

Also 3.3 uF 400V sounds like a normal capacitor, where 100 uF 400V is more likely to be an elco (thus with polarity)
Make sure to replace with the same type of capacitor.

Another thing to keep in mind is the ESR value of the capacitor.
It is the apparent resistance of a capacitor. When a capacitor ages, this resistance will increase and thus cause more heat in the capacitor, which will speed up the ageing of the electrolyte in the capacitor, lowering capacitance, etc.
This ESR value also determines how much current you can draw from the capacitor.
So lower ESR may give you more room for getting away with lower capacitance (either selecting a smaller capacitor, or less prone to failing when it ages)
Try to find out what type of cap is used and try to at least match this ESR.

Never use a cap for a voltage lower than what you may expect. Higher rated voltage is OK!
For example, if you need a cap for 5V, you may use one rated for 6.3V, but if you use one rated for 10 or 16V it may have 2x ... 3x longer expected lifespan.

manjh
Normal user
Posts: 516
Joined: 08 Feb 2016, 11:22

Re: Sonoff 4CH suddenly half-dead!

#20 Post by manjh » 10 Jan 2022, 16:47

TD-er wrote: 10 Jan 2022, 16:38 An empty capacitor acts as a short circuit when charging, starting at 0V.
So increasing the capacity will also draw a high current for a longer time.
Often there is some resistor in series with the capacitor just to limit the peak current. But its max. power dissipation is designed with the 3.3uF cap in mind, so it may blow if the peak current is maintained for a longer time.
Doubling capacity is often not an issue, but 30x as much may be too much.
It may also blow a fuse (if present).

Also 3.3 uF 400V sounds like a normal capacitor, where 100 uF 400V is more likely to be an elco (thus with polarity)
Make sure to replace with the same type of capacitor.

Another thing to keep in mind is the ESR value of the capacitor.
It is the apparent resistance of a capacitor. When a capacitor ages, this resistance will increase and thus cause more heat in the capacitor, which will speed up the ageing of the electrolyte in the capacitor, lowering capacitance, etc.
This ESR value also determines how much current you can draw from the capacitor.
So lower ESR may give you more room for getting away with lower capacitance (either selecting a smaller capacitor, or less prone to failing when it ages)
Try to find out what type of cap is used and try to at least match this ESR.

Never use a cap for a voltage lower than what you may expect. Higher rated voltage is OK!
For example, if you need a cap for 5V, you may use one rated for 6.3V, but if you use one rated for 10 or 16V it may have 2x ... 3x longer expected lifespan.
OK, this is very helpful. I checked, all three capacitors are elco. So I will try to get the right types. I'm in touch with someone at Elektronica-componenten.nl, hopefully will get the right types for a reasonable price. (also found them in China, but delivery outlook is april... )

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Sonoff 4CH suddenly half-dead!

#21 Post by TD-er » 10 Jan 2022, 17:27

Just looking at the schematics here: https://wiki.iteadstudio.com/images/d/d ... HMATIC.pdf
On page 2 there is the power supply drawn.

It seems there are 2 of these capacitors (3.3uF 400V), which are indeed elcos.
There is a 10 Ohm 1Watt resistor to limit the inrush current when powering on the unit.
Thus the max current may still be huge, but only for a very short time. (tens of usec)

I don't see the 470 uF cap, but I do see a 330 uF.
So I guess they already upgraded this cap as the 330uF may be too low (or fail too soon) as a larger cap for higher voltage is more expensive.
One other note is that there isn't that much of capacitors/capacity on the 3V3 side.
There is a 10uF/25V present (C11 in the schematic) which should be more like 22uF according to the Espressif documentation.

manjh
Normal user
Posts: 516
Joined: 08 Feb 2016, 11:22

Re: Sonoff 4CH suddenly half-dead!

#22 Post by manjh » 10 Jan 2022, 18:06

Beside the three elco's already mentioned, I don't see that fourth one. The only "c"s that I can find are small surface mounted components, but I'm not sure if that is it.
I tried to make a few snapshots, hope it helps.
Attachments
20220110_175946[1].jpg
20220110_175946[1].jpg (885.28 KiB) Viewed 11722 times
20220110_175921[1].jpg
20220110_175921[1].jpg (796.23 KiB) Viewed 11722 times
20220110_175932[1].jpg
20220110_175932[1].jpg (765.79 KiB) Viewed 11722 times

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Sonoff 4CH suddenly half-dead!

#23 Post by TD-er » 10 Jan 2022, 18:42

C11 does indeed look like a capacitor, but I find it surprisingly small for 10 uF/25V
It is hard to see on the board, which side is + and which is -, so you cannot simply replace it by an elco for added capacitance.
You can also add an elco to some other spot on the board, between 3V3 and GND. I suggest to add 10uF or 22 uF at least rated for 16V (no idea why they used 25V rated ones on the 3V3 side, as there are enough caps rated for 10 or 16V, which are probably less expensive)


The capacitor next to the transformer (on the side where there are 2 next to each other) looks suspicious, so that's the first one to replace.
The top is bulged and not as flat as the other ones.

manjh
Normal user
Posts: 516
Joined: 08 Feb 2016, 11:22

Re: Sonoff 4CH suddenly half-dead!

#24 Post by manjh » 10 Jan 2022, 20:34

TD-er wrote: 10 Jan 2022, 18:42 C11 does indeed look like a capacitor, but I find it surprisingly small for 10 uF/25V
It is hard to see on the board, which side is + and which is -, so you cannot simply replace it by an elco for added capacitance.
You can also add an elco to some other spot on the board, between 3V3 and GND. I suggest to add 10uF or 22 uF at least rated for 16V (no idea why they used 25V rated ones on the 3V3 side, as there are enough caps rated for 10 or 16V, which are probably less expensive)


The capacitor next to the transformer (on the side where there are 2 next to each other) looks suspicious, so that's the first one to replace.
The top is bulged and not as flat as the other ones.
22uF/16V is a value that I do have, so I tried adding one to the gnd/3.3V connectors. No change.

Another fact: the unit does show up on the node-list of other ESPEasy units, so apparently that part of the communication does work!

Post Reply

Who is online

Users browsing this forum: No registered users and 42 guests