
Sensors & Electronic Components
Complete range of sensors and components for Arduino, Raspberry Pi, and microcontroller projects. Temperature, motion, pressure, gas, biometric, and specialized sensors.
The Complete Guide to Electronic Sensors
Sensors are the eyes, ears, and touch of electronic projects - they allow microcontrollers and computers to perceive and interact with the physical world. From simple temperature readings to complex environmental monitoring, sensors transform physical phenomena into electrical signals that our projects can process, analyze, and respond to. Understanding sensors is fundamental to building interactive, intelligent systems.
What Are Sensors and How Do They Work?
Sensors are transducers - devices that convert one form of energy into another. In electronics, sensors typically convert physical quantities (temperature, light, pressure, motion) into electrical signals (voltage, current, resistance, digital data) that microcontrollers can read and interpret. This enables autonomous systems, data logging, and responsive environments.
Sensor Output Types:
Analog Output
Continuous voltage signal (0-5V or 0-3.3V) proportional to measured value. Requires ADC (Analog-Digital Converter) to read. Examples: thermistors, photoresistors, potentiometers.
Digital Output
Binary HIGH/LOW signals or digital protocols (I2C, SPI, UART). More accurate and noise-resistant than analog. Examples: DHT22, ultrasonic sensors, many modern sensors.
PWM Output
Pulse Width Modulation where duty cycle encodes value. Common in some distance sensors and servo motors. Easy to read with microcontrollers.
Essential Sensor Categories
1. Temperature & Humidity Sensors
Temperature and humidity monitoring is fundamental to countless applications - weather stations, climate control, food storage, greenhouse automation, and electronics cooling management.
DHT22 (AM2302)
The go-to sensor for beginners. Measures temperature (-40 to 80°C, ±0.5°C accuracy) and humidity (0-100%, ±2-5% accuracy). Single-wire digital interface makes it incredibly easy to use with Arduino or Raspberry Pi. Affordable and reliable.
Best for: Home automation, weather stations, basic environmental monitoring, learning projects
BME280 / BME680
Professional-grade environmental sensors. BME280 measures temperature, humidity, and barometric pressure with excellent accuracy. BME680 adds VOC (volatile organic compound) and gas sensing for air quality monitoring. I2C/SPI interface, low power consumption.
Best for: Indoor air quality monitoring, weather prediction, altitude measurement, professional installations
DS18B20 Waterproof
Digital temperature sensor in waterproof stainless steel probe. Perfect for measuring liquid temperatures, outdoor weather, soil moisture systems, and aquarium monitoring. 1-Wire protocol allows multiple sensors on single pin.
Best for: Brewing, aquaponics, pool monitoring, outdoor weather stations, water tanks
Thermocouples (K-Type, MAX31855)
For extreme temperatures (-200°C to +1350°C). Essential for industrial processes, 3D printer hotends, reflow ovens, and high-temperature applications. Requires specialized amplifier IC (MAX31855, MAX6675).
Best for: 3D printer temperature control, reflow soldering, industrial processes, kiln monitoring
2. Motion & Position Sensors
Motion detection and position sensing enable robotics, security systems, gesture control, and navigation. These sensors detect movement, orientation, distance, and spatial positioning.
PIR (Passive Infrared) Motion Sensor
Detects motion by measuring infrared radiation changes (body heat). Range typically 5-7 meters with 120° detection angle. Digital output (HIGH when motion detected). Power-efficient, perfect for battery-operated projects.
Best for: Security alarms, automatic lighting, occupancy detection, wildlife cameras, energy-saving systems
HC-SR04 Ultrasonic Distance Sensor
Measures distance (2cm to 4m) using ultrasonic sound waves - same principle as bat echolocation. Sends ultrasonic pulse, measures time until echo returns. Accurate, affordable, and easy to use. Works regardless of lighting.
Best for: Obstacle avoidance robots, parking sensors, water level monitoring, automatic doors, distance measurement
MPU6050 Gyroscope + Accelerometer
6-axis IMU (Inertial Measurement Unit) combining 3-axis gyroscope and 3-axis accelerometer. Measures rotation, tilt, acceleration, and orientation. I2C interface, built-in DMP (Digital Motion Processor) for sensor fusion. Essential for drones, robots, and wearables.
Best for: Drones, self-balancing robots, gesture control, activity trackers, tilt sensing, motion detection
GPS Module (NEO-6M, NEO-M8N)
Global Positioning System receivers providing latitude, longitude, altitude, speed, and time data. UART interface outputs NMEA sentences. NEO-M8N offers improved accuracy and faster satellite lock than NEO-6M.
Best for: GPS trackers, drones, autonomous vehicles, data logging, asset tracking, geocaching projects
Rotary Encoder
Measures rotational position and direction. Two-channel quadrature output allows detecting both position and rotation direction. Available in incremental (relative) and absolute (exact position) variants. Essential for user interfaces and motor control.
Best for: Volume controls, menu navigation, robotics, CNC machines, 3D printers, motor feedback
3. Light & Color Sensors
Light sensors enable projects to respond to ambient lighting, detect colors, measure UV exposure, and create adaptive lighting systems. From simple photoresistors to sophisticated color sensors.
LDR (Light Dependent Resistor) / Photoresistor
Simple, cheap analog sensor. Resistance decreases with increasing light. Used with voltage divider circuit. Not calibrated (arbitrary units), but perfect for detecting relative light changes. Slow response time but very reliable.
Best for: Automatic nightlights, solar panel tracking, light-activated switches, beginner projects
BH1750 Digital Light Sensor
Calibrated digital light sensor measuring in lux (standard unit of illuminance). I2C interface, 16-bit resolution, wide range (1-65535 lux). More accurate and easier to use than photoresistors. Low power consumption.
Best for: Automatic brightness control, smart lighting, photography light meters, greenhouse monitoring
TCS3200 Color Sensor
RGB color detection using photodiodes with color filters. Outputs frequency proportional to light intensity for each color channel. Can detect and differentiate colors. Requires white LEDs for illumination (often included on module).
Best for: Color sorting machines, line-following robots (color line detection), art projects, color matching
UV Sensor (GUVA-S12SD, VEML6070)
Measures ultraviolet radiation intensity. Important for sun exposure monitoring, weather stations, and safety applications. VEML6070 provides I2C digital output with UVA intensity measurement.
Best for: Sun exposure monitors, wearable UV trackers, weather stations, outdoor safety devices
4. Pressure & Force Sensors
Pressure sensors measure force, atmospheric pressure, altitude, and touch. Essential for weather prediction, altitude calculation, robotics grip detection, and user interfaces.
BMP280 / BMP180 Barometric Pressure Sensor
Measures atmospheric pressure (300-1100 hPa) and temperature. Calculate altitude with ±1 meter accuracy. I2C/SPI interface. BMP280 is newer with better accuracy and lower power consumption than BMP180. Essential for weather prediction and altitude measurement.
Best for: Weather stations, altimeters, drones (altitude hold), vertical position tracking, barometric trending
FSR (Force Sensitive Resistor)
Variable resistor that changes resistance based on applied force. Thin, flexible, easy to integrate. Not highly accurate for absolute force measurement but excellent for detecting pressure presence and relative changes. Available in various sizes and shapes.
Best for: Touch-sensitive surfaces, robot grippers, wearable pressure detection, musical instruments, gaming controllers
Load Cell + HX711 Amplifier
Precision weight measurement using strain gauge technology. Load cells generate tiny voltage changes under load; HX711 amplifies and digitizes signal. Available from grams to hundreds of kilograms capacity. Build precision scales and weight-based automation.
Best for: Digital scales, automatic feeders, inventory management, robotics, industrial automation, brewing
Capacitive Touch Sensor (TTP223)
Touch-activated switch using capacitance detection - same technology as smartphone touchscreens. No mechanical parts, long lifespan. Can work through thin non-conductive materials (plastic, glass). Digital output, very low power.
Best for: Touch buttons, capacitive keypads, modern user interfaces, moisture-proof controls, wearables
5. Gas & Air Quality Sensors
Gas sensors detect specific gases and measure air quality. Critical for safety (detecting dangerous gases), environmental monitoring, and air quality management in homes and industrial settings.
MQ Series Gas Sensors (MQ-2, MQ-135, etc.)
Affordable gas detection using heated metal oxide semiconductor. Different MQ sensors detect different gases: MQ-2 (smoke, LPG, propane), MQ-135 (air quality, CO2, ammonia), MQ-7 (carbon monoxide). Analog output, requires calibration, warm-up time ~24-48 hours for stable readings.
Best for: Gas leak alarms, air quality monitoring, safety systems, ventilation control, industrial monitoring
SGP30 / CCS811 Air Quality Sensor
Modern digital air quality sensors measuring eCO2 (equivalent CO2) and TVOC (Total Volatile Organic Compounds). I2C interface, automatic baseline calibration, low power consumption. More accurate and easier to use than MQ series for indoor air quality.
Best for: Indoor air quality monitors, smart HVAC systems, office environments, home automation, health monitoring
MH-Z19B CO2 Sensor
NDIR (Non-Dispersive Infrared) CO2 sensor providing accurate carbon dioxide measurements (0-5000ppm). Much more accurate than MQ sensors for CO2. UART interface, automatic calibration. Essential for monitoring indoor air quality and ventilation effectiveness.
Best for: Office CO2 monitoring, greenhouse optimization, classroom air quality, smart ventilation, health tracking
PMS5003 Particulate Matter Sensor
Laser-based particle counter measuring PM1.0, PM2.5, and PM10 particulate matter - critical air quality indicators. UART interface, factory calibrated. Detects dust, pollen, smoke particles. Professional-grade accuracy at affordable price.
Best for: Air purifier control, pollution monitoring, wildfire smoke detection, allergy management, industrial safety
6. Biometric & Specialized Sensors
Advanced sensors for specialized applications including biometrics, moisture detection, current monitoring, and industrial measurements. These sensors enable professional-grade projects and unique applications.
Fingerprint Sensor (R307, AS608)
Optical fingerprint scanners with onboard processing and storage (typically 120-1000 fingerprints). UART interface, simple commands for enrollment and verification. Capacitive versions (like FPC1020A) are more compact and can work through thin glass.
Best for: Security systems, access control, attendance tracking, smart locks, biometric authentication
MAX30100 / MAX30102 Heart Rate & Pulse Oximeter
Optical sensor measuring heart rate and blood oxygen saturation (SpO2) using photoplethysmography (PPG). I2C interface, integrated LEDs and photodetector. MAX30102 offers improved performance over MAX30100. Requires contact with skin.
Best for: Fitness trackers, health monitors, wearable devices, medical prototypes, sports equipment
Soil Moisture Sensor (Capacitive)
Measures soil moisture content using capacitance measurement (better than resistive versions that corrode). Analog output voltage proportional to moisture level. Waterproof sensor probe. Essential for automated irrigation and plant care.
Best for: Automatic watering systems, greenhouse automation, garden monitoring, hydroponics, agriculture
ACS712 Current Sensor
Hall effect-based AC/DC current measurement without breaking circuit. Available in 5A, 20A, and 30A variants. Analog voltage output proportional to current. Isolated measurement for safety. Essential for power monitoring and energy management.
Best for: Power monitoring, battery management, motor current sensing, energy meters, smart power strips
RFID Reader (RC522, PN532)
13.56MHz RFID/NFC reader/writer modules. RC522 is budget-friendly with SPI interface. PN532 adds NFC support and multiple interfaces (I2C, SPI, UART). Read and write RFID tags, cards, and NFC-enabled smartphones.
Best for: Access control, attendance systems, inventory tracking, contactless payments, smart locks
Sensor Integration Best Practices
Successfully integrating sensors requires understanding both hardware connections and software implementation. Follow these best practices for reliable sensor operation:
Hardware Considerations
- •Voltage Levels: Match sensor voltage (3.3V or 5V) to your microcontroller. Use level shifters if needed.
- •Pull-up Resistors: I2C requires external pull-ups (typically 4.7kΩ). Many modules include them.
- •Power Supply: Use stable, clean power. Noisy power causes erratic readings. Add decoupling capacitors.
- •Wire Length: Keep I2C/SPI wires short (<1m). Use shielded cable for analog sensors in noisy environments.
Software Best Practices
- •Libraries: Use established libraries (Adafruit, SparkFun) - they handle edge cases and timing.
- •Filtering: Apply moving average or median filtering to reduce noise in analog readings.
- •Calibration: Calibrate sensors against known references for accurate absolute measurements.
- •Error Handling: Check for sensor communication failures and handle gracefully.
Popular Sensor Projects
Weather Station
Combine DHT22, BMP280, and rain sensor to build a complete weather station. Log temperature, humidity, pressure, and rainfall. Add wireless connectivity to upload data to cloud services.
Sensors needed: DHT22, BMP280, Rain sensor, optional: UV sensor, wind speed sensor
Smart Home Automation
Use PIR sensors for motion-activated lighting, DHT22 for climate control, door/window sensors for security. Integrate with Home Assistant or Alexa for voice control.
Sensors needed: PIR, DHT22, door sensors, LDR, smoke detector
Obstacle Avoiding Robot
Build autonomous robot using ultrasonic sensors for distance measurement and obstacle detection. Add IR sensors for line following. Program navigation algorithms for maze solving.
Sensors needed: HC-SR04, IR sensors, MPU6050 (optional for stability)
Air Quality Monitor
Monitor indoor air quality with BME680, MH-Z19B CO2 sensor, and PMS5003 particulate matter sensor. Display on OLED screen with color-coded warnings. Log data for analysis.
Sensors needed: BME680, MH-Z19B, PMS5003, OLED display
Automated Garden System
Use soil moisture sensors to trigger automatic watering when soil is dry. Add light sensors for sun exposure monitoring. DHT22 tracks temperature and humidity for optimal growing conditions.
Sensors needed: Capacitive soil moisture, DHT22, BH1750, water level sensor
Biometric Security System
Combine fingerprint sensor with RFID reader for multi-factor authentication. Add door sensor and alarm. Log access attempts with timestamps. Integrate with smartphone notifications.
Sensors needed: R307 fingerprint, RC522 RFID, magnetic door sensor, buzzer
Frequently Asked Questions
What's the difference between analog and digital sensors?
Analog sensors output continuous voltage signals (0-5V) that microcontrollers read through ADC (Analog-Digital Converter). Digital sensors process data internally and communicate via protocols (I2C, SPI, UART), providing more accurate, noise-resistant readings. Digital sensors are generally easier to use but slightly more expensive.
How do I choose between I2C, SPI, and UART sensors?
I2C uses only 2 wires and allows multiple sensors on same bus (using different addresses) - great for many sensors in compact projects. SPI is faster but uses more pins. UART is simple point-to-point communication, good for GPS and serial devices. Most modern sensors offer I2C for convenience.
Why are my sensor readings unstable or noisy?
Common causes: poor power supply (use quality power source, add capacitors), long wire runs (keep I2C/SPI wires short), electromagnetic interference (route away from motors/power lines), loose connections, or sensor near heat/vibration sources. Software filtering (moving average) helps smooth readings.
Can I use 5V sensors with 3.3V microcontrollers (like Raspberry Pi)?
Many sensors work at both voltages. For sensors with 5V-only outputs, use level shifter modules or voltage dividers to protect 3.3V microcontroller inputs. Never connect 5V directly to 3.3V pins - you'll damage the microcontroller. Check sensor datasheet for operating voltage range.
How accurate are cheap sensors compared to professional ones?
Hobby sensors (DHT22, BME280) offer ±0.5-2°C accuracy - sufficient for most projects. Professional sensors cost 10-100x more for ±0.1°C accuracy needed in scientific/medical applications. For learning and home automation, affordable sensors are excellent. Calibration against known references improves accuracy.
What sensors do I need for a complete weather station?
Essential: DHT22 or BME280 (temperature, humidity, pressure), rain sensor, and anemometer (wind speed). Optional additions: wind direction sensor, UV sensor, light sensor (lux), and lightning detector. Combine with data logging and wireless connectivity for professional weather monitoring.
Shop Sensors & Components
No sensor products available at the moment.
Need Help Choosing Sensors?
Our electronics experts can help you select the right sensors for your project, recommend compatible components, and provide integration guidance.
Contact Our Sensor Experts