Saturday 11 June 2016

Automation Using GSM

Automation Using GSM

In Earlier post (Notice Board Display using GSM) I covered how to configure GSM module using AT commands similarly for Automation using GSM also similar operation is required.
use USB to TTL converter to create virtual com on your PC then connect your GSM module to USB to TTL converter and communicate with it using coolterm.

                                          USB-TTL converter



                                              USB-TTL -GSM interface
                                      1.Tx of USB-TTL to Rx of GSM
                                      2. Rx of USB-TTL to Tx of GSM
                                      3 Gnd to Gnd

                              1) Type AT it should respond with OK



                               2) Send AT+CMGL="REC UNREAD"
                                    it should respond with ok
                                   send AT +CMGF=1                       //text format
                                          again it responds with ok
                                    send AT+CMGD=1                      //delete message from location 1
                                          again it responds with ok
  

4) wait until it responds with call ready


                                 5) when new message is received it responds with +CMGI: "SM", 1
                                       //location 1 on SIM
                                    then send AT+CMGR=1
                                         //to read message


6) Based on character received you can perform switching action
Here in this example i controlled port 0_8, 0_9 pins based on char 'a' 'b' received
i) toggle LED 0_8 on char 'a'
ii) toggle LED 0_9 on char 'b'




                                                                                     download-code


No comments:

Post a Comment