How to Make a Garage Door (EASY!!!)

This is a EASY arduino project that you could create to impress your teacher and friends. This project is an IR sensor-controlled garage door. It uses 2 Servo motor’s to move the garage door into an opened and closed orentation. The inferred sensor (IR) is effective and long range with a range of 1-5 meters. This project is great When paired with an arduino car project.

Supplies

Electronics:

Accessories:

  • Frame (wood, 3D printed)
  • Construction Paper (Garage door)

Tools:

Power/Connections:

Step 1: Research

There was a planning process before I started this project to figure out what to do. I wanted to create something unique that had never been done before, and I couldn’t find anything on garage doors. So, right there, I confirmed my project idea. This section contains background information on the most important and intricate components.

Arduino:

  • Arduino is an open-source electronics platform that uses simple hardware and software to make it easy to use. Arduino boards can take inputs – such as light from a sensor, a finger on a button, or a Twitter message – and convert them to outputs – such as turning on an LED, triggering a motor, or publishing anything online. The arduino uses the format code of C++.

Infarred Receiver (IR):

  • IR(Infrared) Receiver Extender cable, which consists of an IR receiver and a plug connected by a wire, is used to conveniently receive and amplify the infrared remote controller signal. The epoxy package and shell of an infrared receiver can filter out visual interference.

Servo Motor:

  • A servomotor (or servo motor) is a rotary actuator or linear actuator that can control angular or linear position, velocity, and acceleration precisely. It consists of a suitable motor coupled to a position feedback sensor.

Transistor (NPN):

  • The NPN transistor is designed to pass electrons from the emitter to the collector (so conventional current flows from collector to emitter). The emitter “emits” electrons into the base, which controls the number of electrons the emitter emits.

Step 2: Wiring Part 1

Before Starting the wiring let me tell you what each wire color represents:

Black = Ground

Red = Power

Green = Arduino Output To BredBoard

Blue = Arduino Output To Component

Steps:

  1. Connect power and ground from the arduino to the bredboard
  2. Connect the first servo to pin 11 on the arduino
  3. Connect the second servo to pin 3 on the arduino

Note : connecting the servos to the arduino will allow it to send code straight to the servo

Step 3: Wiring Part 2

In this wiring step, we will connect the IR receiver. The IR Reciver is the most important component in this project because it connects to a controller, which sends signals to the arduino and then to the servo to tell it to move up and down when pressed.

Steps:

  1. Connect the IR Reciver to pin 7 on the arduino
  2. connect the IR Reciver to Power and Ground

Note : For the IR Controller you will program that in the coding section. also make sure that the IR reciver in facing in the downwards direction of the bredboard

Step 4: Wiring Part 3 (optional)

This step is optional; it simply adds a spark to the project by turning on a light when the garage opens and off when the garage closes. Instead of just one led, I soldered eight together to make a chandalier. Looking at the diagram, the inner circle connects to ground, while the outer circle connects to power.

Steps:

  1. Connect Arduino pin 4 to the transistor’s base (make sure the connection is through a 1k OHM resistor)
  2. Connect the LED’s negative side to the emitter and positive side to power from the bredboard (make sure poweris connected thorugh a 330 OHM resistor)
  3. Connect the transistor’s collector side to ground directly.

Step 5: Code

Simply copy and paste the code into the Arduino editor and connect your computer to the Arduino to upload it. To program your remote controller with your IR just open up the serial monitor then click the button you want to be assigned to that command e.g. if your want 1 to be forward click 1 on your remote while pointing it at the IR then look for the Hexacode that pops up and copy that into “if (results.value == 0x000000)” keep the 0x but replace the other long string of numbers and letters with your Hexacode.

#include <IRremote.h>
#include <Servo.h>
int IRpin = 7;  // pin for the IR sensor
IRrecv irrecv(IRpin);
decode_results results;
Servo myservo, myservo2;
int ledChan = 4;
void setup()
{
 pinMode(ledChan,OUTPUT);
 Serial.begin(9600);
 irrecv.enableIRIn(); // Start the receiver
 myservo.attach(11);  // attaches the servo on pin 9 to the servo object
 myservo2.attach(3); // attaches other servo
}
void loop() 
{
 if (irrecv.decode(&results)) 
   {
    Serial.println(results.value, HEX);
     irrecv.resume();   // Receive the next value
   }
  if (results.value == 0xC1AAFC03)  // change according to your IR remote button number
    {
      myservo.write(190);
      myservo2.write(90);
      digitalWrite(ledChan, LOW);
      delay(15);
    }
    if (results.value == 0xC1AAC43B)  // change according  to your IR remote button number
   {
      myservo.write(90);
      myservo2.write(190);
      digitalWrite(ledChan, HIGH);
      delay(15);
    }
    
}  

Step 6: Frame Assembly

When all of the wiring and code is finished, it’s time for the final assembly. I used a small immatation of a house that I had lying around for the frame. I cut a hole in one of the walls that I thought was big enough for the garage door. If you don’t have the materials, don’t worry; you can make a frame out of whatever you have lying around; just make sure it has a rectangular shape to which you can glue the servos.

Steps :

  1. Glue the bredboard and arduino to the inner-top of the frame
  2. glue the servos to either side of the frame, facing eachother
  3. cut out a peice of construction paper that fits the dimensions of the frame and glue to the arms of the servo

Note: if the servos are opening in the opposite directions, Flip one of them . also make sure the IR Reciver is visible and not behind something

Step 7: Conclusion

If you followed the steps correctly, you should have a fully functional garage door. If not, go over the steps again to see where you went wrong. The video attached i what it should look like when working.

Source: How to Make a Garage Door (EASY!!!)


About The Author

Muhammad Bilal

I am a highly skilled and motivated individual with a Master's degree in Computer Science. I have extensive experience in technical writing and a deep understanding of SEO practices.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top