STEP 1 / 6ARDUINO

Automatic Room Light Controller with Bidirectional Visitor Counter

Counter We can often find visitor counters in stadiums, malls, offices, and class rooms. What do they do with the lights when nobody is present? How do they turn them on or off? Using Ard…

Circuit Atlas themed schematic for Automatic Room Light Controller with Bidirectional Visitor Counter
PROJECT#374
TRACKArduino
PARTS06
STAGES06
STEP 1 / 6 · Overview

Know the mission before touching a wire.

Understand what you are making, prepare the right tools, and make the workbench safe.

01

Project details

Automatic Room Light Controller with Bidirectional Visitor Counter is a arduino project. Counter We can often find visitor counters in stadiums, malls, offices, and class rooms. What do they do with the lights when nobody is present? How do they turn them on or off? Using Ard…

Source pages
797-801
Named parts
6
Build goal
Working, tested prototype
02

Tools you need

  • Digital multimeter
  • Wire stripper and side cutters
  • Soldering iron with a fine tip
  • Current-limited bench supply
  • Computer with a data-capable USB cable

Use eye protection, good lighting, and a clean insulated surface throughout the build.

03

Safety precautions

  • Disconnect every power source before changing a connection.
  • Check component polarity, pinout, and supply voltage twice.
  • Use a current limit for the first power-up.
  • Keep liquids, loose metal, and uninsulated wires away from the bench.
Ready to continue?
STEP 2 / 6 · Parts library

Gather, identify, and understand every part.

Use the standardized inventory, then open What's this? to learn each part's role, advantages, limitations, handling, and specifications.

NAMED PROJECT INVENTORY6 PART LINES
PARTTYPEQTYREADY
MArduino UnoMODULE1
What's this?Image, role, pros, cons, handling & specifications
Circuit Atlas themed schematic for Automatic Room Light Controller with Bidirectional Visitor CounterMODULE LEARNING VIEW

Arduino Uno

A programmable controller that reads inputs, makes decisions, and drives the project's outputs.

What it does here

It is the control centre and must use the documented board, pin map, supply, and logic level.

Buy / compare this part

Advantages

  • Reprogrammable and reusable
  • Large learning ecosystem
  • Complex behaviour remains changeable

Limitations

  • GPIO voltage and current are limited
  • Some pins affect boot or communication
  • Loads normally need a driver

Handling

  • Disconnect power before rewiring
  • Avoid static discharge
  • Never power motors, relays, or pumps directly from GPIO

Specifications to verify

  • Use the exact model, value, package, and rating listed for Arduino Uno; similar-looking parts are not always interchangeable.
  • Confirm operating voltage, logic level, pinout, memory, USB interface, and maximum GPIO current.
MLCD displayMODULE1
What's this?Image, role, pros, cons, handling & specifications
Circuit Atlas themed schematic for Automatic Room Light Controller with Bidirectional Visitor CounterMODULE LEARNING VIEW

LCD display

An output component turns an electrical control signal into light, sound, motion, switching, or displayed information.

What it does here

It presents the circuit result or acts on the physical world.

Buy / compare this part

Advantages

  • Makes system state visible
  • Can be tested separately
  • Supports clear troubleshooting

Limitations

  • Loads may exceed controller current
  • Polarity or driver direction can matter
  • Inductive loads create voltage spikes

Handling

  • Use the documented driver stage
  • Check polarity and load current
  • Add flyback protection for inductive loads

Specifications to verify

  • Use the exact model, value, package, and rating listed for LCD display; similar-looking parts are not always interchangeable.
  • Confirm voltage, current, polarity, interface, driver requirements, and duty cycle.
PPotentiometerPART1
What's this?Image, role, pros, cons, handling & specifications
Circuit Atlas themed schematic for Automatic Room Light Controller with Bidirectional Visitor CounterPART LEARNING VIEW

Potentiometer

A named project component whose exact role is defined by the source circuit and build guide.

What it does here

It performs a documented electrical, control, interface, or construction function in this project.

Buy / compare this part

Advantages

  • Selected for this project
  • Can be checked independently
  • Supports modular troubleshooting

Limitations

  • Substitutes may differ
  • Generic names can hide variants
  • Pinouts and ratings vary

