On Thu, Jan 17, 2013 at 02:18:23PM +1000, David Duffy (AVD) wrote: > I have the need to regulate the voltage going out to some LED strips. =20 > These strips are simple 12V DC types that have 3 LEDs and a resistor per= =20 > section, repeating throughout the strip. >=20 > The voltage available is nominally 12V, but can vary between 12V and=20 > 14V. The ability to handle up to 18V input is also desired by the=20 > client. The current draw of the LED load is approx 3 Amps. >=20 > I was thinking of a simple 12V LDO, but at 2V differential that's 6=20 > Watts in heat - ouch! Ideally this unit needs to run with minimal heat=20 > dissipation. I also thought about a SEPIC converter, but that would=20 > take too long to design and debug and be overkill for this application. >=20 > My next thought was to use a PIC12 to PWM a logic level MOSEFT and use=20 > the A2D in the PIC to sample the output voltage via an R/C network. In=20 > theory this will allow me to regulate the output and even allow for a=20 > dimming function to be offered as an option. >=20 > There are only 100 units to build initially and maybe some more after=20 > that, but not thousands. A PIC based solution would be low parts count=20 > and fairly easily tweaked to my mind. Does this sound like a reasonable= =20 > solution? > David... David, Interestingly enough this is an item that's on my immediate to do list as I'm looking to develop a switcher based sealed lead acid battery charger. The most promising route points to the use of an enhanced PWM module. I happen to be partial to 16F1XXX parts so I will reference them for this discussion. Enhanced PWM has the ability to do auto shutdown using a comparitor. So it should be possible to build a simple automatic buck regulator using the ePWM output to drive the buck switch, and feeding the output via a resistive divider into the comparitor. When the auto shutdown feature is turned on, each PWM cycle is halted when the comparitor changes state. With auto restart, the ePWM module will started PWM at the start of the next cycle. So if you set the PWM duty cycle to the maximum voltage you wish to allow (say 13.5V in your example) and set the comparitor to trigger at 12V (using a combination of the voltage divider plus the internal resistive DAC for the other end of the comparitor) then once the ePWM is turned on, it will dynamically cycle by cycle drive the buck switch until the comparitor cuts it off, regulating the output voltage. I'd be interested in anyone pointing out any holes in the idea. BAJ >=20 > --=20 > ___________________________________________ > David Duffy Audio Visual Devices P/L > Unit 8, 10 Hook St, Capalaba 4157 Australia > Ph: +61 7 38235717 Fax: +61 7 38234717 > Our Web Site: www.audiovisualdevices.com.au > ___________________________________________ >=20 > --=20 > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist --=20 Byron A. Jeff Chair: Department of Computer Science and Information Technology College of Information and Mathematical Sciences Clayton State University http://faculty.clayton.edu/bjeff --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .