Environmental and Intelligent Home Automation System

Published Jun 02, 2024
 72 hours to build

This project is an Environmental & Intelligent Home Automation, the purpose of Environmental is it saves the lots of energy/power consumption which is unnecessary working as it gets automatically ON/OFF after Sunrise/Set and also the Intelligent means in this it is working smartly from door security alarm to temperature & humidity monitoring on Blynk IoT application and Timer Alarm Management and having a digital clock to know the Current Time.

display image

Components Used

LDR -Photocell Photoresistor
LDR -Photocell, Photoresistor
Resistor 10 kOhms
Metal Film Resistors - Through Hole 10 kOhms 250 mW 1% 100 PPM / C
Connecting Wire Jumper Wires
Connecting Wire Breadboard wires
ESP8266 WiFi Module
ESP8266 is a system on chip (SoC) which provides WIFI capability for embedded applications. This enables internet connectivity to embedded applications. ESP8266 modules are mostly used in Internet of Things(IoT) applications.
Relay Module Two channel
Relay Module Two-channel
DHT11 is a single wire digital humidity and temperature sensor, which gives relative humidity in percentage and temperature in degree Celsius.
TM1637 4-Digit Display
Display Development Tools Grove - 4-Digit Display
MC-38 Wired Door Window sensor Magnetic Switch
Wired Door Window sensor Magnetic Switch
Blynk app
Download from mobile play store Mobile required to access or monitor the slot
i have used 0.5watt bulb for demo in this project, can also use 9w,12w more watt will cost more, you can use more watt but crosscheck for Relay
Bulb holder
Used to hold the bulb
Electric Wire (Copper)
electric wire to make connection between bulb holder and relay.
Buzzer 3.3v
Buzzer 3.3v

How It Works: Demonstration of Complete Project


220V 0.5 Watt bulb is connected with the Relay via electric wires, so connect wire correctly and carefully loose connection & touching the main wires from electric board supply may cause "ELECTRIC SHOCK", Make sure no power supply at the connection time and don't touch relay or wire connected with relay. 

Caution Connection With the Relay :-

About the project

As the Title is Environmental and Intelligent Home Automation, the purpose of using Environmental is it is using LDR Sensor with Relay, so whenever the sun rises LDR detects the light , it send data to ESP8266 that detected light, so the Relay will switch OFF the bulb, doing this will save lots of energy resources because we have seen many of the homes where un-necessary after sunrise the Light Bulb is still ON, and also after sunset the relay will switch ON the bulb, which helps to save energy resources, because to generate electricity we are using Coal Power Plant, Nuclear Power Plant, etc. which is polluting the environment. Apart of this function this project is also having a Digital Clock which is used to know the correct time (for this I have used NTP, Network Time Protocol) which uses Wi-Fi to display time, don't clock module any(saved amount for this), other than this MC-38 Wired Door/Window Sensor Magnetic Switch is used to secure your house or any secret box, also DHT11 sensor is used for Temperature and Humidity ,which can be monitored on mobile using Blynk application, lastly Time Management system is done using Blynk application and a Buzzer, which acts as an alarm , need to set time for alarm from that application and then alarm will be active "ON" as per your time set to getup in the morning or for work reminder ,etc.


Below is the complete Schematic of a project:-


TM1637 Module as Digital Clock

is used to make digital clock I have used TM1637 module, which is based on NTP(Network Time Protocol), for this we don't need any other components/module example RTC(Real Time Clock) Module it saves your cost.


other task below, 

DHT11 Sensor, 

Temperature and Humidity Monitoring using Blynk App on Mobile

I have used is DHT11 sensor which is used for detecting the Temperature and Humidity of the place where you have installed this sensor, and the data of temperature and humidity is monitored on mobile using Blynk Application installed from play store. The Red mark is indicating the temperature degree Celsius , and in blue color it is indicating the Humidity %.

lets see one more task,


Door Window Magnetic Switch Alarm System with Buzzer, in this I have used MC-38 Magnetic Wired Sensor and a buzzer, whenever a person entered in your room the alarm(buzzer) will start and you will know that someone opened the door, you can set not in only with door, you can also set with your secret box, etc.

Note:-  watch above attached video to know how it works, Demonstration.

Alarm Management using Blynk App and Buzzer :- 

for this I have used one more Buzzer(2nd Buzzer in this project), and Blynk application , the purpose of using this application is we have to set time for Alarm start and Alarm End, after this , the time which is entered by you the Alarm will be ON, and also if you want to stop the alarm before its end time,you can off the alarm manually as added a switch to off the alarm in Blynk application.

Note:- to change time ,tap on the time in blynk application then set the time for alarm

other task in the project,

Energy Saving 

Automatic Light BULB ON/OFF after SunRISE/SET using Relay, and LDR make this Environmental

now, as the title is having "ENVIRONMENTAL", so the purpose is to make energy saver, so to make it working I have used LDR, Relay (which works as a digital switch for the bulb), so when ever the LDR sensor detects the light (Sunrises) it will send info to esp8266 that light is falling on sensor, so then esp8266 send data to Relay to switch OFF the bulb, and this happens vice-versa whenever there is darkness/ when LDR detects no light so then Relay will Switch ON the bulb, and many of the people ,home/offices having this issue that after sunrise the bulb is still ON which is a completely waste of energy, its not about a single person is doing this , on this Holy Planet if we consider only 1% of the people is having this problem so after applying this thing we can save lots of energy, we can also save environment from pollution, because to produce energy we are using many resources like Coal Power Plant, Nuclear Power Plant, etc. 

we can not only Switch ON/OFF the bulb, we can add many electrical appliances, with many relays, and digital pins available in the esp8266.

Note:- Below image is the connection LDR with Relay & ESP8266.

Cost Saving Alternate Components

In Digital Clock, we have used TM1637 module ,which is used for Clock display and as we are using ESP8266 Module which is having Wi-Fi and our project is also based on IoT, so to save cost I have used NTP protocol in the code, for this just need to add library only and some code and it is ready to go, means it will work dont need to add any hardware/module for Clock , examples DS3231 RTC, DS1307 IIC module, no battery needed, no other wire, no more connections. so it saves the cost and time as well.


The task which is performed above works very smartly, it shows how the home automation is controlled very intelligently, as it is monitoring the temperature and humidity, securing your home, using security system with buzzer alarm , also a Digital Clock to know the current time, and also a one more task that is time management or we can say time alarm, and also it is an energy saver as we used to Auto ON/OFF of bulb, it saved an energy, it will save the energy in future.

Future Scope

We can add many tasks, FAN ON/OFF using Blynk Application using switches in application can add more appliances, in door security we can add notification, it will send information that someone entered or open something to your any applications, you can add RGB Led's light with sound sensor, whenever sensor detects the sounds the RGB Led's will glow and it will make classic to your home and we can also change RGB color to more color like orange, yellow, blue.



Schematic_Environmental_Intelligent_Home Automation Download