Design and application of LED lighting controller based on Zigbee technology

Publisher:云自南国来Latest update time:2012-10-24 Source: 电子设计工程 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Abstract: This design mainly applies Zigbee wireless technology to LED lighting projects, solving the problems of serious power consumption and short service life of incandescent lamps, and at the same time solving the problems of complex wiring, high power consumption, large waste of resources, distance restrictions, and difficult maintenance in lighting projects. Based on the advantages of short distance, low power consumption, low data rate, low cost, and low complexity of Zigbee technology, a smart home LED lighting wireless control system based on Zigbee technology is designed. Mainly using Zigbee wireless ad hoc network technology, wireless control of the switch and brightness adjustment of LED lights is realized, and the functions can be divided into single light control and local light control.

At present, my country is vigorously promoting the policy of replacing incandescent lamps with LED lamps, and the implementation will be completed within five years. This policy solves the problem of serious lighting power consumption and short service life. In addition, the engineering wiring is complicated and the installation is complex, it is not easy to move and control, the energy consumption is large, the construction period is long, and the later maintenance is difficult. These problems still need to be solved. The wide application of Zigbee technology provides a solution to the current problems, and it has achieved the purpose of convenience and speed for family life and office buildings, and the purpose of efficiency and safety for comprehensive management personnel. This paper proposes a design scheme combining Zigbee wireless ad hoc network technology with LED energy-saving lamps to realize the functions of continuous adjustment and remote control of the brightness of LED lamps, and introduces the software and hardware design system in detail.

1 Zigbee Wireless Technology

Zigbee technology is a wireless communication technology between various electronic devices at a short range and low transmission data rate. It is a group of wireless standards developed based on the IEEE-approved 802.15.4 wireless standard, which determines the application outline that can be shared between different manufacturers. Zigbee-compatible products work in the 2.4 GHz free and open frequency band, which provides 16 transmission channels. Each communication will autonomously select a channel with the cleanest and least interference for data transmission. In terms of the network layer, star and mesh topologies can be used. According to the different functions of the nodes, they can be divided into central coordinator Coordinator, routing node Router and terminal node FFD. Among these three topologies, it is not easy to realize the advanced features of Zigbee in the star network, that is, the routing function. Each Zigbee device can only communicate directly with the PANC. The mesh network is the most complex, allowing routing, and the routing path is the best path automatically calculated. After the network is established, if any device fails, the device in the network will recalculate the routing path so that it does not affect the normal communication of other devices in the network.

Therefore, this system adopts a tree network structure, which is simple and easy to implement functions.

1.1 Advantages and Features of Zigbee

1) Low power consumption is the biggest advantage of Zigbee technology. In the communication state, the Zigbee terminal consumes about tens of milliwatts, and in the power saving mode, it consumes only tens of μW, which is equivalent to a dry battery that can work for nearly a year.

2) Reliability: A collision avoidance mechanism is adopted, and dedicated time slots are reserved for communication services that require fixed bandwidth to avoid conflicts when sending data; the node modules have the function of automatic dynamic networking, and the transmitted information is transmitted through automatic routing in the entire Zigbee network, thereby ensuring the reliability of information transmission.

3) Large network capacity: On the same WPAN, there can be 65,536 ZigBee devices, which can transmit information to each other through multiple hops and have wireless network self-healing capabilities.

4) Large effective range: The effective range is between 10 and 75 m. If the preamplifier can reach a communication distance of 1,000 m.

5) Low cost: Zigbee has a low data transmission rate, a simple protocol and is free of patent fees, thus reducing costs.

1.2 Zigbee Wireless Networking Principle

In the network layer, ZigBee defines three roles: The first is the central coordinator, which is responsible for establishing the network and allocating the locations of each node in the network; the second is the router, which is mainly responsible for finding the network, establishing and repairing the data routing path, and forwarding the data. The router can communicate with the coordinator, with the terminal node, and with each other; the third is the terminal node (FFD), which can only choose to join the already formed network, can send and receive data information with the router, but cannot forward information and does not have routing function. The communication diagram is shown in Figure 1.

Figure 1 Communication diagram

Figure 1 Communication diagram

Working principle: Each terminal node or router in the system controls one or more lights respectively. Each node has a separate network address. The handheld control terminal sends commands to the coordinator through the wireless module, and the coordinator sends the received commands to each node through wireless transmission.

2 System Hardware Design

There are two ways to implement dimming: analog and pulse width modulation (PWM). When using analog dimming technology, the screen brightness can be reduced by 50% by simply reducing the current of the white light LED to half of the maximum value. The disadvantage of this method is that the LED light color will move and an analog control signal is required, so this system uses PWM dimming technology. PWM dimming technology will provide full current to the white light LED, but will reduce the current load cycle to achieve the dimming requirements. For example, to reduce the brightness by half, only 50% of the load cycle is required to provide full current. The PWM signal frequency is usually more than 100 Hz to ensure that this pulse current will not be detected by the eye. The maximum value of the PWM frequency depends on the startup and response time of the power supply. In order to obtain maximum flexibility and make integration easier, the white light LED driver should be able to accept a PWM frequency of up to 50 kHz.

The hardware system is composed of LED lamp driver module, LED power driver module and Zigbee wireless transmission module, etc. The hardware circuit logic block diagram is shown in Figure 2.

Figure 2 Hardware circuit logic block diagram.

Figure 2 Hardware circuit logic block diagram.

The LED lamp driver uses the PT4207 driver chip. The PT4207 is a high-voltage step-down LED driver control chip used to drive one or more LED lamps. Its input voltage range is 20~450 V, which can achieve stable and reliable operation within the range of 85~265 VAC and ensure the high efficiency of the system. At the same time, the built-in input voltage compensation function greatly improves the stability of the LED current under different input voltages. The PT4207 also has functions such as load short-circuit protection, open-circuit protection and over-temperature protection. Its dedicated dimming pin can directly accept PWM pulse dimming and add the PWM signal to the DIM pin. The low level of the PWM signal should be less than 0.35 V, and the high level should be between 2.5~5 V. In order to achieve a better dimming effect, the PWM signal pulse frequency is preferably less than 1% of the minimum operating frequency. The simple driving principle diagram is shown in Figure 3.

Figure 3 PT4207 driving principle diagram

Figure 3: Driving schematic diagram of PT4207.

Zigbee wireless communication module mainly uses CC2530. CC2530 is a true system-on-chip (SoC) solution for 2.4-GHz IEEE 802.15.4, ZigBee and RF4CE applications. It has extremely high receiving sensitivity and anti-interference performance, and can build powerful network nodes with very low total material cost. CC2530 combines the excellent performance of leading RF transceivers, industry-standard enhanced 8051 CPU, in-system programmable flash memory, 8-KB RAM and many other powerful features. CC2530 has four different flash versions of 32/64/128/256KB. This system uses 256KB flash memory. CC2530 has different operating modes, making it particularly suitable for systems with ultra-low power requirements. The short conversion time between operating modes further ensures low energy consumption. This system changes the brightness of the light by changing the PWM output. Timer 1 of CC2530 is a 16-bit timer with timer/PWM function. It has a programmable frequency divider, a 16-bit period value, and five individually programmable counter/capture channels, each with a 16-bit compare value. A 16-bit capture register is also used to record the exact time of receiving/sending a frame start delimiter, or the exact time of the end of transmission, and a 16-bit output compare register can generate different strobe commands (start RX, start TX, etc.) to the wireless module at specific times. Each counter capture channel can be used as a PWM output or capture the timing of the input signal edge. Timer 2 is specially designed to support IEEE802.15.4 MAC or other time slot protocols in software. Timer 3 and Timer 4 are 8-bit timers with timer/counter/PWM functions.

3 System Software Design

IAR Embedded Workbench for MCS-51 7.51A was selected as the IDE for Zigbee development. Based on the TI Z Stack protocol stack, the system application code was written and the host computer program was written using VC.

Z Stack provides a rich debugging function debugging interface. The system software mainly includes the coordinator node program and the router node program. The coordinator is the first-level node, responsible for building the network. After the network is built, the node ID address will be assigned. The coordinator receives the command sent by the handheld control terminal and sends the control command to the node to implement the corresponding control. Figure 4 is the workflow diagram of the coordinator.

Fig. 4 Coordinator workflow diagram.

Fig. 4 Coordinator workflow diagram.

The following is extended to the second level, third level or even multiple levels. As long as they are in the same network, the corresponding control can be implemented. The coordinator receives the command and sends the control command to the router or terminal node at the same time. If the command is sent directly to the router, the router will execute the corresponding command. It can also be sent to the terminal node through the router, and the terminal node will execute the corresponding command. Figure 5 is a workflow diagram of the router (including the terminal node).

Figure 5 Router (including terminal nodes) workflow diagram

Figure 5 Router (including terminal nodes) workflow diagram.

4 Function Implementation

The control terminal is a handheld remote control with a wireless transceiver module. When the remote control is added to the network, it will automatically identify the ID address of each node and control it by sending commands to the node. The brightness of a single light can be adjusted by sending control commands to a single node, or some nodes can be formed into a local area network and stored in the remote control. By sending commands to this local area network, the lighting of all nodes in the local area network can be controlled.

5 Conclusion

The wireless control of lights is realized through Zigbee technology, which solves the problems of complex wiring, poor scalability, high price, high power consumption and blind spots in the communication range of the home intranet. Wireless communication in home residences or offices is realized. The control system constructed has the characteristics of low power consumption, low cost, convenient development and easy expansion. Moreover, it brings convenience to people to control it through a handheld remote control. As the country vigorously promotes the use of LED energy-saving lighting, Zigbee wireless lighting control has a broad market, and it can be further expanded to wireless control of household appliances in smart homes, and even remote wireless control. Based on the various advantages of Zigbee technology, it will have great development space in the Internet of Things, especially in school dormitories, teaching buildings, libraries or canteens.


Reference address:Design and application of LED lighting controller based on Zigbee technology

Previous article:Design of internal network of smart home system based on ZigBee technology
Next article:Wired Network Convergence Solution Based on Digital RF Modulator

Latest Security Electronics 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号