Home Automation with Arduino and ESP8266 using Tuya IoT Platform

Updated: May 28

Hello everyone, welcome to the article. We have already progressed and are still progressing towards becoming a complete digitally connected society. Humans are now connected better than ever before wherever they go, whatever they do. It is indeed important to constantly keep improving the standards and methods of this worldwide connectivity through the Internet of Things (or) IoT.

Today we are exploring something really really exciting. Today we will explore a lot of what Tuya IoT has to offer in the space of IoT as its name suggests and smart connectivity in general. We will not beat around the bush at any part of the article and will quickly go over what a Tuya Sandwich Evaluation Kit is and what it has to offer in itself and how it can easily be used by anyone. Then we will also use Tuya's IoT platform to showcase some real and practical solutions that it provides. Let's dive right in without further ado.

Bonus Fun Fact: Now, you can be a part of the Arduino Beta Test Program with Tuya and win some really really exciting gifts worth $7.5 and even more if you provide your valuable feedback!

1. About Tuya IoT and Tuya Sandwich Evaluation Kit

Tuya IoT Platform is a powerful platform to help brands, developers, retailers, and manufacturers get into the IoT/Smart Home space and quickly grow their products and businesses. Some many products and appliances can be customized on Tuya IoT. There are some pre-built products as well which are based on the Tuya Platform and can prove to be very useful in our daily life.

Now, let's dive into all there's to the Tuya Sandwich Evaluation Kit. This is Tuya's wonderful development platform which is heavily compatible with the Arduino ecosystem. Tuya Sandwich Evaluation Kit as its name suggests is like a sandwich, assembled layer by layer, which allows you to quickly implement a complete IoT based environment in a very hassle-free manner. Any Arduino Ecosystem-based device can be integrated through the Tuya cloud modules of various communication protocols such as Zigbee, BLE, Wi-Fi, and NB-IoT. To sum it all in a single line, Tuya Sandwich Evaluation Kit is going to make your IoT life easier than ever before. Let's have a closer look into the various components involved to get a better picture out of it, shall we?

Tuya Developers: Tuya for Developers

2. More About the Components

Let's go over the components of the Tuya Sandwich Evaluation Kit:

  • 2.1. Power Supply Board: The Power board provides stable and continuous electricity for the development kit to strengthen the power supply capability of the master control board. It can also output different electrical levels for device debugging.

  • 2.2. Microcontroller Board: The microcontroller board can input and output peripheral information and send out commands and is heavily compatible with the Arduino ecosystem.

  • 2.3. Communication board: The wireless communication board provides various networking capabilities to the master control board. The Wi-Fi communication board with voice capabilities supports local far-field voice wake-up, online speech recognition, and device control.

  • 2.4. Function Board: The function board provides substantial peripheral functions for the Evaluation Kit, such as sensors and actuators.

3. Real-Life Application - Home Automation Project Using ESP8266 & Arduino With Tuya IoT Platform

Now we will be building some real and practical stuff using the above knowledge. We will make a simple home automation project using an ES8266 module connected to an Arduino board along with the Tuya IoT Platform. We will get an ordinary bulb to turn on via WiFi through our setup using a mobile phone. So, let's get started.

3.1 Gather Required Stuff!

There's not much that would be needed in terms of hardware for this project as it is just a basic representation of the capabilities of the Tuya IoT Platform.

All components you will be needing are:

  • An Arduino Board

  • A Relay Module

  • A Power Supply Module

  • An ESP8266 Module

  • A Breadboard

  • A Few Jumper Wires

3.2 Wiring / Connections / Circuit Diagram

In technical terms, the wiring involved in any project is directly proportional to the number of components involved in it. In simple terms, the wiring or the connections for this project are very simple again as we earlier mentioned it is a very simple project. The software side of things is what will mostly matter to us here. Let's quickly get over to the circuit diagram. Have a look at the images below for a reference to the circuit diagram.

Detailed Connection Instructions:

3.2.1 Firstly connect the power supply board/module onto the breadboard as this will help eliminate any power-related issues in the circuit later on and will also make it easy to supply power to all components easily.

3.2.2 Then connect the ESP8266 module onto the breadboard for easy pin-access to the module. Also, connect the power pins of the module to the power supply module or the rails of the breadboard.

3.2.3 Then fix the Arduino board onto the breadboard so that it doesn't move much which will help you work easily with it. Then connect the ESP8266 according to the above diagram to the Arduino board.

3.2.4 Lastly connect the relay module to the breadboard as that is the main output of our circuit.