Showing posts with label 128. Show all posts
Showing posts with label 128. Show all posts

Saturday, November 28, 2015

Arduino-GSM Based Relay

Hi friends we are going to make a blog and I hope this blog become useful for every person.
In this blog we are going to make a  GSM latching relay.
In this system firstly the phone is hung and then output is turned on and when again phone is rung then the output is turned off.


GSM based Arduino Relay

Warnings:

At this point the electricity is dangerous and its can kill.
If we are not use the cover then we cant do the internals work in projects nad there will be live contacts exposed  when the unit is connected to the mains.

 Materials & Parts

To build this system we have some items which is very important for this system.

Shopping List

• Project Box –Biggest size.
• Arduino Uno – visit at - https://www.robomart.com/arduino-uno-online-india
• This module has not lower price but we cnan purchase it minimum price by visit that link
• Arduino Relay – visit at- https://www.robomart.com/single-channel-12v-relay-board
• The small relay connect to the main relay of the Arduino.
• Mains Relay - visit at - https://www.robomart.com/single-channel-12v-relay-board
• This one is rated 30A at 240V and is used to switch the high voltage on and off.
• 12V Power supply - visit at- https://www.robomart.com/12-volt-2a-smps-adaptor
• You don't have to use this one, any 12 volt supply will do, as long as it fits in the project box and can provide 2 amps or so.
• 5V Power supply - visit at -  https://www.robomart.com/5-volt-1-amp-smps-adaptor
• This is used to lower the 12 volt supply to the 5 volts needed to run the arduino and the arduino relay.

GSM based Arduino Relay

GSM based Arduino Relay
GSM based Arduino Relay
GSM based Arduino Relay
GSM based Arduino Relay



 The Plan

The photo shows the insides of the project.
GSM based Arduino Relay

Wiring Diagram

This wiring diagram shows how I connected everything together to make the project work. Follow this and you should be fine
This diagram show that how can we connect the all parts with the help of wires and you can follow this and make the project good.


GSM based Arduino Relay


 Mobile Phone Hacking

We are able to interface the mobile phone with the Arduino so for this we are going to hack the way by its own hardware wise.
So for this purpose we need to the vibratos motor and battery.

GSM based Arduino Relay



GSM based Arduino Relay

Vibrator Motor

On The LG side I have a vibrator motor which is connected to the phone’s motherboard with the help of wires. Then I cut off the motor because many wiring are used inside this and then I solder the longer wires to the to this wiring  and then covered the area for the help of cable strain and to hold my hack in place.
Nokia mobile phones, which are what I would personally recommend for this task are slightly harder though. You will need to remove the back plastic panel. This contains the vibrator motor. Remove the motor and solder wires carefully to the pads on the phone motherboard.
After this I have finding the image of Nokia3310 and this image connect to the vibrator contacts.
When the phone receives an incoming call, voltages appears on the wires and what the maximum voltage that appears is and the polarity of the wires and connect the negative to ground.
When incoming call received by the phone then the voltage appear on the wires and then its show that what the maximum voltage and the polarity of the wires and then we connect the negative to the ground terminal.

Battery Contacts

In which we provide the power to the phone in place of give the power to the mobile phone with the help of charging socket and leave the battery. 
I found that the easiest option is to remove the battery and connect power straight to the phone itself. However, some phone batteries have on board components which mean the phone will not start without the battery.
The LG required just 4 volts across its battery terminals to start up, all that was needed was a diode to drop the voltage only one volt or so from the 5 volt supply.
 Nokia, however are more tricky, they require some extra work.

Arduino Code

Coding is the toughest part of the project so we are going to show how to get work with this and those coding attached in that.


GSM based Arduino Relay


int relaypin = 13;                // relay is connected to pin 5
int phonepin = 8;                 // phone output is on 13
boolean relayon = false;          // set up the variable. 
void setup()
{
  pinMode(relaypin, OUTPUT);        // The relay pin is a output from the arduino.
  pinMode(phonepin, INPUT);         // The phone pin is a input to the arduino. 
  digitalWrite(phonepin, LOW);      // when project is turned on, relay must start off. 
}
void loop()
{
  if (digitalRead(phonepin))       // when the phone pin is high, when voltage is present, when the phone rings.
  {  
                             relayon = !relayon;            // change the state of the variable. 
    delay(1000);                       // Delay 1 second
    digitalWrite(relaypin, relayon);   // Change the state of the output pin depending on the variable
    delay(5000);                       // Delay 5 seconds
  }
}

Adjustments:-

