Hi there,

I'm stuck with my little project. I want to measure voltage in a range from 0 to 30 volts as accurately as possible. My plan, a voltage divider to 5 volts and then into a 12-bit ADC. I have read a little about the resolution of ADCs but I'm not sure whether a 12-bit ADC has a resolution of 0.01 volts. I think I need a 16-bit ADCs for this resolution.

Next point is the accuracy of the resistors. How exactly the precision need to be

I would appreciate if you could give me some tips. Maybe there is another solution to measure Voltage.

Please do not bash, I'm still a beginner ....

Regards

Zhang

Running a 12bit ADC at 5 volt will give you 5/(2^12) = 5/4096=0.001221

So, you have 0.001221 volt resolution, not 0.01V.

Typical good resistors are 1%, or .1%, but you can get some 10x better costing 100x more. Precision costs money. So, what is the precision you require?

Simplest way without extensive algebra, when you do voltage divide, V=R1/(R1+R2), do the eval with these in a spreadsheet:

1: use R1+1% and R2+1%

2: use R1-1% and R2+1%

3: use R1-1% and R2-1%

4: use R1+1% and R2-1%

Compare the 4 numbers, to the pure result (using just R1 and R2 without the 1%), the biggest +delta is your +error range and the biggest -delta is your -error.

Now you have to worry about the ADC error. My experience is, the lower the ADC reading, the bigger the error. You have to work out a way to compensate for that.

I did some analysis of the Arduino's 10bit ADC. At 4 to 5V, you are almost spot on. At 1-2volt, the error start to exceed 1%. Below 1V, it gets wild. At 0.5 volt, you are looking at 5% error, at 0.25v, you are looking at 10% error.

You can see the graph here:

http://www.eevblog.com/forum/microcontrollers/atmega328-adc-accuracy-graph/You can also see my suggestion here (last post on the page) using adc reading as a table index and then interpolate to gain accuracy:

http://www.eevblog.com/forum/beginners/current-shunt/ Good luck. It should be a fun project.

Rick