Thermal Camera Diagnoses Thermal Issue On A Sonoff Switch

No matter what your experience level with troubleshooting, there’s always at least a little apprehension when you have to start poking through a mains powered device. A little fear is a good thing; it keeps you focused. For some, though, the aversion to playing with high voltage is too much, which can cause problems when something fails. So what do you do when you’re reluctant to even open the case? Easy — diagnose the problem with an infrared camera.

[Bald Engineer]’s electrophobia started early, with some ill-advised experiments in transcutaneous conduction. So when his new Sonoff WiFi switch failed soon after deploying it to control a lamp in his studio, popping the top while it was powered up was out of the question. The piquant aroma of hot plastic was his first clue to the problem, so he whipped out his Flir One Thermal Camera and watched the device as it powered up. The GIF nearby shows that there was clearly a problem, with a bloom of heat quickly spreading out from the center of the unit. A few IR images of the top and bottom gave him some clues as to the culprits, but probing the board in those areas once power was removed revealed no obviously damaged components.

[Bald Engineer] hasn’t yet gotten to the bottom of this, but his current thinking is that the NCP1117 regulator might be bad, since it rapidly spikes to 115°C. Still, we think this is a nifty diagnostic technique to add to our toolkit, and a great excuse to buy an IR camera. Or, we could go with an open-source thermal camera instead.

[via Dangerous Prototypes]

