10
LOW-COST GSM REMOTE CONTROL by BORIS LANDONI Hi-tech Elettronica In ~ Maggio / Giugno 2010 39 A modular solution able to perform a number of remote control functions using a single circuit. Being a GSM/GPRS module, it comes in two different versions, thanks to an adapter printed herein described along with its first practical application: a GSM remote gate opener. ast month we started de- scribing our new remote control module –a novelty in that it can perform various functions using a single circuit; among such functions are dou- ble entrance and exit remote control, wireless thermostat, gate opener, and DTMF key via GSM. Indeed, the basic printed board is structured in such a way that it can host all the components necessary for all these functions to be performed; thus, in order to get only one function, it is enough L

GSM Remote Gate Opener

Embed Size (px)

Citation preview

Page 1: GSM Remote Gate Opener

LOW-COST GSM REMOTE CONTROL

by BORIS LANDONI

Hi-tech

Elettronica In ~ Maggio / Giugno 2010 39

A modular solution able to perform a number of remote

control functions using a single circuit. Being a GSM/GPRS module, it comes in two different versions,

thanks to an adapter printed herein described along with its

first practical application: a GSM remote gate opener.

ast month we started de-scribing our new remote

control module –a novelty in that it can perform various functions using a single circuit; among such functions are dou-ble entrance and exit remote control, wireless thermostat, gate opener, and DTMF key via GSM. Indeed, the basic printed board is structured in such a way that it can host all the components necessary for all these functions to be performed; thus, in order to get only one function, it is enough

L

Page 2: GSM Remote Gate Opener

40 Maggio / Giugno 2010 ~ Elettronica In

to use only those com-ponents related to that particular function and then upload the relative firmware in the micro-controller managing the module itself. Now that the circuit has been described, let’s look at its first application: its use as a GSM-activated gate opener. Before we turn to that, however, we will find out how the module containing the GSM mobile phone is re-alized and works, which we had intentionally glossed over in our pre-

vious presentation. We use the word ‘module’ because, unlike what we did in our previous remote control projects, this time around the mobile phone is not mounted on a printed board, but rather on a small auxiliary board which is then inserted in a connector specifi-cally created on the main printed board; though this alternative may seem rather complex at first blush, it does have two advantages: the first is that if the GSM mod-

ule should stop working, and you should not be able to find the same model, you can simply replace it with a differ-ent module without hav-ing to replace the entire circuit board. All you need to do is create a small board compat-ible with your unit, with the pin strips arranged as required by the circuit board. The second advantage is that the module’s printed board is double-faced and can thus host a GSM module on one face and a dif-

ferent one on the other. This provides the option of choosing between two different mobile phones according to one’s needs.

THE GSM MODULELet us begin by describ-ing the module host-ing the mobile phone: it is a printed circuit board measuring about 1.75x1.95 inches, with two pin strips (a 3-pin one and a 16-pin one) used to connect with the circuit board of the remote control device; the first pin strip carries digital power (both positive and negative), in addition to the igni-tion control line (PWR), while the second strip contains all the com-munication signals and lines to and from the GSM module, as well as the analogical section of the phones (AGND, contact 11). This pinout remains unchanged re-gardless of which of the two modules (SIM900 from SIMCom or M10 from Quectel) is in use.Let’s now take a look at the electrical scheme, which displays the connections for both modules; recall that either GSM1 or GSM2 will be used. The two components have more or less the same command lines, so the relative pins can be connected together with the pin-strip contacts. The main differences be-tween the two modules are found in their reset properties. SIM900 is

The SIM900 moduleOne of the GSM modules that we can use for our project is SIM900 by SIMCom. This is a GSM/GPRS-compatible Quad-band cell phone, which works on a frequency of 850/900/1800/1900MHz and which can be used not only to access the Internet, but also for oral communication (provided that it is connected to a microphone and a small loud speaker) and for SMSs. Externally, it looks like a big package (0.94 inches x 0.94 inches x 0.12 inches) with L-shaped contacts on four sides so that they can be soldered both on the side and at the bottom. Internally, the module is managed by an AMR926EJ-S processor, which controls phone communication, data communication (through an integrated TCP/IP stack), and (through an UART and a TTL se-rial interface) the communica-tion with the circuit interfaced with the cell phone itself. The processor is also in charge of a SIM card (3 or 1,8 V) which needs to be attached to the outer wall of the module. In addition, the GSM900 device integrates an analog interface, an A/D converter, an RTC, an SPI bus, an I²C, and a PWM module. The radio sec-

