Design and production of infrared door entry control system based on single-chip microcomputer: Our innovative experimental project "Infrared Door Control System Based on Single-chip Computer" has been basically completed, and its working principle will now be briefly explained.
The system is mainly divided into two parts: one is the infrared sensor part. The second is the microcontroller counting display control part. The basic circuit diagram is as follows: For the infrared sensor part, we use infrared pairs of tubes. The infrared pairs of tubes are placed in parallel and are usually in the receiving state. The comparator outputs a low level. When someone passes by, the infrared rays are blocked and the receiving tube cannot receive the infrared rays. The comparator outputs a high level. In this way, when someone passes by, a level jump will occur. The microcontroller control part mainly determines whether someone passes by through two external interrupts. If someone passes by, due to the generation of level jump, the interrupt service program is entered. Here we use two pairs of infrared sensors to connect to two external interrupt ports, interrupt 0 As the entrance, the increment operation is implemented, and interrupt 1 is used as the outlet, the subtraction operation is implemented. In addition, we control the brightness of the indoor lights through the P0 port. When the register count value is 0, the lights turn off. When it is not 0, the lights turn on. The display part uses a two-digit digital tube for dynamic display. If necessary, it can be easily expanded to a four-digit count. Keep improving! During the experiment, we took a lot of detours, and what we made was not what we wanted at all. We originally wanted to count the entrance and exit of only one door in the room. The principle is clear, that is, place two pairs of infrared cameras on both sides of the door. When entering and exiting the pair of tubes, the order of blocking the two pairs of pairs of tubes is different. Therefore, it can be judged whether to enter or go out, thereby realizing addition and subtraction counting. When programming, the flag bits can be set at the entrances of the two interrupt service programs. According to the flag bits Judgment in and out, details in the program section. This is the theory, but in the actual process, we still found that the above functions could not be realized. We initially judged that the program was not mastered well enough. We believe that as we deepen our understanding of microcontrollers, we should be able to make better ones (because we are just learning temporarily. microcontroller).
All reference designs on this site are sourced from major semiconductor manufacturers or collected online for learning and research. The copyright belongs to the semiconductor manufacturer or the original author. If you believe that the reference design of this site infringes upon your relevant rights and interests, please send us a rights notice. As a neutral platform service provider, we will take measures to delete the relevant content in accordance with relevant laws after receiving the relevant notice from the rights holder. Please send relevant notifications to email: bbs_service@eeworld.com.cn.
It is your responsibility to test the circuit yourself and determine its suitability for you. EEWorld will not be liable for direct, indirect, special, incidental, consequential or punitive damages arising from any cause or anything connected to any reference design used.
Supported by EEWorld Datasheet