- What is a Sensor?
- A sensor is a device that converts information from the physical world into an electrical signal.
- Example: An LDR (Light Dependent Resistor) changes resistance depending on light intensity.
- How Sensors Connect to Microcontrollers
- Sensors send signals to microcontrollers using:
- Analog output — a continuous range of values (e.g., temperature).
- Digital output — only HIGH or LOW signals (e.g., motion detected or not).
- Connection is made via input pins on the Arduino or Raspberry Pi Pico.
- Sensors send signals to microcontrollers using:
- Types of Sensors and Their Uses
|
Sensor Type |
Example Sensor |
What It Detects |
Common Uses |
|
Light Sensor |
LDR |
Light intensity |
Automatic lights, camera brightness control |
|
Gas Sensor |
MQ-2 |
Smoke, LPG, methane |
Smoke alarms, air quality monitoring |
|
Motion Sensor |
PIR sensor |
Movement of warm objects (like humans) |
Burglar alarms, automatic doors |
|
Infrared Sensor |
IR module |
Infrared light (heat or remote signals) |
TV remote detection, obstacle detection in robots |
|
Temperature Sensor |
LM35, DHT11 |
Heat level in the air |
Weather stations, fan control |