tion is GSM phase 2/2+ compatible and is either class 4 (2 W) at 850/ 900 MHz or class 1 (1 W) at 1800/1900 MHz. The TTL serial interface is in charge not only of com-municating all the data relative to the SMS al-ready received and those that come in during TCP/IP sessions in GPRS (the data-rate is determined by GPRS class 10: max. 85,6

kbps), but also of receiv-ing the circuit commands (in our case, coming from the PIC governing the remote control) that can be either AT standard or AT-enhanced SIMCom type.The module is supplied with continuous energy (between 3.4 and 4.5 V) and absorbs a maximum of 0.8 A during transmis-sion.

Page 3: GSM Remote Gate Opener

Elettronica In ~ Maggio / Giugno 2010 41

equipped with a specific reset line, while in the case of M10 it is neces-sary to turn the power off and short-circuit the VDD_EXT line. In real-ity, in order to simplify things, the microcontrol-ler’s firmware handles both GSM modules in the same way: in order to reset them, it turns off the main power supply and short-circuits the abovementioned line for just a second. How is power han-dled? The PWR line is needed by the mi-crocontroller to turn the GSM module on and off. The modules that are used are constantly under tension, provided by the Vcc line to pins 55, 56, 57 for SIM900 and to pins 50, 51, 52 in the case of M10; these modules are turned on or off according to the logical level applied to their PWR line (pin 1 of GSM1 or pin 18 of GSM2) . The PWR line is equipped with an internal pull-up resistance and is active at logical zero; therefore, in order to switch the cellular module on, the microcontroller sets PWR at a high logical level (contact 1 of the pin-strip) and causes transistor T2 to saturate; this transistor will then sets the PWR line for both GSM1 and GSM2 at a low level.Reset monitoring is handled similarly, ex-cept that in the case of

SIM900 there must be a reset input (NRESET, active at logical zero and equipped with a pull-up internal resis-tor), whereas in order to reset the M10 module one must resort to a little artifice. In the first case, the module can be reset by simply caus-ing the microcontroller to send a logical 1 via the VDD_EXT line,

at which time the T3 transistor saturates and sets the NRESET line of GSM1 at a low level; when this happens, the module’s VDD_EXT is taken to logical 1. As for M10, since it has no reset input, it can only be rest by dragging pin 7 (VDD_EXT) to logical zero, after having done the same with the PWR contact of the pin-strip

(1) so that transistor

2 can be inhibited; at this point, contact 6 (VDD_EXT) can be taken back to a high level and con-tact 1 of the connector can be taken to logical 1 so that T2 can saturate and PWR of GSM2 can be set at logical zero. For the time being, in order to standardize the functioning of the microcontroller govern-ing this device and make sure that it works inde-

The M10 moduleTTL serial interface that allows it to communicate with the device that uses the cell phone (our circuit’s PIC) as well as to receive commands –standard AT commands, in the case of data phone connection. Aside from its own microphone, this module integrates a Flash and a SRAM, a UART, as well as inter-

faces needed for LCD display, audio, keyboard, and external SIM.The module is encapsu-lated in a package meas-uring just 1.14 inches x 1.14 inches x 0.14 inches, for SMD with 64 pins placed laterally, and reaching underneath the sides; it consumes 3,4÷4.5 V but, when idle, absorbs only 1,1 mA.

The alternative to the SIMCom module is M10, produced by Quectel. This module, too, is GSM/GPRS (GSM Phase 2/2+) compatible and is a Quad-band type; the radio sec-tion works at a frequency of GSM 850 MHz, GSM 900 MHz, DCS 1800 MHz, and PCS 1900 MHz. GPRS compatibility occurs in class-12 multi-slot modality, schemes CS-1, CS-2, CS-3 e CS-4. The GPRS connection supports TCP/UDP, FTP e HTTP protocols. The RF section is class 4 (2W) in GSM 850 MHz and GSM 900 MHz bands and class 1 (1W) in DCS 1800 MHz and PCS 1900 MHz. The module is managed by a microcontroller and has a

