Automatic Room Light Controller with Visitor Counter and Zigbee Technology

Nowadays without electricity we cannot imagine our daily life because electricity has become a necessity for all, without which day-to-day life chores & daily activities become stand still. Due to the depletion of non-renewable resources, conservation of energy has become mandatory and by doing so we can reduce electricity bills as well. We know that energies like wind energy, solar energy and hydro energy are called renewable energy sources which are renewable in nature. Therefore, utilization of these resources for power supply is the best possible way of producing, conserving and renewing energy, which is advantageous as it is pollution free, affordable, and free from environmental impacts.

Automatic room light controller
Automatic room light controller

On the other hand, the energy resources like petroleum, coal, natural gas, uranium and propane are called non -renewable resources, because their supplies are limited. Many environmental effects and day-by-day depleting energy resources warn us to save energy by using automatic room controller and energy-efficient lighting systems. Nowadays the wastage of electricity has become a routine thing for us, and the problem has become frequent at homes, schools, and colleges and even in industries. Sometimes we notice fans and lights keep on working even in the absence of people. This often happens in homes, offices and public places due to utter negligence of the inmates.

However, there is a solution to control energy efficient lights at home by using automatic room light controller. This article provides information about such a solution of energy efficient lighting to conserve energy by optimizing home appliances such as lights, fans, etc.

Automatic Room Light Control

When we enter a room, as a habitual tendency, we often search for a switch to turn the light on, and if we are new to the room, we often find it difficult to locate the switch. Most of the times, many of us forget to switch off the lights while leaving the room in which we stay most of the time. This results in unnecessary power wastage. Therefore, an automatic room-light controller automatically turns on the lights when a person enters into a room, and turns off the lights when the person leaves the room. This automatic room controller can be implemented by using a simple microcontroller and wireless IR technologies.

Home Automation with Automatic Room Light Controller
Home Automation with Automatic Room Light Controller

Automatic Room Light Controller with a Visitor Counter

This system is designed by using two sets of IR transmitters and receivers. These IR sensors are placed in such a way that they detect a person entering and leaving the room to turn the home appliances. In this optimun energy management system, a microcontroller is the central processing unit of this project which is of 89S51 controller from the 8051 family. This system facilitates a bidirectional visitor counter for displaying the number of persons inside the room.

Automatic Room Light Controller with a Visitor Counter
Automatic Room Light Controller with a Visitor Counter

When a person enters into the room, an IR beam is obstructed between the IR transmitter and the receiver. This IR obstruction from the sensor-1 gives the corresponding signal to the microcontroller. The microcontroller is programmed in such a way that by the reception of the signal from the sensor-1 it turns on the fans and lights inside the room. Thus, the microcontroller gives command signals to a relay driver which turns the relays such that all these appliances turn on.

When the person leaves from this room, another set of IR sensors enable and give control signals to the microcontroller. Furthermore, similar to the above process, this system turns off the appliances like fans and lights. Apart from this, the system also takes account of the number of persons inside the room so that this control operation is varied depending on the persons’ availability in the room.

For every person entering and leaving the room, the microcontroller reads the digital input from two receivers, and calculates the number of persons inside the room, and then displays it on the LCD. When the persons’ count is greater than one, the microcontroller turns on the room light and when the persons’ count is zero, it turns off all the lights and fans.

Zigbee Based Automatic Operation of Room Lights and Appliance Control

This project uses Zigbee wireless technology, and it is an advanced version of the above discussed project. It can be implemented wherever the appliance control systems and the detecting circuits are placed at certain distance in meters. In this controller, the Zigbee transmitter is kept at the input side, where the detection of humans and other sensing circuitry is placed, and the receiver is placed at the control side to switch various appliances.

Zigbee wireless technology
Zigbee wireless technology

At the transmitter side, a regulated DC power drives the entire transmitting circuit wherein different sensors like IR, PIR, LDR and temperature sensors are attached to the microcontroller with a Zigbee transmitter module. Human detection is performed by IR and PIR sensors, i.e., when any object enters the IR sensor, it detects and sends the signals to the microcontroller, then the microcontroller confirms that whether the entered person is human or not with the help of PIR sensor.

Zigbee Based Automatic Operation of Room Lights
Zigbee Based Automatic Operation of Room Lights

Similarly, an LDR continuously monitors the room lighting; during the day time, enough lighting in the room doesn’t necessitates the lamps to turn on, and therefore, an LDR does this job by giving pulses to the microcontroller. Likewise, the temperature is sensed by the temperature sensors to turn the fans on. All these sensors data is collected by the microcontroller and is processed for meeting certain conditions. The microcontroller sends that control signals to zigbee transmitter that transfers the data to the receiver side for turning the lights and fans on.

At the receiver side, another microcontroller is placed as a central processing unit to control all the equipments or appliances in the room. After receiving the control signals from the transmitter section, the Zigbee receiver sends these signals to the microcontroller. The controller processes this data and sends the command signals to a relay driver that drives different relays attached to the appliances like blubs and fans. In this way, automatic operation of room lights and appliances is controlled wirelessly by a Zigbee modem.

It is also possible to add a GSM modem to this project for knowing the status of the equipment and to control it accordingly through an SMS to perform the remote operations as well.

This is all about the automatic room controller designing with the use of simple microcontrollers. Hence, for energy conservation it is better to use this type of home automation system. For any kind of further information or for any doubts on these circuits implementation and Electronics Projects , you can reach to us by commenting below.

Photo Credits

  • Automatic room light controller by blogspot
  • Home Automation with Automatic Room Light Controller by bubaraba
  • Zigbee wireless technology by ledsmagazine


  1. Ꭲhank you for every other informative blog. Ԝhere else may
    just I gеt that type of information written in ѕuch an ideal approach?
    I have a undertaking that I am simply now operating on, and I have been on the look out for such info.

  2. Fitflop Slippers says:

    Keep working ,splendid job!

  3. Sir what are the hardware needed for automatic room light controller?

  4. sir what is the budget of this project .actually i want to do this project for my final year…
    please reply

  5. sir i need trani CONTROL and track broblem SENSING and fire ACIDENT in the train and train air flow high at one compartement to another comaprtment finding is possible sir

  6. Hi sir I want ask you that suppose a animal enters in the room instead of man then what happens ?

  7. Alex Maina says:

    hi, kindly help me wih details about adding an automatic window curtains operator to room temp and lighting controller. regards.

  8. Gita Kumari says:

    Gita Kumari. Instead of turn the Fan ON after sensing temperature , can we automise AC system in a room. If any person enters into the room, then light and AC will turn ON after sensing light intensity and temperature of the room. When no body is present in the room then both light and AC will turn OFF. If Yes then how much it will cost.

  9. What if there r 3 fan , 3 lights in a room and i need only light and a fan tp be turned on! Will the project fail there?

  10. I just want to ask u one thing sir,if there r many fans and light inside the room r it posiible to turn on or off a particular light r fan..becoz even if 1person enters the room all lights will be turned on automatically.. Is there any solution for this r the project fails here

  11. vaishnavi says:

    I want know coding for this project.
    please provide me coding details.

  12. RAVI KUMAR says:

    I want to know that codeing this project.can you send me code.

  13. Sir please send some project ideas regrading hdl

  14. if small kids enter in & out of a room for playing then light wil get damaged is there any option / solution for this.

    1. Tarun Agarwal says:

      Hi Sree,

      You are right. Please note these are student level projects to understand the technology & its application and not designed for real-time use.

Add Comment