Introduction: Load Sharing || Use Solar Panel Safely With TP4056

About: Make your life more lazy and awesome by the touch of electronics. Check out awesome projects and learn how to build them easily and cheaply.

Hi! Today I will show you why you should not use a solar panel directly with TP4056 Li-Ion battery charger, and how you can use solar panel with TP4056 Li-Ion battery charger.

The problem - I wanted to use a float sensor to measure the level of water in my overhead tank. It has three wires coming out of it. It is basically a single pole double throw switch, which is controlled by the metal ball inside the sensor. The gravity pulls the metal ball up and down depending on the height on which sensor is floating and its counterweight. So, I wanted to make a circuit with LED to show low water level, buzzer to show high water level, a salvaged Li-Ion cell for power along with a boost converter and TP4056 charger. Originally, I planned to charge the Li-Ion cell with a 6V solar panel, but quickly realized the problem with it. The LED/buzzer will continue to draw current if the connection is not broken which would mean the TP4056 will not realize that the battery is full and continue to feed power to it. This can lead to overcharging of Li-Ion cell and in a worst-case scenario the battery can blow up. To avoid this, we can add a switch to cut off the power when battery is charging but that would require a manual intervention which in my case was not possible. The solution is to still add a switch, but in this case, it will be an automatic switch and will cut the power to the load whenever charger is connected and as an awesome bonus, will feed the load with its own power. Let’s see how we can achieve that.

Supplies

Please find the list of the parts I used below, along with some affiliate links.

IN:

IRF4905 (1 pcs) - https://amzn.to/3KYi5tO

IRF4905 (10 pcs) - https://amzn.to/3KVOuB2

1N5819 - https://amzn.to/3uPulqI

Float Sensor - https://amzn.to/3Eo9DBn

TP4056 - https://amzn.to/3uPKiNK

MT3608 - https://amzn.to/3uOyQBK

US:

IRF4905 - https://amzn.to/3EkBnHc

1N5819 - https://amzn.to/3vnqdgE

Float Sensor - https://amzn.to/3EjttOh

TP4056 - https://amzn.to/3KMvnJA

MT3608 - https://amzn.to/3vo4Eg2

UK:

IRF4905 - https://amzn.to/3rwWAZn

1N5819 - https://amzn.to/37TMESC

Float Sensor - https://amzn.to/3OhylYC

TP4056 - https://amzn.to/3ry6MAx

MT3608 - https://amzn.to/3uPKxbC

Step 1: Watch the Video

Watch the video to get a visual understanding of how the circuit is working.

Step 2: Load Sharing

The solution, or rather the switching circuit is called load sharing and contains 3 components, a P-channel MOSFET, a Schottky diode and a pull-down resistor. Let’s understand its working. When charger is not connected, the gate of the MOSFET is pulled low, that means it is in conducting state and that means the load is connected to the output of TP4056 board. On the other hand, when the charger is turned on, the current chooses the lower resistance path to travel and hence the gate is pulled high, which means the MOSFET in not conducting anymore, disconnecting the load from TP4056. The diode is to make sure that current doesn’t flow from the battery to the charger when the MOSFET is conducting. Now that we understand the circuit, let’s move on to the next section.

Step 3: Choosing the Parts

Choosing the parts is as critical as designing the circuit right. You want to make the circuit as efficient as possible and choose the parts that offers the lowest power losses, especially if the load in your circuit is going to draw higher current. In the load sharing circuit, we can optimize two components to keep the losses to a minimum: the P-Channel MOSFET and the diode. You should choose the P-Channel MOSFET that has the lowest ON resistance. Same goes for the diode, it should have a minimum forward voltage drop. You can easily find the components using mouser website. Just search for what you want, add your requirements in the filter and there you go. It is really handy. I chose IRF4905 which has 20 mOhms of ON resistance and 1N5819 which has forward voltage drop of 0.4 Volts.

Step 4: Making the Circuit

I skipped prototyping and gathered the components to solder on a perfboard. I will use male headers to solder the TP4056 first. You can use a breadboard to hold the pins straight while soldering it. After individually soldering all the 6 headers to the board, I somehow managed to put it on the perfboard, as the pins were not aligning with holes on the perfboard. I had to bend some headers. After that, I soldered it in the perfboard. Again, to solder the boost converter I will make use of the male headers but the holes are a bit too big in the boost module. So, I will solder the headers first on the perfboard. The headers generally don’t easily fit in the perfboard, I use a hand drill to enlarge the holes a bit. After soldering the headers, I can now rest the boost converter on top of it and solder it to the headers. I will use male headers to connect everything that is not on the board, like the battery, LEDs and buzzer etc. I avoid using wires wherever possible. If the points are close enough, I use solder itself to make the connections. If it is far, I use leftover terminals from LEDs, diodes, or transistors to make connections. You can bend them at your will and are very easy to solder. The VIN+ of buck module connects to OUT+ of TP4056, and I connected OUT- of TP4056 to VOUT- of buck converter as VIN- and VOUT- as shorted making the connection length a little shorter. Now before making further connection, let’s first adjust the output of buck converter to 5 Volts. By the way DO NOT CONNECT wires to batteries like I did, it can be very dangerous. I disconnected one of the wires after the battery was not required anymore for safety. I finished the remaining circuit off-camera as it was a pretty normal soldering. I used jumpers when there was no place left in the bottom area. I also had to use one wire to connect the gate to 5V input. Doing a quick continuity test to make sure everything is connected correctly.

Time to see if the circuit works. We are getting battery voltage and 5 Volts at correct places, so that’s good. I used an LED with a current limiting resistor to check the output. It is glowing that means the MOSFET is conducting. After that I connected a charger. I am using a power bank to imitate the charger. As soon as you connect it, nothing special happens except this blue LED glowing up showing the battery is full. Now I am disconnecting the positive pin of the LED from output leaving its negative pin there. The positive will connect to gate using an alligator clip to visualize the changes in gate voltage. I connected my battery again and the LED did not light up, meaning gate is pulled low as expected. When you connect a charger though, it lights up that means gate is pulled high and the MOSFET is not conducting. If I connect the LED back to output again, we can see it is glowing taking power from the power bank itself. That means our circuit is working fine.

Step 5: Completing the Circuit

I added some more female headers for the float sensor and the two loads it will control. Also, I soldered resistor for LED with the header itself so that the LED can be connected directly. I connected the pole of sensor to middle header and throws to either side and one LED. Let’s connect the power. The circuit is working perfectly fine with the sensor as well. I connected an LED to the other throw as well. The resistor for that is wrapped around its leg. Working just fine. Everything said, I plan not to use the solar panel for various reasons, and instead use a 5V adaptor to charge it, which only turns on when the water pump turns on. This load sharing circuit would still be required.

Lastly, my plan is to use a buzzer instead of the green LED, but that can be a problem. When the tank is full, the sensor can stay in that position for a long time until the water level reduces, and I don’t want buzzer to keep buzzing until someone takes a bath. To solve that I connected positive of that throw to 5V input, which only turns on when the water pump is on. That means buzzer will only make noise until the pump is on. Once it is turned off buzzer will also turn off.

Step 6: Done!

Thanks for reading! If you enjoyed that Instructables, please consider subscribing and also take a look at our YouTube channel where we post more stuffs like this. Have a nice one!