Page 4: GSM Remote Gate Opener

42 Maggio / Giugno 2010 ~ Elettronica In

pendently of the mobile phone mounted on the module, the reset is performed by simply setting the PWR contact (1) at logical zero and turning off GSM; after that, VDD_EXT (contact 6) is set at logical zero so that the condensers inside the cellular module can be forcibly discharged, thus avoiding that (had they been left charged) they might cause initialization problems and malfunctioning when the device is restarted (that is, when PWR goes back to logical 1). Nothing prevents those who are good at programming from modifying the firmware in order to customize the cellular module

they are using.Let’s now proceed with UART’s control lines (i.e., TXD, RXD, DTR, RTS, CTS, DCD), which are connected to the external area through the pin-strip’s contacts, respectively, 15, 16, 14, 14 e 18; the same applies to VRTC (contact 7) e ADC0 (10). The audio device, with two contacts for the microphone (with differential input) and two more for the loudspeaker, uses con-tacts 4, 5, 8, 9, which correspond, respectively, to MIC1P and MIC1 N (positive e negative of the mi-crophone) and SPK1N and SPK1P (respectively, negative e positive

of the loudspeaker). The RI signal (indicating incoming calls) goes out through contact 12 of the pin-strip.In this case, the GSM modules’ antenna is directly connected on the printed board of the cell phone: this allows us to avoid all those problems that might arise if the antenna’s connections were moved from the printed board of the cell phone to the main remote control motherboard. The anten-na’s grip is positioned at pin 60 for both modules, but on the printed board it is on different faces, depending on which module is being used; when the contacts are connected, a module’s grip is connected to the other module’s tracks, thus altering the overall impedance and modifying the functioning of the radio section.Let’s now talk about transistor T1, used here to locally control the cell phone’s reception LED: its base is polarized from the current logical level on pin 52 (NET-LIGHT) for GSM1 or 6 (NET) for GSM2. The transistor’s collector is where the line to contact 19 of the pin-strip starts; this line is con-nected with the LED line, which the microcontroller uses to get information regarding the pres-ence of GSM network as well as regarding the connection status of the module (e.g., whether the network is available or not).We conclude the circuit’s analysis with a look at lines handling the SIM, which interfaces with mod-ules GSM1 and GSM2 through a bus formed by SIM_CLK (clock) SIM_RST (reset) and SIM_DATA (data channel); the SIM_VDD line is used to turn the SIM on and off and is handled by the GSM module. Note the presence of the quadruple Zener D1, whose diodes protect the SIM-Card from possible voltage peaks due to disturbances that may go from

[GSM

MO

DU

LE’s

ELE

CTR

IC s

chem

e]

(NB: inserire o il modulo GSM1 o il modulo GSM2)

Page 5: GSM Remote Gate Opener

Elettronica In ~ Maggio / Giugno 2010 43

the power line to the bus lines regulating the communication between SIM and cellular phone.

THE GATE OPENER Now that we have filled in the gaps, we can start describing our first application, that is, the GSM gate opener: in this modal-ity, our system controls the relay it is equipped with whenever it receives a call from a telephone number belonging to a list of numbers previously acquired through a special procedure, which can be performed via SMS using a telephone number which has been stored through

the special Easy-Setup function. This function starts automatically when the circuit is first started or following the first start-up after a total reset; once this function starts, the circuit waits for a call for three minutes; if it receives one, it stores the number at the top of the list of those numbers enabled to call. At this point, the remote control starts working normally. Once the number has been stored, the programming can be done from the telephone (which must be a cell phone) associated with that number, by using simple SMS commands described below and that can be found summa-

rized in the chart at the end of this document.Whenever it receives a call, the gate opener fails to answer so that the caller need not spend any money; in the event that the call-ing number is in the list, the exit relay gets impulsively activated for a time that can be set between 0 and 59 seconds. Its state can be modified at any time by using a special SMS remote command.Up to 200 numbers can be stored and enabled to control the relay, which allows people to use the gate opener not only in big condos and residences, but also in companies and all those other

[Assembling the GSM MODULE]

