IoT Fundamentals · Study deck

Quantization and Digital Filtering

Picture a brief pressure spike that is visible at the sensor but missing from the stored samples.

Physics Phoebe is your guide for this deck.

signalprocessingquantization
Physics Phoebe, the module guide, in a scene from this chapter.
iotclass.org

After studying this chapter

Learning objectives

You will be able to:

  • Explain: Focus next on: Boundary, the companion label anchoring Filter-order pipeline: preserve raw evidence, check the ADC boundary, reject spikes, smooth jitter, downsample after the limit, and validate the event.
  • Explain: For a 12-bit, 3.3-volt ADC, the LSB is about 0.806 mV, so the ideal rounding error is within about plus or minus 0.4 mV.
  • Explain: Resolution Versus Noise If the input noise is larger than one LSB, the lowest code bits only describe that noise, so buying more resolution adds digits, not information.
  • Match ADC code steps to sensor evidence needs
iotclass.org

Major section

In 60 Seconds · Start With the Story

An analog-to-digital converter is the circuit that turns a measured voltage into a digital number.

  • Latency means the delay between input and usable output.
  • This proves one chain preserves the chosen events, not every signal; the deeper sections derive quantization error and compare filters, order, noise, and latency.
iotclass.org

Major section

Rounding to Lines on a Ruler · Apply It: Fit the Code Step, Then Filter

Quantization is like reading a value against a ruler that only has so many tick marks.

  • The true value falls somewhere between two ticks, and the ADC reports the nearest tick.
  • If the ticks are far apart, small real changes vanish between them.
  • Filtering is the second job.

Why it matters

If the ticks are absurdly fine, you start measuring the unsteadiness of your own hand rather than the object, because the smallest tick is finer than the noise.

Code-step fit: useful span, noise floor, reference range, and one-code resolution must be reviewed together.
Code-step fit: useful span, noise floor, reference range, and one-code resolution must be reviewed together.
iotclass.org

Major section

Under the Hood: Quantization Math and Noise Limits

Quantization and filtering both have clean formulas.

  • They reveal why extra bits stop helping past the noise floor, and why averaging buys resolution only under the right conditions.
  • Each added bit improves the ideal ratio by about 6 dB.
  • The front-end-noise preset below connects that statement to bandwidth.
  • Small changes invisible.

Numbers to remember

0.806 mVthe LSB is about 0.806 mV
6 dBEach added bit improves the ideal ratio by about 6 dB.

Why it matters

Shift next to : Boundary because it highlights : Boundary, and close on : Reject, which uses : Reject to mark a decision point.

Filter-order pipeline: preserve raw evidence, check the ADC boundary, reject spikes, smooth jitter, downsample after the limit, and validate the event.
Filter-order pipeline: preserve raw evidence, check the ADC boundary, reject spikes, smooth jitter, downsample after the limit, and validate the event.
iotclass.org

Major section

Under the Hood: Quantization Math and Noise Limits (continued)

The cost is delay and computation, the same trade as any smoothing.

  • For a 12-bit, 3.3-volt ADC, the LSB is about 0.806 mV, so the ideal rounding error is within about plus or minus 0.4 mV.
  • That operation is discrete convolution.
  • Code step larger than the change.
iotclass.org

Major section

Under the Hood: Quantization Math and Noise Limits (continued)

Over-filtering.: Too much smoothing hides real fast events and adds latency.

  • Resolution Versus Noise If the input noise is larger than one LSB, the lowest code bits only describe that noise, so buying more resolution adds digits, not information.
  • LSB versus smallest meaningful change.
  • Pattern is an alias already in the data.
iotclass.org

Major section

Under the Hood: Quantization Math and Noise Limits (continued)

The useful measure is the effective number of bits, which can be well below the nominal count.

  • The remedy is often to reduce noise or to average, not to specify a larger converter.
  • The integrated analog-noise floor falls, SNR and effective bits improve, and quantization becomes the larger remaining floor without any change to converter resolution.
  • At each position, the firmware multiplies nearby samples by the coefficients and adds the products.
