SMS control for Relays


Closed Thread
Results 1 to 16 of 16
  1. #1
    Join Date
    Sep 2003
    Location
    INDIA
    Posts
    161

    Default SMS control for Relays

    Hello all,

    I successfully tried out this code to control a bank of eight relays using SMS over GSM network. Just thought of sharing it with all so that others could use it.

    Hardware setup:
    Processor : 16F72
    PortB : Connected to relays via ULN2803 driver IC.
    PortA: 16x2 LCD
    Modem : SIMCOM GSM/GPRS Tri Modem

    Consideration : The Modem is configured @ 9600 baud. Pin #7 and #8 are shorted at the 9 pin D connector on the Modem Side. AT+CMGF=Text. ATE0 (no echo). The code shows control of only 4 relays but you can add all eight to it. This code can be optimised for code space , but can be used as a starting point.

    regards
    Attached Files Attached Files

  2. #2
    Join Date
    Jan 2006
    Posts
    31


    Did you find this post helpful? Yes | No

    Default Sms

    Nice work charudatt,

    Would it be possible deploying this stuff of yours to PIC16F628A using onboard crystal.

    Can you give further explanations on the DEBUG statements? I'm curious about functionalities of those lines especially the extraction of SMS from a cell phone.

    Is there a way of eliminating the MODEM? What models of cellphones should i use?

  3. #3
    Join Date
    Sep 2003
    Location
    INDIA
    Posts
    161


    Did you find this post helpful? Yes | No

    Default Thank you.

    Emavil,

    1. I believe you can do it on the F628A.
    2. Simply go through the Compiler Manual and you shall know about the Debug statement. I used the debug statement to save on code space.
    3. Modem ? No I am using a Industrial type Mobile which has a Serial Port control and accepts AT commands. Type Simmcom. Yes , I you see this month's EPE magazine , you will come across a similar project using the Nokia phones.

    regards

  4. #4
    Join Date
    Jan 2006
    Posts
    31


    Did you find this post helpful? Yes | No

    Default SMS control for Relays

    Thanks for that.

    I'm not refering to the DEBUG command, instead, those AT commands. Can you share to me the basic principles (background) on how to extracting SMS messages from a cellphone. I find it hard interpreting your code especially those AT commands. I know that there are special registers in the cellphones to deal with. What interest me most is the theory behind the extraction of these messages.

  5. #5
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by emavil View Post
    Thanks for that.

    I'm not refering to the DEBUG command, instead, those AT commands. Can you share to me the basic principles (background) on how to extracting SMS messages from a cellphone. I find it hard interpreting your code especially those AT commands. I know that there are special registers in the cellphones to deal with. What interest me most is the theory behind the extraction of these messages.
    ............................
    Last edited by skimask; - 22nd March 2007 at 00:17. Reason: Abosulutely fine answer and hints removed due to possible legal issues...

  6. #6


    Did you find this post helpful? Yes | No

    Default sms

    Two questions
    DEBUGIN [WAIT("+CMGR:"), SKIP 53 , DEC MYDATA]
    if i understand your code correct you are expecting a byte value in MYDATA what will happen if this is bigger than a byte

    2nd question
    I am using a MC55 modem from siemens
    +CMGR: "REC UNREAD","+27829554322",,"08/04/19,13:08:34+08"
    test
    if i only want to extract the cell number will this be the correct command, as what do i need to conf cellNumber and what will happen to the rest of the serial string comming in
    DEBUGIN [WAIT("+CMGR:"), SKIP 16 , cellNumber]

  7. #7
    zouzanda's Avatar
    zouzanda Guest


    Did you find this post helpful? Yes | No

    Default

    hello all if my modem is nokia phone what can i change to make it work?

  8. #8
    Join Date
    Apr 2009
    Posts
    5


    Did you find this post helpful? Yes | No

    Default

    anybody share Schematic diagram ??? i really wana use it..

    Quote Originally Posted by charudatt View Post
    Hello all,

    I successfully tried out this code to control a bank of eight relays using SMS over GSM network. Just thought of sharing it with all so that others could use it.

    Hardware setup:
    Processor : 16F72
    PortB : Connected to relays via ULN2803 driver IC.
    PortA: 16x2 LCD
    Modem : SIMCOM GSM/GPRS Tri Modem

    Consideration : The Modem is configured @ 9600 baud. Pin #7 and #8 are shorted at the 9 pin D connector on the Modem Side. AT+CMGF=Text. ATE0 (no echo). The code shows control of only 4 relays but you can add all eight to it. This code can be optimised for code space , but can be used as a starting point.

    regards

  9. #9
    Join Date
    May 2008
    Location
    Italy
    Posts
    825


    Did you find this post helpful? Yes | No

    Default

    anybody share Schematic diagram ??? i really wana use it..
    Welcome to the forum. You can download it @ http://techni.caliti.es/blog/2008/12...ontroller.html

    Al.
    All progress began with an idea

  10. #10
    Join Date
    Sep 2003
    Location
    INDIA
    Posts
    161


    Did you find this post helpful? Yes | No

    Default

    Hey Good compilation.

    regards
    Charudatt

  11. #11
    Join Date
    Apr 2009
    Posts
    5


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by aratti View Post
    Welcome to the forum. You can download it @ http://techni.caliti.es/blog/2008/12...ontroller.html

    Al.
    Dear, upper attached codes for PIC16F72 and schematic for PIC16F873 is that ok?

    please let me know..

  12. #12
    Join Date
    May 2008
    Location
    Italy
    Posts
    825


    Did you find this post helpful? Yes | No

    Default

    Dear, upper attached codes for PIC16F72 and schematic for PIC16F873 is that ok?
    If you use the downloaded schematic you must also use the downloaded software (which is for pic16F873)

    Al.
    All progress began with an idea

  13. #13
    Join Date
    Apr 2009
    Posts
    5


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by aratti View Post
    If you use the downloaded schematic you must also use the downloaded software (which is for pic16F873)

    Al.

    sir, actually i want to change something into codes therefore i am asking for its schematic..

  14. #14
    Join Date
    Apr 2009
    Posts
    5


    Did you find this post helpful? Yes | No

    Default anyone help me out?

    Quote Originally Posted by iamWaQas View Post
    sir, actually i want to change something into codes therefore i am asking for its schematic..
    is there anyone help me?

  15. #15
    Join Date
    May 2008
    Location
    Italy
    Posts
    825


    Did you find this post helpful? Yes | No

    Default

    If you want to change things, then you have to download the code from post#1
    and draw your own schematic in function of the pins arrangement of the code downloaded.

    You can take as example my schematic for pic16F873 but remember that you have to reconfigure all the pins for the different picmicro and the different approch used by charudatt.

    This is not very complicated and you will learn a lot in doing it.


    Al.
    Last edited by aratti; - 1st May 2009 at 09:07.
    All progress began with an idea

  16. #16
    Join Date
    Apr 2009
    Posts
    5


    Did you find this post helpful? Yes | No

    Default Thanks sir,

    Quote Originally Posted by aratti View Post
    If you want to change things, then you have to download the code from post#1
    and draw your own schematic in function of the pins arrangement of the code downloaded.

    You can take as example my schematic for pic16F873 but remember that you have to reconfigure all the pins for the different picmicro and the different approch used by charudatt.

    This is not very complicated and you will learn a lot in doing it.


    Al.

    really really thanks sir, i will do and inform you about it..

Similar Threads

  1. sms to control pic..pls help...
    By Ziki in forum mel PIC BASIC Pro
    Replies: 53
    Last Post: - 12th April 2010, 21:19
  2. Replies: 11
    Last Post: - 19th August 2009, 15:23
  3. Siemens c55 sms control help please
    By camolas in forum mel PIC BASIC Pro
    Replies: 85
    Last Post: - 20th August 2008, 01:13
  4. Reading a SMS to an array
    By KA5MAL in forum GSM
    Replies: 3
    Last Post: - 17th June 2008, 17:24
  5. Control RC servo via Parallax Servo Control
    By cibotsan in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 17th September 2005, 08:18

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts