Engineers Garage

  • Projects and Tutorials
    • Electronic Projects
      • 8051
      • Arduino
      • ARM
      • AVR
      • PIC
      • Raspberry pi
      • STM32
    • Tutorials
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Products News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • Digi-Key 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
  • EE Resources
    • DesignFast
    • LEAP Awards
    • Oscilloscope Product Finder
    • White Papers
    • Webinars
  • EE Learning Center
    • Design Guides
      • WiFi & the IOT Design Guide
      • Microcontrollers Design Guide
      • State of the Art Inductors Design Guide
  • Women in Engineering

Mobile Controlled Home Automation

By Gurmeet Singh

 

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
 

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.

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!


Featured Tutorials

  • Introduction to Brain Waves & its Types (Part 1/13)
  • Understanding NeuroSky EEG Chip in Detail (Part 2/13)
  • Performing Experiments with Brainwaves (Part 3/13)
  • Amplification of EEG Signal and Interfacing with Arduino (Part 4/13)
  • Controlling Led brightness using Meditation and attention level (Part 5/13)
  • Control Motor’s Speed using Meditation and Attention Level of Brain (Part 6/13)

Stay Up To Date

Newsletter Signup

Sign up and receive our weekly newsletter for latest Tech articles, Electronics Projects, Tutorial series and other insightful tech content.

EE Training Center Classrooms

EE Classrooms

Recent Articles

  • What is a loop calibrator? 
  • What are the battery-selection criteria for low-power design?
  • Key factors to optimize power consumption in an embedded device
  • EdgeLock A5000 Secure Authenticator
  • How to interface a DS18B20 temperature sensor with MicroPython’s Onewire driver

Most Popular

5G 555 timer circuit 8051 ai Arduino atmega16 automotive avr bluetooth dc motor display Electronic Part Electronic Parts Fujitsu ic infineontechnologies integratedcircuit Intel IoT ir lcd led maximintegratedproducts microchip microchiptechnology Microchip Technology microcontroller microcontrollers mosfet motor powermanagement Raspberry Pi remote renesaselectronics renesaselectronicscorporation Research samsung semiconductor sensor software STMicroelectronics switch Technology vishayintertechnology wireless

RSS EDABOARD.com Discussions

  • 74HC595 creating Fake output
  • What was before microcontrollers ?
  • Check undesired substrate mode...
  • Cap extraction of an IC PAD
  • Active Balun Design

RSS Electro-Tech-Online.com Discussions

  • Question about ultrasonic mist maker
  • Best way to reduce voltage in higher wattage system?
  • Two 300nH inductor in series, can get higher current?
  • Someone please explain how this BMS board is supposed to work?
  • What is "off the shelf values for inductors"?
Engineers Garage
  • Analog IC TIps
  • Connector Tips
  • DesignFast
  • EDABoard Forums
  • EE World Online
  • Electro-Tech-Online Forums
  • Microcontroller Tips
  • Power Electronic Tips
  • Sensor Tips
  • Test and Measurement Tips
  • 5G Technology World
  • About Us
  • Contact Us
  • Advertise

Copyright © 2022 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 | Advertising | About Us

Search Engineers Garage

  • Projects and Tutorials
    • Electronic Projects
      • 8051
      • Arduino
      • ARM
      • AVR
      • PIC
      • Raspberry pi
      • STM32
    • Tutorials
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Products News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • Digi-Key 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
  • EE Resources
    • DesignFast
    • LEAP Awards
    • Oscilloscope Product Finder
    • White Papers
    • Webinars
  • EE Learning Center
    • Design Guides
      • WiFi & the IOT Design Guide
      • Microcontrollers Design Guide
      • State of the Art Inductors Design Guide
  • Women in Engineering