Math Bridge: What does 4095 divided by ADC minus one recover?

← Back to Lab: Feature Scaling
Math BridgeAnalytics & MLStruggle-friendly runway

What does `4095 / adc - 1` recover?

Undo the voltage divider before asking what normalization can and cannot change.

Data Dora, the guideData Dora guides
The one targetRecover thermistor resistance from one ADC code.
The chapter caseCode 2,048; 10 kΩ resistor; 12-bit, 3.3 V ADC; 200 ms loop.
What it buys youScaling grounded in the physical sensor chain.

A field team faces an unresolved physical question: What does `4095 / adc - 1` recover? They must answer it before changing adc code on the real device. Predict the direction first.

See the relationship before changing it

The figure reads from left to right. The blue card is adc code. The middle card applies this page's relationship. The green card is recovered resistance. Walk the arrows once: set the input, apply the rule, then read the result with its unit.

The retained audit below checks several chapter fixtures. This added model holds every other chapter fixture fixed, so the numeric fixture does not switch without explanation.

ADC code changes recovered resistance An input card leads through the page relationship to the recovered resistance result. SET INPUT ONE CONTROL APPLY RULE predict calculate check units READ RESULT
Walk the arrows. The reciprocal 4095/adc makes resistance nonlinear in code. Normalization can rescale that result, but cannot improve the ADC step or undo a 3 Hz-to-2 Hz fold.

Derive the baseline in four named moves

  1. 1

    Name the input. The chapter baseline for adc code is 2048.

  2. 2

    Name the relationship. Rntc=10,000(4,095/2,048-1)=9,995.12 ohm q=3.3/4,096=0.806 mV; qrms=0.233 mV; SNR=74.0 dB fs=1/0.200=5.00 Hz; fmax=2.50 Hz; fastest period=2/5=0.400 s; |3.00-5.00|=2.00 Hz

  3. 3

    Substitute the chapter fixture. Set adc code to 2048. The page ledger gives recovered resistance as 9995 ohm.

  4. 4

    Read the result. Keep ohm beside the value. Use it only inside the technical boundary on this page.

Predict, then change adc code

Try Predict the direction of recovered resistance. Move one control, calculate, then check your prediction.

2048
Chapter baseline
Recovered resistance

Observe The reciprocal 4095/adc makes resistance nonlinear in code. Normalization can rescale that result, but cannot improve the ADC step or undo a 3 Hz-to-2 Hz fold. Reset the control to 2048 and compare recovered resistance.

Explain Only adc code moves here. The other chapter fixtures remain fixed.

Check yourself

What should you do before trusting a moved-control result?
Answer: Predict its direction, apply the shown relationship, keep the units, and reset to the worked baseline.
What does this small model leave out?
Answer: Only adc code moves. Field effects named in the page's technical boundary stay fixed.

1. Start with the divider

The ADC reads voltage, not resistance. A fixed resistor and the thermistor share the supply voltage. Their ratio decides the ADC code.

Data Dora: The code line is not a magic temperature formula; it first reconstructs resistance.

2. Name every algebra move

1

Turn code into a fractionadc/4095 is the measured share of full scale.

2

Invert the dividerRntc=Rfixed(4095/adc−1).

3

Count code widthq=Vref/4096 and qrms=q/√12.

4

Invert the loop intervalfs=1/0.200=5.00 Hz.

5

Find ceiling and foldfmax=fs/2; falias=|f−nfs|.

3. Reproduce and correct the lab case

Rntc=10,000(4,095/2,048−1)=9,995.12 Ω
q=3.3/4,096=0.806 mV; qrms=0.233 mV; SNR=74.0 dB
fs=1/0.200=5.00 Hz; fmax=2.50 Hz; fastest period=2/5=0.400 s; |3.00−5.00|=2.00 Hz

The exact expression lands near 10 kΩ because the two divider resistances are almost equal. The legacy box printed 9,990 Ω; direct evaluation gives 9,995.12 Ω.

4. Try the ADC code

TryMove the ADC code and watch the inverted resistance change nonlinearly while converter and timing limits stay fixed.

ADC code
Recovered resistance
Divider voltage
ADC step
ADC RMS noise
Ideal ADC SNR
Sample rate
Nyquist ceiling
Fastest safe period
3 Hz apparent rate

ObserveAt code 2,048, the engine returns 9,990 Ω and 1.650 V. Higher code means lower recovered thermistor resistance for this divider orientation.

ExplainThe reciprocal 4095/adc makes resistance nonlinear in code. Normalization can rescale that result, but cannot improve the ADC step or undo a 3 Hz-to-2 Hz fold.

Technical boundaries.

This engine stops at resistance and ideal acquisition limits.

Thermistor
Temperature conversion still needs the device's beta or Steinhart-Hart calibration
Divider
Resistor tolerance, self-heating, loading, and reference error are omitted
Aliasing
The 3 Hz HVAC example is illustrative, not chapter-measured evidence

Validate calibration, analogue settling, real bandwidth, and sampling jitter.

5. Know what scaling changes

Scaling changes units or numerical range. It does not change how the divider produced the code, how many codes exist, or which frequencies the sample loop captured.

6. Keep the lab record

Record divider orientation, resistor value and tolerance, ADC bits and reference, calibration equation, loop interval, filter, scaling fit, test range, owner, and retest trigger.

7. Check yourself

Why is the resistance near 10 kΩ at code 2,048?
Answer: The code is nearly half scale, so the two divider resistances are nearly equal.
Why are there 4,096 levels but a maximum code of 4,095?
Answer: Counting starts at zero: codes 0 through 4,095 make 4,096 levels.
Can min-max scaling remove the 2 Hz alias?
Answer: No. It changes amplitude scale, not the time grid that caused the fold.
Honesty boundary.

The divider code and loop values come from the lab; the alias tone is labelled illustrative.

10 kΩ, 4,095, code 2,048
The simulator's divider and worked midpoint; exact arithmetic corrects the legacy 9,990 Ω to 9,995.12 Ω
12-bit, 3.3 V, 200 ms
The lab and site's stated acquisition convention
3.00 Hz input
An illustrative HVAC cycle used to expose the 2.00 Hz fold

Correct, not complete: resistance is not temperature until calibration and operating limits are applied.