Handling

  • Compare the received part with the source
  • Keep it labelled
  • Do not force connectors or adjusters

Specifications to verify

  • Use the exact model, value, package, and rating listed for Potentiometer; similar-looking parts are not always interchangeable.
  • Confirm dimensions, ratings, connection method, polarity, and environmental limits.
MIR sensorMODULE1
What's this?Image, role, pros, cons, handling & specifications
Circuit Atlas themed schematic for Automatic Room Light Controller with Bidirectional Visitor CounterMODULE LEARNING VIEW

IR sensor

A sensor converts a physical condition into an electrical signal the circuit can measure.

What it does here

It provides project input as an analogue, digital, resistive, frequency, or calibrated signal.

Buy / compare this part

Advantages

  • Adds real-world awareness
  • Can usually be tested independently
  • Often supports calibration

Limitations

  • Readings can drift
  • Placement affects results
  • Some sensors need warm-up or calibration

Handling

  • Protect the sensing surface
  • Observe supply voltage and polarity
  • Keep signal leads away from noisy power wiring

Specifications to verify

  • Use the exact model, value, package, and rating listed for IR sensor; similar-looking parts are not always interchangeable.
  • Confirm supply range, output type, measurement range, accuracy, response time, and pin order.
SBC547SEMICONDUCTOR1
What's this?Image, role, pros, cons, handling & specifications
BC547 NPN transistorSEMICONDUCTOR LEARNING VIEW

BC547

A semiconductor stage performs switching, amplification, regulation, rectification, or logic.

What it does here

It controls current or signal flow at a defined point in the circuit.

Buy / compare this part

Advantages

  • Fast and efficient
  • Compact
  • Can control larger loads from smaller signals

Limitations

  • Pin order varies
  • Sensitive to overvoltage and reverse polarity
  • May need cooling or bias components

Handling

  • Verify the datasheet pinout
  • Avoid static and soldering heat
  • Check notch, stripe, or flat-face orientation

Specifications to verify

  • Use the exact model, value, package, and rating listed for BC547; similar-looking parts are not always interchangeable.
  • Confirm pinout, maximum voltage/current, dissipation, gain or forward voltage, and package.
SLM358SEMICONDUCTOR1
What's this?Image, role, pros, cons, handling & specifications
LM358 dual operational amplifierSEMICONDUCTOR LEARNING VIEW

LM358

A semiconductor stage performs switching, amplification, regulation, rectification, or logic.

What it does here

It controls current or signal flow at a defined point in the circuit.

Buy / compare this part

Advantages

  • Fast and efficient
  • Compact
  • Can control larger loads from smaller signals

Limitations

  • Pin order varies
  • Sensitive to overvoltage and reverse polarity
  • May need cooling or bias components

Handling

  • Verify the datasheet pinout
  • Avoid static and soldering heat
  • Check notch, stripe, or flat-face orientation

Specifications to verify

  • Use the exact model, value, package, and rating listed for LM358; similar-looking parts are not always interchangeable.
  • Confirm pinout, maximum voltage/current, dissipation, gain or forward voltage, and package.
Ready to continue?
STEP 4 / 6 · Source code

Confirm the hardware-only control path.

This project does not include firmware in the source. The circuit itself provides the required behaviour.

01

How to connect

  1. Match every controller label to the circuit view and source pin map.
  2. Join grounds before signal wires when separate low-voltage supplies are used.
  3. Keep motors, relays, pumps, and other loads on a suitable driver and external supply.

Common mistakes

Reversed VCC/GND, board-label versus GPIO-number confusion, missing common ground, and charge-only USB cables.

Troubleshoot

Disconnect loads, continuity-test one path at a time, then test with a current limit.

02

Software preparation

No IDE, board package, library, or firmware upload is required for this project.

If you add a programmable controller as an extension, document its pin map separately.

03

How to upload code

The original design is implemented entirely in hardware, so proceed after verifying the circuit and supply.

Ready to continue?
STEP 5 / 6 · Build

Assemble, deploy, test, and troubleshoot.

Use the complete source notes in build order, then pass the final checks before calling the project finished.

ASSEMBLY

Build in functional stages

  • Power and regulation
  • Controller or processing stage
  • Inputs and sensors
  • Outputs and loads
  • Enclosure and strain relief
TEST

