Arduino controlled lab variable power suply

May be look into a "crowbar" circuit

The crowbar looks like a bit too violent for this problem, IMHO. The solutions using a Zener (wiring cathode to Analog input, and anode to ground) or an ultra fast diode, like the UN4001 or a Schottky (wiring them cathode to +5V, anode to analog input), looks much easier. Although I have some 5.1V zeners in stock, I might end up using the Ultra Fast Diodes, just because they sound fancy :grin:
Well, actually, the Zeners will reduce my analog read scope to aprox. 4V, so, I´ll be loosing a lot of resolution. :%

Meanwhile, I´ve found this circuit that uses an ATMega and PWM. I don´t lilke the PWM solution very much, but the rest of the circuit shows a good solution to solve the voltage regulation an current monitorin with OpAmps. See that for voltage sensing, only a voltage divider with two resistors is used. Schematics here . "Carga" is Load in spanish, so there goes the output. Corriente means current, an Tensión is Voltage.

You can change the Aref to have a better resolution of the ADC

As far as I know, this is only usefull when you get voltages below 5V, and all the designs I´ve found use the whole 0 to 5V scope to get better info. And I found something called oversampling that can improve the ADC accuracy, that I will use for sure. More about it here http://www.atmel.com/dyn/resources/prod_documents/doc8003.pdf

I´ll start building the meters for current and voltage.