0
\$\begingroup\$

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:

enter image description here

(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?

\$\endgroup\$
0
\$\begingroup\$

If your question is just if your math is correct, I'd say yes. Using a voltage divider to bring the voltage to the range of your logic level is the common way to go. Using a shunt for measuring current might also be common, but implicates that you arrange it at the currents return path (ground) as the absolut voltage at the shunt (placed at Vcc) would exceed your logic level even though the relative voltage might be low. A voltage divider won't be useful in that case. A comfortable way is using a "high side current sense" IC which will usually provide an analog signal within a reference level (e.g. your logic level) and can be placed at the high side (Vcc) of your rail. It often isn't sufficient to measure current at the low side, but it depends on your application. You then can read the current with an adc as you would do anyway.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.