Sensors & signal conditioning

Sensors, embedded & practical systems · tree view

Resistance that answers to light or temperature, millivolts born at a metal junction — and the divider, bridge, and amplifier work needed to turn them into a signal an ADC can read.

Prerequisites

ldr symbol
ldr
thermistor symbol
thermistor
thermocouple symbol
thermocouple
microcontroller symbol
microcontroller
ntc-divider-adc.svg
ntc-divider-adc.svg
thermocouple-chain.svg
thermocouple-chain.svg
quarter-bridge.svg
quarter-bridge.svg

When a pair of dissimilar metals are joined together for the purpose of measuring temperature, the device formed is called a thermocouple. Thermocouples made for instrumentation use metals of high purity for an accurate temperature/voltage relationship (as linear and as predictable as possible).

— Tony R. Kuphaldt, Lessons In Electric Circuits, Vol. I (DC), Chapter 9, section “Thermocouples” source

This second junction is called the reference or cold junction, to distinguish it from the junction at the measuring end, and there is no way to avoid having one in a thermocouple circuit.

— Tony R. Kuphaldt, Lessons In Electric Circuits, Vol. I (DC), Chapter 9, section “Thermocouples” source

The thermoelectric voltage in a thermocouple depends mainly on the difference in temperature between the hot and cold junctions. Consequently, they are widely used to measure temperature, and as heat-sensing devices in automatic temperature control equipment.

— U.S. Navy, NEETS Module 1 — Introduction to Matter, Energy, and Direct Current, Chapter 1, “Voltage Produced by Heat” (fig. 1-21)

The voltage produced by thermocouple junctions is strictly dependent upon temperature. Any current in a thermocouple circuit is a function of circuit resistance in opposition to this voltage (I=E/R). In other words, the relationship between temperature and Seebeck voltage is fixed, while the relationship between temperature and current is variable, depending on the total resistance of the circuit.

— Tony R. Kuphaldt, Lessons In Electric Circuits, Vol. I (DC), Chapter 9, section “Thermocouples” source

THERMISTOR—A type of bolometer characterized by a decrease in resistance as the dissipated power increases.

— U.S. Navy, NEETS Module 16 — Introduction to Test Equipment, Glossary

The two types of bolometers are the BARRETTER and the THERMISTOR. The barretter is characterized by an increase in resistance as the dissipated power rises. The thermistor decreases in resistance as the power increases.

— U.S. Navy, NEETS Module 16 — Introduction to Test Equipment, Chapter 2, RF power measurement (bolometers)

One common signal standard is 0-10 volts, meaning that a signal of 0 volts represents 0 percent of measurement, 10 volts represents 100 percent of measurement, 5 volts represents 50 percent of measurement, and so on. Instruments designed to output and/or accept this standard signal range are available for purchase from major manufacturers. A more common voltage range is 1-5 volts, which makes use of the "live zero" concept for circuit fault indication.

— Tony R. Kuphaldt, Lessons In Electric Circuits, Vol. I (DC), Chapter 9, section “Voltage signal systems” source

The most common current signal standard in modern use is the 4 to 20 milliamp (4-20 mA) loop, with 4 milliamps representing 0 percent of measurement, 20 milliamps representing 100 percent, 12 milliamps representing 50 percent, and so on.

— Tony R. Kuphaldt, Lessons In Electric Circuits, Vol. I (DC), Chapter 9, section “Current signal systems” source

A simple 250 ohm precision resistor connected in series with the circuit will produce 1 volt of drop at 4 milliamps, 5 volts of drop at 20 milliamps

— Tony R. Kuphaldt, Lessons In Electric Circuits, Vol. I (DC), Chapter 9, section “Current signal systems” source

Such demanding precision calls for a bridge measurement circuit.

— Tony R. Kuphaldt, Lessons In Electric Circuits, Vol. I (DC), Chapter 9, section “Strain gauges” source

Wheatstone bridges are considered a superior means of resistance measurement to the series battery-movement-resistor meter circuit discussed in the last section. Unlike that circuit, with all its nonlinearities (nonlinear scale) and associated inaccuracies, the bridge circuit is linear (the mathematics describing its operation are based on simple ratios and proportions) and quite accurate.

— Tony R. Kuphaldt, Lessons In Electric Circuits, Vol. I (DC), Chapter 8, section “Bridge circuits” source
Show alternative explanations