C1: 220 nF multistrato (0805)C2: 100 nF multistrato (0805)C3: 470 µF 6,3 VL tantalio (CASE-D)C4: 470 µF 6,3 VL tantalio (CASE-D)C5: 100 nF multistrato (0805)LD1: led verde (0805)D1: SMF05CR1: 22 ohm (0805)R2: 22 ohm (0805)R3: 22 ohm (0805)R4: 10 kohm (0805)R5: 4,7 kohm (0805)R6: 10 kohm (0805)R7: 330 ohm (0805)R8: 10 kohm (0805)R9: 4,7 kohm (0805)R10: -R11: 15 ohm (0805)R12: -R13: -T1: BC817T2: BC817T3: -GSM1: Modulo GSM SIM900GSM2: Modulo GSM M10(modulo alternativo a GSM1)SIM: Slot per SIM-CARDVarie:- Connettore Antenna SMA 90°- Strip maschio 3 poli- Strip maschio 16 poli- Circuito stampato

Parts List:

Page 6: GSM Remote Gate Opener

44 Maggio / Giugno 2010 ~ Elettronica In

contexts in which many users are likely to need to have access. In order to avoid using SMSs, which are not the best method when storing many phone numbers in that they entail spending money (SMSs are expensive...) and using a small and impractical cell phone’s keyboard, we have devised a software program to be used on a PC, to which one can connect the circuit by adding a TTL/USB converter module on a special serial interface connector.

SMS COMMANDSCommands and settings can be sent by any cell phone via SMSs, as long as the message in ques-

tion contains a password. Some of the commands can be composed without the use of a password (just so that they can be composed faster), provided that they are sent from one of the first eight num-bers stored inside the gate opener. However, a password must be used with those SMSs asking for a number to be added or removed, for the password to be replaced, or for the list itself of the numbers that have already been enabled. As far as adding or removing numbers, requiring the use of a password ensures that only some-one authorized to manage the list can modify it. As for the com-mand that can be used to check

the stored numbers, it has been in-cluded in order to ensure privacy, that is, to protect the identities of those who have access to the gate opener’s commands.Let’s now turn to a description of the commands and their syntax, on the assumption that the remote control accepts multiple SMSs, that is, SMSs containing more than one command or commands associated with one or more telephone numbers; each com-mand must be separated from the following one by a comma. We should also say that all the com-mands for which a password is not required are valid only if they come from a known phone, that

R1: 0,1 ohm 1W (1206)R2: 2,2 kohm (0805)R3: 1 kohm (0805)R4: -R5: -R6: -R7: 330 ohm (0805)R8: 330 ohm (0805)R9: 4,7 kohm (0805)R10: 10 kohm (0805)

R11: -R12: -R13: 330 ohm (0805)R14: 330 ohm (0805)R15: 1,5 kohm (0805)R16: 1,5 kohm (0805)R17: 330 ohm (0805)R18: -R19: -R20: 1 kohm (0805)

R21: 2,2 kohm (0805)R22: -R23: -R24: -R25: -R26: -R27: -

C1: 100 nF multilayer (0805)

Parts List:

First application: the gate openerOn this page, you will find the assem-bling directions along with the list of the components necessary to create a gate opener using the same printed board used to build the entire remote control; as you can see, the printed circuit is less “populated” than before, as many of the scheme components appearing in our previous issue are no longer necessary. As a matter of fact, in order to create the gate opener function, all you need is a microcontroller and its surrounding components, in addition to a small board with the GSM module and its antenna, a relay, a terminal board to connect all the contacts, the LEDs and power plug. In the list of components found on this page, those components that need not be assembled are marked with a dash.For PC programming, and in order to take advantage of the relative software, you can use the TTL/USB converter module shown already assembled in the picture, in a special four-pole pin-strip, at the top, to the left of the small GSM board.When greating the gate opener, you need to pay attention to the polarity of both LEDs and electrolytic condens-ers, in addition to that of silicon diodes and transistors. Do not forget to mount the SIL connector at a pitch of 0.10 inches in order to be able to perform the microcontroller’s in-circuit programming once all the components have been assembled. The gate opener’s firmware can be downloaded from our site: www.elettronicain.it.The circuit must be powered at 3.6 Vcc.

Page 7: GSM Remote Gate Opener

Elettronica In ~ Maggio / Giugno 2010 45

is, a phone whose number is in the list of numbers stored in the remote control. Again, if a com-mand can be sent without having to use a password, it means that it must be sent by one of the num-bers included in the list; a non-user always needs a password.The first command we are go-ing to examine is the one used to modify the password and entails an SMS of type PWDxxxxx;pwd, where instead of xxxxx the user must type a new password (made up of only numbers, and not exceeding five digits), while pwd stands for the existing password. By the way, please note that the default password in the circuit’s

microcontroller is 12345.Storing one of the eight numbers enabled to send configuration commands is done by sending an SMS containing the string NUMx+nnnnnnnnnnnnn;pwd, where instead of x the user must type the number (position) being stored, in place of n the number itself, while pwd, again, is the ex-isting password. All of this must be typed without any spacing.Numbers can be up to 19 dig-its; note that the + sign is what replaces 00 when making an international call from a cell phone. For instance, placing number 00398911512 in eight place can be obtained through

the following command: NUM8+398911512;pwd. Note that when storing a number, a password is required only if that number is to be stored in a position already taken by another number; if the desired position is empty, it is enough to send an SMS containing NUMx+nnnnnnnnnnnnn.Obviously, all of the above applies when the command in question is sent from a phome whose number has already been acquired by the gate opener; otherwise, using a password is obligatory. Removing a number must be done through an SMS containing the string NUMx;pwd; In place of the x, one

[Assembling]

C2: 1000 µF 25 VL electrolyticC3: 100 pF ceramic (0805)C4: 100 nF multilayer (0805)C5: 100 µF 16 VL electrolyticC6: -C7: 100 nF multilayer (0805)C8: 470 µF 6,3 VL tantalum (CASE-D)C9: -C10: -C11: 100 µF 16 VL electrolyticC12: -

C13: 100 nF multilayer (0805)C14: 470 µF 6,3 VL tantalum (CASE-D)C15: 470 µF 6,3 VL tantalum (CASE-D)C16: 470 µF 6,3 VL tantalum (CASE-D)C17: -C18: -C19: -C20: -Q1: -Q2: -

U1: MC34063ADU2: -U3: 24FC256-SNU4: -U5: -U6: PIC18F46K20-I/PT (ICSP)U7: -D1: 1N4007D2: 1N5819D3: 1N4007D4: -T1: BC817T2: -LD1: LED 3 mm redLD2: -LD3: LED 3 mm yellowLD4: LED 3 mm yellowLD5: LED 3 mm greenL1: Inductor coil 22 µHRL1: Relay 5V 1 one wayRL2: -P1: -F1: Fast fuse 2 A (1206)

Varie:- Screw connector 3 poles- DC plug- Female strip 6 poles- Female strip 3 poles- Female strip 16 poles- Female strip 4 poles 90°- PCB

Page 8: GSM Remote Gate Opener

46 Maggio / Giugno 2010 ~ Elettronica In

needs to type the posi-tion of the number to be deleted, while pwd still stands for password. For example, in order to remove the fourth number from the list, one needs the following message: NUM4;pwd. In order to request the list of the numbers that have been stored, one needs to send the following SMS: NUM?;pwd. The gate opener responds to the phone number from which the request is sent.Let’s now turn to the commands regarding the relay functions; these commands allow one to activate or disactivate

RL1, regardless of its existing state. The first command is the one that allows for a bistable command and has a syn-tax of the type OUT:state, where state can have the value ON or OFF. Here’s an illustration: when the relay needs to be activated, we send out the command OUT:ON. If we want the relay to rest after having been activated, we can send an SMS containing OUT:OFF.Although the two exits can always be activated in the manner anticipat-ed, the remote control also allows for a manual

monostable command: when an SMS containing the string OUT:ss is sent out, the relay will invert it state for an interval of time as long as the sec-onds indicated in place of ss (anywhere between 1 and 59 seconds). For instance, if we send the command OUT:03 after having programmed the bistable activation of the relay, it will get unexcited and will become excited again after three seconds; obviously, it can per-manently be unexcited only by using a special command (OUT:OFF) or taking away the power

Powering mobile phone cells with renewable energy is an idea that is spreading worldwide: after the installation of photovoltaic panels on a cell at L’Aquila (performed last year by Ericsson and TIM while working on their Eco Smart project) as well as the news about the experiments conducted by Helix Wind on cells powered by eolian turbines (in Nigeria and the United States), India announced the possibility of creating cells that only need 50 W and that can be easily obtained through photovoltaic panels. The project, realized by VNL –which is trying to promote

