For centralization, the automation of lighting control is realized, but the dimming control of the lighting system cannot be performed.
In addition, with the continuous improvement of living standards, people's demand for wireless, networked, intelligent and energy-saving daily life is becoming stronger and stronger. The above two traditional lighting control systems can no longer meet people's demand for daily life quality. Based on the above reasons, a design of indoor intelligent lighting system based on ZigBee and STM32 is proposed.
1 Overall system design
This system is mainly composed of terminal nodes, router nodes and coordinator nodes. The three nodes have their own responsibilities. The terminal node is mainly responsible for the transmission of messages and allows other nodes to access the network through it; the coordinator node is mainly responsible for the establishment, maintenance and management of the network, as well as the collection, processing and display of the entire network data information. Among the three nodes, the coordinator node is the core of the entire network. The overall design block diagram of the system is shown in Figure 1.
The main functions of this design are as follows:
(1) Use LED lamps with dimming modules, which can automatically adjust the light brightness through program control, and use the mutual compensation between indoor lights and natural light to keep the indoor illumination at an appropriate state;
(2) Using illumination collection nodes, indoor illumination can be collected and monitored in real time;
(3) Add power-off self-locking function (all lamps will be turned off when power comes back on in case of a sudden power outage);
(4) Add some scene modes, which can easily select the lighting environment when different indoor environments are needed (such as theater mode when watching TV with the family, study mode when reading and writing, etc.).
In addition to the above main functions, this design also reserves some peripheral interface circuits, and some corresponding sensors can be added to achieve more functions (such as adding gas sensors to prevent kitchen gas leaks, adding smoke sensors to prevent fires, etc.)
2 System Hardware Circuit Design
The system hardware circuit mainly consists of four parts: coordinator node circuit, system illumination acquisition node circuit, system LED dimming node circuit and system router node circuit.
2.1 System illumination node circuit design
The illumination acquisition node is composed of CC2530 and light illumination sensor (BH1750FVI). This node mainly collects indoor illumination in real time and sends it to the coordinator through the ZigBee module. The coordinator then integrates and processes the received illumination information, and then displays the indoor illumination information on the LCD in real time. According to the illumination information, it sends corresponding instructions to the LED lighting node to adjust the brightness of the LED light accordingly.
The BH1750FVI sensor is a photoelectric integrated sensor with the following main features: 1) It can output digital values corresponding to brightness; 2) A wide input light range (equivalent to 1-65535lx); 3) Low current is achieved by reducing the power function; 4) No other peripheral components are required; 5) Weak dependence on light sources (incandescent lamps, fluorescent lamps, halogen lamps, white light LEDs, fluorescent lamps).
The hardware circuit diagram of the illumination node is shown in Figure 2.
2.2 System LED dimming node circuit design
The LED dimming node consists of CC2530 and a dimming module. The dimming module can adjust the brightness of the LED light in real time according to the instructions received by the ZigBee module. The purpose of dimming is to make the indoor natural light and LED light compensate each other so that the indoor illumination reaches a suitable state.
The dimming module of this node uses the LED constant current drive PWM dimming module. The hardware circuit diagram design of the LED dimming node is shown in Figure 3.
2.3 System Router Node Circuit Design
The router node is a CC2591 module extended on the CC2530 module. This module is a truly well-designed wireless transceiver module with PA+LNA. This node is mainly responsible for receiving terminal node information and forwarding it to the coordinator, or forwarding the coordinator's feedback information to the terminal node.
In an open field, the transmission distance of CC2530 can reach 100m, but in an indoor environment, due to the obstruction of walls, there is a path loss problem, and the actual transmission distance is greatly shortened. If only a routing node composed of CC2530 is placed in the middle of the room, it is likely to cause data transmission errors or even data loss. Therefore, when actually designing the circuit, the router node adopts the combination of CC2591+CC2530. CC2591 is a 2.4GHz RF front-end chip, which can increase the transmission power through PA, thereby extending the communication distance. The chip can also improve the sensitivity of the receiver through LNA. The above two points can well ensure the integrity of the data transmission of the system. The CC2591+CC2530 hardware circuit is shown in Figure 4.
2.4 System Coordinator Node Circuit Design
The coordinator node is composed of STM32F107, CC2530, 12864LCD, matrix keyboard, DS18B20 and DS1302 modules. This node is the core of the entire system, mainly responsible for the establishment and maintenance of the network, the addition and deletion of control terminal nodes, and the processing and display of the entire system information. Among them, STM32F107 is a new STM32 interconnected microcontroller launched by STMicroelectronics. This chip integrates various high-performance industrial standard interfaces, and different models of STM32 products have perfect compatibility in pins and software, which can adapt to a variety of applications. In addition, the chip can also be embedded in the μC/GUI system, has an independent 32-bit instruction bus and data bus, and fully supports 32-bit Thumb-2 and 16-bit Thumb instructions.
The matrix keyboard circuit uses a 2×4 matrix keyboard for clock time adjustment and selection of different scenario modes; the display circuit uses a 12864 LCD, which can display 4 lines of information, with 16 characters per line, fully meeting the requirements of displaying illumination, time and temperature.
The schematic diagram of the hardware circuit of the coordinator node is shown in Figure 5.
3 Software design
The software part is mainly responsible for programming the hardware circuit of the entire system. The terminal node program mainly completes the collection, upload and control of information. The coordinator node program is used to realize the establishment, maintenance and management of the entire network, as well as the collection, processing and display of corresponding data. 3.1 Coordinator node software design
The coordinator node first determines whether there is data transmission. If so, it selects a channel to establish a network, scans and reads data, and packages and sends data. Since power consumption is mainly concentrated in the wireless data transmission and reception stage, it is placed in a sleep state before receiving a wake-up command from a clock signal, in order to extend the battery life and reduce power consumption. The program flow chart is shown in Figure 6.
3.2 Terminal Node Software Design
The software design of terminal node data collection includes two parts, namely, the single-chip CC2530 driver design and the sensor data transmission and reception program design. First, the module is initialized, and then the timer is started. The channel is scanned at regular intervals to see if there is a network application instruction. If so, first determine which sensor port to start, and then send a data collection request to the port. After the collection is completed, the single-chip microcomputer is put into sleep mode, and the collected data is sent to CC2530 for further processing. The program flow chart is shown in Figure 7.
3.3 Router Node Software Design
In the program, the device type is set as a network routing node. In the ZigBee protocol stack, you only need to change the application layer event processing function so that it calls the program to send the received information after receiving it.
4 System Debugging
In order to test the function of the system, the dormitory was selected as the experimental site. Three lighting nodes and one illumination acquisition node were placed in each of the three bedrooms of the dormitory, and then the function of the system was tested. Through the test, the system can accurately realize the wireless control function. The illumination node can accurately collect the light illumination information of the environment, the ZigBee module can normally transmit data to each other, and the PWM dimmer module can accurately adjust the brightness of the LED lights. In addition, various scene modes, such as indoor temperature and clock information, can work normally according to the predetermined indicators.
5 Conclusion
This wireless intelligent lighting system can not only be used for fully automatic control of indoor lighting, but also can be adjusted manually according to different needs, which can save energy and make the indoor illumination reach the best state suitable for human activities. This system has the characteristics of small size, low power consumption, strong function and flexible expansion. In addition, this system can be used not only in home but also in various occasions such as school classrooms, company office areas, conference rooms and KTV. It only needs to adjust the corresponding modules and programs when using it. This system has broad application prospects in the field of intelligent lighting control.
Previous article:Discussion on circuit design issues related to LED lightning protection
Next article:Design and implementation of solar LED street lamp based on 51
- Popular Resources
- Popular amplifiers
- MathWorks and NXP Collaborate to Launch Model-Based Design Toolbox for Battery Management Systems
- STMicroelectronics' advanced galvanically isolated gate driver STGAP3S provides flexible protection for IGBTs and SiC MOSFETs
- New diaphragm-free solid-state lithium battery technology is launched: the distance between the positive and negative electrodes is less than 0.000001 meters
- [“Source” Observe the Autumn Series] Application and testing of the next generation of semiconductor gallium oxide device photodetectors
- 采用自主设计封装,绝缘电阻显著提高!ROHM开发出更高电压xEV系统的SiC肖特基势垒二极管
- Will GaN replace SiC? PI's disruptive 1700V InnoMux2 is here to demonstrate
- From Isolation to the Third and a Half Generation: Understanding Naxinwei's Gate Driver IC in One Article
- The appeal of 48 V technology: importance, benefits and key factors in system-level applications
- Important breakthrough in recycling of used lithium-ion batteries
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- CGD and Qorvo to jointly revolutionize motor control solutions
- CGD and Qorvo to jointly revolutionize motor control solutions
- Keysight Technologies FieldFox handheld analyzer with VDI spread spectrum module to achieve millimeter wave analysis function
- Infineon's PASCO2V15 XENSIV PAS CO2 5V Sensor Now Available at Mouser for Accurate CO2 Level Measurement
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- A new chapter in Great Wall Motors R&D: solid-state battery technology leads the future
- Naxin Micro provides full-scenario GaN driver IC solutions
- Interpreting Huawei’s new solid-state battery patent, will it challenge CATL in 2030?
- Are pure electric/plug-in hybrid vehicles going crazy? A Chinese company has launched the world's first -40℃ dischargeable hybrid battery that is not afraid of cold
- [GD32L233C-START Review] Part 1: Any surprises after unboxing?
- FAQ_About BlueNRG-2 port retention in low power mode
- A batch of KSZ8041NLI-TR Ethernet transceiver chips are available.
- GD32E230C finally downloaded and burned successfully
- MSP430 MCU general I/O port settings sharing
- STM32MP157A-DK1 Review (1) Official OpenSTLinux Flashing
- pyboard receives serial port data conversion problem
- Notepad Editor - Verilog Code Snippets and Syntax Checker
- [ESK32-360 Review] + Getting to know the ESK32-360 development board
- TI-83 Premium CE Python Edition Calculator