Home Automation using ESP32 and CADIO

Published  December 3, 2023   0
User Avatar GOURAB DAS
Author
ESP32 Home Automation using CADIO

Home automation refers to the integration of technology and smart devices within a home to automate and control various functions, enhancing convenience, comfort, security, and energy efficiency. In this Home Automation project we use the CADIO platform to build our system. CADIO is complete home automation platform allows us to build and control smart home devices, With many new features developed to give us the best smart home experience. With this system we can control (ON/OFF) our home appliances through the CADIO mobile application with the help of internet, we can also control them from the manual switches as well as voice command through the CADIO mobile app or third party VUI like Amazon Alexa, Google Home, etc.

Features of CADIO Home Automation System

  • Appliances can be controlled from anywhere in the world through Internet
  • Appliances can also be controlled with manual switches without changing the electrical connection for better reliability.
  • The whole system can also be controlled through a 433 MHz RF remote
  • The status of each appliances can be viewed on the CADIO mobile app
  • As CADIO provide AI based code generation, one can easily change or modify the system according to their need
  • It has a low current consumption & maintenance cost once it is installed

Components Required to Build the System

  • ESP-WROOM-32 DEVKIT x1
  • L7805 CV Voltage Regulator x1
  • 5V SPDT Relay x5
  • 10cm x15cm Vero Board
  • 2 Pin Terminal Connectors x2
  • 3 Pin Terminal Connectors x5
  • BC557 PNP Transistors x5
  • Through Hole Resistors
  • Through Hole Capacitors
  • MB10s Bridge Rectifiers (SMD) x5
  • EL817 Optocoupler (SMD) x5
  • Hook-up Wires
  • 5mm Through Hole LED’s x10
  • 433 MHz RF Receiver
  • Male & Female Headers
  • 5V SMPS Power Supply

digikey esp32 and lm7805 component purchase image

Circuit Diagram of CADIO Home Automation

ESP32 Home Automation Circuit Diargam

Working Principle of the Circuit

The circuit is very simple. The schematics are divided into 4 parts for better understanding. The first section is the 5V Relay Driver Circuit portion. The relay is powered by +5V supply and a BC557 PNP Transistor is placed between them which is acts like an electronic switch in our circuit. As it is a PNP type of transistor it energised with a ground pulse. So when the ESP32 sends a ground pulse through the dropping resistor to individual relays it get turned on. A 5mm LED is there for the visual indication of the present state of the relay (ON/OFF). A 1N4007 Diode is kept in parallel with the relay coil to prevent back EMF from the coil.
The second section on the right hand of the schematic is the 5V Live Feedback Circuit to ESP32. In this portion we made a small & efficient transformer less power supply to each relays for getting the live feedback on the CADIO Mobile Application. The power supplies are made using dropper capacitor method, where a 0.1uF 400V Capacitor is used to drop the Inline 220V AC to a certain level (in our case it’s around 65V). A 1MΩ Bleeder Resistor is kept parallel with the dropper capacitor to drain the charge in the capacitor when it is turned OFF. A 4.7Ω 1W Protection resistor is kept in series with the power supply circuit to prevent damage from spike voltage and current. After dropping the AC voltage it is passed through the MB10s Bridge Rectifier (SMD) for AC to DC Conversion. After rectification it is passed through a 100uF 63V Capacitor for smoothing the DC supply. A 5mm Blue LED is kept for the visual indication of the power supply state. Then the supply voltage is fed to an EL817 Optocoupler (SMD) which isolates the individual power supply from the ESP32. The feedback signalling is done by the common 5V power supply which is used in the board.
The third section on the bottom of the schematic we have the Inlet DC 5V Supply Terminal along with the 433MHz RF Receiver, which are directly connected to the ESP32 board.
The fourth & the last section of the schematic we have the ESP-WROOM-32 Module where all the connections are connected through netPort, this is done to make the schematic professional as well as neat & clean.

Additional Information

  • As the CADIO Platform is providing to use their server for our IoT application, they are charging a nominal fee of $7.99 or ₹ 799/- approx. (including GST) for each device (i.e. 1 ESP32 = 1 Device). And it is a onetime charge after that we can use the Platform for Lifetime with that device. Our system provides 5 channel with 5 feedbacks. If Modified we can extend it to 10 channel with 10 feedback systems.
  • As this system will be kept ON for 24*7 operation, the power consumption is a vital factor here. In our testing the full system consumes approx. 0.45A or 450mA on full load i.e. the 5 relays are fully energized with the ESP32 & RF Receiver.
  • If we calculate in watts, the system is consuming approx. 2.5W and the amount that will be reflect on your electricity bill is provided below. The typical appliance is stereo receiver because it is the least power consuming device in the given list. The cost of 1kWh may vary from state to state & country to country. So we can conclude that the system will not costs more than the amount shown below. You can also check out the online electricity bill calculator if you want to use it by yourself. 

electricity bill calculator online

CADIO Home Automation Project Images

Top View without ESP32 & RF Receiver

esp32 home automation pcb board

Bottom View with MB10s & EL817 (SMD) Component 

Home Automation PCB board using ESP32

Top View with ESP32 & RF Receiver

Home Automation PCB board using ESP32

Front View

Home Automation PCB board using ESP32

Rear View

Home Automation PCB board using ESP32

Left Side View

ESP32 Home automation using 4 channel relay and Rf module

Right Side View

ESP32 RF module home automation circuit

After Installation

ESP32 home automation installation

Working

The Full working of the project is given in the YouTube link below. Click on Click Here to see the video. In the video you can see how the Electrical appliances can be easily been controlled using the Manual Switches, CADIO Mobile Application & RF Remote. You can check out the complete working of the project in the video attached at the bottom of this article.

CADIO Home Automation Setup

  • Visit CADIO Home Automation website and click on the Downloads option on the top left side corner of the screen
  • Now from the download centre download the ESP Flash Download Tool & the board in which you want to upload the firmware (ESP32 & ESP8266 Supported)

  •  After downloading unzip and extract the two files
  • Now open the flash download tool and execute the .exe file. You will see a small popup on the screen. Then select the board type (ESP Board) & Workmode - Develop
  • Now connect the ESP board with your computer & select the right COM port
  • Then on the bottom side click the Erase button to delete the existing firmware
  • Now select the 4 Firmware files from the ESP32 firmware folder & write the values same as the folder name
  • Then Tick the 4 files (you will find the values turn green on each mark) & click Start
  • Now you have successfully uploaded the CADIO firmware to your ESP board
  • Now restart your ESP board & wait for a while, you will note that the blue light on your ESP board started to flash
  • Now connect your smartphone to the hotspot created by the ESP board and open the CADIO mobile application (Available in both Android & iOS)
  • In the app browse the configuration tab and click on that
  • Now your ESP board is in configuration mode and do the configuration according to the project (In our case the configuration is given below)
  • After Configuration the ESP Board will scan the nearby Wi-Fi network, choose your network and provide your network credentials along with the unit name

CADIO configuration for ESP32 home automation

  • After successfully doing all the steps you will find that your board is listed on the dashboard of the CADIO Mobile Application & further Icons can be customised

Video