The LDR has the property that when light falls on it its resistance becomes negligible and when light dont fall on it its resistance goes towards infinity . Here we have used BJT as a switch . When light is falling on the LDR , output of this is 0 . When the light is interrupted , then the output is 1 . 2 of these LDRs will be placed in the photo-interruption box ( shown on the next page ) and these boxes are placed on the walls on both the sides of the door, thus enabling the door to be opened . The last LDR will be between the gate , thus if someone walks through the gate then another signal is passed for the gate to open thus preventing trapping someone between the doors
The user can choose whether or not to have the password through the control panel . The password can also be set through the control panel .The password machine is a very famous circuit in digital electronics , based on the property of XNOR gates that they return 1 only when both the inputs are same . The password can be inputted contactlessly through the infrared sensors , as bringing the hand closer to the IR sensor will return 1 to the circuit , else will return 0 to the circuit .
Verilog part for password machine
One more feature of our Door is the Magic Counter i.e. this counter displays the number of times the gate has been used . Can be used to display 2 digit numbers efficiently using 7 segment displays . First the Binary Counter get the pulse from the clock and one by one these pulses gets added up i.e. when the counter receives 1 pulse the the units display will show 1, and after another pulse it will show 2 and so on. Now when 9 pulses are added the output is 1001 i.e. 9, and when the next i.e. the 10th pulse comes the output is 1010. But to display it, as 10 is a two digit number we use another Binary Counter to do the working for the second digit. Here, when the output is 1010 i.e. the tens place is getting added up. So a AND gate is used on the 2nd and 4th bit of the output, bringing us to an output of 1 and this output is again used as a pulse to the next counter which then counts for the tens place.
Verilog code for magic counter
The Monostable Multivibrator will be executed via the 555 timer. The monostable multivibrator is used to send a signal for a certain amount of time whenever a signal is given to it , this property can be used to keep the door open for a certain amount of time . The amount of time for which the door will remain open can be varied throught the rheostat and can be set throught the control panel .
Verilog code for Monostable Multivibrator
One of the unique features of this electronic door is that it can detect the number of people inside the room , and thus glow a red yellow or green led , thus showing the status of crowdedness in the room , where green means lots of space , and yellow means moderate crowd , and red means violation of social distancing norms
Counter 1 and counter 2 will work on the signals received by the photo-electronic system , as the value held by a counter increases with edge of the input signal . Then their difference is taken using a subtractor . The difference between the no of people entered and the number of people left obviously gives us the number of people in the room . The number of people is also displayed by a 7 segment display . This no is then compared with 3 different values of number of people using a comparator , and then the output is sent to a priority encoder , which will glow the red yellow and green led respectively as per the conditions .
Verilog code for Crowd Factor calculator
One of the interesting feature of our door is the Privacy Mode. Here, the operator get the opportunity to lock the door from inside i.e. no one else could the door until the operator turns off the Privacy Mode. The Mechanism is very simple When the logic state is set to 1, the NOT of it is 0 and when passed through the AND gate it get and output of 0 and hence the door remains closed. When the logic state is set to 0, The NOT of it is 1 and when passed through the AND gate, and if the password is also correct then the total output is 1 and hence the door will move and the Privacy Mode will be turned off
There is another motor attached parallel to the motor which controls the gate . It is used as a fan which will only remain on for the time for which the person passes under the gate . There is also another fan and bulb in the gate attached to the output of the comparator of the top of circuit , it switches on and will remain on till the time there is at least one person in the room .
Here, we use LM35 sensors, which are precision integrated-circuit temperature device. We would have 2 LM35’s at the ends of corridor and we use an Op-Amp in substractor configuration to measure the temperature difference. As soon as the temperature difference reaches value greater than 20°C or less than -20C, the Op-Amp sends a signal to comparator triggering the fire alarm. A change in temperature as high as 20°C signifies a sudden increase in the temperature of the room wrt the other room that is very high, which is most likely caused by fire. It should also be taken into account that the ceiling temperature are hottest when fire breaks, so it is more sensible to attach the LM35 sensors on the ceiling of the corridor. The difference of 20°C should be more than enough as the starting temperatures of an average fire can be as low as 100°C whereas an average temperature in Indian rooms can reach 50°C at max , and temperature difference across the corridor is not likely to cross 20C in any case other than fire. This fire alarm feature is very cheap.
The motor rotates the circular gear , which then rotates the linear gear , which is attached to the top of the door . Then , simultaneously , when the open signal is given , the solenoid is activated and it acts as a electromagnet , which sticks to the door and does not let it go until the open signal is removed . It is not feasible to directly use an electromagnet to open the door against the spring force , hence we have used this combination of motor , gears , and electromagnet . The door is spring loaded , i.e. when the open signal is stopped being given , then the door will close automatically due to the springs .