How to use an External Reset Button with Arduino

Have you ever had your internet go down?  You call the service provider and the first thing they say is that you must unplug your modem and wireless router, turn off your computer, and scratch your keyboard 7 times with a chicken’s foot – all for the magical 30 seconds – at which point, the connection should reset?

Lucky for us, resetting an Arduino is way easier.  All you have to do is press the momentary push button mounted to the top of the board, and your Arduino will reset.

But on some occasions, you may want to build your own external reset button.

This Lesson Will Include:

  1. Why you may want to build an external reset button for your Arduino
  2. What components you will need to build the circuit
  3. An extremely simple reset circuit
  4. Why you do not need ANY code to implement the reset button
  5. How to walk upside down and backwards underwater

Why you may want to build an external reset button for your Arduino 

If the Arduino already has a built in reset, then why the heck would you go build your own?  It comes down to access. Sometimes you cannot get your stubby fingers to reach the on-board reset button. The two most common occurrences of this are:

  1. You are using a shield overtop the Arduino that restricts access to the reset, or makes it a pain to reach.
  2. Your Arduino is mounted in an enclosure that makes reaching the reset button inaccessible or inconvenient.

Luckily for us, many Arduino shields include reset buttons, so we don’t have to take the time to create our own.  But when the time comes, it’s nice to know how to make your own external reset.  So, let’s take a look at the circuit.

Programming Electronics Academy members, use the coding challenges in the Bread and Butter: I/O section of the Arduino Course for Absolute Beginners to drive home these basic coding skills.

Not a member yet?  Sign up here.

What You Will Need:

  • (1) Momentary Pushbutton
  • (3) Jumper Wires
  • Arduino Board
  • Bread Board
  • (1) Wool Sock

How to set up a circuit to build an external Arduino reset button

The circuit is extremely easy.  Below is a step by step procedure, followed by the schematic.

  1. Place a momentary pushbutton on the breadboard (usually, they bridge the trough at the center of the breadboard quite well)
  2. Connect your Arduino GND pin to the breadboard ground rail (Blue Rail).
  3. Use a jumper wire to connect the Arduino RESET pin to one side of the pushbutton.
  4. Use a jumper wire to connect the breadboard ground to the other side of the pushbutton.

That’s it.  Like I said – pretty basic.

External reset Button Arduino circuit

Programming Electronics Academy members, check out the Familiarization section of the Arduino Course for Absolute Beginners to learn about all the stuff on an Arduino board.

Not a member yet?  Sign up here.

So just what is happening in this circuit – and why would this circuit work anyhow? According to the Arduino web page…

“ In addition, some pins have specialized functions: – Reset. Bring this line LOW to reset the microcontroller. Typically used to add a reset button to shields which block the one on the board.”

So all we have to do is bring the pin LOW – which is as easy as connecting it to ground through a pushbutton.  So when the button is not pressed, the pin is in its normal state.  When the pushbutton is pressed, the pin “sees” ground voltage (i.e. 0 volts), and is brought LOW – which according to the documentation will reset the Arduino for us.

Why you do not need ANY code to implement the reset button.

So now what?  Do you need to code anything in your Arduino Sketch?  Nope.

Just press the button for reset (for a minimum of 2.5 µs – that’s real quick).  It works without a single piece of code.  This is simply how the microcontroller is set up on the Arduino board – it is intrinsic to how the hardware has been configured that the RESET pin will do it’s job without any bother from us. It can’t get much easier than this.

Now there are ways to reset your Arduino with software – it is called a watch dog timer.  So if you are looking for a hands free reset option, that might be your bet.  It is beyond the scope of this tutorial however.

Arduino Code Used in Lesson

/*External Reset Button

Circuit:
-One side of Push button attached to RESET pin, and to 5 volts through a 10K resistor
-Other side connected to one of the GND pins


This code is in the public domain
*/

void setup(){
  
  //begin Serial Communications
  Serial.begin(9600);
  
}//close setup

void loop(){
  
  //capture the time the board has been running
  int time = millis()/1000;
  
  //print the time from last reset
  Serial.print("I was reset ");
  Serial.print(time);
  Serial.println(" seconds ago.");
  Serial.println("Will you stop Dave. I am afraid.");
  delay(1000);
  
}//close loop

Challenge:

1.  Set-up your own external Arduino reset button.

Further Reading:

Thanks to Munch for requesting that this tutorial be made – I hope it helps!

installing Arduino libraries

