LED Intelligent Lighting System Based on STC Microcontroller

Publisher:technology1Latest update time:2011-08-27 Source: 21icKeywords:STC 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 lamp and halogen tungsten lamp is 12-24lm/W, fluorescent lamp is 50-70lm/W, sodium lamp is 90-140lm/W, and most of the power consumption becomes heat consumption. LED can reach 50-200lm/W, and the single light has good monochromaticity, narrow spectrum, no need to filter, and can directly emit colored visible light. Under the same lighting effect, the power consumption is about one-tenth of incandescent lamp and one-half of fluorescent lamp. 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.

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.

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

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.

Keywords:STC Reference address:LED Intelligent Lighting System Based on STC Microcontroller

Previous article:Analysis of specific requirements for LED packaging technology for display screens
Next article:Heat dissipation structure design and parameter optimization of high-power LED street lights

Recommended ReadingLatest update time:2024-11-16 17:53

STC single chip AD conversion program design
#include reg52.H #include intrins.H sfr P1_ADC_EN = 0x97; // A/D conversion function enable register sfr ADC_CONTR = 0xC5; //A/D conversion control register sfr ADC_DATA = 0xC6; //A/D conversion result register sfr P1M0=0x91; sfr P1M1=0x92;       #define uchar unsigned char ; #define uint unsigned int ; void delay(u
[Microcontroller]
How to calculate stc12c5a60s2 crystal oscillator frequency
The STC12C5A60S2/AD/PWM series microcontroller is a single clock/machine cycle (1T) microcontroller produced by Hongjing Technology. It is a new generation of 8051 microcontroller with high speed/low power consumption/super anti-interference. The instruction code is fully compatible with the traditional 8051, but the
[Microcontroller]
How to calculate stc12c5a60s2 crystal oscillator frequency
stc electronic table c51 program V2.0
The circuit is very simple, so I won't draw it. It is made of STC series microcontroller. The display part is two 74hc573 chips connected to P1 port, and then use P3.0 to control the segment selection. The key definition program has instructions. It is very easy to build. The picture below is the effect. I soldered it
[Microcontroller]
stc electronic table c51 program V2.0
STC12 series MCU cold start, hot start
Cold start - refers to powering on again after power failure. Cold start is when downloading a program, in order to detect whether there is a download signal on the chip. If there is, download; if not, execute the original program. Hot start - means that when the power is on, a reset signal (there are other types of
[Microcontroller]
STC12 series MCU cold start, hot start
51 MCU (STC89C52RC) IO expansion experiment
  Recently, I have encountered a situation where I need to expand the IO ports. I am trying to squeeze out a few IO ports from the lcd1602. Another feasible method is to add a dedicated IC. I found a better way after searching on Google. The classic IO-to-key method circulated on the Internet can use 5 IO ports to rea
[Microcontroller]
51 MCU (STC89C52RC) IO expansion experiment
STC MCU Best Chip Selection for Beginners
When I first started learning microcontrollers, I read a lot of books and materials, but many people still encountered a very puzzled problem like I did back then, mainly because we all wanted to practice. We would feel uneasy if we didn’t have our own microcontroller circuit. So we started to design the minimum system
[Microcontroller]
8051 MCU (STC89C52) two countdown timers count synchronously
Here, timer 0 is required to provide 5ms precise timing, so each timing cycle requires (5*10^-3)/(1*10^-6)=5000 times of adding 1 count, so the initial value of timer 0 is set to 65536 - 5000 = 60536 = EA84H. Here we first implement two countdown timers working simultaneously, and the next step is to consider how to
[Microcontroller]
8051 MCU (STC89C52) two countdown timers count synchronously
Design of automatic batching control system based on STC12C5A60S2
  1. Introduction   In large-scale industrial production, materials need to be weighed and proportioned. At present, factories generally use two methods. The first method uses manual weighing, and then puts various raw materials in proportion into the batching machine at the same time for mixing; the other method is
[Microcontroller]
Design of automatic batching control system based on STC12C5A60S2
Latest Power Management 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号