On Sat, 7 Sep 2002 04:42:04 +1000 Roman Black writes: > Hi Harold, does your PIC have a comparator? > You could set the comparator vref to the low > setting of 0.2v I think, and use a current sense > resistor of 0.1 ohms. Then a simple boost > converter consisting of one mosfet/inductor/diode > and the PIC controlling duty cycle. > > Having the luxury of a PIC brain and nice square > wave output to drive the fet you should be able to > get it efficient with the minimum of parts. :o) > -Roman > THANKS Roman! I've been reviewing your simple SMPS page. Nice! Are you suggesting using the comparator (and sense resistor) to make sure we don't go over a maximum switch current, but regulating the output using the PIC's PWM output? Relying purely on the PWM could result in the switch current taking off if something goes wrong, so limiting duty cycle based on a maximum measured switch current seems appropriate. I still need to adjust the switch duty cycle based on the LED current. I'm thinking A/D there, but are you suggesting use of a comparator there? Perhaps ramp up duty cycle until the comparator trips, then ramp down until it "untrips"? Anyone know of a simple current to voltage converter chip with an accurate built-in shunt? Maxim (I think it is) has some that are +/-7A with PWM output. Interesting parts. Harold FCC Rules Online at http://hallikainen.com/FccRules Lighting control for theatre and television at http://www.dovesystems.com Reach broadcasters, engineers, manufacturers, compliance labs, and attorneys. Advertise at http://www.hallikainen.com/FccRules/ . ________________________________________________________________ GET INTERNET ACCESS FROM JUNO! Juno offers FREE or PREMIUM Internet access for less! Join Juno today! For your FREE software, visit: http://dl.www.juno.com/get/web/. -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.