I want to charge my LiFePO4 cell with the following schematic.
The arduino provides a PWM signal, which goes to an isolated MOSFET driver. He drives the logic level MOSFET.
I came up with this setup, so that the signal is a crisp rectangle on the gate, and my arduino is isolated.
Now I have a problem. At first I didn't have the resistor R2. I tested it, while measuring current with a current meter, in place of R2. Everything seemed fine, I charged with 5A, and nothing got hot. After I removed the current meter, I lowered the duty cycle, such that I got the same current. But this time, the MOSFET got hot really fast.
So I figured, it must have been the resistor inside the current meter. I calculated it (I hope correctly), and put a resistor R2 having the same resistance of 0.02Ω. To my surprise, it still gets hot.
Why is that? Is my schematics correct at all? How can I improve from here?
My second question: I know it's a good thing to put a resistor before the gate of a MOSFET. I didn't put one here, since I thought it's a logic level signal. Am I mistaken? Is it needed here?
[Btw, I know I have to provide a constant current. And I also check for overvoltage. And also temperature. Currently, this isn't my concern. I tried to reduce it to the problem I have. So in the diagram you only see my MOSFET.]