altogether, provided that the restart mode is not active.If the command is given when the relay is idle, the relay is activated for as many seconds as defined in the corre-sponding SMS; how-ever, if the command is sent when the relay is impulsively excited due to an incoming phone call, the relay becomes idle for as many seconds as defined in the SMS. If the time in question is longer than that of the relay activation for gate-opening functions, RL1 will not get active again except following a different command.If at any time the relay state is unknown, one can send the command STA? And the gate opener will respond with an SMS containing the current relay and in-put states. The message is sent to the phone from which the command was given. The circuit is equipped with an auto-restart function, which allows the user to store the re-lay state in the event of a black-out and to restore it when the power is back; this function is ac-tive by default, through the software uploaded in the microcontroller, but it can be disactivated or reactivated with SMS commands, respectively, with RIP0 and RIP1. In order to find out, at any moment, if the restart function is activated, the user can use the

its agenda in developing countries in need of better telecommunication networks–consists of a system powered by a battery (charged through a photovoltaic panel) which can perform all the functions of a traditional base station, but which only needs a power supply of 50/150 Watts. According to VNL, this system is potentially money-making even if the client generates an average traffic worth two dollars per month; this facilitates investments by phone companies in developing countries. Systems such as this one can handle hundreds of SIM’s, and in a limited area without electric network they allow for the building of a network cluster with more than one energy-saving station; these stations communicate with a bigger central base station, which is also powered by solar energy, situated within three miles and connected to the phone operator’s main network.

GSM cells at zero impact

Page 9: GSM Remote Gate Opener

Elettronica In ~ Maggio / Giugno 2010 47

command RIP?, which replies with an SMS indicating the current state. The command that determines how long the relay must be excited fol-lowing a phone call from one of the 200 numbers in the list is TAC:ss, where in place of ss one must type the length of time during which the relay is to be excited; this length of time must be expressed in seconds and can be anywhere be-tween 00 and 59 seconds. Note that by setting 00 one gets bistable activa-tion: the relay clicks and remains excited until it gets a new call from the same phone that caused it to get activated in the first place, or from any of the other phones enabled to send a call to the gate opener.Let’s now take a look at those commands related to the han-dling of the 200 phone numbers enabled to call the gate opener; MAC+xxxxxxxxxxxxxx is in charge of adding the number typed in place of the x’s in the first available posi-tion in the list. Note, again, that the + sign is what preceded international codes and is used instead of 00; therefore, adding number +393339999999, for example, is done by sending the command MAC+393339999999. For the gate opener, there is no specific storage position: each number is saved in the first posi-

list of numbers associat-ed with the gate opener must always be followed by a password; in other words, if they are sent individually in an SMS, they must be followed by ;pwd, where pwd is the cur-rent password. Thus, MAC+343339999999 would become MAC+343339999999;12345 if the current pass-word is 12345. Well, it is now time to talk about those commands that allow users to define notifications sent by the remote control as a response to certain situ-ations or to SMS com-mands sent from one of the eight enabled num-bers. A user who has the

Function SMS command Defaultvalue

Necessarypassword

Password replacement PWDxxxxx;12345 12345 Yes

Store numbers (max 8 numbers)(Max 19 digits per number); only if the position is occupied

NUMx+393355760937;12345 -Only if the position is occupied

Delete a number NUMx;12345 - Yes

Check stored numbers NUM?;12345 - Yes

Total reset of all parameters RES - Yes

Relay activitation in bistable modality OUT:ON - -

Relay disactivitation in bistable modality OUT:OFF - -Change of monostable relay state (time in seconds from 01÷59) OUT:ss - -

Relay state request OUT? - -

Relay reset (X is 1 to obtain the reset, 0 to have the relays disactivated) RIPx 0 -

Reset query RIP? 0 -Store number for gate opener function (max 200) MAC+39xxxxxx - Yes

Delete number for storing gate opener DAC+39xxxxxx - YesTotal deletion of gate opener list (except for the first 8 numbers) DAC - -

Time for gate opener activation ss from 00 (bistable) ÷59 TAC:ss 5 -

Disable answer for that multiple message RISP - -

