Wastage of electricity is one of the main problems which we are facing nowadays. In our homes, schools, colleges, or industry we see that fans/lights are kept on even if there is nobody in the room or area/passage. This happens due to negligence or because we forgot to turn the lights off or when we are in a hurry. To avoid all such situations we have designed this project called “Automatic room light controller with visitor counter”.
This project has two modules:
The main concept behind this project is known as the “Visitor counter” which measures the number of persons entering any room like a seminar hall, conference room, or classroom. This function is implemented using a pair of Infrared sensors. LCD display placed outside the room displays this value of person count. The person count is incremented whenever someone enters the room.
The lights are turned on whenever the person count is greater than zero. And in a reverse way, the person count will be decremented if somebody leaves the room. When the number of persons inside the room is zero, lights inside the room are turned off using a relay interface. In this way Relay performs the operation of the “Automatic room light controller”. Since this project uses 2 infrared sensors, it can be used as a Bidirectional person counter as well.
You will get the following documents with this project:
This is one of the best sensor based projects for final year. And the following are the important modules in this project:
We have added a Light Dependent Resistor (LDR) in this project.
Purpose of LDR: Light sensor – LDR will detect the sunlight in the room (or we can say LDR is used to detect daytime)
If there is enough sunlight in the room (which means it is daytime) then the relay will not be turned on even if the person count is greater than zero. In this mode, it will work only as a Person counter to save electricity and works as an energy saver. And if there is insufficient sunlight in the room then only the relay will be turned on so as to turn on the bulb.
Below is the diagrammatic representation of how the two sensors should be placed on the door frame.
Questions and answers about this project:
Question: Why have you used Infrared sensors to count the no of persons? What are the advantages of using Infrared sensors?
Answer: The advantage of using an Infrared sensor is that IR rays are not visible to human eyes. Also, IR rays are not affected by any other sources. For example: If you use LDR as a sensor then it can be easily triggered by sunlight or any other sources of light.
Question: Which type of fan/lights can be controlled using this project? AC or DC?
Answer: We have used Relay to turn on/off the fan or light. So we can use any type of fan/light. We can either use an AC fan or a DC fan as well. Relay provides isolation from the Microcontroller circuit. Thus the user can use a fan operating on a 12 volts (CPU fan) or a 230 volts AC fan.
Question: Suppose two people walk into the room in matching steps interval will it sense one intrusion? i.e. if two-person enter the room without any gap between them then will Microcontroller will detect 2 persons or only 1 person?
Answer: If there is no gap between two persons, then Microcontroller will sense that only 1 person has entered into the room. There should be some time delay (at-least half seconds delay between 2 persons)
Question: Are you using any separate counter IC for counting the persons or Microcontroller itself is configured as the counter?
Answer: We have not used any separate IC for the counting. Microcontroller does all the functions. It is central processing unit for the project. It takes input pulses from sensor, counts the person, activate/deactivates the relay.
Question: How does the counting of people using transmitters & receivers work?
Answer: We have used to 2 pairs of Transmitter and receiver. These should be placed on the door frame, in-front of each other. If a person enters the room then first receiver will cut and then second receiver will cut. Then Microcontroller will increment the count. And if any person leaves the room then second receiver will cut and then first receiver will cut. Then Microcontroller decrements the count.
Question: Concerning pets in the room, are they likely to trigger the system? What are the ways of avoiding false triggering?
Answer: Yes, your Pets can trigger the sensors. To avoid this situation, sensors should be placed at the higher level from ground. You can keep them at 4 feet from ground. But 1 more thing, if your pets jump 4 feet from ground then this will trigger the sensor:-):D1
Question: Can we use an RFID reader & RFID cards in this project along with the Infrared sensors?
Is it possible that in the entry operation, the RFID will count and in the exit operation, the infrared will count?
Answer: Yes, this is possible. We can implement this project using RFID reader.
Whenever person enters the room, he/she will show the RFID card to RFID sensor and the counter will count as one but the infrared entry will not be activated. But when the person is leaving the room, the infrared exit operation will be activated and the counter decrements by one and the lights will turn off if nobody is in the room.
The RFID sensor will be placed outside the room for the Entry and the infrared sensors will be placed at side of the door for the exit operation. Meaning, if the person enters the room and he/she shows the RFID card to RFID sensor, the RFID will activate but it disregards the infrared entry operation. But leaving the room, the infrared will do the task and the counter decrements.
Question: If this project is used during the daytime then lights will always turn on & off and this will lead to a waste of electricity. How to overcome this situation? Or can’t this project be used during the daytime?
Answer: In some specific seminar hall, conference rooms and study rooms, sunlight can not reach in daytime as well. This is to give some presentations on projector or big screens. In these cases lights are turned on even in daytime.
In other cases, where sunlight is enough and lights are not required in day time, we can turn off the project so it will not function. And then we can turn on the project in evening time.
Question: I tried to replicate the circuit of the transmitter and receiver on a breadboard using the given components. The output of both transmitters was adjusted to 38 kHz. But the IR receiver is not giving active low output. What can be the problem?
Answer: Use a potentiometer to adjust the frequency of transmitter circuit. Also check the connections of TSOP1738 IR receiver circuit, sometimes problem could be in receiver.
Question: In this project can we use any sensor other than TSOP1738? Any animal, like a dog, may also enter the room & will get counted by the counter, this will lead to an error. Can u suggest any other sensors which will detect only human beings or a human body?
Answer: TSOP1738 IR sensor is the most suitable sensor for this project.
Question: I have prepared the circuit of the 555 timer IC which is giving an output of 38khz. Problem is that the Red LED connected to the IR receiver is always active (always turned on) and only blinks when I try to cut the infrared beam from the arrangement of the IR transmitter and receiver that you sent me. What can be the problem?
Answer: I have reviewed circuit and have 2 suggestions. First one, Capacitor connected to Pin 5 of IC555 should be 103 pico Farad. And the third terminal of potentiometer RV is left open. It should be connected to second terminal of variable resistor RV. Then set the resistance between pin 7 and 6 to 11.4 kohm. If the circuit is still not working properly then try varying the potentiometer, reduce the resistance. LED should turn off when Transmitter is facing towards Receiver.
Question: Can we get 120 volts as an output of the relay because here in Canada we have lights that work at 120 volts? The transformer works at 240V but here in Canada, we have 120V so do we change the transformer to 120v if yes what transformer do we need? Secondly is it possible for us to remove the transformer and directly supply 9volts to the circuit? If yes then at what point we can connect the DC supply because then we gave to skip the dc converter circuit?
Answer: Relay does not give any voltage output. Relay acts as a switch. About transformer: you can use 9volt/500 milliampere transformer. And if you want to operate this project on regulated DC supply then you can remove transformer and you can directly give 9 volts supply. You have to remove transformer wires and at the same point you can give 9 volt DC supply.
Question: Can this model hypothetically sense whether a person is going in or out of a room? Can the IR sensors detect obstructions only, not the direction?
Answer: Yes, IR sensors detect the direction. This project has 2 sensors. So when person goes in 1st sensor is cut and then 2nd sensor is cut. Thus Microcontroller increments the count. I have added image of how to install sensor on door on this webpage: (see at the end/bottom of page)
Question: Doubt concerning the placement of IR sensor in the door frame. In the website you have given a chart showing the placement of the circuit, in that picture the transmitter1 and receiver2 is on one side of the frame and vice versa. Why is it so? Do you have any specific reason? Can we place TX1 & TX2 on the same side?
Answer: You can place Tx1 & TX2 on same side but it will reduce the efficiency of the receiver as both IR receivers will receive the rays from both transmitters, so if the distance between 2 receivers on one side of door is less then chances are there that it will not identify that person is entering the room.
Question: I too like this project. It’s a very great idea!!! But i have a question. During night time when we go to sleep will the lights be ON or we should TURN OFF it?
Answer: As per the current functionality of the project, lights will be turned on when there is one or more than one person in room. So if you don’t need lights when you are going to sleep, you should turn off the project.
Question: what if i modified this project by adding LDR. so the light will be turn on when the LDR detect darkness. And is the microcontroller need to be programmed ?
Answer: We have provided in the advanced version of this project. LDR will detect the sunlight. So the relay(light) will be turned on when there is darkness. And the microcontroller is pre-programmed.
Question: Does it works for same entry ,exit door..????
Answer: Yes it works for the rooms which has only 1 door for entry and exit.
Question: when a cat or any other animal comes across the IR sensor, will the light remain on or off?
Answer: Sensors does not differentiate between a human being and an animal. So if any animal crosses the sensor then the visitor counter will be incremented or decremented (depending on the direction) and then lights will be turned on if count is greater than zero.
Question: Can you please explain the use of 555 Timer ICs in the project?
Answer: 555 Timer IC is used as a driver circuit for IR LEDs.
Question: What Will happen when the person enters the room and passes through the first sensor but for any reason, he will come back before reaching the second sensor??
Answer: In such cases the counter will not be incremented. There is a waiting period of 5 seconds. If the second sensor is not interrupted within 5 seconds then the waiting period gets over and action is cancelled.
Question: What is the use of a buzzer in this project?
Answer: Buzzer will be turned on when maximum limit of person count has reached. Suppose a seminar hall has seating capacity of 100 then only 100 people should be allowed inside room. Whenever 101th person enters then buzzer should be turned on to indicate that maximum capacity has reached. In this project we have set the limit to 15 for demo purpose.
Question: can we use LDR in this circuit so when sunlight is there lights will remain off
Answer: We have already implemented this part as part of enhancement in our circuit.
Question: Hi sir, this project is almost well for us but I want to know about the disadvantages of this project. Thank sir.
Answer: As mentioned in the description above, limitation can be, “when two people enter without gap in between them, then system will not be able to detect it” and another limitation is of maximum person count which is 255.
Question: Which sensor will be used to differentiate between the human body and the animal body?
Answer: Its quite difficult to get such sensor.
View Comments
when did the research on this project was started and by whom?
Hi im from malaysia, if i order this project, when can i get it?
Hi Mohamad Nazreen, you can get this project in 7 working days.
can anyone tell whether we can use a human sensing system to detect a person inside the room ???
Hi harit, PIR sensor can be used to detect human being / person inside the room. But this project does not have PIR sensor. We have used 2 infrared sensors and these are installed on door.
Sir is any sensor to detect light brightness and then on light at day timeor keep it off At day time with blood sensor and temperature sensor
Can u give any comment about this .
Hi Devang b patel, we have already included Light sensor to detect daytime.
We can even add Temperature sensor as per your requirement. But please send details of your customized requirement to our email id.
However it is not possible to add blood sensor in this project.
am getting started with some project in the same line with this only that mine has to consider all the appliances in the room e.g. TV, radio set, fun, flat iron, computers, chargers. this will give some time lag/allowance between the occupant living the room and switching off. so my question is how viable this is?
Hi mbavu, yes this is feasible. We have provided a relay with this project. It can be used to turn a single device or many devices at a time. Also we can provide a time lag between switching off devices.
Hi Guys very useful content.
Can u guys make a tutorial to detect room entry alert system using alarm with clear explanation ???
Sir i am guhan doing my BE. we are doing miniproject in our college. I dont like to buy some projects in some other project center. So i think some concept and when i take some notes related to my project through internet i have found yours.....the same concept "automatic on\off lights when there are person respectively".... i am fan of yours..:-)
How to differentiate two transmitter from their respective receivers?
Hi Naveen, Two transmitters should have sufficient distance between each other so that they will not interfere with each other. We have to take precaution that the IR rays of first transmitter should fall only on first IR receiver and not on second receiver.
HI GUYS.....i am impressed by ur work i am writing this because i need ur help i am working with the same project on my final year project,,i am computer engineering student in Eritrea(east Africa).can you help me with some questions???thank you for this opportunity
Hi naomi debrtsion, please post your questions.
how can we implement this project by sending the data to a remote location using mobile or internet?
plzzzz reply as soon as possible.....
Hi khushboo thakare, we can implement computer interfacing or GSM modem interfacing with this project. GSM modem can be used to send SMS to a mobile placed at remote location. And PC interfacing can be used to send data to computer then a computer application can be developed to send this data to internet.
Sir, is there any kind of programming also involved with the micro-controller 89s51 in this project? If yes then are programming for counters and for LCD Displaying separately?
Hi Roshan, yes 89s51 microcontroller programming is involved in this project. Although there are different functions for LCD and person counter modules, but they are combined in a single program.
hi i m shanthini.i m doin BE(EEE).i want some innovative,new idea for my miniproject. please send some project.i have another doubt,if i use PIR what will be the change..
Hi shanthini, PIR Sensor has large range as compared to normal IR sensors. So it can detect the person but it gets difficult to understand if the person is entering in the room or leaving the room.
Greetings...... mn "Automatic room light controller with visitor counter” purchase krna chta hun, bt with modfication ky sath.i.e mn LCD ky data ko remote location py via GSM modul ky through bhjna chta hun.
Kaya ap ya bna sakty hn??
plz reply fast.....
Yes, we can send the data to remove location via GSM modem
1) why is IR sensor the best choice in this case...why not proximity sensor or any other sensor??/
2) what other alternative do we have for the Relay that we are using???
IR sensor are low cost and can not be false triggered. Relay are best for turning on devices from 5V DC to 230V AC supply.
why this project can't work for 2 or more persons whlie entering in room at same time?
Hi kashaf , microcontroller just reads the output signal from IR receiver sensor. And this sensor does not recognize the number of person. It just responds to the IR rays falling on it. So if two or more person enters in room without any gap between them then it will treat as a single pulse. And this pulse will be given to microcontroller for further processing.
plz what's the IR transmitter reference that you used in this project??
thank you :)
Hi Jridi hamza, IR transmitters are normal Infrared LEDs.
can this project will work for 5 rooms simultaneously and how???
No, this project can not work for multiple rooms simultaneously. You have to install one project for each room.
hi guys ... i'm a btech student and i'm planning to do this project for my mini project. but our professors insist that we submit the project without using any microcontrollers. is it possible to implement the same idea without the use of any programmable ICs ??? please help,, change of project is not allowed
Hi Anushka, This project can not be implemented without microcontroller. Since it is really difficult to interface / drive LCD display with analog circuit.
can i interface dc motor on this object counter becaus when no. of entering person leave the room than door automaticaly closed
Hi bhakti2, yes we can connect DC motor. However for this we need to modify the circuit. We have already developed another project "Person counter and Password detector", for more information, please visit this webpage: https://www.projectsof8051.com/person-counter-and-password-detector-system/
hi, would it possible if I add temperature control in this project?
Hi Elaine Lombog, yes we can add temperature control. However for this we need to modify the circuit. I would recommend to add a comparator instead of a Analog to digital convertor.
sir , can we connect at a time 1fan+2light+1tv with this project ?
Hi papun, yes we can connect these devices to a single relay. But then all these devices will be turned on or off at the same time. If you want con control them individually then we need to modify the circuit to add 2 more relays.
I have a question,have you calculated how much energy is saved by implementing this project. Can you provide a approx. quantified value in terms of % or Watts,how much energy is saved?
since the counter will either increment or decrement when there is obstruction on the sensors, how can it differenciate between the person that is entering or leaving the room?
Hi Felix, please refer to the image shown under "How to place these sensors on door" section.
When person enters room then sensor sequence will be as below:
Initially first sensor will be activated and later second sensor will be activated.
And in case of person leaving the room, sensor sequence will be as below:
Initially second sensor will be activated and later first sensor will be activated.
How to check if IR sensor is working or not?and then transmitter and receiver circuit if both are have IR sensor or not?
These details are mentioned in the project report. You will get all documents after purchasing the project.
I have a doubt..how actually the IR transistors work over here?