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

KeyLow Freq. (Hz)High Freq. (Hz)
16971209
26971336
36971477
47701209
57701336
67701477
78521209
88521336
98521477
09411336
*9411209
#9411477
A6971633
B7701633
C8521633
D9411633
ANYANYANY

DTMF Key and Decoded Output

KeyOEQ1Q2Q3Q4
1H0001
2H0010
3H0011
4H0100
5H0101
6H0110
7H0111
8H1000
9H1001
0H1010
*H1011
#H1100
AH1101
BH1110
CH1111
DH0000
ANYLZZZZ

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 *