47 thoughts on “Thermal Camera Diagnoses Thermal Issue On A Sonoff Switch

    1. No, just hold the PCB to your earlobe, this part of the body is super sensitive to thermal radiation. (Not recommended when AC is present). Likewise a singing power supply, coil, transformer. Use a piece of small hose as a stethoscope.

        1. I read about this in early elementary school and the application was for showing how bending a paper clip generated heat. I didn’t have a paper clip so I used a coat hanger…

  1. “his current thinking is that the NCP1117 regulator might be bad, since it rapidly spikes to 115°C”

    My first thought would be that there is too much load current, not that the regulator itself is faulty.

    1. this. its like when I see a reverse biased power diode has melted its own solder and slid off the PCB an an automotive application, the diode got hot doing its job. it was the person who attempted a reverse polarity jump start thats the problem lol

    2. This article would have been much more useful (and complete) if it also included the final fault diagnosis. Right now it’s mostly just “thermal camera…cool!”.

      When you say load current do you mean the actual AC load, or the DC load downstream of the regulator? If the problem was AC load, the image would show heat on those traces or the relay contacts. If the latter, my first question is: does the ESP IC still work? The article suggests it seemed to work til it got plastic-meltingly hot. In the comments, one user mentions just trying to apply DC power “in front” of the regulator so you can power up the reg and ESP that way. Another way would be to solder in a socket in the spot for flashing, and try powering with 3.3v there. Steps like this should quickly isolate the issue without having to start desoldering and swapping parts. Besides, if it’s new, you want the vendor to replace it, so you don’t want to mess with it too much…

      It is kind of cool to get an idea of what can be done with a thermal camera, and i know that they are getting more use in the field for finding hotspots. Still, this is kind of a toy example, and the camera really doesn’t provide any more info than what your nose or the back of a finger could provide.

      1. Added thought: if the regulator was being fed with too high a DC voltage (or some AC), that could cause it to overheat too. So a ‘hot’ (with AC connected) measurement across the regulator input would be the way to confirm this. Extreme care and if possible an isolation transformer would be required.

        If you have two identical AC transformers of moderate size(eg 120 v to 12v @ 1A or more) you can make a low-current isolation transformer by connecting the two secondaries together. In other words – 120v->12v->120v.

          1. @[K-WW], do you mean two separate 120 V primaries?
            At first I was imaging a center tapped 240 V primary, which wouldn’t work because there would be a common connection (non-isolating) between them.

    1. The same as here could be done with IR thermometer. And also “good enough” thermal cameras have come way down in price to pro/hobby levels. Flir TG130 handheld and Flir ONE and Seek thermal smartphone add-ons are go for about $250 so in the price range of a brand name multi meter or cheaper than entry level oscilloscope like Rigol 1054Z.
      I even have it integrated in my smartphone(CAT S60) where I noticed how your mentality adapts around always having a thermal camera with you when debugging electronics, when water line freezes, when you just wont to know how hot something is.

  2. ” The piquant aroma of hot plastic was his first clue to the problem, so he whipped out his Flir One Thermal Camera and watched the device as it powered up.”

    Professor always said your senses are the first test tools to try. But the infrared is handy, especially if you’re dealing with construction.

  3. Looks like one of the sonoffs that were subject to recall. The relay tracks are too thin, eventually the plastic melts right through. It’s pretty dangerous – especially if the switch is in the vicinity of soft furnishing or fixed to a wooden surface.

    1. The Sonoffs that were subject to recall had insufficient extra solder blobbed onto the AC load-carrying traces, which could lead to them heating up when the Sonoff was controlling a load close to the max rated. (So, no that’s not the issue with this one)

      Big fat caveat – most of these devices do not carry any certifications or approvals (EU, CSA, UL, etc) so that’s one clue that you should be careful where and how you use them. For maximum protection, these should be inside of a grounded metal enclosure. If you’re going to use them at near rated load (10A I believe), I would consider soldering AWG#14 solid copper wire along the AC-carrying traces.

      I have a bunch; I just use them with modest loads ( < 300W ).

  4. This reminds me of a country boy Marcus that came to the city, who used to test
    Switch Mode Power Supplies back in 1989-90 by putting his 2nd, 3rd or 4th fingers
    of his non dominant hand hard on the smps chip/BJT’s/Mosfets whilst powering up.

    He was so ensconced in his method reaching for the power button on his floating power
    board the moment his fingers got singed and I say singed as he smoked dope now and
    then hence why he couldn’t rely on his best fingers all the time, as in he’d already
    “used them up” annoyed they weren’t as sensitive any more funny that :/
    Suffice to say he was pleased I offered a foot switch as his floating power
    board couldn’t always be switched off quickly enough and now and then he had
    tried to use his bare as secondary temp sensors on his new mosfet audio amp,
    adding even more instrument complication – though he did retain his toes !

    Geesh !

  5. Aren’t these Sonoff things about $20? Fun to take it apart and see what is wrong, but hardly worth the time or effort if you really want to fix it to save some money.

    1. My thoughts exactly.

      Additionally these are often mentioned as great hackable devices.
      But there’s also a number of teardowns that show bad and dangerous design.
      Recall the traces are too thin. There’s a risk of arching if i recall well.

      Seen a few melted devices. I would never use these Chinese firehazzards unattended in a socket.

      1. They’re around US$5 or $6 now.

        I agree they are a bit scary to use at full power, but at lower loads, and with that sweet sweet reprogrammable ESP8266 onboard… they’re pretty useful. Mount them inside a $2 outlet box for the best protection.

  6. Thermal cameras are invaluable tools for electronics. I remember when I bought one I decided to take some reference photos from something that was “working” and had been working for about 5 years. Taking the photo I noticed a resistor on one section of the board was sitting somewhere around 140 degC. 5 years the damn thing had been running, cooking away, all because I grabbed the wrong resistor when I built it. At the same time I measured very different temperatures in the +ve and -ve supply heatsinks, on a device that should have a perfectly balanced load on thepowersupply.

    I also a few years later when building a comparator circuit used a thermal camera to identify that I grabbed an OPA2227 instead of an OPA227. Hooking the positive rail to an OPAMP output does wonderful things on a thermal camera that I otherwise didn’t see (though in this case at least the circuit wasn’t working so I knew something was wrong).

    1. Reference photos are actually a great idea. Reminds me of the old Sams Photo-fact series that gave you voltages and waveforms at various points. Having IR signatures would also be valuable.

  7. Ah, the use of freezer spray to locate problems and of course freeze that annoying blue bottle only to watch it take to the skies again 10 minutes later. Wasps don’t fare as well mind but are equally as fun to freeze while you’re supposed to be working!!

  8. We had ultrasonic cleaner that when started released a lot of smoke through cooling holes but once open looked fine – no carbon, no smoke marks. First idea was to leave it running until somethings burns and we can visually locate it (here people tend to be “creative”) but I suggested to use themralcamera as it must locate hotter spots – so we found that tantalum capacitor was already burned but we missed it.
    What I mean is it’s good not only to have IR camera but also remember it’s useful.

    1. Oscillating op-amps (that were not designed to be oscillators) get hotter than they should. Something to keep in mind when pointing a thermal camera at an analog circuit.

Leave a Reply to Ken NCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.