Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

GSM SIM card interfacing with microcontroller

Status
Not open for further replies.

krunal_299

Member level 4
Member level 4
Joined
Jan 24, 2008
Messages
68
Helped
2
Reputation
4
Reaction score
1
Trophy points
1,288
Visit site
Activity points
1,800
sim card reader with 8051

Hi to All,

I have an idea to interface any GSM SIM card directly to microcontroller but not conceptually clear...
So pls can anyone tell me that it is possible to do that or not....if possible then what kind of microcontroller must be used for that purpose..
is there any mid-interpreting circuitry needed between GSM SIM and microcontroller?

Thanks to All...
 

Thanks...Thanks a lot ...Let me go through it...
 

    V

    Points: 2
    Helpful Answer Positive Rating
what special thing can you achieve with interfacing sim card with microcontroller?
 

Special!!!!
I want to read incoming SMS and send SMSes to any cell phone....I think i need some antenna based interfacing circuit to be used with microcontroller
Let me know what are the available options ???
Regards!!!
 

krunal_299 said:
Special!!!!
I want to read incoming SMS and send SMSes to any cell phone....I think i need some antenna based interfacing circuit to be used with microcontroller
Let me know what are the available options ???
Regards!!!

If you want to receive or send sms you need a gsm phone. Not simply card. Try a mobile phone which supports AT commands or a gsm modem

Nandhu
 

Hi to All,
I also want send and read SMS using PIC and I want to use AT commands. Although I found lot of details of AT commands I confuse to use them with PIC.
I am going to use MikroC for PIC programming.
By simple code example can any one explain me?
 

See this part of code to send a sms, I've used CCS compiler.


Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
void sms_send()
{
int i;
char sms[30]="Car alarm is sounding";
printf("AT+CMGS="12345678"\n\r");//12345678 phone number
delay_ms(500);
for(i=0;i<30;i++)
{
if(sms[i]=='\0') break;//ask for null character of sms vector when find it go out of for() loop
putchar(sms[i]);
}
delay_ms(500);
putc(26);// send ctrl + Z  
return;
}



Added after 3 minutes:

I forgot select text mode with: printf("AT+CMGF=1\n\r"); //add this part before sending AT+CMGS=....
 
Last edited by a moderator:

Thank You very much fiolin, Now I have idea to do my work.
pls tell me what kind of phone should I select this purpose? Text mode or PDU mode. Iam going to do serial communication.
 

Hey,
You should select a phone which supports AT commands, which almost every phone available do. So, you should not have any problem. As for, the Text and PDU mode, you should send a command AT+CMGF=? to the phone to know whether it supports these modes or not.
If the response is (0,1), Then the phone supports both the SMS modes. If it is 0 then it supports only PDU mode and not the Text mode and henceforth...
I should tell you that programing in PDU mode is a little complicated than sending an SMS in Text mode. For further assistance on sending SMS you may consult the link:
www.dreamfabrics.com/sms
 

I have done such a project recently and its not much difficult ..... the thing is u just need to interface the GSM module with PIC using serial port .... like

GSM Module ====> Serial PORT (MAX232) ======> PIC

I have used 18F452 but first try it on hyper terminal and when u make sure that u r able to read n send msgs then interface it with PIC .....

I have bought the gsm module from TheEngineeringProjects.com but they work only in Pakistan its of about 20$
 

ya sure i am writing a tutorial on it on my blog and will send u the link ..... n btw search for AT commands ..... using these commands we send and receieve msgs using pic ..... save the incoming msg in array and then use this array to get the original msg ......
 

Do we need MAX232 to connect the GSM module to PIC since both work on TTL logic.

yups guys i want to make it correct ..... if we want to connect the gsm module with pc (i.e. to operate it with hyper terminal) then we need MAX232 but in PIC no need of MAX 232 ..... they can be connected directly TX pin of PIC into RX of module n RX into TX ..... correct it n sorry for the above mentioned line ....
 

yups guys i want to make it correct ..... if we want to connect the gsm module with pc (i.e. to operate it with hyper terminal) then we need MAX232 but in PIC no need of MAX 232 ..... they can be connected directly TX pin of PIC into RX of module n RX into TX ..... correct it n sorry for the above mentioned line ....

Hi, i'm currently working on a similar project. I planned to test if my gsm (g24-l) was working by hooking it up to my pc but spent days wondering why my gsm wont respond to my AT command (usb/serial on pc) - because i dont have the max232.

As mentioned you said that it can be interfaced straight away with the PIC (i.e gsm ---> pic18f4520 right?), how do i test if the gsm is working? for example, do i test it by writing "AT" and expect an "OK" response? kindly advice! Thanks!

Edit: Also, if my GSM is running on 3.3V supply while my PIC is on 5V, would i still need the ttl converter between pic and gsm? (not sure if it will fall into "undefined" region of pic, rmbr reading about undefined regions :S)
 
Last edited:

Hi, i'm currently working on a similar project. I planned to test if my gsm (g24-l) was working by hooking it up to my pc but spent days wondering why my gsm wont respond to my AT command (usb/serial on pc) - because i dont have the max232.

As mentioned you said that it can be interfaced straight away with the PIC (i.e gsm ---> pic18f4520 right?), how do i test if the gsm is working? for example, do i test it by writing "AT" and expect an "OK" response? kindly advice! Thanks!

Edit: Also, if my GSM is running on 3.3V supply while my PIC is on 5V, would i still need the ttl converter between pic and gsm? (not sure if it will fall into "undefined" region of pic, rmbr reading about undefined regions :S)

power supply doesnt make any issue ..... gsm n pic works accurately perfect when u connect them ...... n when u connect ur gsm directly to ur pic now u u have to send AT from ur PIC to the gsm but in the response the gsm creates ECHO so the output of ur gsm will be AT then comes ENTER and NEXT LINE which we also called carriage return and line feed and then comes OK .....

input ====> AT
output ===== > AT OK

i have spent my whole day in correcting this issue ...... and i will advise u to attach a LCD and check output on it as widout LCD its almost impossible to do it .....
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top