Introduction: Open Your Garage Door From Anywhere Plus Security Cam!

Hello everybody, here is a simple instructable makes your old phone a security camera you can view anywhere there is internet and also controls your garage door remotely with very few components!

It makes use of a free app called Alfred security IP cam, https://play.google.com/store/apps/details?id=com....

By adding few electronic components, this security app can open and close your garage door from anywhere.

In fact, you can use this option to do whatever you want, like, turning lights on and of, watching another device and running it remotely.

Lets go!

Step 1: The Components.

The few components required are:

1- Photocell.

2- 2 resistors.

3- An NPN transistor.

4- A diode.

5- A relay.

Step 2: Diagram and Components.

The picture shows the diagram and the components for this project.

After building the circuit, put the photocell right on the phone's flash, tape it in place and cover very well. The cover will prevent outside light from triggering the device.

Connect your relay's normally open contacts to your garage switch.

Now, on your remote control device, which is normally your personal cellphone, open Alfred app and hit the flash light icon, this will turn the flash light on on your camera, turn it back off, your garage will either open or close.

Step 3: The Garage Through the Monitoring Phone.

As you can see here, on your cellphone, open Alfred security app and connect to the camera in your garage.

Once connected, hit the flash light icon once, wait about a second and turn the flash off. The garage door will move.

Step 4: The YouTube Video

Here is the YouTube video.

As you can see on the video, the process is not difficult.

Just follow the instruction and you will get a great security cam with remote garage door opener.

This project can be modified to receive DTMF commands and this way will do more controls. I am just waiting on my components to arrive!

Please leave your comments/questions on this project and I will be more than happy to answer them.

I am planning on publishing another garage door remote control, but, with Arduino and blue tooth.

Thank you very much!

Comments

author
EricZ26 (author)2016-06-03

Im confused. I got everything working well using the relay, resistor and photocell method. However, activating the relay renders my wired garage button dead. The backlight dies and the button doesnt work. How is the relay killing power to the button when its wired directly to the opener?

Really fun project nevertheless.

IMG_20160603_150319.jpgIMG_20160603_153429.jpg
author
JosephW44 (author)EricZ262016-06-03

I used the door opener to power the instructable and placed the phone on top of the opener facing camera towards the door.

author
EricZ26 (author)JosephW442016-06-07

I like this idea, but i dont want to have to climb over my car every time the app force closes or the phone has a kernel panic and reboots. Are you just taking power and control from the switch terminals?

author
zarkani (author)EricZ262016-06-07

Hi,

Why do you want to climb over your car?? Your phone should be close to the wall mounted switch and it has nothing to do with door opener mechanism.

You provide power to the device from the same charger you use to charge your phone, it works on 5 volts.

As in the other reply, connect the relay terminals to the switch terminals. Please measure the voltage first, because I do not know what kind of garage opener you use. Normally, the voltage at the switch between 14 to 17 volts and you shorten this voltage as you click the switch to open the door.

Thank you,

author
EricZ26 (author)zarkani2016-06-11

The way I read it, JosephW44 didn't use the garage door opener button at all and he just wired the relay and USB power from the door opener itself.

author
zarkani (author)EricZ262016-06-11

Both can be done. The two wires going to the wall switch, they both come from the door opener, you can connect to these wires at the opener itself or at the switch.

It is better to use the switch though.

Thanks,

author
zarkani (author)EricZ262016-06-03

Yes, that is how the switch works. The two wires bring about 14 volts, if you shorten them for a short time, 1 to few seconds, the door opens, at this time, you kill the voltage at the switch. All you need is to connect in parallel the relay terminals and the switch terminals. I use it all the time and it works always.
Please let me know if you have any questions.
Thanks

author
EricZ26 (author)zarkani2016-06-07

Thanks for the reply. I know just enough to make me dangerous. Whats the best method to connect the relay terminals in parallel?

author
zarkani made it! (author)EricZ262016-06-07

Hi,

Just run two wires from the relay terminals, the common and the normally open ones, connect them to the two points your wall mounted switch closes when clicked.

Thank you,

relay.jpg
author
EricZ26 (author)zarkani2016-06-08

