PDA

View Full Version : SMS control for Relays



charudatt
- 23rd April 2006, 07:08
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

emavil
- 14th March 2007, 00:14
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?

charudatt
- 14th March 2007, 05:07
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

emavil
- 22nd March 2007, 00:56
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.

skimask
- 22nd March 2007, 01:15
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.

............................

Andre_Pretorius
- 19th April 2008, 12:51
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]

zouzanda
- 8th December 2008, 13:44
hello all if my modem is nokia phone what can i change to make it work?

iamWaQas
- 27th April 2009, 21:47
anybody share Schematic diagram ??? i really wana use it..


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

aratti
- 28th April 2009, 09:30
anybody share Schematic diagram ??? i really wana use it..

Welcome to the forum. You can download it @ http://techni.caliti.es/blog/2008/12/sms-io-controller.html

Al.

charudatt
- 28th April 2009, 11:46
Hey Good compilation.

regards
Charudatt

iamWaQas
- 28th April 2009, 18:10
Welcome to the forum. You can download it @ http://techni.caliti.es/blog/2008/12/sms-io-controller.html

Al.

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

please let me know..

aratti
- 28th April 2009, 18:50
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.

iamWaQas
- 28th April 2009, 20:09
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..

iamWaQas
- 30th April 2009, 23:01
sir, actually i want to change something into codes therefore i am asking for its schematic..

is there anyone help me?

aratti
- 1st May 2009, 09:03
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.

iamWaQas
- 2nd May 2009, 00:08
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..