I have built a buck converter in constant current mode in the circuit configuration below in order to charge a supercapacitor. A difference amplifier amplifies the voltage across the 20m Ohm resistor and closes the top MOSFET if the current goes below 5.5A and opens the switch once the current reaches 6A. The PWM signal is being applied with an arduino that monitors the voltage from the difference amplifier and is in the place of the signal generator in the image.
The problem is that the PWM signal from the arduino is highly distorted after it is connected to the circuit. I have attached pictures of the PWM before it is connected and after. Any help would be greatly appreciated.
PWM before connected to circuit
PWM when connected to circuit
The problem is that the PWM signal from the arduino is highly distorted after it is connected to the circuit. I have attached pictures of the PWM before it is connected and after. Any help would be greatly appreciated.
PWM before connected to circuit
PWM when connected to circuit