Engineers Garage

  • Electronics Projects and Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Audio Electronics
      • Battery Management
      • Brainwave
      • Electric Vehicles
      • EMI/EMC/RFI
      • Hardware Filters
      • IoT tutorials
      • Power Tutorials
      • Python
      • Sensors
      • USB
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
    • DesignFast
  • Guest Post Guidelines
  • Advertise
  • Subscribe

Mobile Controlled Home Automation

By Gurmeet Singh March 22, 2014

 

REQUIREMENTS:

  1. Cube relay (for dealing with 220v A.C.)
  2. AT89S52 (8051 microcontroller by Atmel Corp.)
  3. DTMF decoder module
  4. 7805 voltage regulator
  5. 11.0592 MHz crystal
  6. L293D(I have discussed its use below )

Prototype of 8051 Microcontroller based Mobile operated Home Automation System

Fig. 1: Prototype of 8051 Microcontroller based Mobile operated Home Automation System

This project uses DTMF technology to control home appliances. DTMF stands for Dual Tone Multi Frequency.This DTMF based system can control home appliances via mobile phone communication from anywhere around the world.

This facilitates the user to operate anything on his fingertips.

 

It requires two cell phones to operate properly; one of them will always remain in touch with the circuit and another to place a call on that phone.

 

In this circuit Relay-1 will work if we press “123”, “456” for Relay-2 and “789” for Relay-3.

Now pressing the digits in reverse order will switch off the corresponding relay i.e. “321”, “654” and”987” will switch off Relay-1,2,3 respectively.

In case we need to switch off all of them at same time then pressing “0” will accomplish the task.

Now comes the most interesting part; why interfacing L293D with such a circuit? Here’s your answer, 8051 chips, especially AT89S52’s are not capable of delivering that much current which is required by the relay module to work. Thus I got an idea of using L293D which will enhance the current value as well as the voltage part because my relays work on 12 v DC.

Thus using this circuit one can control at most 4 relays at a time by using single L293D.

By pressing “#” you will accomplish the entering task. What I mean by this is, every time you want your microcontroller to read any DTMF value you’ll need to press “#”.

I have connected my L293D’s input pins to P2^0, 1, 2, 3 while output pins are connected to the positive terminal of individual relay. I have grounded them commonly.

The DTMF module is connected with the upper half of PORT 3 i.e. P3^0, 1, 2, 3.

The receiving mobile phone is connected to DTMF module with a 3.5 mm jack cable.

 Since I am inputting these values in Char data type therefore I have to use #include<string.h> in order to compare their values, using strcmp().

Strcmp() inputs two char values, compares them and returns -1,0 or 1. In our case we just need to focus on the “0” one. If strcmp() returns 0 value, this shows that there is no difference in between the values entered or they are same. This statement will help us to match the codes required for operating each relay uniquely.

 

APPLICATIONS:

There are moments in our lives where we are in doubt, whether we have closed the lights/fans/appliances or not. This system will help you resolve your worry, simply give a call to the phone connected and press the corresponding digits.

It can also serve for the purpose of switching on A.C’s to cool down your room on a hot-sunny day, before you reach your house.

There is no end to the number of applications this system can perform, you just need to have an idea!

 

ADD ONS:

You can make use of strcmp() to make your whole system password protected and safe.    

 

Project Source Code

###



#include<reg51.h>
#include<string.h>
sbit relay1=P2^0;
sbit relay2=P2^1;
sbit relay3=P2^3;
void main()
{
  int i=0;
  char arr[16];
  relay1=relay2=relay3=0;
  P3=0xff;
  while(1)
      {           
          while(P3!=0xfc)
      {
           if(P3==0xf1)
        {
            arr[i++]='1';
             while(P3==0xf1);
         }
          else if(P3==0xf2)
              {
                 arr[i++]='2';
                while(P3==0xf2);
               }
           else if(P3==0xf3)
                   {
                      arr[i++]='3';
                     while(P3==0xf3);
                    }
                  else if(P3==0xf4)
                       {
                           arr[i++]='4';
                           while(P3==0xf4);
                        }
                else if(P3==0xf5)
                          {
                           arr[i++]='5';
                          while(P3==0xf5);
                           }
                else if(P3==0xf6)
                           {
                           arr[i++]='6';
                         while(P3==0xf6);
                           }
                 else if(P3==0xf7)
                            {
                           arr[i++]='7';
                           while(P3==0xf7);
                            }
                  else if(P3==0xf8)
                               {
                               arr[i++]='8';
                                while(P3==0xf8);
                               }
                  else if(P3==0xf9)
                                {
                                arr[i++]='9';
                                while(P3==0xf9);
                                }
                  else if(P3==0xfa)
                                {
                               arr[i++]='0';
                                while(P3==0xfa);
                                }
                                arr[i]='';
                }
   i=0;
   if(strcmp(arr,"123")==0)
   relay1=1;
  else if(strcmp(arr,"321")==0)
   relay1=0;
  else if(strcmp(arr,"456")==0)
   relay2=1;
  else if(strcmp(arr,"654")==0)
   relay2=0;
  else if(strcmp(arr,"789")==0)
   relay3=1;
  else if(strcmp(arr,"987")==0)
   relay3=0;
  else if(strcmp(arr,"0")==0)
   P2=0x00;
  while(P3==0xfc);
 }
}

