Ralph S Bacon

MicroControllers, Electronics and IOT

ESP8266 WiFi Relay Woes

Picture of ESP8266 WiFi Relay

ESP8266 WiFi Relay

The simplest of items can cause the biggest issues sometimes. Here we have an ESP8266-01 module plugged into a simple relay controller.

The relevant AT instructions have been sent to the ESP8266 – all well and good. I’ve downloaded the mobile phone app to control it. What could possibly go wrong?

Well, the phone app simply tells me “Connection error!”. Yet when I try and connect via my browser the connection details are immediately shown in the ESP8266 monitor window, so there’s nothing really wrong with the ESP8266 connecting to my wifi, nor my browser connecting to the ESP8266.

It’s that phone app that is the root cause of my issue here. What’s more frustrating is that the ESP8266’s code is not available – that is, I can’t just upload something else as I can’t easily find out what it is telling the relay controller.

So simple. So frustrating!

[Update 3rd March 2018 13:50] Fixed! All will be revealed in due course [\End Update]


10 replies

  1. My 4 modules came in today but they are 3 volt. Not 5 volt as in the description.
    They are different from yours, as there is no TX/RX on the board. It looks like I will have to program them “Off Board”


    • Remember that the ESP8266-01 boards themselves are always 3v3, Darrell, (unless they have a voltage regulator on-board, which mine don’t). The only 5v connection I have is on the relay module that does then go via a regulator to provide 3v3 to the ESP (and 5v to the relay).

      As it happens I didn’t program the ESP via the RX/TX on the relay board as they are also connected to the STM8S003 and I didn’t want addition problems because of this, so I too programmed the ESP “off board”. Easy to do if you have a USB-to-Serial adapter or even better with a dedicated ESP8266-01 programmer like I will show in the follow-up video.

      Your board is different from mine; the orientation of the ESP is different and you have an RST button, but it is simpler (and therefore, I suspect, better for its intended purpose). Yours has a relay, driver transistor, protection diode, a couple of resistors for the transistor and an LED. Basically, what I thought my board would be like, without the added complexity of the STM8S003. In which case I wonder if yours uses the GPIO2 pin to drive the transistor base directly instead of all that serial malarky? Seems highly probable.

      Keep us updated! If these boards are good I might get a couple.


  2. Looking forward to your video on this one Ralph. Best of luck on the Blog.
    One question I have about this board, is it using Esp-01 ? Perhaps you can share a link of where you got the board if possible.


  3. https://www.hackster.io/makerrelay/esp8266-wifi-5v-1-channel-relay-delay-module-iot-smart-home-e8a437

    This gives good data on the physical device. Read the comments some look interesting (Pawel) I don’t understand the app pictures or why need a RS232 link to the main board from the ESP when it could drive the transistor buffer for the relay. It looks like the ESP is in LUA running AT commands.

    Personally I would reprogram the ESP and connect it to the transistor and use its web address with /on and and /off and select the relay. It would run off a browser on the phone or computer no app required or a simple app that someone could write.

    Liked by 2 people

    • Thanks Graham! You’re the first poster on my new blog too.

      Regarding that link, it seems to be a copy of the official documentation from Espressif, with the same (non working) result. BUT, my deep investigations and intensive research (Ok, I just went to the manufacturer’s webpage) led me to the correct solution. I’ll reveal all in a future video.


    • You’ve been mentioned in my video on this Graham. Nope, sorry, too late to cut it out now. Very useful, and then again not. But it all led me to the right solution (insofar as there was one, anyway). Thanks for the post.


Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

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