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
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.
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: 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.
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.
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.
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
- Popular Resources
- Popular amplifiers
- Mir T527 series core board, high-performance vehicle video surveillance, departmental standard all-in-one solution
- Akamai Expands Control Over Media Platforms with New Video Workflow Capabilities
- Tsinghua Unigroup launches the world's first open architecture security chip E450R, which has obtained the National Security Level 2 Certification
- Pickering exhibits a variety of modular signal switches and simulation solutions at the Defense Electronics Show
- Parker Hannifin Launches Service Master COMPACT Measuring Device for Field Monitoring and Diagnostics
- Connection and distance: A new trend in security cameras - Wi-Fi HaLow brings longer transmission distance and lower power consumption
- Smartway made a strong appearance at the 2023 CPSE Expo with a number of blockbuster products
- Dual-wheel drive, Intellifusion launches 12TOPS edge vision SoC
- Toyota receives Japanese administrative guidance due to information leakage case involving 2.41 million pieces of user data
- 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
- EAC0945 wince6.0 BSP compilation manual
- Question: How to handle power-off reset of MSP430G2553 microcontroller?
- How to judge the positive and negative turning angle in PID vehicle lateral control
- Can anyone share a cracked version of ATLIUM? I recently changed my computer and my previous AD9 can no longer be cracked.
- [GD32L233C-START Review] 2. Create a new project step by step
- Zigbee network data transmission method
- What exactly is op amp noise?
- PICO Solar System Clock
- ST MEMS device resource library (official ST information, practical information)
- How to effectively charge lead-acid batteries with unstable low voltage?