Introduction: Basic Phone Using GSM and Arduino
In this instructable an Arduino uno with a GSM shield is used to perform four cellular operations. These are
All you need:-
1. A GSM shield with 900A/900 Sim module (preferably by ATRIM electronics).
2. A 4x4 button Matrix keypad.
3. A 16x2 LCD as display.
4. A Ardiuno UNO R3.
5. Some Male to female & Female to male connecting wires.
6. A PC for programming& uploading the Code using Arduino IDE
Step 1: Making Hardware Connections-
A-Connections of GSM shield &Arduino:-
1. GND of Shield-GND of Arduino.
2. Tx of Shield-Pin 10(Rx of Software Serial) of Arduino.
3. Rx of Shield-Pin 11(Tx of Software Serial) of Arduino.
B-Connections of Matrix Keypad & Arduino:-
As shown in figure
C-Connections of LCD & Arduino:-
As shown in figure
Step 2: Programming of Arduino.
A. Interfacing code for GSM:
We interface Arduino with GSM shield using AT commands. So, take an overview of some commonly used AT commands:
1. AT: Test weather GSM shield respond
2. AT+CIMI: Request International Mobile Subscriber Identity
3. ATD+91XXXXXXXXXX : Dial the specified number ( replace x with number)
4. AT+CMG=1: Switch on the messaging mode of gsm
5. AT+CNMI=2,2,0,0, 0: Turn on the message indicator
6. ATH: Halt call
7. ATA: Pick up incoming call
8. AT+COPS: Get the service provider name
9. AT+CSQ: Get signal strength
B-Interfacing code for Input Matrix:
These two functions are used in interfacing of Input Matrix with Arduino-
1. Return_Keypad_Values() : Return the value of key pressed (in char)
2. Take_input(): Enter a 10 digit number using matrix and use
- * key : For deleting last digit
- # key : Call the entered number
Returns: Number entered through keypad ( in String Object)
C-Interfacing of LCD:
Mainly 3 functions are used for interfacing of LCD with Arduino
1- lcd.begin(): initializing the LCD with Arduino
2- lcd.setCursor(x,y): Set the cursor at x column & y row
3- lcd.print(“hello”)-This function is use to print any text or number on LCD.
Step 3: Upload the Code
1. Code is available on this Github repository here.
2. Download the repository here in zip.
3. Unzip it and open the all_phone_operations folder.
4.Open all_phone_operations.ino in Arduino ide and upload it (as shown in figure).
Step 4: Operation
By pressing button ‘A’ you will be in Send call mode. LCD will prompt to enter a number to call.
These buttons are used in send call mode
- ‘D’-used for cancel calling operation.
- ‘*’-used to delete printed digit.
- ‘#’- Call on dialed number.
- Press ‘B’ key for configuring shield in send message mode
- ‘Enter number’ will be prompted your LCD. You need to enter a 10 digit numbe
- These buttons are also used in Send message mode.
- ‘D’: Used for cancel calling operation.
- ‘*’: Used to delete printed digit.
- ‘#’: Call on dialed number.
C.Receive call and SMS
Module configures itself in receiving mode when it starts and the LCD will show a response as soon as a call or SMS is received. The program uses only two button for user interaction in case of response received.
- ‘*’: used to show the received SMS/ Pick up Call.
- ‘#: used to halt or terminate message / terminate incoming Call
If you find it useful, Please share it.
Special thanks and Credit to Mr. devvrat Arya and Mr. Harsha Deva boley Shetty for this Article.......
And there is a tip for all users to use vcc and ground of ICSP port.
We have a be nice policy.
Please be positive and constructive.