Your Powerbank has 1 BIG Problem! (That we can "Hack")

The art of hardware hacking. It's a fascinating world where one can push the boundaries of what's thought to be possible with everyday devices. In this case, we're going to take a powerbank as an example and see how we can hack it to meet our specific needs.

First things first, let's talk about why we need to hack a powerbank. Typically, these devices are designed to provide a certain amount of power to charge our devices on the go. However, sometimes we may need more or less power than what's provided by the standard setup. That's where hardware hacking comes in.

One of the most common methods of hacking a powerbank is to add one or more lithium batteries to it. This allows us to increase the overall capacity of the powerbank and provide more power to our devices. However, this also means that we need to be mindful of the threshold current value, which determines how much current can flow through the device.

In our case, we're looking to hack a powerbank with a threshold current value of around 50mA. To achieve this, we can use a powerbank circuit that's available for cheap online. This circuit consists of a single IC, the IP5328, which measures the current flowing through the device.

The question is, how does this IC measure current? The answer lies in the current shunt resistor sandwiched between the positive and negative sample node of VSYS (Voltage Sensing System). When 1A of current flows to the USB output, the shunt creates a voltage drop of around 10mV across itself. This voltage drop is measured by the IC and used to calculate the flowing current.

Now that we understand how the current measurement works, the next step is to trick the IC into thinking that 50mA is always flowing. We want to convert this into a shunt voltage drop value of around 0.5mV, which should match our desired threshold current.

To achieve this, I started by locating the shunt resistor and making sure what pin connects to what side. I then soldered a wire to the positive side and later also to the negative side. Next, I tried using voltage dividers, opamps, and even isolated DC power supplies to get around 0.5mV across the shunt resistor.

However, none of these attempts worked out. At this point, I realized that the simplest possible solution would be to cut the connection behind the resistor and feed the voltage before into a summing amplifier, which adds the 0.5mV for our 50mA threshold and then feeds that into the positive sample point.

In my theory, this should work, but the problem is that a 0.5mV OpAmp circuit requires lots of precision and cutting a PCB trace like this is also not simple to do. So I canceled this attempt and instead tried something way simpler: replacing the 10mΩ shunt with a homemade 200mΩ one.

This way, the voltage drop should be 20 times bigger, meaning the threshold current gets reduced by 20 times while the max current also gets reduced this way. And after doing some testing, I can confirm that the input and output max current decreased drastically, and sadly, the output voltage did take a hit by not being very stable anymore.

However, on the positive side, my low-power projects all still functioned, and this time drew enough current to not let the powerbank go into standby mode. So yeah, this hack is also not 100% perfect; but I think with all the previous methods I presented in this video, you will hopefully find one that suits your needs, and maybe you also learned something through this video.

If so, don't forget to like, share, subscribe, and hit the notification bell. Stay creative, and I'll see you next time.

