ECParts Toolkit LogoECParts Toolkit

Sensor ADC Resolution Calculator

Calculate how sensor voltage span maps into ADC code width, engineering resolution, endpoint digital codes, required bit depth, analog gain and known-ENOB measurement references.

SEN-007 focuses on sensor-to-ADC resolution mapping. Anti-alias filter design belongs to the ADC Anti-Alias Filter Calculator, and calibration fitting belongs to the Sensor Calibration Calculator.

Engineering tool

Sensor ADC Resolution Calculator

Map sensor output span into ADC codes, voltage LSB, engineering units per code, ADC clipping, required bits, gain/offset and known-ENOB resolution references.

Calculation mode

Parameter panel

Result console

Engineering Units per Code
0.0305176bar
Codes Across Sensor Span
3276.8code widths
Codes per Engineering Unit
32.768codes/bar
Sensor ADC Span
4 V
ADC Span Utilization
80%
Equivalent Bits from Span Utilization
11.6781bits
Lower Headroom
500 mV
Upper Headroom
500 mV
Range Status
Within ADC Input Range

Equivalent bits from span utilization is not ENOB and does not include ADC noise, INL, DNL or reference error.

Sensor ADC resolution formula audit

Sensor ADC resolution formula audit
ADC ConventionUnsigned ideal ADC with 2^N possible codes and codes 0 through 2^N-1.
Code Count DefinitionC = 2^N.
Maximum Code DefinitionCodeMax = 2^N - 1.
ADC Input SpanVADCspan = VADCmax - VADCmin; custom non-zero input ranges are supported.
LSB / Code Width DefinitionVLSB = VADCspan / 2^N.
Endpoint Mapping DefinitionFloating code = ((VADC - Vmin) / Vspan) × (2^N - 1).
Quantization Error ConventionIdeal rounding quantizer reference is approximately ±0.5 LSB.
Sensor Transfer ModelLinear engineering value to sensor voltage mapping between entered endpoints.
Analog Front-End ModelVADC = G × Vsensor + VOFF.
Sensor Span at ADC|G×VsensorMax+VOFF - (G×VsensorMin+VOFF)|.
Span UtilizationSensor ADC span divided by ADC input span.
Sensor Codes Across SpanSensor ADC span divided by ideal ADC voltage LSB.
Engineering Units per CodeEngineering span divided by sensor codes across span.
Forward Code MappingEngineering value maps to sensor voltage, then AFE voltage, then endpoint code.
Inverse Code MappingDigital code reconstructs endpoint voltage, removes AFE gain/offset, then maps back to engineering value.
Required BitsN >= log2(required sensor codes / span utilization fraction).
Headroom DefinitionGain optimization uses per-side headroom as a percent of full ADC span.
ENOB DefinitionKnown ENOB produces 2^ENOB effective ideal codes; this calculator does not derive ENOB from SINAD.
Span Utilization vs ENOB BoundaryEquivalent bits from span utilization is not ENOB.
Clipping PolicyOut-of-range ADC voltages are flagged; raw and saturated codes remain visible.
Noise / Accuracy BoundaryQuantization resolution is not total sensor accuracy.

Formula reference

Sensor ADC Resolution Formulas

This page separates ideal ADC code width from endpoint code reconstruction to avoid the common 2^N versus 2^N-1 mistake.

C = 2^NCodeMax = 2^N - 1VLSB = VADCspan / 2^NVADC = G × Vsensor + VOFFCsensor = |VADC,max - VADC,min| / VLSBXLSB = Xspan / CsensorFloatingCode = ((VADC - Vmin) / Vspan) × CodeMaxRequiredBits = ceil(log2((Xspan / Xresolution) / utilization))CENOB = 2^ENOB

Variable definitions

N
nominal ADC bits
C
number of possible ADC codes
CodeMax
highest unsigned digital code
VADCspan
ADC input maximum minus ADC input minimum
VLSB
ideal ADC voltage code width
G
analog front-end gain
VOFF
analog offset voltage
XLSB
engineering units per ADC code width

Sensor ADC Resolution Formula Audit

Sensor ADC resolution formula audit
ADC ConventionUnsigned ideal ADC; C = 2^N code count, CodeMax = 2^N - 1.
ADC Input SpanVADCspan = VADCmax - VADCmin.
LSB / Code WidthVLSB = VADCspan / 2^N.
Endpoint MappingFloating code = ((VADC - VADCmin)/VADCspan) × (2^N - 1).
Quantization ErrorIdeal rounding reference is approximately ±0.5 LSB.
Sensor TransferVsensor = VsensorMin + (X-Xmin)/(Xmax-Xmin) × (VsensorMax-VsensorMin).
Analog Front EndVADC = G × Vsensor + VOFF.
Sensor CodesCsensor = |VADC,max - VADC,min| / VLSB.
Engineering ResolutionXLSB = Xspan / Csensor.
Required BitsN >= log2((Xspan / Xresolution) / utilization).
ENOB ReferenceEffective ideal codes from known ENOB are 2^ENOB.
Clipping PolicyOut-of-range ADC voltages are flagged and not silently treated as valid measurements.

