This is an old thread, but wanted to share my build for the Router UPS.
The entire build costs about Rs. 700 and you get 1 extra 18650 Li-ion Cell.
I got the circuit idea from this YouTube video.
I adapted the circuit to work on a 2S2P pack.(7.4V and 4000mAh)
The pack gives me about 8 hours of backup for a D-Link DIR 819 (needs 12v at 0.7A).
It gets charged in about 3-4 hours. (I haven't modified the TP 5100 module to set my charging current at C/10. The default is 2000mAh, which is around C/2 and I have continued using the same.)
I apologise for the poorly modified schematic, but I hope it's well readable.
The modified schematic.
BOM:
1* TP 5100 Rs.70
1* HX-2S-A2 Rs. 50
1* XL6009E1 Rs.75
1* Power MOSFET IRF9540 Rs. 45
4* IN 5822 Diode Rs. 40
1* DC barrel jack Male & Female (or whatever adapter your router input uses) Rs. 40
Fuses, Resistors Wires & other misc. Rs. 50
10000 mAh powerbank Rs.400 (I buy Rock powerbanks during online sales and get 5 2000 mAh cells. This build uses 4 and leaves me with 1 more for another project.)
The TP 5100 module
The TP 5100 is a charging module which can be used for both 1S and 2S packs. It has a wide input voltage of 5-15V, which in our cases fits most router adapters. The charging voltage can be set by creating a solder bridge between the 2 solder pads marked SET. It has a max charging current of 2A which is also the default but can be changed by changing the Rprog resistor. It also has a bi-LED which shows the charging status.
HX-2S-A2 2S BMS module
The HX-2S-A2 module is a 2S BMS. It is not a CHARGING MODULE. It is suited for low power 2S applications where the max current draw is around 5-6A, and is perfect for this use case.
XL 6009E1 Boost converter
The XL6009E1 is the boost converter. It requires a
minimum input voltage of 5V to work. Websites such as Robu,eBay and others have the input voltage as 3V which is wrong.
Giving it an input voltage below 5V, it will be possible to set the output voltage to required level under no load conditions. Once load is attached, the voltage will drop or will give out the magic smoke and fail spectacularly in a few hours time.
The IRF 9540 MOSFET is used for the switching application. That is when power from Mains is available, it supplies both the router and the charging module, when mains power is lost, it switches from the mains to the battery pack. This is essential because most charging modules are not to be used with the load connected to the battery pack, since when in CV mode (Constant Voltage) the resting voltage of the batteries will never truly be acheived and the charger will keep pushing the higher voltage to the cell, which isn't very good for cell health in the long run.
Instead of using a MOSFET, you can use a Switch, but that would mean you need to switch it on and off each time and it wouldn't be quite automatic.
The IN 5822 diodes are to prevent backflow of current, both the Mains and the UPS. These diodes have a low forward drop voltage and hence are better suited and can also handle higher current.
The fuse is to prevent the battery pack from either receiving or giving too much current and in the process burning up.
Right now, I have housed the entire build in a random plastic box which hangs via a thread from the screws drilled into the wall for the router.
please excuse the poor quality of the photo and the accompaniments on the side. I know it looks absolutely hideous.
But I am planning on getting a 3d printed case soon. I have been forbidden from drilling holes into the wall and I doubt regular double sided tape will hold the weight, so I have decided to use command hooks with indents on the back of the case to hold it in position.
Why use 2S, why not use 3S as in the video or a 1S pack?
The reason I did not use a 3S pack was because I have not been able to find a 3S charging module. Most builds use a CC/CV module which is more expensive and is rated for more higher current and in my opinion would be wasted in this build.
As for 1S, the first time I tried building this, I used a 1S3P pack, but for some reason the router would keep restarting. On checking voltages, the no load voltage from the XL6009 boost converter was 12V, however on connecting the router, this dropped to 6V. It was then that I found the minimum input voltage of the XL6009. I could have substituted the Boost module for a MT3608 which can indeed handle the 3.7V, but by then I had ordered the BMS and charging module and hence stuck to that. But yes, a 1S pack will work well when the Boost converter is changed to MT3608. However, please note that the MT 3608 can only source 2A, while this should be enough for most midrange routers, please make sure you read the input current for your router before you go down this road and note that a small heatsink would be a must in this case.
I have a problem with the MOSFET, for which if someone can point me in the right direction, I would be grateful.
The MOSFET when switching from UPS to Mains (ie, power comes back on) does so immediately (ie. no router restart) but when switching from Mains to UPS (power goes off), causes the router to restart. I wonder why this occurs. I did read the datasheet of the IRF 9540 but the switching speed seems to be very fast, so I don't seem to understand why this occurs.
Hope this helps.
Regards,
alphamike_1612