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.

receiving sms from GSM MODEM to control a stepper motor byAT89c51

Status
Not open for further replies.

daleth

Newbie level 5
Joined
Jan 14, 2012
Messages
9
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,339
hello friends is it possible to program AT89C51 to receive a particular type of an SMS from modem connected to its serial port to drive a motor interfaced with ULN 2003
 

please friend,why pic16F452? more ideas
 

It's possibly with any processor that has a serial interface and sufficient program storage to hold the code, also a C51.
 
  • Like
Reactions: daleth

    daleth

    Points: 2
    Helpful Answer Positive Rating
thank,but can any body help me with any idea of the program, or a link
 

As a first step, you need to understand how to configure the modem to do what you want. I think it's reasonable to make the modem send all received SMS as unsolicited result directly to the terminal instead of storing them on the SIM card, which is the default mode. The +CNMI command can be used to change the setting.

The next step is to decode the +CMT SMS delivery messages in your program.
 
  • Like
Reactions: daleth

    daleth

    Points: 2
    Helpful Answer Positive Rating
you can use At89c51/s52/c52 with L293D motor driver.. to test GSm Module check the below info


PRODUCT NAME : GSM MODEM
HARDWARE : SIM 300 MODULE
COMMUNICATION : RS232
COMMANDS : AT
INPUT VOLTAGE : 12VDC / 1AMP
*************************************************************************************************************************
ANTENNA - PULL THE ANTENNA OUT IF THE SIGNAL IS WEAK

HOW TO TEST!!!!

1. INSERT THE SIMCARD INTO SIM TRAY BACKSIDE
2. CONNECT THE RS232 CABLE TO THE PC SERIAL PORT - SERIAL PORT PROPERTIES ( RESTORE DEFAULTS - 9600 BAUD RATE)
3. OPEN HYPERTERMINAL FROM WINDOWS START>PROGRAMS>ACCESARIES>COMMUNICATIONS>HYPERTERMINAL
4. SELECT THE COMPORT WITH BAUD RATE 9600
5. TYPE "AT " ECHO "OK" IF ECHO IS OK COMMUNICATION IS OK !!!!!!!!!+


6. CHECK THE LED STATUS ( NETWORK SERCHING , NETWORK CONNECTED, IS SHOWN IN LED STATUS GIVEN BELOW)
****************************************************************************************************************************
Working state of network status indication LED OUTPUT

State SIM300 function

Off SIM300 is not running
64ms On/ 0.8SEC Off SIM300 does not find the network
64ms On/ 3 SEC Off SIM300 find the network
64ms On/ 300ms Off GPRS communication
*****************************************************************************************************************************

TO CHQ GAIN - AT+CSQ=?
TO CHK NETWORK - AT+COPS=?


Examples for send and receive SMS

For sending SMS in text Mode:

AT+CMGF=1 press enter
AT+CMGS=”mobile number” press enter
Once The AT commands is given’ >’ prompt will be displayed on the screen.
Type the message to sent via SMS. After this, press ctrl+Z to send the SMS.
If the SMS sending is successful, “ok” will be displayed along with the message number.


For reading SMS in the text mode:
AT+CMGF=1 Press enter
AT+CMGR= no.
Number (no.) is the message index number stored in the sim card. For new SMS, URC will be received
on the screen as +CMTI: SM ‘no’. Use this number in the AT+CMGR number to read the message.
Voice call
Initiating outgoing call:
ATD+ mobile number; press enter
For disconnecting the active call:
ATH press enter
For receiving incoming call:
ATA press enter



**************************************************USEFUL AT COMMANDS FOR SETTINGS *****************************************************************

TO CHANGE BAUDRATE - AT+IPR=BAUDRATE(Ex 9600) 0-115200 For maore details refer AT commands Document page 33

TO SAVE THE SETTINGS AT&W

TO RESTORE FACTORY DEFAULTS TYPE AT&F THEN SAVE IT AT&W
 
  • Like
Reactions: daleth

    daleth

    Points: 2
    Helpful Answer Positive Rating
thanks friends let first work on that
 

As a first step, you need to understand how to configure the modem to do what you want. I think it's reasonable to make the modem send all received SMS as unsolicited result directly to the terminal instead of storing them on the SIM card, which is the default mode. The +CNMI command can be used to change the setting.

The next step is to decode the +CMT SMS delivery messages in your program.

thanks,
i have to wait for the message to arrive to modem,then i move it to atmega32, then i want to parse the sms to identify, whether it correct sms and phone number to switch on the motor, then switch the motor if the sms and phone number are correct then i go back to wait for another sms,
please can you help me with the sample code in c to this, as i have tried but i running out of time to presentation date,or send any help code to my email;cjdaletho981@gmail.com
 

first delete the first message in your inbox with AT+CMGD=1
Then Check for
+CMTI: SM,‘1’. //for new incoming message that will store at 1st location in inbox
Then read the 1st message AT+CMGR=1
Check for the correct message if it is there then switch on motor and
delete the first message with AT+CMGD=1//if correct message is not there also delete it
again wait for new message..
I think Nobody is here to provide code
But all are here to guide you
Dont expect Ready made code..
Try with yourself
All the Best
 

aameer said:
i have to wait for the message to arrive to modem,then i move it to atmega32, then i want to parse the sms to identify, whether it correct sms and phone number to switch on the motor, then switch the motor if the sms and phone number are correct
When a new sms has arrived, you will receive an asynchronous +CMT string (this means you will receive a string without a question from your side). All the above information you need is inside this string.


aameer said:
then i go back to wait for another sms
"AT+CMGD=1" can be used to delete selected sms as already pointed out, but since you are working with one message, there is the possibility to erase them all using the command "AT+CMGD=0,4".
 

thanks dear friend,
you help has push me far with my project, but i have faced another challenge that needs you help,i want store a number that i use for sending the sms to run the stepper motor,and use it to verify any phone number used to sent sms to run the motor, where do i store this phone number? and how can achieved this?.
you reply means a lot to me thanks
 

daleth said:
i want store a number that i use for sending the sms to run the stepper motor,and use it to verify any phone number used to sent sms to run the motor, where do i store this phone number? and how can achieved this?.
If it is a number that is not to be changed ever, then you can store it in FLASH memory. When SMS arrives, you can compare the sender of the SMS with this number.
If on the other hand this number can be changed, then you store it in EEPROM and the rest of the procedure is the same.
 

ya alexxx is right...
for non changeable number you can use commands
AT+CMGS="xxxxxxxxxx" //replace xxxxxxxxxx with 10 digit number
enter
as from sim300 you will get reply as '>'
then type the message you want to send
and press CTRL+Z
on delivery of message you will get OK as reply

Hope this will help you
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top