Remote WiFi Router Reboot Hardware Mod

by smotus in Circuits > Microcontrollers

7 Views, 0 Favorites, 0 Comments

Remote WiFi Router Reboot Hardware Mod

IMG_0003.jpeg

This is a simple hardware modification of a Sonoff Basic to provide a way to remotely reboot your router or any other low power AC device. The challenge with all the smart plugs I researched is that if you signal it via WiFi to shut off your router, you lose the WiFi connection and cannot turn it back on again.

So, as I looked all around for a way to do this, the only products I found were purpose built and were priced between $50 and $100, which seemed way to much to pay for something so simple. The build described ran less than $15.

The reason for choosing the Sonoff smart switch is that it was the only controller that I found that had an "inching" feature, basically a timer that when device turned on, would then turn it off automatically after a preset interval stored in the device. This gets us half way there.

However, you would want the exact opposite to happen, be on all the time and then power cycle off, for say 10 seconds, and then power back on automatically to reboot the router. You could reflash the ESP controller with custom code, Tasmota, Home Assistant or one of the other home automation packages but that would mean you would need to have the relay energized all the time or maybe you don't want to go through the reprogramming effort and just want to use the standard eWeLink integrations such as Alexa, Google or Apple Homelink.

The simple solution was to swap out the Normally Open (commonly called SPST or 1 Form A) 5V relay with a Normally Closed 5V relay (1 Form B). Since these are special order, we just used a common SPDT or 1 Form C relay that was as close to the original relay form factor and used the Normally Closed pins. So 99.99% of the time the relay would not be energized but on and would only shut off temporarily after it was signaled remotely or by a schedule.

NOTE: The relay NC connection is only rated for 3A, not 10A like the NO connection so this mod should only be used with devices drawing less than 3A.

Supplies

Sonoff Basic.jpg
ALQ105.jpg
Extension Cord.jpg
Solder Sucker.jpeg
  1. Sonoff Basic Controller (typically $8.00, bought 3 pack from Amazon)
  2. Panasonic ALQ105 SPDT/1 Form C Relay (around $1.50 ea, bought from Mauser)
  3. Short extension cord
  4. Drill and fine drill bit (No 59 bit works well)
  5. Soldering Iron, Flux and Solder
  6. Desoldering pump

Open the Sonoff Basic and Desolder the Relay

Opening the Sonoff Basic is simple, it come in a plastic case and you just need to pry the two case parts apart to remove the circuit board. The existing relay (black cube) has 4 pins, two of them are heavily soldered (to be able to carry the current) and the other two at the end are the 5V pins that have much smaller traces. I won't go into desoldering techniques, but suffice to say the larger traces take a bit of time to heat and I had to use the pump several times to remove all the solder.

Drill a Small Hole in Correct Position for New Realy

Screenshot 2024-11-06 at 11.36.52 AM.png
IMG_9994.jpeg
IMG_9995.jpeg
IMG_9997.jpeg
IMG_9998.jpeg

The Panasonic ALQ105 relay was chosen because it is very close to the form factor and pin layout of the original relay. We only need to use 4 of the 5 pins on it, the NO pin (the top right pin in the bottom view cad diagram) is not used and needs to be bent flush with the relay or cut off.

Of the 4 pins needed (5V coil pins, common and NC) three are in the right position; only the common pin is in the wrong place but very close to the trace needed to complete the connection. This pin needs to have a hole drilled 10.16 mm from one of the coil pins. I just set my micrometer to 10.16 mm, placed one of the ends into that coil pin hole and scratched where the second hole was to go, then used the small drill.

After fitting the relay, bend the pin going through the new hole over to the trace and solder the 4 pins, That's it for the hardware!

Setting Up the "Inching" Timer

IMG_0001.png
IMG_0002.png

As mentioned earlier, this uses an "inching timer" that is set up in the eWeLink application. Ths assumes you have already added the device and connected to WiFi, (For the Basic switch, use "Compatible Pairing" bottom left of the + Add Device screen). Click the 3 dots in the top right of the screen to open Device setting, then scroll down to "Inching Settings" select that, and in the "Inching Settings" screen, toggle it on and set the "inching" time. I set it to 10 seconds and save and save again. That's it, whenever you want to reset your modem, hit the power on (which now turns it off) and it will power cycle down and back up allowing you reboot your modem and reconnect after it reboots.