> This is a question. *Without regard to cost*, is it reasonable to > rectify the AC mains and measure the RMS of the AC waveform and run a > high current peak PWM cycle that is proportional to the RMS of the AC > waveform ? *Without regard to cost* nearly anything is reasonable. :-) But, I don't expect it would be too difficult to design a circuit that would, with minimal components: 1) Work directly off line voltage (perhaps with a capacitive reactance voltage divider?) 2) Sense the AC input to determine what fraction of the half-cycle is being provided by the dimmer. 3) Convert the AC input to filtered DC 4) Use the info provided by 2 to control a PWM'd current source to drive the LEDs. (It almost sounds like something for which Maxim would come up with a one-chip solution). Note that there is no reason to try to measure the RMS of the AC. It would likely be easier to directly detect the fraction of the time that the AC line is "ON". For example, if you connect the output of a phase-control dimmer to a comparator with a threshold of about +10V, you would see a duty cycle ranging from 0% to nearly 50%, which would be (roughly) proportional to the phase of the trigger to the triac/SCR dimmer. A little linearization magic and you would have the control input to the PWM process. So, the whole thing could probably be built using a PIC10F to measure the AC phase stuff and control a PWM'd current sourcing switcher. Total parts: 1 - PIC10F 1 Switcher inductor 1 XCap for capacitive reactance voltage divider 1 Switching FET, transistor A couple of caps and resistors Make 100,000 of them and they could be pretty cheap (especially compared to the cost of the LEDs). Make millions and you can create a custom chip, possibly using high voltage logic. Parts would probably then be: Custom chip (or wait for somebody to make it) Switcher inductor Maybe a couple of discretes. I am guessing in the quantities that incandescent replacement lamps would be made that the incremental cost of the control circuit will be significantly less than 1 US dollar. --- Bob Ammerman RAm Systems -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist