Automatic router reboot device with Arduino

For quite some time I was experiencing a problem with my router. When the temperature rises behind the window it just starts to freak out. Every once two weeks or so it drops the Internet connection. Local network is still running but the incoming or outcoming connections are terminated. The only solution to this problem is to reset the router or just take out the plug and insert it after a few seconds. However, it requires me to do this every few days to make sure that the connection is good and running. I have decided to automatize the process with Arduino since it was laying around.

Please keep in mind that this solution is painfully easy. The Arduino reboots the router by changing the state of a relay for a couple of seconds. What is important is that it works! In other words, it is a blinky project but with longer switching times.

Below you can see a sketch of the schematic for the project. Please keep in mind that this a very basic version and was assembled from elements available at hand. Due to lack of a diode for protection of the transistor I did not put it there. So there should be one between the relay’s coil like showed below:

What is important is that my relay has five pins. This is common case but to be precise — two pins go to the coil and three are for the output (common, normally open and normally close). What I have done was connecting the power cable to the common and normally close wires of the relay. This way it does not draw current, only during switching.

Danger! Pleas mind that this device works in environment where dangerous voltage is present. Making of the device can be only done by a qualified person!

Below you can find a simple Arduino program:

#define RESET_PIN 7

// the setup function runs once when you press reset or power the board
void setup() {
  digitalWrite(RESET_PIN, LOW);

// the loop function runs over and over again until power down or reset
void loop() {
  for(int i = 0; i < 3; ++i)
    delay(24 * 60 * 60 * 1000);

  digitalWrite(RESET_PIN, HIGH);
  digitalWrite(RESET_PIN, LOW);

It switches the relay every 3 days by changing the state of digital pin number 7.

Below some more photos 😉

One way to make it smarter is to actually check if the Internet connection was dropped. Now, ARRD does not check this and it performs reset of the router according to the schedule. It is a primitive device but it works.

There is a lot of place for improvements with electronics or with the program itself. One could i.e. omit a microcontroler such as the Atmega328 and put something smaller like ATTiny or even use a timer. Also switching power on and off could be done on low voltage side but it would require you to add some extra connector for this. You could even disassemble the router itself and trigger the reset directly avoiding the shock of a sudden power drop to the device in question. Also the program could be improved by using built-in timer or even go to sleep! Nevertheless, as long as it works it does not need more tinkering.

This solution has worked for me for quite some time and hopefully it will continue to do so.




One thought on “Automatic router reboot device with Arduino

  1. migrys

    Witam. Dziękuję za pomoc przy uruchomieniu programu Arduino zgrzewarki punktowej przedstawionej na
    Program jest ok. Szkoda iż pisząc program autor nie pisze objaśnień do poszczególnych rozkazów, dla początkującego uczącego się Ardujno było by dużą pomocą. Szukam jednak takiego programu który dawał by dwa impulsy postępujące po sobie. Pierwszy krótki (10 do 40 ms) a drugi (40 do 150ms)


Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.