In this IoT project, I have shown how to make IoT-based Smart Home Automation using the new Blynk 2.0 ESP32 LDR & temperature sensor to control an 8-channel relay module from the manual switch, IR remote & smartphone using the Blynk IoT App.

During the article, I have shown all the steps to make this Blynk home automation system.

Tutorial Video on this ESP32 Blynk IoT Home Automation:

This Blynk ESP32 control smart relay has the following features:

  • Control home appliances with WiFi (Blynk IoT App).
  • Control home appliances with Blynk web dashboard.
  • Control home appliances with IR remote.
  • Control home appliances with manual switches or push buttons.
  • Monitor real-time room temperature in the Blynk IoT App
  • Monitor real-time feedback in the Blynk IoT App.
  • Control appliances without WiFi

So, you can easily make this home automation project at home just by using an ESP32 and relay module. Or you can also use a custom-designed PCB for this project.

Required Components:

  • ESP32 DEVKIT V1 board
  • 8-channel SPDT 5V Relay Module
  • TSOP1838 IR receiver
  • DHT11 sensor
  • LDR
  • Manual Switches or Pushbuttons

Required Components for the PCB:

  • ESP32 DEVKIT V1 
  • TSOP1838 IR receiver (with metallic case)
  • DHT11 sensor 
  • LDR Relays 5v (SPDT) (8 no)
  • BC547 Transistors (8 no) 
  • PC817 Optocuplors (8 no) 
  • 510-ohm 0.25-watt Resistor (8 no) (R1 - R8) 
  • 1k 0.25-watt Resistors (10 no) (R9 - R18) 
  • LED 5-mm (10 no) 
  • 1N4007 Diodes (8 no) (D1 - D8) 
  • Push Buttons (9 no) or Switches 
  • Terminal Connectors 
  • Jumper 

5V DC supply Required Software:

1. Arduino IDE 

2. Blynk IoT App Testing the Circuit Before Designing the PCB

Testing the Circuit Before Designing the PCB:

Before designing the PCB, I have made the complete circuit using ESP32, an 8-channel relay module, sensors, and manual switches.

As you can see, the relays can be controlled from the Blynk IoT app, IR remote, and manual switches.

If the WiFi is not connected with ESP32, still you can control the appliances from manual switches and IR remote.

Control Relays With Blynk IoT App:

If the ESP32 is connected with WiFi, then you can control the home appliances from Blynk IoT App.

You also use multiple smartphones to control the appliances with Blynk App. For that, you have to log in same Blynk account from all the smartphones.

In this way, all smartphones will be sink to the Blynk server. You can control, monitor the real-time status of the relays, room temperature & humidity from anywhere in the world in the Blynk IoT App.

If the ESP32 is not connected with WiFi, still you can control the appliances with IR remote and Manual Switch without internet.

ESP32 Control Relay With IR Remote:

You can always control the relays from the IR remote. For this project, you can use any IR remote.

You can monitor the real-time feedback in the Blynk IoT App.

I have explained how to get the IR codes (HEX codes) from any remote in the following steps.

Control Relays Manually With Switches:

You can also control the relays from the switches or pushbuttons.

You can monitor the real-time feedback in the Blynk IoT App.

Please refer to the circuit diagram to connect the switches.

Designing the PCB for ESP32 IoT Projects:

To make the circuit compact and give a professional look, I have designed the PCB after testing all the features of the smart relay module on the breadboard.

You can download the PCB Gerber file of this home automation project from the following link:

Download the PCB Gerber File

Order the PCB from JLCPCB:

After downloading the Garber file you can easily order the PCB

1. Visit anSign in / Sign up

2. Click on the QUOTE NOW button.

3. Click on the "Add gerber file" button. Then browse and select the Gerber file you have downloaded.

Uploading the Gerber File and Set the Parameters:

4. Set the required...

Read more »