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.
Previous article:Three-in-one (temperature, humidity and light) sensor design
Next article:Edge Extraction of Infrared Images
- Popular Resources
- Popular amplifiers
- High signal-to-noise ratio MEMS microphone drives artificial intelligence interaction
- Advantages of using a differential-to-single-ended RF amplifier in a transmit signal chain design
- ON Semiconductor CEO Appears at Munich Electronica Show and Launches Treo Platform
- ON Semiconductor Launches Industry-Leading Analog and Mixed-Signal Platform
- Analog Devices ADAQ7767-1 μModule DAQ Solution for Rapid Development of Precision Data Acquisition Systems Now Available at Mouser
- Domestic high-precision, high-speed ADC chips are on the rise
- Microcontrollers that combine Hi-Fi, intelligence and USB multi-channel features – ushering in a new era of digital audio
- Using capacitive PGA, Naxin Micro launches high-precision multi-channel 24/16-bit Δ-Σ ADC
- Fully Differential Amplifier Provides High Voltage, Low Noise Signals for Precision Data Acquisition Signal Chain
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- IIC bus MSP430F149 and 24c16 comprehensive experiment programming example
- Why are the high-precision positioning systems of Beidou and GPS not open to ordinary users?
- Low power solar cell charging
- What is the purpose of connecting multiple capacitors in parallel and using a polarized capacitor among them?
- Why are the wild elephants heading north? Use your imagination and make bold predictions!
- Bose small speaker disassembly
- Guangdong Tonly Semiconductor suffered a confined space suffocation accident: 4 workers from the outsourcing unit died
- LIS3MDL evaluation board STEVAL-MKI137V1 data
- TI Embedded Live Month: In-depth exploration of new applications of embedded products in industry and automobiles. The first live broadcast today at 10:00
- Knowing the total resistance of the resistors, how big should two resistors be connected in parallel?