GSM is a very common device that is used in major projects and Real Time Operations. There are many application using GSM Module features like Sending Message, Make a Voice Call, Reading Message, Attempting Call etc. Many times you have made a Voice Call using your Mobile Phone and by using Hyper Terminal of your computer via GSM by sending commands to GSM using Microcontroller. It is assumed that the reader has gone through the project how to get started with the arduino and Interface LCD with arduino.
Fig. 1: Prototype of Arduino and GSM GPRS Modem based Mobile Caller
The unique part of this project is that, here I am going to demonstrate how to make a Voice Call using Numeric Keypad and GSM. This is very simple which can be done very easily.
Fig. 2: Image showing Arduino and GSM GPRS Modem based Mobile Caller in action
In this project we enter a number by using Keypad and then by using Sending Button (*) we can Dial that Number.
Block Diagram
Fig. 3: Block Diagram of Arduino and GSM GPRS Modem based Mobile Caller
The Circuit is easy and to make this project one has to use a 16×2 LCD for displaying the Dialed Numbers and Show Button status like * for Send and # for Delete. A GSM Module is used for making a Voice Call. Arduino is used here for controlling the whole process, and a Numeric Keypad is used in this circuit which is used for Entering, for Deleting Mobile Number and Dialing the Entered Number. A 4×3 Numeric Keypad is used in the project, by using this type of keypad you can easily enter any number (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, * and #). In this project you can Delete Last Entered Digit, which means this project can also handle options for delete or for corrections.
Fig. 4: Circuit Diagram of Keypad used in Arduino and GSM GPRS based Mobile Caller
Circuit Description & Components Used
Circuit Description
GSM module’s Rxand Txpins are directly connected with Arduino’s pinTx and Rx respectively (Ground of Arduino and GSM must be connected with each other). 16×2 LCD’s rs, en, d4, d5, d6 and d7 pins are connected with pin number 7, 6, 5, 4, 3 and 2 o Arduino respectively.
Fig. 5: Image of Keypad designed for Arduino and GSM GPRS based Mobile Caller
4×3 keypad’s Row pins R1, R2, R3, R4 are directly connected with pin number 13,12, 11, 10 of Arduino and Colum pin of Keypad C1, C2, C3 are connected with pin number 14, 15, 16 (A0, A1, A2) of the Arduino. With the Colum 10K pull up Resistor should be connected for proper keys. Please refer Circuit Diagram Tab for Circuit.
Programming
Programming part of this project is very simple as no Keypad Library is used for getting keys. Here if statement is used for the key to get pressed.
Fig. 6: Screenshot of Arduino code used to display dialed number on character LCD
Components Used
1. Arduino
2. GSM Module
3. Keypad
4. 16×2 LCD
5. Connecting Wires
6. Power Supply
Project Source Code
###
#include<LiquidCrystal.h> LiquidCrystal lcd(7, 6, 5,4, 3, 2); #define R1 13 #define R2 12 #define R3 11 #define R4 10 #define C3 16 //A2 #define C2 15 //A1 #define C1 14 //A0 int i,j,r=0,c=0,num,m; char value; int temp=0; char number[10]; void setup() { Serial.begin(9600); pinMode(R1, OUTPUT); pinMode(R2, OUTPUT); pinMode(R3, OUTPUT); pinMode(R4, OUTPUT); pinMode(C1, INPUT); pinMode(C2, INPUT); pinMode(C3, INPUT); digitalWrite(R1, HIGH); digitalWrite(R2, HIGH); digitalWrite(R3, HIGH); digitalWrite(R4, HIGH); lcd.begin(16,2); lcd.setCursor(0,0); lcd.print(" Make A Call "); lcd.setCursor(0,1); lcd.print("Using Keypad And"); delay(3000); lcd.setCursor(0,0); lcd.print(" GSM By Saddam "); lcd.setCursor(0,1); lcd.print("Engineers Garage"); delay(3000); lcd.clear(); } void loop() { lcd.setCursor(0,0); lcd.print(" Enter Number "); delay(2000); lcd.clear(); lcd.setCursor(0,1); lcd.print("Dial(*) del(#)"); lcd.setCursor(0,0); c=0;r=0; num=0; temp=0; while(temp==0) { lcd.cursor(); digitalWrite(R1, LOW); if(digitalRead(C1)==0) { lcd.print(number[num]='1'); num++; delay(200); while(digitalRead(C1)==0); c++; } if(digitalRead(C2)==0) { lcd.print(number[num]='2'); num++; delay(200); while(digitalRead(C2)==0); c++; } if(digitalRead(C3)==0) { lcd.print(number[num]='3'); num++; delay(200); while(digitalRead(C3)==0); c++; } digitalWrite(R1, HIGH); digitalWrite(R2, LOW); /* key 4 */ if(digitalRead(C1)==0) { lcd.print(number[num]='4'); num++; delay(200); while(digitalRead(C1)==0); c++; } if(digitalRead(C2)==0) { lcd.print(number[num]='5'); num++; delay(200); while(digitalRead(C2)==0); c++; } if(digitalRead(C3)==0) { lcd.print(number[num]='6'); num++; delay(200); while(digitalRead(C3)==0); c++; } /* key 7*/ digitalWrite(R2, HIGH); digitalWrite(R3, LOW); if(digitalRead(C1)==0) { lcd.print(number[num]='7'); num++; delay(200); while(digitalRead(C1)==0); c++; } if(digitalRead(C2)==0) { lcd.print(number[num]='8'); num++; delay(200); while(digitalRead(C2)==0); c++; } if(digitalRead(C3)==0) { lcd.print(number[num]='9'); num++; delay(200); while(digitalRead(C3)==0); c++; } /* key * */ digitalWrite(R3, HIGH); digitalWrite(R4, LOW); if(digitalRead(C1)==0) { Serial.print("ATD+91"); for(int i=0;i<10;i++) Serial.print(number[i]); Serial.println(";"); delay(10); lcd.clear(); lcd.setCursor(0,0); lcd.print("+91"); for(int i=0;i<10;i++) lcd.print(number[i]); for(int i=0;i<25;i++) { lcd.setCursor(0,1); lcd.print("dialling. "); delay(500); lcd.setCursor(0,1); lcd.print("dialling.. "); delay(500); lcd.setCursor(0,1); lcd.print("dialling... "); delay(500); lcd.setCursor(0,1); lcd.print("dialling.... "); delay(500); } //delay(5000); lcd.setCursor(0,1); lcd.print("Call Ended "); temp=1; } if(digitalRead(C2)==0) { lcd.noCursor(); value=48; delay(10); for(i=0;i<200;i++) for(j=0;j<700;j++) { if(digitalRead(C2)==0) { lcd.setCursor(c,0); lcd.print(number[num]=value); value=value-6; if(value==36) value=35; if(value < 35) value=48; while(digitalRead(C2)==0); i=0,j=0; delay(100); } } num++;c++; if(c==16) c=0; while(digitalRead(C2)==0); } if(digitalRead(C3)==0) { num--; c--; if(c<0) c=0; lcd.setCursor(c,r); lcd.print(' '); lcd.setCursor(c,r); while(digitalRead(C3)==0); delay(200); } digitalWrite(R4, HIGH); if(c==11) c=10; } }###
Circuit Diagrams
Project Video
Filed Under: Electronic Projects
Filed Under: Electronic Projects
Questions related to this article?
👉Ask and discuss on EDAboard.com and Electro-Tech-Online.com forums.
Tell Us What You Think!!
You must be logged in to post a comment.