If you’ve ever had to call your internet service provider’s tech support, then you know the standard fix: reset your modem and router. It seems like lazy troubleshooting, but they tell you to do that because it works most of the time. Most ISPs assign your IP address dynamically these days, and resetting your modem ensures that it grabs the correct IP address that is currently assigned. Modern modems should handle that themselves, but you still may need to reset your router. That’s a pain, so Redditor ExtremeReward built a simple device to do the work for them.

ExtemeReward is using an inexpensive D-Link router that is “pretty lousy.” That forces them to have to reset the router manually whenever the internet connection is lost, which is a common occurrence. The solution was to build a device that automatically detects when the internet goes and then resets the router. The device frequently pings ExtemeRewards’ ISP’s default gateway to determine if the internet is currently working. If four pings in a row fail, then it will turn off the power to the router for five seconds and then turn it back on. If the internet still doesn’t work, it will reboot a few more times at increasing intervals. If it’s still down after that, then the problem is likely with the ISP itself.

The device was built with a knockoff Arduino Uno. That’s paired with an ENC28J60 Ethernet module, which connects to the router. The EtherCard Arduino library was used to make that Ethernet module work with the Uno. An ESP8266 WiFi board could have been used, but the Ethernet module eliminates the possibility of a WiFi issue forcing the router to reset. A relay module is controlled by the Arduino, and that switches off the power to the router when needed. A new router would be a better option, but this is a practical Band-Aid fix that is affordable to implement.