iotclass.org

Major section

Under the Hood: Quantization Math and Noise Limits (continued)

Narrowing bandwidth is useful only when the removed frequencies are outside the signal and response-time requirements.

  • The choice balances how cleanly you must separate signal from noise against how much lag the application tolerates.
  • One limit is absolute: a digital filter operates on samples that already exist, so it cannot undo aliasing.
  • Coefficient Filters Are Sliding Evidence Tests Many digital filters are just a short coefficient list sliding across a sampled signal.
iotclass.org

Major section

Under the Hood: Quantization Math and Noise Limits (continued)

Content that folded into the band during sampling looks like real signal, which is why anti-alias filtering must be analog and must happen before the ADC.

  • Focus next on: Boundary, the companion label anchoring Filter-order pipeline: preserve raw evidence, check the ADC boundary, reject spikes, smooth jitter, downsample after the limit, and validate the event.
  • Shift next to: Boundary because it highlights: Boundary, and close on: Reject, which uses: Reject to mark a decision point.
  • Wasting range.: A signal that uses only a small part of the input range throws away available codes.
iotclass.org

Major section

Summary · Key Takeaway

Quantization rounds the analog input to discrete codes; one LSB equals V_ref divided by 2 to the power N and sets the finest resolvable change.

  • The ideal quantization error is within plus or minus half an LSB, and ideal SNR rises about 6 dB per added bit.
  • Averaging N independent samples reduces random noise by the square root of N, at the cost of delay.
  • A coefficient filter applies discrete convolution: slide the taps across the samples, multiply, sum, and keep the coefficient list with the validation record.
  • Resolution finer than the noise floor adds digits, not information; reduce noise or average instead of buying bits.
iotclass.org

Deck summary

Key takeaways

An analog-to-digital converter is the circuit that turns a measured voltage into a digital number.

  • Quantization is like reading a value against a ruler that only has so many tick marks.
  • Quantization and filtering both have clean formulas.
  • The cost is delay and computation, the same trade as any smoothing.
  • Over-filtering.: Too much smoothing hides real fast events and adds latency.
iotclass.org

Retrieval practice

Recall check 1 of 3

Physics Phoebe says: answer from memory, then check your reasoning.

Q1What does one LSB, the least significant bit, represent for an ADC?

AThe number of samples captured each second by the ADC timing setup
BThe largest input voltage allowed before the ADC clips at full scale
CThe voltage width represented by one adjacent ADC code step
DThe delay introduced by the chosen digital smoothing filter
Show answer

Answer: C One LSB is the width of a single quantization step, the finest amplitude change the converter can represent.

iotclass.org

Retrieval practice

Recall check 2 of 3

Physics Phoebe says: answer from memory, then check your reasoning.

Q2Readings are mostly steady but occasionally show single large spikes from electrical interference. Which filter best removes the spikes while preserving the true level?

AA moving average that spreads each spike across nearby samples
BA higher-resolution ADC that records each interference spike in more detail
CA median filter that rejects isolated outliers while keeping the local level
DA larger reference voltage that rescales codes without rejecting spikes
Show answer

Answer: C A median is robust to single spikes, so the reported level follows the real signal rather than the outlier.

iotclass.org

Retrieval practice

Recall check 3 of 3

Physics Phoebe says: answer from memory, then check your reasoning.

Q3Averaging 16 independent samples of a noisy but steady reading reduces the random-noise standard deviation by approximately what factor?

AAbout 4
BAbout 16
CAbout 2
DAbout 8
Show answer

Answer: A Averaging N independent samples reduces noise by the square root of N, and the square root of 16 is 4.

iotclass.org

Print reference

Answers

Answer key.

  1. C · One LSB is the width of a single quantization step, the finest amplitude change the converter can represent.
  2. C · A median is robust to single spikes, so the reported level follows the real signal rather than the outlier.
  3. A · Averaging N independent samples reduces noise by the square root of N, and the square root of 16 is 4.
iotclass.org