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.
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
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
Previous article:Serial data exchange between PIC microcontroller and PC
Next article:PIC microcontroller software asynchronous serial port implementation skills
- 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
- Last day! Answer questions to win prizes! Practical sharing | Design a reliable switching power supply from scratch
- How to detect whether the switching power supply transformer is good or bad?
- micropython update: 2021.4
- The battery voltage is pulled down
- Is there any abnormal sound from the common mode inductor?
- There's a problem with the project
- bq27411-g1 (single-cell fuel gauge) bq27541 (single-cell fuel gauge) bq27546-g1 (single-cell fuel gauge)
- Playing with circuits (2) - Killing LM5175
- A post in the Audiophile Academy. I just want to ask why there is no loop phase shift when a resistor is added before the decoupling capacitor.
- TI teaches you how to overcome the three common problems in high-speed amplifier design