Design of intelligent lighting control system based on single chip microcomputer

Publisher:幸福的老农Latest update time:2011-01-28 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

For some places with long lighting time and many lighting equipment (such as school classrooms, shopping malls, etc.), the phenomenon of waste in the use of lighting systems is common. Due to the lack of scientific management and the lack of responsibility of managers, sometimes the whole room is brightly lit when it can work normally with the help of the external environment and when there is no one indoors at night. In this way, the invisible waste of electric energy is very alarming. According to estimates, the power consumption of this phenomenon accounts for about 40% of the total power consumption of the unit. Therefore, it is necessary to implement lighting energy-saving measures on the premise of ensuring the quality of lighting. This can not only save energy, but also produce obvious economic benefits.

1 System structure and working principle

The system structure is shown in Figure 1. This system is mainly composed of light detection circuit, pyroelectric infrared sensor and processing circuit, single-chip microcomputer system and control circuit. When working, the light detection circuit and pyroelectric infrared sensor collect information such as light intensity and whether there are people in the room and send it to the single-chip microcomputer. The single-chip microcomputer switches the lighting equipment through the control circuit based on this information, thereby realizing lighting control to achieve energy saving.

2 System Hardware Design

The system hardware circuit constructed according to Figure 1 is shown in Figure 2. In order to make the system function more perfect, a time display circuit can be added to the system to display the current time. Since the hardware and software of this part are mature, they will not be introduced in detail here.

System hardware circuit

2.1 Central Control Module

Currently, the more popular single-chip microcomputers are AVR and 51 single-chip microcomputers. Considering the functional requirements and cost of system design, the 51 single-chip microcomputer has a higher cost performance. AT89C52 is a single-chip microcomputer with 2 external interrupts, 2 16-bit timers, and 2 programmable serial UARTs. The central control module uses the AT89C52 single-chip microcomputer, which fully meets the design requirements and realizes the control of the entire system.

2.2 Light detection circuit

As shown in Figure 2, when the external ambient light is strong, the resistance of the photoresistor R13 is small, and the level at point A is low; when the external ambient light is weak, the resistance of the photoresistor R13 is large, and the level at point A is high. This level is sent to the microcontroller, and the program controls whether lighting is achieved.

2.3 Pyroelectric sensor and processing circuit

2.3.1 Pyroelectric infrared sensor

Pyroelectric infrared sensors can detect infrared radiation from the human body in a non-contact manner and convert it into a voltage signal. Pyroelectric sensors have the characteristics of low cost, no need for infrared or electromagnetic wave emission sources, high sensitivity, and mobile installation. In actual use, a Fresnel lens needs to be installed in front of the pyroelectric sensor, which can greatly improve the receiving sensitivity and increase the detection distance and range. Experiments have shown that if the pyroelectric infrared sensor is not equipped with a Fresnel lens, its detection distance is only about 2 m; after being equipped with a Fresnel lens, its detection distance can be increased to more than 10 m.

Since the signal output by the pyroelectric sensor changes slowly and has a small amplitude (less than 1 mV), it cannot be directly used as a control signal for the lighting system. Therefore, the output signal of the sensor must pass through a special signal processing circuit to convert the irregular waveform of the sensor output signal into a digital signal suitable for processing by a single-chip microcomputer.

According to the above requirements, the block diagram of the human body pyroelectric detection circuit is shown in Figure 3.

Human body pyroelectric detection circuit

2.3.2 Signal Processing Circuit

This design uses BIS0001 to complete the processing of the output signal of the pyroelectric sensor. BIS0001 is a pyroelectric sensor signal processing integrated circuit with high performance. It is mainly composed of an operational amplifier, a voltage comparator, a state controller, a delay timer, and a blocking timer. The signal processing circuit composed of BIS0001 is shown in Figure 4.

Signal processing circuit composed of BIS0001 In Figure 4, the output signal of the S pole of the pyroelectric sensor is sent to the 14th pin of BIS0001, amplified by the internal first-stage operational amplifier, coupled by C3, and input to the internal second-stage operational amplifier from the 12th pin for amplification. After being processed by the amplitude detector composed of the voltage comparator, the effective trigger signal is detected to start the delay timer, and finally the output signal (Vo) from the 12th pin is sent to the microcontroller for lighting control. The experimental results show that when the sensor detects that there is someone in the room, When the sensor detects someone in the room ; when there is no one No one .

Pin 1 of BIS0001 is connected to a high level, which puts the chip in a repeatable triggering mode. The delay time Tx of the output Vo (high level) is adjusted by the size of the external R8 and C7; the trigger blocking time Ti is adjusted by the size of the external R9 and C6.

2.4 Control Circuit

2.4.1 Delay time selection circuit

The system sets a delay time selection circuit in P1 of AT89C52. Its purpose is to automatically turn off the lighting equipment after a delay when the ambient light is weak. The circuit sets 4 delay times through P1.0~P1.3. When there is no switch closed at P1.0~P3.0, the system delays according to the initial value; when there is a switch closed at P1.0~P1.3, the program detects from P1.3~P1.0. If a port is detected to be low level, the system delays according to the value set at the current port. The time relationship values ​​are shown in Table 1.

Setting the time relationship value

2.4.2 Output Control Circuit

The single-chip computer detects the signals output by the light detection circuit and the sensor processing circuit, and the output control signal is output by P2.0 of the single-chip computer. When the indoor ambient light is strong or the light is weak but there is no one in the room, P2.0 outputs a high level, at which time the transistor V1 is cut off, the relay J1 does not work, and the lighting equipment connected to 220 V does not light up. When the indoor light is weak and the sensor detects that there is someone in the room, P2.0 outputs a low level, at which time the transistor V1 is turned on, the relay J1 works, and the 220 V AC is added to the lighting equipment through the relay, and the lighting equipment lights up normally.

3. System software design

The main task of the software part is to complete the processing of the output signals of the light detection circuit and the pyroelectric sensor signal processing circuit. When the light is strong, the system continues to detect the output state of the light detection circuit. When the light is weak, the system detects the output state Vo of the signal processing circuit. If Vo is high when there is someone in the room, the system controls the lighting equipment to light up and delay according to the set time. If someone is detected again within the delay time, the system delays according to the set time again; if no one is detected in the room within the delay time, the system controls the lighting equipment to turn off and re-detect the output state Vo of the signal processing circuit.

Based on the above analysis, the system software design process is shown in Figure 5.

System software design process

4 Conclusion

The intelligent lighting control system designed this time is suitable for lighting control in large indoor places such as schools and shopping malls. It can effectively control lighting equipment automatically to achieve the purpose of scientific management and energy saving. Experiments have proved that the system has a simple structure, easy installation, stable operation and high reliability. If an alarm device is added to the system, the automatic alarm function can also be realized.

Reference address:Design of intelligent lighting control system based on single chip microcomputer

Previous article:Research and design of ultrasonic distance measurement system based on single chip microcomputer
Next article:A high-speed communication scheme between DSP and single-chip microcomputer

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
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号