Build your own Tiny USB Battery


After having successfully built a few tiny USB batteries in the past, I was always left with a bit of frustration about the difficulty to build them. My previous model has been working flawlessly for the last 2.5 years now despite the hackish way it was built, that's undeniably a success!

Once I got my laser engraver and managed to create some quite fine PCBs, I thought it might be a good use case to try to make a PCB for this tiny battery project. This would save me from having to destroy existing PCBs and would make the project much more replicable. It would also standarize the power LED and the button that were added as a hack on top of the previous one. Last thing I wanted was to increase the output voltage to 5.2-5.4V in order to compensate for cable losses, especially when powering various single-board computers (SBC) which drain a lot of power and tend to become unstable under 5V.

Creating a PCB for the battery.

I already mentioned, I'm not good at using Eagle, I find it pretty complicated to do trivial things, even though maybe it allows to easily do complex things. Thierry Fournier offered some help on the project as he's much more fluent with Eagle than I am. He first created the library of components, the schematic matching my needs, and a dual-layer PCB. To be honest I wasn't very impressed with the resulting size, and attributed this to the dual-layer design: vias take a lot of room, and some of the components there appeared large enough to support having copper tracks passing underneath them.

So based on Thierry's schematic I tried my luck with a single-sided approach. I moved and rotated components around until I managed to route it without a single via nor strap. A first version was created, at about 33x22mm, with the charge and power connectors on two adjacent sides:

The result was already quite good:

Given that I had 240mAh batteries of exactly 30x20mm I really wanted to squeeze it further, which led to the final version documented here, whose PCB is 30x20mm, exactly the battery's dimensions.

The result is great, it's flat on one side (PCB), flat on the other side (battery), with the components in the middle between the two. The final version is very dense and requires careful placement of the SMD components, but I had no problem soldering them all with a thin solder iron tip (0.2mm) and thin solder wide (0.5mm). The USB connectors are both on opposite sides this time:

In fact for the final version I even tried my luck with solder paste. For this I produced the GCODE for the stencil mask in Eagle, and used it to cut holes in a 150 microns-thick Post-It paper. It appeared to be exactly the appropriate thickness for the paste. I attached it with duct tape to the PCB and scraped some solder paste on it:

But it seems that paper is not that great for solder paste, it seems to extend a little bit while pulling the paste, and it looks like some places were slightly thicker than expected, probably because more paste accumulates in corners and isn't totally removed.  I purposely did not put paste on large components like the inductor nor for the USB connectors' ground because I didn't want to risk seeing them move under the heat gun and ruin the rest of the circuit, I preferred to solder them by hand.

Despite not being perfect, the result remains impressively good though, and there were very few errors, so I think it will have to be attempted again, maybe with Kapton tape, or with sticking paper, I don't know yet.

Looking closer, it appears that some of the micro-USB connector's solder joints were joined together, that that the capacitors were not properly soldered. This is because they were salvaged from an older PCB (all components were desoldered) and were not clean enough for the solder paste to properly take on them:

This is why I said above that I had to re-solder a number of components using the soldering iron's tip. However the solder paste is very convenient for the IC's thermal pad under the package, which must be connected to the ground plane. And fortunately the IC was properly placed.

Choosing components

The module is still based on a TP5400 or TP5410 IC. The only difference I found between the two is the resistor value to program the charge current, any can be used. One nice thing about this circuit is that it contains a 4A switch with a low on-resistance, and that the voltage sensing is external so it's trivial to adapt it to increase the voltage a bit (there is even such an example in the datasheet).

I salvaged most of the components from a previous TP5410-based module. I wanted to use a higher current inductor. I found that 2.2 and 4.7 uH do work fine and allow the module to deliver up to 2.5A and even peak up to 2.8 at 4.5V output. It's better not to do this for too long though because the IC cooling is performed through the PCB on a single side and is a bit less efficient than the one from the original design. I soldered the battery's positive terminal directly on the inductor's pin:

