Skip to main content
Post Closed as "Duplicate" by Eugene Sh., Voltage Spike, Harry Svensson, Lior Bilia, Warren Hill
added 718 characters in body
Source Link
user1245
  • 4.4k
  • 4
  • 44
  • 99

For a 16 bit ADC with a -10V to +10V analog input range I have read the following:

The resolution \$ \text{delta} = \dfrac{20V}{2^{16}} \$

16 bit 0000000000000000 corresponds to decimal 0 and this means the voltage read by the ADC is between -10V to -9 999.695V.

Similarly 16 bit 1111111111111111 corresponds to decimal 65535 and this means the voltage read by the ADC is between +9 999.695V to +10 000.

But I have couple of questions here where I get confused:

1-) If the ADC samples a voltage of +9 999V, will it register as 65535 or 65534?

2-) How about 32767 and 32768? Do they both represent OV? It seems to me 32767 is registered if the voltage is between -20/2^16V and 0V; and 32768 is registered if the voltage is between +20/2^16V and 0V. Is that correct. If so it means for 0V there are two steps unlike other voltage readings.

3-) Is the resolution \$ \dfrac{20V}{2^{16}} \$ or \$ \dfrac{20V}{2^{16}-1} \$?

EDIT:

I plotted in Python quantization of a sinusoid for a 3 bit ADC.

Which plot below represents better a 3-bit ADC converter quantizing a 10V 1Hz sinusoid input in this case sampled at 512Hz rate:

3 is the number of bits.

Below call it Plot 1, the number of levels are odd i.e (2^3)-1:

enter image description here

And below call it Plot 2, the number of levels are even i.e 2^3:

enter image description here

Which one above represents an ADC quantization better?

EDIT 2:

In response to Dirceu Rodrigues Jr and the transfer function he provided in his answer, I tried to plot it in Python (3 bit ADC for -10 to +10V input versus binary code in decimal):

import numpy as np
import matplotlib.pyplot as plt

#ANALOG SIGNAL:
va = np.linspace(-10, 10, 10000 ) #Analog input from -10V to +10V
fs_p = 10.0
fs_n = -10.0


#DIGITAL OUTPUT CODE:

n=3 #ADC resolution

vd = ((va - fs_n) / (fs_p - fs_n)) * (2**n) #Transfer function
vd = (vd).astype(int) #output code

plt.plot(va, vd,'.b')
plt.plot(va, vd,'-g')
plt.xlabel('Va (Analog input)')
plt.ylabel('Vd (Output code)')
plt.show()
plt.grid()

Here is the output:

enter image description here

For a 16 bit ADC with a -10V to +10V analog input range I have read the following:

The resolution \$ \text{delta} = \dfrac{20V}{2^{16}} \$

16 bit 0000000000000000 corresponds to decimal 0 and this means the voltage read by the ADC is between -10V to -9 999.695V.

Similarly 16 bit 1111111111111111 corresponds to decimal 65535 and this means the voltage read by the ADC is between +9 999.695V to +10 000.

But I have couple of questions here where I get confused:

1-) If the ADC samples a voltage of +9 999V, will it register as 65535 or 65534?

2-) How about 32767 and 32768? Do they both represent OV? It seems to me 32767 is registered if the voltage is between -20/2^16V and 0V; and 32768 is registered if the voltage is between +20/2^16V and 0V. Is that correct. If so it means for 0V there are two steps unlike other voltage readings.

3-) Is the resolution \$ \dfrac{20V}{2^{16}} \$ or \$ \dfrac{20V}{2^{16}-1} \$?

EDIT:

I plotted in Python quantization of a sinusoid for a 3 bit ADC.

Which plot below represents better a 3-bit ADC converter quantizing a 10V 1Hz sinusoid input in this case sampled at 512Hz rate:

3 is the number of bits.

Below call it Plot 1, the number of levels are odd i.e (2^3)-1:

enter image description here

And below call it Plot 2, the number of levels are even i.e 2^3:

enter image description here

Which one above represents an ADC quantization better?

For a 16 bit ADC with a -10V to +10V analog input range I have read the following:

The resolution \$ \text{delta} = \dfrac{20V}{2^{16}} \$

16 bit 0000000000000000 corresponds to decimal 0 and this means the voltage read by the ADC is between -10V to -9 999.695V.

Similarly 16 bit 1111111111111111 corresponds to decimal 65535 and this means the voltage read by the ADC is between +9 999.695V to +10 000.

But I have couple of questions here where I get confused:

1-) If the ADC samples a voltage of +9 999V, will it register as 65535 or 65534?

