I am trying to make a switching constant current regulator for a Ni-MH charger. It accepts a current set input from the microcontroller using a PWM DAC. I basically want to source 2000mA and 200mA for 1C and 0.1C relatively for charging the 2700mAh battery.
The way that I've tried to accomplish this is as follows:
An OP-AMP which is configured in negative feedback, takes Vset (PWM DAC) as non-inverting input and Vsense (the voltage on sense resistor) as inverting input. It drives a small signal MOSFET with its output so that buck converter's voltage output is for desired current at the load.
However, I am getting oscillations on TP1, which affects the whole system.
Here is the schematic, I am sorry that it is 3500 x 2500px :
I have connected a short instead of R6, since Rdson of Q2 is about 50mohms. Also, I have connected a 1R 11W ceramic power resistor instead of a battery. Q3 is set off and Q2 is ON. I have connected an ampere meter and it shows about 1.9A through the resistor.
Here are some scope-shots of various test points which I have used very short ground lead on the probe to capture.
- Test Point 5; non-inverting input of the OP-AMP:
- Test Point 6; inverting input of the OP-AMP, voltage on the sense resistor:
AC Coupled:
- Test Point 1; Vsense pin of the switcher, drain of Q1:
- Test Point 2; switch node:
- Test Point 4 - Test Point 6; probe on TP4, ground clip on TP6, or in other words, voltage on P3 connector, or output voltage:
AC Coupled: