OK, I found some time to try Bruce's code and I got the same results. At a very high and very low feedback signal the PWM signal disappears and the output goes 100% high. If the feedback signal varies rapidly the PWM goes 100% low.
I took off all the switching components to remove any chance of noise and just used a pot to vary a fake feedback voltage and got the same results.
I am going to try the code and ciruit used in the AN1130 app note. My schematic is different to this - I have the inductor on the positive side of the LED's and use a PFET.
My requirements are also different.
Input = 24v
LED forward V = 21V (6x blue LED's with 3.5vdrop each)
LED I = 700mA
Current Ripple = 10%
Switiching Frequency = 200KHz
I calculate the inductor value to be 131uH. I will have to lower the gain on the feedback opamp from 11 to maybe 5 or something. I'll figure that out later - just a simple resistor value change.
I'm going to spend a bit of time trying to convert the code from C to PICBasic. I've havent used C before so that will take me a while to actualy figure out what the heck void and so on means.
Bookmarks