Daves recent PSU projects remided me of my unfinished one and inspired me to finish it.Some might have seen the first attempt at this that worked but was unstable at times and i had a few complaints about it, also i got my hands on a bunch of little switchmode modules that can make a great preregulator and get rid of the heavy transformers. I was aiming for much lower specs but as design went on it ended up confirming to higher specs than first anticipated. What i wanted to do is basically 20V at 2A..

Final specs:
-Output voltage 0 to 40V (Down to 20mV without or with load)
-Output current 0 to 4A (Tested at 5A fine)
-Adjustable and non oscillating current limit
-Works as a electronic load too(Adjustable voltage and current)
-Low noise (Under the noise floor of my digital scope, multimeter says 1mVac)
-Starts up with output at 0V
-Fully digitally controlled (12bit DAC, 16bit ADC)
-Optoisolated serial interface
Final design:
Plan is to put 4 of these power supply in to a single case while having them communicate with the front panel over a optoisolated UART bus. Plan on the front panel is to have a large LCD along with rotary encoders and a USB to UART interface for the PC just because its easy to do. The interrupt line on the optoisolated bus is there to optionally shut down all the supply rails if one of them reaches the current limit. But for testing i just wrote a VB program to debug my PSU for now.

Circuit explanation:
The principle of operation is like any other lab PSU, but because everything is controlled by voltages the circuit becomes a bit more complicated. First opamp is just a basic differential amp that reads the voltage off the current shunt resistor, output of this is a nice voltage than can be fed to a ADC. Then it compares that to a max current signal from the DAC and that then pulls down the desired output voltage that also comes from the DAC. Bottom part of the analog circuitry is exactly the same except it works for sinking current.
The weird part is where the negative supply comes from, i tried to design it without one but it was too hard. Instead i came up with a cheep way of getting a negative supply. Between the negative end of the power source and ground i put a silicon diode that creates a 0.6V drop across it. This means that the negative side of the power source is now at -0.6V and we can use that as our negative opamp supply(But creates extra dropout voltage).
Power Source:
First plan was to use a transformer, but i got my hands on some nice tiny switchmode modules that convert 300V DC in to isolated 24V 6A or 48V 3A while being smaller than a pack of cigarettes. They also have a very nice feature of the output voltage being trimmable from 110% to 10% by the means of adding a external resistor. At first i wanted to use a digital pot to do that but the negative terminal is at -0.6V because of my negative rail cheat for the opamps, because of this i made my own variable resistor from cheep SMD mosfets and resistors that together create a 5bit variable resistor. This way the MCU can adjust the voltage on the power source so the linear regulator has the least amount of work
Datasheet for the modules:
http://cdn.vicorpower.com/documents/datasheets/ds_375vin-micro-family.pdfProblems with the design:
As always i had to bodge a few things to get it working properly. First issue of them all was that i put in some weird dual opamps from microchip that had a CS pin and that made half the thing not work while i was scratching my head.Then as with every analog design is changing out various resistor and cap values to get it tuned just right. Turned out i messed up the high side current shunt because i was doing 10x gain in there the opamp inputs got too close to the power rail and made it crap it self. As for the optoisolators those are a complete failure, first of all they ware SMD instead of trough hole like my board, but i got them to fit on to it. Then they started acting strange and that was due to the wrong footprint pinout again leaving the phototransistor side of the optoisolator backwards(Still sort of worked at times tho.) And at the end of it all i remembered UART has a idle state of 1 so the optoisolators should have been on the low side not high.(What sort of crazy shit was i on when i designed that part

)
So do you guys think this sort of PSU is a good idea or a complete waste of free time and components?
Will also post some test results soon along with scope screencaps.