Hello all,
I have a simple yet complicated electronics problem. I want to build a power supply. For the current measurement part i will use the voltage drop technique. On a 10 amp output I want 1 volt drop across an internal resistor. This means that I need to use 100 miliohm resistor (0.1 ohm). Is this correct? Also from my calculation I would need a 10 W resistor, but since I don't want this resistor to get warm at all I will use an 100 W resistor. Further I will use an opamp to increase the output voltage from 1 volt (the drop voltage) to 5 volts (in other words for 5 A on output, the opamp will output 2.5 V).
The problem that I have is that the microcontroller only has 10 bits resolution, and reading 5 volts on 1024 bits leads to 4.882mV per bit which actualy means that on each bit I will actually read approximately 10mA. Because I want to adjust the output current at the mA level, the described scenario is not good enough. So I thought to use 2 ADC on the microcontroller and split the max voltage in two like follows:
if the voltage is between 0 and 2.5 volts, using an opamp I will read 5 volts (max) on output.
if the voltage exceed 2.5 volts (and max 5 volts) I need to read 5 volts (max) on output.
So actually, if you didn't follow me on this point. If the output is lower than 2.5 volts the first ADC will read the current voltage value * 2 and the second ADC will read 0. And if the value exceed 2.5 volts the first ADC will read 5 volts and the second ADC will read the (current voltage value - 5 volts) * 2.
The second problem that I found when I wrote this lines is that between reading first ADC and second ADC the values might change and I can get incorrect data. Anyway, how can I perform the above operation (split the 5 volts in 2 pairs of 0-5 volts as described above) ?
If any of you have any idea of how to increase resolution (using ONLY the internal 10 bits resolution ADC of the MCU) you can share it, I am open to any suggestion. I don't want to use any external ADC of any kind.
Kind regards,
Nicolae Mitroi.