Reference no: EM133853512
Advanced Sensors
Exercise 1: Smart Motion Detection System with Dynamic LED Control, Serial Monitoring, and Data Logging
In this exercise, you will use Arduino to build a motion sensor light circuit. A motion sensor light circuit is a system where a light turns on when motion is detected. This exercise focuses on developing an automatic room light mechanism using an Arduino board and a PIR sensor.
Components and working:
Use Arduino to assemble the following components in your circuit and develop codes to perform the tasks specified below.
Add the following components to the circuit and develop codes to perform the following tasks:
1. PIR sensor: PIR sensor detects a human being moving around within approximately 2m from the sensor. Develop a schematic and code for the PIR sensor that displays the output on the serial port.
2. Imagine a smart home security system where lights dynamically respond to motion, offering both alert signals and visual indicators based on activity levels. Your goal is to simulate such a system by programming the Arduino to control LEDs based on motion detection.
a. Motion-based LED control:
Program the Arduino so that:
• The RED LED turns ON when the PIR sensor detects motion.
• The GREEN LED turns ON when no motion is detected.
• The ON period for each LED should last for 1000 milliseconds (1 seconds).
b. Advanced motion counting and dynamic control:
Implement a counter in your Arduino code to track the number of times motion is detected. Based on the count:
• If motion is detected less than 3 times, the RED LED should blink twice rapidly (200ms ON, 200ms OFF).
• If motion is detected 3 times or more, the RED LED should stay ON continuously.Reset the counter to zero if no motion is detected for 10 seconds. Demonstrate this functionality in the video submission. Book assignment help service now!
3. Enhance the motion detection system by implementing a countdown and status reporting on the Arduino serial monitor. When the RED LED is ON, display a countdown from 6 to 0 with a 500 ms interval, including a timestamp for each step. Show status messages such as "Motion Detected - Countdown: X" during the countdown and "No Motion Detected - System Idle" when the GREEN LED is ON. Track the number of motion detections, and if motion is detected 5 or more times continuously without inactivity for 2 minutes, the RED LED should blink continuously with the message "High Activity Detected! Take Action!" displayed after each countdown cycle. Modify Part 2's inactivity condition so that the counter no longer resets automatically after 10 seconds. Instead, the counter should only be reset manually by typing ‘R' on the serial monitor, displaying "Manual Counter Reset" when triggered.