Hi,
This is not a trivial problem. The best way to do it is a step-up to higher voltage than your highest input, followed by a step down to 12V. To keep reasonable efficency use a high (I'd suggest 24-30V) intermediate voltage. This minimises currents and I2R losses.
A Pic is not the way to go. The other question is what is your load? does it really need 12V? If it is a piece of equipment does all of the circuit need 12V or will some run unregulated?
I've had a number of cases were people went to great lengths to provide the "correct" input voltage to a unit (and failed hence my involvement) when it was not needed. One example was a computer that was going to be fitted to an aircraft with a "28V" supply and the computer was specified at 24V. The 28 to 24V regulator dropped out during operation. However taking the cover off the computer revealed a packed DC-DC converter with an 18V - 32V input range!
Robert G8RPI.
Bookmarks