Just a few days ago I ran into a site on the net talking about how to build a microprocessor-controlled DC power supply. It's a good article that discusses the principles behind the design, and I think you might be able to apply some of the same concepts to what you're trying to do.
http://www.tuxgraphics.org/electroni...ticle379.shtml
Not really an answer to your problem but perhaps it will help a bit.