Reference sheet
Sensor picker
Which sensor for temperature, distance, light or current

Sensor picker
Which part for which measurement. Range is rarely what sinks a choice — interface and conditions are. A 5 V echo pin kills a 3.3 V input, sunlight blinds both the time-of-flight and the light sensors, and a PIR reports an empty room the moment its occupant stops moving. Of the two current sensors, only the ACS712 is isolated (2.1 kV); the INA219 shares your ground and is far more accurate at low currents.
| Part | Measures | Range / accuracy | Interface | Watch out |
|---|---|---|---|---|
| DS18B20 | Temperature | −55 to +125 °C; ±0.5 °C from −10 to +85 °C, ±2 °C at the extremes | 1-Wire, 3–5.5 V | Needs a 4.7 kΩ pull-up; a 12-bit read takes 750 ms |
| NTC thermistor, 10 kΩ | Temperature | −40 to +125 °C | Analog divider | Very non-linear — use the beta or Steinhart-Hart equation, not a line fit |
| DHT22 / AM2302 | Temperature + humidity | ±0.5 °C; 0–100 %RH ±2–5 % | Single wire (not 1-Wire) | One reading every 2 s, no faster. The DHT11 looks identical and is far worse |
| BMP280 | Pressure + temperature | 300–1100 hPa, ±1 hPa absolute (≈ 8 m); ±0.12 hPa relative (≈ 1 m) | I2C 0x76/0x77, or SPI | No humidity — that is the BME280, same package and pinout |
| HC-SR04 | Distance (ultrasonic) | 2–400 cm, ~3 mm steps | 2 GPIO, 5 V | Echo swings to 5 V: divide it for a 3.3 V MCU. 15° cone, soft surfaces vanish |
| VL53L0X | Distance (laser ToF) | 30 mm–1.2 m, 2 m long-range | I2C, 0x29 | Sunlight cuts the range. The address resets at boot, so sequence XSHUT |
| HC-SR501 (PIR) | Motion | 3–7 m, ~110° cone | 1 GPIO out, 5–20 V in | Senses change, not presence — someone sitting still disappears |
| LDR / photoresistor | Light (relative) | ≈ 10–20 kΩ at 10 lux, ≈ 1 MΩ dark | Analog divider | Non-linear and varies wildly part to part. Contains cadmium, so restricted in the EU |
| BH1750 | Light (calibrated) | 1–65 535 lx, 1 lx steps | I2C, 0x23 or 0x5C | Real lux, but only two addresses per bus, and it saturates in direct sun |
| ACS712 | Current, AC or DC | ±5 / ±20 / ±30 A | Analog, 5 V | Output centres on VCC/2 and tracks the supply; noise swamps small currents |
| INA219 | Current + bus voltage | 0–26 V, ±3.2 A on a 0.1 Ω shunt | I2C, 0x40–0x4F | High side only, and only as accurate as the calibration register you wrote |







