Change the battery to a resistor that would drop 12.8V at the desired charging current.
Also, the IRF520 required 10V to turn on completely. What is the voltage of your pulse source? For a real circuit, running off a 3.7V battery you will have to use not just a logic level MOSFET but one...