Question about JYE118 battery charger - Page 1
Forum section: electronics / beginners

author: kjr18
author_rank: Regular Contributor
timestamp: March 09, 2018, 06:04:19 pm
content: Hi, I'm in the process of designing a small Li-ion charger with small step-up converter for use with DSO Shell, and maybe some other things, and I stumbled upon JYE118: a small LT4054 based charger with automatic battery switch, which consists of single P-channel MOSFET, pull down resistor and a Shottky Diode. My question is: when I connect a 5v, won't it charge a battery not only through ic but also through D2 and mosfet's body diode? Would it be better to use normal diode with more voltage drop?

author: Peabody
author_rank: Super Contributor
timestamp: March 10, 2018, 12:13:56 am
content: The schematic isn't all that clear, but the battery positive terminal is connected directly to pin 3 of the LTC4054, before Q1. Q1 is oriented kinda backwards from its usual orientation as a switch. The body diode is actually forward biased toward the VOUT load, in the same direction as D2.So when 5V is available at the USB connector, the voltage at VOUT, even after the Schottky D2 drop, will be higher than the maximum 4.2V coming out of pin 3. So the body diode will be reverse biased, and no current will flow backward to the battery. Q1 itself will be turned off because it's a P-channel MOSFET, and its gate will be at 5V, which is actually above its source voltage of about 4.5V. So when 5V is connected, the 5V source directly drives the load (VOUT), and the battery is isolated, and charges independently (also powered by the 5V source).When USB is not connected, the gate of Q1 is pulled down to ground by the resistor, which turns on Q1, thus providing a very low drop path for the battery to supply VOUT.This setup is needed in case you want to operate the DSO150 at the same time you are charging the battery. Without the D2/Q1 setup, the charging IC would have to provide current for both functions through its internal charging circuit. It might be able to do that, but the charging ICs normally terminate charging when the current drops below 10% of the full charging current. If the load is drawing significant current, charging may never terminate, and continuing to apply 4.2V to the battery after it is fully charged could damage it, and could even release smoke, or worse.I did the lipo mod to my DSO150, and my charger circuit does not have this feature. So I have to remember to only charge the battery when the DSO150 itself is turned off.

author: kjr18
author_rank: Regular Contributor
timestamp: March 11, 2018, 10:28:34 am
content: Isn't a P channel MOSFET's body diode other way around? From drain to source? I built this part on a breadboard and when I connect 5v from power supply it does charge a battery. Even with normal diode and lower voltage on battery it charges slightly.

author: Peabody
author_rank: Super Contributor
timestamp: March 11, 2018, 11:12:42 pm
content: The body diode does go from drain to source, but in this circuit the mosfet is oriented so that its drain is connected to the battery, and the source is connected to the load. That's the opposite of its normal orientation, but the mosfet itself will conduct in either direction if it is turned on. The diode, however, will block current from flowing from the load back to the battery if the mosfet is turned off. So with 5V supplied by USB, the mosfet's gate is at 5V, which turns it off, and the diode blocks any current from flowing back from D2 to the battery.You can't apply more than 4.2V to a lipo cell. If 5V is getting to it somehow, something is wrong.

author: kjr18
author_rank: Regular Contributor
timestamp: March 12, 2018, 05:37:17 am
content: Are you sure? It looks to me that a source is connected to battery, and drain do load. That transistor pinout is the same as indatasheet, where you can clearly see what pin is source, and what is drain.

author: Peabody
author_rank: Super Contributor
timestamp: March 12, 2018, 02:38:58 pm
content: Quote from: kjr18 on March 12, 2018, 05:37:17 amI apologize for not looking closely at their drawing. I'm familiar with how the circuit works, and saw what I knew must be there, and not what is actually shown. Sorry for the confusion.The drawing is incorrect. I don't know about the actual JYE118.Here's a discussion of how the circuit works. Look particularly at the section "Charge circuit with load sharing" and the schematic shown there. You'll see it's as I described, and the text in that section explains how it works. The comments at the end may also be useful.http://blog.zakkemble.co.uk/a-lithium-battery-charger-with-load-sharing/Edit: He uses a Microchip charger, and their official App Note for load sharing is here, but the principle is the same for any charger:http://ww1.microchip.com/downloads/en/AppNotes/01149c.pdf

author: kjr18
author_rank: Regular Contributor
timestamp: March 12, 2018, 07:35:20 pm
content: Don't let it bother you too much, it's not worth itI looked briefly at your circuit and I see where JYEtech made a mistake, I need to simply swap drain with source, and source with drain, and problem solved. I wonder how many they sold with this schematicWell, this is another example that you rather need to verify some things before making/buying some things.

author: Peabody
author_rank: Super Contributor
timestamp: March 12, 2018, 10:04:08 pm
content: I think every one they've sold was sold with this schematic. The question is whether it's just the schematic that's got the mosfet backwards, or whether the board layout is wrong too. Looking at the pictures and the manual, I just can't tell. The header pinout is different in Figure 2 in the manual than in the "Back" picture just below that. So I don't know.