[Image] Application of AT89C2051 in multi-function window

Publisher:ping777Latest update time:2011-10-16 Keywords:AT89C2051 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

This multifunctional window has the following 5 functions:

1. Prevent harmful gas leakage: Automatically detect the concentration of harmful gases such as gas, smoke, alcohol, etc. in the room. When the set threshold is reached, the window will be opened automatically, and ventilation such as exhaust fan or air conditioner will be started;
2. Anti-theft alarm: The pyroelectric human infrared probe detects the human body approaching from outside the window, closes the window and locks it in time, and sends out an alarm signal;
3. Anti-humidity: Automatically close the window when it rains or fogs, and the air humidity is high;
4. Automatically close the window when it is dark (can be set to ON or OFF);
5. Timer switch: Open or close the window according to the set time.

Working principle: See the attached figure for the multifunctional window circuit.

The single-chip microcomputer adopts the interrupt query working mode. The signal of the gas sensor is amplified by IC4A, which flips IC4B and isolates the high level input to N3 and N1 through the optical coupler. After inversion, N3 triggers interrupt 0. After the single-chip microcomputer finds that P31 is at a low level, it outputs the window opening instruction to P10 and P11. After isolation, Q1~Q4 drives the motor M1 to open the window; P2 port turns from high to low, Q5 is turned on, and the normally open contact of J1 is closed to start the exhaust fan or air conditioner. C2 can eliminate certain interference to avoid false triggering. To simplify the circuit, only one sensor input is drawn in the figure. P34, P35, and P37 receive signals from pyroelectric, hygroscopic, and photosensitive probes respectively. SW2 is a multi-function button. When SW1 is not pressed, SW2 is a manual window opening/closing button. Press SW1 to trigger interrupt 1 and enter the time setting mode. Each time SW2 is pressed, the setting time increases by half an hour. After stopping the button for 30 seconds, the setting ends and the timer starts working. After the anti-theft alarm is triggered, press SW2 to stop the sound of the speaker. K1 and K2 are the window opening and closing detection switches, and J2 is the window lock electromagnet coil. After the window is closed, the window is locked. LED is a multi-function indicator: after power-on, the LED lights up, indicating that it is in the initial delay (due to the initial instability of the sensor, a longer delay is required); when setting the time, each time SW2 is pressed, the LED flashes once, confirming that the key input is valid; when the gas detection is activated, the LED also lights up, and it is off at other times.

In the figure, N1 and others are triodes, N3 is a non-OR gate composed of five diodes and one triode, and the amplification and comparison of the signals of the four sensors are completed by two quad op amps. In order to ensure stable operation, the microcontroller is completely isolated from the peripheral circuit and powered separately. The entire circuit is installed in the aluminum alloy window frame, and a detection hole is opened on the outside of the window frame for the sensor. Another wire of the gas-sensitive probe is installed at the position to be detected. M1 is installed on the movable window leaf together with the mechanical transmission mechanism, and is connected to the drive circuit in a special way (the entire mechanical transmission part has been patented). In order to prevent M1 from burning due to the blockage of the mechanical part, the program needs to detect the opening and closing process of the window. When the movable window leaf is blocked, it can automatically retreat and try again. If the switch cannot be opened and closed normally after three attempts, the action stops and an alarm signal is issued. A forced reset button is added to the RST end.

Keywords:AT89C2051 Reference address:[Image] Application of AT89C2051 in multi-function window

Previous article:Simple flashing light working on AC power
Next article:[Photo] Precision single-supply light detection circuit design

Recommended ReadingLatest update time:2024-11-16 19:46

AT89C2051 multi-channel servo control circuit
A servo is a position servo driver . It receives a certain control signal and outputs a certain angle. It is suitable for control systems that require the angle to be constantly changed and maintained. In micro-electromechanical systems and aircraft models, it is a basic output actuator. Taking the FUTABA-S3003 servo a
[Microcontroller]
AT89C2051 multi-channel servo control circuit
Development of a temperature controller for foot bath
The difficulty in designing a foot bather lies in cost control and the design of a temperature control system. In recent years, the gradual maturity of switching power supply technology has provided a high-efficiency and low-cost solution for low-power power supply, abandoning the traditional low-efficiency power suppl
[Microcontroller]
Development of a temperature controller for foot bath
Design of automatic spinning yarn breakage detection system based on AT89C2051 microcontroller
introduction During the winding process of the spinning machine, it is very important to determine whether the thin thread is broken. Therefore, the spinning breakage detection device is a product that emerged based on actual needs. It can detect and monitor the spinning process. This article designs a multifunctional
[Microcontroller]
Design of automatic spinning yarn breakage detection system based on AT89C2051 microcontroller
PC/AT Keyboard Designed with AT89C2051
In the fields of industrial control and measuring instruments, embedded PCs have been widely used, such as PC/104 from ADVANTECH and E86 embedded PC from AMD. In addition to the functions of PCs, they also provide powerful standard interfaces, such as flat panel/VGA display control interface, optical drive interface
[Microcontroller]
PC/AT Keyboard Designed with AT89C2051
Design and production of multifunctional AT89C2051 countdown timer circuit
Countdown timers are very useful in life. If you make your own with a single-chip microcomputer, not only is the circuit simple, but the functions can be designed according to your needs. There are many countdown timers designed with 74 series and 40 series small-scale digital chips, but they have disadvantages such a
[Microcontroller]
Design and production of multifunctional AT89C2051 countdown timer circuit
Latest Analog Electronics 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号