Basics: Project 109e
Project name: ESP8266 ESP-12E module with Tasmota firmware and 8 channel relay module
Tags: ESP8266 ESP-12E module, Nodemcu v3, Lolin, SONOFF, Tasmota Firmware
Attachments: NONE
In this project, you needed these parts (Dear visitors. You can support our project buy clicking on the links of parts and buying them or donate us to keep this website alive. Thank you):
1. Micro USB cable 1 pc

2. ESP8266 ESP-12E module 1pc

3. 8 channel 5VDC relay module 1 pc

4.Jumper cables F-F,F-M

5.Breadboard 1 pc (optional)

General
We will learn how to make 8 channel 5VDC relay module controlled over WiFi with the SONOFF Tasmota firmware on the ESP8266 ESP-12E module.
ESP8266 ESP-12E module with SONOFF Tasmota firmware can be integrated with various IoT platforms. It’s also possible to access the Tasmotized ESP8266 ESP-12E module via its embedded WEB server (either as AP or with DHCP or static IP address) using a Web Browser.
To access the Tasmotized ESP-12E module from the Internet you need to port forward your router to redirect to the Tasmotized ESP-12E module Web Server.
Understanding the Tasmota
Tasmota is an alternative firmware for ESP8266 based devices with easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX. Written for Arduino IDE and PlatformIO.
It was initially written for Sonoff devices, but it supports devices from many other brands like Electrodragon, MagicHome, AriLux, Blitzwolf, and Allterco. You can also install it on development boards like the Wemos D1 mini and the ESP8266 NodeMCU.
Understanding the 8 channel 5VDC relay module
You can read more about it here.
Understanding the ESP8266 ESP-12E WI FI module (LoLin NODEMCU V3)
You can read more about it here.
Signals and connections of the 8 channel 5VDC relay module
You can read more about it here.
Signals and connections of the ESP8266 ESP-12E WI FI module (LoLin NODEMCU V3)

TX – transmit pin. GPIO pin
RX – receive pin. GPIO pin
3V3 (or 3V or 3.3V)- power supply pin (3-3.6V).
GND ( or G) – ground pin.
RST – reset pin. Keep it on high (3.3V) for normal operation. Put it on 0V to reset the chip.
EN – Chip enable. Keep it on high (3.3V) for normal operation.
Vin – External power supply 5VDC.
D0-D8 – GPIO (General Purpose Input Output) pins
D5-D8 – SPI interface
D1-D2– I²C/TWI Interface
SC (or CMD) – (Chip Select) – the pin that the master can use to enable and disable specific devices. GPIO pin
SO (or SDO) – Master In Slave Out (MISO) – SPI communication. The Slave line for sending data to the master. GPIO pin
SK (or CLK) – SCK (Serial Clock) – SPI communication.The clock pulses which synchronize data transmission generated by the master. GPIO pin
S1 (or SD1) – Master Out/Slave In (MOSI). SPI communication. The Master line for sending data to the peripherals. GPIO pin
S2 (or SD2) – GPIO pin
S3 (or SD3) – GPIO pin
VU (or VUSB) – external power 5VDC.
A0 – ADC output.
RSV – reserved
Wiring

Nodemcu 1.0 module 8 channel 5VDC relay module Tasmota firmware
GIO0 (D3) IN8 Relay 8 (28)
GPIO2 (D4) IN7 Relay 7 (27)
GPIO4 (D2) IN6 Relay 6 (26)
GPIO5 (D1) IN5 Relay 5 (25)
GPIO13 (D7) IN4 Relay 4 (24)
GPIO14 (D5) IN3 Relay 3 (23)
GPIO15 (D8) IN2 Relay 2 (22)
GPIO16 (D0) IN1 Relay 1 (21)
G GND External power supply
VIN VCC External power supply
Step by Step instruction
1.Preparing, flashing and testing SONOFF Tasmota Firmaware. There are several methods to do it:
Basics project 109b ESP8266 ESP-12E module – Another way to flash with SONOFF Tasmota firmware
Basic project 109a ESP8266 ESP-12E module – Flashing Tasmota Firmware with Arduino IDE
2.Configuring SONOFF Tasmota firmware an doing wiring
1.To find ESP8266 ESP-12E module IP address, download, install and open Advanced IP scanner software. Open any web browser and type http://yourIPaddress (in our case http://192.168.1.168)

By default, Tasmota Firmware fashed device will be in Sonoff Basic. You need to change it to ‘Generic’ in the Configuration menu. Click on Configuration and choose Configure Module.


2.Select the board as Generic and click on Save. The device will restart.
3. If you click on Configuration Module again, you will see more GPIO options.You can select the GPIO Functions now. Depending on the GPIO setting the option will appear on the homepage like Relay, Button, Switch,DHT and so on.

4.Do wiring and configuration.


5. Congrats!! You have done it. You can control your relays by pressing the blue buttons – 1,2,3,4,5,6,7,8.

Summary
We have learnt
Thank you for reading and supporting us.
Libraries:
- No libraries required for this project
Project resources:
- See attachments on the beginning of this project description