I'm a drone racer pilot, and few months ago I needed to replace my FPV google battery. I had some 18650 cell scavanged from laptop pack laying around. So I made a 2S2P pack with 4 cell, added a JST balance connector, wrapped everything in tape and voila :
I really liked this form factor, it fit in the hand or in the pocket very well. And it's look like a dynamite stick.
However, it has some incovenient:
- No standard DC connector
- No battery level indication (very bad if your google turns off mid-flight..)
- Charging isn't convenient, a regular lipo charger/balancer is needed
So I came up with this project to improve it.
- 9V 10W output to power my FPV google
- DC barrel connector
- USB charging
- Some kind of low level battery warning
- Bonus: USB 5V output to use my pack as a power bank
I wanted it as close as possible from the dynamite stick form factor. 3D printed TPU enclosure will be used instead of tape ^^
The first thing I'have done was to define the PCB shape. At first I planned to put the PCB on top of the cells, but it would have add few cm in height with all the connector. Then I realized that there is some space inbetween the cells. How much space ? Well you can sneak inside a 8mm wide, 65mm long PCB.
Quite small, but challenge accepted !
Connectors choice was very limited by the form factor. One side of the power bank exposes the DC jack connector, and the other an USB micro connector with a LED status. Unfortunatly, I didn't found a full size 2.1mm jack small enough. I had to use a 1.3mm jack instead.
Traditionnal powe bank architecture with a micro B and full size connector wasn't possible here, there is barely enough space for a micro B. Sounds bad for the bonus spec..
For the 9V output, I use the TPS61085 from TI. With a 2A switch and 1.2Mhz switching frequency, it can delivers enough power with a small 4×4mm 4.7µH inductor. The TSSOP-8 package is also a good balance between size and soldering ease.
This part of the design was more complex and time consuming than I expected, USB charging isn't simple as it seems to be ^^
I started by some documentation about the USB Battery Charging specification (BC1.2). The idea of this specification is to define a way for a source port to communicate it's power capabilities to a downstream port by manipulating the impedance of the D-/D+ data lines. In addition to the BC1.2 standard, several manufacturers have implemended their own signature for their wall adapter.
The easy way to go is to use a standard Li-po 1 cell charger with a current limit set to 500mA to be compatible with every USB port. But implementing BC1.2 is very interesting to speed up charge time, as more and more wall adapter can delivers several amp. For example, my 4 cells power bank with a 10000mah capacity will take approximately 16 hours to get fully charged with a 2.5W input !
To implement the power bank USB features, my device must use the OTG specs, as it has only a USB micro B connector. An OTG compatible device will power the VBUS line when the 5th pin (ID pin) is shorted to GND. The question is then how to get the 5V from the battery ?
With this in mind, I started to search for the IC that meets those specs. I hadn't the PCB space to implement each function separately (BC1.2 detection, Lipo charging, OTG), so I looked for a fully integrated solution.
As often nowadays in electronics, the IC you look for exist, you just need the good keywords to find it !
In this case, I finally found the perfect chip with USB standalone charger key word : the Texas Instrument BQ25606
- BC1.2 source detection
- Up to 3A charge current
- OTG 1A output
- Battery protection (undervoltage, overcurrent, thermal ..)
- Small 4×4mm QFN
I used a bicolor 3mm LED to display the system status. The green LED is connected to the charge status pin of the BQ25606. The red LED is controlled by a Attiny µC:
- LED On: Battery discharging (through USB or 9V output)
- LED Blinking : Low voltage alarm (3V threshold)
A BD49K30G threshold detector at 3V is used as the Attiny family I use (9/10) doesn't have an internal voltage reference for the ADC.
Here a small diagram to sum up:
I managed to fit the design on a two layer board, and I'm quite happy with the ground plane which is not too scattered. PCB thickness is 1mm, not enough space for a standard 1.6mm PCB. All component are also on top layer for the same mechanical constraint. Overall, it's one of my most dense board so far.
Two big pads are used to solder battery wire, no way to fit an other connector. Test point on the bottom allow to program the Attiny .
Because of the QFN and of the 0402 size passive component, it was a good opportunity to try a stencil/solder paste assembly !
I order the stencil with a custom size along with the PCB and printed some support for it :
The pick and place process was still long and laborious, but hot air gun reflow is super fun and satisfying ^^
After some rework :
LED, wire and thermistor were then added :
I made two mistake on that design part: one very silly and one more tricky :
- The MOSFET of the inverter was upside down... So the OTG pin was always high because of the body diode, and the battery couldn't charge.
- The same MOSFET was polarised from VBUS, not from Vbatt. So when trying to use the OTG mode, nothing happened because VBUS was not powered yet. A nice egg and chicken issue..
To avoid those kind of mistake, I really should have reviewed my design at the end with a fresh look. Or better, having someone else to have a look at the schematic.
After few tracks cut and some straps, problem fixed, and OTG and USB charging are now working.
I also overlooked a bit the current capabilitie of the TPS61087. Right now the board can deliver up to 600mA, which is closer to 5W that from the 10W target. It can still power my box google, but it stall with some more power hungry model (like the Fatshark). I will probably replace the boost for a more powerfull one in the future.
The TPU case is composed of three parts: the USB cover, the DC jack cover, and the main shell. After printing those elements, time to assemble everything !
The PCB is first inserted into the main shell, followed by the four cells.
After that, all cells are soldered together and connected to the board.
Finally, both covers are glued in place :
And it's working !
Current project files (v1.1) have the USB circuit fixed, as well as some other minor modifications. However, I have some idea for an improved v2 version:
- Change boost IC for a more powerful one to reach 10W output.
- Add an analog switch between D+/D- to be detected as a DCP in OTG mode.
- Switch to a SMD LED with a light pipe if possible.
I'm gonna use it for few month before working on the v2, to see if anything else shows up with time. I'm also very interested by any remark/suggestion, feel free to tell me what you think of this power bank !