I've already ran those wires. Thats how I initially set it up, but the relay is somehow killing power to the button. Could the NO and NC terminals on the relay be labeled wrong?

author
zarkani (author)EricZ262016-06-08

Hi,

When the relay is ON, the normally open terminals close, as they close this kills the power to the switch and that is how it works. Can you hear a click sound as the relay goes ON and OFF? if not, then your relay is always ON and you need to review your circuit!

The relay should only go ON when there is light on the photo sensor.

The sensor must be covered and not exposed to external light.

If you have any questions, Please do not hesitate asking, would be very useful if you add photos.

Thank you,

author
EricZ26 made it! (author)zarkani2016-06-11

As it turns out, the picture on my relay is slightly different than your relay. I had the wires from the door button wired to what I thought was the normally open position. Turns out it was the normally closed position. I switched the wires to the normally open terminal and it works great! Sorry for the confusion.

IMG_20160609_181722.jpgIMG_20160609_181727.jpgIMG_20160609_181105.jpgIMG_20160609_181042.jpg
author
zarkani (author)EricZ262016-06-11

Glad it works now! It is useful.

Thanks for letting me know!

author
JosephW44 made it! (author)2016-06-03

It's done now to install it and see if my work payed off.

image.jpgimage.jpg
author
zarkani (author)JosephW442016-06-03

Smart guy! Thanks for letting me know that you made it!

author
instructable06 (author)2016-01-07

Would you provide part numbers and place where you bought your items please

author
zarkani (author)instructable062016-01-07

Yes, the transistor is 2n3904 or similar: http://www.ebay.com/itm/100Pcs-2N3904-TO-92-NPN-Ge...

resistors 1.2 k ohm and 68 k ohm, both are not critical and the 68 k can go up to 100 k, the 1.2 k can go down to 470 ohms.check this: http://www.ebay.com/itm/TOP-Nice-300PCS-30-Values-...

5 volts relay, does not require high current.

photocell or photo resister check ebay: http://www.ebay.com/itm/Light-20PCS-Photoresistor-...

Very cheap!

A diode to protect against relay's back emf, can be : http://www.ebay.com/itm/LOT-10PCS-1A-400V-Diode-1N...

Thank you!

author
Paxman5 (author)zarkani2016-01-31

Just placed orders for all the components! :-) I choose this relay:

http://www.ebay.com/itm/272095512456?_trksid=p2057...

Hope it will work.

One more question, since I'm such a electronics noob: the diode, is it in your schematic? I have identified all the other stuff but I can't see the diode. I did a copy of your schematic in Sketchup. This way it's easier for me to understand and follow the signals. Does it look correct or have I missed/missunderstood anything?

Garageöppnare.jpg
author
zarkani made it! (author)Paxman52016-01-31

Hi,

It will work. It is not difficult and very useful.

With the relay you are buying, you do not need the diode because you are buying a relay with its driver. you, however, need to modify the circuit a bit. Follow the one attached, I modified your nice schematic using MS Paint!

If you have any questions, please let me know.

My original design works directly on any rely, like this one from ebay:

http://www.ebay.com/itm/Perfect-1Pc-Mini-Power-Rel...

The one you bought works too, I, only do not know if it requires positive or negative on the (IN) pin to work, the circuit attached works on one negative driven which is what I believe the one you bought uses.

If not, just let me know and will give you the required circuit which will not be very different.

new relay.jpg
author
Paxman5 (author)zarkani2016-02-01

Thank you so much zarkani! You are so helpful and positive, not at all like the guys on an electronics forum here in Sweden that I asked about another project I wanted to try. They were really condescending. :-(

The reason I didn't buy the first relay you linked to is that they didn't ship to Sweden. Same with the one you linked to now. Dp you think this is the same? http://www.ebay.com/itm/Mini-5V-DC-Coil-Power-Rel...

I notice it does not say "type EVV" but it looks identical. I might as well buy one that works with your original design if there is any problem with the relay I first bought. We have a saying i Sweden: "Don't let your stinginess fool your wisdom"! :-) These components are so cheap that it dosen't matter if you buy a few things you don't need.

author
zarkani (author)Paxman52016-02-01

Hi,

