Microcontroller › 8051 › gsm module interface
- This topic has 13 replies, 6 voices, and was last updated 10 years, 1 month ago by
Kumar.
-
AuthorPosts
-
June 16, 2012 at 3:08 pm #1846
ritesh
Participantcan u explain the logic for interfaceing of 8051 with gsm module.
i want to make the project for monetoring of temperature using gsm module through sms. i dont want to use pc.
June 16, 2012 at 4:11 pm #8055Amrith
ParticipantHi Ritesh,
GSM Module can be interfaced to 8051 through UART(Tx & Rx Pins), visit engineers garage for reference circuit. You can interface temparature sensor to 8051 using ADC.
Procedure:
1. Start with UART communication & interface with GSM module & send message using microcontroller.
2. Interface ADC & read temperature values and send the same using GSM.
June 16, 2012 at 4:27 pm #8056AJISH ALFRED
ParticipantHi Ritesh,
Temperature sensor give analog value as its output. So we should connect it to any adc channel of the controller to read the corresponding digital value.
GSM module can be connected to the controller through the uart pins. We can communicate with the module using AT commands for message sendind, receiving and all.
Try some sample codes for adc interfacing, serial communication. Then learn AT commands and you are ready to do the project.
Simply read value from adc and send AT commands for sms sending which includes this value in the message text.
June 17, 2012 at 3:10 am #8060ritesh
Participantthanks amrith and ajish.
June 17, 2012 at 3:14 am #8061ritesh
Participantsir plz give me the modal no. of gsm module which is use and low cost gsm module price.
June 17, 2012 at 7:50 am #8062Amrith
ParticipantHi Ritesh,
You can try SIM300 module from SIMCOM company, which is low cost & easily available in the market.
June 19, 2012 at 1:19 pm #8080February 17, 2013 at 9:34 am #9144samdany
ParticipantHi,i am sam….i already sended text sms via GSM modem.but how i send my Microcontroller ADC value in decimal formate .such as Run Temp:200 Deg. Power:200 Amp.i use Micro C code.
February 17, 2013 at 10:10 am #9145AJISH ALFRED
ParticipantHi Samdany,
I hope you are familiar with the printf() function in C. You can make use of the same function in your microcontroller coding. I don’t know which microcontroller are you using. Just google it to know how to do it in your microcontroller.
February 18, 2013 at 9:03 am #9150samdany
ParticipantI used pic18F4550.now i want to send ADC decimal value via gsm modem.sim300.such as Temp:345 C ,please give a code sample in microC
Thanks for your friendly reponse.
February 18, 2013 at 6:17 pm #9155AJISH ALFRED
ParticipantHi,
I’m posting the following code just to show you how can we make use of the printf function in microcontroller coding. The uart_print () code has been written for AVR actually, but you can refer the file initialization and the function prototype.
//==============================================================
/
FILE uart_out = FDEV_SETUP_STREAM(uart_print, NULL,
_FDEV_SETUP_WRITE);int uart_print(char c, FILE *stream)
{
//
this much code is written for avr
//
if (c == ‘n’)
uart_print(‘r’, stream);
loop_until_bit_is_set(UCSRA, UDRE);
UDR = c;
return 0;//
this much code is written for avr
//
}int main ()
{
unsigned char adc_val;
usart_init ();
adc_init ();
adc_val = adc_get ();
stdout = &uart_out;
printf ( “nTemp:%d C”, adc_val );
}
//==============================================================
/
Hope this helps you.
February 19, 2013 at 10:15 am #9158samdany
Participantthanks for your help…i already done this projecs..
have a nice day…
February 19, 2013 at 1:42 pm #9159AJISH ALFRED
ParticipantYou are welcome. Congrats and have a great day…!
February 28, 2013 at 5:48 pm #9205Kumar
ParticipantHi all,
for my final project, i have to interface gas sensor and gsm module with microcontroller to measure air quality in different place in the city. My system send back gas and position measure. Then i chose to use SIM908 for GPS module included.
Can somebody help with idea about power supply and code?
Please Samdany, can u send me the code of yr project. i think to find a way by analysing it. my mail is [email protected]
thanks!!!
-
AuthorPosts
- You must be logged in to reply to this topic.