Introduction: Wireless Router Remote Reboot - Infrared

About: Just an ordinary person who loves #thinking and #tinkering

Wireless router is becoming cheaper and cheaper and consuming less power. It is now a must for office and home networking. There will be no more bunches of network cable running across the room and these wireless routers are now produced with stylish designs to furnish your rooms. Of course the cheaper ones can't handle too many devices simultaneously. My Dad, my Mom, Me, my Wife and my Eldest son each own a smartphone connected to a wireless router. I have three kids and each has a tablet connected to the same router. When all the phones are updating their apps and all the kids are watching Youtube on their tablets, my laptop suddenly disconnected from the net. Whoaaa!!! Yes, my router freezes.

Sometimes, turning the router off and on too fast will not reboot the router perfectly. It may result slow for devices to connect or even can't connect at all. Maybe there the capacitors or memories that have not been fully discharged or cleared from the old information, thinking that the devices are already connected and need no further action. Therefore we need a 10 to 15 seconds delay to let the router cool down before turning it on again. Another problem is that my router is hung up near the ceiling to get best coverage to the entire rooms. The adaptor plug is also up high next to it. Opening the administration page from the web is the only way or else get a ladder to toggle the on/off button. Or else? I built this Remote Reboot with an Arduino and Relay module. The rest of the parts needed are reclaimed from old broken devices.

You know what? This device is plug n play to any wireless router range from 6V to 12V. At my office, the wireless router is only two meters away from my desk. Both the plug and the on/off button are reachable while standing in front of it. Now I am too lazy to move my ass, turn the router off, wait for 15 seconds, then turn the router on to reboot. Thanks to all the remotes from broken electronic devices around and my magic wand.

Step 1: Materials to Be Prepared

  1. Arduino Uno.
  2. Relay Module for Arduino.

The rest are taken from junk :

  • Any working remote (IR transmitter) from old/broken devices.
  • One TSOP IR receiver from broken DVD player.
  • A small piece of PCB board (optional).
  • Cable ties (zip or wire will do).
  • A broken small PoE as in the picture (I took the female barrel jack and the case. You can pick any other case or make one if you can't find this kind of PoE, and of course get a female barrel jack).
  • A male barrel plug from old/broken adaptor. Cut the wire at around half foot from the plug.
  • Some jumper wires.

Tools to be prepared :

  • Soldering iron.
  • Desoldering tool to reclaim female barrel jack and TSOP infrared receiver.
  • Wire cutter.
  • Screwdriver to screw wires into Relay Module.
  • Hot glue (a thin one -- without glue gun -- and you do not need this if you are not using PoE case).
  • DMM (Digital MultiMeter just to make sure which wire is + and which is - ).

Step 2: Power Distribution

A small old PoE for outdoor radio is best for this project. The power goes in from center barrel jack. Jumper wires come from one side to power the Arduino. Barrel plug comes out from the other side to power the wireless router. Well yes, this is a power distribution so we need only one line to mains socket. Hence we need a larger amperage rating adaptor to run both Arduino and Wireless Router. The original adaptor for my router is 9V 0.85A, then I need to change it to something like 9V 2A. Arduino itself is running at around 0.5A, then we need more to juice up Relay Module.

You can use two barrel plugs because Arduino Uno has a jack on it. Instead I soldered two jumper wires and plug it into Vin and Gnd on Arduino. Working with barrel plug, you need to double check the polarity with Continuity Test on your MultiMeter. Although some cables are marked with dashes on its ground line, but remember that some old devices have inverse polarity on their plugs, that is negative in the middle instead of possitive.

Here is the power distribution schematic :

Step 3: Wiring Arduino and Relay Module

Here is the full wiring diagram :

Wire ColorArduinoRelay Module
BlueGndGnd
GreenD8In1
YellowD9In2
Orange5VVcc

IR receiver is plugged directly on pin D5, D6, D7. The Vss and Ground is set in the sketch with HIGH and LOW on D5 and D6. You should consider the positions as you are wiring them. Place them so that it become a compact plug and play device. I put Arduino Uno at the bottom then stack the Relay Module on top of it. Then I put the power distribution box next to the Relay Module. Overall it has the size of an Arduino Uno and three times thicker. Wrap them all with zip ties or cable ties. You can tie them on their mounting holes or on the body if necessary.

Step 4: Arduino Sketch

Now upload this sketch into Arduino :

#include <IRremote.h>

//defines pins numbers
//const int r2Pin = 9; //this one is used for the second relay if needed
const int r1Pin = 8;
const int irSignal = 7;
const int irGnd = 6;
const int irVss = 5;

IRrecv irrecv(irSignal);
decode_results results;

void setup() {
  pinMode(r1Pin, OUTPUT); // Set the relay1 pin as an Output
//  pinMode(r2Pin, OUTPUT); // Set the relay2 pin as an Output // this one is used for the second relay if needed
  pinMode(irSignal, INPUT); // Set IR Signal pin as Input
  pinMode(irGnd, OUTPUT); // Set IR Ground pin as Output
  pinMode(irVss, OUTPUT); // Set IR Vss pin as Output
  //relay pin act inversely, HIGH = OFF; LOW = ON;
  digitalWrite(r1Pin, HIGH); // Initially set the relay1 Pin off.
//  digitalWrite(r2Pin, HIGH); // Initially set the relay2 Pin off.
  digitalWrite(irGnd, LOW); // Set IR Ground pin 0V
  digitalWrite(irVss, HIGH); // Set IR Vss pin 5V
  irrecv.enableIRIn(); // Start the receiver
}

void loop() {
  if (irrecv.decode(&results)) {
    digitalWrite(r1Pin, LOW);
    delay(15000); //You can set the OFF time here.
    digitalWrite(r1Pin, HIGH);
    irrecv.resume(); // Receive the next value
  }
}

Step 5: Plug and Play

Now your device is ready. Remember to change your adaptor with a higher current, at least 1 amp higher than your router's adaptor rating. In most cases 2A adaptor will do good with the voltage according to your router. Mostly 9V to 12V and Arduino can accept that.

Warning! This device is not suitable for Outdoor Wireless Router which run 24V power, because your Arduino cannot accept that voltage. You can use it but you need to modify the power distribution circuit. A voltage regulator is needed to step down the voltage to run Arduino.


One more thing, this device will not suit you if your wireless router is around any infrared operated devices such as air conditioner, TV, HiFi, because it will detect nearby infrared beam and reboot. In this case, you should build a surrounding box for your TSOP IR receiver for more focus IR detection, or you can modify the code to receive certain unique frequency but that is much more work to do.


The power to wireless router is connected through relay on Normally Connected (NC) pin. When infrared signal is received, the relay will switch to Normally Open (NO) and that breaks the power line. After 15 seconds it will switch back to NC and supply power to the wireless router. That is how it works.

I am thinking of shrinking the device. I reboot my router about once a week and I think Arduino is wasting the power sitting there for this simple job. Yes I have some Arduino Mini and Micro around but there must be a way to reduce the power for this mini task. I have build an IR detector circuit with a transistor and some resistors. I also build a Monostable Multivibrator with 555 IC for 15 seconds delay. Both circuit works with LEDs for testing, but none of them success switching 5V relays. Maybe I need more transistors or opamp. I am no good in circuits. I am better in coding, that's why I finished this with Arduino. Yes it needs hard work to be lazy ^_^

Lazy Life Challenge

Participated in the
Lazy Life Challenge

Reclaimed Contest 2017

Participated in the
Reclaimed Contest 2017