1 System structure and working principle
The system structure diagram is shown in Figure 1. This system is mainly composed of light detection circuit, pyroelectric infrared sensor and processing circuit, single-chip computer 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 computer. The single-chip computer 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.
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, 51 single-chip microcomputers are more cost-effective. AT89C52 is a single-chip microcomputer with 2 external interrupts, 2 16-bit timers, and 2 programmable serial UARTs. The central control module uses AT89C52 single-chip microcomputer, which fully meets the design requirements and realizes the control of the entire system. [page]
2.2 Light detection circuit
As shown in Figure 2, when the external environment is bright, the resistance of the photoresistor R13 is small, and the level of point A is low; when the external environment is dim, the resistance of the photoresistor R13 is large, and the level of point A is high. This level is sent to the microcontroller, and the program controls whether lighting is realized.
2.3 Pyroelectric sensor and processing circuit
2.3.1 Pyroelectric infrared sensor
The pyroelectric infrared sensor can detect the infrared radiation of the human body in a non-contact form and convert it into a voltage signal. The pyroelectric sensor has the characteristics of low cost, no need to use 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 transform the irregular waveform of the sensor output signal into a digital signal suitable for single-chip microcomputer processing. According to the above requirements, the block diagram of the human body pyroelectric detection circuit is shown in Figure 3.
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 high-performance pyroelectric sensor signal processing integrated circuit, which 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.
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 from the 12th pin to the internal second-stage operational amplifier for amplification, and then processed by the amplitude detector composed of the voltage comparator, and 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 single-chip microcomputer for lighting control. The experiment shows that when the sensor detects that there is someone in the room, the 1st pin of BIS0001 is connected to a high level, so that the chip is 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, the purpose of which is that when the ambient light is weak, the lighting equipment will automatically turn off after a delay period. The circuit sets 4 delay times through P1.0~P1.3. When no switch is closed at P1.0~P3.0, the system delays according to the initial value; when a switch is 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.
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 this 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 this 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.
[page]
3 System software designThe 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 delays 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-detects the output state Vo of the signal processing circuit. Based on the above analysis, the system software design process is shown in Figure 5.
4 Conclusion
The intelligent lighting control system designed in this paper 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.
Previous article:Design of a temperature monitoring system based on single chip microcomputer
Next article:Application of 51 single chip microcomputer in boiler water treatment control
- Popular Resources
- Popular amplifiers
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Avoiding ESD and EMI in mobile audio systems
- Thank you for being there - Tribute to my love
- Serial port download of TMS320LF2407
- Abnormal sound from the front transformer of the power factor circuit
- Packaging issues of double-row pluggable connectors
- TMS320F28384D - Functional Block Diagram
- MSP430 G2553 Timer/Counter Timer_A
- msp430 program library serial series 12864 LCD
- CC2640R2 internal Bootloader burning program
- 【ST NUCLEO-H743ZI Review】_by dsjsjf