As people living standard rise, people more and more high to the requirement of lighting control, such as create a comfortable lighting environment, managing electric energy, improve the light life, etc. In order to improve the working environment of comfort, lighting control system adopt the light sensor, according to the current environment illumination lighting equipment automatic control, so that the intensity of illumination control within the scope of the comfortable.
in the traditional lighting control system, often using common light sensor, A/D converter ( ADC) The scheme. On the one hand, by the light of the light sensor detects the signal contains both composition of visible light and infrared light elements, to consider in the design of the filter out infrared light sensor test results, the influence of and the adoption of separation devices, thus lead to design more complicated; In illumination, on the other hand, the detection range is limited, is not conducive to realize multiplex illumination detection to the same place multiple lighting control areas. In this proposed multipath illumination detection scheme based on ISL29004, to simplify the system design, and USES the single chip microcomputer P87LPC768 as control core of intelligent lighting control equipment, in order to realize the control of multiple points area lighting equipment, in energy saving at the same time to create a more comfortable lighting environment. 1 summary of I2C bus
the I2C bus is PhiIips chips serial transmission between bus company, with secondary transmission, all nodes on the bus, such as the main device ( Microcontroller and microprocessor) , peripheral devices, such as interface module are connected to the same name on the SDA and SCL, realizes the perfect half duplex synchronous data transmission, can be easily constitute a multimachine system and peripheral device extension system. I2C bus device address hardware setup method, through software addressing completely avoided addressing method to select the piece of device, so that the expansion of the hardware system has a simple and flexible methods.
the I2C bus must follow the rules of data transmission format data transmission and data transmission controlled by the host controller, the host controller to start the data transmission, sending a start signal, addressing information, and at the end of the transmitted signal to stop, was charged with the necessary response. 2 light sensor ISL29004
ISL29004 is a digital sensor, a new generation of light integrates current amplifier, is used to eliminate the artificial light flashing filter to suppress the 50 hz / 60 hz and 16 bit adc, can convert light into 16, easy to use I2C standard digital output signal, provides users with single chip solutions. ISL29004 within two photosensitive diode, the diode 1 testing environment in visible and infrared light general illumination, infrared light diode two detection environment, the spectral response of the two diodes are mutually dependent. Users can be programmed to control the operation mode of the adc, output photodiode can only 1 or 2 test results, under mode 2 can also be output by the internal function reduction calculation results on the impact of the filter out infrared light. ISL29004 there were 8 eight registers, a command register, a control register, two interruption threshold register, four read-only data registers. Command register can be set, the work mode of the ADC and resolution; Control registers, can adjust the gain to choose illumination detection range; Read-only data registers LSB_Sensor and MSB_Sensor can read ADC recent digital output; Read-only data registers LSB_timer and MSB_timer last time can read ADC integral number of cycles. Eight register address in turn is 00 h ~ 7 h.
ISL29004 has 2 I2C interface address selection pins A0, A1, can be installed on the I2C bus routes 1 4 ISL29004, and can coexist and other I2C peripheral node.
1 overall structure system structure diagram is shown in figure 1. MCU P87LPC768 as master controller of I2C bus, ISL29004 as alleged, four ISL29004 device address in the order: 44 h ~ 47 h, through ISL29004 address pin A1, A0 set. In the system, the use of the quasi P82896 bidirectional I2C bus buffer on the I2C bus driver extensions, I2C bus can achieve long-distance transmission, expand the illumination distance; After extension P82896 buffer P87LPC768 of I2C bus by twisted-pair and distant P82896 and ISL29004 connection. Corresponding with the four groups of intensity of illumination acquisition circuit, dimming control circuit also has four groups, connected with the four PWM P87LPC768 pin.