I am designing a programmable bench power supply and I want the output voltage and current to be monitored by a microcontroller. The voltage range is 0-20V and the precision that I want it to have is 0.01V. I have read about ADCs in wikipedia and I have combined some formulas that I found on the Internet. This is what I have came up with:
(where n is resolution and Δ is voltage per step)
Most ADCs operate in logic level voltages so I have to use a voltage divider to reduce the output voltage 4 times (so that 20v->5v and 0.01v -> 0.0025v). So I need an ADC with a precision of 0.0025v per step. So with Vmax - Vmin = 5v and Δ = 0.0025v, n = 10.9 , so I need a 12bit ADC. For current, I am planning to use a .1Ω shunt resistor in combination with an opamp with a gain of 10 so that 1a = 1v. The current won't exceed 3A so I don't need a voltage divider. 0.01 A will be 0.01V. If we do the math again, n = 8.9 so I need a 10 bit ADC. Is the way I am calculating it correct or not?