
15 Sensors for Arduino Functions and Examples
15 Sensors for Arduino Functions and Examples include Color Sensor (TCS3200), Air Pressure Sensor (BMP180/BMP280), Pulse/Heartbeat Sensor (Pulse Sensor), Gas Sensor (MQ-135), Temperature Sensor (LM35/DS18B20), Sound Sensor (LM393 Module), Flame Sensor (Infrared Receiver Module, Touch Sensor (TTP223), Passive Infrared Sensor (PIR), Accelerometer (ADXL345), Ultrasonic Sensor (HC-SR04), Humidity Sensor (DHT11/DHT22), Infrared Sensor (IR), Photoresistor (LDR), Magnetometer (HMC5883L).
Here are 15 sensors suitable for Arduino and their detailed introduction, covering functional principles, application scenarios and typical project examples:
Color Sensor (TCS3200)

Color Sensor (TCS3200)
- Function: Detect visible light color through RGB sensor chip and output frequency signals proportional to red, green and blue components.
- Application: Color classification, ambient light analysis, art installation.
- Sample Project: Use TCS3200 and Arduino to build an RGB color detector and display color values in real time.

TCS3200 Color Recognition Sensor-Color Recognition Sensing Module
Barometric Pressure Sensor (BMP180/BMP280)
- Function: Measure atmospheric pressure (range 300-1100hPa) and temperature, and support altitude calculation.
- Application: Weather station, altimeter, GPS navigation assistance.
- Sample Project: Combine BMP180 and Arduino to make an electronic barometer to display real-time pressure and altitude data.
Pulse Sensor
- Function: Detect heart rate through the principle of photoelectric reflection and output analog signals.
- Application: Health monitoring, sports bracelet, biofeedback device.
- Sample Project: Use Arduino and Pulse Sensor to display heart rate (BPM) in real time and draw pictures through the serial port.
Gas Sensor (MQ-135)
- Function: Detect air quality, sensitive to NH₃, NOₓ, alcohol, smoke, etc.
- Application: Indoor air monitoring, factory safety warning, alcohol detector.
- Sample project: Smoke concentration alarm based on MQ-135 and Arduino, triggering buzzer when exceeding the standard.

MQ135 Gas Sensor
Temperature sensor (LM35/DS18B20)
- Function:
- LM35: Output voltage proportional to Celsius temperature (10mV/℃).
- DS18B20: Digital output, supports multi-point temperature measurement, accuracy ±0.5℃.
- Application: Environmental temperature monitoring, constant temperature control system.
- Sample project: Use LM35 and Arduino to make a digital thermometer, LCD displays real-time temperature.
Sound sensor (LM393 module)
- Function: Detect environmental sound intensity, adjust the trigger threshold through the potentiometer.
- Application: Decibel meter, noise monitoring, music interactive device.
- Example Project: Combine Arduino and LCD display to make a decibel meter to display the sound intensity level in real time.

Touch Sensor Sensor Functions and Examples for Arduino
Flame Sensor (Infrared Receiver Module)
- Function: Detect 700-1000nm wavelength infrared light with adjustable sensitivity.
- Application: Fire alarm, industrial safety monitoring.
- Example Project: Use flame sensor and Arduino to build a fire detector, and trigger an alarm when a flame is detected.
Touch Sensor (TTP223)

TTP223 sensor
- Function: Capacitive sensing touch or proximity, no physical contact required.
- Application: Touch switch, smart home appliance control.
- Example Project: Touch-controlled bulb based on TTP223 and Arduino, touch to switch the switch state.

Touch Sensor (TTP223)
Passive Infrared Sensor (PIR)
- Function: Detect infrared rays radiated by human body or objects, and output digital signals.
- Application: Automatic door, security alarm, night lighting control.
- Example Project: Use PIR sensor and Arduino to make a nighttime home security alarm, send notifications when motion is detected.
Accelerometer (ADXL345)
- Function: Three-axis acceleration measurement, supports static gravity detection and dynamic vibration analysis.
- Application: Motion monitoring, earthquake detection, game controller.
- Example Project: Combine ADXL345 and Arduino to make an earthquake alarm, trigger an alarm when severe vibration is detected.
Ultrasonic Sensor (HC-SR04)
- Function: Distance measurement by ultrasound (range 2-400cm), accuracy ±3mm.
- Application: Obstacle avoidance robot, liquid level detection, parking assistance.
- Example Project: Use HC-SR04 and Arduino to make a blind cane, detect obstacles and vibrate feedback.

Ultrasonic Sensor (HC-SR04)
Humidity Sensor (DHT11/DHT22)
- Function:
- DHT11: Basic type, accuracy ±5%RH, measurement range 20-90%RH.
- DHT22: High precision, accuracy ±2%RH, measurement range 0-100%RH.
- Application: Weather station, agricultural irrigation, indoor environment monitoring.
- Example project: Real-time temperature and humidity monitoring system based on DHT22 and Arduino, data uploaded to the cloud.
Infrared sensor (IR)
- Function: Transmit/receive infrared light, detect the presence of objects or measure rotation speed (RPM).
- Application: Automatic door, tachometer, infrared remote control.
- Example project: Use IR sensor and Arduino to make a digital tachometer to display motor speed.

Infrared sensor (IR)
Photoresistor (LDR)
- Function: Resistance value changes with light intensity (up to 1MΩ in dark places and down to a few ohms in bright places).
- Application: Automatic lighting control, light intensity monitoring, photography metering.
- Example project: Combine LDR and Arduino to make a light-controlled switch to automatically adjust the LED brightness according to the ambient light.
Photoresistor (LDR) – Photoresistor Sensor – China Sensor Manufacturer
Magnetometer (HMC5883L)
- Function: Three-axis magnetic induction measurement, supporting electronic compass and direction detection.
- Application: Navigation system, attitude correction, virtual reality.
- Sample project: Use HMC5883L and Arduino to make an electronic compass to display the current azimuth angle.

Magnetometer (HMC5883L)
Sensor selection suggestions
- Accuracy requirements: If high-precision temperature measurement is required, DS18B20 or PT100 is preferred; LM35 can be used for general environmental monitoring.
- Communication interface: Digital sensors (such as DHT22) directly output digital signals to simplify wiring; analog sensors (such as LDR) require ADC conversion.
- Environmental adaptability: Waterproof sensors (such as SHT2x) are recommended for industrial scenarios, and wide temperature range models are selected for outdoor applications.
The above sensors are all compatible with Arduino, and data can be read through the analogRead()
or digitalRead()
function. Combined with library files (such as DHT.h, Wire.h), projects can be developed quickly.