###

 


Circuit Diagrams

Circuit-Diagram-8051-Microcontroller-Based-Mobile-Operated-Home-Automation-System

Project Video


Filed Under: Electronic Projects
Tagged With: 8051, at89s52, dtmf, home automation, L293D
 

Next Article

← Previous Article
Next Article →

Questions related to this article?
👉Ask and discuss on EDAboard.com and Electro-Tech-Online.com forums.



Tell Us What You Think!! Cancel reply

You must be logged in to post a comment.

EE TECH TOOLBOX

“ee
Tech Toolbox: Internet of Things
Explore practical strategies for minimizing attack surfaces, managing memory efficiently, and securing firmware. Download now to ensure your IoT implementations remain secure, efficient, and future-ready.

EE Learning Center

EE Learning Center
“engineers
EXPAND YOUR KNOWLEDGE AND STAY CONNECTED
Get the latest info on technologies, tools and strategies for EE professionals.

HAVE A QUESTION?

Have a technical question about an article or other engineering questions? Check out our engineering forums EDABoard.com and Electro-Tech-Online.com where you can get those questions asked and answered by your peers!


RSS EDABOARD.com Discussions

  • Simple Active Bandpass Filter Oscillates
  • De-embedding using Y, Z parameter
  • i need an embedded c program that will read a 12 bit memory address from the io pins and output the data to pins from the memory in a 8051 mcontroller
  • Gate Driver Suggestions for Two-Switch Non-Inverting Buck-Boost Converter
  • DC/DC Converter with wide range input

RSS Electro-Tech-Online.com Discussions

  • Behringer MX 1602 mixer - reading block diagram
  • STM32 checking self-written delay function
  • Reclaiming missing motherboard header
  • 12v battery, 18v magic
  • Actin group needed for effective PCB software tutorials

Featured -USB Series

  • Controller Chip Selection for Developing USB Enabled Device (Part 6/6)
  • Signal and Encoding of USB System (Part 5/6)
  • USB Requests and Stages of Control Transfer (Part 4/6)
  • USB Descriptors and their Types (Part 3/6)
  • USB Protocol: Types of USB Packets and USB Transfers (Part 2/6)
  • Introduction to USB: Advantages, Disadvantages and Architecture (Part 1/6)

Recent Articles

  • Littelfuse driver achieves less than 1 µA standby current for energy-efficient designs
  • Microchip optimizes power consumption in transceiver-less FPGA design for automotive applications
  • What is an IoT platform and when is one useful?
  • Silanna launches laser driver IC with sub-2 ns FWHM pulse for LiDAR application
  • LEM introduces current sensors with bandwidth up to 2.5 MHz for precision applications

EE ENGINEERING TRAINING DAYS

engineering

Submit a Guest Post

submit a guest post
Engineers Garage
  • Analog IC TIps
  • Connector Tips
  • Battery Power Tips
  • DesignFast
  • EDABoard Forums
  • EE World Online
  • Electro-Tech-Online Forums
  • EV Engineering
  • Microcontroller Tips
  • Power Electronic Tips
  • Sensor Tips
  • Test and Measurement Tips
  • 5G Technology World
  • Subscribe to our newsletter
  • About Us
  • Contact Us
  • Advertise

Copyright © 2025 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy

Search Engineers Garage

  • Electronics Projects and Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Audio Electronics
      • Battery Management
      • Brainwave
      • Electric Vehicles
      • EMI/EMC/RFI
      • Hardware Filters
      • IoT tutorials
      • Power Tutorials
      • Python
      • Sensors
      • USB
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
    • DesignFast
  • Guest Post Guidelines
  • Advertise
  • Subscribe