Regarding the battery, I used LiPo batteries made for drones. The 602030 ones are perfect. They must withstand at least 15C of discharge capacity. However most of these batteries have an internal protection board and most of them are of poor quality resulting in a huge voltage drop as the current increases, to the point of being barely capable of delivering 1.5A under 5V. It's not very difficult to remove the board from the battery, but I'd rather find some unprotected batteries to avoid this annoying step. Till now I didn't find any (the rare ones available are reported as out of stock).

I intended to use a 0.2 Watt LED driven by a 39 ohm resistor, but found that I had in stock a few PCBs salvaged from 220V LEDs. These ones are made of series of five 0.5W LEDs in parallel in a very compact form factor. So I used these PCBs as a replacement for the power LED and reduced the resistor to 15 ohms, after successfully trying 18 ohms on the first version. This gives me roughly 0.5W of LED power without overheating the LEDs, which illuminates very well in dark stairs or in my garage for example.

The USB connector on the final version was larger than expected because I ordered short ones (10mm) but due to lockdown measures in place here I still haven't received them, hence the reason why on the final version it's a bit too deep, and the button was placed slightly outside to align with it.

Some users might prefer to put a male USB-C connector (e.g. to charge a smartphone). But this would require a protuberant part which risks to be damaged. Also instead of a micro-USB connector for the charge it should be possible to use a USB-C female connector. But micro-USB is still more available for me, and this matches what most existing batteries do. Also, there exist tiny USB-A to micro-USB adapters that insert directly into a USB port and which automatically provide a male micro-USB connector. Maybe these even exist for USB-C now, I don't know. The ones I have look like this:

As an enclosure, I used transparent heat shrink tube, then filled everything inside using hot glue, just like for previous models. This keeps the device very compact and solid. I tried throwing it on the ground and it doesn't have any problem. Maybe some people will want to try 3D-printed enclosures, or even molded plastic.

Download files

The source files (schematic, board and library) as well as the output files (schematic in PNG, board in PNG and PDF) are available here. There's nothing particularly tricky in the assembly process, except maybe hacking with the battery's connections. It's particularly important to be careful not to make a short circuit while soldering the battery, especially the one without the protection board! I don't have any good recipe for this except lots of care.

There's a dual-color LED to indicate the charging status. The common track is the anode (+), the left LED (connected to pin 2) is the red one (indicating it's still charging), and the right LED (connected to pin 4) is the greed LED (indicating standby mode or end of charge). The layout was made to also support installing individual LEDs (which I did on my second version). When connected to a charger, it should light red during charge and green once fully charged. The LEDs are never lit without a charger.

Tests and conclusions

With a 602030 240mAh battery, which is roughly 0.9 Wh, I can power my GL.iNet WiFi router for about 1 hour. This makes an ideal companion to every WiFi/3G pocket router! Below it's connected to my GL.iNet either with a short USB cable or with the tiny adapter shown above.

I can also use my bike's powerful front light for about 20 minutes at normal power level, or about 10 minutes at full power (6W), which is more than I usually need when crossing woods at night.

At this point it goes beyond a proof of concept as it's possible to build them by hand in about 2 hours, including the battery modification. What takes most of the time is finding suitable components like the high current inductor, or soldering tabs on the LED bar. But for anyone able to source components, the circuit has nothing difficult.

I think that these dimensions are really great, I don't feel the battery in my pocket and have it with me every day. I've even replaced the v3 that I had been using since last article. Some people might prefer to have a bit more energy. There are slightly larger batteries with even more capacity. I like a lot what can be found in the range of 800 to 1200 mAh, with widths up to 35mm and lengths up to 45-50mm. But many of them are much thicker, up to 10mm. It's possibly not that big of a deal when using a thinner PCB, as it's possible to save one millimeter here.

Another idea would be to replace the flat, empty PCB surface with a solar panel and have it charge the battery. But at such dimensions, even the most efficient panel would take ~10 hours in full sun to charge a small battery so it doesn't seem really interesting in the end.

Overall I'm extremely satisfied with this design. The next step for me would probably be to be lucky to find it pre-made by someone who can design complete devices and source the components! I think I'd be OK with paying up to about $5 for such a device, maybe a bit more if the capacity gets slightly larger, provided the strong power is still present.