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
| ADC Convention | Unsigned ideal ADC with 2^N possible codes and codes 0 through 2^N-1. |
|---|---|
| Code Count Definition | C = 2^N. |
| Maximum Code Definition | CodeMax = 2^N - 1. |
| ADC Input Span | VADCspan = VADCmax - VADCmin; custom non-zero input ranges are supported. |
| LSB / Code Width Definition | VLSB = VADCspan / 2^N. |
| Endpoint Mapping Definition | Floating code = ((VADC - Vmin) / Vspan) × (2^N - 1). |
| Quantization Error Convention | Ideal rounding quantizer reference is approximately ±0.5 LSB. |
| Sensor Transfer Model | Linear engineering value to sensor voltage mapping between entered endpoints. |
| Analog Front-End Model | VADC = G × Vsensor + VOFF. |
| Sensor Span at ADC | |G×VsensorMax+VOFF - (G×VsensorMin+VOFF)|. |
| Span Utilization | Sensor ADC span divided by ADC input span. |
| Sensor Codes Across Span | Sensor ADC span divided by ideal ADC voltage LSB. |
| Engineering Units per Code | Engineering span divided by sensor codes across span. |
| Forward Code Mapping | Engineering value maps to sensor voltage, then AFE voltage, then endpoint code. |
| Inverse Code Mapping | Digital code reconstructs endpoint voltage, removes AFE gain/offset, then maps back to engineering value. |
| Required Bits | N >= log2(required sensor codes / span utilization fraction). |
| Headroom Definition | Gain optimization uses per-side headroom as a percent of full ADC span. |
| ENOB Definition | Known ENOB produces 2^ENOB effective ideal codes; this calculator does not derive ENOB from SINAD. |
| Span Utilization vs ENOB Boundary | Equivalent bits from span utilization is not ENOB. |
| Clipping Policy | Out-of-range ADC voltages are flagged; raw and saturated codes remain visible. |
| Noise / Accuracy Boundary | Quantization 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^ENOBVariable 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
| ADC Convention | Unsigned ideal ADC; C = 2^N code count, CodeMax = 2^N - 1. |
|---|---|
| ADC Input Span | VADCspan = VADCmax - VADCmin. |
| LSB / Code Width | VLSB = VADCspan / 2^N. |
| Endpoint Mapping | Floating code = ((VADC - VADCmin)/VADCspan) × (2^N - 1). |
| Quantization Error | Ideal rounding reference is approximately ±0.5 LSB. |
| Sensor Transfer | Vsensor = VsensorMin + (X-Xmin)/(Xmax-Xmin) × (VsensorMax-VsensorMin). |
| Analog Front End | VADC = G × Vsensor + VOFF. |
| Sensor Codes | Csensor = |VADC,max - VADC,min| / VLSB. |
| Engineering Resolution | XLSB = Xspan / Csensor. |
| Required Bits | N >= log2((Xspan / Xresolution) / utilization). |
| ENOB Reference | Effective ideal codes from known ENOB are 2^ENOB. |
| Clipping Policy | Out-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
| ADC Resolution | ADC resolution describes digital code width, not full measurement accuracy. |
|---|---|
| ADC Bits | Each extra ideal bit doubles code count. |
| Code Count | An N-bit ADC has 2^N possible codes. |
| Maximum Code | Unsigned max code is 2^N-1 because counting starts at zero. |
| LSB | Ideal LSB is the ADC input span divided by 2^N. |
| Code Width | Code-bin width and endpoint reconstruction use related but distinct conventions. |
| Sensor Span | A sensor rarely uses the entire ADC input range without gain and offset. |
| ADC Span Utilization | Partial span utilization reduces the number of useful code widths for the sensor measurement. |
| Engineering Resolution | Engineering units per code depends on the sensor span at the ADC input. |
| Quantization | ±0.5 LSB is only an ideal rounding reference. |
| ENOB | ENOB should come from measured or datasheet noise performance. |
| Analog Gain | Gain can improve code utilization but can also cause clipping. |
| Analog Offset | Offset moves a sensor signal into the ADC input range. |
| Clipping | Values outside the ADC range must be treated as invalid or saturated measurements. |
| Reference Voltage | Reference accuracy and drift can dominate real measurement error. |
| Noise | Sensor and analog-front-end noise may be larger than one ADC LSB. |
| INL | Integral nonlinearity affects absolute code-to-voltage accuracy. |
| DNL | Differential nonlinearity affects local code width. |
| Oversampling | Oversampling can help only when noise and averaging assumptions are valid. |
| System Error Budget | Critical 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.
Related Calculators
Hall-Effect Current Sensor Calculator
AvailableCalculate Hall sensor output and current per ADC LSB for current sensing.
Open calculatorPressure Sensor Scaling Calculator
AvailableScale 0.5-4.5 V and 4-20 mA pressure sensors before ADC conversion.
Open calculatorSensor Calibration Calculator
AvailableFit and apply raw-to-engineering calibration equations after measurement.
Open calculatorADC Anti-Alias Filter Calculator
AvailablePlan analog anti-alias filtering before the ADC input.
Open calculatorInstrumentation Amplifier Calculator
AvailableEstimate gain for small differential sensor signals before the ADC.
Open calculatorAnalog Sensor Linear Scaling Calculator
AvailableScale analog sensor endpoints before ADC resolution analysis.
Open calculatorSupport 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.
