Application of single chip microcomputer in intelligent lighting control

Publisher:chinalisaLatest update time:2012-03-16 Source: 电子工程师 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1 Introduction
With the continuous development of microelectronics technology, the application of single-chip microcomputers is becoming more and more extensive, and lighting control technology is facing revolutionary changes, with three major trends: electrification, networking, and integration. Traditional lighting is to divide the power line according to demand, and use mechanical switches to turn on and off the power. In this way, the system cannot be changed after it is fixed, and it is even more difficult to achieve complex control requirements. With the introduction of a large number of intelligent buildings, managers and residents have put forward many personalized requirements for lighting systems, which requires the introduction of new lighting control technologies. The characteristic of traditional lighting is that the power line and the control line overlap, and there is no concept of control information flow. One of the improvement methods is to separate the power line from the control line, that is, to lay a control signal line separately〔1〕〔2〕.
2 Overall composition and principle of the system
The composition of the four-unit intelligent lighting system is shown in Figure 1. The system consists of four units, K1, K2, K3, and K4. Each unit has four switches, A, B, C, and D, for centralized operation. Four A switches control the L1 light, four B switches control the L2 light, four C switches control the L3 light, and four D switches control the L4 light. The indicators for the four lights L1, L2, L3, and L4 are LD1, LD2, LD3, and LD4, respectively, which can realize centralized display. The four units K1, K2, K3, and K4 are the execution units for the four lights L1, L2, L3, and L4 respectively. The solid line is the 220V power line, and the dotted line is the control line. E is the do not disturb switch. After pressing this switch, it cannot accept remote control and can only accept control by this switch.
For example, the current status of the L1 light can be known through the indicator LD1. If it is dark (bright), press the A switch of K1 unit. After the single-chip microcomputer receives the signal, the L1 light is directly turned on because the A light is executed in K1 unit. At the same time, the frequency related to the A light is emitted to make the signal lights of other units brighter. You can also press the A switch of K2 (K3 or K4) unit. After the single-chip microcomputer of K2 (K3 or K4) unit receives the signal, it outputs a frequency consistent with the signal through the control line. After the single-chip microcomputer of K1 unit receives the signal, the L1 light is turned on and the LD1 light is turned off, achieving the purpose of remote control. The corresponding indicator lights of other units change, achieving the remote monitoring function.
The characteristics of this system are:
(1) Use one control line to control multiple signals;
(2) Centralized control, centralized display, and multi-point operation;
(3) Use electronic components to control the power on and off;
(4) Self-locking when power off;
(5) No disturbance;
(6) The entire system is controlled by a single-chip microcomputer and data communication is intelligent.

3 Hardware Design〔3〕
3.1 Hardware Block Diagram
To realize the three functions of centralized and remote control, centralized and remote display and execution, the hardware block diagram shown in Figure 2 can be used. The entire circuit is divided into four modules: power supply, output, switch, display and microcontroller main circuit. This is a control system with a microcontroller as the core. Different execution units are determined by different frequencies carried on a control line. Considering the requirements of volume, power consumption and function, a high-performance, low-power microcontroller produced by Microchip is selected (working current is less than 2mA, standby current is less than 3μA).

3.2 +5V/+12V power supply
Considering the requirement of small size, transformer cannot be used. Resistor and capacitor voltage division can be used, and then a bridge circuit can be formed through diode and voltage regulator to provide +12V DC power supply. +12V power supply can be realized through voltage regulator 78L05 to achieve +5V DC power supply. Meet the needs of control circuit.
3.3 Switch and display control module
Because there are few switches, independent buttons are used. The display uses the characteristics of PIC output drive current (up to 20mA) to directly drive the LED. [page]
3.4 Control signal
The control signal input and output realize the control function between K1, K2, K3, and K4 units. Press the A (or B or C or D) switch of any unit to output a certain frequency, and distinguish different switches according to different frequencies. At the same time, a control line can transmit different frequencies to realize control, and the microcontrollers of other units will respond accordingly after receiving the signal. Therefore, there are a total of four units to form a system, and each unit is different.
3.5 Output part
The output signal of the single-chip microcomputer cannot directly control the relay. It must be amplified by the transistor before it can control the relay to turn on and off, and then the relay contacts control the light on and off.
4 Software part〔4〕
4.1 Software overall block diagram
The single-chip microcomputer receives three parts of signals, namely the switch signal, the chip select signal and the external input signal. After the single-chip microcomputer processes, it outputs the coded signal and the LED signal. The software mainly completes three functional modules: the switch and display module, which realizes the input and output of the corresponding signal from the single-chip microcomputer; the control signal module, which realizes the module control signal to output in code; the external input module, which realizes the control module to receive the external control signal. For each single-chip microcomputer, its software overall block diagram is shown in Figure 3.


4.2 Software Anti-interference
Due to the complexity of the actual use environment, various interferences are hard to prevent, and reliability is the primary problem we face. The main anti-interference technologies used here are: watchdog technology, loop correction anti-paralysis technology and digital filtering technology.
WDT prevents "runaway". "Runaway" means that the PC value exceeds the application program area and runs the number outside the program as the instruction code. The operation of the WDT watchdog can generate a reset signal in the "runaway" state, effectively preventing the program from "runaway".
Loop correction prevents paralysis. The loop correction compares the feedback code with the original code sent, and makes different treatments for signal interruption, error code influence and self-locking state, effectively preventing the system from paralyzing due to response errors or response interruptions.
5 Conclusion
The design of this system fully considers the size of the actual socket volume of the lighting system, as well as various technical details and specifications. The research on intelligent lighting has just started, and its design ideas have certain reference value for relevant personnel.

References

1 Chen Zhuxing. Modern lighting control technology. Electrical World, 98 (1)
2 Zhou Yong. CEBus Demonstration System. http://www.hometoys.com, 2000.6
3 Dou Zhenzhong. PIC series microcontroller principle and program design. Beijing: Beijing University of Aeronautics and Astronautics Press, 1999
4 Zhang Songchun et al. Anti-interference of electronic control equipment and its application. Beijing: Machinery Industry Press, 1998
Reference address:Application of single chip microcomputer in intelligent lighting control

Previous article:Serial data exchange between PIC microcontroller and PC
Next article:PIC microcontroller software asynchronous serial port implementation skills

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号