- 2,8W Class D AmplifierPosted 6 days ago
- An Electronic LED Roulette you can self buildPosted 2 weeks ago
- An Open Source Sprinkler System powered by YúnPosted 3 weeks ago
- LED MATRIX: giant & stand-alone panelsPosted 4 weeks ago
- A 32-BIT FISHINO! WiFi, SD card, RTC, audio codec, LiPo and more…Posted 1 month ago
- A full featured mp3 DemoboardPosted 1 month ago
- A 32-BIT FISHINO board for your powerful IoT!Posted 2 months ago
- FairWind: when marine electronics, open source and the University meetPosted 2 months ago
- The Discovery of the Future: Stretchable integrated circuitPosted 2 months ago
- Robots are going to replace developers quicklyPosted 2 months ago
GSM Remote Control – 2 IN and 2 OUT DTMF
Part 4 – SMS Command
The set of commands of this remote is divided into two categories: the SMS ones and the DTMF tones.
The former are simply summarized in the corresponding table, since they are the same as the ones described for remote 2 IN/2 OUT.
Here we will only describe in detail the DTMF commands, first stating that unlike those from SMS, that can be sent any time, these can only be transmitted during a “phone call” with the module; in other words, after calling the number of the SIM Card in the remote or after having waited for the device to reply. The reply is made of three consecutive beeps when the password is requested, and just one in case the password is not needed. The necessary commands are divided into four categories: output management, input management, communication management and programming; there are ten of them and each of them is given with its own dual tone, that is with a key from the phone keypad.
There is also an eleventh dual tone, only valid in the programming mode. Let’s look at them in order, taking for granted we have already heard the remote’s reply.
Pressing button 1, the state of relay 1 is changed, meaning that such relay gets excited if it was at rest or is released if, before giving the command, it was excited; the same is done with button 2, but on RL2. These two commands regard the bistable mode. After every instruction the module replies with 1 beep if the relay, after the command, is excited; or with two acoustic notes if it is released.
But relays can also be set to function in an impulsive way, that is they can receive the order to momentarily reverse their condition. In the monostable command it is possible to change the state of a relay only for a certain range, that can be defined via SMS but also with the special DTMF programming. In this case, by change of state we mean that if a relay is in a certain condition (at rest or set by a previous bistable command), with command TIMx:tt it reverses its situation for the defined time. Always about this function, the dual tone for button 3 commands the temporary inversion on RL1 and button 4 on RL2. Also in this case the remote confirms the operations: an acoustic note indicates the relay has been temporarily activated, while two beeps indicate it has been put at rest.
From the keypad it is also possible to know the current state of the outputs: 5 requests the state of RL1 (usually one beep means the relay is active and 2 that it is at rest), 6 requests the state of RL2. All this regarding the relays.
About the commands regarding the inputs, key 7 requests the state of IN1 and key 8 of IN2; to both of them the module replies with an acoustic note when the corresponding optocoupler is conductive (presence of tension in the input) and with two if at rest (no tension or not enough tension for conduction).
Any time, once the command is considered finished, you can order the remote to end the communication: just press button 0.
Let’s finish by presenting the few DTMF programming operations that are initialized by entering the corresponding mode during a communication session; to do so it is necessary to send the dual tone with * key.
For the access a password is needed, it must always be introduced from the keypad and it is the same to the one to be sent in the SMS mode (by default it is 12345). During the connection and recognition phase, the system communicates sending 3 consecutive beeps, in order to proceed the password is needed.
Once the password has been introduced and recognized, the systems produces a beep in the phone’s receiver indicating it is possible to proceed.
After the authentication phase, 1 sets the monostable time of the relay 1: the waiting time of that setting is indicated by two beeps. It is possible to set a value between 1 and 9 seconds (keys 1 to 9).
The same is done for RL2 by pressing key 2. Every time a value is set, the acquisition by the remote is indicated by 1 beep.
To exit the programming mode and return to the normal mode (DTMF command) it is necessary to send the dual tone produced by key #.
But before taking a look into the construction notes, it is necessary to analyze the SMS commands that are different from other versions of the remote and that only refer to the settings for DTMF commands. The first one enables or disables the filter for incoming calls; it is given by a message with the text FILx, where in place of x you use 1 if you intend to block the access (the remote’s reply to incoming calls) to numbers that are not in the list, 0 if you want to allow the remote to reply to calls coming from any phone number.
The second one allows to set the module so that, after replying to incoming calls, it requests the access password to the DTMF command: it is given by sending an SMS with the text SICx, where instead of x you write 0 if you want the access to the command to be free and 1 if, instead, you want that once the reply from the remote is obtained, the DTMF command can be given only by the users having the password.
We now introduce the last commands, the ones about the definition of the monostable activation times, but from SMS; this opportunity is given in order to extend the state inversion ranges in the impulsive command over the nine seconds set through the phone keypad.
There are two messages (one for each relay) with the same syntax; to send them it is necessary to send a SMS to the remote (from a phone number in the list) with the following text: TIM1:xx, where xx stands for the time in seconds – 00÷59; this is valid for channel 1, for channel 2 the text to add in the SMS is TIM2:xx.
Always talking about outputs, there is a command that lets you know the current time set for the monostable mode, without the need to call the remote and interrogate it by means of DTMF: it is a SMS with the text TIM?, to this message the system replies by sending, to the phone number that sent the SMS, one message that summarizes the defined ranges for relays 1 and 2.
All configuration commands for the remote control mode and remote alarm mode are accepted by the device only if they come from one of the eight possible telephone numbers stored in the list. Of course, we have prepared a solution to operate the system when it is first started, a condition in which, lacking any stored number, it would not recognize any user: all messages regarding the storage of phone numbers in the list are recognized and the corresponding commands executed, even if coming from unknown phone numbers, if they include the password.
During the first start-up and after a complete reset, for three minutes the circuit gets ready to store the phone number that will make the call (Easy Setup function) and to store it in the first position in the list.
After that time, in order to add a number, cancel an existing one or check that the numbers have already been stored, it is necessary to use the special SMS commands.
Please note that some of them must include the password, even if coming from numbers already stored in the list: they are the ones related to numbers request, cancellation of dispositions that contain numbers and replacement of an existing number (that is when the position you want to write on is already occupied by a number).
The password is a five-digit number; after the first start-up or a complete reset of the system, it is defined, by default, as 12345. It is possible to change it, any time, with a special command via SMS, obviously including a password (which must be the current one).
The set of commands also includes the reset: sent via SMS from one of the numbers in the list, it takes the remote back to the initial conditions, as it cancels the stored numbers and changes to the settings regarding the operating mode of inputs and outputs. Being a very important command, the remote takes it into consideration only if it includes the password.