Worked Examples

12-bit ADC

Known: 0-3.3 V input span

Codes=4096, Max Code=4095, LSB≈805.664 µV.

10-bit ADC

Known: 0-5 V input span

Codes=1024, Max Code=1023, LSB=4.8828125 mV.

Partial sensor span

Known: 0.5-4.5 V sensor on 0-5 V ADC

Span utilization is 80%.

Codes across sensor span

Known: 12-bit, 0-5 V ADC, 4 V sensor span

Csensor=3276.8 code widths.

Engineering units/code

Known: 0-100 bar over same span

Resolution≈0.03052 bar/code.

Quantization reference

Known: 12-bit, 0-3.3 V

±0.5 LSB≈±402.832 µV.

Midscale sensor voltage

Known: 0-100 bar, 0.5-4.5 V, 50 bar

Vsensor=2.5 V.

Midscale endpoint code

Known: 2.5 V on 0-5 V, 12-bit

Floating code=2047.5, rounded code=2048.

Reverse sensor

Known: 0 bar=4.5 V and 100 bar=0.5 V

50 bar still maps to 2.5 V.

Bipolar engineering range

Known: -100 N to +100 N, 0.5-4.5 V

0 N maps to 2.5 V.

Gain only

Known: Sensor 0.5-1.5 V, gain=2

ADC span is 1-3 V.

Offset included

Known: Same sensor, gain=2, offset=-1 V

ADC span is 0-2 V.

ADC clipping high

Known: Engineering value drives ADC above maximum

Warning is shown and unclipped code remains visible.

Code zero

Known: Endpoint reconstruction

Code 0 reconstructs ADC minimum.

Code max

Known: Endpoint reconstruction

CodeMax reconstructs ADC maximum.

Invalid code

Known: Code greater than CodeMax

Input is rejected.

Required resolution

Known: 0-100 units at 0.1 unit

Requires 1000 distinguishable intervals.

Required bits at 100%

Known: 1000 intervals

ceil(log2(1000))=10 bits.

Required bits at 50%

Known: Sensor uses half the ADC span

Requires 2000 ADC code capacity, so 11 bits.

Gain optimization

Known: 0.5-4.5 V sensor to 0-5 V ADC

Ideal gain=1.25, offset=-0.625 V.

5% headroom

Known: 0-5 V ADC with 5% per-side headroom

Usable range is 0.25-4.75 V.

Known ENOB

Known: ENOB=10

Effective ideal codes=1024.

ENOB with utilization

Known: ENOB=10, utilization=80%

Effective sensor codes=819.2.

ENOB engineering resolution

Known: 100 units over 819.2 codes

Resolution≈0.12207 units/code.

Forward/inverse round trip

Known: Value to code to value

Recovered value stays within quantization expectations.

Invalid bits

Known: ADC bits=0

Input is rejected.

Engineering Notes

Sensor ADC resolution engineering notes
ADC ResolutionADC resolution describes digital code width, not full measurement accuracy.
ADC BitsEach extra ideal bit doubles code count.
Code CountAn N-bit ADC has 2^N possible codes.
Maximum CodeUnsigned max code is 2^N-1 because counting starts at zero.
LSBIdeal LSB is the ADC input span divided by 2^N.
Code WidthCode-bin width and endpoint reconstruction use related but distinct conventions.
Sensor SpanA sensor rarely uses the entire ADC input range without gain and offset.
ADC Span UtilizationPartial span utilization reduces the number of useful code widths for the sensor measurement.
Engineering ResolutionEngineering units per code depends on the sensor span at the ADC input.
Quantization±0.5 LSB is only an ideal rounding reference.
ENOBENOB should come from measured or datasheet noise performance.
Analog GainGain can improve code utilization but can also cause clipping.
Analog OffsetOffset moves a sensor signal into the ADC input range.
ClippingValues outside the ADC range must be treated as invalid or saturated measurements.
Reference VoltageReference accuracy and drift can dominate real measurement error.
NoiseSensor and analog-front-end noise may be larger than one ADC LSB.
INLIntegral nonlinearity affects absolute code-to-voltage accuracy.
DNLDifferential nonlinearity affects local code width.
OversamplingOversampling can help only when noise and averaging assumptions are valid.
System Error BudgetCritical designs need a full sensor, AFE, ADC, reference and calibration error budget.