There are many thing that is very useful and it depend how the phone is working.
Firstly we do first thing we are going to add the additional resistor across the vibrator motor output and it’s this dissipated the voltage and it confuses the arduino that in which states it should be.

Finishing of the Project:-

Now the project has been finished and you can now see the video and know about that very easily.

GSM based Arduino Relay

 

Afterthoughts & Version 2

Afterthoughts

So when we plugged the relay then there is needs to turned on the phone.
The phone may vibrate for things other than an incoming call, and this will be seen as an input to the Arduino.

Ideas for Version 2

When we plugged the relay then the phone automatically turned on


GSM based Arduino Relay



Friday, November 27, 2015

Fire Alarm System GSM based using Arduino

You know that 90% fire damage occur due to the lack of early detection but now we are going to solve these problem. With the help of these technology we can reduce this problem. So in this system we can use a GSM module in which when fire occurred then the sms send to the users mobile no or you can replace the sms  with your own string.


GSM based Arduino

Components:-

  • Arduino Uno
  • LCD 16X2
  • LM35 Temp Sensor
  • GSM MODULE
  • 5v Power Supply for Arduino
  • 12v Power supply for GSM MODULE
  • 10k Potential Meter

Demo on Proteus:-

In this system we can set the threshold value in the code if (temp>45).when the temp reaches the 45 C then SMS send to the user mobile no. When fire occurred you can replace this value by your own but we know that very well that the room temp is 25 C. So when we are going to set the value we know that what the room temp. So we can change our value according to the room temp..
You can change the mobile no of a person with the cell phone no. to receive the fire alert SMS.  

GSM based Arduino
GSM based Arduino





















Download the Code:-

In this system coding is very simple you can easily know about that. You cannot face any problem to make this project.
#include <SoftwareSerial.h>
#include<LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2); 
SoftwareSerial mySerial(9, 10);
int sensor=A1;
float temp_read,Temp_alert_val,Temp_shut_val;
int sms_count=0,Fire_Set;
void setup()
{
  pinMode(sensor,INPUT);
  mySerial.begin(9600);   
  Serial.begin(9600);    
  lcd.begin(16,2);  
  delay(500);
}
void loop()
{
CheckFire();
CheckShutDown();
}
void CheckFire()
{
lcd.setCursor(0,0);
lcd.print("Fire Scan - ON");
Temp_alert_val=CheckTemp();
if(Temp_alert_val>45)
{
  Fire_Set=1; 
lcd.setCursor(0,1);
lcd.print("Fire Alert! SMS Sent!");
while(sms_count<3) //Number of SMS Alerts to be sent
{  
SendTextMessage(); // Function to send AT Commands to GSM module
}
}
}
float CheckTemp()
{
temp_read=analogRead(sensor); // reads the sensor output (Vout of LM35)
temp_read=temp_read*5;    // converts the sensor reading to temperature
temp_read=temp_read/10;  // adds the decimal point
return temp_read; // returns temperature value in degree celsius
}
void CheckShutDown()
{
if(Fire_Set==1)
{
Temp_shut_val=CheckTemp();
if(Temp_shut_val<28)
{
lcd.setCursor(0,1);
lcd.print("Fire Shut! SAFE NOW");
sms_count=0;
Fire_Set=0;
}}}
void SendTextMessage()
{
  mySerial.println("AT+CMGF=1");    //To send SMS in Text Mode
  delay(2000);
  mySerial.println("AT+CMGS=\"+929542xxxxxx\"\r"); // change to the phone number you using 
  delay(2000);
  mySerial.println("Fire in NEW ROOM!");//the content of the message
  delay(200);
  mySerial.println((char)26);//the stopping character
  delay(5000);
   mySerial.println("AT+CMGS=\"+929847xxxxxx\"\r"); // change to the phone number you using 
  delay(2000);
  mySerial.println("Fire in NEW ROOM!");//the content of the message
  delay(200);
  mySerial.println((char)26);//the message stopping character
  delay(5000);
  sms_count++;
}
So this was all, assemble your own alarm, test it and if you like the project, reflect it in the comments section below!!

Tuesday, November 24, 2015

How to use a Keypad - Arduino Tutorial

We are known very well about Keypad which is the combinations of buttons arranged in manner like a block or pad. A keypad usually had digits, symbols and the set of alphabetical letters. If we using mostly numbers then this keypad is called Numeric keypad. Keypads can be found in many alphanumeric keyboards and other devices such as calculators, push-button telephones, combination locks, and digital door locks, which require mainly numeric input.

Alphanumeric Arduino Keypad

Step 1: What you will need

Alphanumeric Arduino Keypad

You will need:
Step 2: The Circuit

We are using 7 pins keypad with 3 columns and 4 rows.

Alphanumeric Arduino Keypad

Note:

If your system does not work properly you can change the connections in the next step and pin no in the commands Search the web for additional help or find the datasheet for your keypad.

Byte row Pins[ROWS] = {7, 2, 3, 5}; //connect to the row pinouts of the keypad
Byte column Pins[COLS] = {6, 8, 4}; //connect to the column pinouts of the keypad

Step 3: Code

Alphanumeric Arduino Keypad

Here's the code, embedded using codebender!
The keypad that we are using has 4 rows and 3 columns:
const byte rows = 4; //four rows
const byte cols = 3; //three columns
char keys[rows][cols] =
{ {'1','2','3'},
{'4','5','6'},
{'7','8','9'},
{'#','0','*'} };
Tip: If you have another set of keypad you can change those values with yours ;)

Step 4: Good Work

Alphanumeric Arduino Keypad

In this system we can learn about Arduino and how to use a keypad with arduino.

Wednesday, November 18, 2015

Arduino Uno R3


There are some problems in our country. One day me and my Friend discussd to this problems. In our streets there is little bit security because of social in equality. In or society no one is safe even not richer because the no of robbers are increase day by day they can get easily inside the homes. so we make  system for home security purpose. But this system is very expensive and in this system we use a ring alarm to scare the thieves. But they do not actually inform you in immediate time that your house is being secure. When this system being completed its very expensive.
So I have an idea to make my own ring alarm which based on arduino. For this purpose I bought a GSM shield for Arduino Uno and other part I had.


arduino-uno-r3



 Parts Of GSM shields Home Alarm
 For this project you will need:-
Arduino Uno (Robomart);
GSM Shield (Robomart);
PIR sensor (Robomart);
An Arduino based buzzer (Robomart);
An alarm siren horn 12V(Robomart);
12V power supply (Robomart);
Relay module (Robomart);
Keypad for the Arduino (Robomart);
A box;

 
arduino-uno-r3

 
arduino-uno-r3

 

How to make connections

Firstly we have to place the Arduino Uno below the GSM shielded, then we solder  the two wires to GND and VCC jointly from two sensors, the buzzer and relay module input. After that we can connect the two wires on the connecter from GSM shield. After that we make a connection from input/output signals to this parts. And the last remaining thing is that we connect shield below the keypad.

It will be:-

 

 ArduinoUno / GSM shield pins:

·         Pin 0: not connected
·         Pin 1: not connected
·         Pin 2: not connected (the GSM will use this pin)
·         Pin 3:  not connected (the GSM will use this pin)
·         Pin 4: last row from keypad (keypad pin 4 – from 8);
·         Pin 5: not connected;
·         Pin 6: second column from keypad (keypad pin 6 – from 8);
·         Pin 7: third column from keypad (keypad pin 7 – from 8);
·         Pin 8: not connected (the GSM will use this pin);
·         Pin 9: not connected (the GSM will use this pin);
·         Pin 10: PIR sensor number 2 data;
·         Pin 11: siren horn signal (goes to the relay module input);
·         Pin 12: PIR sensor number 1 data;
·         Pin 13: buzzer signal input;

As it is possible to see, although the keypad has 8 pins, I just connected three (one row and two columns, allowing two numbers to be read – 1×2 matrix), because this way I can make passwords using these three wires, and there is no need to use all the pins from the keypad. This is because once the movement sensor detects a person walking inside the room, the person will have just 5 seconds to deactivate the alarm, so there is not enough time for the thief to figure out the alarm code. Once the alarm is not disabled on the given time, the GSM shield will proceed to send SMS to you, or to call your phone. The Arduino was programmed to call and once you answer the phone, it will finish the call. This way it will spare the credits from the mobile operator.
Of course, it is possible to get false readings from the sensor, or even the code can be buggy, so I put an option to disable the alarm just by sending an SMS text from my phone to the Arduino. Then we can send a message to show that this system will be correct.

 Conclusion of this system

After 5 sec you get a message or call in your phone when any thieves enter in your house after you can call police because I think you have much time to call the police.
When you receive the message after that the siren horn will alert the thieves and they will run without taking whatever they can. But if we do not use the siren then the thieves will not alert and they can catch by police. So by this system we can make our hose very secure.
If you have much better idea please suggest me so that I can improve my systems. 
Now You Can Visit This Link:------
 https://www.youtube.com/watch?v=_hBNhjIuz8k