Seebeck voltages are quite small, in the tens of millivolts for most temperature ranges. This makes them somewhat difficult to measure accurately.

— Tony R. Kuphaldt, Lessons In Electric Circuits, Vol. I (DC), Chapter 9, section “Thermocouples” source

This means that the voltage between the voltmeter's copper leads will be a function of the difference in temperature between the two junctions, and not the temperature at the measurement junction alone.

— Tony R. Kuphaldt, Lessons In Electric Circuits, Vol. I (DC), Chapter 9, section “Thermocouples” source

When light strikes the surface of a substance, it may dislodge electrons from their orbits around the surface atoms of the substance. This occurs because light has energy, the same as any moving force.

— U.S. Navy, NEETS Module 1 — Introduction to Matter, Energy, and Direct Current, Chapter 1, “Voltage Produced by Light”

The negative-resistance temperature coefficient of thermistors is desirable. This is because excessive power has the effect of changing the resistance of the thermistor to an extent that causes a pronounced rf mismatch. The resulting decrease in power transfer reduces the likelihood of burnout.

— U.S. Navy, NEETS Module 16 — Introduction to Test Equipment, Chapter 2, RF power measurement (thermistor self-heating)

Ideally, then, current in a thermocouple circuit is zero. Early thermocouple indicating instruments made use of null-balance potentiometric voltage measurement circuitry to measure the junction voltage.

— Tony R. Kuphaldt, Lessons In Electric Circuits, Vol. I (DC), Chapter 9, section “Thermocouples” source

A thermistor bridge circuit includes other thermistor elements, referred to as compensating thermistors. These thermistors respond to fluctuations in ambient temperature so that the bridge balances and calibration are maintained over a wide temperature range.

— U.S. Navy, NEETS Module 16 — Introduction to Test Equipment, Chapter 2, “Thermistor Bridge” (fig. 2-4)

Thermistor direction: NTC vs PTC

Heat the same kind of sensor two ways: a real thermistor (NTC) and a hypothetical PTC element. The book's pair — barretter (resistance rises with dissipated power) vs thermistor (resistance falls) — is exactly the PTC-vs-NTC story. Predict the resistance direction, then what a fixed-voltage divider does with it.

To predict the outcome:

  1. Ask: does the resistance go UP or DOWN as temperature rises?
  2. NTC: hotter → more free carriers in the semiconductor → lower R (book: thermistor decreases).
  3. PTC: hotter → resistance rises (book: barretter increases).
  4. Then place it in a divider and predict the output voltage direction.
conditionresistancedivider_output_ntc_on_toptypical_use
thermistor (NTC), cold → hothigh → low (book: 'decrease in resistance as the dissipated power increases')voltage across the fixed bottom resistor risestemperature measurement, inrush limiting (opposite logic)
barretter (PTC), cold → hotlow → high (book: 'increase in resistance as the dissipated power rises')voltage across the fixed bottom resistor fallsself-heating protection / resettable fuse behaviour
NTC self-heats from its own measuring currentdrops as dissipated power grows (book NEETS M16)reading drifts low — keep sensing current smallwhy thermistor bridges add compensating elements

Thermocouple: hotter junction → what does the meter do?

Measurement junction at the hot end, reference (cold) junction at the meter. The book says the voltage depends on the difference in temperature between the junctions and that the meter reads the difference, not the absolute temperature. Predict polarity and size.

To predict the outcome:

  1. Heat the measurement junction above the reference junction → net voltage of one polarity.
  2. Reverse the heat (measurement colder than reference) → polarity flips.
  3. Both junctions at the same temperature → zero net voltage, no matter how hot both are.
  4. Size check (book: 'tens of millivolts for most temperature ranges'); a type K part gives ≈41 µV/°C (datasheet figure, flagged), so ΔT = 100 °C → ≈4.1 mV; a ×500 instrumentation amp brings that to ≈2.05 V.
conditionmeter_readingamplifier_needednote
measurement junction 100 °C, reference 20 °Cpositive, ≈3.3 mV at type-K scalingyes — millivolts into an ADC is only a few hundred counts hotter junction dominates the sign
measurement junction 20 °C, reference 100 °Csame magnitude, opposite polarityyesswap which junction is hot → sign flips
both junctions at 100 °C0 Vnothing to amplifyvoltage tracks ΔT, not absolute temperature
ΔT = 100 °C, amplified ×500≈4.1 mV → ≈2.05 V — comfortable ADC rangeinstrumentation amp with high input impedancebook: draw as little current as possible from the junction

LDR: light in → resistance out

LDR on top of a divider with a 10 kΩ fixed resistor to ground, fed from 5 V. The photoconductive principle (book: light dislodges electrons, more carriers → conduction rises) predicts the resistance direction; Ohm's law sets the divider output. All voltages python-verified.

To predict the outcome:

  1. More light → more free carriers → lower LDR resistance (photoconductive, NTC's optical cousin).
  2. Compute Vout = 5 V × 10 kΩ / (R_LDR + 10 kΩ).
  3. Read the ADC count: counts = Vout / 5 V × 1023 (10-bit).
  4. Cover the sensor with a finger and predict which way everything moves.
conditiondivider_outputadc_counts_10bitverdict
dark (R_LDR ≈ 500 kΩ)≈0.10 V≈20light DOWN → resistance UP → voltage DOWN
room light (R_LDR ≈ 10 kΩ)2.50 V≈512matched pair — mid-scale, maximum headroom
bright (R_LDR ≈ 1 kΩ)≈4.55 V≈930light UP → resistance DOWN → voltage UP
LDR swapped below the fixed resistor5 V − previous reading (inverted logic)≈1003 / 511 / 93same physics, opposite firmware polarity — decide the order deliberately

Signal-conditioning chain: sensor → divider/loop → ADC

Two standard chains, both python-verified. (a) NTC divider: 10 kΩ NTC (B = 3950) on top, 10 kΩ fixed below, 5 V feed, 10-bit ADC. R(T) = 10 kΩ · e^(B(1/T − 1/298.15)). (b) Industrial loop: 4-20 mA through the book's 250 Ω precision resistor → 1-5 V.

To predict the outcome:

  1. Compute the sensor's resistance at each temperature.
  2. Divider: Vout = 5 × R_fixed/(R_NTC + R_fixed); counts = Vout/5 × 1023.
  3. Loop: V = I × 250 Ω; check 4 mA → 1 V, 20 mA → 5 V (book).
  4. Ask what a broken wire reads: loop current dies → below the live zero → fault, not zero.
conditionchain_outputpercent_of_spannote
NTC divider, 0 °C (R ≈ 33.6 kΩ)1.15 V = 235 counts≈23%colder → NTC bigger → output lower (NTC on top)
NTC divider, 25 °C (R = 10 kΩ)2.50 V = 512 counts50%matched divider sits at mid-scale
NTC divider, 85 °C (R ≈ 1.09 kΩ)4.51 V = 923 counts≈90%≈69 counts per 10 °C near mid-range — resolvable on 10 bits
4-20 mA loop through 250 Ω, 4 mA1.00 V0% of measurement — but nonzero signalbook's live zero: 0 V now means broken wire, not 'zero level'
4-20 mA loop through 250 Ω, 20 mA5.00 V100%exact 1-5 V instrument range from the book, one resistor does the conditioning

Candidate projects — awaiting review

  • Thermistor thermometer: 10 kΩ NTC in a divider into a microcontroller ADC, raw counts to temperature with a rough beta-model linearization, checked against a room thermometer. (https://www.reddit.com/r/AskElectronics/comments/11zv2xw/what_thermistor_should_i_use/, community)
  • LDR light meter: photoresistor divider on an Arduino, light level shown on the serial monitor or a small OLED; log readings in sun, shade, and dark. (https://www.instructables.com/Arduino-and-a-LDR-Light-Dependent-Resistor/, community)
  • Type-K thermocouple readout: MAX6675 amplifier into a microcontroller — the chip does cold-junction compensation and amplification the lesson describes, and hands the temperature over a serial bus. (https://randomnerdtutorials.com/arduino-k-type-thermocouple-max6675/, community)
  • 4-20 mA loop simulator and receiver: one potentiometer-driven current source, one 250 Ω sense resistor and voltmeter — reproduce the book's 4 mA→1 V / 20 mA→5 V table, then break the wire and watch the live zero catch the fault. (Kuphaldt, Lessons In Electric Circuits Vol. I ch. 9, “Current signal systems”, book)