You are very welcome.

I have good news for you!

I recently got a relay set similar to the one you ordered but it has 4 relays instead of one. I did some experiments on it and found out that you do not need other than the photocell and one resistor in the range of 3.3 k ohm to 33 k ohm.

Just wire your circuit as in the picture attached.

Please do not hesitate asking. I will do my best!

Thank you,

driven relay.jpg
author
BobS118 (author)zarkani2016-02-03

Sorry for being naive but in this set up, where do you connect the VCC, GND, and garage door switch?

Thanks

author
zarkani (author)BobS1182016-02-04

Hi, vcc is your positive 5 v frm your power supply and ground is the negative. For the garage switch, it is the switch on the wall you hit to open and close your door. Look in the comments, you will find more info.
Thanks

author
BobS118 (author)zarkani2016-02-04

Sorry I wasn't very clear in my question. I modified the diagram with the fancy relay. Is this correct?

Thanks

FHNEXDFIJYUZGVA.LARGE.jpg
author
zarkani (author)BobS1182016-02-04

Yes, this is correct. Just make sure that the normally open part of the relay is used.

See the attached picture

relay normally open.jpg
author
BobS118 made it! (author)zarkani2016-03-09

Works like a charm!

Thanks for your help!

IMG_0593.JPGIMG_0594.JPG
author
zarkani (author)BobS1182016-03-09

very glad it works, thank you very much for the feedback!

author
Paxman5 (author)BobS1182016-02-04

BobS118,

If you are talking about the relay I ordered (the one with the LEDs in the picture zarkani attached), the VCC and GND is printed on the board. The garage door switch is connected to the blue block with screws on the right side if the relay. At least that's as far as I understand. :-)

author
Paxman5 (author)zarkani2016-02-01

Really? :-)

So, just to be sure: I won't need the NPN transistor? Only the photocell, the relay I ordered and one resistor (in the range of 3.3 k to 33 k Ω)? That's it? Well the iPhone 4S obviously...;-)

author
zarkani (author)Paxman52016-02-01

Yes, that is it. Use the attached diagram which I already checked and it works very well. Make sure the phone you get runs the app.

author
Paxman5 (author)zarkani2016-02-01

Sweet! I can't wait for my components to arrive! :-) I guess it will take some time since China Post is not the fastest carrier but then I have time to find a phone. My daily phone is a iPhone 4S and I already have Alfred installed on it. It seems to work fine and I have read that people are running it on the 4S.

I will report back here when I'm doing any progress.

author
zarkani (author)Paxman52016-02-01

Let me know when you get the components and we will make it together.
Thanks

author
Paxman5 (author)zarkani2016-02-15

Now I have sourced a cheap iPhone 4S and the surveillance part is up and running! :-) Eagerly awaiting for the components to arrive...stupid Chinese New Year...:-/ No, really Happy New Year to all you Chinese people! ;-)

author
DawidD3 (author)2016-02-18

Hey, any chance you can post a detailed back/front picture of the completed circuit? Also, what sort of power supply does this need?

I'm having a bit of trouble getting this all together, but I love the concept.

author
zarkani (author)DawidD32016-02-18

Hi,
What components you have now?
The power supply I use is the phone charger, connect the positive to Vcc and the negative to ground.
You can use the same charger you charge your phone with to power the relay.
I cut the charger wire and identified the positive and the negative, then took two wires from there to supply the relay.
Some, as you find in the comments, bought different relay. They bought a relay with its driver, which means there is no need for a transistor in this case.
Please let me know what components you have now and I will do my best. It is a simple project and I use it all the time.
Here is a link to a relay the others bought: http://www.ebay.com/itm/271712278427?_trksid=p2060353.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT
Thank you,

author
DawidD3 (author)zarkani2016-02-19

Bought the ebay components you listed. I'm using the radioshack relay found here: https://www.radioshack.com/collections/connectors-..., Since i had one lying around for some reason.


Could you also show me a picture of the power line splice?

author
zarkani made it! (author)DawidD32016-02-19

Here is a picture, Sorry if it is not clear, the device in a difficult to reach spot.

The relay you have should work, it is similar to the one I got.

Please see the picture.

