In this IoT project, I have shown how to make an IoT-based Smart Home with Arduino IoT Cloud & Alexa using ESP8266 Arduino to control 4 home appliances with voice commands, IR remote, and manual switches.

If the internet is unavailable, you can control the home appliances from IR remote & manual switches. In the article, I have shown all the steps to make this smart home system.

Tutorial video on Arduino IoT Cloud Project

This Arduino Home Automation system has the following features:

  • Control appliances with Arduino IoT Cloud Dashboard.
  • Control appliances with Alexa.
  • Used Arduino EEPROM to remember previous states
  • Control appliances with IR remote.
  • Control appliances manually with switches or pushbuttons
  • Monitor real-time feedback and room temperature in the Amazon Alexa app.
  • Control home appliances manually without internet.
  • All resources used for this project are FREE.

So if you follow all the steps, you can easily make this IoT project just by using Arduino UNO, NodeMCU, and relay module.

Although the PCB is not mandatory, I have used PCB to make the circuit compact and give the project a professional look.

How Does This Arduino IoT Cloud Project Works?

This Arduino ESP8266 Home Automation works in the following steps.

  • When you ask Alexa to control appliances, it sends the signal to the Arduino IoT Cloud server.
  • NodeMCU will receive the signal from the Arduino IoT Cloudthrough the internet.
  • NodeMCU sends the same signal to Arduino through the serial terminal.
  • Arduino UNO will process that signal and turn the relays on or off.
  • Arduino sends the feedback to NodeMCU through Serial communication.
  • NodeMCU sends feedback to the Arduino IoT Cloud server through the internet.
  • Real-time feedback can be monitored in the Amazon Alexa app.

Required Components for this IoT Project (without PCB)

  • Arduino UNO
  • NodeMCU ESP8266
  • 1838 IR receiver (with metal case)
  • DHT11 Sensor
  • 4-channel 5V SPDT Relay Module
  • Switches or Push Buttons
  • 5V DC supply.

Required Components for the Arduino control Relay PCB:

  • Atmega328P microcontroller
  • ESP8266 ESP01
  • PC817 Optocuplors (4 no)
  • 510-ohm 0.25-watt Resistor (4 no) (R1 -- R4)
  • 1k 0.25-watt Resistors (6 no) (R5 -- R10)
  • 2k 0.25-watt Resistor
  • 4.7k 0.25-watt Resistor
  • 10k 0.25-watt Resistors (2no)
  • 22pF ceramic capacitor
  • 104 ceramic capacitor
  • 220uF 25V Capacitor (2no)
  • 1uF Box capacitor (1no)
  • 16MHz Crystal
  • LED 5-mm (6 no)
  • 1N4007 Diodes (4 no) (D1 -- D4)
  • Push Buttons (8 no)
  • BC547 Transistors (4 no)
  • Relays 5v (SPDT) (4 no)
  • Terminal Connectors
  • Jumper (5no)
  • Switch (1no)
  • Hi-link ac-dc 220v-5v

Circuit Diagram of the ESP8266 Arduino Control Relays

The circuit is very simple, I have used the digital pins D4, D5, D6 & D7 to control the 4 relays.

And the digital pins D10, D11, D12 & D13 are connected with switches to control the 4 relays manually.

The output pin of the IR receiver is connected with A0 and the DHT11 sensor is connected with A1.

I have used the INPUT_PULLUP function in Arduino IDE instead of using the pull-up resistors.

I have used D2 as RX and D3 as TX for the serial communication with the NodeMCU module.

If you use the latched switches then just connect the pushbutton across the digital pins and GND instead of the pushbuttons.

I have used a 5V mobile charger to supply the smart relay module.

Please take proper safety precautions while working with high voltage.

Alexa Control Relay Using ESP8266 NodeMCU

You can control the home appliances from Amazon Alexa App if the NodeMCU is connected to the WiFi.

You can also ask Alexa to turn on and off the appliances from anywhere in the world.

You don't need any Echo DOT or other Alexa devices for this home automation project.

You can also control the home appliances from the Arduino IoT Cloud web dashboard and Arduino IoT...

Read more »