2-) How about 32767 and 32768? Do they both represent OV? It seems to me 32767 is registered if the voltage is between -20/2^16V and 0V; and 32768 is registered if the voltage is between +20/2^16V and 0V. Is that correct. If so it means for 0V there are two steps unlike other voltage readings.

3-) Is the resolution \$ \dfrac{20V}{2^{16}} \$ or \$ \dfrac{20V}{2^{16}-1} \$?

EDIT:

I plotted in Python quantization of a sinusoid for a 3 bit ADC.

Which plot below represents better a 3-bit ADC converter quantizing a 10V 1Hz sinusoid input in this case sampled at 512Hz rate:

3 is the number of bits.

Below call it Plot 1, the number of levels are odd i.e (2^3)-1:

enter image description here

And below call it Plot 2, the number of levels are even i.e 2^3:

enter image description here

Which one above represents an ADC quantization better?

EDIT 2:

In response to Dirceu Rodrigues Jr and the transfer function he provided in his answer, I tried to plot it in Python (3 bit ADC for -10 to +10V input versus binary code in decimal):

import numpy as np
import matplotlib.pyplot as plt

#ANALOG SIGNAL:
va = np.linspace(-10, 10, 10000 ) #Analog input from -10V to +10V
fs_p = 10.0
fs_n = -10.0


#DIGITAL OUTPUT CODE:

n=3 #ADC resolution

vd = ((va - fs_n) / (fs_p - fs_n)) * (2**n) #Transfer function
vd = (vd).astype(int) #output code

plt.plot(va, vd,'.b')
plt.plot(va, vd,'-g')
plt.xlabel('Va (Analog input)')
plt.ylabel('Vd (Output code)')
plt.show()
plt.grid()

Here is the output:

enter image description here

added 454 characters in body
Source Link
user1245
  • 4.4k
  • 4
  • 44
  • 99

For a 16 bit ADC with a -10V to +10V analog input range I have read the following:

The resolution \$ \text{delta} = \dfrac{20V}{2^{16}} \$

16 bit 0000000000000000 corresponds to decimal 0 and this means the voltage read by the ADC is between -10V to -9 999.695V.

Similarly 16 bit 1111111111111111 corresponds to decimal 65535 and this means the voltage read by the ADC is between +9 999.695V to +10 000.

But I have couple of questions here where I get confused:

1-) If the ADC samples a voltage of +9 999V, will it register as 65535 or 65534?

2-) How about 32767 and 32768? Do they both represent OV? It seems to me 32767 is registered if the voltage is between -20/2^16V and 0V; and 32768 is registered if the voltage is between +20/2^16V and 0V. Is that correct. If so it means for 0V there are two steps unlike other voltage readings.

3-) Is the resolution \$ \dfrac{20V}{2^{16}} \$ or \$ \dfrac{20V}{2^{16}-1} \$?

EDIT:

I plotted in Python quantization of a sinusoid for a 3 bit ADC.

Which plot below represents better a 3-bit ADC converter quantizing a 10V 1Hz sinusoid input in this case sampled at 512Hz rate:

3 is the number of bits.

Below call it Plot 1, the number of levels are odd i.e (2^3)-1:

enter image description here

And below call it Plot 2, the number of levels are even i.e 2^3:

enter image description here

Which one above represents an ADC quantization better?

For a 16 bit ADC with a -10V to +10V analog input range I have read the following:

The resolution \$ \text{delta} = \dfrac{20V}{2^{16}} \$

16 bit 0000000000000000 corresponds to decimal 0 and this means the voltage read by the ADC is between -10V to -9 999.695V.

Similarly 16 bit 1111111111111111 corresponds to decimal 65535 and this means the voltage read by the ADC is between +9 999.695V to +10 000.

But I have couple of questions here where I get confused:

1-) If the ADC samples a voltage of +9 999V, will it register as 65535 or 65534?

2-) How about 32767 and 32768? Do they both represent OV? It seems to me 32767 is registered if the voltage is between -20/2^16V and 0V; and 32768 is registered if the voltage is between +20/2^16V and 0V. Is that correct. If so it means for 0V there are two steps unlike other voltage readings.

3-) Is the resolution \$ \dfrac{20V}{2^{16}} \$ or \$ \dfrac{20V}{2^{16}-1} \$?

For a 16 bit ADC with a -10V to +10V analog input range I have read the following:

The resolution \$ \text{delta} = \dfrac{20V}{2^{16}} \$

16 bit 0000000000000000 corresponds to decimal 0 and this means the voltage read by the ADC is between -10V to -9 999.695V.

Similarly 16 bit 1111111111111111 corresponds to decimal 65535 and this means the voltage read by the ADC is between +9 999.695V to +10 000.

