What Even Is a Sensor? Types & Classification
Definition
A sensor is a device that detects physical quantities (temperature, light, pressure, distance) and converts them into electrical signals that Arduino can read. Think of it as Arduino's way of "sensing" the real world.
Analog vs Digital Sensors - The Real Difference
| Property | Analog Sensors | Digital Sensors |
|---|---|---|
| Output Signal | Continuous voltage (0-5V range) | Discrete values (HIGH/LOW, 0 or 1) |
| Data Transmission | Requires ADC conversion | Already digital, no conversion needed |
| Precision | Can measure ranges (0-1023) | Binary states only (ON/OFF) |
| Arduino Pins | Analog pins (A0-A5) | Digital pins (D0-D13) |
Common Sensor Types
Analog Sensors
- LDR (Light Sensor) - Measures light intensity as resistance
- Temperature Sensors - LM35, TMP36 output voltage proportional to temperature
- Potentiometer - Variable resistor for position sensing
- Moisture/Humidity Sensors - Soil moisture, DHT11
Digital Sensors
- Ultrasonic Sensors - HC-SR04 for distance measurement
- IR Sensors - Infrared object detection
- PIR Motion Sensors - Detect movement
- Push Buttons - Simple binary input