You can use separate power sources, 2 phone chargers for example, one for the phone and the other for the relay circuit.

You can also find more information in other's comments.

Please let me know if you have other questions.

Thanks.

G door opener.jpgrelay pins.jpg
author
DawidD3 (author)zarkani2016-02-24

Any chance you have a clean schematic for the build with the radio shack relay? I can't make sense of the one in your pictures - it seems to be missing a resistor.


Also, what pins on the relay should I be attaching bits to?

author
zarkani made it! (author)DawidD32016-02-24

Hi,

The schematic is attached.

The relay normally open contacts go to the garage door switch. The coil terminals go between the positive and the collector of the transistor.

Resistors are not critical, we can even omit 68k resistor, but it is there to guarantee that the transistor will turn off if there is little or no light on the photocell.

Thank you,

20160108_120631.jpg
author
BobS118 (author)2016-01-31

I am a complete noob (took electronics class in high school 25 years ago). I am a little confused with the relay. There are a numerous relay options with varying number of connectors. Do you have a specific part number for the relay with how many connectors and how they are connected? Also the VCC and ground is connected to what?

Thanks,

And I apologize in advance if my questions sound clueless. I can follow instructions but just need a little more detail.

author
zarkani (author)BobS1182016-01-31

Hi,

Any 5 v relay should work, normally the relay has at least 4 connections, two for the relay coil and two for the normally open connection on the relay, but most relays have 5 or more connections like this relay from ebay: http://www.ebay.com/itm/Perfect-1Pc-Mini-Power-Rel...

The Vcc and the ground are the positive and negative of your power supply ( normally the 5 v supply) which can be a phone charger, you cut the wire, identify the positive and the negative. The positive will be your Vcc and the negative is the ground.

If you have any questions, please let me know.

Thank you!

author
Paxman5 (author)2016-01-31

Hi!

I'm thinking of building this wonderful gadget! I have one question before I start looking for an old iPhone: is Alfred able to use the "selfie"-cam as the security cam on the iPhone together with the flash? The reason I ask is that I already have an iPhone (3GS) as my garage phone and I have it in a charger so I can use the display for playing music and such. If Alfred can use the "selfie"-cam function and still trigger the flash I can trash the old phone.

author
zarkani (author)Paxman52016-01-31

Hi,
I am not sure what you mean by " selfie"-cam!
If you mean the front facing cam, then with Alfred, you can remotely switch between front and back facing cams on your phone.
The flash works only when you use the back facing cam, you, however, can switch to the back camera, hit the flash and then go back to the front camera, which will turn the flash off.
From the comments here, I know that Alfred may need higher operating system than what iphone 3GS!

author
Paxman5 (author)zarkani2016-01-31

Yes, you are correct! I was talking about the front facing cam. With the functions you mention all is good so I can start looking for a 4S to replace my old 3GS. Thank you!

author
zarkani (author)Paxman52016-01-31

Just make sure the app runs on the phone you are about to buy.
Thanks

author
GRUBDUDE (author)zarkani2016-01-31

can't you just use a flashlight app instead? Then you can use whatever camera you wanted.

author
Paxman5 (author)GRUBDUDE2016-01-31

Well, simplicity is always preferred. I want to be able to operate my garage door remotely and have surveillance of the garage itself wherever I am in the world. Motion detection would be great too and I think I have read that Alfred have that. If one app have all I want, why would I want two different apps?

author
zarkani (author)2016-01-31

In fact, we can even use the microphone on the app to send any sound to the camera and that sound can trigger a relay to control something else.
Thanks,

author
zarkani (author)2016-01-31

Just make sure the app runs on the phone you are about to buy.
Thanks

author
DamonD2 (author)2016-01-08

thanks for the quick response Zarkani, but I'm still little confused. Can you please draw where the relay connect with the circle, which pin to which parts?

About This Instructable

45,004views

529favorites

License:

Bio: I am a Mechanical Engineer with lots of hobbies. I love electronics and have been working with electronics for decades. I love astronomy too, specially ... More »
More by zarkani:Bluetooth door opener/ monitorOpen Your Garage Door From Anywhere Plus Security Cam!
Add instructable to: