garage door opener

Hi there community I have a question.

I recently took apart a spare garage door opener, and I would love to have it controlled by my UNO.

End goal: Garage door opened by arduino upon serial command, sent from remote location.

Everything works in my plan except the software.

I have boiled it down to two wires (poked into remote) that when shorted (or use the same wire and touch both contacts) cause the door to open/close. I need the arduino to become a software button and basically short a wire. I am stuck so if anyone can help I'd appreciate it greatly

You could try to analyse the circuit and do this with logic gates/transistors/whatever, but I think the easiest and safest way is to short the two points with a relay.

You can get very small relays that can be controlled directly from an Arduino pin (with a snubbing diode in place).


Rob

Put the switch/contacts of a reed relay in parallel with the remote's pb/switch

http://arduino.cc/forum/index.php/topic,77590.msg589513.html#msg589513

http://arduino.cc/forum/index.php/topic,77590.msg589753.html#msg589753

So it seems I need a relay of some sort. Are we talking something like this http://www.radioshack.com/product/index.jsp?productId=2062478 ? if so does anyone have a quick explanation on how to wire it up? Thanks

That's the one. I showed how to "wire it up" in the second link above. The reed relay's pins that I there labelled "wire 3" and "camera gnd" would go, one each, to the points that that you referred to in your original post:

..two wires (poked into remote) that when shorted (or use the same wire and touch both contacts) cause the door to open/close.

Fair enough?

Cool. Thanks for the help. I will look into that next time I'm at RadioShack. I guess that same relay could be used for many other ahem...semi assembled electronics :D

An oversized can opener should do the trick XD

  • As for moi, - I'd use a transistor (30cents? or so? from your local electronics store) ... and 1 single pin from your arduino, a relay is overkill to simulate a button press (eg, the buttons you press to open/close the door).

I tend to be that person who is always interested in a cheaper option, so that sounds interesting. Could you please expound some on how I would hook up the transistor for this purpose? Thanks so much

Ok I was able to re-purpose a transistor from an old electronics snap kit, and I have it sitting on my workbench. It is ready to go into the breadboard. The number is M8050 and you can find a link to the data sheet here : http://alltransistors.com/pdfview.php?doc=m8050_to-92.pdf&dire=_lge I have no experience with transistors, and I can't find anything that seems to tell me just how to wire it up. Any help is wanted and appreciated :)

A relay may be an overkill but it's pretty much a no-brainer.

Now you have to decipher the controller circuit and decide if the M8050 is suitable, which way around it goes etc.


Rob

pins 1.Emitter 2.Base 3.collector

Do as follows.

Step 1. Find gnd (0v) on the battery terminal, connect 0v to 0v on your circuit (so both grounds are linked)

Step 2. Middle pin of your transistor, base, well, connect a 300/1k/etc.. ohm resistor (Depending on the signal, you may have to increase/decrease the resistor value) to an Arduino Pin Digital 2 for example.

Step 3. Take the 2 Wires, Place 1 Wire on the Collector of your 3 pin Transistor.

Step 4. The Remaining 1 Wire, place that on the Emitter

Step 5. The Tricky Part - if you don't have a voltage meter, if you do, find out which of the 2 pins is + and - connect your meter up if it reads -3v reverse it, then you'll have it reading 3V/Red black/0v (gnd) (-/gnd pin goes to your emitter, the other + pin goes on your collector.)

Step 6, connect the 0v side of the transistor (emitter pin) to Gnd of your circuit (or NOTHING will happen)

now when voltage is applied to the base of your transistor, it create a short across your emitter and collector (edited, i typed base?) (which is the same as you pressing the button on the remote control, with only using 10000th of the energy) since a button is a "short" i expect some kind of resistor which measures the button press, if not, you may have to do something like place a resistor in series with the emitter/collector with either negative or positive rail..

