LED Intelligent Lighting System Based on STC Microcontroller

Publisher:Ziyu2022Latest update time:2011-10-29 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1 Introduction

LED is called the fourth generation of lighting source or green light source. The light-emitting device of LED is a cold light source, which has the characteristics of energy saving, environmental protection, long life and small size. The light efficiency of incandescent lamps and halogen tungsten lamps is 12-24lm/W, fluorescent lamps are 50-70lm/W, and sodium lamps are 90-140lm/W, and most of the power consumption becomes heat consumption. LED can reach 50-200lm/W, and the monochromaticity of single light is good, the spectrum is narrow, and no filtering is required, and it can directly emit colored visible light. Under the same lighting effect, the power consumption is about one-tenth of incandescent lamps and one-half of fluorescent lamps. A fluorescent lamp with the same effect is more than 40 watts, while the power of each LED is only 8 watts. The average life of LED is 100,000 hours, with strong safety and reliability, and does not contain mercury, sodium and other substances that may endanger health. It is beneficial to environmental protection and is called "green lighting source".

2 Intelligent lighting control solution design

Photoresistors are used to detect the intensity of indoor light, and passive pyroelectric infrared detectors can detect the characteristics of the human body. The sensor transmits the detection data to the control core - the single-chip microcomputer, which controls the opening, closing and illumination of the lighting equipment according to the processing results. Figure 1 is a block diagram of the principle of the intelligent lighting control solution.

Lighting control scheme block diagram

The system mainly consists of three parts: sensor part, controller part and LED driving circuit and lighting system, see Figure 1.

3 System Hardware Design

3.1 Sensor part

3.1.1 Passive pyroelectric infrared detector

The detector has three key components: Fresnel filter chip, which acts as a bandpass filter through a filter chip with a cutoff wavelength of 8 to 12μm, so that environmental interference is significantly controlled; Fresnel lens, which has a focusing effect, that is, refracting (reflecting) the pyroelectric infrared signal on the pyroelectric infrared sensor. The second function is to divide the warning area into several bright and dark areas, so that moving objects entering the warning area can generate changing pyroelectric infrared signals on the pyroelectric infrared sensor in the form of temperature changes, so that the pyroelectric infrared sensor can generate changing electrical signals; the pyroelectric infrared sensor converts the changes in infrared radiation energy passing through the filter chip into electrical signals, which is called thermoelectric conversion.

The human body has a constant body temperature, generally at 37 degrees, so it emits infrared rays with a specific wavelength of about 10μm. Passive infrared probes work by detecting infrared rays of about 10μm emitted by the human body. The infrared rays of about 10μm emitted by the human body are enhanced by the Fresnel filter and gathered on the infrared sensing source. The infrared sensing source uses pyroelectric elements. When this element receives a stable change in infrared radiation from the human body, it will lose its charge balance and release the charge outward, which will produce a change in the level after detection and processing.

Based on this principle, a stable infrared module is used. When someone is walking, the module outputs 3.3V voltage, and when no one is around, it outputs a low level. The module has an adjustable delay, which can reach up to 18 seconds. [page]

3.1.2 Ambient Brightness Sensor Module

The core component of this sensor module is the photoresistor. A photoresistor is a resistor made by the photoelectric effect of a semiconductor, and its resistance value changes with the intensity of the incident light; when the incident light is strong, the resistance is small, and when the incident light is weak, the resistance increases. Photoresistors are generally used for light measurement, light control, and photoelectric conversion (converting light changes into electrical changes), see Figure 2.

Relationship between photoresistance value and light intensity

Circuit diagram of ambient brightness module

3.2 Control part

STC12C5628AD series MCU is a single clock/machine cycle (IT) MCU produced by Hongjing Technology. It is a new generation of 8051 MCU with high speed/low power consumption/super strong anti-interference. The instruction code is fully compatible with the traditional 8051, but the speed is 8 to 12 times faster. It has an internal integrated MAx810 dedicated reset circuit. 4-channel PWM, 8-channel high-speed 10-bit A/D conversion, for motor control and strong interference occasions.

The main reason for choosing this type of microcontroller is that it has PWM and AD conversion functions, which greatly simplifies the peripheral circuit. At the same time, the generated PWM signal can be directly connected to the driver chip, which greatly reduces the cost of the system.

Since PWM dimming is adopted, in order to reduce unnecessary peripheral circuits, the selected driver chip can directly input PWM square wave through the DIM pin. [page]

The LM3407 is a pulse width modulated floating buck converter with integrated N-channel power MOS field effect transistors, designed to provide precise constant current output to drive high power light emitting diodes (LEDs). The LM3407 features a pulse level modulation (PLM) control scheme that ensures a constant current output accuracy of better than 10% over the entire input voltage and operating temperature range when an external 1% current setting thick film resistor is used. Another feature of the converter is a DIM pin that can receive standard logic pulses to control the brightness of the LED array, making the LM3407 an ideal device for precision power LED drivers or constant current sources.

4 Software Design

This program adopts modular design concept, with the main program as the core and two functional module subroutines set up, so that some functions can be implemented in the subroutines, simplifying the design structure. During the operation, the main program calls the functional module subroutines.

Schematic diagram of control module 3.3 LED driver module

[page]

Schematic diagram of the driver module

The system has two functional modules: 1 is the AD conversion module; 2 is the PWM generation module. They can be directly called in the main function, which greatly simplifies the design structure. The flow chart of the system is shown in Figure 6.

Overall flow chart of the system

5 Conclusion

After experimental verification, this system has achieved good results in energy saving and improving the lighting environment. It not only eliminates the nuisance of voice-controlled lights in the corridors of residential buildings, but also solves the problem of turning off lights in time to save energy. The selected LED lights are even called "green light sources in the 21st century."

The system has a simple structure and strong practicality. It can be applied to corridor lights in apartments, office buildings, bathroom lights, etc., and can achieve good lighting, energy saving and environmental protection effects.

Reference address:LED Intelligent Lighting System Based on STC Microcontroller

Previous article:Design of programmable filter for controllable amplifier based on single chip microcomputer
Next article:Research on LPC900 series microcontrollers in radio frequency data transmission modules

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号