I am designing a 2s Li-ion battery charger using a buck converter from a 10W (18V, 0.55A) solar panel. So I understand that the duty cycle controls the ratio of the input power vs output power and therefore Io = Is/DC and Vo = Vs.DC, but when I increase my duty cycle both the voltage and current increase to a point where all 0.55A are being drawn and then the voltage becomes limited causing a massive voltage drop. I am using an arduino uno to generate a 20kHz switching frequency and the circuit diagram can be found below.I am using an 8 ohm power resistor in place of the battery to ensure I dont damage the battery. Any help/advice would be greatly appreciated.
Edited: Updated circuit, NMOS MOSFET changed to PMOS MOSFET for M2