+ Post New Thread
Results 1 to 12 of 12

23rd February 2011, 02:58 #1
calculating step size in ADC
Hi,
how to calculate step size when the information provided is Vcc=4V and input signal is from 0V to 1V and adc is 10 bits..
should i do like
Vcc / 1024 = 0.00390625 = 3.9 mV
or
1V / 1024 = 0.0009765625 = 0.976 mV
thanks
sawaak

23rd February 2011, 02:58

23rd February 2011, 08:45 #2
 Join Date
 Oct 2009
 Location
 Yorkshire, UK
 Posts
 10,877
 Helped
 2074 / 2074
 Points
 49,672
 Level
 54
Re: calculating step size in ADC
It depends on the ADC and reference voltage being used. ADCs often have a separate input where you can feed an external reference of your choice. There are limits to the range of reference voltage though and 1V is unlikely.
What is your ADC?
Keith

23rd February 2011, 09:20 #3
 Join Date
 Mar 2008
 Location
 Greece
 Posts
 11,892
 Helped
 2086 / 2086
 Points
 37,976
 Level
 47
 Blog Entries
 6
Re: calculating step size in ADC
there is usually a separate reference voltage (internal or external) and in microcontrollers there is also the option (usually) to use the Vcc as reference.
In any case the 0 to 1v is your input and it shouldn't be used as a reference voltage.
If your reference voltage is the Vcc then Vcc / 1024 = 0.00390625 = 3.9 mV is correct
if not then a reference voltage should be defined.
Alex
1 members found this post helpful.

23rd February 2011, 09:43 #4
 Join Date
 Jul 2004
 Location
 Hungary
 Posts
 474
 Helped
 188 / 188
 Points
 5,530
 Level
 17
Re: calculating step size in ADC
I agree with the above.
Just one little thing:
The step size of a 10 bits ADC is Uref/1023 , not Uref/1024 !!
1 members found this post helpful.

23rd February 2011, 09:43

23rd February 2011, 09:59 #5
 Join Date
 Mar 2008
 Location
 Greece
 Posts
 11,892
 Helped
 2086 / 2086
 Points
 37,976
 Level
 47
 Blog Entries
 6

23rd February 2011, 09:59

23rd February 2011, 10:10 #6
 Join Date
 Oct 2009
 Location
 Yorkshire, UK
 Posts
 10,877
 Helped
 2074 / 2074
 Points
 49,672
 Level
 54
Re: calculating step size in ADC
Actually, I think it depends on the ADC. A lot divide by 2^n such as AD7658. It is the reason voltage references such as 4.096V exist.
Keith.

23rd February 2011, 12:20 #7
 Join Date
 Jul 2004
 Location
 Hungary
 Posts
 474
 Helped
 188 / 188
 Points
 5,530
 Level
 17
Re: calculating step size in ADC
Hi my dear friends;
On this issue (step size of an ADC), I am also a long ago uncertain:
Which is correct: Ustep is equal to Uref/2^n or Uref/(2^n1)
I was looking for a lot longer on the net, but I did not get a clear answer.
For example take a look on this site:
analogtodigital conversion: Definition from Answers.com
Please discuss this here, if possible.
One comment:
In my PIC projects (10 bits ADC) I use always the second method (2^n1),
with good results.
Thanks
zuisti

23rd February 2011, 12:37 #8
 Join Date
 Oct 2009
 Location
 Yorkshire, UK
 Posts
 10,877
 Helped
 2074 / 2074
 Points
 49,672
 Level
 54
Re: calculating step size in ADC
I have just checked the PIC24H and that uses 1024 for the 10 bit ADC. I must admit I tend to think of 2^n as being more common, although there are some older 8 bit ADCs that use 2^(n1) I think. Even the ADC0808 has a 20mV step from a 5.12V reference.
Which PIC are you using?
Keith.

23rd February 2011, 13:16 #9
 Join Date
 Mar 2008
 Location
 Greece
 Posts
 11,892
 Helped
 2086 / 2086
 Points
 37,976
 Level
 47
 Blog Entries
 6
Re: calculating step size in ADC
I was using Vref/1023 until now because this was what i have read in "embedded C programming and the atmel AVR" and i actually thoughtit was a standard to use Vref/((2^n)1) but a quick look in the ATMega8 datasheet shows that is is actually (Vref/(2^n)) which is Vref/1024 for the 10bit ADC of AVRs
Alex

23rd February 2011, 14:03 #10
 Join Date
 Jul 2004
 Location
 Hungary
 Posts
 474
 Helped
 188 / 188
 Points
 5,530
 Level
 17
Re: calculating step size in ADC
Yes, the ADC0808 is using a "pious fraud":
(from the datasheet, page 5)
"The bottom resistor and the top resistor of the ladder network
in Figure 1 are not the same value as the remainder of the
network. The difference in these resistors causes the output
characteristic to be symmetrical with the zero and fullscale
points of the transfer curve. The first output transition occurs
when the analog signal has reached +˝ LSB and succeeding
output transitions occur every 1 LSB later up to fullscale."
However, I did not find such a detailed description of the PICs
ADC circuit, at least I did not. Perhaps it is also applied this solution?
I'm using PIC18Fxxxx uCs, for ex. last a PIC18F2620 ...
 Post added at 14:03  Previous post was at 13:19 
Dealt with elsewhere also:
View topic  A/D equation :: AVR Freaks
and a Microchip forum:
ADC quantum? (12F675)
In any event, it really looks that the Vref/2^n is the good, but the "fullscale value"
is not equal to Vref, but it's equal to Vref x 1023 / 1024 (in case of a 10 bits ADC).
Thanks
zuisti

23rd February 2011, 14:03

23rd February 2011, 14:07 #11

23rd February 2011, 16:30 #12
 Join Date
 Jul 2004
 Location
 Hungary
 Posts
 474
 Helped
 188 / 188
 Points
 5,530
 Level
 17
Re: calculating step size in ADC
Well, yes, this is the mysticism of the numbers 8) :
(assuming a 10 bits ADC)
Vstep = Vref / 1024 = Vfullscale / 1023, and not Vref / 1023 !!
since
Vfullscale = Vref * 1023 / 1024, and not Vref !!!!
so
Vstep = Vref * 1023 / 1024 / 1023 = Vref / 1024
It's clear (?)
Thank you for your patience
zuisti
+ Post New Thread
Please login