Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

Motion-Activated LED (Ultrasonic Sensor)

This project uses an ultrasonic sensor to detect nearby objects and turn on an LED when something comes within a certain distance.

📌 How It Works

The system continuously measures distance using the ultrasonic sensor:

  • If an object is detected within 100 cm, the LED turns ON
  • If no object is nearby, the LED stays OFF

This simulates a motion-activated light system, although it is based on distance detection rather than true motion sensing.


🧰 Components Used

  • Arduino Uno
  • Ultrasonic Sensor (HC-SR04)
  • LED
  • Resistor (220Ω recommended)
  • Jumper wires
  • Breadboard

🔌 Circuit Connections

Ultrasonic Sensor:

  • VCC → 5V
  • GND → GND
  • TRIG → Pin 2
  • ECHO → Pin 3

LED:

  • Anode (+) → Pin 4 (through resistor)
  • Cathode (−) → GND

⚠️ Notes

  • The ultrasonic sensor measures distance, not actual motion

  • Detection range depends on environment and obstacles

  • You can adjust sensitivity by changing this line:

    if(distance < 100)

🚀 Future Improvements

  • Add a buzzer for alerts
  • Reduce delay for faster response
  • Use a PIR sensor for true motion detection
  • Add an LCD display to show distance

📷 Project Image

Magnificent Fyyran (1)

👨‍💻 Author

Richard Aldo Makendi

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages