The sensor node of wireless light intensity based on TSL2561 is designed
Look over in the resent 90 days adding the desk-top instrument of the new product makes perfectly up most: Interconnect intelligence and debug the latest electronic devices and components materials and download and send Rui electronic TI lottery-attached question and answer – send 3D car mouse ultralow noise DC/DC miniature module LTM4606/12IR free easily Introduce, adopt metallic car grades of insulated-gate bipolar transistor accord with the intersection of balancer and global electronic the intersection of interface unit and manufacturer of human engineering and samtec newest circuit breaker protect weld, brand of boot Tektronix global ondoscope first
Summary: In the environmental test parameter, the illumination intensity is an important index. This selected works use the sensor TSL2561 and JN5139 wireless chip of light intensity, has designed a kind of light intensity sensor node, provide concrete soft hardware design, and carried on MATLAB emulation.
Foreword
In work such as agricultural production, meteorological environmental protection, the illumination intensity is the important parameter in the environmental test; Especially in the greenhouse greenhouse, the light intensity has decisive effect on crop. In order to realize the supervision on light intensity, this selected works use the high-speed, programmable chip TSL2561 as the light intensity sensor, measure illumination intensity. The microprocessor adopts the high performance, low power consumption, wireless chip JN5139 of high speed that Britain Jennic Company introduces. This chip incorporates processor, transceiver into an organic whole, design raising CPU utilization factor greatly through being clog-free, compared with traditional wired apparatus, have high, higher advantage of low cost, maintainability of flexibility.
Internal structure and operating principle of 1 TSL2561
TSL2561 [1 ] is the light intensity digital conversion chip of second generation that TAOS Company introduces, have high speed, low power consumption, wide range, programmable and flexible ~s advantages of disposing etc.. TSL2561 has interface of direct I2C, are used for converting the illumination intensity to the digital signal to export. Its internal structure.
TSL2561 internal connection piece light sensitive diode ( Passway 0) And one piece infrared to respond to light sensitive diode ‘ Passway 1) . This integrated circuit offers the ability of near right photoresponse in 20 dynamic range. Two Integrated integral analog to digital converters, can convert the photosensitive electric current to a digital output, and in the passway 0 and their own registers of passway within the write chip. Digital output represents the light intensity of measuring every passway, it can be the input of the microprocessor. TSL2561 can be visited by the microcontroller through I2C bus line agreement directly, the microcontroller, through realizing the control on TSL2561 to the reading and writing of 16 registers of its inside.
Structure chart within Fig. 1 TSL2561
2 hardware design
The microprocessor adopts high speed, low power consumption, low-cost JN5139 wireless SoC chip [3 ] that Jennic Company introduces. This chip has integrated a 32-bit microcomputer RISC processor, fully compatible 2.4 GHz IEEE 802.15.4 transceiver, available RAM in ROM and 8- 96 KB with 192 KB, offers abundant analog quantity and digital peripheral device interface. JN5139 chip have the intersection of I2C and bus control unit, need, connect respectively with the intersection of I2C and total collinear SCL and the intersection of SDA and line of TSL2561 while being direct the intersection of President and collinear clock line and data link this only.
,The sensor circuit of light intensity is mainly by SoC chip, power, status indication LED circuit, reset circuit, Flash write controlling circuit, light intensity sensor and decoupling circuit make up. This circuit has reduced the complexity designed greatly. Meanwhile, for make light distribute at sensor evenly, design at TSL2561 adding a piece of hemispheric fresnel lens originally, can concentrate the infrared rays on the sensor [4 ] effectively, thus reduce the illumination intensity of illuminating on the sensor appropriately, will not exceed the threshold value presumed.
Light intensity sensor circuit of Fig. 2
Byte mode transmission data sequential chart of Fig. 3
3 software design
Byte mode receive data sequential chart of Fig. 4
TSL2561 is a digital sensor, the outcoming signal accords with I2C total line standard. This bus line supports sending by way of byte and receive data.
The byte mode sends the data format as follows:
The byte mode receives the data format as follows:
Among them, A is the answer back signal, 0 is represented and responded to (ACK) ,It is not responded to (NACK) that 1 is represented ; S is the enabling signal; P is a break alarm; Wr writes ‘ The low level is effective) ; Rd reads ‘ The high level is effective) . The unshaded area reaches the sensor for the control device; The shaded area reaches the control device for the sensor.
I2C total collinear SDA thread and SCL thread are bidirectional lines, when the bus line is idle, these two striplines are both high level [5 ]. The data on the SDA line must remain stable in the high level cycle of the clock, data collinear high or low level state could change when SCL collinear clock signal is the low level only. I2C is always collinear and initial and stop condition is: When SCL line is the high level, SDA line switches over representing the starting condition from high level to low level; SDA line switches over representing the stop condition from low level to high level. Because the data on I2C bus line are by 8 bit traffic, are received by the receiver for each byte that guarantees the sender and sends, during 9th clock pulse, the data link is released, is feedbacked an acknowledgement indicator by the receiver. The acknowledgement indicator is to stipulate in order to confirm the location (indicate by ACK) effectively at the time of the low level ,Show the receiver has already received this byte successfully; When the acknowledgement indicator is the high level, stipulate for not confirming the location (indicate by NACK) ,Show the receiver receives this byte and has not succeeded.
Sequential chart that JN5139 sent to TSL2561.
JN5139 receives the data sequence that TSL2561 sends.
Data transmission procedure of Fig. 5
Transmissive procedure of the data between JN5139 and TLS2561. First of all, JN5139 sets up enabling signal, starts I2C bus line; Then, begin to send the transmit data between the two, and feedback the acknowledgement indicator during 9th clock pulse, until data transmission is over, release SDA line, stop I2C bus line.
4 MATLAB emulation
After A/D changes and finishes, read the corresponding value CH0 and CH1 from their own registers of passways 0 and passways separately, and calculate according to the related data of the chip and convert it into Lux for the measuring of the unit. Suppose the value that CH0 reads is P1 ‘ The unit is Lux) ,The value that CH1 reads is P2 ‘ The unit is Lux) ,The measured value of the survey meter of light intensity is P. In order to plan to formate a value the same as actual light intensity (show with P’) of two passways of values ,Can find the relation between P’, P1, P2 by a curve. Set curvilinear equation as:
According to the measured data, find the coefficient C0 C4, can calculate the light intensity that the light intensity sensor measure. The measured value of the light intensity sensor compares with measured value of the survey meter of light intensity.
Fig. 6 measures the curve to compare with the contours of fitting
Conclusion
This text, on the basis of the light intensity sensor TSL2561 and light intensity sensor node which the microprocessor JN5139 designed, the advantage that the simple, stability of having peripheral circuit is higher, and it is wireless to adopt and transmit, the use is very extensive.
Tags: The sensor node of wireless light intensity based on TSL2561 is designed