🚀
ArkyEdu GLOSAR TIC
RO Practice Lab
Robotics & Arduino IoT Grade 8 RO Term: Senzori Smart Home: PIR (Mișcare), MQ-2 (Gaz/Fum) și DHT11

Smart Home Sensors: PIR Motion, MQ-2 Gas & DHT11

💬 Share on WhatsApp
📌 Quick Definition (Answer-First)

School Smart Home projects typically pair three sensors with Arduino: the PIR (Passive Infrared) motion detector, the MQ-2 gas/smoke analog sensor, and the DHT11 temperature & humidity sensor.

How It Works & Why It Matters

A PIR sensor outputs a clean digital HIGH when warm motion enters its Fresnel lens dome.

The MQ-2 outputs a continuous analog value (0–1023 on A0) and requires ~20–30 seconds of warm-up before stabilizing.

💻 Smart Home Sensor Logic
int motion = digitalRead(pirPin);   // HIGH when person detected
int gasLevel = analogRead(A0);      // Alert threshold e.g. > 400
if (gasLevel > 400) tone(buzzerPin, 1000);

🏫 Classroom Example

Combine a PIR sensor with an LDR light sensor so hallway LEDs only light up when someone walks by at night.

⚖️ DO (Digital Out) vs. AO (Analog Out)

DO outputs binary 0/1 based on the onboard potentiometer; AO delivers the full 0–1023 measurement to Arduino.

⚠️ Common Mistake in Exams & Homework

Testing an MQ-2 immediately in the first second or cranking the PIR time-delay knob to maximum so it stays stuck HIGH for 5 minutes.

❓ Quick Questions & Answers

What does PIR stand for?
Passive Infrared—it senses changing infrared heat signatures rather than emitting waves.

Related Glossary Terms

← Back to Full Glossary (A–Z)