Sensors for Arduino, ESP32 and Raspberry Pi Pico
66 parts, each with its pinout, wiring per board, code that compiles and the mistakes to avoid.
HC-SR04A low-cost ultrasonic distance sensor that measures 2 cm to 4 m by timing a 40 kHz echo.
JSN-SR04TA waterproof 40 kHz ultrasonic rangefinder that measures distance with a single sealed transducer and is drop-in compatible with HC-SR04 trigger/echo code.
DHT22A factory-calibrated digital sensor that reports both relative humidity and temperature over a single data wire.
BME280A Bosch BME280 breakout that measures barometric pressure, temperature, and relative humidity on one small board, talking to a microcontroller over I2C or SPI.
BME680A Bosch 4-in-1 environmental sensor that measures temperature, humidity, barometric pressure, and gas (VOC) air quality over I2C or SPI.
Waterproof DS18B20Waterproof stainless steel probe housing a Maxim DS18B20 digital thermometer that reports temperature from -55 to +125 °C over a single 1-Wire data line.
DS3231 RTCThe DS3231 is an I2C real-time clock whose integrated temperature-compensated crystal oscillator (TCXO) holds time to ±2 ppm, about a minute a year, between 0 and 40 °C.
MPU60506-axis MotionTracking sensor that combines a 3-axis gyroscope and 3-axis accelerometer on one I2C chip, with an on-chip Digital Motion Processor for offloaded sensor fusion.
AS560012-bit contactless magnetic rotary encoder that reads absolute shaft angle from a diametric magnet over I2C, analog, or PWM.
PIR HC-SR501Passive infrared motion detector that outputs a simple 3.3V digital HIGH when a warm body moves across its field of view.
RCWL-0516RCWL-0516 is a low-cost microwave Doppler radar motion sensor that outputs a simple digital HIGH when it detects movement, with no infrared optics required.
LD2410C mmWave RadarA 24GHz FMCW mmWave radar module from Hi-Link that detects both moving and stationary humans indoors, with a simple presence pin and a configurable UART interface.
VL53L0X ToFA laser time-of-flight distance sensor that measures absolute range up to 2 m over I2C, independent of the target's color or reflectance.
APDS-9960A single-chip I2C optical sensor from Broadcom that combines ambient light, RGB color, proximity, and gesture detection in one package.
VEML7700A Vishay VEML7700 high-accuracy ambient light sensor that reports illuminance in lux over I2C, from near-darkness up to about 140,000 lux.
GL5528 LDRA 5mm CdS photoresistor whose resistance drops from about 1 MΩ in darkness to 10-20 kΩ under 10 lux of light.
MQ-2 Gas SensorMQ-2 is a low-cost tin-dioxide (SnO2) semiconductor sensor that detects combustible gases and smoke (LPG, propane, hydrogen, methane) and reports concentration as an analog voltage.
SGP40 VOC SensorThe Sensirion SGP40 is an I2C metal-oxide gas sensor that reports a VOC Index (1-500) for total volatile organic compounds in indoor air.
SCD41 CO₂ SensorA true photoacoustic NDIR CO₂ sensor (400-5000 ppm) with onboard temperature and humidity, read over I²C.
Capacitive Soil Moisture v1.2A corrosion-resistant capacitive probe that reports soil moisture as a single analog voltage.
YF-S201 Water FlowAn inline Hall-effect water flow sensor that turns liquid flow into a pulse train, about 450 pulses per liter.
IR Receiver (TSOP4838)A TSOP4838 infrared receiver module that demodulates 38 kHz remote-control signals into a clean digital output.
ACS712 Current Sensor (20A)A Hall-effect current sensor module that turns up to ±20 A, AC or DC, into an analog voltage centred on VCC/2.
ADS1115 16-Bit ADCA 16-bit, four-input I2C analog-to-digital converter with a programmable gain amplifier, from ±0.256 V to ±6.144 V full scale.
BH1750 Light SensorA digital ambient light sensor that reports illuminance straight in lux, 1 to 65535 lx, over I2C.
BMP280 Pressure SensorBosch's barometric pressure and temperature sensor, 300 to 1100 hPa at ±0.12 hPa relative accuracy, over I2C or SPI.
DHT11 Temp & Humidity SensorA low-cost digital humidity and temperature sensor that reports whole-number readings over one data wire, once every 2 seconds.
FC-51 IR Obstacle SensorAn infrared reflection switch whose OUT pin goes LOW when something comes within reach, rated 2 to 30 cm.
GY-271 Compass (QMC5883L)A 3-axis magnetometer compass module on QST's QMC5883L, ±8 gauss range and 1° to 2° heading accuracy over I2C.
HW-038 Water Level SensorA cheap analog water sensor whose output voltage rises as more of its exposed traces go under water.
HX711 Load Cell AmplifierA 24-bit ADC with a gain-128 amplifier, built to read load cells and turn a strain gauge bridge into a digital scale.
INA219 Current SensorA high-side current, voltage and power monitor over I2C: up to 26 V and ±3.2 A on the common 0.1 Ω module.
INMP441 I2S MicrophoneA 3.3 V MEMS microphone that sends 24-bit digital audio straight to an ESP32 or STM32 over I2S, no ADC or codec needed.
IR Receiver Module (VS1838B)A three-pin 38 kHz infrared receiver board that turns TV-remote button presses into clean digital pulses.
KY-026 Flame SensorAn infrared flame detector with an analog level output and a digital alarm output set by a potentiometer.
KY-038 Sound SensorA microphone module with a raw analog output and a digital output that trips on loud sounds such as claps.
LM35 Temperature SensorA precision analog temperature sensor that outputs 10 mV per °C, calibrated directly in Celsius.
LM393 Flame Sensor (3-pin)A digital-only infrared flame detector: its DO pin goes LOW when a flame is in view.
Load Cell (Straight Bar)A straight bar strain gauge load cell that outputs 1.0 mV per volt of excitation at its rated capacity, read through an HX711.
MAX30102 Pulse OximeterA pulse oximeter and heart-rate sensor: red and infrared LEDs, a photodetector and an 18-bit ADC behind one window, read over I2C.
NTC Thermistor (10kΩ)A 10 kΩ NTC thermistor, B = 3950 K, whose resistance falls as it warms: the cheapest way to read temperature on an analog pin.
SW-520D Tilt SwitchA two-lead, mercury-free ball switch that is closed while it stands upright and opens when it tips over.
TCRT5000 IR Line SensorA reflective infrared line sensor that tells white from black a few millimetres above a surface.
TMP36 Temperature SensorA low-voltage analog temperature sensor with a 0.5 V offset, so it reads below freezing on a single supply.
ADXL345An Analog Devices 3-axis digital accelerometer breakout with ±2 g to ±16 g ranges, read over I2C or SPI, for tilt, motion, tap and free-fall detection.
AHT20A low-cost Aosong AHT20 breakout that reads relative humidity and temperature over I2C at the fixed address 0x38.
BMP180A Bosch BMP180 breakout that measures barometric pressure and temperature over I2C, for weather stations and altimeters.
BNO055A Bosch 9-axis absolute orientation sensor breakout that fuses accelerometer, gyroscope and magnetometer data on chip and outputs heading, Euler angles and quaternions over I2C.
HTU21DA TE Connectivity (MEAS) HTU21D-F breakout that reads relative humidity and temperature over I2C at the fixed address 0x40.
ICM-20948A TDK InvenSense 9-axis IMU breakout (accelerometer, gyroscope and AK09916 magnetometer) read over I2C or SPI, for orientation, heading and motion tracking.
LIS3DHAn ST ultra-low-power 3-axis accelerometer breakout with ±2 g to ±16 g ranges, tap and free-fall interrupts and three auxiliary ADC inputs, read over I2C or SPI.
MAX31855A K-type thermocouple amplifier breakout with cold-junction compensation that reports -200 °C to +1350 °C in 0.25 °C steps over read-only SPI, with open and short fault detection.
MAX31865An RTD-to-digital converter breakout for PT100 and PT1000 platinum temperature probes in 2-, 3- or 4-wire setups, read over SPI with fault detection.
MAX4466An electret microphone breakout with a MAX4466 op-amp and a gain trimmer (25x to 125x), giving an analog audio signal centred on half the supply.
MAX6675A K-type thermocouple amplifier module that measures 0 to 1024 °C in 0.25 °C steps and reports it over a read-only SPI interface.
MAX9814An electret microphone breakout with the MAX9814 amplifier and automatic gain control, giving an analog audio signal of about 2 Vpp on a 1.25 V bias.
MH-Z19BA Winsen NDIR carbon dioxide sensor module that reports CO2 from 0 to 5000 ppm over UART, PWM or an analog voltage.
MLX90614A Melexis non-contact infrared thermometer on a GY-906 breakout that reads an object's temperature from -70 °C to +380 °C over I2C (SMBus).
MQ-135A tin-dioxide gas sensor module that reacts to ammonia, benzene-type vapours, smoke and other pollutants, giving an analog voltage and a threshold output for air quality alarms.
PMS5003A Plantower laser particle sensor with a built-in fan that reports PM1.0, PM2.5 and PM10 mass concentrations and particle counts over a 9600 baud serial link.
SGP30A Sensirion metal-oxide gas sensor breakout that reports total VOC (TVOC) in ppb and an equivalent CO2 (eCO2) in ppm over I2C, for indoor air quality monitors.
SHT31A Sensirion SHT31 breakout that reads relative humidity and temperature over I2C with ±2 %RH and ±0.2 °C typical accuracy.
SHT40A Sensirion SHT40 (SHT4x family) breakout that reads humidity and temperature over I2C with ±1.8 %RH and ±0.2 °C typical accuracy at microamp currents.
TCS34725An RGB and clear light colour sensor breakout with an IR-blocking filter and an on-board white LED, read over I2C, for colour detection and light measurement.
TSL2591A high dynamic range ambient light sensor breakout with separate full-spectrum and infrared channels, read over I2C as lux.
VL53L1XAn ST time-of-flight laser distance sensor on a carrier board that measures up to 4 m at up to 50 Hz over I2C.