1. Introduction to the wireless LED lighting system
The lighting system is closely related to the people's life, but most of the lighting systems are opened and closed using various common switches. The brightness adjustment of the light is also adjusted by ordinary dimming open light. Each time you perform a lighting system must go to the switch to complete, and one switch generally only correspond to a luminaire, resulting in a lot of switches that need to be installed, so it is necessary to design a wireless remote transmit receiving device with a set of collective light and switch. Improve the intelligence of the lighting system. This will effectively overcome the drawbacks of traditional wired control, reduce the line layout, and make people freely to perform corresponding operations anywhere. Based on this requirement, this paper designs a solution for wireless LED lighting systems, which has very rich features. Specifically, there are several features:
1, centralized control and multi-point operation;
2, soft start function: When the light is turned, the light is brightly bright, when the light is turned off, the light is brightly dimensionally. Avoid high current shocks, protect lighting systems, extend service life;
3, the light is brightly adjustable: adjust the brightness of different lights, easy to operate;
4, full open and memory function;
5, timing control function;
6, brightness adaptive adjustment;
2. System structure and overall plan design
This paper is designed with Ti's CC430 wireless communication platform that combines 16BIT-based ultra-low power MSP430 core and industry-leading less than 1GHz CC1101 RF transceiver. Perfect combination achieves a unique low-power / high performance combination with unprecedented high intensity, which brings more advanced high selectivity and high-alucting performance to ensure reliable communication even in noise environments. It is possible to take advantage of its peak execution performance, and power consumption is only 160ua / MHz. For CC430-based equipment, TI provides a variety of MSP430 MCU peripherals, such as high-performance figures such as ADC, LCD drivers, and comparators, 12-Bit, and analog external settings. In addition, the AES-128 hardware security module ensures the security of communication.
The overall block diagram of the wireless LED lighting system is shown in Figure 1. The control end portion is designed to be a hand-held remote control module powered by a Double AA battery, which is based on CC430F6137, a segment LCD drive, rich I / O port resource, and a comparator capable of building touch functions; and receiving end Based on CC430F5137, it comes with 12-Bit ADC and multi-channel PWM modules. By constructing a touch slider and the button function on the comparator B of the control terminal CC430F6137, the touch position of the slider is detected and converted to the PWM, and the corresponding modulation parameters are transmitted / received by bilateral RF modules. The receiving end CC430F5137 generates a PWM signal that adjusts the brightness of the LED lamp, and modulates the drive module UCC 28810, as shown in FIG.
3. Hardware circuit design
3.1 RF Module Hardware Circuit Design
The CC430's RF module uses the industry-leading less than 1GHz CC1101 RF transceiver, which is a direct synthesis of RF frequencies, and its radio frequency synthesizer includes an LC-VCO of a complete chip and a mixer of a docking mode for frequency. Synthesis. The radio frequency receiving unit performs an RF signal with a low noise amplifier (LNA), and then operates in the frequency signal, data demodulation, and synchronization packages. The frequency range supported by the CC430 is: 300MHz ~ 348MHz; 389MHz ~ 464MHz; 779MHz ~ 928MHz; use 433 MHz carrier frequency in this design, in view of the low transmission rate required by the application, 3.2 kbps; Adjusting the output power via PATABLE to meet different distance needs.
The hardware circuit of the RF module is especially important in the design of the entire system, as shown in Figure 3. The C5, C9, L3, and L8 in the figure form a balance converter for converting the differential port RF_N / RF_P balancing circuit on the CC430 into a single-ended unbalanced RF signal, which is convenient for flowing the vibrator outside the cable shield. Frequency current truncation. L5, C10, and L4 in the figure constitute a band pass filter; L2, L6, and C8 constitute a low pass filter. The antenna of RF in this design is a whip antenna or a ceramic antenna.
3.2 Hardware circuit construct of touch slider
In this design, the control end portion is a handheld remote control module. The human machine interaction interface its design is mainly the LCD display and the touch button. The function of the touch slider is used to regulate the brightness of the LED, which is one of the more image and novel designs in the system. It fully utilizes the self-resource characteristics of the MSP430, and the touch button function based on the relaxation oscillation mode (RO) is constructed on the sensor COM_B and PCB Layout integrated comparator COM_B and PCB Layout, since it comes with REF reference in COMP_B. Voltage Configuration Network, therefore do not need to implement reference voltage networks like external hardware like COMP_A. As shown in FIG. 4, the number of oscillations in the fixed time is mainly measured by TIMERA. When the human hand touch is on the sensing capacitance, its own capacitance value is changed, so that the number of corresponding oscillations changes significantly. To determine the status of the touch / non-touch. Build a 4/5-level touch slider with 2 touch buttons.
3.3 Sensor Hardware Circuit Design
The use of the photosensor allows the LED lighting system to achieve brightness self-adjusting function, and the hardware circuit is shown in Figure 5. The photosensitive sensor uses a photosensitive resistance because it has good photoelectric properties and the price advantage, which is ideal for the use of light intensity detection. The system is mainly modified by the VO voltage, reflecting the change in the light intensity, and further modulation is performed on the PWM.
4. System software design
4.1 RF module implementation
In the entire system, the RF module is a bridge of communication transmission, and both bilateral RF software module design is required. The data packets of its transmission mode and reception mode are mainly processed by FIFO, and the format of one frame is shown in Figure 6:
● Precursor
● Sync word
● Optional length bit
● Optional address bit
● Data segment
● Optional CRC word
Fixed frame length mode is used during design. By setting of the register pktlen (=. 1881.fifo size).
TXBuffer [0] = packet_len;
TXBuffer [1] = host_address;
TXBuffer [2] = slave_address;
TXBuffer [3] = mode;
TXBuffer [4] = PWM_DATA;
TXBuffer [5] = TxBuffer [0] + TXBuffer [1] + TXBuffer [2] + TXBuffer [3] + TXBuffer [4];
At the time of transmission, the data segments in the TX FIFO include data length, host address, slave address, control mode, control PWM parameter, data segment CRC check. Among them, the host address identifies the address of the control terminal; the slave address includes two addresses: broadcast addresses and independent addresses, mainly for centralized control and multi-point operations. Control mode provides optional mode selection, controlling the PWM parameter for LED brightness adjustment.
When receiving, the RF demodulator and packet processor will look for a valid preamble and synchronization word. When it is found, the demodulator will get the leader and word synchronization, then perform the received address information, first determine if the packet is from the control terminal, and then the data containing the broadcast address or the local address information. The flowchart of its transmitting / reception is shown in Figure 7.
During the configuration of the RF register, it is mainly set by smartrfstudio, and RFREGSETNG.C is output as a radio configuration file.
4.2 Software Design of Touch Sloper
The touch slider is combined by a plurality of touch buttons, and a simple touch slider function can be implemented by assigning multiple locations for each touch button. In the design of 4 to 5 buttons constitute a touch slider, such as creating 8/16 locations on each touch button, 32/64 separate step detection can be available. The number of steps identified is the reflection of the capacitance change, the larger the capacitance change amplitude, the greater the measured Delta value. By setting a system to achieve the upper limit of the maximum response, the maximum Delta value is used to remove the number of steps required for each button, and then 1 to 32/64 steps will be generated after each button is weighted. Linear results, as shown
4.2 Control End / Receive Software Design
The flowchart of the control terminal / receiving end software is shown in Figure 9, in which the dashed line is the software design of the control terminal CC430F6137, the low power mode of the MSP430 is maintained in the STAND BY mode to meet the requirements of the control terminal remote control. . The centralized control and multi-point operation is implemented by the operation of the mode selection, and the processing of the touch slider is transmitted to the PWM by RF to the receiving end CC430F5137 by converting the position to the PWM. The receiving end processes the data packet from the control terminal, and the LED lighting is lifted, or automatically adjusted. This design software is written in C language. The submodules included in the entire program are: mode selection module, touch slider detection module, data transmission / reception module, PWM conversion module, sensor detection module, etc. Several parts.
MSP430
CC430
CC1101
LED breathing lamp
Our other product: