How to use an External Reset Button with Arduino :: Viewer Question #6
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:
- Why you may want to build an external reset button for your Arduino
- What components you will need to build the circuit
- An extremely simple reset circuit
- Why you do not need ANY code to implement the reset button
- 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:
- You are using a shield overtop the Arduino that restricts access to the reset, or makes it a pain to reach.
- 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.
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.
- Place a momentary pushbutton on the breadboard (usually, they bridge the trough at the center of the breadboard quite well)
- Connect your Arduino GND pin to the breadboard ground rail (Blue Rail).
- Use a jumper wire to connect the Arduino RESET pin to one side of the pushbutton.
- Use a jumper wire to connect the breadboard ground to the other side of the pushbutton.
That’s it. Like I said – pretty basic.
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.
1. Set-up your own external Arduino reset button.
Thanks to Munch for requesting that this tutorial be made – I hope it helps! If you found this video tutorial useful, sign up for our free Arduino Crash Course below.