shubham.
Resume ↗

Room Activity Sensing

Occupancy-responsive lighting with PIR motion detection and microcontroller-driven relay control.

2023

HC-SR501 · Motion input, control state and lighting output.

Motion-responsive lighting

An HC-SR501 PIR sensor supplies a motion signal to an Arduino Uno. The controller maps that input to a relay state controlling the light, connecting room activity directly to the switching decision.

Technology and role

Scroll horizontally to compare.

Technology and role
ComponentRole
HC-SR501 PIRDetect motion and supply a digital input.
Arduino Uno · C++Read the input and select the lighting state.
5 V relay · lightTranslate the control signal into the switched lighting output.

State transitions

  • A high PIR signal selects the active lighting state.
  • The relay module translates the controller output into the switched light state.
  • When the PIR input returns low, the included control code selects the inactive lighting state.
  • Repeated input checks connect new detections to the next control decision; the sensor event and relay output remain separate signals.

Engineering decisions and deliverables

The circuit uses a direct input-to-output state mapping, making motion detection and switching easy to trace. Relay control separates microcontroller signaling from the controlled lighting circuit. The project documentation includes the component architecture and a C++ control snippet that demonstrates the active/inactive transitions.

↑ ↓ Browse · Enter Open · Esc Close