Sensors
Learning Objectives
By the end of this page, you should be able to:
- Explain what a sensor does and describe the three functional stages: sensing element, signal conditioning, output interface
- Distinguish light, temperature, pressure, and proximity sensors by the physical phenomenon each detects
- Explain the difference between a photoresistor and a photodiode as light-sensing elements
- Explain how a thermistor and a thermocouple each convert temperature into an electrical quantity
- Identify common causes of sensor error (calibration drift, environmental interference, noise)
- Describe at least three real-world applications where a specific sensor type is essential
Quick Answer
A sensor is a device that detects a physical phenomenon — light, temperature, pressure, motion, or another quantity — and converts it into an electrical signal that a circuit can measure, process, or act on. Every sensor has a sensing element that responds physically to the input (like a thermistor's resistance changing with temperature), a signal conditioning stage that turns that raw response into a clean, usable electrical signal (amplifying, filtering), and an output interface that presents the result as an analog voltage or digital value to the rest of the system. Sensors are what let electronic devices perceive and react to the physical world — without them, a smartphone couldn't auto-rotate its screen, a thermostat couldn't regulate temperature, and a car couldn't detect an obstacle while parking.
What Is a Sensor?
A sensor bridges the physical world and electronic circuits by converting a non-electrical quantity into an electrical one. Every sensor, regardless of what it measures, is built around three functional stages:
- Sensing element: The part that physically interacts with the phenomenon being measured — for example, a thermistor's resistance changing with heat, or a photodiode generating current in response to light.
- Signal conditioning circuit: Converts the raw, often weak or noisy signal from the sensing element into a usable form — amplifiers boost small signals, filters remove noise, and reference circuits provide a stable baseline for comparison.
- Output interface: Delivers the processed signal to the rest of the system, either as an analog voltage/current proportional to the measured quantity, or as a digital signal after analog-to-digital conversion.
Types of Sensors
Light Sensors
Light sensors convert light energy into an electrical signal.
- Photoresistor (LDR): A variable resistor whose resistance decreases as light intensity increases. Simple and cheap, commonly used for ambient light detection like automatic streetlights or backlight dimming.
- Photodiode: A semiconductor device that, when reverse biased, produces a current proportional to incident light. Faster response and more linear behaviour than a photoresistor, used in optical communication receivers and precise light measurement.
Example: In a light-controlled LED circuit, as ambient light increases, a photoresistor's resistance drops, allowing more current to flow through a companion LED branch — a simple way to build an automatic night light that turns on as it gets dark.
Temperature Sensors
Temperature sensors detect changes in temperature and convert them into electrical signals.
- Thermocouple: Made from two dissimilar metal wires joined at one end; the junction generates a small voltage proportional to the temperature difference between the measuring junction and a reference junction (the Seebeck effect). Thermocouples can measure very high temperatures and are common in industrial furnaces and ovens.
- Thermistor: A resistor whose resistance changes significantly with temperature — most commonly a negative temperature coefficient (NTC) type, where resistance decreases as temperature rises. Thermistors are cheaper and more sensitive than thermocouples over a narrower, moderate temperature range, common in household thermostats and battery temperature monitoring.
Pressure Sensors
Pressure sensors measure the pressure of gases or liquids and convert it into an electrical signal.
- Piezoelectric sensor: Generates an electric charge in response to mechanical stress, useful for detecting rapid pressure changes like vibration or impact.
- Strain gauge: A resistive element that changes resistance as it's stretched or compressed, often bonded to a diaphragm that flexes under pressure — the resistance change is measured (typically via a Wheatstone bridge) to determine pressure.
Proximity Sensors
Proximity sensors detect the presence or absence of an object within a specified range without physical contact.
- Ultrasonic sensor: Emits an ultrasonic pulse and measures the time for the echo to return, calculating distance from the speed of sound — used in parking assist systems and liquid level detection.
- Infrared sensor: Detects objects by measuring reflected infrared light (active IR) or the infrared radiation objects naturally emit (passive IR, as in motion detectors) — used in automatic doors, touchless soap dispensers, and security systems.
Real-World Example
A smartphone uses a proximity sensor (usually infrared) near the earpiece to detect when the phone is held up to your ear during a call — this automatically turns off the touchscreen to prevent your cheek from accidentally triggering buttons. The same phone likely also has an ambient light sensor (a photodiode) to automatically adjust screen brightness, and a temperature sensor to protect the battery from overheating during fast charging — three different sensor types working together in one device.
Sensor Applications
- Automotive: Temperature, pressure, and motion sensors for engine management, tire pressure monitoring, and parking assistance
- Consumer electronics: Ambient light and proximity sensors in smartphones, cameras, and smart home devices
- Industrial automation: Pressure and proximity sensors for monitoring and controlling manufacturing processes
- Healthcare: Temperature and pressure sensors in medical devices for monitoring vital signs
Common Sensor Issues
Even well-designed sensor systems can produce inaccurate results if you're not careful:
- Inaccurate readings: Often caused by poor calibration or environmental interference the sensor wasn't designed to reject.
- Sensor failure: Can occur from overexposure to conditions beyond the sensor's rated range — extreme heat, humidity, or mechanical shock.
- Signal noise: Electrical noise (from nearby switching circuits or long unshielded wiring) can corrupt a sensor's small analog signal before it reaches the signal conditioning stage.
Sensor Signal Path
Every sensor system follows this same path: a physical quantity is converted to a raw electrical signal by the sensing element, cleaned up and scaled by conditioning circuitry, and delivered through an output interface to whatever system needs to read it — a microcontroller, a display, or a control loop driving an actuator.
Key Terms
| Term | Definition | Related Concept |
|---|---|---|
| Sensing element | The part of a sensor that physically responds to the measured phenomenon | Photoresistor, thermistor, strain gauge |
| Signal conditioning | Circuitry that amplifies, filters, or scales a raw sensor signal | Op-amps, filters |
| Photoresistor (LDR) | Light-dependent resistor; resistance decreases as light increases | Ambient light sensing |
| Photodiode | Semiconductor light sensor producing current proportional to light in reverse bias | Optical communication |
| Thermocouple | Two dissimilar metal junction generating voltage from temperature difference (Seebeck effect) | High-temperature measurement |
| Thermistor | Resistor with resistance strongly dependent on temperature | Household temperature sensing |
| Strain gauge | Resistive element whose resistance changes with mechanical deformation | Pressure/force sensing |
| Piezoelectric sensor | Generates electric charge in response to mechanical stress | Vibration/impact detection |
| Ultrasonic sensor | Measures distance via time-of-flight of an ultrasonic pulse echo | Proximity/distance sensing |
| Wheatstone bridge | Balanced resistor network used to detect small resistance changes precisely | Strain gauge measurement |
Common Mistakes
Misconception: A sensor directly outputs the physical quantity it measures, like a temperature reading in degrees. Why it's wrong: A sensor's raw output is an electrical quantity (resistance, voltage, or current) that must be interpreted using a known relationship (a calibration curve or formula) to convert it into a meaningful physical unit. The sensor itself doesn't "know" it's measuring temperature — the interpreting circuit or software does. Correct understanding: Always account for the sensing element's electrical characteristic curve and any needed calibration or linearization when converting a sensor's raw output into the physical quantity of interest.
Misconception: Any sensor will work accurately regardless of environmental conditions as long as it's powered correctly. Why it's wrong: Sensors have specified operating ranges (temperature, humidity, mechanical stress) outside of which their accuracy degrades or they fail outright. A thermistor rated for household use, for example, will behave unpredictably or be damaged at industrial furnace temperatures. Correct understanding: Check a sensor's datasheet for its rated operating range and choose a sensor type designed for your actual environmental conditions.
Misconception: A photoresistor and a photodiode are interchangeable light sensors. Why it's wrong: A photoresistor changes resistance relatively slowly and non-linearly with light, suited to simple on/off or general brightness detection. A photodiode responds much faster and more linearly, and can be used for precise light measurement or high-speed optical data reception — using one where the other's characteristics are actually needed can cause poor circuit performance. Correct understanding: Choose a photoresistor for simple, slow, general light-level detection, and a photodiode when speed, linearity, or precision matters.
Comparison and Connections
| Feature | Photoresistor | Photodiode | Thermistor | Thermocouple |
|---|---|---|---|---|
| Measures | Light intensity | Light intensity | Temperature | Temperature |
| Response speed | Slow | Fast | Moderate | Moderate |
| Linearity | Non-linear | More linear | Non-linear (needs linearization) | Fairly linear over range |
| Typical use | Simple light detection | Optical communication, precision light sensing | Household/moderate-range temperature | High-temperature industrial measurement |
Practice Questions
Recall
-
What are the three functional stages every sensor system includes? Answer guidance: Sensing element, signal conditioning circuit, and output interface.
-
Name one sensor type used for each: light, temperature, pressure, and proximity sensing. Answer guidance: Light — photoresistor or photodiode; Temperature — thermistor or thermocouple; Pressure — strain gauge or piezoelectric sensor; Proximity — ultrasonic or infrared sensor.
Understanding
-
Why does a thermocouple work based on the junction of two different metals rather than a single metal wire? Answer guidance: The Seebeck effect, which generates a voltage from a temperature difference, depends on the two metals having different thermoelectric properties. A single uniform metal wire produces no net voltage from a temperature gradient because there's no difference in thermoelectric behaviour to generate a measurable potential difference between two points.
-
Why is signal conditioning necessary between a sensing element and the final output interface? Answer guidance: Raw signals from sensing elements are often very small, noisy, or nonlinear. Signal conditioning amplifies weak signals to a usable range, filters out noise, and can linearize or scale the signal so downstream circuitry (like an analog-to-digital converter) can interpret it accurately.
Application
-
A design needs to detect whether a room is occupied to control lighting automatically, without requiring the person to be moving constantly. Which type of proximity/motion sensor would work best, and why? Answer guidance: A passive infrared (PIR) sensor is commonly used, but for continuous occupancy detection (not just motion), a combination with an ultrasonic or additional sensing method is often used since PIR alone struggles to detect a stationary person; the key reasoning is PIR detects the infrared radiation from body heat changes as people move.
-
You need to measure the temperature inside an industrial furnace reaching 1000°C. Would a thermistor or a thermocouple be appropriate, and why? Answer guidance: A thermocouple — thermistors have a much more limited temperature range (typically well under a few hundred degrees Celsius) and would be damaged at furnace temperatures, while thermocouples are specifically designed and rated for very high-temperature industrial measurement.
Analysis
-
A strain gauge's resistance changes by only a fraction of a percent under typical mechanical loads. Explain why a Wheatstone bridge circuit is commonly used to measure this, rather than simply measuring the resistance directly with a multimeter. Answer guidance: A Wheatstone bridge compares the strain gauge's resistance against a reference in a balanced configuration, converting a tiny resistance change into a proportionally larger, easily measurable voltage difference. A direct multimeter resistance measurement would struggle to resolve such a small fractional change reliably, especially amid wiring resistance and measurement noise.
-
A room's ambient light sensor gives inconsistent readings that seem to spike randomly, even though the room's lighting hasn't changed. What are two possible causes, and how would you distinguish between them? Answer guidance: (1) Electrical noise coupling into the sensor's signal wiring, especially if it runs near switching power supplies or motors — this could be checked by shielding or rerouting the wire and observing if spikes disappear. (2) The sensing element itself may be faulty or degraded (e.g., a cracked photoresistor) — this could be checked by substituting a known-good sensor and seeing if the issue persists.
FAQ
Why do some temperature sensors output a voltage while others output a changing resistance? It depends on the underlying physical effect. A thermocouple directly generates a voltage from the Seebeck effect, so its natural output is a voltage. A thermistor works by its resistance changing with temperature — to get a voltage output, you must pass a known current through it (or place it in a voltage divider) and measure the resulting voltage drop, since resistance alone isn't directly usable by most electronic circuits.
How do sensors get calibrated? Calibration involves exposing the sensor to known reference conditions (a certified temperature bath, a known light source, calibrated weights for pressure) and recording the sensor's output at each point, building a lookup table or mathematical curve that maps raw sensor output back to the true physical value. This corrects for manufacturing variation and non-linearity in the sensing element.
Why does a sensor's accuracy sometimes drift over time even without any visible damage? Many sensing elements experience gradual material aging — a thermistor's doping characteristics can shift slightly with prolonged heat exposure, mechanical sensors can experience material fatigue, and optical sensors can experience slight degradation from prolonged light exposure. This drift is why precision instruments require periodic recalibration.
What's the difference between an active and a passive sensor? An active sensor emits some form of energy (like an ultrasonic pulse or infrared beam) and measures the response or reflection — it requires its own energy source for the emission. A passive sensor simply detects existing energy or a property change without emitting anything itself, like a passive infrared motion sensor detecting the infrared radiation naturally emitted by a warm body, or a photoresistor responding to ambient light already present.
Can I connect any sensor directly to a microcontroller's analog input pin? Not always safely or accurately. Many raw sensor signals are too weak, too noisy, non-linear, or outside the microcontroller's input voltage range to connect directly. Signal conditioning circuitry — amplification, filtering, level shifting, or protection components — is often necessary between the sensing element and the microcontroller's input to get clean, accurate, and safe readings.
Quick Revision
- Every sensor has three stages: sensing element, signal conditioning, output interface
- Photoresistors (LDR) change resistance with light; photodiodes generate current with light, faster and more linear
- Thermocouples generate voltage from a temperature difference between two dissimilar metal junctions (Seebeck effect)
- Thermistors change resistance with temperature; NTC types decrease resistance as temperature rises
- Strain gauges change resistance with mechanical deformation, often measured via a Wheatstone bridge
- Piezoelectric sensors generate charge from mechanical stress, good for detecting rapid changes
- Ultrasonic sensors measure distance via echo time-of-flight; infrared sensors detect reflected or emitted IR
- Active sensors emit energy and measure the response; passive sensors detect existing energy
- Sensor accuracy can drift over time due to material aging, requiring periodic recalibration
- Signal conditioning (amplification, filtering) is usually needed before a sensor's raw signal is usable
Related Topics
Prerequisites: Resistors (voltage dividers for sensor readout); diodes (photodiode operation); basic circuit analysis
Related Topics: Operational amplifiers (signal conditioning); analog-to-digital conversion; microcontroller interfacing
Next Topics: Connectors; analog-to-digital converters; microcontroller-based data acquisition; feedback control systems