martes, 20 de septiembre de 2011

New version

Based on the circuit and program published in previous posts I made some improvements with the following results.
At first only use one input and one output, but nothing prevents you from adding more inputs and more outputs.
In general the system allows you to enable or / disable an output by sending an sms.
When an input is activated, it sends a sms at two cellphone with the word "Panic".
You can ask the system a report about the status of inputs and outputs by sending a sms.
The entire system is programmed by sending a sms, when I refer to program, means that to change the system password, I need to send a sms and the same for changing cell phone numbers used by the system to send a sms when an input is activated.
The password and the cell phone numbers are stored in the EEPROM of the pic.

The syntax of the message being sent is: Command # Password.
Command
Action
On
Set output
Off
Reset ouput
Estado
Ask a system  report
Pwd
Change the password
Num1
First cellphone number is stored
Num 2
Second cellphone number is stored


Example 1:The default system password is 1234 to change it to 5555 send the sms:

Pwd5555#1234
The system forwards the following sms: "The new password was accepted"

Example 2: To store the first cellphone number in eeprom send the sms:

Num1+59812345678#1234 (+598 international prefix of my country and 12345678 cell phone number).

The system forwards the following sms: "The new phone number was accepted"

Example 3: To turn on the output send the sms

On#1234

The system forwards the following sms: 
Input - Ouput
1           1
D          A
D= Disable  A= Active

Example 4: To ask a system report send the following sms:

Estado#1234
The received sms is the same of example #3

IMPORTANT!! For each command to be sent, the system resoponds with a sms.
The interesting thing is that the system always answers to the phone that sent the command, in particular, any one who knows the command and password can use the system.
I think this is a good thing because the numbers of users are unlimited.
If someone forgot the password can be reset and return to the default password by following this procedure: turn off the system and connect the input to ground then turn on and wait 10 second the password will change to 1234, don't forget to disconnect the input.

No hay comentarios: