ESP8266 relay module review – Yunshan WiFi relay

After scouring eBay for a packaged esp8266 with 220V 10A relay, two products were identified:

  • Yunshan WiFi relay; and
  • LC Technology relay.

As is usually the case, finding a schematic and specifications is very difficult and the sellers were of no help (no surprises).

The LC Technology device was offered with indistinct pics that hinted it had a 8Mb flash chip, ESP8266EX processor, and a STC 15F104 8 bit processor on board for some unidentified purpose.

A schematic was eventually located for the Yunshan board, and from pics it appeared to have a 12E module on it which hinted the flash size.

A Yunshan module was purchased for about $10 posted, and it was indeed a 12E with flash-id 4016, so 4MB of flash memory.

The board does not incorporate a USB-TTL adapter which is a nuisance not just requiring an external adapter for programming, but there is no integration of the RTS and DTR signals as in the NodeMCU devkit. Adding a quality USB adapter (eg CP2102) would not increase the price a lot, you can keep the CH340G etc).

It turned out that the reset pin is wired to the 3.3V supply in a way that is difficult to break, so it is not very easy to separate the pin from supply. That being the case, the simplest way to get it to reset is to bounce the power. This design shortcoming prevents use of the deep sleep mode.

This is a classic half-baked Chinese design.

It appears that a thin track from the module RESET pin (1) supplies 3.3V to R9, so cutting the track to disconnect RESET from 3.3V and insert a pullup resistor (say 12k) means at least cutting the track to R9 and separately supplying power to R9.

Whilst there is ready access to 5V on the board, there are no access points for 3.3V. A single male header pin was bent into an L shape and soldered to the tab on the 3.3V regulator to tap off 3.3V for test and development purposes.

Recognising that this will be quite inconvenient to program, a small helper was made using a PIC12F510. The helper will lower the FLASH pin after the LUA interpreter is running, and hold it low for a selectable period to signal the init.lua script to drop into LUA prompt for loading etc. (Reset helper for NodeMCU ESP8266 modules)

First project is to connect a DHT22 temperature and humidity sensor to this module, and to use local logic to control a fan when humidity approaches condensing level. The module will also report temperature and humidity to an MQTT server similar to ESP8266 IoT DHT22 temperature and humidity – evolution 2 for central reporting.

Modifications to allow deep sleep

The module was modified to free the RESET pin from the 3.3V rail.

Above is the modification to allow deep sleep and make an external connection to RESET.

Above is first step of the modification. The 3.3V rail cleaned of the mask near pin 3 and cut to insert a pull up resistor, and the track from pin 1 of the ESP module to the left to R9 is carefully cut near pin 1.

Above is a view of the modification. A 1n34A diode is connected cathode from pin 4 to anode on pin 1 to allow the deep sleep mode to work. A 10k RESET pull up resistor is soldered over the cut track. The blue wire supplies 3.3V from pin 8 to R9. The brown wire allows external connection to the RESET pin, and the wire is zip tied to the diode to act as a strain relief.


A design that is not well thought out, designed in defects include tying RESET to +3.3V, lack of ready access to +3.3V, no header pin access to RESET.

There is basically no header pin access to GPIO pins for other accessories making it less flexible.

An external power supply is needed, not integrating a 220V power supply is another missed opportunity.

Adding a CP2102 USB adapter would make for a much better product for developers.

It is a classic Chinese half baked design, cheap but be prepared to have to hack the board.

To make a device with sensors, you will need a hacked relay board and power supply. You might be better of with a standard NodeMCU dev board with integral CP2102 USB adapter and lots of ports on header pins, a power supply and a separate 5V / 220V relay module.


Reset helper for NodeMCU ESP8266 modules