Final Project | Power Bank
Presentation: Final Project Powerpoint
The objective of this project is to build a power bank as DIY as possible for the purpose of learning, experimentation, and for exploring using different chips, navigating blueprints, printing PCB and more. Ultimately, my goal is to build a functioning power bank as “from scratch” as possible. So if it’s possible for me to print the PCBs for both circuits and assemble it, that’s the best option. However, if it’s only possible to print one, or simply to use preassembled modules, that’s also an option although it’s slightly less to my objective of building it completely DIY. Overall, my objective is an explorative inquiry into understanding how a power bank works through building one as DIY as possible.
My original inspiration for this project simply comes from Shanghai in general. I use my phone a lot when navigating the city both for directions, transportation, and payment alike. However, my phone has, on far too many occasions, run out or nearly run out of battery while I’m out in the middle of the city. For this reason, I’ve always wanted to invest in a power bank or portable charger so as not to run into this danger again. Additionally, I didn’t previously know very much about portable chargers or how they work. Therefore, for my final project, I decided to build a power bank so that I would have one for my phone if needed, so I could learn how it works, and for the satisfaction of building something myself.
How it works:
In it’s most basic sense, a power bank contains two circuits that work as follows: the first is the charging circuit which is designed to charge a Lithium-Ion rechargeable battery. Then the second circuit, the booster circuit, is designed to step-up the voltage from the battery from 3V to 5V so that it can be output to a phone or device at the required 5V.
The basic function of the power bank.
Additionally, when shopping for a power bank, it’s usually customary to check for two main things. The first is the bank’s size in mAh. mAh, or milliampere hours, is the capacity of the battery which is equal to its average amperage multiplied by the number of charging hours. In conventional power banks, this range is generally from 2,000 to 12,000 mAh. Essentially, the higher the mAh, the more times you will be able to charge your phone from it before needing to recharge the bank itself.
Another thing to check when looking for a power bank is its average amperage, or current, that is drawn by the phone or device. Generally, at least 1A is required to register that a device is charging, but overall, banks average between 1-4.8A. The higher the amperage, the faster your phone will charge. So both capacity and speed are the two major components that differentiate various power banks.
The charging circuit itself is usually a TP4056 module. This module is specifically designed to charge single-cell lipo batteries and requires an input voltage of 5V and runs at a fixed 4.2V. The module itself can have customized amperage depending on which resistor is used in the pin 2 connection to ground. The recommended amperage is roughly 37-40% of the battery capacity. In this case, it should be configured to roughly 814-880mA for the 2200mAh battery (described below) which would require using roughly a 1.33k ohm resistor (1.5k ohm –> 780mA; 1.33k ohm –> 900mA). However, as will be explained below in my procedures, I left the module untouched with its standard 1.2k ohm resistor that provides the maximum amperage of 1000mA.
This module includes two LEDs which indicate charging. The red LED indicates the device is charging while the green LED indicates standby. If the input voltage is too low (within 30mV of the battery’s voltage) the module will enter standby mode, dropping current output to less than 2uA. In this case, the LEDs will be off. Furthermore, the LEDs will be off if the temperature of the battery is either too high or too low (this is monitored with an NTC thermistor), or if there is no battery output connected.
The battery is a 18650 Lithium-Ion Cell designed with a nominal capacity of 2200 mAh and a nominal voltage of 3.7 V.
As for the booster circuit, there is no clear or defined module. The circuit itself is a DC-to-DC step-up power converter intended to step up the voltage between the input and output while stepping down the current. Most modules function with at least a diode and transistor, to help control the current flow, along with a capacitor and inductor, to help store energy.
Basic Booster Converter
Additionally, the general function enacts through a MOSFET switch (other switches can be used, but generally booster circuits use a MOSFET). The MOSFET works as a transistor that switches between an open and closed state. In the closed state, the inductor receives current flow and generates a magnetic field which stores some energy. In the open state, the magnetic field collapses in order for the current to continue flowing towards the output. This actually reverses the current flow through the inductor and puts it in series with the source. With the inductor and source in series, a higher voltage is attained.
Additionally, the capacitor is charged in parallel with the device at the same boosted voltage. Therefore, when the switch goes back to the closed state, thus reversing the current flow in the inductor and generating a magnetic field while eliminating the inductor and source working in series, the capacitor, protected by a diode to flow to the source, continues to provide the same voltage to the output load.
In essence, the booster circuit works through a switch, generally a MOSFET, that alternates between an open and closed state. The voltage is boosted through the inductor’s reaction to the alternating switch, which puts it in series with the source. Then this voltage output is sustained through the capacitor which is charged simultaneously with the load while the switch is open and then charges the load itself when the switch is closed.
Part I: Booster Circuit Research
After the preliminary research into how the power bank functioned both as a whole and through its individual circuits/components, my next step was determining which booster circuit I should use. While the charging circuit was clearly defined with the TP4056 module, I needed to decide which booster circuit would be best. In this case, I define ‘best’ as being a chip with a clear and readable schematic, datasheet, and explanation of functionality, it should be easy to acquire/available through a Taobao order at a reasonable price, it should be relatively easy to solder (the shape of the component itself shouldn’t be too small and the legs should be well-spaced), and it should have a decently high current so as to provide effective and efficient charging to my device.
Some of the chips that I researched included the HT7750A, MAX641, and LT1111. While I won’t go into too much detail since I didn’t use any of the above chips, they were all configurable booster converters which allowed for stepping-up 3V to 5V, which we needed, or could be configured to step-up a variety of range of voltages. The biggest thing to consider between the above chips was their amperage and their shape. The HT7750A provided the highest amperage, but only at 200mA which is not high enough to be readable by a phone that requires a minimum of 1000mA. Additionally, most of the chips were made to be soldered to a PCB through a machine and are not designed in a friendly way to soldering free-hand.
In the end, we settled on the PAM2401 which, although still providing a challenge to solder, was easily accessible through Taobao, provided 1000mA, and could be configured to boost 0.9-4.75V input to 2.5-5V output (but we just need the 3V-5V configuration).
Part II: Developing Schematics & Board
Now that I knew both circuits required in the power bank, the TP4056 to charge the battery & the PAM2401 to charge the phone, the next step was actually developing the schematic for each and printing the board. Unfortunately, this part, along with the previous research portion, required a lot more time than I had anticipated which will be more evident in the later parts of this inquiry. Because the research process took so long, I didn’t have time to really sit with the schematics or designs as much which explains why there are so many different trials and attempts before settling on a single PCB blueprint that I downloaded prearranged.
TP4056 (trial 1):
I first attempted to recreate the above schematic from the TP4056 datasheet in Eagle. The biggest challenge in this stage was ensuring I used the correct library so the components that I placed would be the correct dimensions for the physical pieces. Additionally, neither Eagle or the Sparkfun library that I had downloaded included a model for the TP4056 chip and I had trouble finding another library that had it.
TP4056 (trial 2):
As a second path, I found the above prearranged Eagle schematic from e-radionica‘s GitHub. This looked complete, however, I had difficulty matching it exactly to the datasheet’s schematic. Additionally, it used a different chip in the Eagle schematic (a DIO5158 instead of the TP4056). To the best of my knowledge, the creator of this schematic used the DIO5158 under the assumption that it has the same dimensions and physical construction of the TP4056 which allows it to sit as a placeholder in the schematic. I attempted to move forward with the downloaded schematic, however, and went about replacing the resistors (which were previously surface-level) with through-hole resistors to make the soldering process easier. However, this was quite time-consuming and I was still unsure if this was the correct schematic so, as will be explained below, I switched to the double-sided complete schematic.
TP4056 (trial 3):
In my second attempt, I found another premade schematic from circuitdigest. However, this used a different opensource software called easyeda rather than Eagle. This schematic came complete with both the charging module and the booster module, however, I isolated the charger module in the below schematic.
I found this schematic much easier to read and it included the correct central chip so I felt more comfortable moving forward with it. The next step, similar to the above attempt in Eagle, was replacing the resistors so that they were through-hole resistors. I then exported it to a board where the long journey of placing/arranging the components began. Two of the attempted iterations are below, however, there were many many many more iterations that I didn’t document.
After spending a good number of hours trying to puzzle through a convenient placement, I decided it was time to move on. Unfortunately, because the initial research and schematic organization process took so much time, I did not have enough time to keep attempting the placement process. However, through the process, I learned a lot about placement theory, such as the order in which components should be placed depending on their nature (i.e. the USB should be at the edge of the board no matter what so it can be connected while the chip should be placed relatively center since it is the focus) along with orientation (i.e. it’s good practice for all components to be oriented in the same direction, either vertically or horizontally).
PAM2401 (trial 1):
For the PAM2401, I used Eagle to design the schematic based on the datasheet configuration.
This process was much easier since I’m more familiar with the schematic drawing software from working with both Eagle and easyeda. However, after completing the schematic, I realized that the chip I’d been using provided in an Eagle library was different from the chip used in the schematic in that it was missing the PG pin. While they are the same chip, it turns out there are different models/variations of the chip. Due to the impending time constraint, I decided not to pursue the research to correctly wire the model of the chip found in Eagle.
TP4056 & XL6009:
In the end, I settled on using the preassembled schematic and circuit board found through easyeda. Whereas before I’d isolated the TP4056 portion of the circuit, I decided it would be more time effective to simply leave it together with the booster circuit so that they could be printed all at once.
While the charger portion of the circuit utilizes the same TP4056 module, the booster side of the circuit uses a different chip, the XL6009. While this chip is still a DC-to-DC boost converter, according to its datasheet its typical uses are designed for higher voltages. For example, the general voltage input range should be between 5V to 32V. While the absolute minimum voltage the chip can take is said to be between -0.3V and 36V, it’s typical configurations are aimed at inputs of 5V or higher. Our booster converter, again, should be 3V to 5V so, while there’s a little concern as to whether this will be an effective booster, at the very least the schematic is readable and the PCB board is already assembled for printing which, at this point in the project, is essential for saving time.
Part III: Printing the PCB
Printing the actual PCB was probably the most exciting process of this project (aside from soldering just because I really do love soldering). The PCB blueprint was for a two-sided PCB, which made it a bit more complicated, but the machine itself was very explanatory.
In printing, the biggest thing to pay attention to was which drill the machine required to ensure that it could remove the correct bits of copper effectively.
In the first printing attempt, I accidentally flipped the board without checking that it was aligned in the same position. This caused the backside of the PCB to be printed slightly off-center from the front which blocked some of the holes.
On the second attempt, the PCB printed fine overall, however, it did not remove the excess copper from the top layer.
Because of the excess copper on the board, it would be nearly impossible to solder it because any solder that overflows onto the excess copper would force unintentional connections in the wiring.
In the end, not only did the final PCB have excess copper on the surface, but the PCB printing machine we have is not equipped to print the small VIA (vertical interconnect access) holes which the board design requires to make connections between the two sides of the PCB.
Even though the board was relatively unusable, I still wanted to at least try soldering the small TP4056 chip onto its surface. Unlike the perf board that I’d used in the mid-term which functioned entirely with through-holes, the chip in this circuit is only surface level. I soldered it by first adding just a small dot of solder to each point on the PCB that had a connection. Then I did the same to each leg of the chip. Finally, I used the iron to basically melt the two together. In the end, I think it is slightly crooked, so if the circuit was fully assembled it would not work properly, however, it was still good practice for the full ‘DIY’ experience.
Part IV: Circuit Assembly
Despite all of my research and groundwork provided in the previous steps with the goal of creating a completely DIY power bank, in the end, I had to compromise to assembling the circuit with premade circuit modules for both the TP4056 and the booster circuit.
Since the circuits were already assembled into PCBs with USB connectors, the most challenging aspect of this part was simply figuring out how to solder the battery. After watching a video tutorial, I soldered it by first scratching the surface of the battery end a little before applying a healthy amount of flux and then soldering by continually feeding the solder until it finally stuck. Then I used hot glue to ensure it wouldn’t pop off.
Part V: Does it work?
Now that the power bank is assembled, the biggest remaining question is, does it work? So the first test was simply to see if it worked at all.
I used Kevin’s phone, which was completely dead and turned off, to test and it takes a micro-USB cable. After plugging it in and turning on the booster module with the switch, the phone did register charging because a white light started blinking at the base. After about a minute, the phone actually powered itself on, as dead phones do when they charge, which, without acute measurements, means that at the very least, the power bank works to charge a phone. Once the phone was on, it did not register on the screen itself that it was charging, however, very gradual the battery life would increase.
When I tested it on my phone, which is an iPhone requiring the lightning bolt adapter, it similarly did not register the charging state on the phone itself, however, the overall charge percentage would gradually increase. The overall charging is very slow, however, due to the low current of the booster circuit (which will be explored below). For example, I kept Kevin’s phone charging throughout the entirety of our project presentations last Thursday (roughly 2 hours) and it went from completely dead to 10% charge. So although it is quite slow, it works.
Part VI: Measurements
Pre-Assembly Individual Circuit Voltage Measurements:
Before assembling the circuit at all, I measured the input/output voltages of each circuit uniquely. When provided 4.91V by the power regulator, the TP4056 module maintained a constant output of 4.1V. Additionally, the booster circuit (which is a mysterious circuit we found in the lab, who’s exact chip or core is unknown), when given 3.06V from the power regulator, output 5.06V.
In terms of the TP4056 module, Rudi helped me wire it with a multimeter that can read current.
While in standby mode (green LED, not charging), the current measured at about 0.1uA.
In charging mode (red LED), the current measured at roughly 340mA and an output voltage of roughly 4.15V.
Using the above measurements, we can calculate the circuit’s wattage using current * voltage: 1.411 W = 4.15 V x 0.34 A.
Additionally, we wanted to test the charging trend over time. The battery itself was already almost charged. Initially, it read 3.96V and, after running the charging module for roughly 5min while we measured the current, the voltage had increased to 4.2V. In that short time, it was evident that, as the voltage increased, the current decreased (which makes sense in order to satisfy Ohm’s law that current is proportional to the voltage across two points).
In order to explore this concept further, we first had to discharge more of the battery.
Using the booster circuit, I attached two wires to the USB output.
I then connected the booster circuit to a motor. The motor draws a high current so, after turning on the module, it was effective in rapidly discharging the battery.
As stated above, the battery initially had 4.2 V. After 30 minutes of charging the motor, the battery had decreased to 3.874 V. In further inquiry, I would continue discharging the battery using the motor and monitor not only the voltage but the current as well. From there, I would use the TP4056 module to charge the battery and, similarly, monitor the current and voltage in 5-10 minute increments. With this information, I would calculate the circuit’s overall average efficiency using the efficiency formula [(Poutput / Pinput) x 100%].
As for the booster module, I would like to follow a similar line of inquiry as above and monitor its charging of a specific device (ideally a phone) over time and, additionally, calculate its average efficiency.
In terms of actual measurements, I compared the current and voltage output of the module when connected to my Bluetooth earbuds and to my iPhone.
***** disclaimer [start] *****
When completing the measurements, I recorded all measures of current in mA. However, as evidenced by the measurements below, 1.35 mA is frighteningly small and relatively impossible for charging a phone that requires a minimum 1A. Therefore, while I will keep the measurements as I have in my notes to maintain their integrity, it’s possible that the measurements between these disclaimers should be in A rather than mA (ex. 1.35mA –> 1.35A) as a result of poor recording.
First, the quiescent current (or measurement of current when there was no load attached) measured at roughly 2.05mA and 5V.
When attached to my Bluetooth earbuds, the red light on my earbuds illuminated to indicate charging. The current measured at 1.72mA (see disclaimer) and the voltage at 5.045 V.
Finally, when connected to my iPhone, the iPhone itself did not indicate that it was charging. However, the charge did increase from 13% to 14% and the current measured at 1.35 mA (see disclaimer) and the voltage at 5.09 V.
Additionally, I think there is a discrepancy because, even if we switch all the measurements of current into A, it doesn’t seem likely that the quiescent current should be higher than the current when there is a load attached. Therefore, I think it’s possible that the quiescent current is accurate at 2.05 mA and I forgot to switch units when measuring higher currents with the load. Altogether, I’m not entirely sure where the error is in these measurements, but my best guess is that they should read 2.05mA (quiescent), 1.72A (earbuds), and 1.35A (iPhone).
***** disclaimer [end] *****
Part VI: Summary of Measurements
Overall, the power bank works in the sense that it is capable of re-charging a lipo battery and can then discharge the battery through the booster circuit in order to charge a device. While the TP4056 module functions with similar general parameters as was expected through its datasheet, continued inquiry would involve both monitoring its usage overtime along with calculating its efficiency so as to have better comparable evidence of its function.
Additionally, with the booster module, I would like to continue with a similar inquiry into its usage over time along with its efficiency. However, the module itself is still a mystery to me because it doesn’t appear to have incorporated a specific chip. So, while I don’t have a datasheet to reference it with, based on the general input/output measurements it seems to function like a basic boost converter as I explained above in Preliminary Research. It would be good to know more about how this circuit works to see if its possible to modify it for higher currents. While overall the power bank functions effectively, it is not very efficient because the loads on the booster converter are unable to draw a high enough current.
Part VII: Housing Fabrication
Now that the circuit is functioning and we have gathered some measurements of it, the final step is to actually encase it in something so it is functional for everyday use. My goal for the power bank’s design is to be both small and to be comfortable to hold in your hand so it is more effective as a transportable device.
I first used hot glue to arrange all of the components around the battery. I tried to keep it as compact as possible while also keeping the USB connectors and button in a reachable location. Additionally, the glue helps to create a surface for the modules so that they’re supported in the back when you plug in a chord. However, it’s important to avoid gluing directly behind any of the module’s central chips since its possible they could heat up and melt the glue.
I decided to crochet the case out of yarn because it is softer than a 3D or laser cut fabrication which would make it more comfortable to carry in a pocket. My only concern with the crocheted case is that it might insulate heat when the modules are engaged. However, I made sure to use a relatively looser stitch which will hopefully allow the circuit to breath.
I made sure to leave a hole on either side of the case for the USB chords and, additionally, left a small hole on the top for accessing the button. In the end, it doesn’t look like your conventional power bank, but with its small size and soft texture I think it works nicely for carrying it easily and comfortably in a pocket.
After closing the case, I realized that I forgot to include a space in the crochet for viewing the LEDs on the charging module which is essential to knowing whether the battery is charged/charging. However, after testing the charging circuit in the case, it turns out that the LEDs reflect really well and are visible through the holes in the crochet. So even though they’re not entirely clear, they are readable.
The materials list really depends on which construction you follow. As elaborated above, I initially researched a number of different circuit configurations before settling on using the assembled modules.
For Module Based Assembly:
- 18650 Lithium-Ion Rechargeable Battery (x1)
- TP4056 Lipo Charging Module (x1)
- 3V to 5V DC-to-DC Booster Module (x1)
- Slide Switch (x1)
- Wires (xMany)
- Hot Glue
- Yarn & Crochet Hooks
- Multimeter with current reading capabilities (x1)
- Alligator Clips (xMany)
For Complete DIY Assembly:
- TP4056 Chip (x1)
- XL6009 Chip (x1)
- 1k ohm resistor (x6)
- Red LED (x1)
- Green LED (x1)
- Micro-USB (x1)
- 5k ohm resistor (x1)
- 220uF capacitor (x1)
- 47uF capacitor (x1)
- 1uF capacitor (x2)
- 1N5824 Diode (x1)
- 10uF capacitor (x2)
- 33uH inductor (x1)
- NTC thermistor (x1)
- USB-A3 (x1)
- 18650 Lithium Ion Battery (x1)
- Zener Diode (x1)
Depending on which construction you make, further materials lists can be made by referencing the relevant datasheet linked above.
The most significant improvement that I would like to make with respect to this inquiry as a whole would be overall time management. I spent roughly 75% of the process researching how power banks work, how each circuit in the bank works, along with researching so many different chips for the booster converter that when it came time to actually design the power bank, I didn’t have enough time to really sit with and test various schematic constructions, PCB blueprints, or to thoroughly measure and document the end circuit’s functionality. While I certainly learned a lot through the research process, it’s time consumption prevented me from creating a completely DIY circuit as I had intended.
In terms of the power bank itself, some improvements that I’d like to implement in a future iteration would be:
- Using a slide switch rather than a push button to activate the booster circuit,
- Research into the mysterious booster circuit module that I used and see if there’s any way it can accommodate a higher current so as to facilitate faster device charging,
- To more thoroughly document the two circuit’s current/voltage relationship over time along with their efficiency, and
- To wire exterior LEDs to the charging circuit so they are more visible to the user.
I entered this project with the goal of creating a power bank as DIY as possible. While I, unfortunately, was unable to use my own designed or printed PCB for the final power bank, I did get a taste for the process of designing your own. Through the extensive pre-assembly process, I got much more comfortable referencing and reading datasheets, understanding how specific components function in a circuit, and, more specifically, how slight changes in resistors or other components can modify the circuit’s stats. Additionally, I familiarized myself with importing/modifying/designing schematics using both Eagle and easyeda software and gained a new respect for the process of organizing components on a PCB for printing. Finally, even though there are possible discrepancies in my measurements above, I think I gained a better understanding not only of how to complete these measurements, but also in how to compare them back to their respective datasheet and use the measurements to better understand the circuit functionality itself.
In the end, while the final power bank was a simple assembly, the many failed attempts and trials to create it completely DIY were extremely rewarding and fundamental to the overall learning process.