password can, at any time, restore the default settings of the system and delete the stored phone numbers all at once, by simply send-ing out the command RES;pwd, where pwd is the current password.In conclusion, we remind the reader that our system can accept messages containing

Table of commands

tion available; it follows that, in order to delete a number, one must type the number itself in the relevant command, not the position occupied by that number.The delete message has the following format: DAC+xxxxxxxxxxxxxx, and everything we said above regarding the previous command ap-plies in this case as well. It is possible to delete all the numbers in the list (except for the first eight) in one swoop by send-ing the command DAC through an SMS. This function is useful when, for example, the remote control is uninstalled from a building where it was used to control a motorized gate and is moved into a new build-ing. The three commands to be used to modify the

The interface used to connect the gate opener to a computer via USB and to

make use of the software we created is a simple module

based on FT232RL by FTDI, which can be purchased

already assembled at Futura Elettronica (FT782M).

Page 10: GSM Remote Gate Opener

48 Maggio / Giugno 2010 ~ Elettronica In

g

The gate opener (cod. TDG134), with all the details and equipped with a GSM card with a stylus an-tenna, costs 96.00 Euro.Also available are (separately) the GSM card with SIM900 mod-ule, sim case, and stylus antenna 60.00 Euro (cod. TDGGSM_900), the GSM/GPRS SIM900 module alone (cod. SIM900, Euro 48.00), the GSM stylus antenna with SMA attachment (cod. ANTGSM-STL-F01, Euro 8.00), the USB/TTL converter cod. FT782M for 15.00 Euro. The SIM card need-ed for the devices to work must be purchased separately. All the prices include VAT.

The material can be requested at:Futura Elettronica, Via Adige 11,

21013 Gallarate (VA)Tel: 0331-799775 • Fax: 0331-792287

http://www.futurashop.it

where to buy

more than one command, which was purposely planned to help the user save time and money. This option entails the possibility that the system may not respond to some commands with more than one SMS; in order to circum-vent this problem, a message with multiple commands can be ended with the string RISP.This way, the remote control will not generate those response SMSs that are normally sent for the commands contained in the mes-sage in question. The description of the firmware application and of the commands that come with it ends here.

PRACTICAL REALIZATIONGreat care must be taken when building a remote control, as this device is primarily made up of components to be assembled on the surface. Recall that the gate opener ap-plication requires both the circuit board and the module support-ing GSM, for both of which, the printed circuit board traces can be found on our website, www.elet-tronicain.it. Alternatively, you can find ready-made printed circuits . All the soldering must be done with an extremely fine-pointed 20

module that will host the cell phone, which needs to be soldered on to the relevant pads in a specific position; in this case, too, you should se-cure the module and solder a couple of contacts, progress-ing one contact at a time on alternate sides.For the antenna there is a golden connector, which must be soldered on to the provided pads. In order to be able to mount each com-ponent on the circuit board, you must equip the module with two series of 0.1-inch

pin-strips (a 3-pin one and a 16-pin one, respectively), regularly spaced at 0.10 inches. The gate opener works with a power gener-ator able to supply between 9 and 32 volts as well as (at a minimum) a 600-mA current.

W solder, using a 0.20-inch-diam-etered alloy thread. The first component to be mount-ed on the circuit board is the microcontroller, which should be placed centrally on relevant pads and secured by lightly soldering one electrode on each side; while soldering, care must be taken in order not to cause the neighboring pins to short-circuit (the space is quite small). Use the same technique for the other integrated circuits as well. Once all the soldering has been done and you have made sure no pads were joined by mistake, you can take care of the other components, starting with those with lower profile and working according to the polarities indi-cated by the assembling drawings illustrated on these pages. The only elements to be assem-bled traditionally are the female pin-strips that you will have to use in order to insert the cel-lular module, the male pin-strip needed to create the ICSP connec-tor, the terminal board, the relay, the various LEDs, the button and silicon diodes, apart from the power plug.Once the circuit board has been set up, you must take care of the

In order to allow you to avoid using SMSs (which cost money and force you to spend a great deal of time press-ing numbers and letters on a cell phone’s un-comfortable keyboard) to enter numbers ena-bled to control the gate opener, we have created a software program that can help you upload those numbers from a PC, which can also be used to completely configure the circuit. The software can be found on our website: www.elettronicain.it.

Our software