The Electrodragon Alternative


electrodragon[6]Part 1: At $6, the Electrodragon “WIFI IOT Relay Board based on ESP8266” looks like a force to be reckoned with, offering WIFI control over two 10 amp relays. But what about the SONOFF from ITEAD? How do they compare?

Making use of their own incredibly cheap power supply is one reason the cost is so low and the board looks on the surface to be well made and well thought out – but read on.

The unit uses what appears (from the antenna design) to be the ESP-12F module which, it is said, has a better antenna than previous models but is otherwise pretty much like the ESP-12E.

The two relay outputs are on GPIO12 and 13 respectively – with the status LED on GPIO16. The socket for a temperature sensor uses GPIO14 !!! That’s new – usually people use GPIO2. Oh, well.

In order to do the board justice I went off to their website and there seemed to be a fair bit of info available. Clearly the first thing I’d be interested in would be blowing my own software. The page refers to buttons 0 and 1 but on the board are buttons 1 and 2…  but elsewhere they clarify these as buttons 1 and 2. I had expected these would be used for reset and programming respectively and that as it happens is easy as a 6*2 way connector conveniently brings out RX and TX. In practice one of them does indeed go to GPIO1 for programming but you have to power cycle the board to start programming – that kept me going for a while… always read the manual.

electrodragonThe case of the module I received, it would seem, was one already available because the 4-way connection bringing out the power via the relays, is partially obscured by the case itself. Not a good idea when you’re messing with mains wires – and especially those able to take 10 amps – but wait – there are lots of thing they’ve gotten right – the neutral line is not only separated from the live by a gap but it is also on the other side of the board, but the two tracks bringing power right across the board from the mains to the two relays –  while being nicely isolated by an air gap which is GOOD, are WAY too thin to handle a total of 20 amps (2 * 10amp relays) or, IMHO. I’m happy with that as I’m only likely to want to power a couple of bulbs but it seems a bit daft to use a pair of 10 amp relays then keep the track so narrow – around 1mm.

The power supply claims to have all matter of things including temperature protection, overcurrent, overvoltage and short circuit full protection, high and low voltage isolation – and yet, it is a really small and simple looking, exceedingly low cost model available for little under £1 – do we believe the claims? Do they matter? If you’re powering only the relays there’s not much chance of getting an electric shock but the board encourages you to attach a DHT22 which means you could be in contact with wires – my only advice here would be never to touch them when this board is connected to the mains – and make sure no-one else can.  But why you ask, surely you’d put the DHT22 in the unit itself?  Not if you want any meaningful temperature sensing out of it – these devices HAVE to have air around them and not the warm air off a power supply. Really, don’t waste your time putting a temperature sensor inside this OR a SONOFF box unless of course you’re using it to see how hot the electronics get.

So, how was I going to test this unit – I noticed something about AT commands – but I gave up on that way of programming with ESP8266 chips a LONG time ago – regular readers will know that I generally talk to such boards by MQTT protocol using my own code as found in the Home Control 2016 project and the prize-winning (subtle) WIFI Touch Display project and this was to give me pause for thought as I use GPIO13 for status indication – as do the SONOFF units and the relays here are on 12 and 13.

Well, nothing should be set in stone so I spent the evening adding more commands to my code and added a function to allow for these Electrodragon units – strangely enough I’ve named the command “electrodragon” – if set to 1… we’re using these boards, if set to 0, we’re not! Simples.

Programming Electrodragon

So, I’d not realised this but reader Nathan tells me that the chip isn’t actually programmed other than what’s on the chip initially i.e. the AT command set. So that has to come off.

Above you see a picture of a typical FTDI – that is the little box that plugs into your PC or whatever and converts USB into serial signals. That box is wired as you see above to the connector on the Electrodragon – and the button I’ve highlighted is the one that needs pressing BEFORE AND DURING POWERON in order to put the Electrodragon into programming mode.

To program the board I did NOT connect it to the mains or to any output. I connected up my FTDI as you see above – now, the sharp reader might say “but that’s on the 5v setting by the link on the FTDI and won’t that break the board?” – I have to say that the vast majority of the information on the web says YES, but here’s why I’ve done it this way: firstly putting the FTDI in 3v3 mode means it has VERY little power to spare and in many cases you’ll end up with relays jittering and lights flashing and you’ll get no-where (that would be with the power (red) lead elsewhere of course – bottom right pin in fact on the Electrodragon), and secondly while I would never normally use 5v logic with an ESP8266, I have NEVER broken an ESP12 by using a 5v FTDI signal on the serial.  Serial from the Electrodragon incidentally to the FDTI is fine – it’s the higher voltage serial output from the FTDI to the serial in on the Electrodragon we’re talking about.  Your choice if you decide to copy me – but specifically using FTDIs that look like the one above – I have blown ESP12s WELL over 1000 times without doing them any harm. The alternative is a 3v3 power supply feed to the board and leave the power output of the FTDI unconnected. Your choice, your responsibility.

Remember I use my own software that needs to talk to MQTT and have access to a WIFI access point.

For the software you need to go to the home control 2016 blog – there is source code for the Windows Unofficial Programming Environment or a pair of ROMS for those unable to do this (and to be fair it took me a while to get to grips with using the SDK etc)  – RBOOT.BIN to 0x000000 and ROMX.BIN to 0x002000 using your preferred tool. The ROMS are in the root of  Once programmed, disconnect and reconnect the FTDI.  Most likely you won’t see the light flashing on the board. Instead you’ll hear a relay flashing on and off quickly – that’s because by default, GPIO13 is an indicator!!!!  At 115,200k send serially the commands:



The relay will stop clicking but the indicator won’t yet flash – and now reboot – the indicator on the board should start to flash and these commands will now work…  {out13:1}, {out13:0}, {out12:1}, {out12:0} – so that’s your two relays working – you’ll then need to go through the instructions to set up your WIFI access point and MQTT details – that’s done by a web interface or just as easily you can do it by serial just as above. Once that is done – Bob’s your uncle.

So in my case:











reboot (i.e. pull the power and reconnect.

Now WHY does that have to be complicated by adding a second SSID? Because my software handles two of them for backup and while you’re messing about it is trying to connect to a default SSID you don’t have – there’s a chance by the time you get around to it that it is trying to connect to the SECOND SSID.  If you can’t be bothered to put the second one in – eventually the unit will get around to trying the first one again.

I’m calling my units “electro1” and “electro2” as I have two of them – they are now all programmed up and ready to go. Just to be sure I was not missing anything I left one on at midnight last night and as expected it operated flawlessly.

NEXT: Plug in the power – I don’t expect any surprises. Nathan and I have both passed comment about the power – from here on it is all your responsibility.


92 thoughts on “The Electrodragon Alternative

  1. My current issue is Electrodragon products documentation and revision tracking:
    I have R1.1 with the blue relays then purchased the R1.5 version with the black relays and now they have new version of both. The New version of the blue relays is ?? they haven’t posted the revision number! The R1.5 version with the black relays is suppose to be R1.6 now with a means to isolate the i2c lines from the pull-ups. BUT the ‘NEW’ R1.6 board I just received is labeled R1.5 yet the layout is different from the first R1.5 versions I purchased and on both they do not have the pads to isolate i2c. At electrodragon’s website they have but have removed all other version of the schematics!
    They have the L (HOT) not switched with N (neutral) switched. Simple issue, reverse the incoming connection so HOT is N and L is neutral, in the US that means Black to N and White to L. Of course you will unplug the board from A/C before reversing the wires. 🙂

  2. “but that’s on the 5v setting by the link on the FTDI and won’t that break the board?”
    The A/C to D/C converter on the electrodragon product provides 5 volt D/C, by hooking a 5 volt supply to the electrodragon product 5+ pin you are feeding the 3.3 volt electrodragon product on board regulator which provides power to the ESP-12.

  3. What do we all think of attaching a DS18B20 on flying lead (like to a sonoff; I note that in the schematic, the low voltage does seem to be isolated from the mains (not as in the Slampher, where the 5V is directly connected to LIVE)?
    When I get the DS18B20s, I’ll investigate if the stainless encapsulation is deliberatelyt connected to gnd; but there is no info on if it is specifically isolated.

  4. Hi Peter,
    Great article, I am also running MQTT at home, with my own firmware over OTA on the Electrodragon boards. I do have a question, I uploaded the firmware by connecting the pins and since I am used to doing this only the first time I installed the Electrodragon boards in a difficult to reach place. Afterwards I wanted to add another feature to the firmware but I don’t seem to be able to program them via OTA. The authentication works but the upload doesn’t. Do you have experience with ArduinoOTA and the Electrodragon boards ? Is it because their flash button needs to be pressed ?

    1. I tend not to use the Arduino environment – preferring C and the Exclipse environment using the official SDK – however it does sound like a flash button issue – this needs to be pressed before you hit reset (or remove power) and released AFTER that.

      1. Hey Peter,
        I think so too, any idea how this can be solved without pressing (like with NodeMCU) ? The module is situated in a very bad place (even if it is just for pressing a button), and you have to dismantle the entire case just to find the button.
        Greetings Vincent

        1. Hi there,
          Thanks for the tips in your blog, help quite a bit.
          I’m a little confused though with regard to the wiring of the relay board. I’ve attached a pic of the version I have and it has a different wiring layout for the live and neutral cables, to the pinout you’ve described. Live is on the outer and neutral is on the inner connectors for the output terminal. The live terminals are also passed straight through ie no switching. Is this correct? I thought live should be switched? I also have an earth cable which I’ve just passed straight through to the devices….

          1. Did you get an answer to your problem? i have just purchased the same board and confused as to why it would be switching neutral leaving live runing straight through! dont really want to try and reverse the polarity and potentially blow the board!

              1. Well i’m clearly not an electrician so i cant tell if the directly powered step-down transformer can handle either polarity.
                But if its not designed for it then i’m surely going to melt some bits?!
                I notice that the separate transformer PCB is also clearly marked with L&N to match the main board which i still cant understand why you would switch Neutral rather than Live.

                So i’m just asking if it will be ok to power the opposite way round to what both boards are marked as (this is R1.6 btw). We are rather scrict in the UK with what is live and what is neutral. The board would certainly not get RoHS Compliance in the UK.

                1. The only reason it is strict in the UK is because of what we for reasons I’ve never fathomed out do with the neutral line – the power supply could give two hoots which way around the live and neutral are. You want the live (in the UK at least) to be on the switched side purely and simply from a safety perspective.

                  If you don’t feel they are “compliant” enough – of course – you don’t have to buy them.

                  If you have a board which you are SURE is switching on the neutral then perhaps an email to the company is the sensible approach as they may have made a mess up of a batch of boards… or their experience may be in Europe – here in Spain there is no difference between so called live and neutral – or if there is – no-one takes any notice as the two-way plugs can be plugged into the wall either way.

    2. Hi, I also experienced this same problem, but after some analysis, I discovered that the issue was in my prior firmware upload configuration.
      Seems that the OTA needs some free available space on the SPIFSS in order to upload the new firmware before its actual update.
      So, to me the solution was to upload it again, in classic manner through serial, but now, being sure that having applied the right configuration of SPIFSS.
      In my case, it was needed to use configure the flash size to 4M (3M SPIFSS).
      After reflashing with this configuration, keep it to every new OTA upload and enjoy it.

  5. Hi,
    First sorry for my bad english…

    I’ve buy 1 electrodragon because i thought it was like Sonoff…
    And now after reading all your comments, i would like to know 2 things

    1- Can i use ‘ewelink’ to drive the wifi iot ?
    2- Is it possible to control the motor of a shutter ?

    1. It is like Sonoff in that it controls a relay – I stopped using Electrodragon because simply the Sonoff is a better deal. No idea what (1) means – (2) depends entirely on the motor. Check out current requirements and remember that a motor is inductive so make sure you have plenty of margin.

Comments are closed.