Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

calculating step size in ADC

Status
Not open for further replies.

sawaak

Full Member level 2
Full Member level 2
Joined
May 20, 2003
Messages
146
Helped
4
Reputation
8
Reaction score
2
Trophy points
1,298
Activity points
1,069
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
 

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
 

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..

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
 
I agree with the above.
Just one little thing:
The step size of a 10 bits ADC is Uref/1023 , not Uref/1024 !!
 
I agree with the above.
Just one little thing:
The step size of a 10 bits ADC is Uref/1023 , not Uref/1024 !!

Yes, that is correct, there are 1024 possible values, 0 to 1023 (0000000000 to 1111111111)

Alex
 
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.
 

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^n-1)

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:
analog-to-digital 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^n-1),
with good results.

Thanks
zuisti
 

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^(n-1) I think. Even the ADC0808 has a 20mV step from a 5.12V reference.

Which PIC are you using?

Keith.
 

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
 

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 full-scale
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 full-scale."


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 "full-scale value"
is not equal to Vref, but it's equal to Vref x 1023 / 1024 (in case of a 10 bits ADC).

Thanks
zuisti
 

In any event, it really looks that the Vref/2^n is the good, but the "full-scale value"
is not equal to Vref, but it's equal to Vref x 1023 / 1024 (in case of a 10 bits ADC).

I think that has to be the case otherwise you would never reach the full scale value. i.e. you want full scale to be when the voltage is above 1023/1024 * 5V for a 10 bit ADC on a 5V reference/supply voltage.

Keith.
 

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
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top