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

Publisher:陈晨5566Latest update time:2012-09-10 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
4 Application design of three-in-one sensor

The microprocessor uses a two-wire serial digital interface to communicate with the sensor, and the hardware interface is very simple; however, the communication protocol is defined by the chip manufacturer, so in software design, it is necessary to use the microprocessor's general I/O port to simulate the communication protocol.

4.1 Hardware Design
The hardware connection is shown in Figure 6.

4.2 Software Design
Since the two-wire serial communication protocol of SHT11 and MAX9635 is incompatible with the I2C protocol, the GTIO port must be used to simulate the data format shown in Figure 4 and Figure 5.

Based on the above macro definition, the SCK and SDA buses can be easily made to output a high or low level for a certain period of time, thereby realizing the reading and writing of the sensor.

4.3 Calculation of temperature, humidity and light values

4.3.1 Humidity linear compensation and temperature compensation
SHT11 can directly output digital humidity value as "relative humidity" through SDA data bus. Linear compensation and temperature compensation are required to obtain a more accurate humidity value. The humidity value can be corrected according to formula (1).

Where RHlinear is the humidity value after linear compensation, SORH is the relative humidity measurement value, C1, C2 and C3 are linear compensation coefficients, and their values ​​are shown in Table 3.

Since the influence of temperature on humidity is very obvious, and the actual temperature is different from the test reference temperature of 25°C, the compensation formula is shown in formula (2).


Where RHtrue is the humidity value after linear compensation and temperature compensation; T is the temperature when the humidity value is tested; t1 and t2 are temperature compensation coefficients, and their values ​​are shown in Table 4.

4.3.2 Temperature value output
Since SHT11 has good linear output, the actual temperature value can be calculated by formula (3).

In the formula, d1 and d2 are specific coefficients. The value of d1 is related to the working voltage of SHT11, and the value of d2 is related to the resolution of the A/D converter inside SHT11. The corresponding relationships are shown in Table 5 and Table 6 respectively.

5 Conclusion

The sensor integrates temperature sensor, humidity sensor and ambient light sensor, and can be used for real-time monitoring of ambient temperature, humidity and light intensity. It has the advantages of high precision, low cost, small size and simple interface. Since the chip uses digital signal output, it has higher anti-interference ability than similar chips.

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

Previous article:Three-in-one (temperature, humidity and light) sensor design
Next article:Edge Extraction of Infrared Images

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号