Design of building population counting system based on infrared sensor

Publisher:guqian999Latest update time:2011-03-08 Source: 山西电子技术 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Abstract: The system is based on pyroelectric infrared sensor. Through the design of peripheral circuits and corresponding control circuits, it realizes real-time statistics of the number of people in the building. The overall structural design of the system is given, and the main hardware design and system software design of the building population monitoring system are emphasized. Practice has proved that the building population monitoring system works stably, has high response speed and accuracy, and is low in price, and has broad application prospects.
Keywords: pyroelectric infrared sensor; MCS-51 single-chip microcomputer; VC6.0

0 Introduction
With the rapid development of modern society and science and technology, infrared technology has become well known to everyone. Since infrared is invisible light, it has strong concealment and confidentiality. It has been widely used in modern science and technology, national defense, industry and agriculture, and has brought great convenience to people's daily life and public safety. This article introduces a building room population counting system based on infrared sensors. In view of the various shortcomings or limitations of the existing various population counting systems, this article designs a real-time and feasible counting device. It is based on pyroelectric infrared sensors. Through the design of peripheral circuits, it can identify the direction of people coming in (moving to the left) or going out (moving to the right), and then generate different channel signals to trigger the corresponding control circuit. Through single-chip microcomputer programming and connecting to a computer, the number of people in the building can be monitored in real time and accurately.

1 System overall design principle
The overall structural block diagram of the system is shown in Figure 1: The infrared rays of the surrounding environment are collected in real time through the RE200B pyroelectric infrared sensor. When someone enters the detection range of the sensor, the sensor transmits the sensed signal to the next-level amplification and filtering circuit. After amplification and filtering of interference electrical signals, the voltage comparison circuit can well identify the two directions of people entering and leaving. Then, the signals representing different directions are converted into signals of number changes through single-chip microcomputer programming, and the number change information is sent to the computer through the wireless module through serial port programming, and the number of people statistics information is displayed in real time in the form of a graphical interface through the computer monitoring software.

a.JPG

2 Introduction to each functional unit of the system
2.1 Working principle of pyroelectric infrared sensor
This system uses RE200B pyroelectric infrared sensor as the core element for receiving infrared radiation from the human body, which is the signal receiving part of the entire circuit. It has the function of direction recognition, can detect the change of infrared energy radiated by the human body in a non-contact form, and convert it into a voltage signal output. By amplifying this voltage signal, it can drive various control circuits.
As shown in Figure 2(a): RE200B has two sensitive units P1 and P2. These two thermoelectric elements with the same characteristics are connected in reverse series or in a differential balanced circuit. Compared with the structure of a single thermoelectric element (Figure 2(b)), they can not only make the output signal directional, but also suppress the interference caused by its own temperature change. When working, when the human body passes through the detection field of view from two different directions indicated by the arrows in the figure, the order of the infrared thermal radiation received by the two thermistors is exactly opposite, so that the alternating process of the positive and negative charges on the surface of the thermistors from balance to imbalance and then to balance is also opposite on the whole, and then there will be two alternating signal voltages with opposite phases. They reflect the direction of the human body's entry and exit.

b.JPG

2.2 Amplification circuit
The output signal of the infrared pyroelectric sensor BE200B is very weak, and the signal contains noise signals caused by the environment, so the signal must be filtered and amplified. In the circuit, LM324 is used to form a 280-fold amplification circuit, and the bias voltage is adjusted by potentiometer R3 to make the static output voltage as stable as possible at U0 (Figure 3). However, at this time, the signal is affected by the ambient temperature and cannot guarantee stability, so a differential circuit is added. By adjusting the potentiometer R11, the static output of the differential circuit is not affected by the ambient temperature and is stable near U0. When a person or an infrared source passes through the sensor window from the left or right direction, it can be seen that the output Vb of the differential circuit will vary with the direction of the person passing (Figure 3 (a) (b)).

c.JPG
2.3 Voltage comparator
Although the RE200B sensor can identify the direction of human movement, the direction signal it outputs cannot be recognized by the counting microcontroller, so a circuit must be added after the amplifier circuit to distinguish the two signals of human entry and exit and be recognized by the microcontroller. The output signal Vb of the previous level is output O1 and O2 through two voltage comparison circuits. When passing through the sensor window from left to right, O1 appears low level first, and O2 appears low level later, as shown in Figure 3 (c) (e). When passing through the sensor window from right to left, O2 appears low level first, and O1 appears low level later, as shown in Figure 3 (d) (f). The microcontroller uses interrupts to obtain the order of the two low levels to determine the direction.
2.4 Design of microcontroller control circuit
This design uses AT89C2051 as the core of the microcontroller control circuit. The external interrupt INT0 and INT1 pins of the microcontroller are respectively connected to two groups of high and low level signals from the voltage comparator. Since the external interrupt pin of the microcontroller can only generate an interrupt request signal when it receives a negative jump signal, when the human infrared signal is detected, the corresponding external interrupt jumps to a low level and applies for an interrupt to the CPU. The direction of entry and exit of the person is determined by judging the order in which the INT0 and INT1 pins generate interrupts.

Program design mainly considers signal acquisition, different speeds of people entering and exiting, whether they are entering or exiting, environmental interference and real-time display output, etc. Its accuracy is directly related to the reliability and practicality of the counting device. Signal acquisition is completed using periodic signal scanning, and the external interrupt INT0 and INT1 pins are collected every 2 to 8 ms. The external interrupt, timing counter, T0 and T1 work together. The main program design process is shown in Figure 4.

d.JPG
After the signal is processed by the single-chip microcomputer, it is output to the eight display ports of the display module, a, b, c, d, e, f, g, and DP, to drive the digital tube to display the total number of people in the room. At the same time, the room data is transmitted to the main control system through wireless serial communication to display the results, so that the manager can check the number of people in the room conveniently and quickly through the data terminal.
2.5 Computer monitoring software design
The system software is written based on Microsoft VC++, including system parameter setting module, real-time display module for receiving data, and data storage module. The main control interface of the system software is shown in Figure 5:

e.jpg

3 Conclusion
The building population monitoring system has been tried out in some corporate buildings. Practice has proved that the system works stably, accurately counts the number of people in the building, and has good real-time performance. At the same time, the system is low-cost, small in size, light in weight, easy to install and easy to use. It has played a huge role in counting the number of people in the building and has broad application prospects and huge economic value.

Reference address:Design of building population counting system based on infrared sensor

Previous article:Sensor Analog Front End
Next article:Virtual sensor temperature compensation system based on neural network technology

Latest Industrial Control Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

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号