Three-in-one (temperature, humidity and light) sensor design

Publisher:数字行者Latest update time:2012-09-10 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

This design uses the SHT11 temperature and humidity sensor chip and an ambient light sensor MAX9635 with integrated ADC to realize the design of a three-in-one sensor for temperature, humidity and light. It aims to solve the problem that when measuring ambient temperature, humidity and light intensity, most thermistors, humidity-sensitive capacitors and photosensitive devices are used to measure temperature, humidity and light intensity respectively. This measurement method generally requires the design of corresponding signal conditioning circuits and a complex calibration process, and the measurement accuracy is difficult to guarantee. When monitoring more than two parameters, each measurement point must use an independent sensor and an independent signal conditioning circuit, which not only greatly increases the cost and volume of the measurement system, but also increases the complexity of system design to a certain extent.

1 Introduction to three-in-one sensor

The sensor integrates ambient temperature, humidity and light intensity sensors into one, which greatly reduces the cost and volume of the measurement system and reduces the complexity of system design.

1.1 Temperature and humidity measurement
The SHT11 digital temperature and humidity sensor chip is used to measure the ambient temperature and humidity. Its main features are: (1) Highly integrated. (2) Provides a two-wire digital serial interface with a simple interface. (3) The measurement accuracy can be adjusted programmably. (4) The measurement accuracy is high and can provide temperature-compensated humidity measurement values ​​and high-quality dew point calculations. (5) After the measurement and communication are completed, it automatically switches to low power consumption mode. (6) High reliability and self-calibration.

SHT11 integrates temperature, humidity sensing, A/D conversion and heater functions into one chip. The chip converts humidity and temperature into electrical signals respectively, and after 14-bit A/D conversion, it outputs digital signals through a two-wire serial digital interface. During the measurement process, the calibration coefficient automatically calibrates the signal from the sensor.

Because the sensor and the circuit are combined together, the sensor has much better performance than other types of humidity sensors. First, the increase in sensor signal strength enhances the sensor's anti-interference performance and ensures the long-term stability of the sensor. The sensor can be directly connected to any type of microprocessor or microcontroller system through the I2C bus, thereby reducing the hardware cost of the interface circuit and simplifying the interface method.

1.2 Illuminance Measurement
Ambient Light Sensor The MAX9635 optical sensor is an integrated photodiode and ADC with an I2C digital interface. The sensor IC has ultra-low current consumption (typically 0.65 μA) and an extremely wide light dynamic range of 0.045 to 188,000 lx. The on-chip automatic range adjustment mechanism does not require user intervention in the gain range setting.

2 Temperature and humidity sensor working sequence

The I2C communication data format of SHT11 is not compatible with the normal format.

(1) Transmission starts. When SCK is high, SDA changes from high level to low level, and when SCK is high next time, SDA increases, as shown in Figure 1.


(2) Address and test object command. This command contains 3 address bits and 5 command bits, followed by an ACK bit, indicating that SHT11 has correctly received the command. The sensor command list is shown in Table 2.



(3) Temperature and humidity measurement timing. When the temperature/humidity measurement command is issued, the controller will wait until the measurement is completed (measurement with 8/12/14-bit resolution takes approximately 11/55/210 ms respectively). When the measurement is completed, SHT11 pulls the data line low and then transmits 2 bytes of measurement data and 1 Byte CRC checksum. Communication stops after confirming the CRC data bit. If the CRC checksum is not used, the controller will keep ACK high after the LSB of the measurement data to stop communication, and will automatically return to sleep mode after the measurement and communication are completed. For the timing corresponding to the temperature and humidity measurement commands, see the SHT11 manual.
(4) Temperature and humidity register configuration. Some advanced functions in the temperature and humidity sensor are implemented through the status register. For the type and description of each bit in the register, see the SHT11 user manual.

3 Light sensor I2C communication format

Start and Stop conditions: The host initiates communication by sending a Start condition. The Start and Repeated Start conditions are shown in Figure 2, and the Stop condition is shown in Figure 3.

Slave address: Write operation slave address 0x94, read operation 0x95.

Acknowledge: In write operation mode, the acknowledge bit (ACK) is the 9th clock bit and is the handshake signal of the sensor IC for each data byte it receives, as shown in Figure 4. If the host sends an acknowledgment if the data transmission fails, the bus master will retry the communication. After each byte is read, the host sends an acknowledge signal to continue the data transmission. When the host reads the last byte of data from the sensor IC, it sends a non-acknowledgement, followed by Stop.

Write Data Format: Figure 4 shows the correct frame format when writing 1 byte of data to the sensor IC.

Read data format: Figure 5 shows the correct frame format when reading 1 Byte of data.

Register definitions: 0x00 and 0x01 interrupt status and interrupt enable; 0x02 function configuration; 0x03 and 0x04 store lumen readings; 0x05 and 0x06 set lumen upper and lower limits; 0x07 sets appropriate threshold timer data.

Autoranging Mode: In the auto-mode configuration, the autoranging circuit changes its sensitivity in two ways. When the light intensity exceeds 700 lx, a shunt reduces the current of the photodiode by a factor of 8. In the default setting, the shunt ratio is 1 and the current is fed directly to the A/D converter. As the light intensity decreases, the autoranging circuit increases the integration time from 100 ms to 200 ms, 400 ms, or 800 ms. The combination of the shunt and the different integration times allows the A/D conversion range to be increased or decreased by a factor of 8 from its nominal 16-bit range. This results in a dynamic range of 22 bits, or slightly more than 4,000,000:1.

Data format of lumen reading: The sensor IC provides a digital output format that is easy for users to receive. It consists of a 4-bit exponent followed by an 8-bit mantissa. In the highest sensitivity mode, 1 count value represents 0.045 lx. The maximum value of the mantissa is 255, and the maximum value of the exponent is 14. Therefore, the maximum range is 255×214=4177920. In this mode, the maximum reading is 188000 lx, and any reading greater than this value is considered to be overload.

Threshold Register Data Format: The sensor IC interrupt circuitry requires the upper and lower limits to be given in a specific format in order to interpret the data correctly. The upper and lower limit values ​​in registers 0x05 and 0x06 must match the high byte lumen format, which consists of a 4-bit exponent and the 4 most significant bits of the mantissa.

Reference address:Three-in-one (temperature, humidity and light) sensor design

Previous article:Design of power supply for wireless sensor nodes based on environmental electromagnetic waves2
Next article:Three-in-one (temperature, humidity and light) sensor design

Latest Analog Electronics Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号