But I have couple of questions here where I get confused:

1-) If the ADC samples a voltage of +9 999V, will it register as 65535 or 65534?

2-) How about 32767 and 32768? Do they both represent OV? It seems to me 32767 is registered if the voltage is between -20/2^16V and 0V; and 32768 is registered if the voltage is between +20/2^16V and 0V. Is that correct. If so it means for 0V there are two steps unlike other voltage readings.

3-) Is the resolution \$ \dfrac{20V}{2^{16}} \$ or \$ \dfrac{20V}{2^{16}-1} \$?

EDIT:

I plotted in Python quantization of a sinusoid for a 3 bit ADC.

Which plot below represents better a 3-bit ADC converter quantizing a 10V 1Hz sinusoid input in this case sampled at 512Hz rate:

3 is the number of bits.

Below call it Plot 1, the number of levels are odd i.e (2^3)-1:

enter image description here

And below call it Plot 2, the number of levels are even i.e 2^3:

enter image description here

Which one above represents an ADC quantization better?

edited body
Source Link
user1245
  • 4.4k
  • 4
  • 44
  • 99

For a 16 bit ADC with a -10V to +10V analog input range I have read the following:

The resolution \$ \text{delta} = \dfrac{20V}{2^{16}} \$

16 bit 0000000000000000 corresponds to decimal 0 and this means the voltage read by the ADC is between -10V to -9 999.695V.

Similarly 16 bit 1111111111111111 corresponds to decimal 65535 and this means the voltage read by the ADC is between +9 999.695V to +10 000.

But I have couple of questions here where I get confused:

1-) If the ADC samples a voltage of +9 999V, will it register as 65535 or 65534?

2-) How about 32767 and 32768? Do they both represent OV? It seems to me 32767 is registered if the voltage is between -20/2^16V and 0V; and 32768 is registered if the voltage is between +20/2^16V and 0V. Is that correct. If so it means for 0V there are two steps unlike other voltage readings.

3-) Is the resolution \$ \dfrac{20V}{2^{16}} \$ or \$ \dfrac{20V}{2^{16-1}} \$\$ \dfrac{20V}{2^{16}-1} \$?

For a 16 bit ADC with a -10V to +10V analog input range I have read the following:

The resolution \$ \text{delta} = \dfrac{20V}{2^{16}} \$

16 bit 0000000000000000 corresponds to decimal 0 and this means the voltage read by the ADC is between -10V to -9 999.695V.

Similarly 16 bit 1111111111111111 corresponds to decimal 65535 and this means the voltage read by the ADC is between +9 999.695V to +10 000.

But I have couple of questions here where I get confused:

1-) If the ADC samples a voltage of +9 999V, will it register as 65535 or 65534?

2-) How about 32767 and 32768? Do they both represent OV? It seems to me 32767 is registered if the voltage is between -20/2^16V and 0V; and 32768 is registered if the voltage is between +20/2^16V and 0V. Is that correct. If so it means for 0V there are two steps unlike other voltage readings.

3-) Is the resolution \$ \dfrac{20V}{2^{16}} \$ or \$ \dfrac{20V}{2^{16-1}} \$?

For a 16 bit ADC with a -10V to +10V analog input range I have read the following:

The resolution \$ \text{delta} = \dfrac{20V}{2^{16}} \$

16 bit 0000000000000000 corresponds to decimal 0 and this means the voltage read by the ADC is between -10V to -9 999.695V.

Similarly 16 bit 1111111111111111 corresponds to decimal 65535 and this means the voltage read by the ADC is between +9 999.695V to +10 000.

But I have couple of questions here where I get confused:

1-) If the ADC samples a voltage of +9 999V, will it register as 65535 or 65534?

2-) How about 32767 and 32768? Do they both represent OV? It seems to me 32767 is registered if the voltage is between -20/2^16V and 0V; and 32768 is registered if the voltage is between +20/2^16V and 0V. Is that correct. If so it means for 0V there are two steps unlike other voltage readings.

3-) Is the resolution \$ \dfrac{20V}{2^{16}} \$ or \$ \dfrac{20V}{2^{16}-1} \$?

edited body
Source Link
Warren Hill
  • 4.9k
  • 22
  • 33
Loading
edited body
Source Link
user1245
  • 4.4k
  • 4
  • 44
  • 99
Loading
tidy latex
Source Link
Warren Hill
  • 4.9k
  • 22
  • 33
Loading
added 51 characters in body
Source Link
user1245
  • 4.4k
  • 4
  • 44
  • 99
Loading
Source Link
user1245
  • 4.4k
  • 4
  • 44
  • 99
Loading