All Item Include
SMS Remote Controller With Ericsson
GSM : T10, T18, 28
With this circuit we can controll up to 8 devices by sending a specific SMS message with any mobile phone. Its very usefull at the cases that, at the place we have the devices, we have not a wired telephone line. If you have an old ericsson mobile phone and you are not using it, its the time to build some useful with that. The controlling that we can do to the devices, its only ON or OFF.
The hardware of the circuit its very very simple, because the communication port of ericsson mobile its working at the 5 volts with AT commands ( like the modem commands, but for mobile phones).
The firmware of the AT90S2313 its very complicated because, we have to convert the 'septets' of the phone to 'octets' because the AVR need bytes with 8 bits length ( The 'septet' is 1 byte with 7 bits length and 'octet' is 1 byte with 8 bits length). All this proccess its necessary to decode the message from SMS.
When you finish the circuit connect it to the mobile phone, turn on the phone and then power on the circuit, not before . The AVR now its trying to read the message from the 1st memory location of the phone, for that i suggest to delete all SMS messages from the phone before connect it to the circuit. If there is no message to the 1st memory location, the AVR its trying again until you sent any.
The format of the message must be only '1' or '0'. '1' to enable, or '0' to disable the device. The message must have only 8 numbers, '1' or '0' , alone or mixed .
Example: if you send the message 11000100 then you enable, starting from the right, the devices 3,7,8 ('1') and disabling the devices 1,2,4,5,6 ('0') .
If you want to send a new message and you don't want to change some device, must send the same number as the old message.
Example: If you want to enable only the 5th device, you must send a new message like 11010100 to keep the other devices as there are (we send the same message as the old ( 11000100 ) and we change only the 5th bit from '0' to '1' to enable the device ).
You sould write only '1' or '0' characters to your SMS message with NOT any letter or symbol like 'A' , 'B' , '$' or '@' etc . At this case the AVR will disable the device of this message potition. If you send the message 10111$00 , then except the device 1 and 2, the AVR will disable the 3th device too.
If you want to protect your devices from other person's messages, modify the source code, to read the AVR, your telephone number before execute any message. In the source code i have some part of code, to read the telephone number, the service center number, the date and the time of the received message.
The project its based on the Greek mobile phone network of ' Telestet ' and i don't know if the SMS message in other country, have the same syntax ( I mean the form of the septets that the GSM receiving from the GSM network ).
After the GSM receive the message, the AVR execute it, delete it from the phone memory, to release the 1st memory location and start again to search for a new message.
If you connect the pin 1 (PD0) of the AVR to MAX 232 chip and this to computer, you will see at the terminal window software, all the data that the GSM is send to the AVR (Sender's number, service center number, date, time and the AT commands ) . Setup the COM port to 9600 bps 8n1.
I have test it only with Greek sim cards and T10s mobile phone. I don't know if this circuit its working fine to other countries or other mobile phone models. You can build the diagnostic circuit that is in the dot frame of the schematic, and to connect the circuit with PC via RS232 port.
When you power-on the circuit and the phone, the AVR it will send the follow commands to the mobile phone:
1) AT+CPMS="ME" (Select the phone memory "ME")and
2) AT+CMGR=1 (read the received message from memory possition 1)
If the mobile phone will response with:
AT+CMGR=1[CR][CR][LF] (this message its sended when there is no message in the phone memory)
+CMS ERROR: 500[CR][LF]
At this case the AVR it will send again the commands 1 & 2
If the mobile phone will response with:
AT+CMGR=1[CR][CR][LF] (this message its sended when a new message arrive in the phone memory)
(xxxxxxxxxxxx is the phone number of the sender)
the AVR will decode the septets message to octets, execute it (arm or disarm the relays) and send the command
AT+CMGD=1 (delete the received message from memory possition 1) to delete the message from the phone memory.
You can see the voltage of the PortB with any voltmeter if you have +5 or 0v voltage, to check if the command you send, for example"11001010", its executed.
Download the schematic, source code and the Hex files
of SMS remote controller project smscontroller.zip