LED Intelligent Lighting System Based on STC Microcontroller

Publisher:自在逍遥Latest update time:2011-08-26 Source: EEWORLDKeywords: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 monochromaticity of single light is good, the spectrum is narrow, and it can directly emit colored visible light without filtering. Under the condition of the same lighting effect, the power consumption is about one-tenth of that of incandescent lamp and one-half of that 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:Design of home security system based on DTMF and CAN bus
Next article:Design and implementation of a hydrological cableway testing system

Recommended ReadingLatest update time:2024-11-16 16:32

STC MCU + DM134 to realize LED multi-segment control
  The microcontroller source program is as follows: //============================================================================ //=================Yingxin Technology LED Meteor Light 8 Segments 16 Segments==Software generates data================= //=================================================================
[Microcontroller]
STC MCU + DM134 to realize LED multi-segment control
Smart flowerpot design case based on STC89C52 microcontroller
Item name: Intelligent flowerpot design based on microcontroller Microcontroller: STC89C52 Function: 1. Display the temperature and humidity of the soil in the flower pot and the light intensity outside the flower pot through the display screen; 2. Use the buttons to switch the display interface and set the minimum
[Microcontroller]
Smart flowerpot design case based on STC89C52 microcontroller
Ultrasonic ranging program design based on STC89C52RC microcontroller
The STC89C52RC microcontroller ultrasonic distance measurement program and electronic production object collected on the Internet are tested using the smallest microcontroller system. The ultrasonic part uses the HC-SR04 module. The measurement range is: 4-300cm. In actual measurement, the longest length can reach 5.7
[Microcontroller]
14. STC15W408AS MCU IIC drives OLED
1. OLED display The STC15W408AS microcontroller does not provide an IIC bus interface, but we can implement it by simulating IIC. You can search online for information about the IIC bus. Here we take the 0.96-inch 128*64 OLED display screen that drives the SSD1306 chip as an example. The following figure shows the app
[Microcontroller]
14. STC15W408AS MCU IIC drives OLED
STC15 MCU ADC thermistor temperature measurement source program
Pinno Electronics STC15W4K-Experiment 29-ADC Thermistor Measuring Temperature The microcontroller source program is as follows: /************************************************************************************ * * Experimental platform: Pivot Electronics STC15W4K core board + Pivot Electronics "Pioneer" expansi
[Microcontroller]
16.STC15W408AS MCU obtains DS18B20 temperature
I have previously written about obtaining temperature data using DS18B20 in the Raspberry Pi series. At that time, the Raspberry Pi had a 1-wire interface that could directly read the temperature in the form of a file. 18. Raspberry Pi 3B+ 1-wire to obtain DS18B20 temperature There is no such interface in the STC mi
[Microcontroller]
16.STC15W408AS MCU obtains DS18B20 temperature
STC89C52MCU -- Dual-machine communication and multi-machine communication
The communication of single-chip microcomputer can be divided into long distance and short distance. Usually, the communication distance is within one meter, and the communication distance is about 1000 meters. If the distance is longer, other wireless devices are needed. Usually, there are four ways for single-chip m
[Microcontroller]
STC12C5410 MCU Simulation for Multimedia Projector Remote Control
At present, projectors are common equipment in multimedia classrooms of colleges and universities. However, due to frequent use and mixed personnel, the projector remote control is often damaged or lost. Because the projectors used in schools are all imported products, it is difficult to match the remote control, an
[Microcontroller]
STC12C5410 MCU Simulation for Multimedia Projector Remote Control
Latest Industrial Control 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号