Common Mistakes

  • Saying a 12-bit ADC has 4095 codes instead of 4096 possible codes.
  • Calling maximum code 4096 for a 12-bit unsigned ADC.
  • Mixing 2^N LSB code width with 2^N-1 endpoint mapping without documenting the convention.
  • Assuming a 0.5-4.5 V sensor uses the full 0-5 V ADC range.
  • Calling span-utilization equivalent bits ENOB.
  • Calling nominal bits accuracy.
  • Treating ±0.5 LSB as total ADC error.
  • Silently clamping ADC overrange values without warning.
  • Ignoring analog gain clipping.
  • Losing direction for reverse-output sensors.
  • Assuming engineering range must start at zero.
  • Using display-rounded values for follow-on precision calculations.

Hall-Effect Current Sensor Calculator

Available

Calculate Hall sensor output and current per ADC LSB for current sensing.

Open calculator

Pressure Sensor Scaling Calculator

Available

Scale 0.5-4.5 V and 4-20 mA pressure sensors before ADC conversion.

Open calculator

Sensor Calibration Calculator

Available

Fit and apply raw-to-engineering calibration equations after measurement.

Open calculator

ADC Anti-Alias Filter Calculator

Available

Plan analog anti-alias filtering before the ADC input.

Open calculator

Instrumentation Amplifier Calculator

Available

Estimate gain for small differential sensor signals before the ADC.

Open calculator

Analog Sensor Linear Scaling Calculator

Available

Scale analog sensor endpoints before ADC resolution analysis.

Open calculator

Support reference

FAQ

How many codes does an N-bit ADC have?

An ideal unsigned N-bit ADC has 2^N possible digital codes.

What is the maximum code of a 12-bit ADC?

A 12-bit unsigned ADC has 4096 possible codes, with valid endpoint codes from 0 to 4095.

Why does a 12-bit ADC have 4096 codes but a maximum code of 4095?

Code count starts at 1 possible state, while code numbering starts at zero. That makes the highest unsigned code 2^N - 1.

How do I calculate ADC LSB voltage?

Use the ADC input voltage span divided by 2^N. For 12 bits and 0 to 3.3 V, the ideal code width is 3.3/4096.

How do I calculate sensor resolution from ADC bits?

Find the sensor voltage span at the ADC input, divide it by the ADC LSB voltage, then divide the engineering span by those usable code widths.

How many ADC codes does my sensor actually use?

Codes used equals the sensor span at the ADC input divided by ADC LSB. A 0.5 to 4.5 V sensor on a 0 to 5 V ADC uses about 80% of the codes.

What is ADC span utilization?

ADC span utilization is the sensor voltage span at the ADC input divided by the total ADC input span.

How does analog gain improve sensor resolution?

Analog gain can expand the sensor span before the ADC so that more ADC code widths cover the same engineering range.

How do I calculate engineering units per ADC code?

Divide the engineering full-scale span by the number of ADC code widths used by the sensor span.

How do I calculate ADC code from sensor voltage?

Use endpoint mapping: code = ((VADC - Vmin) / Vspan) × (2^N - 1), then apply the selected quantization policy.

How do I calculate sensor value from ADC code?

Reconstruct ADC endpoint voltage from code/CodeMax, remove analog gain and offset, then map sensor voltage back to engineering units.

How many ADC bits do I need for a required sensor resolution?

Divide engineering span by required resolution, adjust for ADC span utilization, then take ceil(log2(required ADC code capacity)).

What is quantization error?

For an ideal rounding quantizer, quantization error is commonly referenced as approximately ±0.5 LSB.

Is ADC resolution the same as accuracy?

No. Resolution is code size. Accuracy also depends on noise, reference error, INL, DNL, sensor error and analog front-end error.

What is ENOB?

ENOB is effective number of bits, usually derived from measured noise or SINAD. It is not the same as nominal ADC bits.

Is span utilization the same as ENOB?

No. Span utilization describes how much ADC range the sensor uses. ENOB describes effective converter performance.

How does ADC noise affect sensor resolution?

Noise can make small code changes unusable, so practical measurement resolution may be worse than ideal LSB math.

What happens when a sensor signal exceeds the ADC input range?

The ADC clips or saturates. This calculator flags clipping and shows unclipped ideal code separately from saturated code.

Engineering Disclaimer

This calculator provides ideal sensor-to-ADC resolution arithmetic. Critical measurement systems require sensor noise, ADC noise, ENOB, INL, DNL, reference error, analog front-end limits, calibration, temperature drift and validation under real operating conditions.