Installing Arduino Libraries | Beginners Guide

IoT sewage project

Pumping poo! An IoT sewage project

ESP32 webOTA updates

How to update ESP32 firmware using web OTA [Guide + Code]

error message Brackets Thumbnail V1

expected declaration before ‘}’ token [SOLVED]

Compilation SOLVED | 1

Compilation error: expected ‘;’ before [SOLVED]

Learn how to structure your code

27 Comments

  1. Brian van Vlymen on February 11, 2015 at 12:51 am

    work as a charm

  2. Beer as Medicine | Things Are Good on May 7, 2015 at 8:53 am

    […] Read more. […]

  3. Alejandro Reyes on May 19, 2015 at 9:44 am

    I was looking forward to finding out how to walk upside and backwards underwater… 🙂 All joking aside, this helped me out!

    • MICHAEL JAMES on May 19, 2015 at 10:47 am

      Ha 🙂 I am glad it helped, thanks for the note!

  4. Jose. on August 2, 2015 at 12:53 am

    Can same one help! using a permanent switch! how can I make the arduino begin the program? only with the mometary swith bottom it works.

    • MICHAEL JAMES on August 4, 2015 at 10:07 am

      Hi Jose, Did you try the circuit described in the tutorial? It’s not working?

  5. Jose. on August 4, 2015 at 9:18 pm

    How can I apply a counter to a LED or a timer for 15 minutes to a LED?

  6. Jorge Gabriel Gallegos Lozano on August 22, 2016 at 2:44 pm

    Hey, just did this and the arduino just turned off and i cant turn it on again, it doesn´t smell burnt, and there wasn’t any smoke. what happened?

  7. Fernando on February 14, 2017 at 2:17 am

    Thanks! Just disappointed for not learning how to walk upside down underwater.

    • MICHAEL JAMES on February 14, 2017 at 10:35 am

      Glad you liked it! Walking upside underwater will be covered in part two.

  8. Ta S on March 30, 2017 at 6:33 am

    how do you clear the serial communications screen with the same button ?

    • MICHAEL JAMES on April 1, 2017 at 11:38 am

      Great question. I am not sure you can necessarily “clear” the serial print screen, but your could output a bunch of blank newlines. Maybe use a for loop and have it run 30 times with a blank Serial.print() statement in it… Hope this helps!

  9. Richard Mbuzimbili on May 11, 2019 at 12:04 pm

    Thanks very much, it works very nice. ????

  10. rob on May 20, 2019 at 7:15 am

    What do I do with the sock?

  11. Disobedient Objects: Rig-A-Toaster – JMTXY on May 21, 2019 at 10:55 am

    […] == LOW) {} ” was to press the inbuilt reset button on the Arduino, I looked online to see if there was a possible external reset […]

  12. Sockless Sam on July 19, 2019 at 10:39 pm

    What if you don’t have a wool sock?

  13. Mohamad Slamet Riyadi on August 23, 2019 at 10:35 pm

    Good, thank

  14. C V Horie on July 21, 2020 at 9:54 am

    A follow on question.
    I am developing a grbl program, so am constantly stopping the movement etc, half way through the sequence. I push the carriage back to MCO then need to reset, currently by pushing a button (but sometimes I forget).
    How can I program the reset pin so it resets at the beginning of the program?

  15. AG on October 21, 2020 at 4:49 pm

    Is there any way to make it wait before starting the code again without adding a delay to the start of the code?

  16. Rene on January 22, 2021 at 5:44 am

    WARNING: Do NOT use wool or synthetic socks, Arduino doesn’t like an Electro Static Discharge (ESD)!
    Same with placemates when trying to isolate Arduino PCB, cardboard from a shoebox is fine and a lot cheaper.
    Just wear socks and shoes on your feet! 😉

  17. Alwin oz on December 20, 2023 at 9:52 am

    thanks, i know this was super simple but the solution is probably an easier way than making my piezo buzzer reset the arduino on its own, i had a sensor and a potmeter and all sorts of things that only needed to beep once when there was NOTHING in front of the sensor, but everytime that happened, the buzzer just kept going off, no beeping just beeeeeeeeeeeep,like the power was switched on after the signal for short beeps was given to inform me the sensor has nothing in front of it, so i was coding and ai chatting for hours but i just cant seem to fix this thing, so i think adding a manual reset button for the mega will be an easier solution than just coding a line that limits the buzzer, its such a buzzkill 😉

Leave a Comment