DTMF Controlled Home Automation using AVR Microcontroller and LCD Display

Normally, we control the home appliances using the switches. But nowadays there are different technologies like Bluetooth, WiFi, RF, and DTMF. By these technologies, we can control the home appliances wirelessly.

Our article is based on DTMF technology. DTMF stands for Dual Tone Multi Frequency. In our mobile, we use this technology. Some time we communicate with the mobile operator customer care and asked us to press some keys. And some information sent to customer care computer because we pressed some keys.

In DTMF each key has a specific frequency. This frequency is generated by the row and column frequency. Column frequency is higher than the row frequency.

In this project, we will control the home appliances from the mobile by pressing the keys. For this, we take two mobile. One act as a transmitter and operated by the user by pressing the keys. Second mobile act as a receiver and placed with home appliances with controlling circuitry.

DTMF Low and High Frequency Tones

Key Low Freq. (Hz) High Freq. (Hz)
1 697 1209
2 697 1336
3 697 1477
4 770 1209
5 770 1336
6 770 1477
7 852 1209
8 852 1336
9 852 1477
0 941 1336
* 941 1209
# 941 1477
A 697 1633
B 770 1633
C 852 1633
D 941 1633
ANY ANY ANY

DTMF Key and Decoded Output

Key OE Q1 Q2 Q3 Q4
1 H 0 0 0 1
2 H 0 0 1 0
3 H 0 0 1 1
4 H 0 1 0 0
5 H 0 1 0 1
6 H 0 1 1 0
7 H 0 1 1 1
8 H 1 0 0 0
9 H 1 0 0 1
0 H 1 0 1 0
* H 1 0 1 1
# H 1 1 0 0
A H 1 1 0 1
B H 1 1 1 0
C H 1 1 1 1
D H 0 0 0 0
ANY L Z Z Z Z

DTMF Controlled Home Automation Circuit

DTMF Controlled Home Automation AVR Code

#include <avr/io.h>
#include <util/delay.h>
#include”lcd.h”
int main()
{
int dtmfInput=0;
DDRC=0b0000000;//DTMF input
DDRB=0xFF;//Load output

lcd_init(LCD_DISP_ON);
lcd_puts(“Home Automation”);
lcd_gotoxy(0,1);
lcd_puts(“www.maxphi.com”);
_delay_ms(5000);
_delay_ms(5000);
while(1)
{
lcd_puts(“www.maxphi.com”);
dtmfInput=PINC&0b0001111;
lcd_gotoxy(0,1);
if(dtmfInput==1){
PORTB|=(1<<PORTB0);
lcd_puts(“FAN ON”);
}
if(dtmfInput==2){
PORTB&=~(1<<PORTB0);
lcd_puts(“FAN OFF”);
}
if(dtmfInput==3){
PORTB|=(1<<PORTB1);
lcd_puts(“AC ON”);
}
if(dtmfInput==4){
PORTB&=~(1<<PORTB1);
lcd_puts(“AC OFF”);
}
if(dtmfInput==5){
PORTB|=(1<<PORTB2);
lcd_puts(“BULB ON”);
}
if(dtmfInput==6){
PORTB&=~(1<<PORTB2);
lcd_puts(“BULB OFF”);
}
_delay_ms(200);
lcd_clrscr();
}
return 0;
}

Leave a Reply

Your email address will not be published. Required fields are marked *