MartinFowler

Design and production of infrared door entry control system based on microcontroller (including source program and schematic diagram)

 
Overview

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).

 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-06-23 10:42:47

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
community

Robot
development
community

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号