Power up safely

  • Inspect unpowered continuity first
  • Apply the lowest safe current limit
  • Measure supply rails before signals
  • Add one load at a time
  • Record expected and actual results
TROUBLESHOOT

Work from simple to complex

  • Confirm power, ground, polarity, and orientation
  • Compare each pin with the source
  • Test inputs separately from outputs
  • Replace only one variable at a time
  • Power off before every correction
PROJECT-SPECIFIC BUILD NOTES

Follow the documented instructions.

These notes come from this project's source and remain in their original order.

01

Project overview

Project build note

Counter We can often find visitor counters in stadiums, malls, offices, and class rooms. What do they do with the lights when nobody is present? How do

they turn them on or off? Using Arduino Uno, we have developed an automatic light control project that also tallied visitors in the room in a bidirectional manner. There is a lot of fun and learning to be had with the project for hobbyists and students. Components Arduino UNO Relay (5v) Resisters IR Sensor module 16x2 LCD display Bread Board Connecting Wires Led BC547 Transistor This project uses Arduino to interface sensors, motors, and other components with a visitor counter. This counter can count people in both directions. You can use this circuit to count who enters a building, mall, home, or office. By incrementing the count when a person exits the hall, the number of persons left the hall can be counted. Sensors as well as gates of parking areas are examples of other public places where sensors can be used. And it depends on where they are placed in the mall/hall. Sensors, controllers, counter displays and gates comprise the four parts of this project. An interruption would be detected by the sensor, and its input would be used by the controller to increase or decrease the counter based on whether a person entered or exited. A 16x2 LCD screen displays the counting through the controller.

We set a delay for the other sensor so that it won't work if the IR sensor is interrupted by an object present in the room.

02

Circuit Explanation

Project build note

A visitor counter circuit consists of the following sections: sensors, controls, displays, and drivers. Sensor section: Two IR sensor modules with LED's, potentiometers, comparators (Op-Amps), and IR diodes were used in this chapter. Infrared sensors sense objects and cause a change in voltage at the comparator's second terminal. A potentiometer is used to measure voltage at the comparator's first terminal. This is then compared with the output voltage by the comparator and a digital signal resulted. Here in this circuit, two sensors are being compared using two comparators. A comparison is performed with LM358. LM358 has two Op-amps built into it. Control Section: Throughout the process of this visitor counter project, Arduino UNO is being utilized. A digital pin 14 and a digital pin 19 are connected to the outputs of comparators. A relay driver circuit drives a relay

by sending commands to Arduino from the LED control circuit. You can learn how to operate a relay with Arduino with this tutorial if you are having problems working with relay. Display section: A 16x2 LCD screen is provided in the display section. During this time the number of people will be counted and the lighting status will be shown. Suitable relay driver/section: The relay driver section consists of a BC547 transistor and a 5-volt relay used to control the light bulb. Since the Arduino will not supply enough current and voltage to operate the relay, a transistor is used instead. Our relay driver circuit was added to provide enough voltage and current to work the relay. This transistor drives a relay connected to the Arduino and turns the light on/off accordingly. Visitor Counter Circuit Diagram The pins 14 (A0) and 19 (A5) of the Arduino digital board interface directly with the outputs of IR sensors. At digital pin 2, there is a Relay driver transistor. A four-bit LCD is connected. In the LCD, the clock and data pins are connected directly to pins 13 and 12. A direct connection is made also between the Arduino D11-D8 and LCD pin D4-D7 respectively.

Additionally, this project can be equipped with a GSM modem so that the operation can be controlled remotely by SMS. This would allow the equipment to know the status and to be adjusted accordingly. Using simple microcontrollers to design an automatic room controller is the subject of this article. Therefore, it would be wise to implement this type of home automation system for energy savings.

Ready to continue?
PROJECT ACHIEVED

You built Automatic Room Light Controller with Bidirectional Visitor Counter.

You followed the full workflow from understanding the mission to testing the finished project. That is a real engineering achievement - well done.

Electronic Voting Machine using Arduino project thumbnail featuring Arduino Uno, LCD display, Push button
NEXT ARDUINO ADVENTURE

Electronic Voting Machine using Arduino

Ready to reuse what you learned in another project from the same track?

Start this project
Browse all 500 projects