The short answer
The sensors you’ll meet most often in embedded systems are:
- Temperature sensors (thermistors, digital temperature ICs, thermocouples)
- Humidity sensors, often combined with temperature
- Pressure sensors, including barometric sensors used for altitude
- Motion and orientation sensors: accelerometers, gyroscopes, magnetometers and combined IMUs
- Light sensors (photoresistors, photodiodes, ambient light ICs)
- Distance and proximity sensors (ultrasonic, infrared, time-of-flight)
- Presence sensors such as PIR motion detectors
- Magnetic and position sensors (Hall-effect sensors, rotary encoders, potentiometers)
- Current and voltage sensors
- Force and weight sensors (load cells, strain gauges)
- Gas and air-quality sensors (CO2, VOC, smoke)
- Sound sensors (MEMS microphones)
- Touch sensors (capacitive)
- GPS receivers and image sensors in more capable devices
Which ones appear depends on the product: a thermostat needs temperature and humidity, a fitness tracker an IMU and an optical heart-rate sensor, a robot distance sensors and encoders.
Common embedded sensors by what they measure
Temperature
Temperature is probably the most common measurement in embedded systems.
- NTC thermistors: resistors whose resistance drops as temperature rises. Cheap and widely used, read through a voltage divider and an ADC. Their response isn’t linear, so software applies a conversion formula or lookup table.
- Analog temperature ICs such as the TMP36 or LM35 output a voltage proportional to temperature.
- Digital temperature sensors such as the DS18B20 (1-Wire) or various I2C parts report a ready-made reading, with no analog circuitry to design.
- Thermocouples cover very high temperatures (ovens, kilns, engines) but produce tiny voltages and need a dedicated interface chip such as the MAX31855.
- RTDs (platinum resistance sensors such as the PT100) are used where stability and accuracy matter, typically with a dedicated interface chip.
Many microcontrollers also have a built-in temperature sensor, but it measures the chip, not the room.
Humidity
Most low-cost humidity sensors are capacitive, and they usually combine temperature sensing. Examples include the Sensirion SHT3x and SHT4x families and the Bosch BME280 (which adds pressure), all on I2C. The older DHT11 and DHT22 use their own single-wire protocol and are popular with hobbyists.
Pressure and altitude
Barometric pressure sensors such as the Bosch BMP280 and BMP390 are small MEMS devices used for weather stations and for estimating altitude changes in drones and wearables. Industrial systems use pressure transducers for liquids and gases, often with 4–20 mA or 0.5–4.5 V outputs. Underneath, they may use piezoresistive, capacitive or strain-gauge sensing.
Motion and orientation
- Accelerometers measure acceleration, including gravity, so they can tell which way is down. Used for tilt sensing, step counting, tap detection and vibration monitoring.
- Gyroscopes measure rotation rate.
- Magnetometers measure magnetic fields and act as electronic compasses.
- IMUs (inertial measurement units) combine an accelerometer and gyroscope, sometimes with a magnetometer. Examples include ST’s LSM6DS series, Bosch’s BMI270 and the older InvenSense MPU-6050, which is common on hobby boards.
Turning raw IMU data into a stable orientation estimate requires sensor fusion algorithms. Some IMUs do this on-chip.
Light and colour
- Photoresistors (LDRs) are cheap and simple but slow and imprecise. Fine for “is it dark?” decisions.
- Photodiodes and phototransistors respond faster and are used in optical encoders, IR remote receivers and heart-rate sensors.
- Ambient light sensor ICs such as the BH1750 or VEML7700 report illuminance digitally over I2C.
- Colour sensors measure red, green and blue light separately.
Distance and proximity
- Ultrasonic sensors such as the HC-SR04 time an echo. The microcontroller sends a trigger pulse and measures the width of the echo pulse.
- Infrared distance sensors such as Sharp’s GP2Y0A series output an analog voltage that varies with distance.
- Time-of-flight (ToF) laser sensors such as ST’s VL53L0X and VL53L1X time reflected light pulses and report distance over I2C. They’re compact and fairly precise at short to medium ranges.
- Capacitive and inductive proximity sensors are common in industrial equipment to detect objects without contact.
Presence and motion detection
PIR (passive infrared) sensors detect changes in infrared radiation from warm bodies moving across their view. Modules such as the HC-SR501 give a simple digital output and are used in alarms and automatic lights. Microwave radar sensors, including mmWave modules, can detect presence, sometimes even of people sitting still, and are increasingly used in smart-home devices.
Magnetic field and position
- Hall-effect sensors detect magnetic fields. Digital Hall switches detect a nearby magnet, as in lid sensors, door sensors and motor commutation. Linear Hall sensors measure field strength.
- Reed switches are simple magnetically operated contacts.
- Rotary encoders report rotation as pulses. Quadrature encoders use two signals to give direction too. They’re used in knobs, motors and robot wheels.
- Potentiometers give an analog voltage proportional to position, as in joysticks and knobs.
Current, voltage and power
Measuring electrical quantities is essential for battery monitoring, motor control and energy metering.
- Shunt-based current monitors such as the TI INA219 and INA226 measure the small voltage across a low-value resistor and report current, voltage and power over I2C.
- Hall-effect current sensors such as the Allegro ACS712 family measure current without electrical contact with the measured circuit.
- Voltage is often measured with a simple resistor divider into the microcontroller’s ADC.
Force, weight and strain
Load cells contain strain gauges that change resistance very slightly under load. The signal is tiny, so it goes through a dedicated amplifier and ADC such as the HX711, which is common in DIY scales. Force-sensitive resistors (FSRs) give a rough, low-cost measure of pressing force.
Gas and air quality
- Metal-oxide (MOX) gas sensors, including the hobbyist MQ series, react to gases such as combustible gases, alcohol or smoke. They use a heater, so they draw considerable power, and readings drift without calibration.
- Digital VOC sensors such as Sensirion’s SGP40 report air-quality indices over I2C.
- CO2 sensors use optical NDIR sensing (such as the Sensirion SCD30 or the MH-Z19 family) or photoacoustic sensing (such as the Sensirion SCD4x).
- Particulate matter sensors count dust and smoke particles with a laser and fan.
Low-cost gas sensors are fine for indicating trends but aren’t substitutes for certified safety detectors.
Sound
MEMS microphones are tiny and widespread in phones, smart speakers and voice-controlled devices. Many output digital audio over I2S or PDM interfaces. Others are analog and feed an ADC. Simpler “sound sensor” modules just detect loud noises.
Touch
Capacitive touch sensing detects a finger near an electrode by the change in capacitance. Many microcontrollers, including the ESP32 and parts from several other vendors, have touch-sensing peripherals built in, and dedicated controller chips are available too.
Location and images
GPS (GNSS) modules such as u-blox receivers typically talk to the microcontroller over UART, sending standard NMEA text sentences. Image sensors such as the OV2640 used on ESP32-CAM boards need a fast camera interface and plenty of RAM, so they’re usually paired with more capable processors.
Quick reference table
| Sensor type | Example parts | Typical interface |
|---|---|---|
| Thermistor | 10 kΩ NTC | Analog (ADC) |
| Digital temperature | DS18B20 | 1-Wire |
| Temperature + humidity (+ pressure) | SHT4x, BME280 | I2C (BME280 also SPI) |
| Barometric pressure | BMP280, BMP390 | I2C or SPI |
| IMU | LSM6DS series, BMI270, MPU-6050 | I2C or SPI |
| Ambient light | BH1750, VEML7700 | I2C |
| Ultrasonic distance | HC-SR04 | Trigger and echo pulse |
| Time-of-flight distance | VL53L0X, VL53L1X | I2C |
| PIR motion | HC-SR501 module | Digital output |
| Current and power | INA219, INA226 | I2C |
| Load cell amplifier | HX711 | Simple two-wire serial |
| CO2 | SCD4x, SCD30, MH-Z19 | I2C or UART |
| MEMS microphone | Various I2S/PDM parts | I2S or PDM |
| GPS | u-blox modules | UART (NMEA) |
Part numbers are common examples, not recommendations. Check current availability and datasheets before designing in any part.
How sensors connect: analog, digital buses and pulse outputs
Sensors fall into three broad groups by how they report readings:
- Analog output: a voltage, or a resistance you turn into a voltage, read by the microcontroller’s ADC. Simple and cheap, but sensitive to noise, ADC resolution and reference voltage accuracy.
- Digital bus: the sensor has its own ADC and logic and sends readings over I2C, SPI, UART or 1-Wire. This is the most common choice for modern sensors, because calibration and conversion happen on the chip. Our guide to embedded communication protocols explains these buses.
- Pulse or frequency output: the reading is encoded in pulse width, frequency or a count, measured with timers or interrupts. Ultrasonic sensors, encoders and some flow meters work this way.
Analog sensors often need signal conditioning, such as amplification, filtering or level shifting, before the ADC. That and protecting inputs are covered in our guide to sensors, actuators and real-world interfacing.
How to choose a sensor
- Range: does it cover the full span you need, with some margin?
- Accuracy vs resolution: resolution is the smallest step a sensor reports; accuracy is how close the reading is to the truth. A sensor can report 0.01 °C steps and still be off by 0.5 °C. Read the datasheet’s accuracy figures and conditions.
- Interface: does your microcontroller have a spare I2C bus, SPI chip-select or ADC channel? Watch for I2C address conflicts if you use several identical sensors.
- Supply and logic voltage: many modern sensors are 3.3 V or 1.8 V parts. Breakout modules may include regulators and level shifters, but bare chips usually don’t.
- Power consumption: for battery devices, check active current, sleep current and how long a measurement takes. Heated gas sensors are a common battery-killer.
- Speed: how fast can it sample, and how quickly does it respond to real changes?
- Environment: temperature range, moisture, dust, vibration and whether the sensor needs exposure to air or light.
- Software support: a driver library or clear register documentation saves a lot of time.
- Availability and lifecycle: hobby-favourite parts are sometimes discontinued. For products, pick parts with long-term availability.
Sensors vs actuators
Sensors convert a physical quantity into an electrical signal the system can read. Actuators do the reverse: they turn electrical signals into physical action, such as motors, relays, solenoids, heaters, LEDs and speakers. Most embedded systems sit between the two: they read sensors, decide what to do, and drive actuators. Our guide to sensors, actuators and real-world interfacing covers both sides, and the embedded system architecture guide shows where they fit in the whole system.