loading
Hi all! 
First, I want to advice all that I'm italian so I'm sorry for my bad english.

I wanted to activate a relay by calling a phone number: the easiest way to make it, was buying an GSM module, but it is very expensive! So I thought  to resolve this problem by exploiting  the fact that every mobile phone screen blink when a call is incoming.

For make this project i've used:
- Very old mobile phone
- Arduino Uno Rev. 3
- BC547B transistor
- LDR04 photoresistor
- 10Kohm resistor
- Recirculation diode
- Relay with 5V coil nominal voltage
- Small box that will keep the mobile phone
- Breadboard
- Wires

Step 1: Make the Base Circuit

I've taken all, except the phone, the box and the photoresistor.  I' ve put them togheter like the images

Step 2:

At this point I' ve prepared the box. 
First I've checked if the box could keep the mobile inside itself, but in my case it wasn't able because of the antenna of the mobile.
So, I've done two holes in the box: the first for the antenna and the second for the recharge cable on the other side. I've also put some pieces of scotch for keeping the mobile fixed in a position and making stronger the holes.
Then, I've made two other very small holes on the lid of the box exactly in front of where the mobile screen is. (The paper scotch in the 2nd photo is useless)
So, I've put the pins of the photoresistor in the two small holes so that the component is facing the mobile screen.
At this point, I've put the pins of the photoresistor in the breadbord as the fritzing project image shows.

Step 3: Conclusions and Sketch Code

I have connected to the relay the power on button pins of my computer so that it will turn on when I call the number of the mobile phone. This is the sketch for turning on a computer.:

#define LDRPIN A0
#define BC547BPIN 8
#define LEDPIN 13

void setup() {
   pinMode(BC547BPIN, OUTPUT);
   pinMode(LEDPIN,OUTPUT);
}

void loop() {
  int LDRValue = analogRead(LDRPIN);
 
  if(LDRValue > 50){
    digitalWrite(LEDPIN, HIGH);
   
    digitalWrite(BC547BPIN, HIGH);
    delay(2000);
   
    digitalWrite(BC547BPIN,LOW);
    delay(10000);
   
  } else {
    digitalWrite(LEDPIN, LOW);
  }
 
}

If someone doesn't understand the guide please put a comment below
<p>there's no need to set up a sketch in the arduino ? sorry for the newbie question i'm new in the arduino's world</p>
To prevent unwanted numbers calling, even the cheapest phones have a &quot;Fixed Dialling&quot; feature.Enable this and program in ONLY the numbers you want to communicate with.This feature together with &quot;Speed Dialling&quot; can give you better yet uncomplicated control as Fixed Dialling allows only the programmed numbers to be dialled and in most phones I've played with, allows ONLY calls FROM those numbers to be received.
Good idea, but what if someone else accidentaly calls the number? <br> <br>How about a special ring tone? <br>set up your phone like this: <br>1. mute all the unknown number <br>2. set any thing to your or known numbers <br>3. use a headphone jack and a simple amplifier circuit <br>4. smooth the output with a cap <br>5. use the arduino AD converter to detect the sound. <br> <br>
Well, it will be a lot better but the mobile phone that I've used is too old: it doesn't let me to put a different ringtone to the single numbers. However, I' ve tried to reduce these accidental calls by using a SIM card that no one belonging to me know the number.

About This Instructable

6,868views

14favorites

License:

Bio: I'm an Italian 19 years old automation engineering student.
More by giuliom_95:Color sensors and Arduino serial communication for beginners  A sort of modern kinetic art. The useless alarmed Coke can 
Add instructable to: