Well, I can confirm that, for Japan anyway, delivery from ITEAD Studio is much faster than the normal Middle Kingdom standard (wait, wait, wait some more, then wait). I ordered some bits and pieces from them on Monday (which was the first normal work day for them after their new year’s holiday) and the parcel arrived on my doorstep here in deepest, darkest Nagano at lunchtime on Saturday. I had to sit down and have another cup of tea.
I was pleasantly surprised by the fast delivery and also fairly happy with the contents of the parcel. I’d ordered a few of their AC to DC isolated switching supplies based on the iW1700 chip, along with a “Sonoff” ESP8266-based WiFi mains switch module (the non-RF version …it doesn’t have the optional 433Mhz card or a key-fob remote control). I expected the PSUs to be small and I wasn’t disappointed, but what did surprise me was how tiny the Sonoff unit was.
I’ve got very small hands, by the way (and probably none to clean either, come to think of it), so just image that it’s about one third smaller than the impression you’re getting from the photo. The screws in the mains connectors are too small for a general-usage small bladed screwdriver and need a smaller “precision” type. The box which the Sonoff came in was actually smaller than the boxes for the (tiny) switching PSUs, which had me thinking that they’d mixed up my order quantities, until I opened them.
I haven’t used either the Sonoff or any of the PSUs yet, so this is very much just first impressions. So first, here are the PSU photos (click on them for larger images):-
From the top you can see the switching transistor nestled between the transformer and the 400v electrolytic capacitors. The pins closest to the camera are the output side, with the middle connection labelled as 3v3. However, there is actually no pin in that position and, although there are pads for a regulator on the bottom of the board, it isn’t populated either. It looks as though it would be fairly easy to add a regulator in there, but as there are no pads for capacitors, it would be just as easy to put the regulator and caps on the target PCB instead.
On the photograph of the bottom side you can clearly see the slot underneath the transformer between the primary and secondary side which also runs across almost the full width of the board, providing galvanic isolation between the mains input and 5v output. The iW1700 is the six-pin chip you can see underneath the transformer, but on the primary side of the isolating slot. It gets current feedback from a sense resistor connected to the emitter of the switching transistor and voltage feedback from a separate primary-side winding on the transformer; there is no feedback path from the secondary. The two larger resistors at the extreme right of the photo are marked “155” (that’s 15 + five zeros, or 1.5 megohms) and they’re wired in series to give a very high impedance “bootstrap” supply to the iW1700 (this one of the area where the ITEAD design differs from the reference design – the reference uses a smaller limiting resistor and a “normally on” depletion mode MOSFET connected to the “active start-up” pin of the iW1700, so that once the power supply has bootstrapped itself the power flowing through the bootstrap resistor can be turned off). The big, square, four-pin block next to the input pins is the bridge rectifier.
This isn’t a particularly efficient supply for a switcher (running, according to the design sheet, at roughly 75 to 80%, depending upon the combination of input and output voltages), but it does have a remarkably low quiescent current under no-load conditions, so is pretty good for something like a phone charger where the load will suddenly drop off (at full charge), but where the unit itself may remain connected to the mains supply for long periods. Similar conditions might be found when providing the supply to an ESP8266 which operates normally for a while and then drops into sleep mode, so it’s no huge surprise to find that ITEAD use virtually the same circuit in their “Sonoff”, ESP8266-based WiFi mains switch. Looking at the photos of the (shockingly naked) Sonoff we see some very familiar components (again, click for larger sized images):-
Looking at the bottom side of the board, you can see the square block of the bridge rectifier at the top, left-hand corner and then slightly below and to the left our familiar “155” resistors (labelled R16 and R17) with the 6-pin iW1700 chip sitting over to the left and slightly higher, labelled as U12. The right hand side of the board is almost entirely given over to the ESP8266 (note the antenna at the extreme top right) and the tinned bus bars connecting the output screw-down connector to the relay and input side. The empty row of holes slightly to the right of centre bottom are where the 433Mhz RF module sits (in the more expensive remote control “RF” version). Over on the photo of the top side of the board the same row of empty holes can be seen slightly right of centre closer to the top edge of the board. Just below them is an unpopulated pad for a QFP chip, labelled as U5. That’s for the 8051-based “Busy-Bee-1” chip, which appears to handle the control of the 433Mhz module on the “RF” version.
Further down at the bottom of the photo and further to the left of centre is the (yellow) transformer for the power supply and you can clearly see the switching transistor sitting just to the left of it. The big black box with the white paper label is the relay which switches the output load.
Backing up just a little bit, you’ll note that I said I was “fairly” (not “ecstatically”) happy about the contents of the parcel and the photo of the bottom of the Sonoff board shows why. If you compare the photo of the PSU board and the PSU section of the Sonoff board you’ll notice a couple of things. First, the PSU PCB has an isolating slot between the primary and secondary sides of the transformer, while the Sonoff doesn’t. Second, the iW1700 chip is under the transformer, but on the primary side of the slot on the PSU PCB and, while it’s in the same approximate place on the Sonoff, it has been rotated 90° so that the tracks from the pins now come out towards the secondary pins. Mmmm, not so good.
Don’t get me wrong. This is still an isolated supply (the transformer and the winding on the relay both provide isolation to the ESP8266 circuitry), but I don’t believe that the “Sonoff” would pass regulatory inspection in the U.S. or in Europe (the fact that it has screw-down terminals instead of a molded-in power outlet probably makes the PSU issue a moot point, anyway).
Would I use the Sonoff myself? Heck yes! I’ll probably buy some more of them, too. I’ve built much worse things myself (think full-wave rectified 240-volt mains with thyristors on stripboard and run away, screaming), although admittedly, I didn’t sell them as products. The Sonoff will enable people with minimal knowledge or experience to put together an IoT set-up relatively safely (without having to resort to the horrible mix of stripboard and mains) and, whatever its faults, it is orders of magnitude better than any of the duct-tape-and-hot-glue IoT instructables out there. Going back to my initial impression, it’s also small. There are lots of places where a Sonoff would fit in unobtrusively (behind your TV, in an equipment cabinet) where it would save the trouble of needing to be physically there to simply power-cycle some errant piece of electronics. It looks like a winner to me and that’s even before you factor in the ability of most ESP-aware folks (that’s you) of being able to reprogram the on-board chip to talk MQTT.
Update – See the newer post “No-Phone Sonoff stuff” for more information on loading an MQTT capable package onto the Sonoff.