I am working on an art project that involves a garage door opener. I am very new to Arduino, and electronics. I have a starter kit with a ton of accessories.

The garage door opener has 2 screws (terminals?) designed to connect a button. If I touch a wire between them, the opener will start. I connected a button to my bread board, and ran wires to those terminals on the opener to see if a simple switch would work, and it does.

I want to:

  1. press a button, and the Arduino connects the terminals on the opener, and then it starts
  2. button is then ignored (delayed) for a set amount of time (5 seconds for this example)
  3. after the set amount of time, the button works as normal (like in step 1)

I ran through some tutorials on buttons, and I think I got ahead of myself.

  • I can turn on an LED from a switch on the bread board, and use a delay(5000) to ignore any other button presses. I tried to connect the wires that were going to LED to the 2 terminals on the garage door opener, and it did not work
  • In code, I setup pin 5 as OUTPUT, and pin 6 as INPUT. I used the button to send a HIGH on pin 5, to see if that signal would work when connected to the 2 terminals on the opener. I tested this a bit in code by reading the state of pin 6, and it appears to have worked. However, it did not work when I connected both pin 5 to one terminal, and pin 6 to the other.

I tried looking for a simple example, but searching for garage door openers and Arduino results in too many tutorials on how to do super fancy wireless stuff. I just want to ignore a button press for 5 seconds after it has been pressed once.

I'm looking for a simple example that allows my button to tell the Arduino to make that connection on the garage door opener. I guess I'm looking for my Arduino to act like a switch instead of my (physical) switch?

My Arduino kit comes with a bread board, wires, switches, Uno R3 and tons of other stuff I haven't gotten to yet. I apologize in advance if I'm not thinking of something super-simple that would solve my problem. I'm very new to this.

Thanks for your time!

Edited for spelling. Elaborated on my attempts. I'm going to read about what a relay is.

  • 1
    Why not search for "debounce circuit"? Hardware solution
    – Huisman
    Jun 15, 2019 at 20:31
  • 1
    Or on "arduino button debounce" software solution
    – Huisman
    Jun 15, 2019 at 20:34
  • 2
    The existing opener electronics should already have a de-bounce built-in, you shouldn't need to add one. The simplest control method is to use a relay, then you don't need to understand what is inside the existing opener. Or, a opto-coupled transistor should work, if you get the polarity correct.
    – Mattman944
    Jun 15, 2019 at 21:08
  • 1
    Two things about your question are confusing, and an edit would be appreciated. First, you use "beard board" and "bread board" interchangeably. I believe you mean "bread board". My apologies if dyslexia is one of the crosses you must bear. Second, "debounce" is not the correct term for what you want to do -- "time delay" is a better term. "Debounce" is specifically what you do to overcome the switch physics, not to create some desired behavior.
    – TimWescott
    Jun 15, 2019 at 21:35
  • 1
    And, while I'm pestering you -- please edit your post to include a proposed schematic, or a block diagram if you're not comfortable with a schematic. Detail how you're connecting the Arduino to the opener, and what "does not work" means (i.e., does it act like the switch is always unpushed, or always pushed, or something odder yet?).
    – TimWescott
    Jun 15, 2019 at 21:36

1 Answer 1


I figure out a solution - I just needed to use a relay.

I didn't know what a relay was, and had a hard time figuring it out. I've included some notes for anyone who finds this post in the future.

  • I can't determine if it took reading 3-4 articles on relays for it to sink in, or if one article was the best. Anyway, for me this one helped the most: https://www.instructables.com/id/How-Electronic-Switches-Work-For-Noobs-Relays-and/
  • My relay looked different from most of the tutorials. I figured it out by connecting a couple alligator clips to a 9v battery and listening for the click of the magnetic switch. Then I used my volt meter to determine which leads were working with the relay.

Relay Setup:

  • I connected my ~5 to one lead on the relay, and 5v to the other
  • The Common (middle) lead connects to one terminal on the garage door opener
  • The N/C (Normally Closed) lead connects to the other terminal on the garage door opener

Button Setup:

  • The button setup was just like all the other button tutorials
  • When the button is pressed (LOW), I start and stop the relay to trigger a "button press" for the garage door opener (it starts)
  • I then run a delay for the set amount of time I want
  • All button presses are ignored until after the delay has finished

Now I can move on to the actual project. Thanks!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.