Grubits Gábor
Published © LGPL

Garage Door Opener with Siemens TC35i Modem and Pro Mini

This is a GSM modem (Siemen TC35i) that can be operated with a garage door opening and closing device.

BeginnerShowcase (no instructions)3 hours7,168
Garage Door Opener with Siemens TC35i Modem and Pro Mini

Things used in this project

Hardware components

Siemens TC35i MC35i Terminal Wireless WAN GPRS GSM MODEM
×1
Arduino Pro Mini 328 - 5V/16MHz
SparkFun Arduino Pro Mini 328 - 5V/16MHz
×1
Male MAX3232 RS232 to TTL Serial Port Converter Module DB9 Connector MAX232
×1
RELAY click
MikroE RELAY click
×1
Wireless remote contoller for garage door
×1

Story

Read more

Schematics

Garage door openin with Siemens TC35i + Arduino mini pro

Code

Garage door openin with Siemens TC35i + Arduino mini pro

Arduino
#include <SoftwareSerial.h>						//Including Sotware Serial lib for second serial port to connect Siemens TC35i

String tel_1 = "+11221234567";  				//Telephone number 1
String tel_2 = "+11227654321";  				//Telephone number 2

String temp;									//Define temp string

int rxpin = 9;									//Define rx and tx pin
int txpin = 8;

byte door = 10;                  				//Relay output

SoftwareSerial serial2(rxpin,txpin); 			//RX,TX 

void setup() {

  	pinMode(door, OUTPUT);    					//Set relay port to output
    digitalWrite(door, HIGH); 					//Set relay port to high (switch relay default state)

    Serial.begin(115200);       				//Initialize HW serial port for debug
    serial2.begin(57600);   					//Initialize SW serial port for communicat with modem

    Serial.println("Starting...."); 			//Program starting
  
    delay(120000);								//Waiting for modem (120sec is enough)
    serial2.println("at");  					//Send AT Command
    Serial.println("at");
    temp = serial2.readString();
    Serial.print(temp);
    delay(1000);
  
    Serial.println("at+clip=1");  				//Send AT Command to receiving caller ID
    serial2.println("at+clip=1");
    temp = serial2.readString();
    Serial.println(temp);
    delay(1000);
  
  Serial.println("Enter to loop..."); 			//Loop is stating...
  
}

void loop() {

      digitalWrite(door, HIGH);       			//Set relay outpout to high (relay normal state)

    if (serial2.available()) {          		//Wait for SW Serial communication is active
        String str = serial2.readString();    	//Read out full string from SW serial
        temp = (str.substring(18,30));      	//Parser out from only Caller ID
        Serial.println(str.substring(18,30));   //Show Caller ID (only ID, without any text. Example: RING ect..
      
      
     if (temp == tel_1)             			//Find caller id in database
     {
        Serial.println("Telephone number 1");   //Print caller id in debug port
        serial2.println("AT H");          		//Hang up the call/ring    
    dooropen();               					//Open the door
     } 
     
     if (temp == tel_2)            				//Find caller id in database
     {
        Serial.println("Telephone number 2"); 	//Print caller id in debug port
        serial2.println("AT H");        		//Hang up the call/ring  
    dooropen();               					//Open the door
     }

   
     else {
        Serial.println("Unknow number door sill locked"); //Print to debug port
        serial2.println("AT H");              	//Hang up the call/ring  
        temp = serial2.readString();            //Eliminate "OK" feedback to AT H command 
        
     }

   }

}

void dooropen()
{
  Serial.println("Opening the door");     		//Print to debug port
  digitalWrite(door, LOW);                  	//Set relay output LOW, activate the relay
  delay(1000);                        			//Wait 1 sec 
  digitalWrite(door, HIGH);                  	//Set relay output HIGH, relay normal state
}

Credits

Grubits Gábor

Grubits Gábor

2 projects • 7 followers

Comments