On 18/03/2017, at 4:26 PM, Josh Koffman wrote: > On Thu, Mar 16, 2017 at 10:30 PM, James Cameron wrote: >> My first experiment has been an 12V MR16 LED lamp which _isn't_ >> designed for dimming, and it has been _fun_. I've totally distracted >> myself with trying to understand the effect of varying PWM frequency >> and duty cycle on the hidden converter in the lamp housing. It >> flickers, sometimes badly. >=20 > Interesting. I'm surprised that there's an active convertor in there. > I would have expected them to play the series parallel game to get the > LED strings as close to 12V as possible. Only three COB LEDs in the lamp, so it would be hard to play that game whil= e keeping to the luminance specification across the operating voltage range= .. >=20 >> With a light sensor in a test rig and some judicious forth code, >> combined with GNUplot, here's a plot of brightness >> (vertical) versus PWM frequency (horizontal) versus PWM duty cycle >> (multiple lines). >>=20 >> http://dev.laptop.org/~quozl/tmp/brightness-vs-pwm-frequency-vs-duty-cyc= le-1-to-24.png >=20 > Neat! >=20 >> Wobbly parts of the curve are where flickering happens. I've got >> other data which expresses the flickering; population standard >> deviation of brightness samples. >>=20 >> I haven't been able to design a simple algorithm to achieve what I >> want; smooth transition without flickering. Best was to plot a >> straight line over the graph and use discrete programmed values from >> an array. >=20 > Would going with some kind of output filter on the PWM help out to > smooth things a bit? What seems to happen is that the converter in the lamp flickers anyway at s= ome stable DC voltages, and the flicker can be avoided through PWM of suppl= y; possibly by keeping part of the converter convinced it can run while the= other part is failing to proceed. ;-) A one-off, of course. It would never work at scale; every lamp would behav= e differently. --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .