🪔 Diwali Break: Orders placed now will ship from 25th November 2026. Place your order today — we'll get it to you right after we're back!
Project Hub /Artificial Intelligence & Edge ML/License Plate Recognition (ANPR)/Automatic Lighting System using Arduino
Automatic Lighting System using Arduino
Intermediate
ARDUINO
Project Specific
3 – 6 Hours
Partial Kit

Automatic Lighting System using Arduino

An automatic washroom lighting system built using an Arduino Uno and IR sensors that detects entry and exit to switch AC mains lights on and off.

Originally published on ElectronicsForU
View original tutorial

Parts You'll Need

This project is sourced from another site, not written by us — this list is our best match of their components against what we stock, not a verified bill of materials. Always check the original blog (linked above) for the actual parts list before buying.

We don't carry yet: Transistors (BC547 / 2N2222 / TIP / MOSFET)

Browse all components

How It Works

Why Build This

Design an embedded directional counting algorithm using basic digital sensors to track real-time room occupancy for energy conservation.
Implement low-voltage microcontroller logic to safely switch higher-power AC loads via transistor-driven electromechanical relays.
Develop practical undergraduate-level systems integration skills applicable to smart campus and smart building automation.

Real-World Application

Automated home lighting, energy conservation in public restrooms, smart home automation.

Skills You'll Learn

digital sensor interfacing
transistor switching circuits
relay control logic
directional occupancy tracking
embedded firmware state management

Safety Precautions

Exercise extreme caution when working with 230V AC mains supply connected to the relay.

Technology Tags

ARDUINO
IR SENSOR
RELAY
TRANSISTOR
AUTOMATION
SENSORS
HOME AUTOMATION

Frequently Asked Questions

The Arduino Uno digital pins output 5V but can only source a limited amount of current (around 20mA), which is not enough to power the electromagnetic coil inside a 5V relay. The BC547 NPN transistor acts as a switch and current amplifier, allowing the small Arduino signal to control the larger current required by the relay.
By placing the two sensors sequentially along a path, the microcontroller can read which sensor triggers first. If Sensor A triggers before Sensor B, someone is entering; if Sensor B triggers before Sensor A, someone is exiting, allowing the system to accurately increment or decrement an internal counter.
Yes, the electromechanical relay acts as an electrically isolated physical switch that can break or complete the AC mains circuit for a standard light bulb, but extreme caution must be taken when wiring high-voltage AC mains.

Gallery

This page is part of Kitkraft's Project Hub — a curated collection of electronics & robotics projects gathered from the maker community to help students and hobbyists discover and learn to build. Kitkraft does not claim authorship of the original project, and makes no representation as to the accuracy, completeness or safety of third-party source material. The summary and "How It Works" explanation above are AI-generated, rewritten with reference to the original tutorial — not a reproduction of it. Full credit and a direct link to the original source are provided above. If you're the original creator and have a concern about how your work is represented here, please contact us and we'll address it promptly.

Kitkraft Project Hub — curated from the maker community, credited at the source.
PRJ-00346