WEBVTTKind: captionsLanguage: enCareful. Slowly. And......It is no secret that I do love powerbanks;  they are not only super handy when it comes to charging up your phone or nowadays even  you laptop, but they are also a perfect fit to power your portable electronics projects. I mean they provide stable 5V, can at least deliver 2A of current, they turn off when  their batteries are empty to protect them from over-discharge, you can easily charge  them up again, they come with a short circuit protection, so there is no way you can destroy  them even if you are an electronics beginner and best off all you can get them for super cheap. They pretty much only come with one major flaw that I just recently noticed again. And that flaw is that all powerbanks turns off automatically if you are only drawing  very little current on the output which sadly for me though is quite often with my projects. So now it is finally time to tackle this problem and in this video I will not only show you some  super simple ways to solve it; but also try out some more advanced hardware hacking which might  be successful; we will seeLet's get started!This video is sponsored by JLCPCB, my favorite PCB manufacturer who now also offers flexible PCBs.  For that they utilize 100% adhesive-free base material and LDI technology which ensures that  the PCBs are lightweight, thin, super flexible and can be made into any desired shape and size.  If that sounds like your kind of PCB then check the video description for a coupon for a free  flexible PCB and upload your first flexible design today to enjoy their awesome quality. Now first off; this auto turn off feature is actually not a bad thing for the average user. You see, the main electronics of a powerbank that converts the variable  voltage of the batteries into stable 5V draws around 13mA while being turned on. That means the batteries of a small powerbank could get drained within a  month which is not desirable.And that is why they turn off  automatically when only a little or no load is attached and now it only draw  around 0.1mA and thus the circuit keeps the batteries charged for a long time to come. The only problem is that this current threshold, so that the powerbanks stays on, can be quite  high and also differs from powerbank to powerbank.I tested my 4 ones here and got results of 50mA,  140mA, 40mA and finally 70mA which is quite a spread. So no wonder that some of my projects didn't kept the powerbank turned on. Which bring us to the first, most simple solution that everyone can use and it consists of simply  using a powerbank with a USB C output.In addition to that we also need such a  Power Delivery Trigger Board, that you can get for cheap. And all we have to do is connect them and there you go; we got 5V  on the USB A port that will never turn off.And as a bonus you can also select a higher  output voltage with a bigger amperage if your Power Delivery Powerbank allows for that. The main disadvantages of this method though are that two USB cables are definitely more  annoying to deal with than one and USB C powerbanks are usually a bit more expensive.So time for solution number two which is still super simple, but sadly also super inefficient. For that we have to solder two USB ports onto a piece of perfboard, connect their 5V pin and  GND pin to one another, check whether everything still works fine, then calculate what resistor  we have to add so that we draw 50mA, because I will be using the powerbank with the 50mA  threshold value, solder that resistor between 5V and GND, plug everything in and be happy  that the powerbank will never turn off.The big problem here though, of course,  is that we turn the powerbanks energy into heat and considering how much current our  small projects require; we basically now got more of a heater than a portable power source. So not ideal yet; but we can step it up a notch with a pulse circuit  which looks something like this as a schematic.Now before I explain how it works, let me firstly  build it on a piece of perfboard which let me tell you was pretty easy to do, took around 30 minutes  and all components in total cost maybe around 2$.And the end result looked pretty intriguing in  my opinion, so let's plug it into the powerbank, adjust this potentiometer  here a bit and badaboom badabeng the powerbank now stays on forever while only  drawing current spikes around every 8 seconds.So the main idea of this circuit is basically  attaching a bigger load to the powerbank for a very small amount of time periodically which  as you can see is enough to keep it awake.This is possible because of the 555 timer  IC about which I actually did a dedicated video in the past. But as a refresher, this IC can spit out a rectangle voltage signal with  adjustable on and off time.The on time is determined by  this potentiometer which I adjusted before and the off time is determined by this resistor. During the off time nothing exciting really happens, but during the on time this LED gets  powered and lights up and this transistor turns on which let's the bigger necessary current flow. Now I set my current value to 100mA; but feel free to experiment with the  current value and on/off time , so that your powerbank just barely stays on. So yeah pretty nifty circuit and if you are wondering how much energy we save  in comparison to before, then let me do a small measurement here with my energy meter. As you can see with the pulse circuit we require around 190uWh in one minute and  when going back to the constant load circuit then it is 2.37mWh which is a difference of  12.5 times more, not a bad improvement.But what if you do not want to waste  any energy at all which brings us to the last possible solution; hardware hacking. And before I rip open my lovely powerbank right here; let's rather try it first with  such a powerbank circuit you can get for cheap from the internet. To use it all you have to do is add one or more lithium batteries to it and as you can  see it works just like a powerbank, including the threshold current value  which in this case is also around 50mA.So the first thing to do when it comes to  hardware hacking is obviously understanding the hardware and for that I checked the  datasheet of the main IC, the IP5328And while browsing through the 27  pages and checking the application schematic; my main question was of  course how this IC measures current.Because that is of course mandatory; in  order to know when to turn off its output either due to too little current or too much current. And of course I quickly found a 10mΩ resistor sandwiched between the positive and negative  sample node of VSYS current pin.This resistor is a so called  current shunt and let's imagine 1A of current is flowing to the USB output. The shunt now creates a voltage drop of 1A multiplied by 10mΩ,  so around 10mV which the IC measures across it and thus calculates the flowing current. And that is basically how the current measurement works and the question is  now how we can trick the IC to think that 50mA aka the threshold current is always flowing. I mean converted into the shunt voltage drop value that would equal 0.5mV which we would  kind of have to sneak in here somehow.So the first thing I did to try some  things out was locating this shunt resistor, making sure what pin connects to what side  and then soldering a wire to the positive side and later also to the negative side. Next I probably spent around 3 hours trying things out with voltage dividers, opamps and even  isolated DC power supplies; but nothing worked.At this point though I finally realized the  simplest possible solution; listen.On this point we for example got  5V and behind this resistor it is less, like 4.99V if 1A is flowing. What we have to do is cut this connection here, feed the voltage before into a summing amplifier  which adds the 0.5mV for our 50mA threshold and then feed that into the positive sample point. In my theory that should work; but the problem is of course that a 0.5mV OpAmp  circuit requires lots of precision and cutting a PCB trace like this is also not simple to do. So at this point I canceled this attempt and instead tried something way simpler that other  people can try out as well and that was replacing the 10mΩ shunt with a homemade 200mΩ one. This way the voltage drop should be 20 times bigger meaning the threshold current gets  reduced by 20 times while of course the max current also gets reduced this way. And after doing some testing I can in fact confirm that the input and output max current decreased  drastically and sadly the output voltage did also take a hit by not being very stable anymore. But on the positive side I can also say that my low power projects all still functioned  and this time drew enough current to not let the powerbank go into standby mode. So yeah this hack is also not 100% perfect; but I think with all the previous methods I  presented in this video, you will hopefully find one that suits your needs and maybe you also  learned something through this video.If so don't forget to like, share,  subscribe and hit the notification bell.Stay creative and I will see you next time.