Hardware Reference
In-Depth Information
Data Bits
Each sensor data bit begins with a transition to low, followed by the transition to high, as
shown in Figure 1-4 . The end of the bit occurs when the line is brought low again as the
start of the next bit. The last bit is marked off by one final low-to-high transition.
Figure 1-4. DHT11 data bit
Each data bit starts with a transition to low, lasting for 50 ms. The final transition
to low after the last bit also lasts for 50 ms. After the bit's low-to-high transition, the bit
becomes a 0 if the high lasts only 26 to 28 microseconds. A 1 bit stays high for 70 ms
instead. Every data bit is completed when the transition from high to low occurs for the
start of the next bit (or final transition).
Data Format
Figure 1-5 illustrates the 40-bit sensor response, transmitting the most significant bit first.
The datasheet states 16 bits of relative humidity, 16 bits of temperature in Celsius, and an
8-bit checksum. However, the DHT11 always sends 0s for the humidity and temperature
fractional bytes. Thus the device really has only 8 bits of precision for each measurement.
Presumably, other models (or future ones) provide fractional values for greater precision.
Figure 1-5. DHT11 data format
 
Search WWH ::




Custom Search