Part #/ Keyword
All Products

DIY Solar & Grid Auto-Switch UPS for Router and Optical Modem Power Supply

2026-04-13 13:03:17Mr.Ming
twitter photos
twitter photos
twitter photos
DIY Solar & Grid Auto-Switch UPS for Router and Optical Modem Power Supply

If you are interested in DIY routers, you may want to take a look at this article.
If you are troubled by the fact that home routers usually require long-term continuous power supply, do not worry. This article can help you solve that problem. If you happen to have solar panels at home, you can make a simple modification so that the system uses solar power when sunlight is available and automatically switches to grid power when solar energy is insufficient.

If you happen to have a 150W/18V solar panel, you can use a solar charge controller to charge four 30Ah lithium iron phosphate (LiFePO4) batteries.

image.png

The LiFePO4 batteries need to be equipped with a battery protection and balancing management board.

image.png

Since the power supply voltage of your router and optical modem (ONT) may vary—some require 12V, others 9V, etc.—and solar output voltage can be high (up to 14–15V) or low (down to around 10V), you can use an automatic buck-boost (step-up/step-down) module to provide stable voltage suitable for different devices.

image.png

Then you can use an electronic ballast housing as the enclosure. The input has two power paths: one is the solar output connected to the input of the buck-boost module; the module output positive terminal is connected through an isolation diode. The other path is the original power adapter of your optical modem/router, whose positive output is also connected through another isolation diode. The negative terminals of both paths are connected together as the common negative output, and the combined diode outputs form the final power positive output.

image.png

To achieve automatic switching between solar power and grid power, and to prioritize solar power when available, you can use diode-based power OR-ing. The switching is instantaneous with no delay. You can also adjust the output voltage of the buck-boost module to be about 0.7V higher than the power adapter output voltage, so that solar power is prioritized automatically. 

This is what the finished build looks like:

image.png


* Solemnly declare: The copyright of this article belongs to the original author. The reprinted article is only for the purpose of disseminating more information. If the author's information is marked incorrectly, please contact us to modify or delete it as soon as possible. Thank you for your attention!