USB power supply mod and 3G for TL-WR1043ND

Using multiple power-consuming devices in USB hub modded router will exceed limited power of built-in 5V rail of TL-WR1043ND router. In my case connecting both 3G modem and external HDD to led to power drops and root filesystem disconnections. Keeping router self-sufficient I managed to built additional 5V power regulator into the tiny case of router, making mobile internet as backup line for home network.

3G modem and extra switching power supply (right bottom corner)

My ISP is best choice among other providers in suburbs where I live. Yet their QoS is questionable: only 96% availability in 6am-10pm window. And they seem to follow this miserable SLA especially when I am urged to be online in working hours. It is not surprising, that once a week, some time in the middle of the day they go offline for hour or two. Well, having SLA for non-commercial use would be overkill from prices perspective. With the advent of free of charge internet access I decided to setup backup internet connection on OpenWRT router.

Late summer this year I was told that due to TD-LTE tender, the winner is obliged to serve low bandwidth mobile internet access for free. Now, any Polish citizen can request SIM card from Aero2.pl, a company associated with Polsat Cyfrowy, the winner. To get it only 4 euro of deposit must be paid. With this SIM card one gets 24/7 unlimited access with 256kb/s speed in first year, and 512kb/s in following 2 years. In 2014 free access will be probably converted into paid version.

Since it takes a month to get SIM card I decided check configuration first with the other SIM card. I bought Vodafone K3565H, cheap 3G dongle claimed as compatible with OpenWRT software, put into it other data transfer enabled SIM card, and started playing with OpenWRT.

Setup would be long way to go, fortunately the eko.one.pl site is dedicated to OpenWRT. This website, next to excellent forum, has a lot of tutorials built by Cezary, well recognized small routers guru, owner and maintainer of this portal. This time again I could quickly, in half hour or so, reconfigure my WR1043ND to use 3G modem.

USB hub current drain test

Router successfully recognized USB modem and after firewall and network reconfiguration I could establish mobile connection. In a half way I had to reconfigure system to use UUID instead of device name: USB modem has SD card slot and “usb mass storage” driver was sometimes loaded first renaming HDD device name preventing external root from being loaded.

The last configuration part was script periodically checking primary internet connection and in case of failure starting 3G and changing routing table to transparently switch to backup line (and back again, when primary connection is alive). I was not suprise when I found eko.one “simplefailover” package doing exactly what I needed.

I got configured solution that I started testing and it failed. When 3G modem was activated, HDD sometimes spontaneously lost power and could not spin-on again. Since my setup bases on extroot it was dead end. I needed more power for USB hub.

First I checked if original power adapter can supply such load. It gives 1.4A maximum current at 12V. Testing power adapter power consumption on peak router usages gave me impression that adapter still has margin and does not need to be replaced with more powerful one. I proved this one using laboratory high power supply that does not solve the problem. I disassembled router and plugged laboratory supply to USB hub measuring current – without 3G on idle it was fluctuating around 0.4A. with idle 3G modem it was around 0.6A but with 3G modem actively working and HDD access it peaked up to 1.0A. So far built-in USB hub draw the current from local 5V power line designed for single USB socket I was pretty sure I was not designed to exceed 0.5A by specification. I had to power up USB hub and I wanted to avoid second power adapter with cables attached to router box, I needed built in additional power regulator converting 12V into 5V line.

Step-down high current regulator LM2676

Heavy current drain load test

Power mod placement

I could not use well known linear regulator like LM7805. It must dissipate power near to voltage difference multiplied by output current. Using 1.5A for calculation with margin and reduction from 12 to 5V it gives nearly 10W of heat and in effect would need large radiator impossible to fit into the router box. I needed highly efficient switching regulator that will remain cool without radiator. I have chosen LM2676 as a balance between size of inductor and price of IC. With its worst case efficiency at 88% it would need to dissipate only ~1W as heat. To deal with even higher current I picked up elements to support 2.5A and designed PCB area to radiate the heat, or to solder in additional radiator. During test with constant load of 1A over 15 minutes, the LM2676 had body temperature, so my PCB was over-designed a little.

The home grown PCB process based on toner transfer has evolved: I tested first time chemical tinning of PCB to ease soldering and prevent from oxidation. The high current wires on PCB I have also covered with extra layer of solder to make them thicker.

Looking for best placement I decided to use the corner next to HF head. On main board you can find inductor for on-board switching regulator. Having similar shielded inductor I was sure it will not interfere with high-frequency components nearby.

Switching regulator PCB

Switching regulator schema

Complete solution was tested with forced 3G mode and heavy HDD load. I found that switching regulator was really cool. Most hot, yet not scorching, was radiator on USB hub controller. New component added to box was also proven to work with stock adapter, powerful enough to drive router with 3G and HDD.

Total cost of the solution is less then 8 Euro and around 10 work hours spent on PCB design, including creating own library for D2PAK-7 case and SMT capacitors, then assembly, load tests and wiring all things up.

If you liked this article, help me to maintain blog on electronics and donate!

Downloads

This entry was posted in Electronics, OpenWRT. Bookmark the permalink.

3 Responses to USB power supply mod and 3G for TL-WR1043ND

  1. drekthar says:

    nice job……… look’s awesooome

  2. Henrik says:

    Nice work with the LM2676!
    Any chance to get the Eagle library there the LM2676 exists?

    I’m working on a 24 volt to 12 volt 3A DC-DC converter for a lock/alarm system for a nonprofit organization. I have made one package but I’m not sure if a done the package fot print right!

Leave a Reply

Your email address will not be published.