Introduction: Arduino Home Automation, Automatic Door Opener

Enroll in my 'Electronics in a nutshell' course here: https://www.udemy.com/electronics-in-a-nutshell/?couponCode=TINKERSPARK


Also check out my youtube channel here for more projects and electronics tutorials: https://www.youtube.com/channel/UCelOORs7UioZ4TZF...

I had an idea to make a simple, and easy to use door opener with a geared motor a couple of years ago. At that time I did not have the knowledge to make a door opener. This winter break I felt optimistic and, gave it a shot. I am making this instructable, as simple ways to make this online, and all I found were complicated attempts at chicken coop openers. Since this is my first instructable, I might miss out some information, so you can leave your questions in the comments, and I will respond as promptly as I can. The point of this instructable is mainly to inspire you to do something similar, or to help you build yours.


Materials -

1. A high torque geared motor, speed (RPM) is not very important, my motor. (Required)
2. An appropriate PSU (power supply unit), for your motor, I had a old camcorder charger, which was perfect for the motor. Make sure the Max Amps are more then the max load current of the motor. (Required)
3. An Arduino board, I used the Arduino UNO Rev 3. (Highly recommended)
3. Material for making a case to hold the components eg. wood, plastic sheets, acrylic etc. (Recomended)
4. A MOSFET transistor, or a servo to trigger the door (Required)
5. A button, swicth, ir sensor etc. to tell when to open the door.
6. A LCD (Optional)
7. lots of wires (Required)

Tools-

1. Dremel/ rotary tools- they are very usefull, and will also help in any other projects.
2. Soldering iron- also buy soldering paste/flux, and solder wire
3. A hot glue gun- the most useful tool of them all

Step 1: The Theory

Here was what I wanted to achieve

1. Minimal effort to open a door
2. A simple touch sensor to let me in
3. A LCD 16x2 screen to show the doors status
4. Looks Cool

based on my requirements I synthesised a flow chart.
pic


Since i did not have a mosfet, or a transistor that, can control high current, and voltage, I used a servo to press a mouse button.

pic.

Step 2: Programing

Then I programed in the arduino enviornment (My code will be available on the bottom or top of the page.
pic

At the time of the project, my programming was basic, so I found other peoples codes, and mixed them, added some of my code, and made up the final code. About 50% of the code is actually mine.

Step 3: Assembling the Electronics

I used 6 mm thick hobby plywood, and cut it with a dremel, and a reinforced cutting wheel.
pic
Here is how I hooked up the electronics

Lcd-

PIN1 = tie to gnd
2 = tie to 5v
3 = resistor ~2-3K to gnd( I used 1 K)
4 = rs = tie to pin 12
5 = r/w = tie to gnd
6 = enable = tie to pin 11
7-10 =no connections
11 = tie to pin 5
12 = tie to pin 4
13 = tie to pin 3
14 = tie to pin 2
15 = tie to 4.2 V (5V works)
16 = tie to gnd

The servo- pin 10
remember that the servo ground should be connected to the arduino ground
( only if you use a different power supply for the servo)


Capacitive sensor to pin 6,8 ( pin 8 is the sensor pin), ( I used a 4 M ohm ressistor), and remember for the capacitive sensor to work it should be connected to a proper ground.
The tutorial for connecting a capacitive sensor

I had some problems with the tutorial, and some of the solutions are

1. the library is called 'Capacitivesense' , but the code is trying to use the library 'Capsense'. You can fix this by changing word- Capsense to Capacitivesense , and if the code says it is, an innapropriate use of.... change just that word to capacitivesense (lower case)

2. go to sketch, and try manually adding the file.


I also added a led to pin 13, as it already has a resistor, adding the resistors is completely optional.

Step 4: Installing the Electronics

We are nearly done, now we just install the elctronics, and I ran Ground ( for the servo), power (connects to a usb wall adapter to power the arduino, and signal (for the servo).

Step 5: Trimming, and Adjusting the Sketch

All of ypu will probaply modify your sketch, to suit the need of your location. Humidity, grounding can afect the sketch. so you should calibrate it to your needs.

1. Touch sensor

Depending on how well the arduino is connected to ground, and the size of your foil touch plate, you will have to adjust the sensitivity of the sensor.

if(value > 40000) - adjust this line of code to get your desired results. I recommend you do this step now, as your circumstances will be the same, in the real world scenario.

2. Servo- Depending on your switch that your servo presses, you will have to adjust the amount the servo move to press it

myservo.write(104);
myservo.write(90); - adjust those lines to get your desired results. I suggest keeping one of the 2 lines at 90 degrees, as they are the servos neutral position.

3. Motor- depending on the motor RPM/ Wight of your door/ the output V,A of your PSU your motor might take more or less time to open the door.


myservo.write(104);
delay(3400);
myservo.write(90);- adjust the delay time to get it right (1000=1sec)

Step 6: Upgrades

Congratulations. You are done.


Some future upgrades could be

1. using this tutorial to close the door after it has opened using this, this, or this (those are not my projects)
2.using a raspberry pi, and a webcam to data log who opens the door, and uploading it to a webpage.
3.Hacking into the lock of the door, to remotely lock the door, or grant permission remotely using the webcam.


please do not modify my code, and claim it to be yours, or use it for any commercial use. I will most probably allow you to redistribute it in some other tutorial IF you ask for my permission. My email ID- is saraltayal@woodstock.ac.in
You can use this code for your own projects, that is completely fine.

please rate me as it takes time to make this instructable, and my project, also vote for me on makerlympics, and other contests, all it takes is a click, thank you

Enroll in my 'Electronics in a nutshell' course here: https://www.udemy.com/electronics-in-a-nutshell/?couponCode=TINKERSPARK

Also check out my youtube channel here for more projects and electronics tutorials: https://www.youtube.com/channel/UCelOORs7UioZ4TZF...

Makerlympics Contest

Participated in the
Makerlympics Contest