unless I missed something out, that should work, once you've done it you'll see how simple it is (only takes 40 seconds to do once you've done it) - you can use a similar circuit to invert a signal to check out

http://www.kpsec.freeuk.com/trancirc.htm

This is all off of memory so I may be wrong and you may have to place 0v on the emitter (not either like i thought) and + on collector, the diode does not allow it to flow or does it? now i'm confused, but i know this method works fine as I use it to turn my computer on and off via bluetooth (there's a long wire running inside my PC to where the power switch is, and now it's connected to a digital pin on the arduino, i can fire up the pc or turn it off via hardware with a touch of a button from my phone)

it's also a lot cheaper and good to learn :)

Thanks for the info but as an idea to free up your arduino you can turn on your computer from WOL (wake on LAN) and there are apps for that as well. No arduino needed for that particular case. Anyway…this is what I have done. I connected jumper wires to the battery holder and to the contacts on the button. These pictures should be self explanatory. Am I doing this right? Thanks in advance.

I needed to be able to force power off I switch the pin to high wait 4 seconds then whack it back into low, the PC forces power off, i use it incase of a crash, my needs are very specific... but thanks anyway

Oooooh ok I get ya. didn't mean to sound rude. glad to see the arduino used to solve a problem like that :)

Oh also I just tested my new and improved connections to the remote. I used better wire and just tested my connections. 3.3V into the remote, and the connection to the button contacts work. I'm about ready to start coding it :D

Code is as pasted below. It works as it should with the serial monitor. I am planning to test this now, but if you see a problem let me know :) thanks for the help everyone.

int door = 0;
int light = 10;
char go = 'go';
boolean doorUp = false;


void setup()
{
  Serial.begin(9600);
  
  Serial.println("Initializing Garage Opener v1.0");
  
  pinMode(door, OUTPUT);
  
  pinMode(light, OUTPUT);
  
  digitalWrite(light, HIGH);
  delay(500);
  digitalWrite(light, LOW);
  
  Serial.println("Ready to send signal");
  Serial.println("Enter a command to continue");
}

void loop()
{
  char input = Serial.read();
  
  if(input == go)
  {
    Serial.println("Sending signal...");
    digitalWrite(light, HIGH);
    analogWrite(door, 1023);
    delay(200);
    analogWrite(door, 0);
    delay(15000);
    
    if(doorUp == false)
    {
      Serial.println("Door successfully raised");
      doorUp = true;
      return;
    }
    else if (doorUp == true)
    {
      Serial.println("Door successfully closed");
      doorUp = false;
      return;
    }
  }
}

I added the code to make the light go off and also changed the transistor to digital. it doesn't work...... anyone know why?

you changed it for a digital one? huh?

can we get a circuit picture? cheers - and any updated code :)

Here are som pics and the new code:

int door = 3;
int light = 10;
char go = 'go';
boolean doorUp = false;


void setup()
{
  Serial.begin(9600);
  
  Serial.println("Initializing Garage Opener v1.0");
  
  pinMode(door, OUTPUT);
  
  pinMode(light, OUTPUT);
  
  digitalWrite(light, HIGH);
  delay(500);
  digitalWrite(light, LOW);
  
  Serial.println("Ready to send signal");
  Serial.println("Enter a command to continue");
}

void loop()
{
  char input = Serial.read();
  
  if(input == go)
  {
    Serial.println("Sending signal...");
    digitalWrite(light, HIGH);
    digitalWrite(door, 1023);
    delay(200);
    digitalWrite(door, 0);
    delay(15000);
    digitalWrite(light, LOW);
    
    if(doorUp == false)
    {
      Serial.println("Door successfully raised");
      doorUp = true;
      return;
    }
    else if (doorUp == true)
    {
      Serial.println("Door successfully closed");
      doorUp = false;
      return;
    }
  }
}

attachments.zip (566 KB)

the + connection from the remote control is not needed unless you're somehow powering the device?

still looking/reading.