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.
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.
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.
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 there is 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.
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.
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.
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
- 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
- LAUNCHXL-F280049C, LAUNCHXL-F28379D, MSP430F5529, many TI boards to play with~
- Starting from the end of this year, you will not be able to buy 2G data cards
- [Artry AT32F421 Review] Power Supply --- Settings
- Domestic chip replacement is the general trend! Take the topic of "replacement and why to replace" of ST chips, welcome everyone to speak...
- 【ST NUCLEO-H743ZI Review】(2) First experience with Ethernet testing
- What is TV_RM? What is its function?
- Application of capacitors in circuit design
- [TI Course] Is there any problem with Figure 4.3.2 of 4.3.1 Differential Amplifier?
- 【Motor Control】Data on motor control algorithms and methods
- Serial port debugging assistant